libyui
Public Member Functions | Protected Member Functions | Protected Attributes

YAlignment Class Reference

#include <YAlignment.h>

Inheritance diagram for YAlignment:
YSingleChildContainerWidget YWidget

List of all members.

Public Member Functions

virtual ~YAlignment ()
virtual const char * widgetClass () const
YAlignmentType alignment (YUIDimension dim) const
int leftMargin () const
int rightMargin () const
int topMargin () const
int bottomMargin () const
int totalMargins (YUIDimension dim) const
void setLeftMargin (int margin)
void setRightMargin (int margin)
void setTopMargin (int margin)
void setBottomMargin (int margin)
int minWidth () const
int minHeight () const
void setMinWidth (int width)
void setMinHeight (int height)
virtual void setBackgroundPixmap (const string &pixmapFileName)
string backgroundPixmap () const
virtual void addChild (YWidget *child)
virtual void moveChild (YWidget *child, int newx, int newy)=0
virtual bool stretchable (YUIDimension dim) const
virtual int preferredWidth ()
virtual int preferredHeight ()
virtual void setSize (int newWidth, int newHeight)

Protected Member Functions

 YAlignment (YWidget *parent, YAlignmentType horAlign, YAlignmentType vertAlign)

Protected Attributes

ImplPtr< YAlignmentPrivatepriv

Detailed Description

Implementation of all the alignment widgets:


Constructor & Destructor Documentation

YAlignment::YAlignment ( YWidget parent,
YAlignmentType  horAlign,
YAlignmentType  vertAlign 
) [protected]

Constructor.

YAlignment::~YAlignment ( ) [virtual]

Destructor.


Member Function Documentation

void YAlignment::addChild ( YWidget child) [virtual]

Add a child widget.

Reimplemented from YSingleChildContainerWidget to propagate stretchability down to the single child.

Reimplemented from YWidget.

YAlignmentType YAlignment::alignment ( YUIDimension  dim) const

Return the alignment in the specified dimension.

string YAlignment::backgroundPixmap ( ) const

Return the name of the background pixmap or an empty string, if there is none.

int YAlignment::bottomMargin ( ) const

Return the bottom margin in pixels, the distance between the bottom edge of this alignment and the bottom edge of the child widget.

int YAlignment::leftMargin ( ) const

Return the left margin in pixels, the distance between the left edge of this alignment and the left edge of the child widget.

int YAlignment::minHeight ( ) const

Return the minimum height of this alignment or 0 if none is set. preferredHeight() will never return less than this value.

int YAlignment::minWidth ( ) const

Return the minimum width of this alignment or 0 if none is set. preferredWidth() will never return less than this value.

virtual void YAlignment::moveChild ( YWidget child,
int  newx,
int  newy 
) [pure virtual]

Move a child widget to a new position.

int YAlignment::preferredHeight ( ) [virtual]

Preferred height of the widget.

Reimplemented from YWidget.

Reimplemented from YSingleChildContainerWidget.

int YAlignment::preferredWidth ( ) [virtual]

Preferred width of the widget.

Reimplemented from YWidget.

Reimplemented from YSingleChildContainerWidget.

int YAlignment::rightMargin ( ) const

Return the right margin in pixels, the distance between the right edge of this alignment and the right edge of the child widget.

void YAlignment::setBackgroundPixmap ( const string &  pixmapFileName) [virtual]

Set a background pixmap.

Derived classes may want to overwrite this.

This parent method should be called first in the overwritten method to ensure path expansion is done as specified (prepend the theme path ("/usr/share/YaST2/theme/current/") if the path doesn't start with "/" or ".").

void YAlignment::setBottomMargin ( int  margin)

Set the bottom margin in pixels.

void YAlignment::setLeftMargin ( int  margin)

Set the left margin in pixels.

void YAlignment::setMinHeight ( int  height)

Set the minimum height to return for preferredHeight().

void YAlignment::setMinWidth ( int  width)

Set the minimum width to return for preferredWidth().

void YAlignment::setRightMargin ( int  margin)

Set the right margin in pixels.

void YAlignment::setSize ( int  newWidth,
int  newHeight 
) [virtual]

Set the current size and move the child widget according to its alignment.

Derived classes should reimplement this, but call this base class function in their own implementation.

Reimplemented from YSingleChildContainerWidget.

void YAlignment::setTopMargin ( int  margin)

Set the top margin in pixels.

bool YAlignment::stretchable ( YUIDimension  dim) const [virtual]

Return this widget's stretchability. Reimplemented from YWidget.

In an aligned dimension the widget is always stretchable. In an unchanged dimension the widget is stretchable if the child is stretchable.

Reimplemented from YSingleChildContainerWidget.

int YAlignment::topMargin ( ) const

Return the top margin in pixels, the distance between the top edge of this alignment and the top edge of the child widget.

int YAlignment::totalMargins ( YUIDimension  dim) const

Return the sum of all margins in the specified dimension.

const char * YAlignment::widgetClass ( ) const [virtual]

Return a descriptive name of this widget class for logging, debugging etc.

Reimplemented from YWidget.


The documentation for this class was generated from the following files:
 All Classes Functions Variables Enumerations Friends