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