Index: doc/developer/dad/widgets.html =================================================================== --- doc/developer/dad/widgets.html (revision 21010) +++ doc/developer/dad/widgets.html (revision 21011) @@ -44,7 +44,7 @@
The user can choose one value out of an ordered list of strings. The list is passed as a NULL terminalte char * array. The value -of the enum is an integer index into that array. +of the enum is an integer index into that array, 0 being the first string.
Typical GUI implementation is a combo box, without text editing. @@ -64,7 +64,7 @@
-Ask for a double precision floating point value, between a minval +Ask for a REAL (double precision floating point value), between a minval and a maxval.
Typical GUI implementation is a text entry, often upgraded with small buttons @@ -87,12 +87,53 @@ The value is a dynamically allocated string.
+A push button the user can click on. text is not allocated or copied +(shall be a static const string or allocated/free'd by the user). +
+There is no value, the only interface is the change callback. + +
+Present a progress bar which is not an user input. value is a +REAL value between 0.0 and 1.0. When the code changes the value, the +GUI makes sure the dialog box is drawn and flushed, because typical use +is in a busy loop calculation. +
+Present a tree-table with cols columns of text objects. When +first_col_is_tree is 1, the first column works as a tree, with +indentation and/or tree graphics and logics for collapsing/expanding subtrees. +If opt_header is not NULL, it is a NULL terminated static const +array of header strings describing the table header to be displayed, in as +many strings as cols specified. +
+A special cases: +
+
case | parameters + |
---|---|
plain flat list | cols=1, first_col_is_tree=0 + |
tree-only | cols=1, first_col_is_tree=1 + |
table-only | cols>1, first_col_is_tree=0 + |
+Manipulating the data and the view are both done using + special tree-table macros. +
+Present a drawing area with callbacks to the host code to handle drawing: +
argument | meaning + |
---|---|
expose_cb | called when (parts of) the preview needs to be redrawn + |
mouse_cb | called on mouse events + |
free_cb | called before the widget is destroyed + |
initial_view_box | set the initial zoom/pan to match the view box specified in drawing units + |
user_ctx | opaque pointer that is passed to every callback + |
+Arrange children widgets in a horizontal or vertical row. +
+Expect exactly two child widgets. Arrange them horizontally, with +a widget in between them that allows the user to change the space allocation +between the sides. +
+Expect exactly two child widgets. Arrange them vertically, with +a widget in between them that allows the user to change the space allocation +between the sides. +
+Place children widgets in a table with cols columns. Widgets are +placed by filling up rows first. If there are not enough widget to finish +the last row, rightmost columns are left empty. +
+The table is homogenous, which means the cell size is the same for all cells +and is either determined by the size of the smallest cell content or if +the table fills in a larger widget space than its minimal size, then cell +space is evenly distributed. +
+Creates a "tabbed notebook": each child widget ends up on a new +page, there is only one page shown at a time and there is a GUI way +to switch page (the tab). The list of tab names is passed as tabs, +as a NULL terminalte char * array. The number of tab names must match +the number of children widgets. The value +of is an integer index into that array, 0 being the first tab. +