Index: trunk/doc/developer/dad/widgets.html =================================================================== --- trunk/doc/developer/dad/widgets.html (revision 21019) +++ trunk/doc/developer/dad/widgets.html (revision 21020) @@ -146,7 +146,21 @@
+hbox, vbox and table share a few common compflags, that are defined in +hid_attrib.h, pcb_hatt_compflags_t. The explanation of what each flag does +can be found there. The most commonly used ones are PCB_HATF_FRAME, +PCB_HATF_SCROLL, PCB_HATF_EXPFILL. +
+If PCB_HATF_EXPFILL is set, the given box tries to expannd and fill, using +up all available space in its parent widget. If multiple sibling boxes +have this flag set the behaviour is unspecified; some HIDs may prefer +to grow only one box, others may evenly distribute the avaialble space +among boxes. If this flag is not set, the box uses only as much space +as its children widgets require. +
Arrange children widgets in a horizontal or vertical row. @@ -182,8 +196,16 @@ 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. +
+If compflag includes PCB_HATF_HIDE_TABLAB, the tab graphics are hidden - +no tab labels printed and the user can not click to switch tab. This is +useful for dialog boxes where the code needs to present different tabs +using the same screen estate. +
+If compflag PCB_HATF_LEFT_TAB is set, tab labels are presented in a vertical +row on the left side of the widget. This is useful if there are a lot of +tabs with short names. -
Create a new widget by duplicating an existing one. attr is the @@ -192,5 +214,18 @@
+The raw macro call is PCB_DAD_SET_VALUE, which can change (overwrite) a named +field of the current (last created) widget. The following table lists high +level macros that usually call PCB_DAD_SET_VALUE on a specific field. +
+
name | description + |
---|---|
PCB_DAD_COMPFLAG(table, val) | set all compflags + |
PCB_DAD_MINVAL(table, val) | change the minimal value for numeric input + |
PCB_DAD_MAXVAL(table, val) | change the maximal value for numeric input + |
PCB_DAD_DEFAULT(table, val) | set the default (initial) value + |
PCB_DAD_MINMAX(table, min, max) | hange both the minimal and the maximal value for numeric input + |
PCB_DAD_CHANGE_CB(table, cb) | cb is a function that shall be called upon any change to the widget value + |
PCB_DAD_HELP(table, val) | set the help text (typically presented as a tooltip) + |