Main Page | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Class Members | File Members | Related Pages

mcKey Class Reference

#include <MathHelpers.h>

Inheritance diagram for mcKey:

Inheritance graph
[legend]
Collaboration diagram for mcKey:

Collaboration graph
[legend]
List of all members.

Detailed Description

The structure containing all the possible key combinations for a command.

See CUSTOMIZABLE VALUES section for further info.

Definition at line 437 of file MathHelpers.h.

Public Member Functions

void DeepCopy (const mcKey &other)
 Deep copies the given object into this one.
void Cleanup ()
 Deletes the contents of this object.
 mcKey (const wxString &def)
 Init this key combination using the given strings.
 mcKey (const wxChar c, bool bSpecial=FALSE)
 mcKey (const wxKeyEvent &key, bool bSpecial=FALSE)
 mcKey (const mcKey &other)
 mcKey ()
mcKeyoperator= (const mcKey &other)
virtual ~mcKey ()
 Deallocates the mcKeyEntries contained in this object.
bool MatchKey (const wxKeyEvent &ke) const
 Returns TRUE if the given key event matches one of the key entries stored in this class.
bool MatchKey (const mcKey &ke) const
 Returns TRUE if the given mcKey matches one of the key entries stored in this object.
bool isSpecialKey (int n=0) const
 Returns TRUE if the n-th combination contained in this object is set as a special keypress.
void SetAsSpecialKey (int n=0)
 Sets the keypress associated with the n-th combination, associated to this object, as a special keypress: see mcKeyEntry::m_bSpecial.
wxKeyEvent GetEvent (int n=0) const
 Builds the wxKeyEvent associated with the n-th combination associated to this object.
wxChar GetKeyCode (int n=0) const
 Returns the keycode associated with the n-th combination associated to this object.
int GetModifiers (int n=0) const
 Returns the modifiers associated with the n-th combination associated to this object.

Public Attributes

mcKeyEntrym_pMatch [mcKEY_MAX_COMBINATIONS]
 The possible key matches for this command.
wxString m_strDescription
 The description of this key combination.

Protected Member Functions

void Reset ()
 Sets to NULL all the variables of this class.


Constructor & Destructor Documentation

mcKey::mcKey const wxString &  def  )  [inline]
 

Init this key combination using the given strings.

Parameters:
def The string to use to init the key combination. This string should be a concatenation (through semicolons) of init strings of mcKeyEntry. See mcKeyEntry::mcKeyEntry for more info.

Definition at line 491 of file MathHelpers.h.

References m_pMatch, and mcKEY_MAX_COMBINATIONS.

mcKey::mcKey const wxChar  c,
bool  bSpecial = FALSE
[inline]
 

Definition at line 501 of file MathHelpers.h.

References m_pMatch, Reset(), and mcKeyEntry::SetAsSpecialKey().

mcKey::mcKey const wxKeyEvent &  key,
bool  bSpecial = FALSE
[inline]
 

Definition at line 507 of file MathHelpers.h.

References m_pMatch, Reset(), and mcKeyEntry::SetAsSpecialKey().

mcKey::mcKey const mcKey other  )  [inline]
 

Definition at line 513 of file MathHelpers.h.

References DeepCopy(), and Reset().

mcKey::mcKey  )  [inline]
 

Definition at line 518 of file MathHelpers.h.

References Reset().

virtual mcKey::~mcKey  )  [inline, virtual]
 

Deallocates the mcKeyEntries contained in this object.

Definition at line 528 of file MathHelpers.h.

References Cleanup().


Member Function Documentation

void mcKey::Cleanup  )  [inline]
 

Deletes the contents of this object.

Definition at line 479 of file MathHelpers.h.

References m_pMatch, mcKEY_MAX_COMBINATIONS, and mcSAFE_DELETE.

Referenced by DeepCopy(), and ~mcKey().

void mcKey::DeepCopy const mcKey other  )  [inline]
 

Deep copies the given object into this one.

