libyui
 
Loading...
Searching...
No Matches
YAlignment Class Referenceabstract

#include <YAlignment.h>

Inheritance diagram for YAlignment:
Collaboration diagram for YAlignment:

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 std::string &pixmapFileName)
 
std::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)
 
- Public Member Functions inherited from YSingleChildContainerWidget
virtual ~YSingleChildContainerWidget ()
 
- Public Member Functions inherited from YWidget
virtual ~YWidget ()
 
virtual std::string debugLabel () const
 
std::string helpText () const
 
void setHelpText (const std::string &helpText)
 
virtual const YPropertySetpropertySet ()
 
virtual bool setProperty (const std::string &propertyName, const YPropertyValue &val)
 
virtual YPropertyValue getProperty (const std::string &propertyName)
 
bool hasChildren () const
 
YWidgetfirstChild () const
 
YWidgetlastChild () const
 
YWidgetListIterator childrenBegin () const
 
YWidgetListIterator childrenEnd () const
 
YWidgetListConstIterator childrenConstBegin () const
 
YWidgetListConstIterator childrenConstEnd () const
 
YWidgetListIterator begin ()
 
YWidgetListIterator end ()
 
int childrenCount () const
 
bool contains (YWidget *child) const
 
virtual void removeChild (YWidget *child)
 
void deleteChildren ()
 
YWidgetparent () const
 
bool hasParent () const
 
void setParent (YWidget *newParent)
 
YDialogfindDialog ()
 
YWidgetfindWidget (YWidgetID *id, bool doThrow=true) const
 
virtual int preferredSize (YUIDimension dim)
 
bool isValid () const
 
bool beingDestroyed () const
 
void * widgetRep () const
 
void setWidgetRep (void *toolkitWidgetRep)
 
bool hasId () const
 
YWidgetIDid () const
 
void setId (YWidgetID *newId_disown)
 
virtual void setEnabled (bool enabled=true)
 
void setDisabled ()
 
virtual bool isEnabled () const
 
void setStretchable (YUIDimension dim, bool newStretch)
 
void setDefaultStretchable (YUIDimension dim, bool newStretch)
 
virtual int weight (YUIDimension dim)
 
bool hasWeight (YUIDimension dim)
 
void setWeight (YUIDimension dim, int weight)
 
void setNotify (bool notify=true)
 
bool notify () const
 
void setNotifyContextMenu (bool notifyContextMenu=true)
 
bool notifyContextMenu () const
 
bool sendKeyEvents () const
 
void setSendKeyEvents (bool doSend)
 
bool autoShortcut () const
 
void setAutoShortcut (bool _newAutoShortcut)
 
int functionKey () const
 
bool hasFunctionKey () const
 
virtual void setFunctionKey (int fkey_no)
 
virtual bool setKeyboardFocus ()
 
virtual std::string shortcutString () const
 
virtual void setShortcutString (const std::string &str)
 
virtual const char * userInputProperty ()
 
void dumpWidgetTree (int indentationLevel=0)
 
void dumpDialogWidgetTree ()
 
void setChildrenEnabled (bool enabled)
 
virtual void saveUserInput (YMacroRecorder *macroRecorder)
 
void * operator new (size_t size)
 
void operator delete (void *ptr) noexcept
 
virtual void startMultipleChanges ()
 
virtual void doneMultipleChanges ()
 

Protected Member Functions

 YAlignment (YWidget *parent, YAlignmentType horAlign, YAlignmentType vertAlign)
 
- Protected Member Functions inherited from YSingleChildContainerWidget
 YSingleChildContainerWidget (YWidget *parent)
 
- Protected Member Functions inherited from YWidget
 YWidget (YWidget *parent)
 
YWidgetChildrenManagerchildrenManager () const
 
void setChildrenManager (YWidgetChildrenManager *manager)
 
void setBeingDestroyed ()
 
void dumpWidget (YWidget *w, int indentationLevel)
 

Protected Attributes

ImplPtr< YAlignmentPrivatepriv
 

Detailed Description

Implementation of all the alignment widgets:

  • Left, Right, HCenter,
  • Top, Bottom, VCenter,
  • HVCenter
  • MinSize, MinWidth, MinHeight

Constructor & Destructor Documentation

◆ YAlignment()

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

Constructor.

◆ ~YAlignment()

YAlignment::~YAlignment ( )
virtual

Destructor.

Member Function Documentation

◆ addChild()

void YAlignment::addChild ( YWidget * child)
virtual

Add a child widget.

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

Reimplemented from YWidget.

◆ alignment()

YAlignmentType YAlignment::alignment ( YUIDimension dim) const

Return the alignment in the specified dimension.

◆ backgroundPixmap()

string YAlignment::backgroundPixmap ( ) const

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

◆ bottomMargin()

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.

◆ leftMargin()

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.

◆ minHeight()

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.

◆ minWidth()

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.

◆ moveChild()

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

Move a child widget to a new position.

◆ preferredHeight()

int YAlignment::preferredHeight ( )
virtual

Preferred height of the widget.

Reimplemented from YWidget.

Reimplemented from YSingleChildContainerWidget.

◆ preferredWidth()

int YAlignment::preferredWidth ( )
virtual

Preferred width of the widget.

Reimplemented from YWidget.

Reimplemented from YSingleChildContainerWidget.

◆ rightMargin()

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.

◆ setBackgroundPixmap()

void YAlignment::setBackgroundPixmap ( const std::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/libyui/theme/") if the path doesn't start with "/" or ".").

◆ setBottomMargin()

void YAlignment::setBottomMargin ( int margin)

Set the bottom margin in pixels.

◆ setLeftMargin()

void YAlignment::setLeftMargin ( int margin)

Set the left margin in pixels.

◆ setMinHeight()

void YAlignment::setMinHeight ( int height)

Set the minimum height to return for preferredHeight().

◆ setMinWidth()

void YAlignment::setMinWidth ( int width)

Set the minimum width to return for preferredWidth().

◆ setRightMargin()

void YAlignment::setRightMargin ( int margin)

Set the right margin in pixels.

◆ setSize()

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.

◆ setTopMargin()

void YAlignment::setTopMargin ( int margin)

Set the top margin in pixels.

◆ stretchable()

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.

◆ topMargin()

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.

◆ totalMargins()

int YAlignment::totalMargins ( YUIDimension dim) const

Return the sum of all margins in the specified dimension.

◆ widgetClass()

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: