aboutsummaryrefslogtreecommitdiff
path: root/graphics/xfig/files/patch-w_indpanel.c
diff options
context:
space:
mode:
Diffstat (limited to 'graphics/xfig/files/patch-w_indpanel.c')
-rw-r--r--graphics/xfig/files/patch-w_indpanel.c300
1 files changed, 117 insertions, 183 deletions
diff --git a/graphics/xfig/files/patch-w_indpanel.c b/graphics/xfig/files/patch-w_indpanel.c
index 4be94f44b745..bd4c9aecd613 100644
--- a/graphics/xfig/files/patch-w_indpanel.c
+++ b/graphics/xfig/files/patch-w_indpanel.c
@@ -1,194 +1,128 @@
---- w_indpanel.c.orig Sat Oct 19 01:05:41 2002
-+++ w_indpanel.c Wed Aug 31 09:49:42 2005
-@@ -60,9 +60,11 @@
-
- #define MAX_ARROWSIZE 3 /* maximum value for cur_arrowsizeshown */
-
-+#ifndef XAW3D
- /* popup message over button when mouse enters it */
- static void ind_balloon_trigger();
- static void ind_unballoon();
-+#endif
-
- /***** value panel set translations *****/
- static String set_translations =
-@@ -471,7 +473,7 @@
- 0x3f, 0x02, 0x7f, 0x02, 0xff, 0x02, 0xff, 0x03};
-
- /* create a ind_sw_info struct for the update widget
-- so we can use the balloon routines */
-+ so we can use the balloon routines or the Tip widget */
-
- static ind_sw_info upd_sw_info, upd_set_sw_info, upd_clr_sw_info, upd_tog_sw_info;
-
-@@ -506,10 +508,12 @@
- strcpy(upd_sw_info.line1,"Selects which settings are updated");
- upd_sw_info.line2[0] = '\0';
- upd_sw_info.sw_width = 70; /* rough guess */
-+#ifndef XAW3D
- XtAddEventHandler(upd_ctrl, EnterWindowMask, False,
- ind_balloon_trigger, (XtPointer) &upd_sw_info);
- XtAddEventHandler(upd_ctrl, LeaveWindowMask, False,
- ind_unballoon, (XtPointer) &upd_sw_info);
-+#endif
-
- FirstArg(XtNborderWidth, 0);
- NextArg(XtNjustify, XtJustifyCenter);
-@@ -518,11 +522,12 @@
- NextArg(XtNinternalHeight, 0);
- upd_ctrl_lab = XtCreateManagedWidget("upd_ctrl_label", labelWidgetClass,
- upd_ctrl, Args, ArgCount);
--
-+#ifndef XAW3D
- XtAddEventHandler(upd_ctrl_lab, EnterWindowMask, False,
- ind_balloon_trigger, (XtPointer) &upd_sw_info);
- XtAddEventHandler(upd_ctrl_lab, LeaveWindowMask, False,
- ind_unballoon, (XtPointer) &upd_sw_info);
-+#endif
-
- FirstArg(XtNdefaultDistance, 0);
- NextArg(XtNborderWidth, 0);
-@@ -545,10 +550,12 @@
+--- w_indpanel.c.orig Thu Apr 6 12:45:36 2006
++++ w_indpanel.c
+@@ -56,7 +56,7 @@
+ void show_depth(ind_sw_info *sw), show_zoom(ind_sw_info *sw);
+ void show_fillstyle(ind_sw_info *sw);
+ void fontpane_popup(int *psfont_adr, int *latexfont_adr, int *psflag_adr, void (*showfont_fn) (/* ??? */), Widget show_widget);
+-void make_pulldown_menu_images(choice_info *entries, Cardinal nent, Pixmap **images, char **texts, Widget parent, XtCallbackProc callback);
++void make_pulldown_menu_images(choice_info *entries, Cardinal nent, Pixmap *images, char **texts, Widget parent, XtCallbackProc callback);
+ void tog_selective_update(long unsigned int mask);
+ unsigned long cur_indmask; /* mask showing which indicator buttons are mapped */
+ void inc_zoom(ind_sw_info *sw), dec_zoom(ind_sw_info *sw), fit_zoom(ind_sw_info *sw);
+@@ -581,7 +581,7 @@
+ set_upd = XtCreateManagedWidget("set_upd", commandWidgetClass,
+ upd_ctrl_btns, Args, ArgCount);
+ XtAddEventHandler(set_upd, ButtonReleaseMask, False,
+- set_all_update, (XtPointer) 0);
++ (XtEventHandler)set_all_update, (XtPointer) 0);
+
strcpy(upd_set_sw_info.line1,"Sets all update flags");
upd_set_sw_info.line2[0] = '\0';
- upd_set_sw_info.sw_width = UPD_BITS+6;
-+#ifndef XAW3D
- XtAddEventHandler(set_upd, EnterWindowMask, False,
- ind_balloon_trigger, (XtPointer) &upd_set_sw_info);
- XtAddEventHandler(set_upd, LeaveWindowMask, False,
- ind_unballoon, (XtPointer) &upd_set_sw_info);
-+#endif
-
+@@ -596,7 +596,7 @@
clr_upd = XtCreateManagedWidget("clr_upd", commandWidgetClass,
upd_ctrl_btns, Args, ArgCount);
-@@ -558,10 +565,12 @@
+ XtAddEventHandler(clr_upd, ButtonReleaseMask, False,
+- clr_all_update, (XtPointer) 0);
++ (XtEventHandler)clr_all_update, (XtPointer) 0);
+
strcpy(upd_clr_sw_info.line1,"Clears all update flags");
upd_clr_sw_info.line2[0] = '\0';
- upd_clr_sw_info.sw_width = UPD_BITS+6;
-+#ifndef XAW3D
- XtAddEventHandler(clr_upd, EnterWindowMask, False,
- ind_balloon_trigger, (XtPointer) &upd_clr_sw_info);
- XtAddEventHandler(clr_upd, LeaveWindowMask, False,
- ind_unballoon, (XtPointer) &upd_clr_sw_info);
-+#endif
-
+@@ -611,7 +611,7 @@
tog_upd = XtCreateManagedWidget("tog_upd", commandWidgetClass,
upd_ctrl_btns, Args, ArgCount);
-@@ -571,10 +580,12 @@
+ XtAddEventHandler(tog_upd, ButtonReleaseMask, False,
+- tog_all_update, (XtPointer) 0);
++ (XtEventHandler)tog_all_update, (XtPointer) 0);
+
strcpy(upd_tog_sw_info.line1,"Toggles all update flags");
upd_tog_sw_info.line2[0] = '\0';
- upd_tog_sw_info.sw_width = UPD_BITS+6;
-+#ifndef XAW3D
- XtAddEventHandler(tog_upd, EnterWindowMask, False,
- ind_balloon_trigger, (XtPointer) &upd_tog_sw_info);
- XtAddEventHandler(tog_upd, LeaveWindowMask, False,
- ind_unballoon, (XtPointer) &upd_tog_sw_info);
-+#endif
-
- /* start with all components affected by update */
- cur_updatemask = I_UPDATEMASK;
-@@ -669,11 +680,13 @@
- /* (callbacks pass same data for ANY button) */
- XtAddEventHandler(sw->button, ButtonReleaseMask, False,
- sel_ind_but, (XtPointer) sw);
-+#ifndef XAW3D
- /* popup when mouse passes over button */
- XtAddEventHandler(sw->button, EnterWindowMask, False,
- ind_balloon_trigger, (XtPointer) sw);
- XtAddEventHandler(sw->button, LeaveWindowMask, False,
- ind_unballoon, (XtPointer) sw);
-+#endif
- XtOverrideTranslations(sw->button,
- XtParseTranslationTable(ind_translations));
- }
-@@ -898,6 +911,7 @@
-
- }
-
-+#ifndef XAW3D
- /* come here when the mouse passes over a button in the indicator panel */
-
- static Widget ind_balloon_popup = (Widget) 0;
-@@ -980,6 +994,7 @@
- ind_balloon_popup = (Widget) 0;
- }
- }
-+#endif
-
- generate_choice_pixmaps(isw)
- ind_sw_info *isw;
-@@ -1002,13 +1017,62 @@
- update_indpanel(mask)
- unsigned long mask;
+@@ -2513,7 +2513,7 @@
+ /* thickness spinner */
+ sprintf(indbuf,"%d",dimline_thick);
+ beside = MakeIntSpinnerEntry(lineform, &line_thick_w, "line_thickness",
+- below, beside, dimline_panel_preview, indbuf, 0, MAX_LINE_WIDTH, 1, 30);
++ below, beside, (XtCallbackProc)dimline_panel_preview, indbuf, 0, MAX_LINE_WIDTH, 1, 30);
+
+ below = beside;
+
+@@ -2567,7 +2567,7 @@
+ /* thickness spinner */
+ sprintf(indbuf,"%d",dimline_boxthick);
+ beside = MakeIntSpinnerEntry(boxform, &box_thick_w, "box_line_thickness",
+- below, beside, dimline_panel_preview, indbuf, 0, MAX_LINE_WIDTH, 1, 30);
++ below, beside, (XtCallbackProc)dimline_panel_preview, indbuf, 0, MAX_LINE_WIDTH, 1, 30);
+
+ below = beside;
+
+@@ -2649,7 +2649,7 @@
+ /* length spinner */
+ sprintf(indbuf,"%.1f",dimline_arrowlength);
+ beside = MakeFloatSpinnerEntry(arrowform, &arrow_length_w, "arrow_length",
+- below, beside, dimline_panel_preview, indbuf, 0.1, 200.0, 1.0, 50);
++ below, beside, (XtCallbackProc)dimline_panel_preview, indbuf, 0.1, 200.0, 1.0, 50);
+
+ below = beside;
+
+@@ -2663,7 +2663,7 @@
+ /* width spinner */
+ sprintf(indbuf,"%.1f",dimline_arrowwidth);
+ beside = MakeFloatSpinnerEntry(arrowform, &arrow_width_w, "arrow_width",
+- below, beside, dimline_panel_preview, indbuf, 0.1, 200.0, 1.0, 50);
++ below, beside, (XtCallbackProc)dimline_panel_preview, indbuf, 0.1, 200.0, 1.0, 50);
+
+ /****************************/
+ /* now frame for Ticks info */
+@@ -2688,7 +2688,7 @@
+ /* "Ticks" checkbutton */
+ below = CreateCheckbutton("Show ticks", "ticks", tickform, below, (Widget) NULL,
+ MANAGE, LARGE_CHK, &dimline_ticks,
+- dimline_panel_preview, (Widget) NULL);
++ (XtCallbackProc)dimline_panel_preview, (Widget *) NULL);
+
+ /* Tick Thickness label */
+ FirstArg(XtNlabel, "Thickness");
+@@ -2700,7 +2700,7 @@
+ /* thickness spinner */
+ sprintf(indbuf,"%d",dimline_tickthick);
+ (void) MakeIntSpinnerEntry(tickform, &tick_thick_w, "tick_line_thickness",
+- below, beside, dimline_panel_preview, indbuf, 0, MAX_LINE_WIDTH, 1, 28);
++ below, beside, (XtCallbackProc)dimline_panel_preview, indbuf, 0, MAX_LINE_WIDTH, 1, 28);
+
+ /***************************/
+ /* now frame for Text info */
+@@ -2737,7 +2737,7 @@
+ psfont_menu_bitmaps[dimline_font + 1] :
+ latexfont_menu_bitmaps[dimline_font]);
+ font_button = XtCreateManagedWidget("font", commandWidgetClass, textform, Args, ArgCount);
+- XtAddCallback(font_button, XtNcallback, dimline_font_popup, (XtPointer) NULL);
++ XtAddCallback(font_button, XtNcallback, (XtCallbackProc)dimline_font_popup, (XtPointer) NULL);
+
+ below = font_button;
+
+@@ -2752,7 +2752,7 @@
+ /* size spinner */
+ sprintf(indbuf,"%d",dimline_fontsize);
+ beside = MakeIntSpinnerEntry(textform, &font_size_w, "font_size",
+- below, beside, dimline_panel_preview, indbuf,
++ below, beside, (XtCallbackProc)dimline_panel_preview, indbuf,
+ MIN_FONT_SIZE, MAX_FONT_SIZE, 1, 30);
+
+ below = beside;
+@@ -2796,7 +2796,7 @@
+ /* number of decimal places spinner */
+ sprintf(indbuf,"%d",dimline_prec);
+ below = MakeIntSpinnerEntry(stringform, &dimline_precw, "precision",
+- below, beside, dimline_panel_preview, indbuf,
++ below, beside, (XtCallbackProc)dimline_panel_preview, indbuf,
+ 0, 10, 1, 30);
+
+ /* Fixed text checkbutton */
+@@ -4776,7 +4776,7 @@
+ */
+
+ void
+-make_pulldown_menu_images(choice_info *entries, Cardinal nent, Pixmap **images, char **texts, Widget parent, XtCallbackProc callback)
++make_pulldown_menu_images(choice_info *entries, Cardinal nent, Pixmap *images, char **texts, Widget parent, XtCallbackProc callback)
{
-+#ifdef XAW3D
-+ char msg[60];
-+#endif
- register int i;
- register ind_sw_info *isw;
-
-+ /*
-+ * We must test for the widgets, as this is called by
-+ * w_cmdpanel.c:refresh_view_menu().
-+ */
-+
-+#ifdef XAW3D
-+ if (upd_ctrl)
-+ if (appres.showballoons)
-+ XawTipEnable(upd_ctrl, upd_sw_info.line1);
-+ else
-+ XawTipDisable(upd_ctrl);
-+ if (upd_ctrl_lab)
-+ if (appres.showballoons)
-+ XawTipEnable(upd_ctrl_lab, upd_sw_info.line1);
-+ else
-+ XawTipDisable(upd_ctrl_lab);
-+ if (set_upd)
-+ if (appres.showballoons)
-+ XawTipEnable(set_upd, upd_set_sw_info.line1);
-+ else
-+ XawTipDisable(set_upd);
-+ if (clr_upd)
-+ if (appres.showballoons)
-+ XawTipEnable(clr_upd, upd_clr_sw_info.line1);
-+ else
-+ XawTipDisable(clr_upd);
-+ if (tog_upd)
-+ if (appres.showballoons)
-+ XawTipEnable(tog_upd, upd_tog_sw_info.line1);
-+ else
-+ XawTipDisable(tog_upd);
-+ for (isw = ind_switches, i = 0; i < NUM_IND_SW; isw++, i++) {
-+ if (!isw->button)
-+ continue;
-+ if (appres.showballoons) {
-+ sprintf(msg, "%s", isw->line1);
-+ if (strlen(isw->line2))
-+ sprintf(msg + strlen(msg), " %s", isw->line2);
-+ XawTipEnable(isw->button, msg);
-+ } else
-+ XawTipDisable(isw->button);
-+ }
-+#endif
-+
- /* only update current mask if user wants to see relevant ind buttons */
- if (appres.ShowAllButtons)
- return;
-
-+ if (!ind_box)
-+ return;
- cur_indmask = mask;
- XtUnmanageChild(ind_box);
- for (isw = ind_switches, i = 0; i < NUM_IND_SW; isw++, i++) {
-@@ -1034,9 +1098,11 @@
- XButtonEvent xbutton;
- ind_sw_info *isw = (ind_sw_info *) closure;
-
-+#ifndef XAW3D
- /* since this command popups a window, destroy the balloon popup now. */
- ind_unballoon((Widget) 0, (XtPointer) 0, (XEvent*) 0, (Boolean*) 0);
- app_flush();
-+#endif
-
- xbutton = event->xbutton;
- #ifdef WHEELMOUSE
+ Widget pulldown_menu, entry;
+ char buf[64];