~ubuntu-branches/ubuntu/trusty/libcdk5/trusty

« back to all changes in this revision

Viewing changes to man/cdk_traverse.3

  • Committer: Bazaar Package Importer
  • Author(s): John Goerzen
  • Date: 2007-06-06 03:54:31 UTC
  • mfrom: (1.1.1 upstream)
  • Revision ID: james.westby@ubuntu.com-20070606035431-ba4gdvw0h6ybffsu
Tags: 5.0.20060507-1
* New upstream release.
* Fixed header patching.  Patch from Robert Schiele.
  Closes: #402978, #416336.
* Update widget count in description.  Closes: #294709.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
.\" $Id: cdk_traverse.3,v 1.3 2002/07/09 21:51:16 tom Exp $
 
1
.\" $Id: cdk_traverse.3,v 1.7 2005/12/30 01:47:25 tom Exp $
 
2
.de XX
 
3
..
2
4
.TH cdk_traverse 3
3
5
.SH NAME
4
 
traverseCDKScreen,
5
 
exitOKCDKScreen,
6
 
exitOKCDKScreenOf,
7
 
exitCancelCDKScreen,
8
 
exitCancelCDKScreenOf,
9
 
resetCDKScreen,
10
 
resetCDKScreenOf - functions to support keyboard traversal
 
6
.XX exitCancelCDKScreen
 
7
.XX exitCancelCDKScreenOf
 
8
.XX exitOKCDKScreen
 
9
.XX exitOKCDKScreenOf
 
10
.XX getCDKFocusCurrent
 
11
.XX resetCDKScreen
 
12
.XX resetCDKScreenOf
 
13
.XX setCDKFocusCurrent
 
14
.XX setCDKFocusFirst
 
15
.XX setCDKFocusLast
 
16
.XX setCDKFocusNext
 
17
.XX setCDKFocusPrevious
 
18
.XX traverseCDKOnce
 
19
.XX traverseCDKScreen
 
20
cdk_traverse - functions to support keyboard traversal
11
21
.SH SYNOPSIS
12
22
.LP
13
23
.B cc
15
25
.B \-lcdk
16
26
.RI "[ " "library" " \|.\|.\|. ]"
17
27
.LP
 
28
.nf
18
29
#include <cdk.h>
19
30
.LP
 
31
.BI "CDKOBJS *getCDKFocusCurrent (CDKSCREEN *" "screen");
 
32
.LP
 
33
.BI "CDKOBJS *setCDKFocusCurrent (CDKSCREEN *" "screen\fB, CDKOBJS *\fPobj");
 
34
.LP
 
35
.BI "CDKOBJS *setCDKFocusFirst (CDKSCREEN *" "screen");
 
36
.LP
 
37
.BI "CDKOBJS *setCDKFocusLast (CDKSCREEN *" "screen");
 
38
.LP
 
39
.BI "CDKOBJS *setCDKFocusNext (CDKSCREEN *" "screen");
 
40
.LP
 
41
.BI "CDKOBJS *setCDKFocusPrevious (CDKSCREEN *" "screen");
 
42
.LP
20
43
.BI "int traverseCDKScreen (CDKSCREEN *" "screen");
21
44
.LP
22
45
.BI "void exitOKCDKScreen (CDKSCREEN *" "screen");
30
53
.BI "void exitCancelCDKScreenOf (CDKOBJS *" "obj");
31
54
.LP
32
55
.BI "void resetCDKScreenOf (CDKOBJS *" "obj");
 
56
.TP 15
 
57
.BI "void traverseCDKOnce ("
 
58
.BI "CDKSCREEN *\fIscreen\fP,"
 
59
.BI "CDKOBJS *\fIcurobj\fP,"
 
60
.BI "int \fIkeyCode\fP,"
 
61
.BI "boolean \fIfunctionKey\fP,"
 
62
.BI "CHECK_KEYCODE \fIfuncMenuKey\fP);
 
63
.fi
 
64
.
33
65
.SH DESCRIPTION
34
66
The functions above handle the traversal of a screen populated with various
35
 
widgets.  Once the screen has been created and populated with widgets, a
36
 
single call to \f2traverseCDKScreen()\f1 will allow the user to move between
37
 
widgets and enter data (or otherwise manipulate widgets).  The remainder of
38
 
the functions above are intended to be used as callbacks by the widgets on
 
67
widgets.
 
68
Once the screen has been created and populated with widgets, a
 
69
single call to \fBtraverseCDKScreen()\fP will allow the user to move between
 
70
widgets and enter data (or otherwise manipulate widgets).
 
71
Other functions are provided for use as callbacks by the widgets on
39
72
the screen.
 
73
Finally, there are several functions which allow the caller to manipulate
 
74
the state of the traversal, i.e., the object which has focus.
40
75
.LP
41
76
In order for widgets to be used on a screen which is to be handled by
42
 
\f2traverseCDKScreen()\f1, it must have the following methods available:
 
