]> git.saurik.com Git - wxWidgets.git/blob - include/wx/generic/accel.h
Destroy the wxDialog::ShowWindowModalThenDo() functor a.s.a.p.
[wxWidgets.git] / include / wx / generic / accel.h
1 /////////////////////////////////////////////////////////////////////////////
2 // Name: wx/generic/accel.h
3 // Purpose: wxAcceleratorTable class
4 // Author: Robert Roebling
5 // Copyright: (c) Robert Roebling
6 // Licence: wxWindows licence
7 /////////////////////////////////////////////////////////////////////////////
8
9 #ifndef _WX_GENERIC_ACCEL_H_
10 #define _WX_GENERIC_ACCEL_H_
11
12 class WXDLLIMPEXP_FWD_CORE wxKeyEvent;
13
14 // ----------------------------------------------------------------------------
15 // wxAcceleratorTable
16 // ----------------------------------------------------------------------------
17
18 class WXDLLIMPEXP_CORE wxAcceleratorTable : public wxObject
19 {
20 public:
21 wxAcceleratorTable();
22 wxAcceleratorTable(int n, const wxAcceleratorEntry entries[]);
23 virtual ~wxAcceleratorTable();
24
25 bool Ok() const { return IsOk(); }
26 bool IsOk() const;
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
39 protected:
40 // ref counting code
41 virtual wxObjectRefData *CreateRefData() const;
42 virtual wxObjectRefData *CloneRefData(const wxObjectRefData *data) const;
43
44 private:
45 DECLARE_DYNAMIC_CLASS(wxAcceleratorTable)
46 };
47
48 #endif // _WX_GENERIC_ACCEL_H_
49