#include <YSplit.h>
Inheritance diagram for YSplit:
Public Types | |
typedef vector< long > | sizeVector |
typedef vector< long > | posVector |
Public Member Functions | |
YSplit (const YWidgetOpt &opt, YUIDimension newPrimaryDimension) | |
virtual char * | widgetClass () |
YUIDimension | dimension () const |
YUIDimension | primaryDimension () const |
YUIDimension | secondaryDimension () const |
virtual long | nicesize (YUIDimension dimension) |
virtual bool | stretchable (YUIDimension dimension) const |
void | setSize (long newwidth, long newheight) |
virtual void | moveChild (YWidget *child, long newx, long newy)=0 |
Protected Member Functions | |
long | childrenTotalWeight (YUIDimension dimension) |
long | childrenMaxNiceSize (YUIDimension dimension) |
long | totalNonWeightedChildrenNiceSize (YUIDimension dimension) |
int | countNonWeightedChildren (YUIDimension dimension) |
int | countStretchableChildren (YUIDimension dimension) |
int | countLayoutStretchChildren (YUIDimension dimension) |
int | bossChild () |
void | calcPrimaryGeometry (long newSize, sizeVector &childSize, posVector &childPos) |
void | calcSecondaryGeometry (long newSize, sizeVector &childSize, posVector &childPos) |
void | doResize (sizeVector &width, sizeVector &height, posVector &x_pos, posVector &y_pos) |
Protected Attributes | |
YUIDimension | primary |
YUIDimension | secondary |
bool | debugLayout |
|
|
|
|
|
Creates a new YSplit |
|
Determine the number of the "boss child" - the child widget that determines the overall size with respect to its weight. Returns -1 if there is no boss, i.e. none of the children has a weight specified. |
|
Calculate the sizes and positions of all children in the primary dimension and store them in "childSize" and "childPos". |
|
Calculate the sizes and positions of all children in the secondary dimension and store them in "childSize" and "childPos". |
|
Return the maximum nice size of all children in dimension d. |
|
Add up all the children's weights. |
|
Count the number of "rubber bands", i.e. the number of stretchable layout spacings ( e.g. {H|V}Weight, {H|V}Spacing ). Only those without a weight are counted. |
|
Count the number of non-weighted children. |
|
Count the number of stretchable ( non-weighted ) children. Note: Weighted children are _always_ considered stretchable. |
|
Returns the dimensions. |
|
Actually perform resizing and moving the child widgets to the appropriate position. The vectors passed are the sizes previously calculated by calcPrimaryGeometry() and calcSecondaryGeometry(). |
|
Moves a child to a new position |
|
Minimum size the widget should have to make it look and feel nice, i.e. all of the widget's preferred size. For the "primary" dimension, this is the sum of the children's nice sizes with respect to any specified weight ratios - i.e. the weights will always be respected. Children may be stretched as appropriate. For the "other" dimension, this is the maximum of the children's nice sizes in that dimension.
Reimplemented from YContainerWidget. |
|
|
|
|
|
Sets the size of the Split. Here the layout policy is implemented. The ui specific widget must call this method at the end of it's own setSize method. Reimplemented from YContainerWidget. |
|
The split is stretchable if one of the children is stretchable in that dimension.
Reimplemented from YContainerWidget. |
|
Add up all the non-weighted children's nice sizes in dimension d. |
|
Returns a descriptive name of this widget class for logging, debugging etc. Reimplemented from YContainerWidget. |
|
|
|
Dimensions of the split. YD_HORIZ or YD_VERT |
|
|