news download themes documentation links










FbTk::MenuItem Class Reference

An interface for a menu item in Menu. More...

#include <MenuItem.hh>

Inheritance diagram for FbTk::MenuItem:

BoolMenuItem FbTk::MultiButtonMenuItem IntResMenuItem LayerMenuItem< ItemType > XineramaHeadMenuItem< ItemType > List of all members.

Public Member Functions

 MenuItem (const char *label)
 MenuItem (const char *label, RefCount< Command > &cmd)
 create a menu item with a specific command to be executed on click

 MenuItem (const char *label, Menu *submenu)
void setCommand (RefCount< Command > &cmd)
virtual void setSelected (bool selected)
virtual void setEnabled (bool enabled)
virtual void setLabel (const char *label)
virtual void setToggleItem (bool val)
Menusubmenu ()
accessors
virtual const std::string & label () const
const Menusubmenu () const
virtual bool isEnabled () const
virtual bool isSelected () const
virtual bool isToggleItem () const
virtual void click (int button, int time)
RefCount< Command > & command ()
const RefCount< Command > & command () const

Detailed Description

An interface for a menu item in Menu.

Definition at line 36 of file MenuItem.hh.


Member Function Documentation

void FbTk::MenuItem::click int  button,
int  time
[virtual]
 

Called when the item was clicked with a specific button

Parameters:
button the button number
time the time stamp

Reimplemented in BoolMenuItem, IntResMenuItem, LayerMenuItem< ItemType >, XineramaHeadMenuItem< ItemType >, and FbTk::MultiButtonMenuItem.

Definition at line 29 of file MenuItem.cc.

References FbTk::RefCount< Command >::get().

Referenced by XineramaHeadMenuItem< ItemType >::click(), LayerMenuItem< ItemType >::click(), and BoolMenuItem::click().

00029                                          {
00030     if (m_command.get() != 0)
00031         m_command->execute();
00032 }


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

Fluxbox CVS-Jan-2003




      



Got comments about the page? Send them to webmaster.
If you have general Fluxbox related questions ask them on our irc channel or mailing lists.

Show Source








Designed by aLEczapKA