#include <YAlignment.h>
Inheritance diagram for YAlignment:
Public Member Functions | |
YAlignment (const YWidgetOpt &opt, YAlignmentType halign, YAlignmentType valign) | |
virtual char * | widgetClass () |
virtual void | moveChild (YWidget *child, long newx, long newy)=0 |
bool | stretchable (YUIDimension dim) const |
void | setSize (long newwidth, long newheight) |
Protected Attributes | |
YAlignmentType | align [YUIAllDimensions] |
Left Right Top Bottom HCenter VCenter HVCenter
The Alignment widgets are used to control the layout of a dialog. They are useful in situations, where to a widget is assigned more space than it can use. For example if you have a VBox containing four CheckBoxes, the width of the VBox is determined by the CheckBox with the longest label. The other CheckBoxes are centered per default. With `Left( widget )
you tell widget that it should be layouted leftmost of the space that is available to it. Right, Top
and Bottom
are working accordingly. The other three widgets center their child widget horizontally, vertically or in both directions. The important fact for all alignment widgets is, that they make their child widget stretchable in the dimension it is aligned.
See the Layout HOWTO for details.
|
Constructor
|
|
Moves a child widget to a new position. |
|
Sets the size and move the child widget according to its alignment. The UI specific widget subclass overrides this function in order to resize the ui specific widget, but calls this method at the end. Reimplemented from YContainerWidget. |
|
In an aligned dimension the widget is always stretchable. In an unchanged dimension the widget is stretchable if the child is stretchable. Reimplemented from YContainerWidget. |
|
Returns a descriptive name of this widget class for logging, debugging etc. Reimplemented from YContainerWidget. |
|
Alignment of the contained widget in each dimension |