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