Definition at line 465 of file MathHelpers.h.

References Cleanup(), m_pMatch, and mcKEY_MAX_COMBINATIONS.

Referenced by mcFunction::LoadScriptFile(), mcKey(), and operator=().

wxKeyEvent mcKey::GetEvent int  n = 0  )  const [inline]
 

Builds the wxKeyEvent associated with the n-th combination associated to this object.

Definition at line 592 of file MathHelpers.h.

References mcKeyEntry::GetEvent(), and m_pMatch.

Referenced by mcMonomialHelpers::gui_BackInput().

wxChar mcKey::GetKeyCode int  n = 0  )  const [inline]
 

Returns the keycode associated with the n-th combination associated to this object.

Definition at line 598 of file MathHelpers.h.

References mcKeyEntry::GetKeyCode(), and m_pMatch.

Referenced by mcEmptyBoxHelpers::gui_isEndKey().

int mcKey::GetModifiers int  n = 0  )  const [inline]
 

Returns the modifiers associated with the n-th combination associated to this object.

Definition at line 604 of file MathHelpers.h.

References mcKeyEntry::GetModifiers(), and m_pMatch.

bool mcKey::isSpecialKey int  n = 0  )  const [inline]
 

Returns TRUE if the n-th combination contained in this object is set as a special keypress.

Definition at line 580 of file MathHelpers.h.

References mcKeyEntry::isSpecialKey(), and m_pMatch.

bool mcKey::MatchKey const mcKey ke  )  const [inline]
 

Returns TRUE if the given mcKey matches one of the key entries stored in this object.

Definition at line 565 of file MathHelpers.h.

References m_pMatch, mcKeyEntry::MatchKey(), and mcKEY_MAX_COMBINATIONS.

bool mcKey::MatchKey const wxKeyEvent &  ke  )  const [inline]
 

Returns TRUE if the given key event matches one of the key entries stored in this class.

Definition at line 555 of file MathHelpers.h.

References m_pMatch, mcKeyEntry::MatchKey(), and mcKEY_MAX_COMBINATIONS.

Referenced by mcEmptyBoxHelpers::gui_Input(), mcDecorationHelpers::gui_Input(), mcFractionHelpers::gui_isEndKey(), and mcMathCore::MatchEditKeys().

mcKey& mcKey::operator= const mcKey other  )  [inline]
 

Definition at line 522 of file MathHelpers.h.

References DeepCopy().

void mcKey::Reset  )  [inline, protected]
 

Sets to NULL all the variables of this class.

To be used only in mcKey constructors to avoid the repetitions of the initialization loop.

Warning:
DO NOT USE THIS FUNCTION TO REMOVE THE mcKeyEntry CURRENTLY ASSOCIATED: USE Cleanup() INSTEAD !!!

Definition at line 447 of file MathHelpers.h.

References m_pMatch, m_strDescription, and mcKEY_MAX_COMBINATIONS.

Referenced by mcKey().

void mcKey::SetAsSpecialKey int  n = 0  )  [inline]
 

Sets the keypress associated with the n-th combination, associated to this object, as a special keypress: see mcKeyEntry::m_bSpecial.

Definition at line 586 of file MathHelpers.h.

References m_pMatch, and mcKeyEntry::SetAsSpecialKey().


Member Data Documentation

mcKeyEntry* mcKey::m_pMatch[mcKEY_MAX_COMBINATIONS]
 

The possible key matches for this command.

Definition at line 457 of file MathHelpers.h.

Referenced by Cleanup(), DeepCopy(), GetEvent(), GetKeyCode(), GetModifiers(), isSpecialKey(), MatchKey(), mcKey(), Reset(), and SetAsSpecialKey().

wxString mcKey::m_strDescription
 

The description of this key combination.

Definition at line 460 of file MathHelpers.h.

Referenced by Reset().


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

Documentation generated with Doxygen on Sun Feb 6 17:12:42 2005
Visit MathStudio home page for more info

[ Top ]