Back to home page

EIC code displayed by LXR

 
 

    


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

0001 /* 
0002  * Motif
0003  *
0004  * Copyright (c) 1987-2012, The Open Group. All rights reserved.
0005  *
0006  * These libraries and programs are free software; you can
0007  * redistribute them and/or modify them under the terms of the GNU
0008  * Lesser General Public License as published by the Free Software
0009  * Foundation; either version 2 of the License, or (at your option)
0010  * any later version.
0011  *
0012  * These libraries and programs are distributed in the hope that
0013  * they will be useful, but WITHOUT ANY WARRANTY; without even the
0014  * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
0015  * PURPOSE. See the GNU Lesser General Public License for more
0016  * details.
0017  *
0018  * You should have received a copy of the GNU Lesser General Public
0019  * License along with these librararies and programs; if not, write
0020  * to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
0021  * Floor, Boston, MA 02110-1301 USA
0022 */ 
0023 #ifndef _XmListP_h
0024 #define _XmListP_h
0025 
0026 #include <Xm/List.h>
0027 #include <Xm/PrimitiveP.h>
0028 #include <Xm/ScrollBar.h>
0029 #include <Xm/ScrolledW.h>
0030 #include <Xm/XmosP.h>
0031 
0032 #ifdef __cplusplus
0033 extern "C" {
0034 #endif
0035 
0036 /* List struct passed to Convert proc for drag and drop */
0037 typedef struct _XmListDragConvertStruct
0038 {
0039   Widget    w;
0040   XmString *strings;
0041   int       num_strings;
0042 } XmListDragConvertStruct;
0043 
0044 /* List class structure */
0045 typedef struct _XmListClassPart
0046 {
0047   XtPointer extension;      /* Pointer to extension record */
0048 } XmListClassPart;
0049 
0050 
0051 /* Full class record declaration for List class */
0052 typedef struct _XmListClassRec
0053 {
0054   CoreClassPart        core_class;
0055   XmPrimitiveClassPart primitive_class;
0056   XmListClassPart      list_class;
0057 } XmListClassRec;
0058 
0059 externalref XmListClassRec xmListClassRec;
0060 
0061 /* Internal form of the list elements. */
0062 typedef struct {
0063   Dimension  height;
0064   Dimension  width;
0065   Boolean    selected;
0066   Boolean    last_selected;
0067   Boolean    LastTimeDrawn;
0068   int        length;
0069   wchar_t    first_char;
0070 } Element, *ElementPtr;
0071 
0072 /* The List instance record */
0073 typedef struct _XmListPart
0074 {
0075   Dimension     spacing;
0076   short             ItemSpacing;
0077   Dimension         margin_width;
0078   Dimension         margin_height;
0079   XmFontList        font;
0080   XmString     *items;
0081   int           itemCount;
0082   XmString     *selectedItems;
0083   int              *selectedPositions;  /* "selectedIndices" in Motif 1.2 */
0084   int           selectedItemCount;
0085   int           visibleItemCount;
0086   int           LastSetVizCount;
0087   unsigned char     SelectionPolicy;
0088   unsigned char     ScrollBarDisplayPolicy;
0089   unsigned char     SizePolicy;
0090   XmStringDirection StrDir;
0091 
0092   XtEnum        AutoSelect;
0093   Boolean       DidSelection;
0094   Boolean       FromSetSB;
0095   Boolean       FromSetNewSize;
0096   unsigned char     SelectionMode;  /* "Boolean AddMode" in Motif 1.2 */
0097   unsigned char     LeaveDir;
0098   unsigned char     HighlightThickness;
0099   int           ClickInterval;
0100   XtIntervalId      DragID;
0101   XtCallbackList    SingleCallback;
0102   XtCallbackList    MultipleCallback;
0103   XtCallbackList    ExtendCallback;
0104   XtCallbackList    BrowseCallback;
0105   XtCallbackList    DefaultCallback;
0106   
0107   
0108   GC        NormalGC;   
0109   GC        InverseGC;
0110   GC        HighlightGC;
0111   Pixmap        DashTile;   /* unused in Motif 1.2 */
0112   ElementPtr   *InternalList;
0113   int       LastItem;   /* position of last item in list */
0114   int       FontHeight; /* unused in Motif 1.2 */
0115   int       top_position;
0116   char      Event;
0117   int       LastHLItem;
0118 
0119   /* These fields specify the boundaries of the selection (i.e.
0120    * the current selection) as specified by the "selected" field
0121    * of the InternalList elements and the boundaries of the 
0122    * last_selected selection (i.e. the previous selection) as
0123    * specified by the "last_selected" field of the InternalList
0124    * elements.
0125    */
0126   int       StartItem;
0127   int       OldStartItem;
0128   int       EndItem;
0129   int       OldEndItem;
0130 
0131   Position  BaseX;
0132   Position  BaseY;
0133 
0134   /* MouseMoved: unused resource from Motif1.2, used now in the
0135    * CheckSetRenderTable default proc (see List.c). 
0136    */
0137   Boolean   MouseMoved;
0138 
0139   Boolean   AppendInProgress;
0140   Boolean   Traversing;
0141   Boolean   KbdSelection;
0142   short     DownCount;
0143   Time      DownTime;
0144   int       CurrentKbdItem; /* position of location cursor */
0145   unsigned char SelectionType;
0146   GC        InsensitiveGC;
0147   
0148   int vmin;         /* unused in Motif 1.2 */
0149   int vmax;         /* unused in Motif 2.0 */
0150   int vOrigin;          /* unused in Motif 2.0 */
0151   int vExtent;          /* unused in Motif 2.0 */
0152   
0153   int hmin;         /* slider minimum coordiate position */
0154   int hmax;         /* slider maximum coordiate position */
0155   int hOrigin;          /* slider edge location              */
0156   int hExtent;          /* slider size                       */
0157 
0158   Dimension MaxWidth;
0159   Dimension CharWidth;  /* unused in Motif 1.2 */
0160   Position  XOrigin;
0161     
0162   XmScrollBarWidget   hScrollBar;
0163   XmScrollBarWidget   vScrollBar;
0164   XmScrolledWindowWidget  Mom;
0165   Dimension       MaxItemHeight;
0166 
0167   /*--- New fields in Motif 2.0. ---*/
0168   int       selectedPositionCount;
0169 
0170   unsigned char matchBehavior;
0171 
0172   /* The AutoSelectionType is used to designate where in the selection
0173    * process the user currently is when auto select is enabled. For
0174    * instance, during an extended select, there is a beginning to
0175    * the selection, possible mouse motions and finally a button release
0176    * resulting in either a selection identical to what was selected
0177    * before the beginning or to a selection that is different.
0178    */
0179   unsigned char AutoSelectionType;
0180 
0181   /* PrimaryOwnership is used to describe how the list show take
0182    * ownership of the primary selection when the user selects list
0183    * items, with a possible value of NEVER.
0184    */
0185   unsigned char PrimaryOwnership;
0186 
0187   XtCallbackList DestinationCallback;
0188 
0189   /* Selection rendition fields */
0190   XmRendition   scratchRend;
0191   Pixel     selectColor;
0192 
0193   /* This field is used to house the top position of the list before a
0194    * scrolling action begins. If the scrolling action is cancelled, then
0195    * we restore the list top position by using this field. When scrolling
0196    * by directly using the scroll bar, we don't need this field since the
0197    * scroll frame trait handles the reset. When scrolling by selecting
0198    * items and dragging off the edge of the list, we need to use this
0199    * field to reset the list position when a user presses the cancel key.
0200    */
0201   int       previous_top_position;
0202 
0203   XtIntervalId  drag_start_timer;
0204   char *    drag_abort_action;
0205   XEvent    drag_event;
0206   XmListDragConvertStruct *drag_conv;
0207 } XmListPart;
0208 
0209 
0210 /* Full instance record declaration */
0211 typedef struct _XmListRec
0212 {
0213   CorePart    core;
0214   XmPrimitivePart primitive;
0215   XmListPart      list;
0216 } XmListRec;
0217 
0218 
0219 #ifdef __cplusplus
0220 }  /* Close scope of 'extern "C"' declaration which encloses file. */
0221 #endif
0222 
0223 #endif /* _XmListP_h */
0224 /* DON'T ADD ANYTHING AFTER THIS #endif */