Index Index for
Section 3
Index Alphabetical
listing for D
Bottom of page Bottom of
page

DtComboBox(3)

CDE

NAME

DtComboBox - the ComboBox widget class

SYNOPSIS

#include <Dt/ComboBox.h>

DESCRIPTION

The DtComboBox widget is a combination of a TextField and a List widget that provides a list of valid choices for the TextField. Selecting an item from this list automatically fills in the TextField with that list item. Widget subclassing is not supported for the DtComboBox widget class. The resources for the XmList and XmTextField widgets that are created by the DtComboBox are accessible by using the XtNameToWidget(3Xt) function. The names of these widgets are *List and Text, respectively. (The *List notation is required because the List widget is not an immediate descendant of the DtComboBox. See XtNameToWidget(3Xt)) in the X/Open CAE Specification, X/Open Window Management: X Toolkit Intrinsics). Classes The DtComboBox widget inherits behavior and resources from the Core, Composite and XmManager classes. The class pointer is dtComboBoxWidgetClass. The class name is DtComboBoxWidget. 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). _______________________________________________________________________________________ Name Class Type Default Access _______________________________________________________________________________________ Dimension 2 CSG DtNmarginHeight DtCMarginHeight Dimension 2 CSG DtNmarginWidth DtCMarginWidth XmString dynamic CSG DtNselectedItem DtCSelectedItem int dynamic CSG DtNselectedPosition DtCSelectedPosition DtCCallback NULL C DtNselectionCallback XtCallbackList unsigned int C DtNcomboBoxType DtCComboBoxType DtDROP_DOWN_LIST _______________________________________________________________________________________ DtNmarginHeight Specifies the number of pixels added between the top and bottom of the text widget and the start of the shadow. DtNmarginWidth Specifies the number of pixels added between the right and left sides of the text widget and the start of the shadow. DtNselectedItem This resource is passed through to the XmList to set the XmNselectedItemCount and XmNselectedItems as the single item in the XmNitems that matches this specified XmString in the List. Setting both DtNselectedItem and DtNselectedPosition in the same argument list produces undefined behavior. DtNselectedPosition This resource is passed through to the XmList to set the XmNselectedItemCount and XmNselectedItems as the single item at this specified position in the List. Setting both DtNselectedItem and DtNselectedPosition in the same argument list produces undefined behavior. DtNselectionCallback This callback list is issued when an item is selected from the DtComboBox widget's List. The call_data structure contains a DtComboBoxCallbackStruct with the reason DtCR_SELECT. DtNcomboBoxType This resource determines the style of the DtComboBox. There are two choices: DtDROP_DOWN_COMBO_BOX Provides an editable text area. DtDROP_DOWN_LIST Provides a static text area. Inherited Resources The DtComboBox widget inherits behavior and resources from the following named superclasses. For a complete description of each resource, see the man page for that superclass. _____________________________________________________________________________________ Name Class Type Default Access _____________________________________________________________________________________ XmNbottom- XmCBottom- Pixel dynamic CSG ShadowColor ShadowColor XmNbottom- XmCBottom- Pixmap CSG XmUNSPECIFIED- _PIXMAP ShadowPixmap ShadowPixmap XmNforeground XmCForeground Pixel dynamic CSG XmCCallback NULL C XmNhelpCallback XtCallbackList Pixel dynamic CSG XmNhighlightColor XmCHighlightColor Pixmap dynamic CSG XmNhighlightPixmap XmCHighlightPixmap Widget NULL CSG XmNinitialFocus XmCInitialFocus dynamic CSG XmNnavigationType XmCNavigationType XmNavigationType Dimension dynamic CSG XmNshadowThickness XmCShadowThickness dynamic CG XmNstringDirection XmCStringDirection XmStringDirection Pixel dynamic CSG XmNtopShadowColor XmCTopShadowColor Pixmap dynamic CSG XmNtopShadowPixmap XmCTopShadowPixmap Boolean dynamic CSG XmNtraversalOn XmCTraversalOn XmNunitType XmCUnitType unsigned char dynamic CSG XmNuserData XmCUserData XtPointer NULL CSG _____________________________________________________________________________________ ____________________________________________________________________________ Name Class Type Default Access ____________________________________________________________________________ XmNchildren XmCReadOnly WidgetList NULL G XtOrderProc CSG XmNinsertPosition XmCInsertPosition default procedure XmCReadOnly Cardinal 0 G XmNnumChildren ____________________________________________________________________________ _______________________________________________________________________________________________ Name Class Type Default Access _______________________________________________________________________________________________ dynamic CSG XmNaccelerators XmCAccelerators XtAccelerators XmCSensitive Boolean dynamic G XmNancestorSensitive XmNbackground XmCBackground Pixel dynamic CSG XmCPixmap Pixmap CSG XmNbackgroundPixmap XmUNSPECIFIED- _PIXMAP Pixel CSG XmNborderColor XmCBorderColor XtDefaultForeground XmCPixmap Pixmap CSG XmNborderPixmap XmUNSPECIFIED- _PIXMAP Dimension 0 CSG XmNborderWidth XmCBorderWidth XmNcolormap XmCColormap Colormap dynamic CG XmNdepth XmCDepth int dynamic CG XmCCallback NULL C XmNdestroyCallback XtCallbackList XmNheight XmCHeight Dimension dynamic CSG XmNinitial- XmCInitial- Boolean True C ResourcesPersistent ResourcesPersistent Boolean True CSG XmNmappedWhen- XmCMappedWhen- Managed Managed XmNscreen XmCScreen Screen * dynamic CG XmNsensitive XmCSensitive Boolean True CSG dynamic CSG XmNtranslations XmCTranslations XtTranslations XmNwidth XmCWidth Dimension dynamic CSG XmNx XmCPosition Position 0 CSG XmNy XmCPosition Position 0 CSG _______________________________________________________________________________________________ Callback Information A pointer to the following structure is passed to each DtComboBox callback: typedef struct { int reason; XEvent *event; XmString item_or_text; int item_position; } DtComboBoxCallbackStruct; The reason argument indicates why the callback was invoked; it is always DtCR_SELECT. The event argument points to the XEvent that triggered the callback, or NULL if the callback was not triggered by an XEvent. The item_or_text argument is the contents of the Text widget at the time the event caused the callback to be invoked. This data is only valid within the scope of the call_data structure, so the application must copy it when it is used outside of this scope. The item_position argument is the new value of the DtNselectedPosition resource in the DtComboBox's List. If this is zero, it means the user entered a value in the XmTextField widget.

SEE ALSO

DtComboBoxAddItem(3), DtComboBoxDeletePos(3), DtComboBoxSelectItem(3), DtComboBoxSetItem(3), DtCreateComboBox(3), Composite(3X), Constraint(3X), Core(3X), XmList(3X), XmManager(3X), XmText(3X), XmTextField(3X), XtGetValues(3Xt), XtSetValues(3Xt)

Index Index for
Section 3
Index Alphabetical
listing for D
Top of page Top of
page