📄 xmform.3
字号:
'\" t.\" $Header: /cvsroot/lesstif/lesstif/doc/lessdox/widgets/XmForm.3,v 1.6 2002/05/15 16:12:01 amai Exp $.\".\" Copyright (C) 1997-1998 Free Software Foundation, Inc..\" .\" This file is part of the GNU LessTif Library..\" This library is free software; you can redistribute it and/or.\" modify it under the terms of the GNU Library General Public.\" License as published by the Free Software Foundation; either.\" version 2 of the License, or (at your option) any later version..\" .\" This library is distributed in the hope that it will be useful,.\" but WITHOUT ANY WARRANTY; without even the implied warranty of.\" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU.\" Library General Public License for more details..\" .\" You should have received a copy of the GNU Library General Public.\" License along with this library; if not, write to the Free.\" Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA..\" .TH XmForm 3 "April 1998" "LessTif Project" "LessTif Manuals".SH NAMEXmForm.SH SYNOPSIS.B #include <Xm/Form.h>.PP.B XmForm.PP.B XmCreateForm.SH DESCRIPTIONXmForm is a widget which allows you to specify complicated geometries.The widget is capable of aligning children widgets with reference to each other.Widgets can be linked to each other's positions,hooked to a fixed place, or hooked to the form's edges.Positioning can be relative as well as absolute..PPThe algorithm used to lay out the children is an iterative one.In development versions of LessTif,the amount of iterations that the widget supports before it wantsto have reached a steady state is 200.OSF/Motif\(rg uses a much higher number than this;if the low number in LessTif gives you trouble(it generates a warning message mentioning "bailout")then either the number is too low or you've discovered a bug..SH X RESOURCES.TStab(;);l l l l l.Name;Class;Type;Default;Access_XmNmarginWidth;XmCMarginWidth;HorizontalDimension;0;CSGXmNmarginHeight;XmCMarginHeight;VerticalDimension;0;CSGXmNhorizontalSpacing;XmCSpacing;HorizontalDimension;0;CSGXmNverticalSpacing;XmCSpacing;VerticalDimension;0;CSGXmNfractionBase;XmCMaxValue;Int;100;CSGXmNrubberPositioning;XmCRubberPositioning;Boolean;False;CSG.TE.PP.BR XmNfractionBaseis the resource that allows you to specify the reference valuerelative to which values for the constraint resource XmNpositionare to be used.The default, 100, allows you to specify e.g. 50 to mean that some widget edgeshould be positioned at 50% of the form's width (or height)..PP.BR XmNrubberPositioningis a boolean which determines the default layoutif some of the constraint resources aren't set for children of XmForm.In the default case (False),children widgets for which the left or top sides haven't been specified,default their attachment to XmATTACH_FORM.This means the children will be in the upper left side of the form.In the other case, the children widgets's left or top attachmentswill default to XmATTACH_SELF..PP.BR XmNmarginWidth.PP.BR XmNmarginHeight.PP.BR XmNhorizontalSpacing.PP.BR XmNverticalSpacing.PP.SH CONSTRAINT RESOURCES.PPThe constraint resources for XmForm allow us to specify the layout ofchildren of the form.These resources should not be set on the form,they should be set on the children.They don't work unless the parent of a widget is an XmForm,they also don't work if the widget is a grandchild of XmForm..PPThe latter is a mistake often made in the case of scrolled widgets.Functions such as XmCreateScrolledText create two (or more) widgets,and return a grandchild of Form if they are called with the form as parent.In such case, constraint resources should be set on the parent of thewidget returned by XmCreateScrolledText (or similar)..PP.TStab(;);l l l l l.Name;Class;Type;Default;Access_XmNtopAttachment;XmCAttachment;unsigned char;dynamic;CSGXmNbottomAttachment;XmCAttachment;unsigned char;dynamic;CSGXmNleftAttachment;XmCAttachment;unsigned char;dynamic;CSGXmNrightAttachment;XmCAttachment;unsigned char;dynamic;CSGXmNtopWidget;XmCWidget;Widget;NULL;CSGXmNbottomWidget;XmCWidget;Widget;NULL;CSGXmNleftWidget;XmCWidget;Widget;NULL;CSGXmNrightWidget;XmCWidget;Widget;NULL;CSGXmNtopPosition;XmCPosition;int;0;CSGXmNbottomPosition;XmCPosition;int;0;CSGXmNleftPosition;XmCPosition;int;0;CSGXmNrightPosition;XmCPosition;int;0;CSGXmNtopOffset;XmCOffset;int;0;CSGXmNbottomOffset;XmCOffset;int;0;CSGXmNleftOffset;XmCOffset;int;0;CSGXmNrightOffset;XmCOffset;int;0;CSGXmNresizable;XmCBoolean;Boolean;True;CSG.TE.PP.BR XmNresizablespecifies whether this widget can resize itself,if the geometry request doesn't conflict with attachments.An example of this is a XmLabel widget which modifies its XmNlabelString,which causes it to try to resize itself.If XmNresizable is set to False in such a case,expensive geometry calculations can be avoided..PP.BR XmNtopAttachmentis the method of attachment for the child's top side.BR XmNtopWidgetis the ID of the widget or gadget that serves as attachment pointfor the top of this child.For this to work, XmNtopAttachment must be set to XmATTACH_WIDGETor to XmATTACH_OPPOSITE_WIDGET..PP.BR XmNtopPositionused in conjunction with XmNfractionBase allows you to calculate theposition of the top of a child widget relative to the top of the Form.This resource only works if XmNtopAttachment has been set to XmATTACH_POSITION.A position can be a negative number,which allows you to position a child widget in a placewhich is either partially or completely invisible.Values larger than the value of XmNfractionBase, or close to it,have similar effect..PP.BR XmNtopOffsetis the distance between the child's top edge and the object it is attached to.This may be the form (XmATTACH_FORM) or another widget (XmATTACH_WIDGET orXmATTACH_OPPOSITE_WIDGET).In the latter case (XmATTACH_OPPOSITE_WIDGET), the offset is relative tothe other widget's top.In the other cases, the offset is relative to the form's top orto the other widget's bottom edge..PPAs with XmNtopPosition,values can be specified which are either negative or large,to position the child widget at a place where it is either partiallyor completely invisible..PP.SH CLASS HIERARCHY.BR Object (3).BR Rect (3).BR UnNamedObj (3).BR Core (3).BR Composite (3).BR Constraint (3).BR XmManager (3).BR XmBulletinBoard (3).BR XmForm (3).SH CALLBACKSXmForm only has callbacks inherited from its superclasses..SH CONVENIENCE FUNCTIONS.SH SEE ALSO
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -