Museum

Home

Lab Overview

Retrotechnology Articles

⇒ Online Manual

Media Vault

Software Library

Restoration Projects

Artifacts Sought

DwtPullEntryGadgetCreate(3Dwt)

Name

DwtPullEntryGadgetCreate − Creates a pull-down menu entry gadget. 

Syntax

Widget DwtPullEntryGadgetCreate (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.

nameSpecifies 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 DwtPullEntryGadgetCreate function creates an instance of the pull-down menu entry gadget and returns its associated gadget ID. 

A pull-down menu entry gadget is similar in appearance and semantics to a pull-down menu entry widget.  Like all gadgets, it does not have a window but uses the window of the closest antecedent widget.  This gadget must be a child of a menu class widget. 

Because a pull-down menu entry gadget is not a subclass of composite, children are not supported. 

The sizing of the gadget is affected by the font and the label. 

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 label width, plus the hotspot width, plus 2 times DwtNmarginWidth
DwtNheight Dimension The text label or pixmap label height plus 2 times DwtNmarginHeight
DwtNborderWidth Dimension Zero pixels
DwtNsensitive Boolean True
DwtNancestorSensitive Boolean The bitwise AND of the parent widget’s DwtNsensitive and DwtNancestorSensitive attributes
Label Gadget Attributes

DwtNlabel DwtCompString Widget name
DwtNalignment unsigned char DwtAlignmentCenter
DwtNdirectionRToL Boolean False
DwtNhelpCallback DwtCallbackPtr NULL

Widget-Specific Attributes

Attribute Name Data Type Default
DwtNsubMenuId Widget NULL
DwtNactivateCallback DwtCallbackPtr NULL
DwtNpullingCallback DwtCallbackPtr NULL

DwtNsubMenuIdSpecifies the widget ID of the submenu that will be displayed when the pull-down menu is activated. 

DwtNactivateCallback
Specifies the callback that is executed when the user releases a button inside the pull-down menu widget. For this callback, the reason is DwtCRActivate. 

DwtNpullingCallback
Specifies the callback function or functions called just prior to pulling down the submenu. This callback occurs just before the submenu’s map callback. You can use this callback to defer the creation of the submenu. For this callback, the reason is DwtCRActivate. 

Return Value

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 selected the pull-down menu entry. 
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

DwtPullDownMenuEntry (3Dwt)
Guide to the XUI Toolkit: C Language Binding
Guide to the XUI Toolkit Intrinsics: C Language Binding

Subroutines

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026