void SetClear(long on)
long GetClear(void)
Set/Get clearing flag. If non-zero, the form will clear
to the widget color during the redraw of the widget.
The default is FALSE since most forms are just used for organization.
void SetMode(long newmode)
long GetMode(void)
Set/Get organizational methodology.
Acceptable values are:
| WDS_FORM_MANUAL |
No automatic placement. Children set their own relative locations.
|
| WDS_FORM_COLUMN |
Children are automatically placed in columns.
|
| WDS_FORM_ROW |
Children are automatically placed in rows.
|
void SetSizing(long dir,long val)
long GetSizing(long dir)
Set/Get how the form determines its size for the specified direction dir.
The sizing technique is independent for the X and Y directions.
Values for dir of WDS_HORIZONTAL and WDS_VERTICAL
address the sizing for the X and Y directions, respectively.
Acceptable values for val are:
| WDS_SIZING_FIXED |
Size can only be change by an explicit size-setting call,
such as SetPrefSize().
|
| WDS_SIZING_MANUAL |
No automatic size changes, but the Resize call can change size.
|
| WDS_SIZING_FIT_CHILDREN |
Automatically resize the form to fit the extent of the children,
up to the limit of the prefered or maximum size.
|
void SetCentering(long set)
long GetCentering(void)
Set/Get centering for children along the X and/or Y axes.
Autosizing in a direction effectively disables centering for that direction.
Acceptable values for set are:
| WDS_FORM_CENTER_NONE |
No centering.
|
| WDS_FORM_CENTER_X |
Horizontal centering.
|
| WDS_FORM_CENTER_Y |
Vertical centering.
|
| WDS_FORM_CENTER_XY |
Centering in both directions.
|
void SetUniformity(long set)
long GetUniformity(void)
Set/Get uniformity for children for the X and/or Y dimensions.
Uniformity tries to force all children to have the same width and/or height.
After a preliminary resize of the children,
a second resize is done using the largest width and/or height
as the min, max, and pref size.
As such, fixed-size children may be able to defeat this action.
Acceptable values for set are:
| WDS_UNIFORM_NONE 0 |
No centering.
|
| WDS_UNIFORM_X 1 |
Uniform width.
|
| WDS_UNIFORM_Y 2 |
Uniform height.
|
| WDS_UNIFORM_BOTH (WDS_UNIFORM_X| WDS_UNIFORM_Y) |
Uniform width and height.
|
void SetSelectability(long set)
long GetSelectability(void)
Set/Get the selection mode. This allows the form to be informed when an
event hits a child. A selected child is bordered by a box using the form's
EW_PEN_COLOR.
This border is one pixel outside the child,
so it is recommended to use a separator greater than or equal to one.
For each newly selected child, the virtual function
void ChangeState(WDS_ELEMENT_ACTIVE) is called which,
by default from WDS_Widget, calls the function specified by
WDS_Widget::SetStateChangeCallback(WDS_ELEMENT_ACTIVE,)function_pointer.
Currently acceptable values for set are:
| WDS_SELECT_NONE |
Selection is not active.
|
| WDS_SELECT_SINGLE |
A single child can be selected.
|
| WDS_SELECT_EXCLUSIVE |
No other form with this flag can have a selection at the same time under
the same shallowest ancestral scope.
This exclusion occurs during SetSelection().
|
void SetSelection(WDS_Widget *set)
WDS_Widget *GetSelection(void)
Set/Get the currently selected child.
You can maintain a selection even if the selection mode is WDS_SELECT_NONE,
but it will have no visual effect unless the selection mode is changed.
| WDS_STATE_0 | Deselected all |
| WDS_STATE_1 | New selection |