1 /////////////////////////////////////////////////////////////////////////////
3 // Purpose: wxAcceleratorTable
8 // Copyright: (c) AUTHOR
9 // Licence: wxWindows licence
10 /////////////////////////////////////////////////////////////////////////////
13 #pragma implementation "accel.h"
18 #include "wx/string.h"
20 #if !USE_SHARED_LIBRARIES
21 IMPLEMENT_DYNAMIC_CLASS(wxAcceleratorTable
, wxObject
)
24 class WXDLLEXPORT wxAcceleratorRefData
: public wxObjectRefData
26 friend class WXDLLEXPORT wxAcceleratorTable
;
28 wxAcceleratorRefData();
29 ~wxAcceleratorRefData();
31 /* TODO: implementation
32 inline HACCEL GetHACCEL() const { return m_hAccel; }
38 #define M_ACCELDATA ((wxAcceleratorRefData *)m_refData)
40 wxAcceleratorRefData::wxAcceleratorRefData()
48 wxAcceleratorRefData::~wxAcceleratorRefData()
53 DestroyAcceleratorTable((HACCEL) m_hAccel);
59 wxAcceleratorTable::wxAcceleratorTable()
64 wxAcceleratorTable::~wxAcceleratorTable()
68 // Load from .rc resource
69 wxAcceleratorTable::wxAcceleratorTable(const wxString
& resource
)
71 m_refData
= new wxAcceleratorRefData
;
73 /* TODO: load acelerator from resource, if appropriate for your platform
74 M_ACCELDATA->m_hAccel = hAccel;
75 M_ACCELDATA->m_ok = (hAccel != 0);
79 // Create from an array
80 wxAcceleratorTable::wxAcceleratorTable(int n
, wxAcceleratorEntry entries
[])
82 m_refData
= new wxAcceleratorRefData
;
84 /* TODO: create table from entries
88 bool wxAcceleratorTable::Ok() const