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