1 /////////////////////////////////////////////////////////////////////////////
3 // Purpose: wxAcceleratorTable
8 // Copyright: (c) AUTHOR
9 // Licence: wxWindows licence
10 /////////////////////////////////////////////////////////////////////////////
13 #pragma implementation "accel.h"
19 #if !USE_SHARED_LIBRARIES
20 IMPLEMENT_DYNAMIC_CLASS(wxAcceleratorTable
, wxObject
)
23 class WXDLLEXPORT wxAcceleratorRefData
: public wxObjectRefData
25 friend class WXDLLEXPORT wxAcceleratorTable
;
27 wxAcceleratorRefData();
28 ~wxAcceleratorRefData();
30 /* TODO: implementation
31 inline HACCEL GetHACCEL() const { return m_hAccel; }
37 #define M_ACCELDATA ((wxAcceleratorRefData *)m_refData)
39 wxAcceleratorRefData::wxAcceleratorRefData()
47 wxAcceleratorRefData::~wxAcceleratorRefData()
52 DestroyAcceleratorTable((HACCEL) m_hAccel);
58 wxAcceleratorTable::wxAcceleratorTable()
63 wxAcceleratorTable::~wxAcceleratorTable()
67 // Load from .rc resource
68 wxAcceleratorTable::wxAcceleratorTable(const wxString
& resource
)
70 m_refData
= new wxAcceleratorRefData
;
72 /* TODO: load acelerator from resource, if appropriate for your platform
73 M_ACCELDATA->m_hAccel = hAccel;
74 M_ACCELDATA->m_ok = (hAccel != 0);
78 // Create from an array
79 wxAcceleratorTable::wxAcceleratorTable(int n
, wxAcceleratorEntry entries
[])
81 m_refData
= new wxAcceleratorRefData
;
83 /* TODO: create table from entries
87 bool wxAcceleratorTable::Ok() const