DtMenuButton(library call)

NAME
DtMenuButton — the MenuButton widget class

SYNOPSIS

#include &<Dt/MenuButton.h>

DESCRIPTION

The DtMenuButton widget is a command widget that complements the menu cascading functionality of an XmCascadeButton widget. As a complement to the XmCascadeButton widget, DtMenuButton can only be instantiated outside a MenuPane; the application must use XmCascadeButton widget inside a MenuPane.

The DtMenuButton widget belongs to a subclass of the XmLabel class. Visually, the DtMenuButton widget consists of a label string and a menu glyph. The menu glyph always appears on the right end of the widget and, by default, is a downward pointing arrow.

The DtMenuButton widget has an implicitly created submenu attached to it. The submenu Caretis a popup MenuPane and has this DtMenuButton widget as its parent. The name of the implicitly created submenu is obtained by adding submenu_ as a prefix to the name of this DtMenuButton widget. The widget ID of the submenu can be obtained by doing an XtGetValues on the DtNsubMenuId resource of this DtMenuButton widget. The implicitly created submenu must not be destroyed by the user of this widget.

The submenu can be popped up by pressing the menu post Button (see the XmNmenuPost resource of the XmRowColumn(3) widget) anywhere on the DtMenuButton widget.

Widget subclassing is not supported for the DtMenuButton widget class.

  Classes

The DtMenuButton widget inherits behavior and resources from the Core, Composite, XmPrimitive and XmLabel classes.

The class pointer is dtMenuButtonWidgetClass.

The class name is DtMenuButtonWidget.

  New Resources

The following table defines a set of widget resources used by the application to specify data. The application can also set the resource values for the inherited classes to set attributes for this widget. To reference a resource by name or by class in a .Xdefaults file, the application must remove the DtN or DtC prefix and use the remaining letters. To specify one of the defined values for a resource in a .Xdefaults file, the application must remove the Dt prefix and use the remaining letters (in either lower case or upper case, but including any underscores between words). The codes in the access column indicate if the given resource can be set at creation time (C), set by using XtSetValues (S), retrieved by using XtGetValues (G), or is not applicable (N/A).
DtMenuButton Resource
Set
NameClassTypeDefaultAccess
DtNcascadingCallbackDtCCallbackXtCallbackListNULLC
DtNcascadePixmapDtCPixmapPixmapXmUNSPECIFIED_PIXMAPCSG
DtNsubMenuIdDtCMenuWidgetWidgetNULLSG
tgroup dispwid="7.78in"

DtNcascadingCallback
    Specifies the list of callbacks that is called before the popping up of the attached submenu. The reason for the callback is DtCR_CASCADING.

DtNcascadePixmap
    Specifies the pixmap displayed as the menu glyph. If no pixmap is specified, a downward pointing arrow is displayed.

DtNsubMenuId
    Specifies the widget ID of the popup MenuPane to be associated with this DtMenuButton widget. The popup MenuPane must be created with this DtMenuButton as its parent. This resource cannot be specified at the time of widget creation. The implicit submenu is automatically destroyed by DtMenuButton when this resource is set.

  Inherited Resources

