Mercurial > vim
comparison src/gui_xmebw.c @ 888:882b2fa49a2a v7.0.014
updated for version 7.0-014
author | vimboss |
---|---|
date | Sat, 13 May 2006 13:41:03 +0000 |
parents | 8cd729851562 |
children | e6bd96f2d7b8 |
comparison
equal
deleted
inserted
replaced
887:9dc77520c6d3 | 888:882b2fa49a2a |
---|---|
478 | 478 |
479 if ((eb->core.width <= 2 * eb->primitive.highlight_thickness) | 479 if ((eb->core.width <= 2 * eb->primitive.highlight_thickness) |
480 || (eb->core.height <= 2 * eb->primitive.highlight_thickness)) | 480 || (eb->core.height <= 2 * eb->primitive.highlight_thickness)) |
481 return; | 481 return; |
482 | 482 |
483 #ifndef LESSTIF_VERSION | 483 #if !defined(LESSTIF_VERSION) && (XmVersion > 1002) |
484 { | 484 { |
485 XmDisplay dpy; | 485 XmDisplay dpy; |
486 | 486 |
487 dpy = (XmDisplay) XmGetXmDisplay(XtDisplay(eb)); | 487 dpy = (XmDisplay) XmGetXmDisplay(XtDisplay(eb)); |
488 etched_in = dpy->display.enable_etched_in_menu; | 488 etched_in = dpy->display.enable_etched_in_menu; |
639 draw_label(XmEnhancedButtonWidget eb, XEvent *event, Region region) | 639 draw_label(XmEnhancedButtonWidget eb, XEvent *event, Region region) |
640 { | 640 { |
641 GC tmp_gc = NULL; | 641 GC tmp_gc = NULL; |
642 Boolean replaceGC = False; | 642 Boolean replaceGC = False; |
643 Boolean deadjusted = False; | 643 Boolean deadjusted = False; |
644 #ifndef LESSTIF_VERSION | 644 #if !defined(LESSTIF_VERSION) && (XmVersion > 1002) |
645 XmDisplay dpy = (XmDisplay)XmGetXmDisplay(XtDisplay(eb)); | 645 XmDisplay dpy = (XmDisplay)XmGetXmDisplay(XtDisplay(eb)); |
646 Boolean etched_in = dpy->display.enable_etched_in_menu; | 646 Boolean etched_in = dpy->display.enable_etched_in_menu; |
647 #else | 647 #else |
648 Boolean etched_in = False; | 648 Boolean etched_in = False; |
649 #endif | 649 #endif |
724 if (Lab_IsMenupane(eb)) | 724 if (Lab_IsMenupane(eb)) |
725 { | 725 { |
726 if ((((ShellWidget) XtParent(XtParent(eb)))->shell.popped_up) | 726 if ((((ShellWidget) XtParent(XtParent(eb)))->shell.popped_up) |
727 && _XmGetInDragMode((Widget) eb)) | 727 && _XmGetInDragMode((Widget) eb)) |
728 { | 728 { |
729 #ifndef LESSTIF_VERSION | 729 #if !defined(LESSTIF_VERSION) && (XmVersion > 1002) |
730 XmDisplay dpy = (XmDisplay) XmGetXmDisplay(XtDisplay(wid)); | 730 XmDisplay dpy = (XmDisplay) XmGetXmDisplay(XtDisplay(wid)); |
731 Boolean etched_in = dpy->display.enable_etched_in_menu; | 731 Boolean etched_in = dpy->display.enable_etched_in_menu; |
732 #else | 732 #else |
733 Boolean etched_in = False; | 733 Boolean etched_in = False; |
734 #endif | 734 #endif |
808 XmEnhancedButtonWidget eb = (XmEnhancedButtonWidget)wid; | 808 XmEnhancedButtonWidget eb = (XmEnhancedButtonWidget)wid; |
809 XmPushButtonCallbackStruct call_value; | 809 XmPushButtonCallbackStruct call_value; |
810 | 810 |
811 if (Lab_IsMenupane(eb)) | 811 if (Lab_IsMenupane(eb)) |
812 { | 812 { |
813 #ifndef LESSTIF_VERSION | 813 #if !defined(LESSTIF_VERSION) && (XmVersion > 1002) |
814 XmDisplay dpy = (XmDisplay) XmGetXmDisplay(XtDisplay(wid)); | 814 XmDisplay dpy = (XmDisplay) XmGetXmDisplay(XtDisplay(wid)); |
815 Boolean etched_in = dpy->display.enable_etched_in_menu; | 815 Boolean etched_in = dpy->display.enable_etched_in_menu; |
816 #else | 816 #else |
817 Boolean etched_in = False; | 817 Boolean etched_in = False; |
818 #endif | 818 #endif |
1148 | 1148 |
1149 static void | 1149 static void |
1150 Redisplay(Widget w, XEvent *event, Region region) | 1150 Redisplay(Widget w, XEvent *event, Region region) |
1151 { | 1151 { |
1152 XmEnhancedButtonWidget eb = (XmEnhancedButtonWidget) w; | 1152 XmEnhancedButtonWidget eb = (XmEnhancedButtonWidget) w; |
1153 #ifndef LESSTIF_VERSION | 1153 #if !defined(LESSTIF_VERSION) && (XmVersion > 1002) |
1154 XmDisplay dpy; | 1154 XmDisplay dpy; |
1155 XtEnum default_button_emphasis; | 1155 XtEnum default_button_emphasis; |
1156 #endif | 1156 #endif |
1157 XRectangle box; | 1157 XRectangle box; |
1158 int dx; | 1158 int dx; |
1160 short fill = 0; | 1160 short fill = 0; |
1161 | 1161 |
1162 if (!XtIsRealized((Widget)eb)) | 1162 if (!XtIsRealized((Widget)eb)) |
1163 return; | 1163 return; |
1164 | 1164 |
1165 #ifndef LESSTIF_VERSION | 1165 #if !defined(LESSTIF_VERSION) && (XmVersion > 1002) |
1166 dpy = (XmDisplay)XmGetXmDisplay(XtDisplay(eb)); | 1166 dpy = (XmDisplay)XmGetXmDisplay(XtDisplay(eb)); |
1167 default_button_emphasis = dpy->display.default_button_emphasis; | 1167 default_button_emphasis = dpy->display.default_button_emphasis; |
1168 #endif | 1168 #endif |
1169 | 1169 |
1170 /* | 1170 /* |
1239 } | 1239 } |
1240 else | 1240 else |
1241 { | 1241 { |
1242 int adjust = 0; | 1242 int adjust = 0; |
1243 | 1243 |
1244 #ifndef LESSTIF_VERSION | 1244 #if !defined(LESSTIF_VERSION) && (XmVersion > 1002) |
1245 /* | 1245 /* |
1246 * NOTE: PushButton has two types of shadows: primitive-shadow and | 1246 * NOTE: PushButton has two types of shadows: primitive-shadow and |
1247 * default-button-shadow. If pushbutton is in a menu only primitive | 1247 * default-button-shadow. If pushbutton is in a menu only primitive |
1248 * shadows are drawn. | 1248 * shadows are drawn. |
1249 */ | 1249 */ |
1287 { | 1287 { |
1288 XmeClearBorder(XtDisplay(eb), XtWindow(eb), | 1288 XmeClearBorder(XtDisplay(eb), XtWindow(eb), |
1289 adjust, adjust, rectwidth, rectheight, borderwidth); | 1289 adjust, adjust, rectwidth, rectheight, borderwidth); |
1290 } | 1290 } |
1291 | 1291 |
1292 #ifndef LESSTIF_VERSION | 1292 #if !defined(LESSTIF_VERSION) && (XmVersion > 1002) |
1293 switch (default_button_emphasis) | 1293 switch (default_button_emphasis) |
1294 { | 1294 { |
1295 case XmINTERNAL_HIGHLIGHT: | 1295 case XmINTERNAL_HIGHLIGHT: |
1296 /* The call above erases the border highlighting. */ | 1296 /* The call above erases the border highlighting. */ |
1297 if (eb->primitive.highlight_drawn) | 1297 if (eb->primitive.highlight_drawn) |
1363 eb->pushbutton.show_as_default; | 1363 eb->pushbutton.show_as_default; |
1364 else | 1364 else |
1365 default_button_shadow_thickness = | 1365 default_button_shadow_thickness = |
1366 eb->pushbutton.default_button_shadow_thickness; | 1366 eb->pushbutton.default_button_shadow_thickness; |
1367 | 1367 |
1368 #ifndef LESSTIF_VERSION | 1368 #if !defined(LESSTIF_VERSION) && (XmVersion > 1002) |
1369 /* | 1369 /* |
1370 * Compute location of bounding box to contain the | 1370 * Compute location of bounding box to contain the |
1371 * defaultButtonShadow. | 1371 * defaultButtonShadow. |
1372 */ | 1372 */ |
1373 switch (default_button_emphasis) | 1373 switch (default_button_emphasis) |