3f9d51887e8bfe8791c04938631076ae32e393e8
[framework/uifw/xorg/lib/libxaw.git] / specs / CH6.xml
1 <chapter id="composite_and_constraint_widgets">
2 <title>"Composite and Constraint Widgets</title>
3 <para>
4 These widgets may contain arbitrary widget children.  They implement a
5 policy for the size and location of their children.
6 </para>
7 <para>
8 <variablelist>
9   <varlistentry>
10     <term>Box</term>
11     <listitem>
12       <para>
13 This widget will pack its children as tightly as possible in non-overlapping rows.
14       </para>
15     </listitem>
16   </varlistentry>
17   <varlistentry>
18     <term>Dialog</term>
19     <listitem>
20       <para>
21 An implementation of a commonly used interaction semantic to prompt for
22 auxiliary input from the user, such as a filename.
23       </para>
24     </listitem>
25   </varlistentry>
26   <varlistentry>
27     <term>Form</term>
28     <listitem>
29       <para>
30 A more sophisticated layout widget that allows the children to specify
31 their positions relative to the other children, or to the edges of the Form.
32       </para>
33     </listitem>
34   </varlistentry>
35   <varlistentry>
36     <term>Paned</term>
37     <listitem>
38       <para>
39 Allows children to be tiled vertically or horizontally.  Controls are
40 also provided to allow the user to dynamically resize the individual panes.
41       </para>
42     </listitem>
43   </varlistentry>
44   <varlistentry>
45     <term>Porthole</term>
46     <listitem>
47       <para>
48 Allows viewing of a managed child which is as large as, or larger than its
49 parent, typically under control of a Panner widget.
50       </para>
51     </listitem>
52   </varlistentry>
53   <varlistentry>
54     <term>Tree</term>
55     <listitem>
56       <para>
57 Provides geometry management of widgets arranged in a directed, acyclic graph.
58       </para>
59     </listitem>
60   </varlistentry>
61   <varlistentry>
62     <term>Viewport</term>
63     <listitem>
64       <para>
65 Consists of a frame, one or two scrollbars, and an inner window.  The
66 inner window can contain all the data that is to be displayed.  This inner
67 window will be clipped by the frame with the scrollbars controlling
68 which section of the inner window is currently visible.
69       </para>
70     </listitem>
71   </varlistentry>
72 </variablelist>
73 </para>
74 <note>
75 <para>
76 <!-- .LP -->
77 The geometry management semantics provided by the X Toolkit give full
78 control of the size and position of a widget to the parent of that
79 widget.  While the children are allowed to request a certain size or
80 location, it is the parent who makes the final decision.  Many of the
81 composite widgets here will deny any geometry request from their
82 children by default.  If a child widget is not getting the expected size
83 or location, it is most likely the parent disallowing a request, or
84 implementing semantics slightly different than those expected by the
85 application programmer.
86 </para>
87 <para>
88 <!-- .LP -->
89 If the application wishes to change the size or location of
90 any widget it should make a call to <function>XtSetValues</function>.  This will
91 <!-- .IN "XtSetValues" "" -->
92 allow the widget to ask its parent for the new size or location.
93 As noted above the parent is allowed to refuse this request,
94 and the child must live with the result.  If the
95 application is unable to achieve the desired semantics, then perhaps it
96 should use a different composite widget.  Under no circumstances
97 should an application programmer resort to <function>XtMoveWidget</function> or
98 <!-- .IN "XtMoveWidget" "" -->
99 <function>XtResizeWidget</function>; these functions are exclusively for the use of
100 <!-- .IN "XtResizeWidget" "" -->
101 Composite widget implementors.
102 </para>
103 <para>
104 <!-- .LP -->
105 For more information on geometry management consult the <emphasis remap='I'>X Toolkit Intrinsics - C Language Interface</emphasis>.
106 </para>
107 </note>
108
109 <xi:include xmlns:xi="http://www.w3.org/2001/XInclude"  href="Box.xml"/>
110 <xi:include xmlns:xi="http://www.w3.org/2001/XInclude"  href="Dialog.xml"/>
111 <xi:include xmlns:xi="http://www.w3.org/2001/XInclude"  href="Form.xml"/>
112 <xi:include xmlns:xi="http://www.w3.org/2001/XInclude"  href="Paned.xml"/>
113 <xi:include xmlns:xi="http://www.w3.org/2001/XInclude"  href="Porthole.xml"/>
114 <xi:include xmlns:xi="http://www.w3.org/2001/XInclude"  href="Tree.xml"/>
115 <xi:include xmlns:xi="http://www.w3.org/2001/XInclude"  href="Viewport.xml"/>
116
117 </chapter>