1 /*
2  * Motif
3  *
4  * Copyright (c) 1987-2012, The Open Group. All rights reserved.
5  *
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)
10  * any later version.
11  *
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
16  * details.
17  *
18  * You should have received a copy of the GNU Lesser General Public
19  * License along with these librararies and programs; if not, write
20  * to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
21  * Floor, Boston, MA 02110-1301 USA
22  *
23  */
24 #ifndef _XmDataF_h
25 #define _XmDataF_h
26 
27 #include <Xm/Xm.h>
28 #include <Xm/TextF.h>
29 #include <Xm/Ext.h>
30 
31 #if defined(__cplusplus)
32 extern "C" {
33 #endif
34 
35 typedef struct _XmDataFieldClassRec    *XmDataFieldWidgetClass;
36 typedef struct _XmDataFieldRec         *XmDataFieldWidget;
37 
38 /*      Function Name: XmCreateDataField
39  *      Description: Creation Routine for UIL and ADA.
40  *      Arguments: parent - the parent widget.
41  *                 name - the name of the widget.
42  *                 args, num_args - the number and list of args.
43  *      Returns: The Widget created.
44  */
45 
46 Widget XmCreateDataField(
47 #ifndef _NO_PROTO
48 Widget, String, ArgList, Cardinal
49 #endif
50 );
51 
52 /*
53  * Variable argument list functions
54  */
55 
56 extern Widget XmVaCreateDataField(
57                         Widget parent,
58                         char *name,
59                         ...);
60 extern Widget XmVaCreateManagedDataField(
61                         Widget parent,
62                         char *name,
63                         ...);
64 
65 Boolean _XmDataFieldReplaceText(
66 #ifndef _NO_PROTO
67 XmDataFieldWidget, XEvent*, XmTextPosition, XmTextPosition, char*, int, Boolean
68 #endif
69 );
70 
71 void XmDataFieldSetString(
72 #ifndef _NO_PROTO
73 Widget, char*
74 #endif
75 );
76 
77 extern char * XmDataFieldGetString(
78 #ifndef _NO_PROTO
79 Widget
80 #endif
81 );
82 
83 extern wchar_t * XmDataFieldGetStringWcs(
84 #ifndef _NO_PROTO
85 Widget
86 #endif
87 );
88 
89 void _XmDataFieldSetClipRect(
90 #ifndef _NO_PROTO
91 XmDataFieldWidget
92 #endif
93 );
94 
95 void _XmDataFieldDrawInsertionPoint(
96 #ifndef _NO_PROTO
97 XmDataFieldWidget, Boolean
98 #endif
99 );
100 
101 void XmDataFieldSetHighlight(
102 #ifndef _NO_PROTO
103 Widget, XmTextPosition, XmTextPosition, XmHighlightMode
104 #endif
105 );
106 
107 void XmDataFieldSetAddMode(
108 #ifndef _NO_PROTO
109 Widget, Boolean
110 #endif
111 );
112 
113 char * XmDataFieldGetSelection(
114 #ifndef _NO_PROTO
115 Widget
116 #endif
117 );
118 
119 void XmDataFieldSetSelection(
120 #ifndef _NO_PROTO
121 Widget, XmTextPosition, XmTextPosition, Time
122 #endif
123 );
124 
125 void _XmDataFieldSetSel2(
126 #ifndef _NO_PROTO
127 Widget, XmTextPosition, XmTextPosition, Boolean, Time
128 #endif
129 );
130 
131 Boolean XmDataFieldGetSelectionPosition(
132 #ifndef _NO_PROTO
133 Widget, XmTextPosition *, XmTextPosition *
134 #endif
135 );
136 
137 XmTextPosition XmDataFieldXYToPos(
138 #ifndef _NO_PROTO
139 Widget, Position, Position
140 #endif
141 );
142 
143 void XmDataFieldShowPosition(
144 #ifndef _NO_PROTO
145 Widget, XmTextPosition
146 #endif
147 );
148 
149 Boolean XmDataFieldCut(
150 #ifndef _NO_PROTO
151 Widget, Time
152 #endif
153 );
154 
155 Boolean XmDataFieldCopy(
156 #ifndef _NO_PROTO
157 Widget, Time
158 #endif
159 );
160 
161 Boolean XmDataFieldPaste(
162 #ifndef _NO_PROTO
163 Widget
164 #endif
165 );
166 
167 void XmDataFieldSetEditable(
168 #ifndef _NO_PROTO
169 Widget, Boolean
170 #endif
171 );
172 
173 void XmDataFieldSetInsertionPosition(
174 #ifndef _NO_PROTO
175 Widget, XmTextPosition
176 #endif
177 );
178 
179 extern WidgetClass xmDataFieldWidgetClass;
180 
181 typedef struct _XmDataFieldCallbackStruct {
182     Widget   w;			/* The XmDataField */
183     String   text;		/* Proposed string */
184     Boolean  accept;		/* Accept return value, for validation */
185 } XmDataFieldCallbackStruct;
186 
187 #if defined(__cplusplus)
188 } /* extern "C" */
189 #endif
190 
191 #endif /* _XmDataF_h */
192