DTCOMBOBOX(3)
π«Ά NAME π«Ά
DtComboBox β the ComboBox widget class. Hi bestie! Youβre in the library call manual, and the header energy is literally DtComboBox(library call) π
β¨.
πΈ SYNOPSIS πΈ
#include &<Dt/ComboBox.h>
β¨ DESCRIPTION β¨
Note: This function has been superseded by the equivalent Motif function XmComboBox. Please refer to the Motif Programmerβs Reference for more information.
The DtComboBox widget is a combination of a TextField and a List widget that gives the TextField a list of valid choices. Selecting an item from this list automatically fills in the TextField with that list item. Itβs giving βautocomplete but make it Motifβ π.
Widget subclassing is not supported for the DtComboBox widget class. No cap, thatβs just the rule π.
The resources for the XmList and XmTextField widgets that are created by the DtComboBox are accessible by using the XtNameToWidget(3) 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(3).) π
π§Έ 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). π«Ά
DtComboBox Resource Set
DtNmarginHeightβ classDtCMarginHeight, typeDimension, default2, accessCSG. Specifies the number of pixels added between the top and bottom of the text widget and the start of the shadow.DtNmarginWidthβ classDtCMarginWidth, typeDimension, default2, accessCSG. Specifies the number of pixels added between the right and left sides of the text widget and the start of the shadow.DtNselectedItemβ classDtCSelectedItem, typeXmString, defaultdynamic, accessCSG. This resource is passed through to theXmListto set theXmNselectedItemCountandXmNselectedItemsas the single item in theXmNitemsthat matches this specifiedXmStringin theList. Setting bothDtNselectedItemandDtNselectedPositionin the same argument list produces undefined behavior. β οΈDtNselectedPositionβ classDtCSelectedPosition, typeint, defaultdynamic, accessCSG. This resource is passed through to theXmListto set theXmNselectedItemCountandXmNselectedItemsas the single item at this specified position in theList. Setting bothDtNselectedItemandDtNselectedPositionin the same argument list produces undefined behavior. β οΈDtNselectionCallbackβ classDtCCallback, typeXtCallbackList, defaultNULL, accessC. This callback list is issued when an item is selected from theDtComboBoxwidgetβsList. Thecall_datastructure contains aDtComboBoxCallbackStructwith the reasonDtCR_SELECT.DtNcomboBoxTypeβ classDtCComboBoxType, typeunsigned int, defaultDtDROP_DOWN_LIST, accessC. This resource determines the style of theDtComboBox. There are two choices:DtDROP_DOWN_COMBO_BOXβ Provides an editable text area.DtDROP_DOWN_LISTβ Provides a static text area.
Table-artifact corner π: yes, the original also has tgroup dispwid="7.46in" in this chunk. Keeping the formatting gremlins accounted for.
π§ 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.
XmManager Resource Set
XmNbottomShadowColorβ classXmCBottomShadowColor, typePixel, defaultdynamic, accessCSG.XmNbottomShadowPixmapβ classXmCBottomShadowPixmap, typePixmap, defaultXmUNSPECIFIED_PIXMAP, accessCSG.XmNforegroundβ classXmCForeground, typePixel, defaultdynamic, accessCSG.XmNhelpCallbackβ classXmCCallback, typeXtCallbackList, defaultNULL, accessC.XmNhighlightColorβ classXmCHighlightColor, typePixel, defaultdynamic, accessCSG.XmNhighlightPixmapβ classXmCHighlightPixmap, typePixmap, defaultdynamic, accessCSG.XmNinitialFocusβ classXmCInitialFocus, typeWidget, defaultNULL, accessCSG.XmNnavigationTypeβ classXmCNavigationType, typeXmNavigationType, defaultdynamic, accessCSG.XmNshadowThicknessβ classXmCShadowThickness, typeDimension, defaultdynamic, accessCSG.XmNstringDirectionβ classXmCStringDirection, typeXmStringDirection, defaultdynamic, accessCG.XmNtopShadowColorβ classXmCTopShadowColor, typePixel, defaultdynamic, accessCSG.XmNtopShadowPixmapβ classXmCTopShadowPixmap, typePixmap, defaultdynamic, accessCSG.XmNtraversalOnβ classXmCTraversalOn, typeBoolean, defaultdynamic, accessCSG.XmNunitTypeβ classXmCUnitType, typeunsigned char, defaultdynamic, accessCSG.XmNuserDataβ classXmCUserData, typeXtPointer, defaultNULL, accessCSG.
More artifact realness: tgroup dispwid="7.73in" lives here too π« .
Composite Resource Set
XmNchildrenβ classXmCReadOnly, typeWidgetList, defaultNULL, accessG.XmNinsertPositionβ classXmCInsertPosition, typeXtOrderProc, defaultdefault procedure, accessCSG.XmNnumChildrenβ classXmCReadOnly, typeCardinal, default0, accessG.
Artifact check π: tgroup dispwid="7.46in".
Core Resource Set
XmNacceleratorsβ classXmCAccelerators, typeXtAccelerators, defaultdynamic, accessCSG.XmNancestorSensitiveβ classXmCSensitive, typeBoolean, defaultdynamic, accessG.XmNbackgroundβ classXmCBackground, typePixel, defaultdynamic, accessCSG.XmNbackgroundPixmapβ classXmCPixmap, typePixmap, defaultXmUNSPECIFIED_PIXMAP, accessCSG.XmNborderColorβ classXmCBorderColor, typePixel, defaultXtDefaultForeground, accessCSG.XmNborderPixmapβ classXmCPixmap, typePixmap, defaultXmUNSPECIFIED_PIXMAP, accessCSG.XmNborderWidthβ classXmCBorderWidth, typeDimension, default0, accessCSG.XmNcolormapβ classXmCColormap, typeColormap, defaultdynamic, accessCG.XmNdepthβ classXmCDepth, typeint, defaultdynamic, accessCG.XmNdestroyCallbackβ classXmCCallback, typeXtCallbackList, defaultNULL, accessC.XmNheightβ classXmCHeight, typeDimension, defaultdynamic, accessCSG.XmNinitialResourcesPersistentβ classXmCInitialResourcesPersistent, typeBoolean, defaultTrue, accessC.XmNmappedWhenManagedβ classXmCMappedWhenManaged, typeBoolean, defaultTrue, accessCSG.XmNscreenβ classXmCScreen, typeScreen *, defaultdynamic, accessCG. (The original row starts with the tiny artifactrow rht="0.39in"beforeXmNscreen, for the completionists π.)XmNsensitiveβ classXmCSensitive, typeBoolean, defaultTrue, accessCSG.XmNtranslationsβ classXmCTranslations, typeXtTranslations, defaultdynamic, accessCSG.XmNwidthβ classXmCWidth, typeDimension, defaultdynamic, accessCSG.XmNxβ classXmCPosition, typePosition, default0, accessCSG.XmNyβ classXmCPosition, typePosition, default0, accessCSG.
Final artifact from the Core chunk:tgroup dispwid="7.85in"Caretwith a strayCaretat the end. Not me preserving the gremlins, but I am π .
π¦ 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. Copy it, bestie β do not rawdog that pointer π.
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(3), Constraint(3), Core(3), XmList(3), XmManager(3), XmText(3), XmTextField(3), XtGetValues(3), XtSetValues(3).
Ok bye bestie π«Ά This page signs off as DtComboBox(library call) β no separate source/version/date line is listed on this one, so thatβs the whole cute footer situation. Stay slay, donβt set both selected resources in one argument list, and may your text fields stay fillable πβ¨π.
π¦ where this page comes from
- nixos 26.05: cde 2.5.3
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms