28 #include "YSingleChildContainerWidget.h"
48 YAlignmentType horAlign,
49 YAlignmentType vertAlign );
66 YAlignmentType
alignment( YUIDimension dim )
const;
178 virtual bool stretchable( YUIDimension dim )
const;
201 virtual void setSize(
int newWidth,
int newHeight );
210 #endif // YAlignment_h
virtual void setSize(int newWidth, int newHeight)
Set the current size and move the child widget according to its alignment.
virtual int preferredHeight()
Preferred height of the widget.
virtual void setBackgroundPixmap(const std::string &pixmapFileName)
Set a background pixmap.
void setMinWidth(int width)
Set the minimum width to return for preferredWidth().
std::string backgroundPixmap() const
Return the name of the background pixmap or an empty string, if there is none.
virtual ~YAlignment()
Destructor.
int bottomMargin() const
Return the bottom margin in pixels, the distance between the bottom edge of this alignment and the bo...
int leftMargin() const
Return the left margin in pixels, the distance between the left edge of this alignment and the left e...
int totalMargins(YUIDimension dim) const
Return the sum of all margins in the specified dimension.
Implementation of all the alignment widgets:
int minHeight() const
Return the minimum height of this alignment or 0 if none is set.
int minWidth() const
Return the minimum width of this alignment or 0 if none is set.
virtual void moveChild(YWidget *child, int newx, int newy)=0
Move a child widget to a new position.
YAlignmentType alignment(YUIDimension dim) const
Return the alignment in the specified dimension.
virtual bool stretchable(YUIDimension dim) const
Return this widget's stretchability.
YAlignment(YWidget *parent, YAlignmentType horAlign, YAlignmentType vertAlign)
Constructor.
virtual const char * widgetClass() const
Return a descriptive name of this widget class for logging, debugging etc.
void setBottomMargin(int margin)
Set the bottom margin in pixels.
void setTopMargin(int margin)
Set the top margin in pixels.
void setRightMargin(int margin)
Set the right margin in pixels.
void setLeftMargin(int margin)
Set the left margin in pixels.
virtual int preferredWidth()
Preferred width of the widget.
int rightMargin() const
Return the right margin in pixels, the distance between the right edge of this alignment and the righ...
void setMinHeight(int height)
Set the minimum height to return for preferredHeight().
int topMargin() const
Return the top margin in pixels, the distance between the top edge of this alignment and the top edge...
virtual void addChild(YWidget *child)
Add a child widget.