wxAcceleratorEntry Class Reference
[Miscellaneous]

#include <wx/accel.h>

List of all members.


Detailed Description

An object used by an application wishing to create an accelerator table (see wxAcceleratorTable).

Library:  wxCore

Category:  Miscellaneous

See also:
wxAcceleratorTable, wxWindow::SetAcceleratorTable

Public Member Functions

 wxAcceleratorEntry (int flags=0, int keyCode=0, int cmd=0, wxMenuItem *item=NULL)
 wxAcceleratorEntry (const wxAcceleratorEntry &entry)
int GetCommand () const
int GetFlags () const
int GetKeyCode () const
wxMenuItemGetMenuItem () const
void Set (int flags, int keyCode, int cmd, wxMenuItem *item=NULL)
bool IsOk () const
wxString ToString () const
bool FromString (const wxString &str)
wxAcceleratorEntryoperator= (const wxAcceleratorEntry &entry)
bool operator== (const wxAcceleratorEntry &entry) const
bool operator!= (const wxAcceleratorEntry &entry) const

Constructor & Destructor Documentation

wxAcceleratorEntry::wxAcceleratorEntry ( int  flags = 0,
int  keyCode = 0,
int  cmd = 0,
wxMenuItem item = NULL 
)

Constructor.

Parameters:
flags A combination of the wxAcceleratorEntryFlags values, which indicates which modifier keys are held down.
keyCode The keycode to be detected. See Keycodes for a full list of keycodes.
cmd The menu or control command identifier (ID).
item The menu item associated with this accelerator.

wxAcceleratorEntry::wxAcceleratorEntry ( const wxAcceleratorEntry entry  ) 

Copy ctor.


Member Function Documentation

int wxAcceleratorEntry::GetCommand (  )  const

Returns the command identifier for the accelerator table entry.

int wxAcceleratorEntry::GetFlags (  )  const

Returns the flags for the accelerator table entry.

int wxAcceleratorEntry::GetKeyCode (  )  const

Returns the keycode for the accelerator table entry.

wxMenuItem* wxAcceleratorEntry::GetMenuItem (  )  const

Returns the menu item associated with this accelerator entry.

void wxAcceleratorEntry::Set ( int  flags,
int  keyCode,
int  cmd,
wxMenuItem item = NULL 
)

Sets the accelerator entry parameters.

Parameters:
flags A combination of the wxAcceleratorEntryFlags values, which indicates which modifier keys are held down.
keyCode The keycode to be detected. See Keycodes for a full list of keycodes.
cmd The menu or control command identifier (ID).
item The menu item associated with this accelerator.

bool wxAcceleratorEntry::IsOk (  )  const

Returns true if this object is correctly initialized.

wxString wxAcceleratorEntry::ToString (  )  const

Returns a wxString for this accelerator. This function formats it using the "flags-keycode" format where flags maybe a hyphen-separed list of "shift|alt|ctrl".

bool wxAcceleratorEntry::FromString ( const wxString str  ) 

Parses the given string and sets the accelerator accordingly.

Parameters:
str Should be a string in the form "flags-keycode"
Returns:
true if the given string correctly initialized this object (i.e. if IsOk() returns true after this call)

wxAcceleratorEntry& wxAcceleratorEntry::operator= ( const wxAcceleratorEntry entry  ) 

bool wxAcceleratorEntry::operator== ( const wxAcceleratorEntry entry  )  const

bool wxAcceleratorEntry::operator!= ( const wxAcceleratorEntry entry  )  const



wxWidgets logo

[ top ]