77
\fBtraverseCDKScreen()\fP, it must have the following methods available:
43
78
.nf
44
79
.ft C
45
80
   injectCharObj
65
100
At the time of this writing, not all widgets have been modified to work with
66
101
the screen-traversal facility.
67
102
.SH AVAILABLE FUNCTIONS
68
 
int traverseCDKScreen (CDKSCREEN *\f2screen\f1);
 
103
.B int traverseCDKScreen (CDKSCREEN *\fIscreen\fP);
69
104
.RS 3
70
105
This function contains the main screen traversal engine.
71
106
It does the following:
93
128
*
94
129
If the keystroke is TAB/BACKTAB then call the unfocusObject method on the
95
130
current widget, and move focus to the next/previous widget (not counting
96
 
menu widgets).  Call the focusObject method on the newly current widget.
 
131
menu widgets).
 
132
Call the focusObject method on the newly current widget.
97
133
.TP 3
98
134
*
99
135
If the keystroke is the EXIT-SAVE keystroke, then call the saveData method
113
149
.RE
114
150
.RE
115
151
.TP 5
 
152
.B CDKOBJS *getCDKFocusCurrent (CDKSCREEN *\fIscreen\fP);
 
153
Return a pointer to the object which currently has focus in the given screen.
 
154
.TP 5
 
155
.B CDKOBJS *setCDKFocusCurrent (CDKSCREEN *\fIscreen\fP, CDKOBJS *\fIobj\fP);
 
156
Set the focus to the given object, if the screen contains that object.
 
157
If the screen does not contain the object, return null.
 
158
Otherwise, return the object.
 
159
.TP 5
 
160
.B CDKOBJS *setCDKFocusFirst (CDKSCREEN *\fIscreen\fP);
 
161
Set focus on the first object in the given screen.
 
162
.TP 5
 
163
.B CDKOBJS *setCDKFocusLast (CDKSCREEN *\fIscreen\fP);
 
164
Set focus on the last object in the given screen.
 
165
.TP 5
 
166
.B CDKOBJS *setCDKFocusNext (CDKSCREEN *\fIscreen\fP);
 
167
Set focus on the next object in the given screen.
 
168
.TP 5
 
169
.B CDKOBJS *setCDKFocusPrevious (CDKSCREEN *\fIscreen\fP);
 
170
Set focus on the previous object in the given screen.
 
171
.TP 5
116
172
.B exitOKCDKScreen
117
173
.RS 3
118
174
Causes the traversal engine to exit after calling the saveData
121
177
.TP 5
122
178
.B exitOKCDKScreenOf
123
179
.RS 3
124
 
Calls \f2exitOKCDKScreen()\f1 on the screen associated with widget
125
 
\f2obj\f1.  This function was designed to be used as a callback routine
 
180
Calls \fBexitOKCDKScreen()\fP on the screen associated with widget
 
181
\fIobj\fP.
 
182
This function was designed to be used as a callback routine
126
183
for a button widget used as an OK button on a data-entry screen.
127
184
.RE
128
185
.TP 5
134
191
.TP 5
135
192
.B exitCancelCDKScreenOf
136
193
.RS 3
137
 
Calls \f2exitCancelCDKScreen()\f1 on the screen associated with widget
138
 
\f2obj\f1.  This function was designed to be used as a callback routine
 
194
Calls \fBexitCancelCDKScreen()\fP on the screen associated with widget
 
195
\fIobj\fP.
 
196
This function was designed to be used as a callback routine
139
197
for a button widget used as a Cancel button on a data-entry screen.
140
198
.RE
141
199
.TP 5
142
200
.B resetCDKScreen
143
201
.RS 3 
144
 
Causes the traversal engine to call the refreshData
145
 
method for each widget.  This will cause any unsaved changes to be discarded
 
202
Causes the traversal engine to call the refreshData method for each widget.
 
203
This will cause any unsaved changes to be discarded
146
204
and the widget states will be restored to their initial values.
147
205
.RE
148
206
.TP 5
149
207
.B resetCDKScreenOf
150
208
.RS 3
151
 
Calls \f2resetCDKScreen()\f1 on the screen associated with widget
152
 
\f2obj\f1.  This function was designed to be used as a callback routine
 
209
Calls \fBresetCDKScreen()\fP on the screen associated with widget \fIobj\fP.
 
210
This function was designed to be used as a callback routine
153
211
for a button widget used as a Reset button on a data-entry screen.
154
212
.RE
 
213
.TP 5
 
214
.B traverseCDKOnce
 
215
.RS 3
 
216
This is a utility function, one of the pieces from which you can
 
217
construct a customized version of \fBtraverseCDKScreen\fP.
 
218
.RE
155
219
.SH BUGS
156
220
Not all widgets have had the extra methods added so that they work with 
157
221
the screen traversal engine.
158
222
.SH AUTHOR
159
223
Grant Edwards, Aspen Research Corporation
 
224
.br
 
225
Thomas Dickey and contributors.
160
226
.SH SEE ALSO
161
227
.BR cdk (3),
162
228
.BR cdk_binding (3),