2 * CDE - Common Desktop Environment
4 * Copyright (c) 1993-2012, The Open Group. All rights reserved.
6 * These libraries and programs are free software; you can
7 * redistribute them and/or modify them under the terms of the GNU
8 * Lesser General Public License as published by the Free Software
9 * Foundation; either version 2 of the License, or (at your option)
12 * These libraries and programs are distributed in the hope that
13 * they will be useful, but WITHOUT ANY WARRANTY; without even the
14 * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
15 * PURPOSE. See the GNU Lesser General Public License for more
18 * You should have received a copy of the GNU Lesser General Public
19 * License along with these libraries and programs; if not, write
20 * to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
21 * Floor, Boston, MA 02110-1301 USA
24 * $XConsortium: WXmList.h /main/4 1996/07/26 11:32:22 rcs $
26 * Copyright (c) 1991 HaL Computer Systems, Inc. All rights reserved.
27 * UNPUBLISHED -- rights reserved under the Copyright Laws of the United
28 * States. Use of a copyright notice is precautionary only and does not
29 * imply publication or disclosure.
31 * This software contains confidential information and trade secrets of HaL
32 * Computer Systems, Inc. Use, disclosure, or reproduction is prohibited
33 * without the prior express written permission of HaL Computer Systems, Inc.
35 * RESTRICTED RIGHTS LEGEND
36 * Use, duplication, or disclosure by the Government is subject to
37 * restrictions as set forth in subparagraph (c)(l)(ii) of the Rights in
38 * Technical Data and Computer Software clause at DFARS 252.227-7013.
39 * HaL Computer Systems, Inc.
40 * 1315 Dell Avenue, Campbell, CA 95008
44 // This code is automatically generated in -*- C++ -*-
48 #include "WXmPrimitive.h"
51 class WXmList : public WXmPrimitive {
53 DEFINE_INIT (WXmList, WXmPrimitive, xmListWidgetClass)
54 inline void AddItem(WXmString s,int p) const {
55 XmListAddItem (widget, s, p);
57 inline void AddItemUnselected(WXmString s, int p) const {
58 XmListAddItemUnselected (widget, s, p);
60 inline void AddItems(XmString *s, int c, int p) const {
61 XmListAddItems (widget, s, c, p);
64 inline void AddItemsUnselected(XmString *s, int c, int p) const {
65 XmListAddItemsUnselected (widget, s, c, p);
68 inline void DeleteAllItems(void) const {
69 XmListDeleteAllItems (widget);
71 inline void DeleteItem(WXmString s) const {
72 XmListDeleteItem (widget, s);
74 inline void DeleteItems(XmString *s, int c) const {
75 XmListDeleteItems (widget, s, c);
77 inline void DeleteItemsPos(int c, int p) const {
78 XmListDeleteItemsPos (widget, c, p);
80 inline void DeletePos(int p) const {
81 XmListDeletePos (widget, p);
84 inline void DeletePositions(int *p, int c) const {
85 XmListDeletePositions (widget, p, c);
88 inline void DeselectAllItems() const {
89 XmListDeselectAllItems (widget);
91 inline void DeselectItem(WXmString s) const {
92 XmListDeselectItem (widget, s);
94 inline void DeselectPos(int i) const {
95 XmListDeselectPos (widget, i);
98 inline int GetKbdItemPos() const {
99 return XmListGetKbdItemPos (widget);
102 inline Boolean GetMatchPos(WXmString s, int **p, int *c) const {
103 return XmListGetMatchPos (widget, s, p, c);
105 inline Boolean GetSelectedPos(int **p, int *c) const {
106 return XmListGetSelectedPos (widget, p, c);
108 inline Boolean ItemExists(WXmString s) const {
109 return XmListItemExists (widget, s);
111 inline int ItemPos(WXmString s) const {
112 return XmListItemPos (widget, s);
114 #if XmVersion >= 1002
115 inline Boolean PosSelected(int p) const {
116 return XmListPosSelected (widget, p);
118 inline Boolean PosToBounds(int p, Position *x, Position *y,
119 Dimension *w, Dimension *h) const {
120 return XmListPosToBounds (widget, p, x, y, w, h);
123 inline void ReplaceItems(XmString *os, int c, XmString *ns) const {
124 XmListReplaceItems (widget, os, c, ns);
126 inline void ReplaceItemsPos(XmString *os, int c, int p) const {
127 XmListReplaceItemsPos (widget, os, c, p);
129 inline void ReplaceItemsPosUnselected(XmString *os, int c,
131 XmListReplaceItemsPos (widget, os, c, p);
133 #if XmVersion >= 1002
134 inline void ReplaceItemsUnselected(XmString *os, int c,
135 XmString *ns) const {
136 XmListReplaceItemsUnselected (widget, os, c, ns);
138 inline void ReplacePositions(int *p, XmString *s, int c) const {
139 XmListReplacePositions (widget, p, s, c);
142 inline void SelectItem(WXmString s,Boolean b) const {
143 XmListSelectItem (widget, s, b);
145 inline void SelectPos(int p, Boolean b) const {
146 XmListSelectPos (widget, p, b);
148 inline void SetAddMode(Boolean b) const {
149 XmListSetAddMode (widget, b);
151 inline void SetBottomItem(WXmString s) const {
152 XmListSetBottomItem (widget, s);
154 inline void SetBottomPos(int p) const {
155 XmListSetBottomPos (widget, p);
157 inline void SetHorizPos(int p) const {
158 XmListSetHorizPos (widget, p);
160 inline void SetItem(WXmString s) const {
161 XmListSetItem (widget, s);
163 #if XmVersion >= 1002
164 inline Boolean SetKbdItemPos(int p) const {
165 return XmListSetKbdItemPos (widget, p);
168 inline void SetPos(int p) const {
169 XmListSetPos (widget, p);
171 #if XmVersion >= 1002
172 inline void UpdateSelectedList() const {
173 XmListUpdateSelectedList (widget);
175 inline int YToPos(Position y) const {
176 return XmListYToPos (widget, y);
179 DEFINE_GETTER_SETTER (AutomaticSelection,Boolean,"automaticSelection")
180 DEFINE_CALLBACK (BrowseSelectionCallback,"browseSelectionCallback")
181 DEFINE_CALLBACK (ConvertCallback,"convertCallback")
182 DEFINE_CALLBACK (DefaultActionCallback,"defaultActionCallback")
183 DEFINE_GETTER_SETTER (DoubleClickInterval,int,"doubleClickInterval")
184 DEFINE_CALLBACK (ExtendedSelectionCallback,"extendedSelectionCallback")
185 DEFINE_GETTER_SETTER (FontList,XmFontList,"fontList")
186 DEFINE_GETTER_SETTER (ItemCount,int,"itemCount")
187 DEFINE_GETTER_SETTER (Items,XmStringTable,"items")
188 DEFINE_GETTER_SETTER (ListMarginHeight,short,"listMarginHeight")
189 DEFINE_GETTER_SETTER (ListMarginWidth,short,"listMarginWidth")
190 DEFINE_GETTER_SETTER (ListSizePolicy,unsigned char,"listSizePolicy")
191 DEFINE_GETTER_SETTER (ListSpacing,short,"listSpacing")
192 DEFINE_CALLBACK (MultipleSelectionCallback,"multipleSelectionCallback")
193 DEFINE_GETTER_SETTER (ScrollBarDisplayPolicy,unsigned char,"scrollBarDisplayPolicy")
194 DEFINE_GETTER_SETTER (SelectedItemCount,int,"selectedItemCount")
195 DEFINE_GETTER_SETTER (SelectedItems,XmStringTable,"selectedItems")
196 DEFINE_GETTER_SETTER (SelectionPolicy,unsigned char,"selectionPolicy")
197 DEFINE_CALLBACK (SingleSelectionCallback,"singleSelectionCallback")
198 DEFINE_GETTER_SETTER (StringDirection,unsigned char,"stringDirection")
199 DEFINE_GETTER_SETTER (TopItemPosition,int,"topItemPosition")
200 DEFINE_GETTER_SETTER (VisibleItemCount,int,"visibleItemCount")
201 DEFINE_GETTER_SETTER (HorizontalScrollBar,Widget,"horizontalScrollBar")
202 DEFINE_GETTER_SETTER (VerticalScrollBar,Widget,"verticalScrollBar")
204 // Change the font of an item in the list. Zero indicates last item.
205 Boolean ChangeItemFont( int pos, char* tag );
208 #define NULLWXmList WXmList((Widget)0)