YMenuItem Class Reference

#include <YMenuButton.h>

Inheritance diagram for YMenuItem:

YMenu List of all members.

Public Member Functions

 YMenuItem (const YCPString &label, YMenu *parent_menu=0, int index=-1, const YCPValue &id=YCPVoid())
virtual ~YMenuItem ()
const YMenugetParent () const
const YCPValuegetId () const
int getIndex () const
const YCPStringgetLabel () const
virtual bool hasChildren () const
YMenuItemListitemList ()
virtual bool isMenu () const
virtual void setLabel (YCPString newLabel)

Protected Attributes

YCPString label
YCPValue id
YMenuparent
int index
YMenuItemList items

Detailed Description

Helper class for menu items.

This class provides the infrastructure for managing children ( i.e. submenus ), yet it doesn't actually handle such children. Derived classes may choose to do this.


Constructor & Destructor Documentation

YMenuItem::YMenuItem const YCPString label,
YMenu parent_menu = 0,
int  index = -1,
const YCPValue id = YCPVoid()
 

Constructor.

virtual YMenuItem::~YMenuItem  )  [inline, virtual]
 


Member Function Documentation

const YCPValue& YMenuItem::getId  )  const [inline]
 

int YMenuItem::getIndex  )  const [inline]
 

const YCPString& YMenuItem::getLabel  )  const [inline]
 

const YMenu* YMenuItem::getParent  )  const [inline]
 

virtual bool YMenuItem::hasChildren  )  const [inline, virtual]
 

Reimplemented in YMenu.

virtual bool YMenuItem::isMenu  )  const [inline, virtual]
 

Reimplemented in YMenu.

YMenuItemList& YMenuItem::itemList  )  [inline]
 

virtual void YMenuItem::setLabel YCPString  newLabel  )  [inline, virtual]
 

Set this menu item's label. This will NOT have any immediate visual effect with this base class method - it only stores the new label for later retrieval. If a visual effect is desired, derived classes should overwrite this method. Don't forget to call this base class method in that case!


Member Data Documentation

YCPValue YMenuItem::id [protected]
 

int YMenuItem::index [protected]
 

YMenuItemList YMenuItem::items [protected]
 

YCPString YMenuItem::label [protected]
 

YMenu* YMenuItem::parent [protected]
 


The documentation for this class was generated from the following files:
Generated on Fri Jun 16 18:07:47 2006 for yast2-core by  doxygen 1.4.6