#include <Xm/DialogS.h>
#include <Xm/Form.h>
-#ifdef __STDC__
+#if defined __STDC__ || defined PROTOTYPES
#define P_(X) X
#else
#define P_(X) ()
Widget widget;
widget_value* val;
{
- XtVaSetValues (widget, XmNalignment, XmALIGNMENT_CENTER, 0);
+ XtVaSetValues (widget, XmNalignment, XmALIGNMENT_CENTER, NULL);
XtRemoveAllCallbacks (widget, XmNactivateCallback);
XtAddCallback (widget, XmNactivateCallback, xm_generic_callback, instance);
}
XtAddCallback (widget, XmNvalueChangedCallback,
xm_generic_callback, instance);
XtVaSetValues (widget, XmNset, val->selected,
- XmNalignment, XmALIGNMENT_BEGINNING, 0);
+ XmNalignment, XmALIGNMENT_BEGINNING, NULL);
}
static void
toggle = XtNameToWidget (widget, cur->value);
if (toggle)
{
- XtVaSetValues (toggle, XmNsensitive, cur->enabled, 0);
+ XtVaSetValues (toggle, XmNsensitive, cur->enabled, NULL);
if (!val->value && cur->selected)
- XtVaSetValues (toggle, XmNset, cur->selected, 0);
+ XtVaSetValues (toggle, XmNset, cur->selected, NULL);
if (val->value && strcmp (val->value, cur->value))
- XtVaSetValues (toggle, XmNset, False, 0);
+ XtVaSetValues (toggle, XmNset, False, NULL);
}
}
{
toggle = XtNameToWidget (widget, val->value);
if (toggle)
- XtVaSetValues (toggle, XmNset, True, 0);
+ XtVaSetValues (toggle, XmNset, True, NULL);
}
}
XmNmenuHelpWidget work, we need to set it before managing the
children.. --gerd. */
if (button)
- XtVaSetValues (widget, XmNmenuHelpWidget, button, 0);
+ XtVaSetValues (widget, XmNmenuHelpWidget, button, NULL);
/* LessTif apparently doesn't recompute centered text when more
widgets are added. So, do it after all widgets have been
created. */
if (title)
- XtVaSetValues (title, XmNalignment, XmALIGNMENT_CENTER, 0);
+ XtVaSetValues (title, XmNalignment, XmALIGNMENT_CENTER, NULL);
if (num_children)
XtManageChildren (children, num_children);
XtVaSetValues (widget,
XmNsensitive, val->enabled,
XmNuserData, val->call_data,
- 0);
+ NULL);
/* update the menu button as a label. */
if (val->this_one_change >= VISIBLE_CHANGE)
XtVaSetValues (widget,
XmNsensitive, val->enabled,
XmNuserData, val->call_data,
- 0);
+ NULL);
/* Common to all label like widgets */
if (XtIsSubclass (widget, xmLabelWidgetClass))
if (class == xmToggleButtonWidgetClass || class == xmToggleButtonGadgetClass)
{
- XtVaGetValues (widget, XmNset, &val->selected, 0);
+ XtVaGetValues (widget, XmNset, &val->selected, NULL);
val->edited = True;
}
else if (class == xmTextWidgetClass)
int set = False;
Widget toggle = radio->composite.children [i];
- XtVaGetValues (toggle, XmNset, &set, 0);
+ XtVaGetValues (toggle, XmNset, &set, NULL);
if (set)
{
if (val->value)
Position x;
Position y;
- XtVaGetValues (widget, XtNwidth, &child_width, XtNheight, &child_height, 0);
+ XtVaGetValues (widget, XtNwidth, &child_width, XtNheight, &child_height, NULL);
XtVaGetValues (parent, XtNwidth, &parent_width, XtNheight, &parent_height,
- 0);
+ NULL);
x = (((Position)parent_width) - ((Position)child_width)) / 2;
y = (((Position)parent_height) - ((Position)child_height)) / 2;
if (y < 0)
y = 0;
- XtVaSetValues (widget, XtNx, x, XtNy, y, 0);
+ XtVaSetValues (widget, XtNx, x, XtNy, y, NULL);
}
static Widget
/* shrink the separator label back to their original size */
separator = XtNameToWidget (widget, "*separator_button");
if (separator)
- XtVaSetValues (separator, XtNwidth, 5, XtNheight, 5, 0);
+ XtVaSetValues (separator, XtNwidth, 5, XtNheight, 5, NULL);
/* Center the dialog in its parent */
recenter_widget (widget);
ac = 0;
XtSetArg(al[ac], XmNmenuAccelerator, 0); ++ac;
+#if 0
/* As of 2000-01-17, the LessTif menu bar resizes to height 0 when
all its children are removed, causing an annoying flickering
behavior. Prevent that by not allowing resizing. */
XtSetArg(al[ac], XmNresizeHeight, False); ++ac;
XtSetArg(al[ac], XmNresizeWidth, False); ++ac;
+#endif
return XmCreateMenuBar (instance->parent, instance->info->name, al, ac);
}
else if (event->xbutton.state & Button3Mask) trans = "<Btn3Down>";
else if (event->xbutton.state & Button2Mask) trans = "<Btn2Down>";
else if (event->xbutton.state & Button1Mask) trans = "<Btn1Down>";
- if (trans) XtVaSetValues (widget, XmNmenuPost, trans, 0);
+ if (trans) XtVaSetValues (widget, XmNmenuPost, trans, NULL);
XmMenuPosition (widget, (XButtonPressedEvent *) event);
}
XtManageChild (widget);
{
short width;
short height;
- XtVaGetValues (w, XmNwidth, &width, XmNheight, &height, 0);
- XtVaSetValues (w, XmNminWidth, width, XmNminHeight, height, 0);
+ XtVaGetValues (w, XmNwidth, &width, XmNheight, &height, NULL);
+ XtVaSetValues (w, XmNminWidth, width, XmNminHeight, height, NULL);
}
void