Sourceforge.net - The VCF's Project Host
   The VCF Website Home   |   Online Discussion Forums   |   Sourceforge.net Project Page   

VCF::MenuItem Class Reference

#include <vcf/ApplicationKit/MenuItem.h>

Inheritance diagram for VCF::MenuItem:

VCF::Item VCF::UIComponent VCF::Component VCF::ObjectWithCallbacks VCF::Object VCF::DefaultMenuItem VCF::SeparatorMenuItem List of all members.

Public Types

enum  MenuItemEvents {
  miAdded = ItemEvent::Added, miRemoved = ItemEvent::Removed, miCaptionChanged = ItemEvent::TextChanged, miStateChanged = ItemEvent::Changed,
  miImageIndexChanged = 400431, miStateImageIndexChanged, miIndexChanged, miAcceleratorChanged,
  miSelected, miSeparatorStateChanged, miCheckStateChanged, miRadioStateChanged,
  miVisibleStateChanged, miEnabledStateChanged, miCanPaintStateChanged, miItemClicked = MENU_ITEM_EVENT_CLICKED,
  miItemUpdate = MENU_ITEM_EVENT_UPDATED
}
enum  MenuItemDisplayState {
  mdsChecked = idsChecked, mdsUnChecked = idsUnChecked, mdsRadioUnpressed = idsRadioUnpressed, mdsRadioPressed = idsRadioPressed,
  mdsVisible = 0x0100, mdsSelected = 0x0200, mdsEnabled = 0x0400, mdsRadioItem = 0x0800,
  mdsSeparator = 0x1000, mdsHighlighted = 0x2000, mdsBoundToMenuPeer = 0x01000000
}
enum  { InvalidMenuIndex = (uint32)-1 }

Public Member Functions

 MenuItem ()
virtual ~MenuItem ()
virtual Enumerator< MenuItem * > * getChildren ()=0
virtual void addChild (MenuItem *child)=0
virtual void insertChild (const uint32 &index, MenuItem *child)=0
virtual void deleteChild (MenuItem *child)=0
virtual void deleteChild (const uint32 &index)=0
virtual void clearChildren ()=0
virtual bool isChecked () const =0
virtual void setChecked (const bool &checked)=0
virtual void setCanPaint (const bool &val)=0
virtual bool hasParent () const =0
virtual bool hasChildren () const =0
virtual uint32 getChildCount () const =0
virtual uint32 getIndex () const =0
virtual void setIndex (const uint32 &index)=0
virtual MenuItemfindChildNamed (const String &name, const bool &exactMatch=true)=0
 Searches all the children of this menu item for the first child menu item whose name exactly matches the name parameter.
virtual MenugetMenuOwner () const =0
 returns the owner of the menu item.
virtual void setMenuOwner (Menu *menuOwner)=0
 sets the Owner for the MenuItem and for all it's children as well
virtual MenuItemgetParent () const =0
virtual void setParent (MenuItem *parent)=0
virtual MenuItemgetChildAt (const uint32 &index)=0
virtual bool isEnabled () const =0
virtual void setEnabled (const bool &enabled)=0
virtual bool isVisible () const =0
virtual void setVisible (const bool &visible)=0
virtual bool getRadioItem () const =0
virtual void setRadioItem (const bool &value)=0
virtual void setCaption (const String &caption)=0
virtual String getCaption () const =0
virtual MenuItemPeergetPeer () const =0
virtual bool isSeparator () const =0
virtual void setSeparator (const bool &separator)=0
virtual bool isHighlighted () const =0
virtual void setHighlighted (const bool &val)=0
virtual void click ()=0
virtual void update ()=0
virtual void setAcceleratorKeyInfo (const VirtualKeyCode &keyCode, const uint32 &modifierMask)=0
 This sets the accelerator key object for the menu item.
virtual void setAcceleratorKey (AcceleratorKey *accelerator)=0
 Sets the acclerator object for this menu item.
virtual AcceleratorKeygetAccelerator () const =0
 Returns the accelerator for the menu item.
virtual uint32 getChildIndex (MenuItem *child) const =0

Public Attributes

