]>
Commit | Line | Data |
---|---|---|
0e320a79 DW |
1 | ///////////////////////////////////////////////////////////////////////////// |
2 | // Name: accel.h | |
3 | // Purpose: wxAcceleratorTable class | |
d88de032 | 4 | // Author: David Webster |
0e320a79 | 5 | // Modified by: |
d88de032 | 6 | // Created: 10/13/99 |
0e320a79 | 7 | // RCS-ID: $Id$ |
d88de032 | 8 | // Copyright: (c) David Webster |
65571936 | 9 | // Licence: wxWindows licence |
0e320a79 DW |
10 | ///////////////////////////////////////////////////////////////////////////// |
11 | ||
12 | #ifndef _WX_ACCEL_H_ | |
13 | #define _WX_ACCEL_H_ | |
14 | ||
0e320a79 | 15 | #include "wx/object.h" |
0e320a79 DW |
16 | |
17 | class WXDLLEXPORT wxAcceleratorTable; | |
18 | ||
19 | // Hold Ctrl key down | |
20 | #define wxACCEL_ALT 0x01 | |
21 | ||
22 | // Hold Ctrl key down | |
23 | #define wxACCEL_CTRL 0x02 | |
24 | ||
25 | // Hold Shift key down | |
26 | #define wxACCEL_SHIFT 0x04 | |
27 | ||
28 | // Hold no key down | |
29 | #define wxACCEL_NORMAL 0x00 | |
30 | ||
0e320a79 DW |
31 | class WXDLLEXPORT wxAcceleratorTable: public wxObject |
32 | { | |
33 | DECLARE_DYNAMIC_CLASS(wxAcceleratorTable) | |
34 | public: | |
35 | wxAcceleratorTable(); | |
f6bcfd97 BP |
36 | wxAcceleratorTable(const wxString& rsResource); // Load from .rc resource |
37 | wxAcceleratorTable( int n | |
3c674514 | 38 | ,const wxAcceleratorEntry vaEntries[] |
f6bcfd97 | 39 | ); // Load from array |
0e320a79 | 40 | |
d3c7fc99 | 41 | virtual ~wxAcceleratorTable(); |
0e320a79 | 42 | |
0e70f525 | 43 | inline bool operator== (const wxAcceleratorTable& rAccel) const |
f6bcfd97 | 44 | { return m_refData == rAccel.m_refData; }; |
0e70f525 | 45 | inline bool operator!= (const wxAcceleratorTable& rAccel) const |
f6bcfd97 | 46 | { return m_refData != rAccel.m_refData; }; |
0e320a79 | 47 | |
b7cacb43 VZ |
48 | bool Ok() const { return IsOk(); } |
49 | bool IsOk() const; | |
75f11ad7 | 50 | void SetHACCEL(WXHACCEL hAccel); |
f6bcfd97 | 51 | WXHACCEL GetHACCEL(void) const; |
75f11ad7 DW |
52 | |
53 | // translate the accelerator, return TRUE if done | |
f6bcfd97 BP |
54 | bool Translate( WXHWND hWnd |
55 | ,WXMSG* pMsg | |
56 | ) const; | |
0e320a79 DW |
57 | }; |
58 | ||
59 | WXDLLEXPORT_DATA(extern wxAcceleratorTable) wxNullAcceleratorTable; | |
60 | ||
3a7c1253 | 61 | WXDLLEXPORT wxString wxPMTextToLabel(const wxString& rsTitle); |
0e320a79 DW |
62 | #endif |
63 | // _WX_ACCEL_H_ |