Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 10:15:27

0001 #ifndef _XmMultiList_h_
0002 #define _XmMultiList_h_
0003 
0004 #include <Xm/Ext.h>
0005 
0006 #if defined(__cplusplus)
0007 extern "C" {
0008 #endif
0009 
0010 #define XmANY_COLUMN    -1
0011 
0012 externalref WidgetClass xmMultiListWidgetClass;
0013 
0014 typedef struct _XmMultiListClassRec *XmMultiListWidgetClass;
0015 typedef struct _XmMultiListRec      *XmMultiListWidget;
0016 
0017 typedef struct _XmMultiListRowInfo {
0018     /*
0019      * Used by the XmIList widget.
0020      */
0021     XmString * values;      /* The array of column strings */
0022     Pixmap pixmap;      /* the mini-icon pixmaps. */
0023     Boolean selected;       /* Is this row selected. */
0024 
0025     /*
0026      * Provided for the convience of the application programmer.
0027      */
0028     short *sort_id;
0029     XtPointer data;
0030 
0031     /*
0032      * Private to the XmIList widget (do not modify these).
0033      */
0034     short pix_width;        /* width of the pixmap. */
0035     short pix_height;       /* height of the pixmap. */
0036     short height;       /* height of the row */
0037     Boolean old_sel_state;  /* previous select state. */
0038     short pix_depth;        /* height of the pixmap. */
0039 } XmMultiListRowInfo;
0040 
0041 typedef struct _XmMultiListCallbackStruct {
0042     int reason;     /* Why was callback called? */
0043     XEvent *event;  /* The X Event associated with find button press... */
0044     String string;  /* The search string used to do find */
0045     int column;     /* The column index into row values */
0046     XmMultiListRowInfo *row; /* The row info structure of the matching row */
0047     wchar_t *wc_string; /* The search wcs string used to do find */
0048 } XmMultiListCallbackStruct;
0049 
0050 typedef int (*Xm18SortFunction) \
0051             (short, const XmMultiListRowInfo *, const XmMultiListRowInfo *);
0052 
0053 /************************************************************
0054 *   GLOBAL DECLARATIONS
0055 *************************************************************/
0056 
0057 /* 
0058  * Function Name: XmMultiListGetSelectedRows
0059  * Description:   Takes an Extended List and returns a NULL terminated array
0060  *                of pointers to selected rows from the internal list
0061  * Arguments:     w - the extended list widget
0062  * Returns:       XmMultiListRowInfo **
0063  */
0064 
0065 XmMultiListRowInfo ** XmMultiListGetSelectedRows(Widget w);
0066 
0067 /*  Function Name: XmCreateExtended18List
0068  *  Description: Creation Routine for UIL and ADA.
0069  *  Arguments: parent - the parent widget.
0070  *                 name - the name of the widget.
0071  *                 args, num_args - the number and list of args.
0072  *  Returns: The Widget created.
0073  */
0074 
0075 extern Widget XmCreateMultiList(Widget w,
0076                               char *name,
0077                               ArgList args,
0078                               Cardinal num_args);
0079 
0080 extern Widget XmCreateMultiList(Widget w,
0081                          char *name,
0082                          ArgList args,
0083                          Cardinal num_args);
0084 
0085 extern Widget XmVaCreateMultiList(
0086                         Widget parent,
0087                         char *name,
0088                         ...);
0089 
0090 extern Widget XmVaCreateManagedMultiList(
0091                         Widget parent,
0092                         char *name,
0093                         ...);
0094 
0095 /*  Function Name: XmMultiListUnselectAllItems
0096  *  Description:   Unselects all rows
0097  *  Arguments:     w - the ilist widget.
0098  *  Returns:       none
0099  */
0100 extern void XmMultiListUnselectAllItems(Widget w);
0101 
0102 /*  Function Name: XmMultiListUnselectItem
0103  *  Description:   Unselects the row passed in
0104  *  Arguments:     w - the ilist widget.
0105  *                 row_info - ptr to the row passed in
0106  *  Returns:       none
0107  */
0108 extern void XmMultiListUnselectItem(Widget w, XmMultiListRowInfo *row_info);
0109 
0110 /*  Function Name: XmMultiListToggleRow
0111  *  Description:   Toggles the selection state of a specified row
0112  *  Arguments:     w - the extended list widget
0113  *  Returns:       none
0114  */
0115 extern void XmMultiListToggleRow(Widget w, short row);
0116 
0117 /*  Function Name: XmMultiListSelectItems
0118  *  Description:   Set selection state by matching column entries to XmString
0119  *  Arguments:     w - the extended list widget
0120  *         item - XmString to use as selection key
0121  *         column - column number (0 - N) to match (or XmANY_COLUMN)
0122  *         notify - if True, call XmNsingleSelectionCallback
0123  *  Returns:       none
0124  */
0125 extern void
0126 XmMultiListSelectItems(Widget w,
0127                        XmString item,
0128                        int column,
0129                        Boolean notify);
0130 
0131 /*  Function Name: XmMultiListDeselectItems
0132  *  Description:   Set selection state by matching column entries to XmString
0133  *  Arguments:     w - the extended list widget
0134  *         item - XmString to use as selection key
0135  *         column - column number (0 - N) to match (or XmANY_COLUMN)
0136  *  Returns:       none
0137  */
0138 extern void XmMultiListDeselectItems(Widget w,
0139                                      XmString item,
0140                                      int column);
0141 
0142 /*  Function Name: XmMultiListSelectAllItems
0143  *  Description:   Set selection state on all rows
0144  *  Arguments:     w - the extended list widget
0145  *         notify - if True, call XmNsingleSelectionCallback for each
0146  *  Returns:       none
0147  */
0148 extern void XmMultiListSelectAllItems(Widget w, Boolean notify);
0149 
0150 /*  Function Name: XmMultiListSelectRow
0151  *  Description:   Set selection state on all rows
0152  *  Arguments:     w - the extended list widget
0153  *         row - the row to select
0154  *         notify - if True, call XmNsingleSelectionCallback
0155  *  Returns:       none
0156  */
0157 extern void XmMultiListSelectRow(Widget w, int row, Boolean notify);
0158 
0159 /*  Function Name: XmMultiListDeselectRow
0160  *  Description:   Set selection state on all rows
0161  *  Arguments:     w - the extended list widget
0162  *         row - the row to select
0163  *  Returns:       none
0164  */
0165 extern void XmMultiListDeselectRow(Widget w, int row);
0166 
0167 /* 
0168  * Function Name: XmMultiListGetSelectedRowArray
0169  * Description:   Takes an Extended List and returns a NULL terminated array
0170  *                of pointers to selected rows from the internal list
0171  * Arguments:     w - the extended list widget
0172  *        num_rows - pointer to the number of rows
0173  * Returns:       array of integer (selected) row numbers
0174  */
0175 extern int *XmMultiListGetSelectedRowArray(Widget w, int *num_rows);
0176 
0177 /*  Function Name: XmMultiListMakeRowVisible
0178  *  Description:   Shifts the visible extended list rows as desired
0179  *  Arguments:     w - the extended list widget
0180  *         row - the row number wished to be made visible
0181  *  Returns:       none
0182  */
0183 extern void XmMultiListMakeRowVisible(Widget w, int row);
0184 
0185 #if defined(__cplusplus)
0186 }
0187 #endif
0188 
0189 #endif /* _XmMultiList_h_ */