12.07.2015 Views

Athena Widget Set - C Language Interface - X Consortium ... - X.Org

Athena Widget Set - C Language Interface - X Consortium ... - X.Org

Athena Widget Set - C Language Interface - X Consortium ... - X.Org

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Composite and Constraint<strong>Widget</strong>sLayout SemanticsExampleThe Dialog widget uses two different sets of layout seman- tics. One is used wheninitially laying out the children. The other is used when the Dialog is resized.The first layout method uses the fromVert mand fromHoriz resources to place thechildren of the Dialog. A single pass is made through the Dialog widget's childrenin the order that they were created. Each child is then placed in the Dialog widgetbelow or to the right of the widget speci- fied by the fromVert mand fromHorizmresources. The distance the new child is placed from its left or upper neighboris determined by the horizDistance mand vertDistance mresources. This impliessome things about how the order of creation affects the possible placement of thechildren. The Form widget registers a string to widget converter which does notpostpone conversion and does not cache conversion results.The second layout method is used when the Dialog is resized. It does not matterwhat causes this resize, and it is possi- ble for a resize to happen before the widgetbecomes visible (due to constraints imposed by the parent of the Dialog). This layoutmethod uses the bottom , top , left , and right resources. These resources are usedto determine what will happen to each edge of the child when the Dialog is resized. Ifa value of XawChain is specified, the the edge of the child will remaina fixed distance from the chain edge of the Dialog. For example if XawChainLeftmis specified for the right mresource of a child then the right edge of that childwill remain a fixed distance from the left edge of the Dialog widget. If a value ofXawRubber mis spec- ified, that edge will grow by the same percentage that theDialog grew. For instance if the Dialog grows by 50% the left edge of the child (ifspecified as XawRubber mwill be 50% farther from the left edge of the Dialog). Onemust be very careful when specifying these resources, for when they are specifiedincorrectly children may overlap or completely occlude other children when theDialog widget is resized.Edge Type Resource Name DescriptionXawChainBottom ChainBottom Edge remains afixed distance frombottom of DialogXawChainLeft ChainLeft Edge remains a fixed distancefrom left of DialogXawChainRight ChainRight Edge remains a fixed distancefrom right of DialogXawChainTop ChainTop Edge remains a fixed distancefrom top of DialogXawRubber Rubber Edges will move a proportionaldistanceIf you wish to force the Dialog to never resize one or more of its children then setleft and right to XawChainLeft and top and bottom to XawChainTop. This willcause the child to remain a fixed distance from the top and left edges of the Dialog,and to never resize.106

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!