The DtMenuButton widget inherits behavior and resources from the following named superclasses. For a complete description of each resource, see the man page for that superclass.
XmLabel Resource
Set
NameClassTypeDefaultAccess
XmNacceleratorXmCAcceleratorStringNULLCSG
XmNacceleratorTextXmCAcceleratorTextXmStringNULLCSG
XmNalignmentXmCAlignmentunsigned chardynamicCSG
XmNfontListXmCFontListXmFontListdynamicCSG
XmNlabelInsensitivePixmapXmCLabelInsensitivePixmapPixmapXmUNSPECIFIED_PIXMAPCSG
XmNlabelPixmapXmCLabelPixmapPixmapXmUNSPECIFIED_PIXMAPCSG
XmNlabelStringXmCXmStringXmStringdynamicCSG
XmNlabelTypeXmCLabelTypeunsigned charXmSTRINGCSG
XmNmarginBottomXmCMarginBottomDimension0CSG
XmNmarginHeightXmCMarginHeightDimension2CSG
XmNmarginLeftXmCMarginLeftDimension0CSG
XmNmarginRightXmCMarginRightDimension0CSG
XmNmarginTopXmCMarginTopDimension0CSG
XmNmarginWidthXmCMarginWidthDimension2CSG
XmNmnemonicXmCMnemonicKeySymNULLCSG
XmNmnemonicCharSetXmCMnemonicCharSetStringXmFONTLIST-_DEFAULT_TAGCSG
XmNrecomputeSizeXmCRecomputeSizeBooleanTrueCSG
XmNstringDirectionXmCStringDirectionXmStringDirectiondynamicCSG
tgroup dispwid="7.84in"
XmPrimitive Resource
Set
NameClassTypeDefaultAccess
XmNbottomShadowColorXmCBottomShadowColorPixeldynamicCSG
XmNbottomShadowPixmapXmCBottomShadowPixmapPixmapXmUNSPECIFIED_PIXMAPCSG
XmNforegroundXmCForegroundPixeldynamicCSG
XmNhelpCallbackXmCCallbackXtCallbackListNULLC
XmNhighlightColorXmCHighlightColorPixeldynamicCSG
XmNhighlightOnEnterXmCHighlightOnEnterBooleanFalseCSG
XmNhighlightPixmapXmCHighlightPixmapPixmapdynamicCSG
XmNhighlightThicknessXmCHighlightThicknessDimension0CSG
XmNnavigationTypeXmCNavigationTypeXmNavigationTypeXmNONECSG
XmNshadowThicknessXmCShadowThicknessDimension0CSG
XmNtopShadowColorXmCTopShadowColorPixeldynamicCSG
XmNtopShadowPixmapXmCTopShadowPixmapPixmapdynamicCSG
XmNtraversalOnXmCTraversalOnBooleanFalseCSG
XmNunitTypeXmCUnitTypeunsigned chardynamicCSG
XmNuserDataXmCUserDataXtPointerNULLCSG
tgroup dispwid="7.93in"
Core Resource Set
NameClassTypeDefaultAccess
XmNacceleratorsXmCAcceleratorsXtAcceleratorsdynamicCSG
XmNancestorSensitiveXmCSensitiveBooleandynamicG
XmNbackgroundXmCBackgroundPixeldynamicCSG
XmNbackgroundPixmapXmCPixmapPixmapXmUNSPECIFIED_PIXMAPCSG
XmNborderColorXmCBorderColorPixelXtDefaultForegroundCSG
XmNborderPixmapXmCPixmapPixmapXmUNSPECIFIED_PIXMAPCSG
XmNborderWidthXmCBorderWidthDimension0CSG
XmNcolormapXmCColormapColormapdynamicCG
XmNdepthXmCDepthintdynamicCG
XmNdestroyCallbackXmCCallbackXtCallbackListNULLC
XmNheightXmCHeightDimensiondynamicCSG
XmNinitialResourcesPersistentXmCInitialResourcesPersistentBooleanTrueC
XmNmappedWhenManagedXmCMappedWhenManagedBooleanTrueCSG
XmNscreenXmCScreenScreen *dynamicCG
XmNsensitiveXmCSensitiveBooleanTrueCSG
XmNtranslationsXmCTranslationsXtTranslationsdynamicCSG
XmNwidthXmCWidthDimensiondynamicCSG
XmNxXmCPositionPosition0CSG
XmNyXmCPositionPosition0CSG
tgroup dispwid="7.85in"

  Callback Information

A pointer to the following structure is passed to each DtMenuButton callback:

typedef struct {
        int     reason;
        XEvent  *event;
} XmAnyCallbackStruct;

The reason argument indicates why the callback was invoked; it is always DtCR_CASCADING when the DtNcascadingCallback is issued.

The event argument points to the XEvent that triggered the callback or NULL if the callback was not triggered by an XEvent.

SEE ALSO

DtCreateMenuButton(3), Core(3), XmLabel(3), XmPrimitive(3), XmRowColumn(3), XtGetValues(3), XtSetValues(3).