DXmActivateWidget(3X)DXmActivateWidget(3X)NAME
DXmActivateWidget - Allows the application to simulate push button activation.
SYNOPSIS
void DXmActivateWidget(
Widget widget );
PARAMETERS
A pointer to the widget data structure.
DESCRIPTION
The DXmActivateWidget routine allows an application to generate the same highlighting and callbacks that would occur if the user clicked on
a push button. Using this routine in your application enables you to maintain a consistent user interface. For example, your application
could allow a user to choose a function by either pressing a push button or, if the DXmActivateWidget routine has been called, by selecting
a menu option that activates the corresponding push button.
The DXmActivateWidget routine only supports push buttons.
DXmActivateWidget(3X)
Check Out this Related Man Page
DwtPushButtonGadgetCreate(3Dwt)DwtPushButtonGadgetCreate(3Dwt)Name
DwtPushButtonGadgetCreate - Creates a push button gadget.
Syntax
Widget DwtPushButtonGadgetCreate (parent_widget, name,
override_arglist,
override_argcount)
Widget parent_widget;
char *name;
ArgList override_arglist;
int override_argcount;
Arguments
parent_widget
Specifies the parent widget ID.
name Specifies the name of the created widget.
override_arglist
Specifies the application override argument list.
override_argcount
Specifies the number of attributes in the application override argument list (override_arglist).
Description
The DwtLabelGadgetCreate function creates an instance of the label gadget and returns its associated gadget ID. A label gadget is similar
in appearance and semantics to a label widget. Like all gadgets, the label gadget does not have a window but uses the window of the clos-
est antecedent widget. Thus, the antecedent widget provides all event dispatching for the gadget. This currently restricts gadgets to
being descendents of menu or dialog class (or subclass) widgets. Drawing information such as font and color are also those of the closest
antecedent widget.
Inherited Attributes----------------------------------------------------
Attribute Name Data Type Default
----------------------------------------------------
Rectangle Attributes
DwtNx Position Determined by
the geometry
manager
DwtNy Position Determined by
the geometry
manager
DwtNwidth Dimension The width of
the label plus
margins
DwtNheight Dimension The height of
the label plus
margins
DwtNborderWidth Dimension 1 pixel
DwtNsensitive Boolean True
DwtNancestorSensitive Boolean The bitwise AND
of the parent
widget's
DwtNsensitive
and DwtNances-
torSensitive
attributes
----------------------------------------------------
Widget-Specific Attributes---------------------------------------------------------
Attribute Name Data Type Default
---------------------------------------------------------
DwtNlabel DwtCompString NULL
DwtNactivateCallback DwtCallbackPtr NULL
DwtNacceleratorText DwtCompString NULL
DwtNbuttonAccelerator char * NULL
---------------------------------------------------------
DwtNlabel Specifies the push button label.
DwtNactivateCallback
Specifies the callback function or functions called when the push button is activated. The button is activated when the
user presses and releases MB1 while the pointer is inside the push button gadget. For this callback, the reason is DwtCRAc-
tivate.
DwtNacceleratorText
Specifies the compound-string text displayed for the accelerator.
DwtNbuttonAccelerator
Sets an accelerator on a push button widget. This is the same as the DwtNtranslations core attribute except that only the
left side of the table is to be passed as a character string, not compiled. The application is responsible for calling
XtInstallAllAccelerators to install the accelerator where the application needs it.
Return Values
This function returns the ID of the created widget.
Callback Information
The following structure is returned to your callback:
typedef struct {
int reason;
XEvent *event;
} DwtAnyCallbackStruct;
The reason member is set to a constant that represents the reason why this callback was invoked. For this callback, the reason member can
be set to:
DwtCRActivate The user activated the
push button.
DwtCRHelpRequested The user selected Help.
The event member is a pointer to the Xlib structure XEvent, which describes the event that generated this callback. This structure is a
union of the individual structures declared for each event type. For information on XEvent and event processing, see the Guide to the Xlib
Library: C Language Binding.
See Also
Guide to the XUI Toolkit: C Language Binding
Guide to the XUI Toolkit Intrinsics: C Language Binding
DwtPushButtonGadgetCreate(3Dwt)