Main Page | Class Hierarchy | Alphabetical List | Compound List | File List | Compound Members | Related Pages

VDKMenuItem Class Reference

Provides a menu item. More...

#include <menu.h>

Inheritance diagram for VDKMenuItem:

VDKObject VDKNotCopyAble List of all members.

Public Member Functions


Detailed Description

Provides a menu item.

SIGNALS
TIP
Menu item caption line is parsed and an acceleartor is installed if an underscore is found. By default installs Alt + underscored key
  VDKMenuItem *item = new VDKMenuItem(menu,"_Accelerated");
  // alt+a triggers activate_signal
If accelerated menu item does not have submenus using accelerated key makes activate_signal to be emitted, otherwise the submenu branch will be displayed
EXAMPLES
In ./testvdk/testvdk.cc


Constructor & Destructor Documentation

VDKMenuItem::VDKMenuItem VDKMenu menu,
const char *  prompt = NULL,
char **  pixmap = NULL,
guint  key = GDK_VoidSymbol,
guint8  modkey = GDK_MOD1_MASK,
bool  accel = true
 

Constructor, makes a menu item to be assigned to a menu

Parameters:
menu owner menu
prompt menu caption
pixmap pixmap data
key accelerator key
modkey accelerator key modifier
accel wheter should contain an accelerator or not
A pixmap will be packed at start if isn't NULL. Leaving to default value makes to be parsed for accelerators. For instance label == "_Quit" makes the accelerator as alt+q. Setting other then default overrides label parsing, setting to other than default overrides modifier.

VDKMenuItem::VDKMenuItem VDKMenubar bar,
const char *  prompt = NULL,
char **  pixmap = NULL,
int  align = l_justify,
guint  key = GDK_VoidSymbol,
guint8  modkey = GDK_MOD1_MASK,
bool  accel = true
 

Constructor, makes a menu item to be assigned to a menu bar

Parameters:
bar owner menu bar
prompt menu caption
pixmap pixmap data
align label alignement
key accelerator key
modkey accelerator key modifier
accel wheter should contain an accelerator or not

VDKMenuItem::~VDKMenuItem  )  [virtual]
 

Destructor


Member Function Documentation

VDKMenuItem::__rwproperty VDKMenuItem  ,
const char * 
 

Sets/gets menu item caption

VDKMenuItem::__rwproperty VDKMenuItem  ,
bool 
 

Sets/gets menu item marked state

guint VDKMenuItem::AccKey  )  [inline]
 

Returns accelerated key

void VDKMenuItem::Add VDKMenu submenu  ) 
 

Adds a submenus to this menu

TIP
Allows submenus to be attached in cascade

guint8 VDKMenuItem::ModKey  )  [inline]
 

Returns accelerated key modifier

void VDKMenuItem::SetFont VDKFont font  )  [virtual]
 

Sets object font

Reimplemented from VDKObject.


The documentation for this class was generated from the following files:
Generated on Wed Aug 6 11:01:57 2003 for vdk 2.0.3 by doxygen 1.3.2