1 /////////////////////////////////////////////////////////////////////////////
3 // Purpose: wxAcceleratorTable class
4 // Author: David Webster
8 // Copyright: (c) David Webster
9 // Licence: wxWindows licence
10 /////////////////////////////////////////////////////////////////////////////
15 #include "wx/object.h"
17 class WXDLLEXPORT wxAcceleratorTable
;
20 #define wxACCEL_ALT 0x01
23 #define wxACCEL_CTRL 0x02
25 // Hold Shift key down
26 #define wxACCEL_SHIFT 0x04
29 #define wxACCEL_NORMAL 0x00
31 class WXDLLEXPORT wxAcceleratorTable
: public wxObject
33 DECLARE_DYNAMIC_CLASS(wxAcceleratorTable
)
36 wxAcceleratorTable(const wxString
& rsResource
); // Load from .rc resource
37 wxAcceleratorTable( int n
38 ,const wxAcceleratorEntry vaEntries
[]
42 inline wxAcceleratorTable(const wxAcceleratorTable
& rAccel
) { Ref(rAccel
); }
43 inline wxAcceleratorTable(const wxAcceleratorTable
* pAccel
) { if (pAccel
) Ref(*pAccel
); }
45 ~wxAcceleratorTable();
47 inline wxAcceleratorTable
& operator = (const wxAcceleratorTable
& rAccel
)
48 { if (*this == rAccel
) return (*this); Ref(rAccel
); return *this; };
49 inline bool operator== (const wxAcceleratorTable
& rAccel
) const
50 { return m_refData
== rAccel
.m_refData
; };
51 inline bool operator!= (const wxAcceleratorTable
& rAccel
) const
52 { return m_refData
!= rAccel
.m_refData
; };
55 void SetHACCEL(WXHACCEL hAccel
);
56 WXHACCEL
GetHACCEL(void) const;
58 // translate the accelerator, return TRUE if done
59 bool Translate( WXHWND hWnd
64 WXDLLEXPORT_DATA(extern wxAcceleratorTable
) wxNullAcceleratorTable
;
66 WXDLLEXPORT wxString
wxPMTextToLabel(const wxString
& rsTitle
);