*nix Documentation Project
·  Home
 +   man pages
·  Linux HOWTOs
·  FreeBSD Tips
·  *niX Forums

  man pages->HP-UX 11i man pages -> XmList (3)              
Title
Content
Arch
Section
 

e(3)

Contents


 XmList(library call)                                   XmList(library call)




 NAME    [Toc]    [Back]
      XmList - The List widget class

 SYNOPSIS    [Toc]    [Back]
      #include <Xm/List.h>

 DESCRIPTION    [Toc]    [Back]
      List allows a user to select one or more items from a group of
      choices. Items are selected from the list in a variety of ways, using
      both the pointer and the keyboard.  List operates on an array of
      compound strings that are defined by the application.  Each compound
      string becomes an item in the List, with the first compound string
      becoming the item in position 1, the second becoming the item in
      position 2, and so on.

      Specifying the number of items that are visible sets the size of the
      List.  If the number of visible items is not specified, the height of
      the list controls the number of visible items. Each item assumes the
      height of the tallest element in the list.  To create a list that
      allows the user to scroll easily through a large number of items, use
      the XmCreateScrolledList convenience function.

      To select items, move the pointer or cursor to the desired item and
      press the <Btn1> mouse button or the key defined as <osfSelect>. There
      are several styles of selection behavior, and they all highlight the
      selected item or items by displaying them in inverse colors. An
      appropriate callback is invoked to notify the application of the
      user's choice. The application then takes whatever action is required
      for the specified selection.  When a List is insensitive, all of the
      list items are displayed in a stippled fill pattern.

      List uses the XmQTspecifyRenderTable, XmQTscrollFrame, and
      XmQTnavigator traits, and holds the XmQTtransfer trait.

    Selection    [Toc]    [Back]
      Each list has one of four selection models:

         +  Single Select

         +  Browse Select

         +  Multiple Select

         +  Extended Select

      In Single Select and Browse Select, at most one item is selected at a
      time.  In Single Select, pressing <Btn1> on an item toggles its
      selection state and deselects any other selected item.  In Browse
      Select, pressing <Btn1> on an item selects it and deselects any other
      selected item; dragging <Btn1> moves the selection as the pointer is
      moved. Releasing <Btn1> on an item moves the location cursor to that



                                    - 1 -       Formatted:  January 24, 2005






 XmList(library call)                                   XmList(library call)




      item.

      In Multiple Select, any number of items can be selected at a time.
      Pressing <Btn1> on an item toggles its selection state but does not
      deselect any other selected items.

      In Extended Select, any number of items can be selected at a time, and
      the user can easily select ranges of items.  Pressing <Btn1> on an
      item selects it and deselects any other selected item.  Dragging
      <Btn1> or pressing or dragging <Shift><Btn1> following a <Btn1> action
      selects all items between the item under the pointer and the item on
      which <Btn1> was pressed.  This action also deselects any other
      selected items outside that range.

      Extended Select also allows the user to select and deselect
      discontiguous ranges of items.  Pressing <Ctrl><Btn1> on an item
      toggles its selection state but does not deselect any other selected
      items.  Dragging <Ctrl><Btn1> or pressing or dragging <Shift><Btn1>
      following a <Ctrl><Btn1> action sets the selection state of all items
      between the item under the pointer and the item on which <Ctrl><Btn1>
      was pressed to the state of the item on which <Ctrl><Btn1> was
      pressed.  This action does not deselect any other selected items
      outside that range.

      All selection operations available from the mouse are also available
      from the keyboard.  List has two keyboard selection modes, Normal Mode
      and Add Mode.  In Normal Mode, navigation operations and <osfSelect>
      select the item at the location cursor and deselect any other selected
      items.  In Add Mode, navigation operations have no effect on
      selection, and <osfSelect> toggles the selection state of the item at
      the location cursor without deselecting any other selected items,
      except in Single Select.

      Single and Multiple Select use Add Mode, and Browse Select uses Normal
      Mode.

      Extended Select can use either mode; the user changes modes by
      pressing <osfAddMode>.  In Extended Select Normal Mode, pressing
      <osfSelect> has the same effect as pressing <Btn1>; <osfExtend> and
      shifted navigation have the same effect as pressing <Shift><Btn1>
      following a <Btn1> action.  In Extended Select Add Mode, pressing
      <osfSelect> has the same effect as pressing <Ctrl><Btn1>; <osfExtend>
      and shifted navigation have the same effect as pressing <Shift><Btn1>
      following a <Ctrl><Btn1> action.

      Normal Mode is indicated by a solid location cursor, and Add Mode is
      indicated by a dashed location cursor.

    Data Transfer Behavior    [Toc]    [Back]
      List supports dragging of items from the List and transfer of items to
      the clipboard.  When the user presses BTransfer on a selected item,



                                    - 2 -       Formatted:  January 24, 2005






 XmList(library call)                                   XmList(library call)




      the widget transfers all selected items.  When the user presses
      BTransfer on an unselected item, the widget transfers only that item.
      Depending on the value of XmNprimaryOwnership, List can also support
      primary selection.

      When the XmNconvertCallback procedures are called, the location_data
      member of the XmConvertCallbackStruct member is NULL if the selected
      items are being transferred.  If the selected items are not being
      transferred, this member has the following value: If a single item is
      being transferred, the value is an integer representing the position
      of the item in the List.  A value of 1 transfers the first item in the
      List; a value of 2 transfers the second item; and so on.  If the
      entire contents of the List are being transferred, the value is -1.

      As a source of data, List supports the following targets and
      associated conversions of data to these targets:

      locale    If the locale target matches the widget's locale, the widget
                transfers the selected list items in the encoding of the
                locale.  Each item transferred except the last includes a
                trailing separator.

      COMPOUND_TEXT    [Toc]    [Back]
                The widget transfers the selected list items as type
                COMPOUND_TEXT.  Each item transferred except the last
                includes a trailing separator.

      STRING    The widget transfers the selected list items as type STRING.
                Each item transferred except the last includes a trailing
                separator.

      TEXT      If the selected list items are fully convertible to the
                encoding of the locale, the widget transfers the selected
                list items in the encoding of the locale.  Otherwise, the
                widget transfers the selected list items as type
                COMPOUND_TEXT.  Each item transferred except the last
                includes a trailing separator.

      _MOTIF_CLIPBOARD_TARGETS
                The widget transfers, as type ATOM, a list of the targets it
                supports for immediate transfer for the CLIPBOARD selection.
                These include _MOTIF_COMPOUND_STRING.  If the selected list
                items are fully convertible to STRING, these also include
                STRING; otherwise, they also include COMPOUND_TEXT.

      _MOTIF_COMPOUND_STRING
                The widget transfers the selected list items as a compound
                string in Byte Stream format.  Each item transferred except
                the last includes a trailing separator.





                                    - 3 -       Formatted:  January 24, 2005






 XmList(library call)                                   XmList(library call)




      _MOTIF_DEFERRED_CLIPBOARD_TARGETS
                The widget transfers, as type ATOM, a list of the targets it
                supports for delayed transfer for the CLIPBOARD selection.
                This widget currently supplies no targets for
                _MOTIF_DEFERRED_CLIPBOARD_TARGETS.

      _MOTIF_EXPORT_TARGETS
                The widget transfers, as type ATOM, a list of the targets to
                be used as the value of the DragContext's XmNexportTargets
                in a drag-and-drop transfer.  These include
                _MOTIF_COMPOUND_STRING, COMPOUND_TEXT, the encoding of the
                locale, STRING, TEXT, BACKGROUND, and FOREGROUND.

      _MOTIF_LOSE_SELECTION
                When the widget loses the selection, it deselects all list
                items.

      As a source of data, List also supports the following standard Motif
      targets:

      BACKGROUND    [Toc]    [Back]
                The widget transfers XmNbackground as type PIXEL.

      CLASS     The widget finds the first shell in the widget hierarchy
                that has a WM_CLASS property and transfers the contents as
                text in the current locale.

      CLIENT_WINDOW    [Toc]    [Back]
                The widget finds the first shell in the widget hierarchy and
                transfers its window as type WINDOW.

      COLORMAP  The widget transfers XmNcolormap as type COLORMAP.

      FOREGROUND    [Toc]    [Back]
                The widget transfers XmNforeground as type PIXEL.

      NAME      The widget finds the first shell in the widget hierarchy
                that has a WM_NAME property and transfers the contents as
                text in the current locale.

      TARGETS   The widget transfers, as type ATOM, a list of the targets it
                supports.  These include the standard targets in this list.
                These also include _MOTIF_COMPOUND_STRING, COMPOUND_TEXT,
                the encoding of the locale, STRING, and TEXT.

      TIMESTAMP The widget transfers the timestamp used to acquire the
                selection as type INTEGER.

      _MOTIF_RENDER_TABLE
                The widget transfers XmNrenderTable if it exists, or else
                the default text render table, as type STRING.



                                    - 4 -       Formatted:  January 24, 2005






 XmList(library call)                                   XmList(library call)




      _MOTIF_ENCODING_REGISTRY
                The widget transfers its encoding registry as type STRING.
                The value is a list of NULL separated items in the form of
                tag encoding pairs.  This target symbolizes the transfer
                target for the Motif Segment Encoding Registry.  Widgets and
                applications can use this Registry to register text encoding
                formats for specified render table tags.  Applications
                access this Registry by calling XmRegisterSegmentEncoding
                and XmMapSegmentEncoding.

      List has no widget class destination procedure.  Subclasses and the
      XmNdestinationCallback procedures are responsible for any data
      transfers to the widget.

    Classes    [Toc]    [Back]
      List inherits behavior, resources, and traits from Core and
      XmPrimitive.

      The class pointer is xmListWidgetClass.

      The class name is XmList.

    New Resources    [Toc]    [Back]
      The following table defines a set of widget resources used by the
      programmer to specify data. The programmer 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, remove
      the XmN or XmC prefix and use the remaining letters. To specify one of
      the defined values for a resource in a .Xdefaults file, remove the Xm
      prefix and use the remaining letters (in either lowercase or
      uppercase, but include 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).




















                                    - 5 -       Formatted:  January 24, 2005






 XmList(library call)                                   XmList(library call)




      __________________________________________________________________________________________________________________
                                                     XmList Resource Set
       Name                           Class                       Type                Default                    Access
      __________________________________________________________________________________________________________________
       XmNautomaticSelection          XmCAutomaticSelection       XtEnum              False                      CSG
      __________________________________________________________________________________________________________________
       XmNbrowseSelectionCallback     XmCCallback                 XtCallbackList      NULL                       C
      __________________________________________________________________________________________________________________
       XmNdefaultActionCallback       XmCCallback                 XtCallbackList      NULL                       C
      __________________________________________________________________________________________________________________
       XmNdestinationCallback         XmCCallback                 XtCallbackList      NULL                       C
      __________________________________________________________________________________________________________________
       XmNdoubleClickInterval         XmCDoubleClickInterval      int                 dynamic                    CSG
      __________________________________________________________________________________________________________________
       XmNextendedSelectionCallback   XmCCallback                 XtCallbackList      NULL                       C
      __________________________________________________________________________________________________________________
       XmNfontList                    XmCFontList                 XmFontList          dynamic                    CSG
      __________________________________________________________________________________________________________________
       XmNitemCount                   XmCItemCount                int                 0                          CSG
      __________________________________________________________________________________________________________________
       XmNitems                       XmCItems                    XmStringTable       NULL                       CSG
      __________________________________________________________________________________________________________________
       XmNlistMarginHeight            XmCListMarginHeight         Dimension           0                          CSG
      __________________________________________________________________________________________________________________
       XmNlistMarginWidth             XmCListMarginWidth          Dimension           0                          CSG
      __________________________________________________________________________________________________________________
       XmNlistSizePolicy              XmCListSizePolicy           unsigned char       XmVARIABLE                 CG
      __________________________________________________________________________________________________________________
       XmNlistSpacing                 XmCListSpacing              Dimension           0                          CSG
      __________________________________________________________________________________________________________________
       XmNmatchBehavior               XmCMatchBehavior            unsigned char       XmQUICK_NAVIGATE           CSG
      __________________________________________________________________________________________________________________
       XmNmultipleSelectionCallback   XmCCallback                 XtCallbackList      NULL                       C
      __________________________________________________________________________________________________________________
       XmNprimaryOwnership            XmCPrimaryOwnership         unsigned char       XmOWN_NEVER                CSG
      __________________________________________________________________________________________________________________
       XmNrenderTable                 XmCRenderTable              XmRenderTable       dynamic                    CSG
      __________________________________________________________________________________________________________________
       XmNscrollBarDisplayPolicy      XmCScrollBarDisplayPolicy   unsigned char       XmAS_NEEDED                CSG
      __________________________________________________________________________________________________________________
       XmNselectColor                 XmCSelectColor              XmRSelectColor      XmREVERSED_GROUND_COLORS   CSG
      __________________________________________________________________________________________________________________
       XmNselectedItemCount           XmCSelectedItemCount        int                 0                          CSG
      __________________________________________________________________________________________________________________
       XmNselectedItems               XmCSelectedItems            XmStringTable       NULL                       CSG
      __________________________________________________________________________________________________________________
       XmNselectedPositionCount       XmCSelectedPositionCount    int                 0                          CSG
      __________________________________________________________________________________________________________________
       XmNselectedPositions           XmCSelectedPositions        unsigned int *      NULL                       CSG
      __________________________________________________________________________________________________________________
       XmNselectionMode               XmCSelectionMode            unsigned char       dynamic                    CSG



                                    - 6 -       Formatted:  January 24, 2005






 XmList(library call)                                   XmList(library call)




      __________________________________________________________________________________________________________________
      |XmNselectionPolicy             XmCSelectionPolicy          unsigned char       XmBROWSE_SELECT            CSG    |
      |_________________________________________________________________________________________________________________|
      |XmNsingleSelectionCallback   | XmCCallback               | XtCallbackList    | NULL                     | C      |
      |_____________________________|___________________________|___________________|__________________________|________|
      |XmNstringDirection           | XmCStringDirection        | XmStringDirection | dynamic                  | CSG    |
      |_____________________________|___________________________|___________________|__________________________|________|
      |XmNtopItemPosition           | XmCTopItemPosition        | int               | 1                        | CSG    |
      |_____________________________|___________________________|___________________|__________________________|________|
      |XmNvisibleItemCount          | XmCVisibleItemCount       | int               | dynamic                  | CSG    |
      |_____________________________|___________________________|___________________|__________________________|________|
      |_____________________________|___________________________|___________________|__________________________|________|

      XmNautomaticSelection    [Toc]    [Back]
                Invokes either XmNbrowseSelectionCallback or
                XmNextendedSelectionCallback when <Btn1> is pressed and the
                items that are shown as selected change if the value is True
                (or XmAUTO) and the selection mode is either XmBROWSE_SELECT
                or XmEXTENDED_SELECT respectively.  If False
                (XmNO_AUTO_SELECT), no selection callbacks are invoked until
                the user releases the mouse button.  See Behavior for
                further details on the interaction of this resource with the
                selection modes.

      XmNbrowseSelectionCallback    [Toc]    [Back]
                Specifies a list of callbacks that is called when an item is
                selected in the browse selection mode. The reason is
                XmCR_BROWSE_SELECT.

      XmNdefaultActionCallback    [Toc]    [Back]
                Specifies a list of callbacks that is called when an item is
                double clicked or <osfActivate> is pressed.  The reason is
                XmCR_DEFAULT_ACTION.

      XmNdestinationCallback    [Toc]    [Back]
                Specifies a list of callbacks called when the List is the
                destination of a transfer operation.  The type of the
                structure whose address is passed to these callbacks is
                XmDestinationCallbackStruct.  The reason is XmCR_OK.

      XmNdoubleClickInterval    [Toc]    [Back]
                If a button click is followed by another button click within
                the time span specified by this resource (in milliseconds),
                the button clicks are considered a double-click action,
                rather than two single-click actions.  The value must not be
                negative.  The default value is the display's multiclick
                time.

      XmNextendedSelectionCallback    [Toc]    [Back]
                Specifies a list of callbacks that is called when items are
                selected using the extended selection mode.  The reason is



                                    - 7 -       Formatted:  January 24, 2005






 XmList(library call)                                   XmList(library call)




                XmCR_EXTENDED_SELECT.

      XmNfontList    [Toc]    [Back]
                Specifies the font list associated with the list items.
                XmNfontList is obsolete and exists only for compatibility
                with previous releases. You should now use XmNrenderTable
                instead of XmNfontList. If both are specified, the render
                table will take precedence. The font list is used in
                conjunction with the XmNvisibleItemCount resource to
                determine the height of the List widget.  If this value is
                NULL at initialization, the parent hierarchy of the widget
                is searched for a widget that holds the
                XmQTspecifyRenderTable trait.  If such an ancestor is found,
                the font list is initialized to the XmTEXT_RENDER_TABLE
                value of the ancestor widget. If no such widget is found,
                the default is implementation dependent. Refer to
                XmFontList(3) for more information on a font list structure.

      XmNitemCount    [Toc]    [Back]
                Specifies the total number of items.  The value must be the
                number of items in XmNitems and must not be negative.  It is
                automatically updated by the list whenever an item is added
                to or deleted from the list.

      XmNitems  Points to an array of compound strings that are to be
                displayed as the list items.  Refer to XmString(3) for more
                information on the creation and structure of compound
                strings.  XtGetValues for this resource returns the list
                items themselves, not a copy of the list items.  The
                application must not free the returned items.

      XmNlistMarginHeight    [Toc]    [Back]
                Specifies the height of the margin between the list border
                and the items.

      XmNlistMarginWidth    [Toc]    [Back]
                Specifies the width of the margin between the list border
                and the items.

      XmNlistSizePolicy    [Toc]    [Back]
                Controls the reaction of the List when an item grows
                horizontally beyond the current size of the list work area.
                If the value is XmCONSTANT, the list viewing area does not
                grow, and a horizontal ScrollBar is added for a List whose
                parent is a ScrolledWindow.  If this resource is set to
                XmVARIABLE, the List grows to match the size of the longest
                item, and no horizontal ScrollBar appears.

                When the value of this resource is XmRESIZE_IF_POSSIBLE, the
                List attempts to grow or shrink to match the width of the
                widest item.  If it cannot grow to match the widest size, a



                                    - 8 -       Formatted:  January 24, 2005






 XmList(library call)                                   XmList(library call)




                horizontal ScrollBar is added for a List whose parent is a
                ScrolledWindow if the longest item is wider than the list
                viewing area.

                The size policy must be set at the time the List widget is
                created.  It cannot be changed at a later time through
                XtSetValues.

      XmNlistSpacing    [Toc]    [Back]
                Specifies the spacing between list items.  This spacing
                increases by the value of the XmNhighlightThickness resource
                in Primitive.

      XmNmatchBehavior    [Toc]    [Back]
                Specifies the matching behavior followed by XmList.  The
                current values are XmNONE and XmQUICK_NAVIGATE, as follows:

                XmNONE    Specifies that the typed in characters are
                          ignored.

                XmQUICK_NAVIGATE    [Toc]    [Back]
                          Specifies that 1-character navigation shall be
                          supported when List has focus. If the typed
                          character is the initial character of some set of
                          items in List, the first of those items following
                          the current item will be navigated to (become the
                          current item). If all such items precede the
                          current item, the first such item becomes the
                          current item.  Subsequently, typing the same
                          character will cyclically navigate among the items
                          with the same first character.

      XmNmultipleSelectionCallback    [Toc]    [Back]
                Specifies a list of callbacks that is called when an item is
                selected in multiple selection mode. The reason is
                XmCR_MULTIPLE_SELECT.

      XmNprimaryOwnership    [Toc]    [Back]
                Specifies whether XmContainer takes ownership of the Primary
                selection when a selection is made inside it. This resource
                can take the following values:

                XmOWN_NEVER    [Toc]    [Back]
                          Never takes ownership.

                XmOWN_ALWAYS    [Toc]    [Back]
                          Always takes ownership.

                XmOWN_MULTIPLE    [Toc]    [Back]
                          Only takes ownership is more than one element has
                          been selected.



                                    - 9 -       Formatted:  January 24, 2005






 XmList(library call)                                   XmList(library call)




                XmOWN_POSSIBLE_MULTIPLE    [Toc]    [Back]
                          Only takes ownership if more than one element can
                          be selected at a time.

      XmNrenderTable    [Toc]    [Back]
                Specifies the render table associated with the list items.
                The render table is used in conjunction with the
                XmNvisibleItemCount resource to determine the height of the
                List widget. If this value is NULL at initialization, List
                searches its parent hierarchy for a widget that holds the
                XmQTspecifyRenderTable trait.  If such an ancestor is found,
                the render table is initialized to the XmTEXT_RENDER_TABLE
                value of the ancestor widget. If no such widget is found,
                the default is implementation dependent. If a font list and
                a render table are both specified, the render table will
                take precedence. Refer to XmRenderTable(3) for more
                information on the creation and structure of a render table.

      XmNscrollBarDisplayPolicy    [Toc]    [Back]
                Controls the display of vertical ScrollBars in a List whose
                parent is a ScrolledWindow.  When the value of this resource
                is XmAS_NEEDED, a vertical ScrollBar is displayed only when
                the number of items in the List exceeds the number of
                visible items.  When the value is XmSTATIC, a vertical
                ScrollBar is always displayed.

      XmNselectColor    [Toc]    [Back]
                Allows the application to specify the color of the
                background rectangle that indicates selected text. It takes
                two values:

                XmDEFAULT_SELECT_COLOR    [Toc]    [Back]
                          Causes the select color to be set to a color
                          between the background and the bottom shadow
                          color.

                XmREVERSED_GROUND_COLORS    [Toc]    [Back]
                          Forces the select color to the foreground color
                          and the color of any text rendered over the select
                          color to be in the background color.

                HIGHLIGHT_COLOR    [Toc]    [Back]
                          Forces the fill color to use the highlight color.

      XmNselectedItemCount    [Toc]    [Back]
                Specifies the number of strings in the selected items list.
                The value must be the number of items in XmNselectedItems
                and must not be negative.

      XmNselectedItems    [Toc]    [Back]
                Points to an array of compound strings that represents the



                                   - 10 -       Formatted:  January 24, 2005






 XmList(library call)                                   XmList(library call)




                list items that are currently selected, either by the user
                or by the application.  XtGetValues for this resource
                returns the list items themselves, not a copy of the list
                items.  The application must not free the returned items or
                the array.

                Setting XmNselectedItems selects those list items that
                exactly match items in the given XmNselectedItems list.
                There may be additional items in XmNselectedItems that do
                not match items in the list. These items remain until
                XmNselectedItems is updated.  If XmNitems is changed such
                that the list now contains items matching previously
                unmatched items in XmNselectedItems, those new items will
                also appear selected.

                Any user interaction with the list that causes at least one
                item to be selected or deselected and any call to
                XmListDeleteAllItems, XmListDeleteItem, XmListDeleteItems,
                XmListDeleteItemsPos, XmListDeletePos,
                XmListDeletePositions, XmListDeselectAllItems,
                XmListDeselectItem, XmListDeselectPos, XmListSelectItem,
                XmListSelectPos, or XmListUpdateSelectedList cause
                XmNselectedItems to be updated immediately to exactly
                reflect the visual state of the list.  Calls to any other
                XmList functions do not affect XmNselectedItems.

      XmNselectedPositionCount    [Toc]    [Back]
                Specifies the number of positions in the selected positions
                list.  The value must be the number of items in
                XmNselectedPositions

      XmNselectedPositions    [Toc]    [Back]
                Points to an array of the positions of the selected items in
                the List.  XtGetValues for this resource returns the list
                items themselves, not a copy of the list items. The
                application must not free the returned items or the array.

      XmNselectionMode    [Toc]    [Back]
                Defines what effect keyboard navigations have on selection.
                The valid modes are:

                XmADD_MODE    [Toc]    [Back]
                          Allows no navigation operations to have effect on
                          selection, and <osfSelect> toggles the selection
                          state of the item at the location cursor without
                          deselecting any other selected items, except in
                          Single Select. However, the widget cannot be put
                          into add mode if the XmNselectionPolicy resource
                          is an incompatible mode (XmNselectionPolicy cannot
                          be XmBROWSE_SELECT).




                                   - 11 -       Formatted:  January 24, 2005






 XmList(library call)                                   XmList(library call)




                XmNORMAL_MODE    [Toc]    [Back]
                          Allows navigation operations and <osfSelect> to
                          select the item at the location cursor and
                          deselect any other selected items. However, the
                          widget cannot be put into normal mode if the
                          XmNselectionPolicy resource is an incompatible
                          mode (XmNselectionPolicy cannot be XmSINGLE_SELECT
                          or XmMULTIPLE_SELECT).

      XmNselectionPolicy    [Toc]    [Back]
                Defines the interpretation of the selection action. This can
                be one of the following:

                XmSINGLE_SELECT    [Toc]    [Back]
                          Allows only single selections

                XmMULTIPLE_SELECT    [Toc]    [Back]
                          Allows multiple selections

                XmEXTENDED_SELECT    [Toc]    [Back]
                          Allows extended selections

                XmBROWSE_SELECT    [Toc]    [Back]
                          Allows drag-and-browse functionality

      XmNsingleSelectionCallback    [Toc]    [Back]
                Specifies a list of callbacks that is called when an item is
                selected in single selection mode. The reason is
                XmCR_SINGLE_SELECT.

      XmNstringDirection    [Toc]    [Back]
                Is a synthetic resource for setting XmNlayoutDirection.  The
                values for this resource are XmSTRING_DIRECTION_L_TO_R and
                XmSTRING_DIRECTION_R_TO_L. Refer to the XmNlayoutDirection
                resource description. The XmNstringDirection resource is
                obsoleted by XmNlayoutDirection, but is kept here for
                backward compatibility.

      XmNtopItemPosition    [Toc]    [Back]
                Specifies the position of the item that is the first visible
                item in the list.  Setting this resource is equivalent to
                calling the XmListSetPos function.  The position of the
                first item in the list is 1; the position of the second item
                is 2; and so on.  A position of 0 (zero) specifies the last
                item in the list.  The value must not be negative.

      XmNvisibleItemCount    [Toc]    [Back]
                Specifies the number of items that can fit in the visible
                space of the list work area. The List uses this value to
                determine its height.  The value must be greater than 0
                (zero).



                                   - 12 -       Formatted:  January 24, 2005






 XmList(library call)                                   XmList(library call)




    Inherited Resources    [Toc]    [Back]
      List inherits behavior and resources from the superclasses described
      in the following tables.  For a complete description of each resource,
      refer to the reference page for that superclass.

      ____________________________________________________________________________________________________
      |                                     XmPrimitive Resource Set                                      |
      |Name                      Class                   Type               Default                Access |
      |________________________|_______________________|__________________|______________________|________|
      |XmNbottomShadowColor    | XmCBottomShadowColor  | Pixel            | dynamic              | CSG    |
      |________________________|_______________________|__________________|______________________|________|
      |XmNbottomShadowPixmap   | XmCBottomShadowPixmap | Pixmap           | XmUNSPECIFIED_PIXMAP | CSG    |
      |________________________|_______________________|__________________|______________________|________|
      |XmNconvertCallback      | XmCCallback           | XtCallbackList   | NULL                 | C      |
      |________________________|_______________________|__________________|______________________|________|
      |XmNforeground           | XmCForeground         | Pixel            | dynamic              | CSG    |
      |________________________|_______________________|__________________|______________________|________|
      |XmNhelpCallback         | XmCCallback           | XtCallbackList   | NULL                 | C      |
      |________________________|_______________________|__________________|______________________|________|
      |XmNhighlightColor       | XmCHighlightColor     | Pixel            | dynamic              | CSG    |
      |________________________|_______________________|__________________|______________________|________|
      |XmNhighlightOnEnter     | XmCHighlightOnEnter   | Boolean          | False                | CSG    |
      |________________________|_______________________|__________________|______________________|________|
      |XmNhighlightPixmap      | XmCHighlightPixmap    | Pixmap           | dynamic              | CSG    |
      |________________________|_______________________|__________________|______________________|________|
      |XmNhighlightThickness   | XmCHighlightThickness | Dimension        | 2                    | CSG    |
      |________________________|_______________________|__________________|______________________|________|
      |XmNlayoutDirection      | XmCLayoutDirection    | XmDirection      | dynamic              | CG     |
      |________________________|_______________________|__________________|______________________|________|
      |XmNnavigationType       | XmCNavigationType     | XmNavigationType | XmTAB_GROUP          | CSG    |
      |________________________|_______________________|__________________|______________________|________|
      |XmNpopupHandlerCallback | XmCCallback           | XtCallbackList   | NULL                 | C      |
      |________________________|_______________________|__________________|______________________|________|
      |XmNshadowThickness      | XmCShadowThickness    | Dimension        | 2                    | CSG    |
      |________________________|_______________________|__________________|______________________|________|
      |XmNtopShadowColor       | XmCTopShadowColor     | Pixel            | dynamic              | CSG    |
      |________________________|_______________________|__________________|______________________|________|
      |XmNtopShadowPixmap      | XmCTopShadowPixmap    | Pixmap           | dynamic              | CSG    |
      |________________________|_______________________|__________________|______________________|________|
      |XmNtraversalOn          | XmCTraversalOn        | Boolean          | True                 | CSG    |
      |________________________|_______________________|__________________|______________________|________|
      |XmNunitType             | XmCUnitType           | unsigned char    | dynamic              | CSG    |
      |________________________|_______________________|__________________|______________________|________|
      |XmNuserData             | XmCUserData           | XtPointer        | NULL                 | CSG    |
      |________________________|_______________________|__________________|______________________|________|
      |________________________|_______________________|__________________|______________________|________|








                                   - 13 -       Formatted:  January 24, 2005






 XmList(library call)                                   XmList(library call)




      ________________________________________________________________________________________________________________
      |                                              Core Resource Set                                                |
      |Name                            Class                           Type             Default                Access |
      |______________________________|_______________________________|________________|______________________|________|
      |XmNaccelerators               | XmCAccelerators               | XtAccelerators | dynamic              | CSG    |
      |______________________________|_______________________________|________________|______________________|________|
      |XmNancestorSensitive          | XmCSensitive                  | Boolean        | dynamic              | G      |
      |______________________________|_______________________________|________________|______________________|________|
      |XmNbackground                 | XmCBackground                 | Pixel          | dynamic              | CSG    |
      |______________________________|_______________________________|________________|______________________|________|
      |XmNbackgroundPixmap           | XmCPixmap                     | Pixmap         | XmUNSPECIFIED_PIXMAP | CSG    |
      |______________________________|_______________________________|________________|______________________|________|
      |XmNborderColor                | XmCBorderColor                | Pixel          | XtDefaultForeground  | CSG    |
      |______________________________|_______________________________|________________|______________________|________|
      |XmNborderPixmap               | XmCPixmap                     | Pixmap         | XmUNSPECIFIED_PIXMAP | CSG    |
      |______________________________|_______________________________|________________|______________________|________|
      |XmNborderWidth                | XmCBorderWidth                | Dimension      | 0                    | CSG    |
      |______________________________|_______________________________|________________|______________________|________|
      |XmNcolormap                   | XmCColormap                   | Colormap       | dynamic              | CG     |
      |______________________________|_______________________________|________________|______________________|________|
      |XmNdepth                      | XmCDepth                      | int            | dynamic              | CG     |
      |______________________________|_______________________________|________________|______________________|________|
      |XmNdestroyCallback            | XmCCallback                   | XtCallbackList | NULL                 | C      |
      |______________________________|_______________________________|________________|______________________|________|
      |XmNheight                     | XmCHeight                     | Dimension      | dynamic              | CSG    |
      |______________________________|_______________________________|________________|______________________|________|
      |XmNinitialResourcesPersistent | XmCInitialResourcesPersistent | Boolean        | True                 | C      |
      |______________________________|_______________________________|________________|______________________|________|
      |XmNmappedWhenManaged          | XmCMappedWhenManaged          | Boolean        | True                 | CSG    |
      |______________________________|_______________________________|________________|______________________|________|
      |XmNscreen                     | XmCScreen                     | Screen *       | dynamic              | CG     |
      |______________________________|_______________________________|________________|______________________|________|
      |XmNsensitive                  | XmCSensitive                  | Boolean        | True                 | CSG    |
      |______________________________|_______________________________|________________|______________________|________|
      |XmNtranslations               | XmCTranslations               | XtTranslations | dynamic              | CSG    |
      |______________________________|_______________________________|________________|______________________|________|
      |XmNwidth                      | XmCWidth                      | Dimension      | dynamic              | CSG    |
      |______________________________|_______________________________|________________|______________________|________|
      |XmNx                          | XmCPosition                   | Position       | 0                    | CSG    |
      |______________________________|_______________________________|________________|______________________|________|
      |XmNy                          | XmCPosition                   | Position       | 0                    | CSG    |
      |______________________________|_______________________________|________________|______________________|________|
      |______________________________|_______________________________|________________|______________________|________|

    Callback Information    [Toc]    [Back]
      List defines a new callback structure. The application must first look
      at the reason field and use only the structure members that are valid
      for that particular reason, because not all fields are relevant for
      every possible reason. The callback structure is defined as follows:





                                   - 14 -       Formatted:  January 24, 2005






 XmList(library call)                                   XmList(library call)




      typedef struct
      {
              int reason;
              XEvent *event;
              XmString item;
              int item_length;
              int item_position;
              XmString *selected_items;
              int selected_item_count;
              int *selected_item_positions;
              char selection_type;
              unsigned char auto_selection_type;
      } XmListCallbackStruct;

      reason    Indicates why the callback was invoked.

      event     Points to the XEvent that triggered the callback. It can be
                NULL.

      item      The last item selected at the time of the event that caused
                the callback.  item points to a temporary storage space that
                is reused after the callback is finished.  Therefore, if an
                application needs to save the item, it should copy the item
                into its 

 Similar pages
Name OS Title
XmDisplay IRIX The Display widget class
XmComboBox HP-UX The ComboBox widget class
XmCommand HP-UX The Command widget class
XmContainer HP-UX The Container widget class
XmCommand IRIX The Command widget class
XmCascadeButtonGadget IRIX The CascadeButtonGadget widget class
XmCascadeButton IRIX The CascadeButton widget class
XmBulletinBoard IRIX The BulletinBoard widget class
Constraint Tru64 The Constraint widget class
XmArrowButtonGadget IRIX The ArrowButtonGadget widget class
Copyright © 2004-2005 DeniX Solutions SRL
newsletter delivery service