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