1 | .COMMENT SCCS_data: %Z% %M% %I% %E% %U% |
---|
2 | .TH "XmpTable" 3 "19 March 1993" |
---|
3 | .SH NAME |
---|
4 | XmpTable \- Motif Public Table Widget |
---|
5 | .SH SYNOPSIS |
---|
6 | .ta 1.5i 2.5i |
---|
7 | .nf |
---|
8 | .ft B |
---|
9 | In C++ or C: |
---|
10 | |
---|
11 | #include <X11/Intrinsic.h> |
---|
12 | #include <X11/Xmp/Table.h> |
---|
13 | |
---|
14 | Widget newTable = XtCreateWidget( name, xmpTableWidgetClass, pw, ... ); |
---|
15 | Widget another = XmpCreateTable( pw, name, arglist, argcount ); |
---|
16 | .fi |
---|
17 | .ft R |
---|
18 | .SH LINK BY |
---|
19 | .nf |
---|
20 | .ft B |
---|
21 | example% ld -o prog prog.o -lXmp -lXm <WclOption> -lXmu -lXt -lX11 |
---|
22 | .ft R |
---|
23 | .fi |
---|
24 | .LP |
---|
25 | .I XmpTable |
---|
26 | does not require the use of Wcl, but the author obviously |
---|
27 | encourages its use ;^). See |
---|
28 | .I Wcl(3) |
---|
29 | for usage and linking of Wcl. |
---|
30 | .SH DESCRIPTION |
---|
31 | .LP |
---|
32 | .I XmpTable |
---|
33 | is a manager widget which allows widgets to be arranged in a tabular |
---|
34 | form. The |
---|
35 | .I XmpTable |
---|
36 | widget has a |
---|
37 | .B layout |
---|
38 | resource which is used to specify the column and row position of each |
---|
39 | child. Children can span rows and/or columns. Layout options |
---|
40 | are available to control the initial sizes, justification, and dynamic resizing |
---|
41 | of children. |
---|
42 | .LP |
---|
43 | Amazing as this may sound, |
---|
44 | .I XmpTable |
---|
45 | is internally fully object-oriented, but all methods and members of internal |
---|
46 | objects are in fact accessible to client applications. Rather than |
---|
47 | being pedantic about "information hiding", the author tries to follow |
---|
48 | the principle that |
---|
49 | .I XmpTable |
---|
50 | is going to be used by programmers, and programmers sometimes need to |
---|
51 | do things the author did not foresee. The structures and methods of |
---|
52 | the |
---|
53 | .I XmpTable |
---|
54 | and all of its component objects are declared in the |
---|
55 | .B TableP.h |
---|
56 | include file. Some methods which some may find useful are |
---|
57 | .B XmpTableLocFindPosition() |
---|
58 | and |
---|
59 | .B XmpTableLocFind() |
---|
60 | which clients can use to find the location information for widgets at |
---|
61 | some specific location in an |
---|
62 | .I XmpTable, |
---|
63 | or for some specific widget in an |
---|
64 | .I XmpTable. |
---|
65 | .sp 1 |
---|
66 | .SS "Classes" |
---|
67 | .I XmpTable |
---|
68 | inherits behavior and resources from \fBCore\fP, \fBComposite\fP, |
---|
69 | \fBConstraint\fP, \fBXmManager\fP, and \fBXmBulletinBoard\fP classes. |
---|
70 | .PP |
---|
71 | The class pointer is \fBxmpTableWidgetClass\fP. |
---|
72 | .PP |
---|
73 | The class name is \fBXmpTable\fP. |
---|
74 | .sp 1 |
---|
75 | .SS "New Resources" |
---|
76 | The following table defines a set of widget resources used by the programmer |
---|
77 | to specify data. The programmer can also set the resource values for the |
---|
78 | inherited classes to set attributes for this widget. To reference a |
---|
79 | resource by name or by class in an application defaults file, remove the |
---|
80 | \fBXtN\fP or \fBXtC\fP prefix and use the remaining letters. |
---|
81 | |
---|
82 | The codes in the access column indicate if the given resource can be |
---|
83 | set at creation time (\fBC\fP), |
---|
84 | set by using \fBXtSetValues\fP (\fBS\fP), |
---|
85 | retrieved by using \fBXtGetValues\fP (\fBG\fP), |
---|
86 | or is not applicable (\fBN/A\fP). |
---|
87 | .nf |
---|
88 | |
---|
89 | XmpTable Resource Set |
---|
90 | Name Class Type Default Access |
---|
91 | |
---|
92 | XtNlayout XtCLayout XmpTableLoc NULL CSG |
---|
93 | XtNdefaultOptions XtCDefaultOptions XmpTableOpts NULL CSG |
---|
94 | XtNsameWidth XtCSameSize XrmName** NULL CSG |
---|
95 | XtNsameHeight XtCSameSize XrmName** NULL CSG |
---|
96 | XtNsameBorder XtCSameSize XrmName** NULL CSG |
---|
97 | XtNshrinkSimple XtCShrinkSimple Boolean True CSG |
---|
98 | XtNforceShrink XtCForceShrink Boolean True CSG |
---|
99 | XtNcolumnSpacing XtCSpacing int 0 CSG |
---|
100 | XtNrowSpacing XtCSpacing int 0 CSG |
---|
101 | .fi |
---|
102 | .IP "\fBXtNlayout\fP" |
---|
103 | Specifies the column, row, column span, row span, and options for each |
---|
104 | child. The options field is optional, and takes the identical form of |
---|
105 | the \fBXtNdefaultOptions\fP resource discussed below. If no options |
---|
106 | are specified for a child, that childs options will be the value of the |
---|
107 | \fBXtNdefaultOptions\fP resource when the child is first managed. |
---|
108 | Children which are not named in the layout specification are positioned |
---|
109 | in column 0, row 0, with colum and row spans of 1, and using the |
---|
110 | default options. If the layout is changed after the |
---|
111 | .I XmpTable |
---|
112 | is created, then a complete re-layout is performed. The internal type |
---|
113 | \fBXmpTableLoc\fP which must be passed to \fBXtCreateWidget()\fP or to |
---|
114 | \fBXtSetValues()\fP is obtained by passing a string representation of |
---|
115 | the layout specification to \fBXmpTableLocParse()\fP which will be |
---|
116 | discussed below. A layout resource consists of one layout |
---|
117 | specification per named child, with each layout specification being |
---|
118 | separated (or terminated) by a ";" and with each layout specification |
---|
119 | of the form: |
---|
120 | .RS |
---|
121 | .RS |
---|
122 | .sp 2 |
---|
123 | .nf |
---|
124 | \fB<name> <col> <row> [<opts>]\fP |
---|
125 | .fi |
---|
126 | .RE |
---|
127 | .RE |
---|
128 | .IP "\fBXtNdefaultOptions\fP" |
---|
129 | Specifies the layout options which apply to all children which do not |
---|
130 | have specific layout options in the child's layout specification. The |
---|
131 | layout options allow a child widget to be justified within the table |
---|
132 | cell, and allow the initial size and dynamic resizing of children to be |
---|
133 | constrained. Combinations of options can be used: \fBtr\fP means top |
---|
134 | and right, or north-east justification. Note that the justification |
---|
135 | does not do anything special with labels of XmLabel widgets, or text in |
---|
136 | XmText widgets: it simply sets the positioning of the entire child |
---|
137 | widget within the cell of the |
---|
138 | .I XmpTable. |
---|
139 | The layout options consist of a series of adjacent case sensitive |
---|
140 | letters, each of which sets a layout option: |
---|
141 | .RS |
---|
142 | .RS |
---|
143 | .IP \fBl\fP |
---|
144 | left justify child in table cell. |
---|
145 | .IP \fBr\fP |
---|
146 | right justify child in table cell. |
---|
147 | .IP \fBt\fP |
---|
148 | top justify child in table cell. |
---|
149 | .IP \fBb\fP |
---|
150 | bottom justify child in table cell. |
---|
151 | .IP \fBw\fP |
---|
152 | do not stretch width of column in which child is |
---|
153 | positioned during resizing. Column width will remain wide enough to |
---|
154 | contain the widest child in the column. |
---|
155 | .IP \fBh\fP |
---|
156 | do not stretch height of row in which child is positioned |
---|
157 | during resizing. Row height will remain high enough to contain the |
---|
158 | tallest child in the row. |
---|
159 | .IP \fBW\fP |
---|
160 | do not stretch width of child during resizing. The width |
---|
161 | of the column may grow (unless constrained by \fBw\fP), and the child |
---|
162 | will be justified according to its layout options. |
---|
163 | .IP \fBH\fP |
---|
164 | do not stretch height of child during resizing. The height |
---|
165 | of the row may grow (unless constrained by \fBh\fP), and the child |
---|
166 | will be justified according to its layout options. |
---|
167 | .RE |
---|
168 | .RE |
---|
169 | .IP "\fBXtNsameWidth XtNsameHeight XtNsameBorder\fP" |
---|
170 | These three resources are used to specify the names of children |
---|
171 | of a Table which will be constrained to remain the same size as |
---|
172 | the table shrinks and grows, and when children are managed and |
---|
173 | unmanaged, and when children are allowed to resize. |
---|
174 | |
---|
175 | These three resources are often set together by using their common |
---|
176 | resource class \fBSameSize\fP in resource files. |
---|
177 | |
---|
178 | If you have been using \fBWcSameSize()\fP with limited success, you will |
---|
179 | probably like to use these resources instead. |
---|
180 | .IP "\fBXtNshrinkSimple\fP" |
---|
181 | Specifies if simple widgets (widgets which have NULL |
---|
182 | \fBquery_geometry\fP methods) should be forced smaller when the table |
---|
183 | widget is made smaller. Such simple widgets will be forced to their |
---|
184 | original preferred sizes, but not smaller. Widgets suffering from this |
---|
185 | malady in the \fBMotif\fP widget set include \fBXmArrowButton\fP, |
---|
186 | \fBXmArrowButtonGadget\fP, \fBXmDrawnButton\fP, \fBXmScale\fP, |
---|
187 | \fBXmScrollBar\fP, \fBXmSeparator\fP. By default, this is \fBTrue\fP. |
---|
188 | Older versions of XmpTable did not provide this feature, and so setting |
---|
189 | this resource \fBFalse\fP will give the old behavior, which the author |
---|
190 | found obnoxious. |
---|
191 | .IP "\fBXtNforceShrink\fP" |
---|
192 | Specifies if widgets should be made smaller than their "preferred" sizes. |
---|
193 | The XmpTable widget tries to respect the preferred geometries of its children. |
---|
194 | This virtually always works when the table is initially created, but after |
---|
195 | widgets are managed, many |
---|
196 | widgets simply respond with their current sizes: this means when the Table is |
---|
197 | made larger, some children will claim they do not want to be made smaller. |
---|
198 | The difficulty arises because the vocabulary of the query geometry prototcol |
---|
199 | is somewhat limited. Widgets which are locked using options including any of |
---|
200 | "whWH" will continue to be excluded from stretching, but others will be |
---|
201 | stretched and then can be shrunk back to their initial preferred sizes from |
---|
202 | the time they were last managed. When the table is shrunk further, all |
---|
203 | children are shrunk an equal number of pixels until they are of size 1 |
---|
204 | (the smallest legal size of a Widget). |
---|
205 | By default, this resource is \fBTrue\fP. |
---|
206 | Older versions of XmpTable did not provide this feature, and so setting |
---|
207 | this resource \fBFalse\fP will give the old behavior, which the author |
---|
208 | found obnoxious. |
---|
209 | .IP "\fBXtNcolumnSpacing\fP" |
---|
210 | Specifies the number of pixels between columns. |
---|
211 | .IP "\fBXtNrowSpacing\fP" |
---|
212 | Specifies the number of pixels between rows. |
---|
213 | .sp 1 |
---|
214 | .SS "Inherited Resources" |
---|
215 | .I XmpTable |
---|
216 | inherits behavior and resources from the following |
---|
217 | superclasses. For a complete description of each resource, refer to the |
---|
218 | man page for that superclass. |
---|
219 | .nf |
---|
220 | |
---|
221 | XmBulletinBoard Resource Set |
---|
222 | Name Class Type Default Access |
---|
223 | |
---|
224 | XmNallowOverlap XmCAllowOverlap Boolean True CSG |
---|
225 | XmNautoUnmanage XmCAutoUnmanage Boolean True CG |
---|
226 | XmNbuttonFontList XmCButtonFontList XmFontList dynamic CSG |
---|
227 | XmNcancelButton XmCWidget Window NULL SG |
---|
228 | XmNdefaultButton XmCWidget Window NULL SG |
---|
229 | XmNdefaultPosition XmCDefaultPosition Boolean True CSG |
---|
230 | XmNdialogStyle XmCDialogStyle unsigned char dynamic CSG |
---|
231 | XmNdialogTitle XmCDialogTitle XmString NULL CSG |
---|
232 | XmNfocusCallback XmCCallback XtCallbackList NULL C |
---|
233 | XmNlabelFontList XmCLabelFontList XmFontList dynamic CSG |
---|
234 | XmNmapCallback XmCCallback XtCallbackList NULL C |
---|
235 | XmNmarginHeight XmCMarginHeight Dimension 10 CSG |
---|
236 | XmNmarginWidth XmCMarginWidth Dimension 10 CSG |
---|
237 | XmNnoResize XmCNoResize Boolean False CSG |
---|
238 | XmNresizePolicy XmCResizePolicy unsigned char XmRESIZE_ANY CSG |
---|
239 | XmNshadowType XmCShadowType unsigned char XmSHADOW_OUT CSG |
---|
240 | XmNtextFontList XmCTextFontList XmFontList dynamic CSG |
---|
241 | XmNtextTranslations XmCTranslations XtTranslations NULL C |
---|
242 | XmNunmapCallback XmCCallback XtCallbackList NULL C |
---|
243 | .fi |
---|
244 | .nf |
---|
245 | |
---|
246 | XmManager Resource Set |
---|
247 | Name Class Type Default Access |
---|
248 | |
---|
249 | XmNbottomShadowColor XmCBottomShadowColor Pixel dynamic CSG |
---|
250 | XmNbottomShadowPixmap XmCBottomShadowPixmap Pixmap XmUNSPECIFIED_PIXMAP CSG |
---|
251 | XmNforeground XmCForeground Pixel dynamic CSG |
---|
252 | XmNhelpCallback XmCCallback XtCallbackList NULL C |
---|
253 | XmNhighlightColor XmCHighlightColor Pixel dynamic CSG |
---|
254 | XmNhighlightPixmap XmCHighlightPixmap Pixmap dynamic CSG |
---|
255 | XmNnavigationType XmCNavigationType XmNavigationType XmTAB_GROUP CSG |
---|
256 | XmNshadowThickness XmCShadowThickness Dimension dynamic CSG |
---|
257 | XmNstringDirection XmCStringDirection XmStringDirection dynamic CG |
---|
258 | XmNtopShadowColor XmCBackgroundTopShadowColor Pixel dynamic CSG |
---|
259 | XmNtopShadowPixmap XmCTopShadowPixmap Pixmap dynamic CSG |
---|
260 | XmNtraversalOn XmCTraversalOn Boolean True CSG |
---|
261 | XmNuserData XmCUserData Pointer NULL CSG |
---|
262 | .fi |
---|
263 | .nf |
---|
264 | |
---|
265 | Composite Resource Set |
---|
266 | Name Class Type Default Access |
---|
267 | |
---|
268 | XmNchildren XmCReadOnly WidgetList NULL G |
---|
269 | XmNinsertPosition XmCInsertPosition (*)() NULL CSG |
---|
270 | XmNnumChildren XmCReadOnly Cardinal 0 G |
---|
271 | .fi |
---|
272 | .nf |
---|
273 | |
---|
274 | Core Resource Set |
---|
275 | Name Class Type Default Access |
---|
276 | |
---|
277 | XmNaccelerators XmCAccelerators XtAccelerators NULL CSG |
---|
278 | XmNancestorSensitive XmCSensitive Boolean dynamic G |
---|
279 | XmNbackground XmCBackground Pixel dynamic CSG |
---|
280 | XmNbackgroundPixmap XmCPixmap Pixmap XmUNSPECIFIED_PIXMAP CSG |
---|
281 | XmNborderColor XmCBorderColor Pixel XtDefaultForeground CSG |
---|
282 | XmNborderPixmap XmCPixmap Pixmap XmUNSPECIFIED_PIXMAP CSG |
---|
283 | XmNborderWidth XmCBorderWidth Dimension 0 CSG |
---|
284 | XmNcolormap XmCColormap Colormap dynamic CG |
---|
285 | XmNdepth XmCDepth int dynamic CG |
---|
286 | XmNdestroyCallback XmCCallback XtCallbackList NULL C |
---|
287 | XmNheight XmCHeight Dimension dynamic CSG |
---|
288 | XmNmappedWhenManaged XmCMappedWhenManaged Boolean True CSG |
---|
289 | XmNscreen XmCScreen Screen* dynamic CG |
---|
290 | XmNsensitive XmCSensitive Boolean True CSG |
---|
291 | XmNtranslations XmCTranslations XtTranslations NULL CSG |
---|
292 | XmNwidth XmCWidth Dimension dynamic CSG |
---|
293 | XmNx XmCPosition Position 0 CSG |
---|
294 | XmNy XmCPosition Position 0 CSG |
---|
295 | .fi |
---|
296 | .SH SUPPORT PROCEDURES |
---|
297 | .LP |
---|
298 | .I XmpTable |
---|
299 | provides the following procedures and functions which can be used |
---|
300 | to create and manipulate |
---|
301 | .I XmpTables |
---|
302 | and the children of |
---|
303 | .I XmpTables: |
---|
304 | .nf |
---|
305 | .ft B |
---|
306 | |
---|
307 | XmpTableLoc XmpTableLocParse( char* layout ); |
---|
308 | void XmpTableLocFree( XmpTableLoc toFree ); |
---|
309 | XmpTableOpts XmpTableOptsParse( char* options ); |
---|
310 | void XmpTableChildPosition( Widget child, int col, int row ); |
---|
311 | void XmpTableChildResize( Widget child, int col_span, int row_span ); |
---|
312 | void XmpTableChildOptions( Widget child, XmpTableOpts opts ); |
---|
313 | void XmpTableChildConfig( Widget child, |
---|
314 | int col, int row, int col_span, int row_span, |
---|
315 | XmpTableOpts opts ); |
---|
316 | Widget XmpCreateTable( Widget, char*, ArgList, Cardinal ); |
---|
317 | Widget XmpCreateTableDialog( Widget, char*, ArgList, Cardinal ); |
---|
318 | Widget XmpCreateTableTransient( Widget, char*, ArgList, Cardinal ); |
---|
319 | .ft R |
---|
320 | .fi |
---|
321 | .LP |
---|
322 | Each of these routines can also be invoked from resource files, as the |
---|
323 | .B Xmp |
---|
324 | library procedure |
---|
325 | .B XmpRegisterMotif() |
---|
326 | registers the names of each of these procedures as both actions and |
---|
327 | callbacks with the |
---|
328 | .B Wcl |
---|
329 | string-to-callback converter and with the \fBXt Translation Manager\fP. |
---|
330 | These routines are discussed in more detail below. |
---|
331 | .IP "XmpTableLoc XmpTableLocParse( char* layout );" |
---|
332 | This function takes a string which specifies a layout resource for and |
---|
333 | .I XmpTable |
---|
334 | widget and returns an |
---|
335 | .B XmpTableLoc, |
---|
336 | a pointer to an opaque type, which can then passed to |
---|
337 | .B XtCreateWidget(), |
---|
338 | any of the |
---|
339 | .B XmpCreateTable |
---|
340 | constructors, or to |
---|
341 | .B XtSetValues(). The |
---|
342 | .I XmpTable |
---|
343 | copies the storage, and so the |
---|
344 | .B XmpTableLoc |
---|
345 | storage must be released by the client when no longer needed (often |
---|
346 | immediately after use) by passing the |
---|
347 | .B XmpTableLoc |
---|
348 | to |
---|
349 | .B XmpTableLocFree(). |
---|
350 | .IP "void XmpTableLocFree( XmpTableLoc toFree );" |
---|
351 | This procedure releases the storage pointed to by the |
---|
352 | .B XmpTableLoc |
---|
353 | opaque pointer. |
---|
354 | .IP "XmpTableOpts XmpTableOptsParse( char* options );" |
---|
355 | This function parses the options specifier string into an |
---|
356 | .B XmpTableOpts |
---|
357 | which can then be passed to .B XtCreateWidget(), |
---|
358 | any of the |
---|
359 | .B XmpCreateTable |
---|
360 | constructors, or to |
---|
361 | .B XtSetValues(). |
---|
362 | .B XmpTableOpts |
---|
363 | is typedef'd to a standard machine data type (currently an int), |
---|
364 | and so does not need to be free'd. |
---|
365 | .IP "void XmpTableChildPosition( Widget child, int col, int row );" |
---|
366 | This procedure allows a child of an |
---|
367 | .I XmpTable |
---|
368 | widget to be moved to a different cell. If the child spans multiple |
---|
369 | columns and/or rows, the column and row indicates the upper left corner |
---|
370 | of the child widget. The defaultLayout resource of the |
---|
371 | .I XmpTable |
---|
372 | is actually changed by this procedure, so the new location of the child |
---|
373 | will be remembered even if the child is unmanaged and re-managed. The |
---|
374 | layout of the |
---|
375 | .I XmpTable |
---|
376 | is recomputed, which means all issues involved in the positioning and |
---|
377 | sizes of all children of the |
---|
378 | .I XmpTable |
---|
379 | are also re-analyzed. For example, if the child widget has the option |
---|
380 | \fBW\fP specified, then the column to which the child widget is moved will |
---|
381 | then be prevented from becoming wider, and the column from which the |
---|
382 | child widget came may be enabled to be made wider. |
---|
383 | .IP "void XmpTableChildResize( Widget, int col_span, int row_span );" |
---|
384 | This procedure allows a child of an |
---|
385 | .I XmpTable |
---|
386 | widget to be resized so the child spans a different number of columns |
---|
387 | or rows. Again, the layout of the |
---|
388 | .I XmpTable |
---|
389 | is recomputed, which means all issues involved in the positioning and |
---|
390 | sizes of all children of the |
---|
391 | .I XmpTable |
---|
392 | are re-analyzed. For example, if the child widget has the option |
---|
393 | \fBW\fP specified, then all of the columns which the child widget spans |
---|
394 | will be prevented from becoming wider. |
---|
395 | .IP "void XmpTableChildOptions( Widget child, XmpTableOpts opts );" |
---|
396 | This procedure allows a child of an |
---|
397 | .I XmpTable |
---|
398 | widget to have its layout options changed. Again, the layout of the |
---|
399 | .I XmpTable |
---|
400 | is recomputed, which means all issues involved in the positioning and |
---|
401 | sizes of all children of the |
---|
402 | .I XmpTable |
---|
403 | are re-analyzed. For example, if the child widget has the option |
---|
404 | \fBW\fP specified, then all of the columns which the child widget spans |
---|
405 | will be prevented from becoming wider. |
---|
406 | .LP |
---|
407 | .nf |
---|
408 | void XmpTableChildConfig( Widget child, |
---|
409 | int col, int row, |
---|
410 | int col_span, int row_span, |
---|
411 | XmpTableOpts opts ); |
---|
412 | .fi |
---|
413 | .IP |
---|
414 | This procedure allows a child of an |
---|
415 | .I XmpTable |
---|
416 | widget to have all of its layout specifications changed at once. |
---|
417 | .IP "Widget XmpCreateTable( Widget, char*, ArgList, Cardinal );" |
---|
418 | This function creates a new |
---|
419 | .I XmpTable |
---|
420 | widget. The \fIWidget\fP argument specifies the parent widget ID, the |
---|
421 | \fIchar*\fP argument specifies the name of the created widget, the |
---|
422 | \fIArgList\fP argument specifies the argument list, and the |
---|
423 | \fICardinal\fP argument specifies the number of attribute/value pairs |
---|
424 | in the argument list. |
---|
425 | .IP "Widget XmpCreateTableDialog(Widget,char*,ArgList,Cardinal);" |
---|
426 | This function creates a new |
---|
427 | .I XmpTable |
---|
428 | widget as a child of a new |
---|
429 | .I XmDialogShell. |
---|
430 | The name of the new |
---|
431 | .I XmDialogShell |
---|
432 | has the same name as the new |
---|
433 | .I XmpTable |
---|
434 | but with the characters "_popup" concatenated to the end. The |
---|
435 | \fIWidget\fP argument specifies the parent widget ID, the \fIchar*\fP |
---|
436 | argument specifies the name of the created \fIXmpTable\fP widget, the |
---|
437 | \fIArgList\fP argument specifies the argument list, and the |
---|
438 | \fICardinal\fP argument specifies the number of attribute/value pairs |
---|
439 | in the argument list. |
---|
440 | .IP "Widget XmpCreateTableTransient(Widget,char*,ArgList,Cardinal);" |
---|
441 | This is almost identical to \fIXmpCreateTableDialog()\fP except the |
---|
442 | shell widget is an \fIXtTransientShell\fP, with the \fIXtNtransientFor\fP |
---|
443 | resource set if it is available (after R4) and the related bug |
---|
444 | is fixed (still broken in early releases of R5). |
---|
445 | .SH TRANSLATIONS |
---|
446 | .LP |
---|
447 | .I XmpTable |
---|
448 | inherits translations from |
---|
449 | .B XmBulletinBoard. |
---|
450 | .SH ACTIONS AND CALLBACKS |
---|
451 | .LP |
---|
452 | The Xmp library provides the following callbacks and actions |
---|
453 | for manipulating children of |
---|
454 | XmpTable widgets: |
---|
455 | .LP |
---|
456 | .nf |
---|
457 | .ft B |
---|
458 | XmpTableChildConfig( widget col row [h_span [v_span [opts]]] ) |
---|
459 | XmpTableChildPosition( widget col row ) |
---|
460 | XmpTableChildResize( widget h_span v_span ) |
---|
461 | XmpTableChildOptions( widget options ) |
---|
462 | .ft R |
---|
463 | .fi |
---|
464 | .LP |
---|
465 | Each callback procedure can also be named in resource files as |
---|
466 | the name of the procedure followed by CB: i.e, XmpTableChildConfig() |
---|
467 | can also be invoked as a callback by giving the name XmpTableChildConfigCB() |
---|
468 | for a callback resource value. Also, each action procedure can also |
---|
469 | be named by appending ACT to the procedure name. Normally, I just use the |
---|
470 | procedure name, so it is less trouble to change behavior from callbacks |
---|
471 | to actions triggered by translations or accelerators, and vice versa. |
---|
472 | The CB and ACT endings are maintained for backward compatibility, and |
---|
473 | because some people like to be more explicit. It is all a matter of taste. |
---|
474 | .LP |
---|
475 | Arguments to the procedures are provided as strings, the characters |
---|
476 | between the parenthesis following the procedure name. If no parenthesis |
---|
477 | follow the procedure name, then a NULL string is passed to the procedure. |
---|
478 | Some procedures require arguments, some provide reasonable defaults when |
---|
479 | no arguments are given. For example: |
---|
480 | .RS |
---|
481 | .LP |
---|
482 | .nf |
---|
483 | *foo.activateCallback: XmpTableChildPosition( this 2 4 ) |
---|
484 | .fi |
---|
485 | .RE |
---|
486 | .LP |
---|
487 | Each |
---|
488 | .I XmpTable |
---|
489 | callback and action procedure is discussed in detail below. |
---|
490 | .IP "XmpTableChildConfig( w col row [h_span [v_span [opts]]] )" |
---|
491 | This allows a child of an XmpTable to be moved to a new row or |
---|
492 | column, to be given a different horizontal or vertical span, and |
---|
493 | to change the justification and re-size options of the child. |
---|
494 | .IP "XmpTableChildPosition( w col row )" |
---|
495 | This allows a child of an XmpTable to be moved to a new row or |
---|
496 | column. |
---|
497 | .IP "XmpTableChildResize( w h_span v_span )" |
---|
498 | This allows a child of an XmpTable to be given a different horizontal |
---|
499 | or vertical span. |
---|
500 | .IP "XmpTableChildOptions( w options )" |
---|
501 | This allows a child of an XmpTable to be given new |
---|
502 | justification and re-size options. |
---|
503 | .SH "SEE ALSO" |
---|
504 | Xmp (3), Mri (1), Wcl (3), X (1), Core (3X), Composite (3X), |
---|
505 | Constraint (3X), XmBulletinBoard (3X). |
---|
506 | .SH BUGS |
---|
507 | .LP |
---|
508 | Sometimes, semi-intersecting sameWidth and sameHeight name lists |
---|
509 | do not work correctly during resizing. |
---|
510 | .SH AUTHORS |
---|
511 | David E. Smyth (David.Smyth@sniap.mchp.sni.de) at Siemens Nixdorf |
---|
512 | Informationssysteme AG, Munich Germany. The original Table widget |
---|
513 | on which the external interface and many concepts of the |
---|
514 | .I XmpTable |
---|
515 | were derived was written by David Harrison in 1989 while he was |
---|
516 | at the University of California, Berkeley. |
---|