wxShortcutManager Class Reference

This class stores customisation information for the application. More...

#include <shortcutcust/shortcutcust.h>

List of all members.

Public Member Functions

 wxShortcutManager (const wxShortcutManager &manager)
 wxShortcutManager ()
 ~wxShortcutManager ()
void Copy (const wxShortcutManager &manager)
 Copies the shortcuts.
void Init ()
 Initialises the class.
void Clear ()
 Clears the items.
void Add (const wxShortcutItem &info)
 Adds information about a shortcut.
wxShortcutItemFind (const wxString &name) const
 Finds information about a shortcut.
int FindIndex (const wxString &name) const
 Finds the nth shortcut for the given name.
wxShortcutItemFindById (int id) const
 Finds a shortcut by id.
wxShortcutItemGetNth (int n) const
 Gets the nth record.
int GetCount () const
 Gets the number of shortcuts.
virtual bool Save (wxConfigBase &config)
 Saves customisation to config.
virtual bool Load (wxConfigBase &config)
 Load customisation from config.
virtual bool SaveOriginalShortcuts ()
 Save current state to original shortcut store.
virtual bool ResetShortcuts ()
 Restore original shortcuts.
virtual wxAcceleratorTable MakeAcceleratorTable ()
 Make an accelerator table.
virtual bool SetAcceleratorTable (wxWindow *window)
 Makes and sets the accelerator table into a particular window.
virtual bool UpdateMenuBar (wxMenuBar *menuBar)
 Updates labels with new accelerators.
virtual bool UpdateMenu (wxMenu *menu)
 Updates labels with new accelerators.
wxShortcutItemArray & GetShortcuts ()
 Returns the array of shortcuts.
virtual wxString GetReadableShortcutString (const wxShortcutItem &item) const
 Returns a human-readable string for the shortcut.
virtual wxString GetMenuShortcutString (const wxShortcutItem &item) const
 Returns a shortcut string suitable for adding to menu item.
wxShortcutItemArray GetMatchingShortcuts (const wxShortcutItem &item, int idException=-1) const
 Return an array of all the shortcut items that have the given shortcut, except idException (if not -1).

Static Public Member Functions

static bool IsValidShortcutKeyCode (int keycode)
 Is this a valid shortcut keycode?

Protected Attributes

wxShortcutItemArray m_shortcuts
wxShortcutItemArray m_originalShortcuts


Detailed Description

This class stores customisation information for the application.

Constructor & Destructor Documentation

wxShortcutManager::wxShortcutManager ( const wxShortcutManager manager  )  [inline]

wxShortcutManager::wxShortcutManager (  )  [inline]

wxShortcutManager::~wxShortcutManager (  )  [inline]


Member Function Documentation

void wxShortcutManager::Add ( const wxShortcutItem info  ) 

Adds information about a shortcut.

void wxShortcutManager::Clear (  ) 

Clears the items.

void wxShortcutManager::Copy ( const wxShortcutManager manager  ) 

Copies the shortcuts.

wxShortcutItem * wxShortcutManager::Find ( const wxString &  name  )  const

Finds information about a shortcut.

wxShortcutItem * wxShortcutManager::FindById ( int  id  )  const

Finds a shortcut by id.

int wxShortcutManager::FindIndex ( const wxString &  name  )  const

Finds the nth shortcut for the given name.

int wxShortcutManager::GetCount (  )  const [inline]

Gets the number of shortcuts.

wxShortcutItemArray wxShortcutManager::GetMatchingShortcuts ( const wxShortcutItem item,
int  idException = -1 
) const

Return an array of all the shortcut items that have the given shortcut, except idException (if not -1).

wxString wxShortcutManager::GetMenuShortcutString ( const wxShortcutItem item  )  const [virtual]

Returns a shortcut string suitable for adding to menu item.

wxShortcutItem * wxShortcutManager::GetNth ( int  n  )  const

Gets the nth record.

wxString wxShortcutManager::GetReadableShortcutString ( const wxShortcutItem item  )  const [virtual]

Returns a human-readable string for the shortcut.

wxShortcutItemArray& wxShortcutManager::GetShortcuts (  )  [inline]

Returns the array of shortcuts.

void wxShortcutManager::Init (  ) 

Initialises the class.

bool wxShortcutManager::IsValidShortcutKeyCode ( int  keycode  )  [static]

Is this a valid shortcut keycode?

bool wxShortcutManager::Load ( wxConfigBase &  config  )  [virtual]

Load customisation from config.

wxAcceleratorTable wxShortcutManager::MakeAcceleratorTable (  )  [virtual]

Make an accelerator table.

bool wxShortcutManager::ResetShortcuts (  )  [virtual]

Restore original shortcuts.

bool wxShortcutManager::Save ( wxConfigBase &  config  )  [virtual]

Saves customisation to config.

bool wxShortcutManager::SaveOriginalShortcuts (  )  [virtual]

Save current state to original shortcut store.

bool wxShortcutManager::SetAcceleratorTable ( wxWindow *  window  )  [virtual]

Makes and sets the accelerator table into a particular window.

bool wxShortcutManager::UpdateMenu ( wxMenu *  menu  )  [virtual]

Updates labels with new accelerators.

bool wxShortcutManager::UpdateMenuBar ( wxMenuBar *  menuBar  )  [virtual]

Updates labels with new accelerators.


Member Data Documentation

wxShortcutItemArray wxShortcutManager::m_originalShortcuts [protected]

wxShortcutItemArray wxShortcutManager::m_shortcuts [protected]


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

Generated on Wed May 6 19:22:09 2009 for AxTk by  doxygen 1.5.8