#include <YMenuButton.h>
Inheritance diagram for YMenuItem:

Public Member Functions | |
| YMenuItem (const YCPString &label, YMenu *parent_menu=0, int index=-1, const YCPValue &id=YCPVoid()) | |
| virtual | ~YMenuItem () |
| const YMenu * | getParent () const |
| const YCPValue & | getId () const |
| int | getIndex () const |
| const YCPString & | getLabel () const |
| virtual bool | hasChildren () const |
| YMenuItemList & | itemList () |
| virtual bool | isMenu () const |
| virtual void | setLabel (YCPString newLabel) |
Protected Attributes | |
| YCPString | label |
| YCPValue | id |
| YMenu * | parent |
| int | index |
| YMenuItemList | 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.
| YMenuItem::YMenuItem | ( | const YCPString & | label, | |
| YMenu * | parent_menu = 0, |
|||
| int | index = -1, |
|||
| const YCPValue & | id = YCPVoid() | |||
| ) |
Constructor.
| virtual YMenuItem::~YMenuItem | ( | ) | [inline, virtual] |
| 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!
YCPString YMenuItem::label [protected] |
YCPValue YMenuItem::id [protected] |
YMenu* YMenuItem::parent [protected] |
int YMenuItem::index [protected] |
YMenuItemList YMenuItem::items [protected] |
1.5.0