2008-03-08 08:52:38 -05:00
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
|
|
// Name: accel.h
|
|
|
|
// Purpose: documentation for wxAcceleratorEntry class
|
|
|
|
// Author: wxWidgets team
|
|
|
|
// RCS-ID: $Id$
|
|
|
|
// Licence: wxWindows license
|
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
|
|
|
/**
|
|
|
|
@class wxAcceleratorEntry
|
|
|
|
@wxheader{accel.h}
|
2008-03-08 09:43:31 -05:00
|
|
|
|
2008-03-08 08:52:38 -05:00
|
|
|
An object used by an application wishing to create an @ref
|
|
|
|
overview_wxacceleratortable "accelerator table".
|
2008-03-08 09:43:31 -05:00
|
|
|
|
2008-03-08 08:52:38 -05:00
|
|
|
@library{wxcore}
|
|
|
|
@category{FIXME}
|
2008-03-08 09:43:31 -05:00
|
|
|
|
2008-03-08 08:52:38 -05:00
|
|
|
@seealso
|
|
|
|
wxAcceleratorTable, wxWindow::SetAcceleratorTable
|
|
|
|
*/
|
2008-03-08 09:43:31 -05:00
|
|
|
class wxAcceleratorEntry
|
2008-03-08 08:52:38 -05:00
|
|
|
{
|
|
|
|
public:
|
|
|
|
//@{
|
|
|
|
/**
|
|
|
|
Constructor.
|
|
|
|
|
2008-03-08 09:43:31 -05:00
|
|
|
@param flags
|
2008-03-09 08:33:59 -04:00
|
|
|
One of wxACCEL_ALT, wxACCEL_SHIFT, wxACCEL_CTRL and wxACCEL_NORMAL.
|
|
|
|
Indicates
|
|
|
|
which modifier key is held down.
|
2008-03-08 09:43:31 -05:00
|
|
|
@param keyCode
|
2008-03-09 08:33:59 -04:00
|
|
|
The keycode to be detected. See Keycodes for a full list of keycodes.
|
2008-03-08 09:43:31 -05:00
|
|
|
@param cmd
|
2008-03-09 08:33:59 -04:00
|
|
|
The menu or control command identifier.
|
2008-03-08 08:52:38 -05:00
|
|
|
*/
|
|
|
|
wxAcceleratorEntry();
|
2008-03-08 09:43:31 -05:00
|
|
|
wxAcceleratorEntry(int flags, int keyCode, int cmd);
|
2008-03-08 08:52:38 -05:00
|
|
|
//@}
|
|
|
|
|
|
|
|
/**
|
|
|
|
Returns the command identifier for the accelerator table entry.
|
|
|
|
*/
|
2008-03-09 12:24:26 -04:00
|
|
|
int GetCommand() const;
|
2008-03-08 08:52:38 -05:00
|
|
|
|
|
|
|
/**
|
|
|
|
Returns the flags for the accelerator table entry.
|
|
|
|
*/
|
2008-03-09 12:24:26 -04:00
|
|
|
int GetFlags() const;
|
2008-03-08 08:52:38 -05:00
|
|
|
|
|
|
|
/**
|
|
|
|
Returns the keycode for the accelerator table entry.
|
|
|
|
*/
|
2008-03-09 12:24:26 -04:00
|
|
|
int GetKeyCode() const;
|
2008-03-08 08:52:38 -05:00
|
|
|
|
|
|
|
/**
|
|
|
|
Sets the accelerator entry parameters.
|
|
|
|
|
2008-03-08 09:43:31 -05:00
|
|
|
@param flags
|
2008-03-09 08:33:59 -04:00
|
|
|
One of wxACCEL_ALT, wxACCEL_SHIFT, wxACCEL_CTRL and wxACCEL_NORMAL.
|
|
|
|
Indicates
|
|
|
|
which modifier key is held down.
|
2008-03-08 09:43:31 -05:00
|
|
|
@param keyCode
|
2008-03-09 08:33:59 -04:00
|
|
|
The keycode to be detected. See Keycodes for a full list of keycodes.
|
2008-03-08 09:43:31 -05:00
|
|
|
@param cmd
|
2008-03-09 08:33:59 -04:00
|
|
|
The menu or control command identifier.
|
2008-03-08 08:52:38 -05:00
|
|
|
*/
|
2008-03-09 08:33:59 -04:00
|
|
|
void Set(int flags, int keyCode, int cmd);
|
2008-03-08 08:52:38 -05:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
@class wxAcceleratorTable
|
|
|
|
@wxheader{accel.h}
|
2008-03-08 09:43:31 -05:00
|
|
|
|
2008-03-08 08:52:38 -05:00
|
|
|
An accelerator table allows the application to specify a table of keyboard
|
|
|
|
shortcuts for
|
|
|
|
menus or other commands. On Windows and Mac OS X, menu or button commands are
|
|
|
|
supported; on GTK,
|
|
|
|
only menu commands are supported.
|
2008-03-08 09:43:31 -05:00
|
|
|
|
2008-03-08 08:52:38 -05:00
|
|
|
The object @b wxNullAcceleratorTable is defined to be a table with no data, and
|
|
|
|
is the
|
|
|
|
initial accelerator table for a window.
|
2008-03-08 09:43:31 -05:00
|
|
|
|
2008-03-08 08:52:38 -05:00
|
|
|
@library{wxcore}
|
|
|
|
@category{misc}
|
2008-03-08 09:43:31 -05:00
|
|
|
|
2008-03-08 08:52:38 -05:00
|
|
|
@stdobjects
|
|
|
|
Objects:
|
|
|
|
wxNullAcceleratorTable
|
2008-03-08 09:43:31 -05:00
|
|
|
|
2008-03-08 08:52:38 -05:00
|
|
|
@seealso
|
|
|
|
wxAcceleratorEntry, wxWindow::SetAcceleratorTable
|
|
|
|
*/
|
|
|
|
class wxAcceleratorTable : public wxObject
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
//@{
|
|
|
|
/**
|
|
|
|
Loads the accelerator table from a Windows resource (Windows only).
|
|
|
|
|
2008-03-08 09:43:31 -05:00
|
|
|
@param n
|
2008-03-09 08:33:59 -04:00
|
|
|
Number of accelerator entries.
|
2008-03-08 09:43:31 -05:00
|
|
|
@param entries
|
2008-03-09 08:33:59 -04:00
|
|
|
The array of entries.
|
2008-03-08 09:43:31 -05:00
|
|
|
@param resource
|
2008-03-09 08:33:59 -04:00
|
|
|
Name of a Windows accelerator.
|
2008-03-08 08:52:38 -05:00
|
|
|
*/
|
|
|
|
wxAcceleratorTable();
|
2008-03-08 09:43:31 -05:00
|
|
|
wxAcceleratorTable(const wxAcceleratorTable& bitmap);
|
|
|
|
wxAcceleratorTable(int n, wxAcceleratorEntry entries[]);
|
|
|
|
wxAcceleratorTable(const wxString& resource);
|
2008-03-08 08:52:38 -05:00
|
|
|
//@}
|
|
|
|
|
|
|
|
/**
|
|
|
|
Destroys the wxAcceleratorTable object.
|
|
|
|
See @ref overview_refcountdestruct "reference-counted object destruction" for
|
|
|
|
more info.
|
|
|
|
*/
|
|
|
|
~wxAcceleratorTable();
|
|
|
|
|
|
|
|
/**
|
|
|
|
Returns @true if the accelerator table is valid.
|
|
|
|
*/
|
2008-03-09 12:24:26 -04:00
|
|
|
bool IsOk() const;
|
2008-03-08 08:52:38 -05:00
|
|
|
|
|
|
|
/**
|
|
|
|
Assignment operator, using @ref overview_trefcount "reference counting".
|
|
|
|
|
2008-03-08 09:43:31 -05:00
|
|
|
@param accel
|
2008-03-09 08:33:59 -04:00
|
|
|
Accelerator table to assign.
|
2008-03-08 08:52:38 -05:00
|
|
|
*/
|
|
|
|
wxAcceleratorTable operator =(const wxAcceleratorTable& accel);
|
|
|
|
};
|