74
78
<STRONG>o</STRONG> The input is the KEY_MOUSE special key associated with
83
<H3><a name="h3-form_driver_w">form_driver_w</a></H3><PRE>
84
This extension simplifies the use of the forms library
85
using wide characters. The input is either a key code (a
86
request) or a wide character returned by <STRONG><A HREF="get_wch.3x.html">get_wch(3x)</A></STRONG>. The
87
type must be passed as well, to enable the library to
88
determine whether the parameter is a wide character or a
93
<H3><a name="h3-Form-driver-requests">Form-driver requests</a></H3><PRE>
77
94
The form driver requests are as follows:
80
Move to the next page.
83
Move to the previous page.
86
Move to the first page.
89
Move to the last field.
93
Move to the next field.
96
Move to the previous field.
99
Move to the first field.
102
Move to the last field.
105
Move to the sorted next field.
108
Move to the sorted previous field.
111
Move to the sorted first field.
114
Move to the sorted last field.
117
Move left to a field.
120
Move right to a field.
126
Move down to a field.
130
Move to the next char.
133
Move to the previous char.
136
Move to the next line.
139
Move to the previous line.
142
Move to the next word.
145
Move to the previous word.
148
Move to the beginning of the field.
151
Move to the end of the field.
154
Move to the beginning of the line.
157
Move to the end of the line.
160
Move left in the field.
163
Move right in the field.
166
Move up in the field.
169
Move down in the field.
173
Insert or overlay a new line.
176
Insert a blank at the cursor.
179
Insert a blank line at the cursor.
182
Delete character at the cursor.
185
Delete character before the cursor.
188
Delete line at the cursor.
191
Delete blank-delimited word at the cursor.
194
Clear to end of line from cursor.
197
Clear to end of field from cursor.
200
Clear the entire field.
210
Scroll the field forward a line.
213
Scroll the field backward a line.
216
Scroll the field forward a page.
219
Scroll the field backward a page.
222
Scroll the field forward half a page.
225
Scroll the field backward half a page.
229
Scroll the field forward a character.
232
Scroll the field backward a character.
235
Horizontal scroll the field forward a line.
238
Horizontal scroll the field backward a line.
241
Horizontal scroll the field forward half a line.
244
Horizontal scroll the field backward half a line.
251
Display next field choice.
254
Display previous field choice.
256
If the second argument is a printable character, the
257
driver places it in the current position in the current
258
field. If it is one of the forms requests listed above,
96
<EM>Name</EM> <EM>Description</EM>
97
-------------------------------------------------------------------------
98
REQ_BEG_FIELD Move to the beginning of the field.
99
REQ_BEG_LINE Move to the beginning of the line.
100
REQ_CLR_EOF Clear to end of field from cursor.
101
REQ_CLR_EOL Clear to end of line from cursor.
102
REQ_CLR_FIELD Clear the entire field.
103
REQ_DEL_CHAR Delete character at the cursor.
104
REQ_DEL_LINE Delete line at the cursor.
105
REQ_DEL_PREV Delete character before the cursor.
106
REQ_DEL_WORD Delete blank-delimited word at the cursor.
107
REQ_DOWN_CHAR Move down in the field.
108
REQ_DOWN_FIELD Move down to a field.
109
REQ_END_FIELD Move to the end of the field.
110
REQ_END_LINE Move to the end of the line.
111
REQ_FIRST_FIELD Move to the first field.
112
REQ_FIRST_PAGE Move to the first page.
113
REQ_INS_CHAR Insert a blank at the cursor.
114
REQ_INS_LINE Insert a blank line at the cursor.
115
REQ_INS_MODE Enter insert mode.
116
REQ_LAST_FIELD Move to the last field.
117
REQ_LAST_PAGE Move to the last field.
118
REQ_LEFT_CHAR Move left in the field.
119
REQ_LEFT_FIELD Move left to a field.
121
REQ_NEW_LINE Insert or overlay a new line.
122
REQ_NEXT_CHAR Move to the next char.
123
REQ_NEXT_CHOICE Display next field choice.
124
REQ_NEXT_FIELD Move to the next field.
125
REQ_NEXT_LINE Move to the next line.
126
REQ_NEXT_PAGE Move to the next page.
127
REQ_NEXT_PAGE Move to the next page.
128
REQ_NEXT_WORD Move to the next word.
129
REQ_OVL_MODE Enter overlay mode.
130
REQ_PREV_CHAR Move to the previous char.
131
REQ_PREV_CHOICE Display previous field choice.
132
REQ_PREV_FIELD Move to the previous field.
133
REQ_PREV_LINE Move to the previous line.
134
REQ_PREV_PAGE Move to the previous page.
135
REQ_PREV_WORD Move to the previous word.
136
REQ_RIGHT_CHAR Move right in the field.
137
REQ_RIGHT_FIELD Move right to a field.
138
REQ_SCR_BCHAR Scroll the field backward a character.
139
REQ_SCR_BHPAGE Scroll the field backward half a page.
140
REQ_SCR_BLINE Scroll the field backward a line.
141
REQ_SCR_BPAGE Scroll the field backward a page.
142
REQ_SCR_FCHAR Scroll the field forward a character.
143
REQ_SCR_FHPAGE Scroll the field forward half a page.
144
REQ_SCR_FLINE Scroll the field forward a line.
145
REQ_SCR_FPAGE Scroll the field forward a page.
146
REQ_SCR_HBHALF Horizontal scroll the field backward half a line.
147
REQ_SCR_HBLINE Horizontal scroll the field backward a line.
148
REQ_SCR_HFHALF Horizontal scroll the field forward half a line.
149
REQ_SCR_HFLINE Horizontal scroll the field forward a line.
150
REQ_SFIRST_FIELD Move to the sorted first field.
151
REQ_SLAST_FIELD Move to the sorted last field.
152
REQ_SNEXT_FIELD Move to the sorted next field.
153
REQ_SPREV_FIELD Move to the sorted previous field.
154
REQ_UP_CHAR Move up in the field.
155
REQ_UP_FIELD Move up to a field.
156
REQ_VALIDATION Validate field.
158
If the second argument is a printable character, the
159
driver places it in the current position in the current
160
field. If it is one of the forms requests listed above,
259
161
that request is executed.
263
<H3><a name="h3-MOUSE-HANDLING">MOUSE HANDLING</a></H3><PRE>
264
If the second argument is the KEY_MOUSE special key, the
165
<H3><a name="h3-Mouse-handling">Mouse handling</a></H3><PRE>
166
If the second argument is the KEY_MOUSE special key, the
265
167
associated mouse event is translated into one of the above
266
pre-defined requests. Currently only clicks in the user
267
window (e.g., inside the form display area or the decora-
168
pre-defined requests. Currently only clicks in the user
169
window (e.g., inside the form display area or the decora-
268
170
tion window) are handled.
270
172
If you click above the display region of the form:
284
186
a REQ_LAST_FIELD is generated for a triple-click.
286
If you click at an field inside the display area of the
188
If you click at an field inside the display area of the
289
191
<STRONG>o</STRONG> the form cursor is positioned to that field.
291
<STRONG>o</STRONG> If you double-click a field, the form cursor is
292
positioned to that field and <STRONG>E_UNKNOWN_COMMAND</STRONG> is
193
<STRONG>o</STRONG> If you double-click a field, the form cursor is
194
positioned to that field and <STRONG>E_UNKNOWN_COMMAND</STRONG> is
293
195
returned. This return value makes sense, because a
294
double click usually means that an field-specific
295
action should be returned. It is exactly the pur-
296
pose of this return value to signal that an appli-
196
double click usually means that an field-specific
197
action should be returned. It is exactly the pur-
198
pose of this return value to signal that an appli-
297
199
cation specific command should be executed.
299
<STRONG>o</STRONG> If a translation into a request was done,
201
<STRONG>o</STRONG> If a translation into a request was done,
300
202
<STRONG>form_driver</STRONG> returns the result of this request.
302
If you clicked outside the user window or the mouse event
303
could not be translated into a form request an
204
If you clicked outside the user window or the mouse event
205
could not be translated into a form request an
304
206
<STRONG>E_REQUEST_DENIED</STRONG> is returned.
308
<H3><a name="h3-APPLICATION-DEFINED-COMMANDS">APPLICATION-DEFINED COMMANDS</a></H3><PRE>
210
<H3><a name="h3-Application-defined-commands">Application-defined commands</a></H3><PRE>
309
211
If the second argument is neither printable nor one of the
310
above pre-defined form requests, the driver assumes it is
212
above pre-defined form requests, the driver assumes it is
311
213
an application-specific command and returns <STRONG>E_UNKNOWN_COM-</STRONG>
312
214
<STRONG>MAND</STRONG>. Application-defined commands should be defined rel-
313
ative to <STRONG>MAX_COMMAND</STRONG>, the maximum value of these pre-
215
ative to <STRONG>MAX_COMMAND</STRONG>, the maximum value of these pre-
314
216
defined requests.