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

VCF::MenuManager Class Reference

The MenuManager class is used by the internals of the framework to make sure that menu are handled in a platform neutral way. More...

#include <vcf/ApplicationKit/MenuManager.h>

Inheritance diagram for VCF::MenuManager:

VCF::ObjectWithCallbacks VCF::Object List of all members.

Static Public Member Functions

static void create ()
 Used by the UIToolkit to create the singleton instance of the MenuManager.
static void terminate ()
 Used by the UIToolkit to destroy the singleton instance of the MenuManager.
static MenuItemPeergetMenuItemPeer (MenuItem *item)
 This is used by internal framework classes to retreive a menu item peer for a given menu item.
static void destroyMenuItemPeer (MenuItem *item)
static void registerWindow (Window *window)
 Register this window with the menu manager so that it can take note of change to the window's menu bar and adjust accordingly.
static void registerMenuBar (MenuBar *menuBar)
 This registers a menu bar with the menu manager.
static void registerPopupMenu (PopupMenu *popupMenu)
 This registers a popup menu (or context menu) with the menu manager.
static MenugetMainMenu ()
 This returns the main menu instance.

Protected Member Functions

 MenuManager ()
 ~MenuManager ()
void onWindowActivated (Event *event)
void onWindowClosed (Event *event)
void onMenuItemChange (Event *event)

Protected Attributes

MenumainMenu_
MenuManagerPeerpeer_

Static Protected Attributes

static MenuManagermenuManager

Detailed Description

The MenuManager class is used by the internals of the framework to make sure that menu are handled in a platform neutral way.

When run on a specific platform work the menu manager peer ensures that the menu implementation conforms to the particular platform's standard UI. This is a rather long winded way of saying that on Win32 each window can have a menu (or not), and on Mac OS X you just have the main system menu. The MenuManager insulates you from having to care one way or the other.

The menu manager is a singleton and cannot be created directly. Developers should never call the MenuManager::create() or MenuManager::terminate() functions - they will be called for you by the framework.


Constructor & Destructor Documentation

VCF::MenuManager::MenuManager  )  [protected]
 

VCF::MenuManager::~MenuManager  )  [protected]
 


Member Function Documentation

static void VCF::MenuManager::create  )  [static]
 

Used by the UIToolkit to create the singleton instance of the MenuManager.

static void VCF::MenuManager::destroyMenuItemPeer MenuItem item  )  [static]
 

static Menu* VCF::MenuManager::getMainMenu  )  [static]
 

This returns the main menu instance.

static MenuItemPeer* VCF::MenuManager::getMenuItemPeer MenuItem item  )  [static]
 

This is used by internal framework classes to retreive a menu item peer for a given menu item.

It's entirely possible, depending on the platform, that more than one menu item instance may share a single menu item peer.

void VCF::MenuManager::onMenuItemChange Event event  )  [protected]
 

void VCF::MenuManager::onWindowActivated Event event  )  [protected]
 

void VCF::MenuManager::onWindowClosed Event event  )  [protected]
 

static void VCF::MenuManager::registerMenuBar MenuBar menuBar  )  [static]
 

This registers a menu bar with the menu manager.

The framework takes care of calling this for you, developers should not have to call this directly.

static void VCF::MenuManager::registerPopupMenu PopupMenu popupMenu  )  [static]
 

This registers a popup menu (or context menu) with the menu manager.

The framework takes care of calling this for you, developers should not have to call this directly.

static void VCF::MenuManager::registerWindow Window window  )  [static]
 

Register this window with the menu manager so that it can take note of change to the window's menu bar and adjust accordingly.

Note that only windows may have a menu associated with them.

static void VCF::MenuManager::terminate  )  [static]
 

Used by the UIToolkit to destroy the singleton instance of the MenuManager.


Member Data Documentation

Menu* VCF::MenuManager::mainMenu_ [protected]
 

MenuManager* VCF::MenuManager::menuManager [static, protected]
 

MenuManagerPeer* VCF::MenuManager::peer_ [protected]
 


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