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 YMenu* YMenuItem::getParent (  )  const [inline]

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

int YMenuItem::getIndex (  )  const [inline]

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

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

Reimplemented in YMenu.

YMenuItemList& YMenuItem::itemList (  )  [inline]

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

Reimplemented in YMenu.

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

YCPString YMenuItem::label [protected]

YCPValue YMenuItem::id [protected]

YMenu* YMenuItem::parent [protected]

int YMenuItem::index [protected]

YMenuItemList YMenuItem::items [protected]


The documentation for this class was generated from the following files:
Generated on Tue Nov 6 01:20:23 2007 for yast2-core by  doxygen 1.5.0