1 /***********************************************************
3 Copyright 1987, 1988, 1994, 1998 The Open Group
5 Permission to use, copy, modify, distribute, and sell this software and its
6 documentation for any purpose is hereby granted without fee, provided that
7 the above copyright notice appear in all copies and that both that
8 copyright notice and this permission notice appear in supporting
11 The above copyright notice and this permission notice shall be included in
12 all copies or substantial portions of the Software.
14 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17 OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
18 AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
19 CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
21 Except as contained in this notice, the name of The Open Group shall not be
22 used in advertising or otherwise to promote the sale, use or other dealings
23 in this Software without prior written authorization from The Open Group.
26 Copyright 1987, 1988 by Digital Equipment Corporation, Maynard, Massachusetts.
30 Permission to use, copy, modify, and distribute this software and its
31 documentation for any purpose and without fee is hereby granted,
32 provided that the above copyright notice appear in all copies and that
33 both that copyright notice and this permission notice appear in
34 supporting documentation, and that the name of Digital not be
35 used in advertising or publicity pertaining to distribution of the
36 software without specific, written prior permission.
38 DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
39 ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
40 DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
41 ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
42 WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
43 ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
46 ******************************************************************/
51 #include <X11/Xaw/Text.h>
55 Name Class RepType Default Value
56 ---- ----- ------- -------------
57 callback Callback Callback NULL
58 editType EditType XawTextEditType XawtextRead
59 enableUndo Undo Boolean False
60 sourceChanged Changed Boolean False
64 /* Class record constants */
65 extern WidgetClass textSrcObjectClass;
67 typedef struct _TextSrcClassRec *TextSrcObjectClass;
68 typedef struct _TextSrcRec *TextSrcObject;
87 } XawTextSelectionMode;
93 } XawTextSelectionAction;
95 #define XawTextReadError -1
96 #define XawTextScanError -1
99 #define XtNenableUndo "enableUndo"
100 #define XtCUndo "Undo"
102 #define XtNsourceChanged "sourceChanged"
103 #define XtCChanged "Changed"
105 #define XtNpropertyCallback "propertyCallback"
119 * pos - position of the text to retreive
120 * text - text block that will contain returned text
121 * length - maximum number of characters to read
124 * This function reads the source.
127 * The number of characters read into the buffer
129 XawTextPosition XawTextSourceRead
133 XawTextBlock *text_return,
139 * XawTextSourceReplace
142 * src - Text Source Object
143 * startPos - ends of text that will be removed
145 * text - new text to be inserted into buffer at startPos
148 * Replaces a block of text with new text
151 * XawEditError or XawEditDone
153 int XawTextSourceReplace
156 XawTextPosition start,
167 * position - position to start scanning
168 * type - type of thing to scan for
169 * dir - direction to scan
170 * count - which occurance if this thing to search for
171 * include - whether or not to include the character found in
172 * the position that is returned.
175 * Scans the text source for the number and type of item specified.
178 * The position of the text
180 XawTextPosition XawTextSourceScan
183 XawTextPosition position,
184 #if NeedWidePrototypes
190 XawTextScanType type,
191 XawTextScanDirection dir,
199 * XawTextSourceSearch
202 * w - TextSource Object
203 * position - position to start scanning
204 * dir - direction to search
205 * text - the text block to search for
208 * Searchs the text source for the text block passed.
211 * The position of the text we are searching for or XawTextSearchError
213 XawTextPosition XawTextSourceSearch
216 XawTextPosition position,
217 #if NeedWidePrototypes
220 XawTextScanDirection dir,
227 * XawTextSourceConvertSelection
231 * selection - current selection atom
232 * target - current target atom
233 * type - type to conver the selection to
234 * value - return value that has been converted
236 * format - format of the returned value
239 * True if the selection has been converted
241 Boolean XawTextSourceConvertSelection
247 XtPointer *value_return,
248 unsigned long *length_return,
254 * XawTextSourceSetSelection
258 * left - bounds of the selection
260 * selection - selection atom
263 * Allows special setting of the selection.
265 void XawTextSourceSetSelection
268 XawTextPosition start,
275 #endif /* _XawTextSrc_h */