VCF::Delegate MenuItemDelegate
 MenuItemClicked
 MenuItemUpdate

Member Enumeration Documentation

anonymous enum
 

Enumerator:
InvalidMenuIndex 

enum VCF::MenuItem::MenuItemDisplayState
 

Enumerator:
mdsChecked 
mdsUnChecked 
mdsRadioUnpressed 
mdsRadioPressed 
mdsVisible 
mdsSelected 
mdsEnabled 
mdsRadioItem 
mdsSeparator 
mdsHighlighted 
mdsBoundToMenuPeer  This state value indicates that the menu item has been bound/associated with a real menu item peer.

enum VCF::MenuItem::MenuItemEvents
 

Enumerator:
miAdded 
miRemoved 
miCaptionChanged 
miStateChanged 
miImageIndexChanged 
miStateImageIndexChanged 
miIndexChanged 
miAcceleratorChanged 
miSelected 
miSeparatorStateChanged 
miCheckStateChanged 
miRadioStateChanged 
miVisibleStateChanged 
miEnabledStateChanged 
miCanPaintStateChanged 
miItemClicked 
miItemUpdate 


Constructor & Destructor Documentation

VCF::MenuItem::MenuItem  )  [inline]
 

virtual VCF::MenuItem::~MenuItem  )  [inline, virtual]
 


Member Function Documentation

virtual void VCF::MenuItem::addChild MenuItem child  )  [pure virtual]
 

Implemented in VCF::DefaultMenuItem.

virtual void VCF::MenuItem::clearChildren  )  [pure virtual]
 

Implemented in VCF::DefaultMenuItem.

virtual void VCF::MenuItem::click  )  [pure virtual]
 

Implemented in VCF::DefaultMenuItem.

virtual void VCF::MenuItem::deleteChild const uint32 index  )  [pure virtual]
 

Implemented in VCF::DefaultMenuItem.

virtual void VCF::MenuItem::deleteChild MenuItem child  )  [pure virtual]
 

Implemented in VCF::DefaultMenuItem.

virtual MenuItem* VCF::MenuItem::findChildNamed const String name,
const bool &  exactMatch = true
[pure virtual]
 

Searches all the children of this menu item for the first child menu item whose name exactly matches the name parameter.

This search is case sensitive.

Parameters:
String the name to match against
bool indicates whether or not the match should be exact. If it's true the mactch is exact, if it's false the search is case insensitive. For example, if you were to pass in "foo" for name, and false for exactMatch and a menu item had a name of "FooBar" a match would occur.
Returns:
MenuItem the found menu item. If no item is found, return is NULL.

Implemented in VCF::DefaultMenuItem.

virtual AcceleratorKey* VCF::MenuItem::getAccelerator  )  const [pure virtual]
 

Returns the accelerator for the menu item.

Implemented in VCF::DefaultMenuItem.

virtual String VCF::MenuItem::getCaption  )  const [pure virtual]
 

Implemented in VCF::DefaultMenuItem.

virtual MenuItem* VCF::MenuItem::getChildAt const uint32 index  )  [pure virtual]
 

Implemented in VCF::DefaultMenuItem.

virtual uint32 VCF::MenuItem::getChildCount  )  const [pure virtual]
 

Implemented in VCF::DefaultMenuItem.

virtual uint32 VCF::MenuItem::getChildIndex MenuItem child  )  const [pure virtual]
 

Implemented in VCF::DefaultMenuItem.

virtual Enumerator<MenuItem*>* VCF::MenuItem::getChildren  )  [pure virtual]
 

Implemented in VCF::DefaultMenuItem.

virtual uint32 VCF::MenuItem::getIndex  )  const [pure virtual]
 

Implemented in VCF::DefaultMenuItem.

virtual Menu* VCF::MenuItem::getMenuOwner  )  const [pure virtual]
 

returns the owner of the menu item.

This generally is either a MenuBar or a PopupMenu

Implemented in VCF::DefaultMenuItem.

virtual MenuItem* VCF::MenuItem::getParent  )  const [pure virtual]
 

Implemented in VCF::DefaultMenuItem.

virtual MenuItemPeer* VCF::MenuItem::getPeer  )  const [pure virtual]
 

