libyui  3.0.13
 All Classes Functions Variables Enumerations Friends
YMenuItem Class Reference

#include <YMenuItem.h>

Inheritance diagram for YMenuItem:
Collaboration diagram for YMenuItem:

Public Member Functions

 YMenuItem (const std::string &label)
 
 YMenuItem (const std::string &label, const std::string &iconName)
 
 YMenuItem (YMenuItem *parent, const std::string &label)
 
 YMenuItem (YMenuItem *parent, const std::string &label, const std::string &iconName)
 
virtual ~YMenuItem ()
 
YMenuItemparent () const
 
- Public Member Functions inherited from YTreeItem
 YTreeItem (const std::string &label, bool isOpen=false)
 
 YTreeItem (const std::string &label, const std::string &iconName, bool isOpen=false)
 
 YTreeItem (YTreeItem *parent, const std::string &label, bool isOpen=false)
 
 YTreeItem (YTreeItem *parent, const std::string &label, const std::string &iconName, bool isOpen=false)
 
virtual ~YTreeItem ()
 
virtual bool hasChildren () const
 
virtual YItemIterator childrenBegin ()
 
virtual YItemConstIterator childrenBegin () const
 
virtual YItemIterator childrenEnd ()
 
virtual YItemConstIterator childrenEnd () const
 
virtual void addChild (YItem *item_disown)
 
virtual void deleteChildren ()
 
bool isOpen () const
 
void setOpen (bool open)
 
- Public Member Functions inherited from YItem
 YItem (const std::string &label, bool selected=false)
 
 YItem (const std::string &label, const std::string &iconName, bool selected=false)
 
virtual ~YItem ()
 
std::string label () const
 
void setLabel (const std::string &newLabel)
 
std::string iconName () const
 
bool hasIconName () const
 
void setIconName (const std::string &newIconName)
 
bool selected () const
 
void setSelected (bool sel=true)
 
void setIndex (int index)
 
int index () const
 
void setData (void *newData)
 
void * data () const
 

Detailed Description

Item class for menu items.

Definition at line 35 of file YMenuItem.h.

Constructor & Destructor Documentation

YMenuItem::YMenuItem ( const std::string &  label)
inline

Constructors for toplevel items.

Definition at line 41 of file YMenuItem.h.

YMenuItem::YMenuItem ( YMenuItem parent,
const std::string &  label 
)
inline

Constructors for items that have a parent item.

They will automatically register this item with the parent item. The parent assumes ownership of this item and will delete it in its (the parent's) destructor.

Definition at line 57 of file YMenuItem.h.

virtual YMenuItem::~YMenuItem ( )
inlinevirtual

Destructor.

This will delete all children.

Definition at line 73 of file YMenuItem.h.

Member Function Documentation

YMenuItem* YMenuItem::parent ( ) const
inlinevirtual

Returns this item's parent item or 0 if it is a toplevel item.

Reimplemented from YTreeItem.

Definition at line 79 of file YMenuItem.h.

Here is the call graph for this function:


The documentation for this class was generated from the following file: