]> git.saurik.com Git - wxWidgets.git/blob - src/stubs/accel.cpp
fixed typo : _ instead of wxT
[wxWidgets.git] / src / stubs / accel.cpp
1 /////////////////////////////////////////////////////////////////////////////
2 // Name: accel.cpp
3 // Purpose: wxAcceleratorTable
4 // Author: AUTHOR
5 // Modified by:
6 // Created: ??/??/98
7 // RCS-ID: $Id$
8 // Copyright: (c) AUTHOR
9 // Licence: wxWindows licence
10 /////////////////////////////////////////////////////////////////////////////
11
12 #ifdef __GNUG__
13 #pragma implementation "accel.h"
14 #endif
15
16 #include "wx/setup.h"
17 #include "wx/accel.h"
18 #include "wx/string.h"
19
20 IMPLEMENT_DYNAMIC_CLASS(wxAcceleratorTable, wxObject)
21
22 class WXDLLEXPORT wxAcceleratorRefData: public wxObjectRefData
23 {
24 friend class WXDLLEXPORT wxAcceleratorTable;
25 public:
26 wxAcceleratorRefData();
27 ~wxAcceleratorRefData();
28
29 /* TODO: implementation
30 inline HACCEL GetHACCEL() const { return m_hAccel; }
31 protected:
32 HACCEL m_hAccel;
33 */
34 };
35
36 #define M_ACCELDATA ((wxAcceleratorRefData *)m_refData)
37
38 wxAcceleratorRefData::wxAcceleratorRefData()
39 {
40 // TODO
41 /*
42 HACCEL m_hAccel;
43 */
44 }
45
46 wxAcceleratorRefData::~wxAcceleratorRefData()
47 {
48 /*
49 if (m_hAccel)
50 {
51 DestroyAcceleratorTable((HACCEL) m_hAccel);
52 }
53 m_hAccel = 0 ;
54 */
55 }
56
57 wxAcceleratorTable::wxAcceleratorTable()
58 {
59 m_refData = NULL;
60 }
61
62 wxAcceleratorTable::~wxAcceleratorTable()
63 {
64 }
65
66 // Load from .rc resource
67 wxAcceleratorTable::wxAcceleratorTable(const wxString& resource)
68 {
69 m_refData = new wxAcceleratorRefData;
70
71 /* TODO: load acelerator from resource, if appropriate for your platform
72 M_ACCELDATA->m_hAccel = hAccel;
73 M_ACCELDATA->m_ok = (hAccel != 0);
74 */
75 }
76
77 // Create from an array
78 wxAcceleratorTable::wxAcceleratorTable(int n, wxAcceleratorEntry entries[])
79 {
80 m_refData = new wxAcceleratorRefData;
81
82 /* TODO: create table from entries
83 */
84 }
85
86 bool wxAcceleratorTable::Ok() const
87 {
88 // TODO
89 return FALSE;
90 }
91