WDS_Partition

WDS_Partition

wds

1998 12-05


CLASS

WDS_Partition - partition widget


SYNOPSIS

Class WDS_Partition is a widget to divide space in either the horizontal or vertical direction. Child widgets are separated by user-draggable partition bars. By default, child widgets are ordered left to right or top to bottom, but this is reversible.


The WDS_Partition widget takes advantage of the partial event usage to maximize fluidity of the interface. If a valid left mouse press is left unused by decendent widget, the WDS_Partition widget will use it as drag of the partitioned area. Also, since the events are X-Y separable, two partition widgets (or a partition and another non-conflicting widget) can be operated on simutaneously. For example, if a vertical partition widget is a child of a horizontal partition widget, some children of the vertical partition widget may be dragged in both the X and Y directions simutaneously.


Invisible children are completely ignored in nearly all partition functions. As a result, invisible children get no partition bar and consume no space.


PUBLIC MEMBER FUNCTIONS

Inheritance from class WDS_Widget



long GetSeparatorWidth(long width[3])
Return the three widths of the bars separating the widgets corresponding with: immobile, mobile, and max.



void SetReverse(long set)

long GetReverse(void)
Set/Return the ordering of children widgets. A non-zero value represents a reverse ordering of right-to-left or bottom-to-top.



void SetFlags(long set)

long GetFlags(void)
Set|Return OR'ed sum of optional flags. Current options are:



WDS_PARTITION_FLAGS_NONE No special flags.
WDS_PARTITION_FLAGS_LIMIT The sum of child sizes in the primary direction is limited to the width of the partition itself.
WDS_PARTITION_FLAGS_ATTACH Force child widgets to position/size themselves so that they collectively fill their parent. This is relevant when there are fixed size widgets at the end of the list, because otherwise the last child automatically fills in the remaining space. However, if all the child widgets are fixed in size, this functionality is defeated. This flag automatically activates the WDS_PARTITION_FLAGS_LIMIT option.



void SetDirection(long set)

long GetDirection(void)
Set/Return the direction of the partition. Acceptable values are WDS_PARTITION_HORIZONTAL or WDS_PARTITION_VERTICAL.


FILES

wds/part.h Partition header file


SEE ALSO

WDS_intro(3), WDS_Widget(3), WDS_Form(3), WDS_ScrollRegion(3)


NOTES

The use of fixed-size widgets as direct children of a partition should be minimized as this can reduce the fluidity of the interface. If this is not reasonable, it may be useful to use another widget such WDS_ScrollRegion to give a resizeable view of the fixed-size child.