.TH ControlArea 3w "19 July 91" "Version 3.0" "OLIT Widget Set" .SH "NAME" ControlArea \- control area widget .SH "SYNOPSIS" . \" phony BP macro for PostScript using -mex's CP . \" . \" made changes to: . \" 1) prevent $2 vertical space needed from forcing a page break . \" this is necessary because large apparent offsets are used . \" when invoking the macro eg, .BP ATT_PS_file 6i -1i . \" This is necessary to get the ATT PS figures onto the page, . \" Following the .BP macro, there is a .sp -3.5i to move back . \" up the page. A page break happens if the test is performed. . \" So I fiddled it. . \" . \" removed test that forces page break . \" .if (\\n(tYu-\\$8+1v)>(\\n(.tu-\\nz) \{ . \" . \" added $8 to do a .sp -$8 back/upward space . \" . \" move ^B bottom-of-page-trap off page temporarily . \" to print diagram, then restore it . \" 1a) Sept 90 renamed to .CP . \" . \" . \" 2) added other -mex functions . \" .FN - figure numbers . \" .TN - table numbers . \" .IX - index macro . \" . \" . \" 3) added .TH from mansun to get header name right . \" . \" 4) added J series macros . \" JL bold if nroff, listing if troff . \" JR roman font . \" JS = JL . \" JE = JR . \" . \" . \" . \" obsoleted by putting them in a tbl with no box . \" 5a) added nr Ji - indent for args in function prototypes . \" 5b) JF macro to align args to function prototypes . \" \\$1 = type . \" \\$2 = name . \" \\$3 = allow enough space for a string this long . \" if \\n(Jf string variable is defined, it will . \" be used if $3 is not present . \" . \" 6) Jq macro to put a box around items at the beginning . \" of an X resource in the widgets . \" syntax: .Jq \fIclass\fP:XtCAlignment \ . \" \fItype\fP:OlDefine \fIdefault\fP:OL_CENTER \fIaccess\fP:SGI . \" . \" uses nr jq . \" . \" . \" . \" .de Jo .mk jo \\$1\h'2.0i-\w'\\$1'u'\ \\$2\h'1.5i-\w'\\$2'u'\ \\$3\h'1.5i-\w'\\$3'u'\\$4 .sp -.5 .nf .\" original - for reference .\"\h'-.5n'\L'|\\nzu-1'\l'\\n(.lu+1n\(ul'\L'-|\\nzu+1'\l'|0u-.5n\(ul' \h'-.5n'\L'|\\n(jou-1'\l'\\n(.lu-1.25i+1n\(ul'\L'-|\\n(jou+1'\l'|0u-.5n\(ul' .fi .. .de Jp .mk jp \\fI\\$1\\fP:\0\\fL\\$2\\fP\h'1.5i-\w'\\fL\\$2\\fP'u'\ \\fI\\$3\\fP:\0\\fL\\$4\\fP\h'1.25i-\w'\\fL\\$4\\fP'u'\ \\fI\\$5\\fP:\0\\fL\\$6\\fP\h'1.0i-\w'\\fL\\$6\\fP'u'\ \\fI\\$7\\fP:\0\\fL\\$8\\fP\h'1.0i-\w'\\fL\\$8\\fP'u' .sp -.5 .nf \h'-.5n'\L'|\\n(jpu-1'\l'\\n(.lu-1.25i+1n\(ul'\L'-|\\n(jpu+1'\l'|0u-.5n\(ul' .fi .. .de Jp .mk jq \\fIclass\\fP:\0\\&\\fL\\$1\\fP\h'1.5i-\w'\\fL\\$1\\fP'u'\ \\fItype\\fP:\0\\&\\fL\\$2\\fP\h'1.25i-\w'\\fL\\$2\\fP'u'\ \\fIdefault\\fP:\0\\&\\fL\\$3\\fP\h'1.0i-\w'\\fL\\$3\\fP'u'\ \h'|5i'\\fIaccess\\fP:\0\\&\\fL\\$4\\fP\h'1.0i-\w'\\fL\\$4\\fP'u' .sp -.5 .nf \h'-.5n'\L'|\\n(jqu-1'\l'\\n(.lu-1.25i+1n\(ul'\L'-|\\n(jqu+1'\l'|0u-.5n\(ul' .fi .. .de Jq .if n class: \\$1\\t\tt\ttype: \\$2 .if n .br .if n default: \\$3\\t\tt\taccess: \\$4 .if t \{\ .nr jw \w'\\fL\\$1\\fP' .nr jw \\n(jw+\w'\\fL\\$2\\fP' .nr jw \\n(jw+\w'\\fL\\$3\\fP' .br .mk jq .ie \\n(jw>1300 \{\ \\fIclass\\fP:\|\\&\\fL\\$1\0\fItype\\fP:\|\\&\\fL\\$2\0\ \\fIdefault\\fP:\|\\&\\fL\\$3\\fP\ \h'|4.9i'\\fIaccess\\fP:\|\|\\&\\fL\\$4\\fP\h'0.8i-\w'\\fL\\$4\\fP'u'\ \} .el \{\ \\fIclass\\fP:\|\\&\\fL\\$1\\fP\h'1.5i-\w'\\fL\\$1\\fP'u'\ \\fItype\\fP:\|\\&\\fL\\$2\\fP\h'1.25i-\w'\\fL\\$2\\fP'u'\ \\fIdefault\\fP:\|\\&\\fL\\$3\\fP\h'1.0i-\w'\\fL\\$3\\fP'u'\ \h'|5i'\\fIaccess\\fP:\|\\&\\fL\\$4\\fP\h'0.8i-\w'\\fL\\$4\\fP'u'\ \} .sp -.5 .nf \h'-.5n'\L'|\\n(jqu-1'\l'\\n(.lu-1.25i+1n\(ul'\L'-|\\n(jqu+1'\l'|0u-.5n\(ul' .sp -1 \} .fi .. .nr Ji 16 . \" .de JF .ie !"\\$3"" .nr Jf \w'\\$3' .el .nr Jf \w'\\*(Jf' \\$1 \h'.25i+\\n(Jfu-\w'\\$1'u'\\$2 .br .. . \" . \" . \" I - italic font .de I .nr PQ \\n(.f .if t .ft 2 .ie \\$1 .if n .ul 999 .el .if n .ul 1 .if t .if !\\$1 \{\ . ie '\\*(.T'psc' \&\f\\n(PQ\\$3\fI\\$1\f\\n(PQ\\$2 . el \&\f\\n(PQ\\$3\fI\\$1\|\f\\n(PQ\\$2 .\} .if n .if \\n(.$=1 \&\\$1 .if n .if \\n(.$>2 \&\\$3\c .if n .if \\n(.$>1 \&\\$1\c .if n .if \\n(.$>1 \&\\$2 .. . \" B - bold font .de B .nr PQ \\n(.f .if t .ft 3 .ie \\$1 .if n .ul 999 .el .if n .ul 1 .if t .if !\\$1 \&\f\\n(PQ\\$3\fB\\$1\f\\n(PQ\\$2 .if n .if \\n(.$=1 \&\\$1 .if n .if \\n(.$>2 \&\\$3\c .if n .if \\n(.$>1 \&\\$1\c .if n .if \\n(.$>1 \&\\$2 .. . \" R - Roman font .de R .if n .ul 0 .ft 1 .. . \" L - listing font .de L .nr PQ \\n(.f .ie \\$1 .if n .ul 999 .el .if n .ul 1 .if t .if !\\$1 \&\f\\n(PQ\\$3\fL\\$1\f\\n(PQ\\$2 .if n .if \\n(.$=1 \&\\$1 .if n .if \\n(.$>2 \&\\$3\c .if n .if \\n(.$>1 \&\\$1\c .if n .if \\n(.$>1 \&\\$2 .. . \" LB - bold listing font .de LB .nr PQ \\n(.f .ie \\$1 .if n .ul 999 .el .if n .ul 1 .if t .if !\\$1 \&\f\\n(PQ\\$3\f(LB\\$1\f\\n(PQ\\$2 .if n .if \\n(.$=1 \&\\$1 .if n .if \\n(.$>2 \&\\$3\c .if n .if \\n(.$>1 \&\\$1\c .if n .if \\n(.$>1 \&\\$2 .. . \" LX - listing font with index . \" . \" - jl - invented these . \" .de Lx .L "\\$1" "\\$2" "\\$3" .IX "\\$1" "" "\fL\\$1\f1" .. .de Ix .I "\\$1" "\\$2" "\\$3" .IX "\\$1" "" "\fL\\$1\f1" .. .de Bx .I "\\$1" "\\$2" "\\$3" .IX "\\$1" "" "\fL\\$1\f1" .. . \" . \" - jl - invented these . \" .de JL .if t .if \\n(.$=0 .ft L .if t .if \\n(.$>0 .L "\\$1" "\\$2" "\\$3" .if n .if \\n(.$=0 .ft B .if n .if \\n(.$>0 .I "\\$1" "\\$2" "\\$3" .. .de Jx .ie t .Lx "\\$1" "\\$2" "\\$3" .el .Bx "\\$1" "\\$2" "\\$3" .. .de JX .ie t .Lx "\\$1" "\\$2" "\\$3" .el .Bx "\\$1" "\\$2" "\\$3" .. .de JR .ft 1 .. .de JS .JL .nf .. .de JE .JR .fi .. .\" .\" start FN/TN related .\" .\" end FN/TN .\" . \" TF - print TN or FN .de TF .nr TF \\n(.f .nr TX \\n(.s . \" - jl force it to full page, rather than strip out stuff .nr PL 3 .if \\n(PL=1 \{\ . ta \\n(GIu-\\n(GUuR \\n(GIu . ti 0 \&\s11\\*(tS\t\fI\&\\$1\f\\n(TF\\s\\n(TX .\} .if \\n(PL=2 \{\ . ta \\n(LLuR \\n(LLu+\\n(GUu . nf \&\s11\fI\&\\$1\f\\n(TF\t\&\\*(tS\\s\\n(TX . fi .\} .if \\n(PL=3 \{\ . ta 2iR 2.25i . ti 0 \&\s11\0\0\\*(tS\t\fI\&\\$1\f\\n(TF\\s\\n(TX .\} .. . \" TN - table name . \" changed \\n(PN to \\n% .de TN .nr T1 +1 .ll \\n(LLu .ds tH \\$1 . \" - jl only number, not chapter . \".ds tS Table \\n(H1-\\n(T1 .ds tS Table \\n(T1 .if \\nM>1 .ds tS Table \\n(T1 .if !\\n(IK \{\ . if \\n(nlu>\\n(L#u .sp 1v . if \\n(B#>0 .if \\n(B#u>=\\n(nlu .sp |\\n(B#u+2v . nr B# 0 .\} .if \\n(IK \{\ . sp 1v . ie \\n(K# \{\ . sp |\\n(K#u+2v . nr K# 0 \} . el \{\ . if \\n(B#u>=\\n(nlu .sp (\\n(B#u-\\n(nlu+1v)u . nr B# 0 \} .\} .ne 2i .TF "\\*(tH" .if \\nF .if \\n(IK \!.tm .CE T 1 "\\$1" \\\\n% \\n(H1 \\n(T1 .if \\nF .if !\\n(IK .tm .CE T 1 "\\$1" \\n% \\n(H1 \\n(T1 .. . \" TC - table continued (multi-page) .de TC .if !\\n(tC \{\ . as tH \(em Continued . nr tC 1 .\} .TF "\\*(tH" .sp \\n(PDu .. . \" FN - figure name .de FN .nr F1 +1 .ll \\n(LLu . \" - jl only number, not chapter too . \".ds tS Figure \\n(H1-\\n(F1 .ds tS Figure \\n(F1 .if \\nM>1 .ds tS Figure \\n(F1 .sp 1v .TF "\\$1" .if \\nF .if \\n(IK \!.tm .CE F 1 "\\$1" \\\\n% \\n(H1 \\n(F1 .if \\nF .if !\\n(IK .tm .CE F 1 "\\$1" \\n% \\n(H1 \\n(F1 .. .\" .\" start IX index .\" . \" IX - Make an Index Entry . \" $1 and $2: primary and secondary collating terms . \" $3 and $4: primary and secondary printing terms . \" $5 and $6: PAGE specifications or PRINT field . \".de IX . \" - jl PN to % . \".if \\nF .if !\\n(IK .tm .IE\tENTRY\t\\$1\t\\$2\t\\$3\t\\$4\t\\$5\t\\$6\t\\n% . \".if \\nF .if \\n(IK \!.tm .IE\tENTRY\t\\$1\t\\$2\t\\$3\t\\$4\t\\$5\t\\$6\t\\\\n% .. .\" end IX index .\" .\" .\" .\" .ig . \" . \" - jl added from -mansun 0 . # title heading .de TH .PD .DT .nr F1 0 .if n .nr IN .5i .if t .nr IN .5i .ll 7i .nr LL \\n(.l .ds ]H \\$1\|(\|\\$2\|) .ds ]D Misc. Reference Manual Pages . \" added this one - removed the rest .if '\\$2'3W' .ds ]D OPEN LOOK Widgets .if !'\\$4'' .ds ]W \\$4 .if !'\\$5'' .ds ]D \\$5 .ds ]D 3W .wh 0 }H .wh -.8i }F .em }M .if !\\n(nl .if !\\nP .nr P 1 .if !\\n(nl .if \\nP .pn \\nP .if \\nA .if \\nP>=\\nA \{\ . ds PN \\nP . pn 1 . af % a . nr A 0 .\} .if !\\n(nl .if \\nP .nr P 0 .if \\nC .if \\n(nl .bp .if !\\nC .if \\n(nl .bp 1 .ds ]L modified \\$3 .nr ]L \\$3 .if \\n(]L=0 .rm ]L .}E .DT .nr )I .5i .nr )R 1i .mk ka .if !'\\n(ka'-1' .bp .if \\nF .tm .CE MAN-PAGE 1 \\$1(\\$2) \\n% .ev 1 .if n .tl \\*(]W\\*(]D\\*(]H .ev .. . \" careful - only 1 return at bottom .JL .nf #include #include #include #include . . . .br .ds Jf Cardinal .JF Widget "\fImy_controlarea\fP, \fImy_parent\fP;" .JF String \fImy_name\fP; .JF ArgList \fIargs\fP; .JF Cardinal \fInum_args\fP; .fi .I my_controlarea = XtCreate( .I my_name , controlAreaWidgetClass, .br .in \n(Ji .I my_parent , .I args , .I num_args ); .in .JR .fi .SH "DESCRIPTION" .IX "ControlArea" "" \fLControlArea\fP "" PAGE MAJOR .IX "control area" .IX "widget" "control area" .# .# .SS "Components" .IX "components" "ControlArea" "components" "\fLControlArea\fP" .LP The .JL "ControlArea" widget has zero or more Child Widgets and an optional Border. .sp .# .# .SS "Layout Control" .IX "layout control" "ControlArea" "layout control" "\fLControlArea\fP" .LP The .JL "ControlArea" is a composite widget, that presents its child widgets to the end-user as a group of ``controls''. The application can choose one of four simple layout schemes: .IP Fixed number of columns in the control pane, .IP fixed number of rows, .IP fixed overall width of the control area, .IP and fixed overall height. .LP The application can also specify the inter-control spacing and the size of the margin around the children. .# .# .SS "Equal Height Rows" .IX "row height" "ControlArea" "row height" "\fLControlArea\fP" .LP The children in each row align at the top of the row. The distance between the top of one row and the next is the height of the tallest control in the row plus the application specified inter-row spacing. .# .# .# .# .SS "Coloration" .IX "coloration" "ControlArea" "coloration" "\fLControlArea\fP" .LP .XR the diagram \fI@TitleOf(Control_Area_Coloration_fig)\fP illustrates the resources that affect the coloration of the .JL "ControlArea" widget. .FN "Control Area Coloration" Control_Area_Coloration_fig .IX "control area coloration" "" "control area coloration" .CP PSART/ControlArea.color.ps 2.75i .SH "RESOURCES" .TN "ControlArea Resource Set" Control_Area_Resource_Set_tbl .IX "ControlArea resource set" "" "\fControlArea\fP resource set" .nf .nf ControlArea Resource Set Name Type Default Access XtNalignCaptions Boolean FALSE SGI XtNancestorSensitive Boolean TRUE GO XtNbackground Pixel XtDefaultBackground SGI XtNbackgroundPixmap Pixmap (none) SGI XtNborderColor Pixel XtDefaultForeground SGI XtNborderPixmap Pixmap (none) SGI XtNborderWidth Dimension 0 SGI XtNcenter Boolean FALSE SGI XtNconsumeEvent XtCallbackList NULL SG XtNdepth int (parent's) GI XtNdestroyCallback XtCallbackList NULL SI XtNhPad Dimension 4 SGI XtNhSpace Dimension 4 SGI XtNheight Dimension (calculated) SGI XtNlayoutType OlDefine OL_FIXEDROWS SGI XtNmappedWhenManaged Boolean TRUE SGI XtNmeasure int 1 SGI TRAVERSAL XtNnextTop XtCCallback XtCallbackList XtNsameSize OlDefine OL_COLUMNS SGI XtNsensitive Boolean TRUE GIO TRANSPARENT XtNtransparent XtCTransparent Boolean XtNtraversalManager Boolean FALSE SGI XtNuserData XtPointer NULL SGI XtNvPad Dimension 4 SGI XtNvSpace Dimension 4 SGI XtNwidth Dimension (calculated) SGI XtNx Position 0 SGI XtNy Position 0 SGI .fi .br Access: S = XtSetValues G = XtGetValues .br I = init time O = other access .br .br \(dg see .BR resources (3W) .br .SS "XtNalignCaptions" .IX "XtNalignCaptions" "" "\fLXtNalignCaptions\fP" .Jq XtCAlignCaptions Boolean FALSE SGI .HP Action: controls how the .JL "ControlArea" widget aligns caption widgets. .HP Values: .JL "TRUE" , .JL "FALSE" .LP If set to .JL "TRUE" the .JL "ControlArea" will align all .JL "Caption" widgets in each column so that their captions are right justified. This may affect the width calculation for a column. .LP The effective width for the .JL "Caption" widgets in a column becomes the sum of the width of the widest caption, plus the largest caption/child widget separation and child widget width. This alignment is only for groups of .JL "Caption" widgets with all their captions on the left or the right. .LP Mixed orientation, or captions above or below, cannot be aligned well. .LP .FN "Aligning Captions" Aligning_Captions_fig .IX "aligning captions" .CP PSART/Caption.alignment.ps 1.75i .LP If the .Jx "XtNalignCaptions" resource is set to .JL "FALSE" the .JL "ControlArea" will align all .JL "Caption" widgets the same as other widgets\(emby their overall width. This resource takes precedence over the .Jx "XtNcenter" resource, but only for .JL "Caption" widgets. .SS "XtNcenter" .IX "XtNcenter" "" "\fLXtNcenter\fP" .Jq XtCCenter Boolean FALSE SGI .HP Action: controls how the .JL "ControlArea" orients each widget within a column. .HP Values: .JL "TRUE" " \(en" center each widget with each column. .sp .3v .JL "FALSE" " \(en" left justify each widget within each column, unless the .Jx "XtNalignCaptions" resource is .Jx "TRUE" . .HP See Also: .Jx "XtNalignCaptions" . .SS "XtNhPad .IX "XtNhPad" "" "\fLXtNhPad\fP" .Jq XtCHPad Dimension 4 SGI .SS "XtNvPad" .IX "XtNvPad" "" "\fLXtNvPad\fP" .Jq XtCVPad Dimension 4 SGI .HP Action: sets the amount of padding, in pixels, to leave around the edges of the control area. .HP Values: .JL "0 \(<= XtNhPad , 0 \(<= XtNvPad" .LP The caption of this resource is .XR illustrated by the diagram \f2@TitleOf(Padding_Around_Controls_fig)\fP. .br .ne 3i .FN "Padding Around Controls" Padding_Around_Controls_fig .IX "padding around controls" .CP PSART/ControlArea.padding.ps 2.25i .SS "XtNhSpace" .IX "XtNhSpace" "" "\fLXtNhSpace\fP" .Jq XtCHSpace Dimension 4 SGI .SS "XtNvSpace" .IX "XtNvSpace" "" "\fLXtNvSpace\fP" .Jq XtCVSpace Dimension 4 SGI .HP Action: set the amount of space, in pixels, to leave between controls. .HP Values: .JL "0 \(<= XtNhSpace , 0 \(<= XtNvSpace" .LP If the controls are of different sizes in a row or column, the spacing applies to the widest or tallest dimension of all the controls. .FN "Spacing Between Controls" Spacing_Between_Controls_fig .IX "spacing between controls" .CP PSART/ControlArea.spacing.ps 2.25i .SS "XtNlayoutType" .IX "XtNlayoutType" "" "\fLXtNlayoutType\fP" .Jq XtCLayoutType OlDefine OL_FIXEDROWS SGI .HP Action: controls the layout of the child widgets by the .JL "ControlArea" . .HP Values: .JL OL_FIXEDROWS/fixedrows .IX OL_FIXEDROWS if the layout should have a fixed number of rows and enough columns to hold all the controls; .sp .3v .JL OL_FIXEDCOLS/fixedcols .IX OL_FIXEDCOLS if the layout should have a fixed number of columns and enough rows to hold all the controls; .sp .3v .JL OL_FIXEDWIDTH/fixedwidth .IX OL_FIXEDWIDTH if the layout should be of a fixed width but tall enough to hold all the controls; .sp .3v .JL OL_FIXEDHEIGHT/fixedheight .IX OL_FIXEDHEIGHT if the layout should be of a fixed height but wide enough to hold all the controls. .LP The .Jx "XtNmeasure" resource gives the number of rows or columns or the fixed height or width. .LP The choices are to specify the number of rows or columns, or to specify the overall height or width of the layout area. Only one of these dimensions can be specified directly; the other is determined by the number of controls added. .LP For instance, if the application specifies that the control area should have four columns, the number of rows will be the number of controls divided by four. .SS "XtNmeasure" .IX "XtNmeasure" "" "\fLXtNmeasure\fP" .Jq XtCMeasure int 1 SGI .HP Action: gives the number of rows or columns in the layout of the child widgets, or the fixed width or height of the control area. .HP Values: .JL "0 < XtNmeasure" .HP Default: If .Jx "XtNlayoutType" is .Jx OL_FIXEDROWS or .Jx OL_FIXEDCOLS then 1. .sp .3v If .Jx "XtNlayoutType" is .Jx OL_FIXEDWIDTH or .Jx OL_FIXEDHEIGHT then the width or height of widest or tallest widget, depending on .Jx "XtNlayoutType." .LP When .Jx "XtNlayoutType" is .Jx "OL_FIXEDWIDTH" or .Jx "OL_FIXEDHEIGHT" the measure includes the padding on both edges and the inter-control spacing, .XR as suggested by the diagram \f2@TitleOf(XtNmeasure_fig)\fP. .br .ne 2.7i .FN "XtNmeasure" XtNmeasure_fig .IX "XtNmeasure" "" "\fLXtNmeasure\fP" .CP PSART/XtNmeasure.ps 1.75i .SS "XtNsameSize" .IX "XtNsameSize" "" "\fLXtNsameSize\fP" .Jq XtCSameSize OlDefine OL_COLUMNS SGI .HP Action: determines which controls, if any, within the .JL "ControlArea" widget are forced to be the same width .HP Values: .Jx "OL_NONE" The controls are placed in fixed-width columns, but the size of each control is left alone. The width of each column is the width of the widest control in the column. .sp .3v .Jx "OL_COLUMNS" Controls in each column are made the same width as the widest of them. The width of each column is thus the width of the widest control in the column. .sp .3v .Jx "OL_ALL" All controls are made the same width, the width of the widest control in the .JL "ControlArea" widget.