1 /////////////////////////////////////////////////////////////////////////////
2 // Name: wx/palmos/accel.h
3 // Purpose: wxAcceleratorTable class
4 // Author: William Osborne - minimal working wxPalmOS port
8 // Copyright: (c) William Osborne
9 // Licence: wxWindows licence
10 /////////////////////////////////////////////////////////////////////////////
15 #if defined(__GNUG__) && !defined(NO_GCC_PRAGMA)
16 #pragma interface "accel.h"
19 // ----------------------------------------------------------------------------
20 // the accel table has all accelerators for a given window or menu
21 // ----------------------------------------------------------------------------
23 class WXDLLEXPORT wxAcceleratorTable
: public wxObject
30 wxAcceleratorTable(const wxAcceleratorTable
& accel
) { Ref(accel
); }
32 // load from .rc resource (Windows specific)
33 wxAcceleratorTable(const wxString
& resource
);
35 // initialize from array
36 wxAcceleratorTable(int n
, const wxAcceleratorEntry entries
[]);
38 virtual ~wxAcceleratorTable();
40 wxAcceleratorTable
& operator = (const wxAcceleratorTable
& accel
) { if ( *this != accel
) Ref(accel
); return *this; }
42 #if WXWIN_COMPATIBILITY_2_4
43 bool operator==(const wxAcceleratorTable
& accel
) const
44 { return m_refData
== accel
.m_refData
; }
45 bool operator!=(const wxAcceleratorTable
& accel
) const
46 { return !(*this == accel
); }
50 void SetHACCEL(WXHACCEL hAccel
);
51 WXHACCEL
GetHACCEL() const;
53 // translate the accelerator, return true if done
54 bool Translate(wxWindow
*window
, WXMSG
*msg
) const;
57 DECLARE_DYNAMIC_CLASS(wxAcceleratorTable
)