]>
Commit | Line | Data |
---|---|---|
8cf73271 SC |
1 | ///////////////////////////////////////////////////////////////////////////// |
2 | // Name: accel.h | |
3 | // Purpose: wxAcceleratorTable class | |
4 | // Author: Stefan Csomor | |
5 | // Modified by: | |
6 | // Created: 1998-01-01 | |
7 | // RCS-ID: $Id$ | |
8 | // Copyright: (c) Stefan Csomor | |
65571936 | 9 | // Licence: wxWindows licence |
8cf73271 SC |
10 | ///////////////////////////////////////////////////////////////////////////// |
11 | ||
12 | #ifndef _WX_ACCEL_H_ | |
13 | #define _WX_ACCEL_H_ | |
14 | ||
8cf73271 SC |
15 | #include "wx/string.h" |
16 | #include "wx/event.h" | |
17 | ||
18 | class WXDLLEXPORT wxAcceleratorTable: public wxObject | |
19 | { | |
20 | DECLARE_DYNAMIC_CLASS(wxAcceleratorTable) | |
21 | public: | |
22 | wxAcceleratorTable(); | |
23 | wxAcceleratorTable(int n, const wxAcceleratorEntry entries[]); // Load from array | |
24 | ||
25 | // Copy constructors | |
26 | wxAcceleratorTable(const wxAcceleratorTable& accel) | |
27 | : wxObject() | |
28 | { Ref(accel); } | |
29 | wxAcceleratorTable(const wxAcceleratorTable* accel) | |
30 | { if (accel) Ref(*accel); } | |
31 | ||
32 | ~wxAcceleratorTable(); | |
33 | ||
34 | wxAcceleratorTable& operator = (const wxAcceleratorTable& accel) | |
35 | { if (*this == accel) return (*this); Ref(accel); return *this; } | |
fbfb8bcc | 36 | bool operator == (const wxAcceleratorTable& accel) const |
8cf73271 | 37 | { return m_refData == accel.m_refData; } |
fbfb8bcc | 38 | bool operator != (const wxAcceleratorTable& accel) const |
8cf73271 SC |
39 | { return m_refData != accel.m_refData; } |
40 | ||
41 | bool Ok() const; | |
42 | ||
43 | int GetCommand( wxKeyEvent &event ); | |
44 | }; | |
45 | ||
46 | // WXDLLEXPORT_DATA(extern wxAcceleratorTable) wxNullAcceleratorTable; | |
47 | ||
48 | #endif | |
49 | // _WX_ACCEL_H_ |