Main Page | Namespace List | Class Hierarchy | Class List | File List | Namespace Members | Class Members | File Members | Examples

YContainerWidget Class Reference

Base class of all widgets that have child widgets. More...

#include <YContainerWidget.h>

Inheritance diagram for YContainerWidget:

YWidget YAlignment YDialog YDumbTab YFrame YRadioButtonGroup YReplacePoint YSplit YSquash YWizard List of all members.

Public Member Functions

 YContainerWidget (const YWidgetOpt &opt)
virtual ~YContainerWidget ()
virtual char * widgetClass ()
bool hasChildren () const
int numChildren () const
YWidgetchild (int i) const
long nicesize (YUIDimension dim)
bool stretchable (YUIDimension dim) const
void setSize (long newwidth, long newheight)
virtual void addChild (YWidget *child)
void removeChildren ()
YWidgetfindWidget (const YCPValue &id) const
bool isContainer () const
virtual void childDeleted (YWidget *child)
void dumpWidgetTree (int indentationLevel=0)
void dumpDialogWidgetTree ()
virtual void saveUserInput (YMacroRecorder *macroRecorder)

Protected Member Functions

virtual void childAdded (YWidget *child)
virtual void childRemoved (YWidget *child)
void dumpWidget (YWidget *w, int indentationLevel)

Protected Attributes

vector< YWidget * > children

Detailed Description

Base class of all widgets that have child widgets.

A Container is a widget that has child widgets. Examples are YSplit, YReplacePoint, YAlignment. This class generically handles the houskeeping of child widgets, looks for children with certain IDs and provides default implementations for nicesize, stretchable and weight for container widgets with exactly one child.


Constructor & Destructor Documentation

YContainerWidget::YContainerWidget const YWidgetOpt opt  ) 
 

Constructor

YContainerWidget::~YContainerWidget  )  [virtual]
 

Cleans up: Deletes all child widgets.


Member Function Documentation

void YContainerWidget::addChild YWidget child  )  [virtual]
 

Adds a new child widget. The YContainerwidget assumes ownership and takes care of deleting the child.

YWidget * YContainerWidget::child int  i  )  const
 

Returns one of the child widgets.

void YContainerWidget::childAdded YWidget child  )  [protected, virtual]
 

Call back function that reports to the ui specific widget that a child has been added. The default implementation does nothing.

void YContainerWidget::childDeleted YWidget child  )  [virtual]
 

Child deletion notification. See YWidget.h for details.

Reimplemented from YWidget.

void YContainerWidget::childRemoved YWidget child  )  [protected, virtual]
 

Call back function that reports to the ui specific widget that a child has been removed. The default implementation does nothing.

void YContainerWidget::dumpDialogWidgetTree  ) 
 

Debugging function: Dump the widget tree from this widget's dialog parent. If there is no such dialog parent, dump the widget tree from here on.

void YContainerWidget::dumpWidget YWidget w,
int  indentationLevel
[protected]
 

Helper function for dumpWidgetTree(): Dump one widget to the log file.

void YContainerWidget::dumpWidgetTree int  indentationLevel = 0  ) 
 

Debugging function: Dump the widget tree from here on to the log file.

YWidget * YContainerWidget::findWidget const YCPValue id  )  const
 

Looks for a child widget with a certain ID. Searches recursively.

Returns:
A pointer to the found widget or 0 if non has been found

bool YContainerWidget::hasChildren  )  const
 

Returns 'true' if there are any child widgets.

bool YContainerWidget::isContainer  )  const [virtual]
 

Returns true, since this is a container widget.

Reimplemented from YWidget.

long YContainerWidget::nicesize YUIDimension  dim  )  [virtual]
 

Default implementation, that assumes exactly one child. Returns the nicesize of the child.

Parameters:
dim Dimension, either YD_HORIZ or YD_VERT

Implements YWidget.

Reimplemented in YSplit.

int YContainerWidget::numChildren  )  const
 

Returns the number of child widgets.

void YContainerWidget::removeChildren  ) 
 

Removes and deletes all child widgets. Calls childRemoved() for each child just before it is being removed in order to inform the derived ui specific widget.

void YContainerWidget::saveUserInput YMacroRecorder macroRecorder  )  [virtual]
 

Recursively save the user input of all child widgets to a macro recorder: All child widgets that could contain data entered by the user are requested to send their contents to the macro recorder, e.g. input fields, check boxes etc.

Reimplemented from YWidget.

void YContainerWidget::setSize long  newwidth,
long  newheight
[virtual]
 

Default implementation, that assumes exactly one child. Sets the size of the child.

Reimplemented from YWidget.

Reimplemented in YAlignment, and YSplit.

bool YContainerWidget::stretchable YUIDimension  dim  )  const [virtual]
 

Default implementation, that assumes exactly one child. Returns, whether the child is stretchable

Parameters:
dim Dimension, either YD_HORIZ or YD_VERT

Reimplemented from YWidget.

Reimplemented in YAlignment, YSplit, and YSquash.

virtual char* YContainerWidget::widgetClass  )  [inline, virtual]
 

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

Reimplemented from YWidget.

Reimplemented in YAlignment, YDialog, YDumbTab, YFrame, YRadioButtonGroup, YReplacePoint, YSplit, YSquash, and YWizard.


Member Data Documentation

vector<YWidget *> YContainerWidget::children [protected]
 

Storage for all child widgets.


The documentation for this class was generated from the following files:
Generated on Fri Nov 9 18:15:24 2007 for yast2-core by doxygen 1.3.6