libyui-mga  1.1.0
YMGAMenuItem Class Reference

New Menu Item class for menu items. More...

#include <YMGAMenuItem.h>

Inheritance diagram for YMGAMenuItem:
Collaboration diagram for YMGAMenuItem:

Public Member Functions

 YMGAMenuItem (const std::string &label)
 Constructors for toplevel items.
 
 YMGAMenuItem (const std::string &label, const std::string &iconName)
 Constructor with label and icon. More...
 
 YMGAMenuItem (YMGAMenuItem *parent, const std::string &label)
 Constructors for items that have a parent item. More...
 
 YMGAMenuItem (YMGAMenuItem *parent, const std::string &label, const std::string &iconName)
 
virtual ~YMGAMenuItem ()
 Destructor. More...
 
virtual bool enabled ()
 is Menu item enabled?
 
virtual void enable (bool en=true)
 enable/disable Menu Item
 
virtual bool hidden ()
 is Menu item hidden?
 
virtual void hide (bool invisibile=true)
 hide/show Menu Item
 
YMGAMenuItemparent () const
 Returns this item's parent item or 0 if it is a toplevel item.
 

Detailed Description

New Menu Item class for menu items.

Definition at line 35 of file YMGAMenuItem.h.

Constructor & Destructor Documentation

◆ YMGAMenuItem() [1/2]

YMGAMenuItem::YMGAMenuItem ( const std::string &  label,
const std::string &  iconName 
)
inline

Constructor with label and icon.

Note that Icon makes sense for menu actions not for menu and submenu names. iconName could be an icon name taken from fredesktop Standard Icon Names or icon pathname full or relative. Theme names if exist, win.

Definition at line 51 of file YMGAMenuItem.h.

◆ YMGAMenuItem() [2/2]

YMGAMenuItem::YMGAMenuItem ( YMGAMenuItem 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 63 of file YMGAMenuItem.h.

◆ ~YMGAMenuItem()

virtual YMGAMenuItem::~YMGAMenuItem ( )
inlinevirtual

Destructor.

This will delete all children.

Definition at line 80 of file YMGAMenuItem.h.


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