1 /////////////////////////////////////////////////////////////////////////////
3 // Purpose: wxAcceleratorTable
8 // Copyright: (c) AUTHOR
9 // Licence: wxWindows licence
10 /////////////////////////////////////////////////////////////////////////////
13 #pragma implementation "accel.h"
18 #include "wx/string.h"
20 IMPLEMENT_DYNAMIC_CLASS(wxAcceleratorTable
, wxObject
)
22 class WXDLLEXPORT wxAcceleratorRefData
: public wxObjectRefData
24 friend class WXDLLEXPORT wxAcceleratorTable
;
26 wxAcceleratorRefData();
27 ~wxAcceleratorRefData();
29 /* TODO: implementation
30 inline HACCEL GetHACCEL() const { return m_hAccel; }
36 #define M_ACCELDATA ((wxAcceleratorRefData *)m_refData)
38 wxAcceleratorRefData::wxAcceleratorRefData()
46 wxAcceleratorRefData::~wxAcceleratorRefData()
51 DestroyAcceleratorTable((HACCEL) m_hAccel);
57 wxAcceleratorTable::wxAcceleratorTable()
62 wxAcceleratorTable::~wxAcceleratorTable()
66 // Load from .rc resource
67 wxAcceleratorTable::wxAcceleratorTable(const wxString
& resource
)
69 m_refData
= new wxAcceleratorRefData
;
71 /* TODO: load acelerator from resource, if appropriate for your platform
72 M_ACCELDATA->m_hAccel = hAccel;
73 M_ACCELDATA->m_ok = (hAccel != 0);
77 // Create from an array
78 wxAcceleratorTable::wxAcceleratorTable(int n
, wxAcceleratorEntry entries
[])
80 m_refData
= new wxAcceleratorRefData
;
82 /* TODO: create table from entries
86 bool wxAcceleratorTable::Ok() const