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

VCF::UIPolicyManager Class Reference

helper class for any document interface policy it manages things like merging menus, etc. More...

#include <vcf/ApplicationKit/UIPolicyManager.h>

List of all members.

Public Types

enum  StandardAccelerator {
  saApplicationQuit = 1, saApplicationAbout, saApplicationPreferences, saFileNew,
  saFileOpen, saFileSave, saFileSaveAs, saFilePrint,
  saFilePageSetup, saEditUndo, saEditRedo, saEditCut,
  saEditCopy, saEditPaste, saEditDelete, saEditSelectAll,
  saEditFind, saEditFindNext, saHelpContents, saFileExit = saApplicationQuit,
  saEditFindAgain = saEditFindNext
}
 These are a standard set of accelerators types that are common to various windowing platforms. More...

Public Member Functions

 UIPolicyManager ()
virtual ~UIPolicyManager ()
virtual void mergeMenus (Menu *appMenu, Menu *windowMenu)=0
 merges the appMenu into the windowMenu
  • the windowMenu is filled with menu items clones of the menu items in appMenu
  • the 'file' menu is always placed as the leftmost one ( if exists in the windowMenu ) and the 'edit' menu just in the second place from the left ( if exists in the windowMenu )
  • any other first-level windowMenu item is appended on the right of the first-level appMenu items
  • if two first-level manu itmes have the same caption, its subitems are merged together

virtual FramegetOwnerForDialog ()=0
virtual Rect adjustInitialDialogBounds (Dialog *dialog)=0
virtual String transformMnemonicValues (const String &input)=0
 This returns a transformed string that is suitable for passing to text drawing API's when the input string has mnemonic values in it.
virtual AcceleratorKey::Value getStandardAcceleratorFor (const StandardAccelerator &val)=0
 Returns an AcceleratorKey::Value that represents the virtual key code and keyboard modifier(s) for the requested standard accelerator.


Detailed Description

helper class for any document interface policy it manages things like merging menus, etc.


Member Enumeration Documentation

enum VCF::UIPolicyManager::StandardAccelerator
 

These are a standard set of accelerators types that are common to various windowing platforms.

Use these values to determine the proper accelerator key code and modifier(s) to use rather than hard coding them.

Enumerator:
saApplicationQuit 
saApplicationAbout 
saApplicationPreferences 
saFileNew 
saFileOpen 
saFileSave 
saFileSaveAs 
saFilePrint 
saFilePageSetup 
saEditUndo 
saEditRedo 
saEditCut 
saEditCopy 
saEditPaste 
saEditDelete 
saEditSelectAll 
saEditFind 
saEditFindNext 
saHelpContents 
saFileExit 
saEditFindAgain 


Constructor & Destructor Documentation

VCF::UIPolicyManager::UIPolicyManager  )  [inline]
 

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


Member Function Documentation

virtual Rect VCF::UIPolicyManager::adjustInitialDialogBounds Dialog dialog  )  [pure virtual]
 

virtual Frame* VCF::UIPolicyManager::getOwnerForDialog  )  [pure virtual]
 

virtual AcceleratorKey::Value VCF::UIPolicyManager::getStandardAcceleratorFor const StandardAccelerator val  )  [pure virtual]
 

Returns an AcceleratorKey::Value that represents the virtual key code and keyboard modifier(s) for the requested standard accelerator.

Some platforms may not support all the accelerators in the StandardAccelerator enum, and if this is the case the returned value will be 0 and AcceleratorKey::Value::isEmpty() will return true.

virtual void VCF::UIPolicyManager::mergeMenus Menu appMenu,
Menu windowMenu
[pure virtual]
 

merges the appMenu into the windowMenu

  • the windowMenu is filled with menu items clones of the menu items in appMenu
  • the 'file' menu is always placed as the leftmost one ( if exists in the windowMenu ) and the 'edit' menu just in the second place from the left ( if exists in the windowMenu )
  • any other first-level windowMenu item is appended on the right of the first-level appMenu items
  • if two first-level manu itmes have the same caption, its subitems are merged together

Parameters:
Menu* appMenu, the 'source' menu
Menu* windowMenu, the 'destination' menu

virtual String VCF::UIPolicyManager::transformMnemonicValues const String input  )  [pure virtual]
 

This returns a transformed string that is suitable for passing to text drawing API's when the input string has mnemonic values in it.

This is platform dependant, so not all platforms will handle this the same way. For example, the string "&OK" is meant to have a mnemonic in front of the "O". In Win32 this would be left alone, and the Win32 drawing API's will draw it correctly. On OSX this "&" character would be stripped out.


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