modify it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version.
The Lucid Widget Library is distributed in the hope that it will be useful,
modify it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version.
The Lucid Widget Library is distributed in the hope that it will be useful,
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
resource.resource_name = "labelString";
resource.resource_class = "LabelString"; /* #### should be Xmsomething... */
resource.resource_type = XtRString;
resource.resource_name = "labelString";
resource.resource_class = "LabelString"; /* #### should be Xmsomething... */
resource.resource_type = XtRString;
XtSetArg (al [ac], XmNlabelString, built_string); ac++;
XtSetArg (al [ac], XmNlabelType, XmSTRING); ac++;
}
XtSetArg (al [ac], XmNlabelString, built_string); ac++;
XtSetArg (al [ac], XmNlabelType, XmSTRING); ac++;
}
XtRemoveAllCallbacks (widget, XmNcascadingCallback);
XtAddCallback (widget, XmNcascadingCallback, xm_pull_down_callback,
instance);
XtRemoveAllCallbacks (widget, XmNcascadingCallback);
XtAddCallback (widget, XmNcascadingCallback, xm_pull_down_callback,
instance);
menu = NULL;
XtSetArg (al [0], XmNsubMenuId, &menu);
XtGetValues (widget, al, 1);
menu = NULL;
XtSetArg (al [0], XmNsubMenuId, &menu);
XtGetValues (widget, al, 1);
XtSetArg (al [1], XmNuserData, val->call_data);
XtSetValues (widget, al, 2);
XtSetArg (al [1], XmNuserData, val->call_data);
XtSetValues (widget, al, 2);
/* Common to all label like widgets */
if (XtIsSubclass (widget, xmLabelWidgetClass))
xm_update_label (instance, widget, val);
/* Common to all label like widgets */
if (XtIsSubclass (widget, xmLabelWidgetClass))
xm_update_label (instance, widget, val);
class = XtClass (widget);
/* Class specific things */
if (class == xmPushButtonWidgetClass ||
class = XtClass (widget);
/* Class specific things */
if (class == xmPushButtonWidgetClass ||
XtSetArg (al [0], XmNradioBehavior, &radiobox);
XtGetValues (widget, al, 1);
XtSetArg (al [0], XmNradioBehavior, &radiobox);
XtGetValues (widget, al, 1);
if (radiobox)
xm_update_radiobox (instance, widget, val);
#ifdef LWLIB_MENUBARS_MOTIF
if (radiobox)
xm_update_radiobox (instance, widget, val);
#ifdef LWLIB_MENUBARS_MOTIF
/* This function is for activating a button from a program. It's wrong because
we pass a NULL argument in the call_data which is not Motif compatible.
This is used from the XmNdefaultAction callback of the List widgets to
/* This function is for activating a button from a program. It's wrong because
we pass a NULL argument in the call_data which is not Motif compatible.
This is used from the XmNdefaultAction callback of the List widgets to
/* This is a kludge to disable drag-and-drop in dialog boxes. The symptom
was a segv down in libXm somewhere if you used the middle button on a
dialog box to begin a drag; when you released the button to make a drop
/* This is a kludge to disable drag-and-drop in dialog boxes. The symptom
was a segv down in libXm somewhere if you used the middle button on a
dialog box to begin a drag; when you released the button to make a drop
drag (canceling the operation). This was probably due to the fact that
the dialog boxes were not set up to handle a drag but were trying to do
so anyway for some reason.
drag (canceling the operation). This was probably due to the fact that
the dialog boxes were not set up to handle a drag but were trying to do
so anyway for some reason.
#ifdef DND_KLUDGE
XtTranslations dnd_override = XtParseTranslationTable (disable_dnd_trans);
# define DO_DND_KLUDGE(widget) XtOverrideTranslations ((widget), dnd_override)
#ifdef DND_KLUDGE
XtTranslations dnd_override = XtParseTranslationTable (disable_dnd_trans);
# define DO_DND_KLUDGE(widget) XtOverrideTranslations ((widget), dnd_override)
XtSetArg(al[ac], XmNrightAttachment, XmATTACH_FORM); ac++;
XtSetArg(al[ac], XmNrightOffset, 13); ac++;
row = XmCreateRowColumn (form, "row", al, ac);
XtSetArg(al[ac], XmNrightAttachment, XmATTACH_FORM); ac++;
XtSetArg(al[ac], XmNrightOffset, 13); ac++;
row = XmCreateRowColumn (form, "row", al, ac);
ac = 0;
XtSetArg(al[ac], XmNtopAttachment, XmATTACH_NONE); ac++;
XtSetArg(al[ac], XmNbottomAttachment, XmATTACH_WIDGET); ac++;
ac = 0;
XtSetArg(al[ac], XmNtopAttachment, XmATTACH_NONE); ac++;
XtSetArg(al[ac], XmNbottomAttachment, XmATTACH_WIDGET); ac++;
list activate the default button */
XtAddCallback (value, XmNdefaultActionCallback, activate_button, button);
}
list activate the default button */
XtAddCallback (value, XmNdefaultActionCallback, activate_button, button);
}
ac = 0;
XtSetArg(al[ac], XmNalignment, XmALIGNMENT_BEGINNING); ac++;
XtSetArg(al[ac], XmNtopAttachment, XmATTACH_FORM); ac++;
ac = 0;
XtSetArg(al[ac], XmNalignment, XmALIGNMENT_BEGINNING); ac++;
XtSetArg(al[ac], XmNtopAttachment, XmATTACH_FORM); ac++;
XtSetArg(al[ac], XmNrightOffset, 13); ac++;
message = XmCreateLabel (form, "message", al, ac);
DO_DND_KLUDGE (message);
XtSetArg(al[ac], XmNrightOffset, 13); ac++;
message = XmCreateLabel (form, "message", al, ac);
DO_DND_KLUDGE (message);
children [i] = icon; i++;
children [i] = icon_separator; i++;
XtManageChildren (children, i);
children [i] = icon; i++;
children [i] = icon_separator; i++;
XtManageChildren (children, i);
if (text_input_slot || list)
{
XtInstallAccelerators (value, button);
if (text_input_slot || list)
{
XtInstallAccelerators (value, button);
XtInstallAccelerators (form, button);
XmProcessTraversal(value, XmTRAVERSE_CURRENT);
}
XtInstallAccelerators (form, button);
XmProcessTraversal(value, XmTRAVERSE_CURRENT);
}
x = (Position) ((parent_width - child_width) / 2);
y = (Position) ((parent_height - child_height) / 2);
x = (Position) ((parent_width - child_width) / 2);
y = (Position) ((parent_height - child_height) / 2);
XtTranslateCoords (parent, x, y, &x, &y);
if ((Dimension) (x + child_width) > screen_width)
XtTranslateCoords (parent, x, y, &x, &y);
if ((Dimension) (x + child_width) > screen_width)
widget = make_dialog (name, parent, pop_up_p,
shell_name, icon_name, text_input_slot, radio_box,
list, left_buttons, right_buttons);
widget = make_dialog (name, parent, pop_up_p,
shell_name, icon_name, text_input_slot, radio_box,
list, left_buttons, right_buttons);
{ {xm_scrollbar_callback, NULL}, {NULL, NULL} };
callbacks[0].closure = (XtPointer) instance;
{ {xm_scrollbar_callback, NULL}, {NULL, NULL} };
callbacks[0].closure = (XtPointer) instance;
XtSetArg (al[ac], XmNminimum, 1); ac++;
XtSetArg (al[ac], XmNmaximum, INT_MAX); ac++;
XtSetArg (al[ac], XmNincrement, 1); ac++;
XtSetArg (al[ac], XmNminimum, 1); ac++;
XtSetArg (al[ac], XmNmaximum, INT_MAX); ac++;
XtSetArg (al[ac], XmNincrement, 1); ac++;
if (!val->call_data)
button = XmCreateLabel (instance->parent, val->name, al, ac);
if (!val->call_data)
button = XmCreateLabel (instance->parent, val->name, al, ac);
else if (val->type == TOGGLE_TYPE || val->type == RADIO_TYPE)
{
XtSetArg (al [ac], XmNset, val->selected); ac++;
else if (val->type == TOGGLE_TYPE || val->type == RADIO_TYPE)
{
XtSetArg (al [ac], XmNset, val->selected); ac++;
{
#ifdef LWLIB_MENUBARS_MOTIF
{"menubar", make_menubar},
{
#ifdef LWLIB_MENUBARS_MOTIF
{"menubar", make_menubar},
enum do_call_type { pre_activate, selection, no_selection, post_activate };
enum do_call_type { pre_activate, selection, no_selection, post_activate };
lw_internal_update_other_instances to dereference freed memory
if the widget was ``destroyed'' by caching it in the all_destroyed_instances
list */
lw_internal_update_other_instances to dereference freed memory
if the widget was ``destroyed'' by caching it in the all_destroyed_instances
list */
XtSetArg (al [0], XmNset, !check);
XtSetValues (widget, al, 1);
}
XtSetArg (al [0], XmNset, !check);
XtSetValues (widget, al, 1);
}
lw_internal_update_other_instances (widget, closure, call_data);
do_call (widget, closure, selection);
}
lw_internal_update_other_instances (widget, closure, call_data);
do_call (widget, closure, selection);
}