Implemented in VCF::DefaultMenuItem.

virtual bool VCF::MenuItem::getRadioItem  )  const [pure virtual]
 

Implemented in VCF::DefaultMenuItem.

virtual bool VCF::MenuItem::hasChildren  )  const [pure virtual]
 

Implemented in VCF::DefaultMenuItem.

virtual bool VCF::MenuItem::hasParent  )  const [pure virtual]
 

Implemented in VCF::DefaultMenuItem.

virtual void VCF::MenuItem::insertChild const uint32 index,
MenuItem child
[pure virtual]
 

Implemented in VCF::DefaultMenuItem.

virtual bool VCF::MenuItem::isChecked  )  const [pure virtual]
 

Reimplemented from VCF::Item.

Implemented in VCF::DefaultMenuItem.

virtual bool VCF::MenuItem::isEnabled  )  const [pure virtual]
 

Implemented in VCF::DefaultMenuItem.

virtual bool VCF::MenuItem::isHighlighted  )  const [pure virtual]
 

Implemented in VCF::DefaultMenuItem.

virtual bool VCF::MenuItem::isSeparator  )  const [pure virtual]
 

Implemented in VCF::DefaultMenuItem.

virtual bool VCF::MenuItem::isVisible  )  const [pure virtual]
 

Implemented in VCF::DefaultMenuItem.

virtual void VCF::MenuItem::setAcceleratorKey AcceleratorKey accelerator  )  [pure virtual]
 

Sets the acclerator object for this menu item.

If one already exists then it is removed.

Implemented in VCF::DefaultMenuItem.

virtual void VCF::MenuItem::setAcceleratorKeyInfo const VirtualKeyCode keyCode,
const uint32 modifierMask
[pure virtual]
 

This sets the accelerator key object for the menu item.

If one already exists it is removed for this menu item. The accelerator is assigned the key code and modifier mask passed in, and is given a default event handler, determined by the implementor. A menu item may have only one accelerator associated with it at any given time.

Implemented in VCF::DefaultMenuItem.

virtual void VCF::MenuItem::setCanPaint const bool &  val  )  [pure virtual]
 

Implemented in VCF::DefaultMenuItem.

virtual void VCF::MenuItem::setCaption const String caption  )  [pure virtual]
 

Implemented in VCF::DefaultMenuItem.

virtual void VCF::MenuItem::setChecked const bool &  checked  )  [pure virtual]
 

Reimplemented from VCF::Item.

Implemented in VCF::DefaultMenuItem.

virtual void VCF::MenuItem::setEnabled const bool &  enabled  )  [pure virtual]
 

Implemented in VCF::DefaultMenuItem.

virtual void VCF::MenuItem::setHighlighted const bool &  val  )  [pure virtual]
 

Implemented in VCF::DefaultMenuItem.

virtual void VCF::MenuItem::setIndex const uint32 index  )  [pure virtual]
 

Implemented in VCF::DefaultMenuItem.

virtual void VCF::MenuItem::setMenuOwner Menu menuOwner  )  [pure virtual]
 

sets the Owner for the MenuItem and for all it's children as well

Implemented in VCF::DefaultMenuItem.

virtual void VCF::MenuItem::setParent MenuItem parent  )  [pure virtual]
 

Implemented in VCF::DefaultMenuItem.

virtual void VCF::MenuItem::setRadioItem const bool &  value  )  [pure virtual]
 

Implemented in VCF::DefaultMenuItem.

virtual void VCF::MenuItem::setSeparator const bool &  separator  )  [pure virtual]
 

Implemented in VCF::DefaultMenuItem.

virtual void VCF::MenuItem::setVisible const bool &  visible  )  [pure virtual]
 

Implemented in VCF::DefaultMenuItem.

virtual void VCF::MenuItem::update  )  [pure virtual]
 

Implemented in VCF::DefaultMenuItem.


Member Data Documentation

VCF::MenuItem::MenuItemClicked
 

VCF::Delegate VCF::MenuItem::MenuItemDelegate
 

VCF::MenuItem::MenuItemUpdate
 


The documentation for this class was generated from the following file:
   Comments or Suggestions?    License Information