2
* Field.h, a single line text entry widget, based on Rob's TextField Widget
4
* Copyright (c) 1997 Rasca M. Gmelch
5
* Copyright (c) 1995 Robert W. McMullen
7
* This library is free software; you can redistribute it and/or
8
* modify it under the terms of the GNU Library General Public
9
* License as published by the Free Software Foundation; either
10
* version 2 of the License, or (at your option) any later version.
12
* This library is distributed in the hope that it will be useful,
13
* but WITHOUT ANY WARRANTY; without even the implied warranty of
14
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15
* Library General Public License for more details.
17
* You should have received a copy of the GNU Library General Public
18
* License along with this library; if not, write to the Free
19
* Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
22
* Author: Rob McMullen <rwmcm@orion.ae.utexas.edu>
23
* http://www.ae.utexas.edu/~rwmcm
31
#define _TextField_WIDGET_VERSION 1.2
34
#define XtIsTextField(w) XtIsSubclass((Widget)w, xwFieldWidgetClass)
37
/* Athena style resource names */
38
/* class record constants */
41
#define XtNecho "echo"
43
#ifndef XtNpendingDelete
44
#define XtNpendingDelete "pendingDelete"
47
#define XtNlength "length"
50
#define XtNstring "string"
52
#ifndef XtNinsertPosition
53
#define XtNinsertPosition "insertPosition"
55
#ifndef XtNdisplayCaret
56
#define XtNdisplayCaret "displayCaret"
59
#define XtNeditable "editable"
61
#define XtNmargin "margin"
62
#define XtNcursorWidth "cursorWidth"
63
#define XtNallowSelection "allowSelection"
64
#define XtNactivateCallback "activateCallback"
65
#define XtNactiveBg "activeBackground"
66
#define XtCActiveBg "ActiveBackground"
67
#define XtNonlyNumber "onlyNumber"
68
#define XtCOnlyNumber "OnlyNumber"
70
extern WidgetClass xwFieldWidgetClass;
72
typedef struct _FieldClassRec *FieldWidgetClass;
73
typedef struct _FieldRec *FieldWidget, *XwFieldWidget;
75
typedef struct _TextFieldReturnStruct {
76
int reason; /* Motif compatibility */
82
** Public function declarations
84
#if __STDC__ || defined(__cplusplus)
91
Boolean FieldGetEditable P_((Widget aw));
92
int FieldGetInsertionPosition P_((Widget aw));
93
char *XwFieldGetString P_((Widget aw));
94
void XwFieldInsert P_((Widget aw, int pos, char *str));
95
void XwFieldReplace P_((Widget aw, int first, int last, char *str));
96
void XwFieldSetEditable P_((Widget aw, Boolean editable));
97
void XwFieldSetInsertionPosition P_((Widget aw, int pos));
98
void XwFieldSetSelection P_((Widget aw, int start, int end, Time time));
99
void XwFieldSetString P_((Widget aw, char *str));
101
#endif /* _Field_H */