]> git.saurik.com Git - wxWidgets.git/blame - include/wx/generic/accel.h
include wx/object.h now that wxConfigBase derives from wxObject
[wxWidgets.git] / include / wx / generic / accel.h
CommitLineData
21aeca5e
VZ
1/////////////////////////////////////////////////////////////////////////////
2// Name: wx/generic/accel.h
3// Purpose: wxAcceleratorTable class
4// Author: Robert Roebling
5// RCS-ID: $Id$
6// Copyright: (c) Robert Roebling
65571936 7// Licence: wxWindows licence
21aeca5e
VZ
8/////////////////////////////////////////////////////////////////////////////
9
10#ifndef _WX_GENERIC_ACCEL_H_
11#define _WX_GENERIC_ACCEL_H_
12
21aeca5e
VZ
13class WXDLLEXPORT wxKeyEvent;
14
15// ----------------------------------------------------------------------------
16// wxAcceleratorTable
17// ----------------------------------------------------------------------------
18
19class WXDLLEXPORT wxAcceleratorTable : public wxObject
20{
21public:
22 wxAcceleratorTable();
3c674514 23 wxAcceleratorTable(int n, const wxAcceleratorEntry entries[]);
21aeca5e
VZ
24 virtual ~wxAcceleratorTable();
25
b7cacb43
VZ
26 bool Ok() const { return IsOk(); }
27 bool IsOk() const;
21aeca5e
VZ
28
29 void Add(const wxAcceleratorEntry& entry);
30 void Remove(const wxAcceleratorEntry& entry);
31
32 // implementation
33 // --------------
34
35 wxMenuItem *GetMenuItem(const wxKeyEvent& event) const;
36 int GetCommand(const wxKeyEvent& event) const;
37
38 const wxAcceleratorEntry *GetEntry(const wxKeyEvent& event) const;
39
fa03793d
VS
40protected:
41 // ref counting code
42 virtual wxObjectRefData *CreateRefData() const;
43 virtual wxObjectRefData *CloneRefData(const wxObjectRefData *data) const;
44
21aeca5e
VZ
45private:
46 DECLARE_DYNAMIC_CLASS(wxAcceleratorTable)
47};
48
49#endif // _WX_GENERIC_ACCEL_H_
50