]> git.saurik.com Git - wxWidgets.git/blob - src/stubs/accel.cpp
Added stubs .cpp files.
[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
19 #if !USE_SHARED_LIBRARIES
20 IMPLEMENT_DYNAMIC_CLASS(wxAcceleratorTable, wxObject)
21 #endif
22
23 class WXDLLEXPORT wxAcceleratorRefData: public wxObjectRefData
24 {
25 friend class WXDLLEXPORT wxAcceleratorTable;
26 public:
27 wxAcceleratorRefData();
28 ~wxAcceleratorRefData();
29
30 /* TODO: implementation
31 inline HACCEL GetHACCEL() const { return m_hAccel; }
32 protected:
33 HACCEL m_hAccel;
34 */
35 };
36
37 #define M_ACCELDATA ((wxAcceleratorRefData *)m_refData)
38
39 wxAcceleratorRefData::wxAcceleratorRefData()
40 {
41 // TODO
42 /*
43 HACCEL m_hAccel;
44 */
45 }
46
47 wxAcceleratorRefData::~wxAcceleratorRefData()
48 {
49 /*
50 if (m_hAccel)
51 {
52 DestroyAcceleratorTable((HACCEL) m_hAccel);
53 }
54 m_hAccel = 0 ;
55 */
56 }
57
58 wxAcceleratorTable::wxAcceleratorTable()
59 {
60 m_refData = NULL;
61 }
62
63 wxAcceleratorTable::~wxAcceleratorTable()
64 {
65 }
66
67 // Load from .rc resource
68 wxAcceleratorTable::wxAcceleratorTable(const wxString& resource)
69 {
70 m_refData = new wxAcceleratorRefData;
71
72 /* TODO: load acelerator from resource, if appropriate for your platform
73 M_ACCELDATA->m_hAccel = hAccel;
74 M_ACCELDATA->m_ok = (hAccel != 0);
75 */
76 }
77
78 // Create from an array
79 wxAcceleratorTable::wxAcceleratorTable(int n, wxAcceleratorEntry entries[])
80 {
81 m_refData = new wxAcceleratorRefData;
82
83 /* TODO: create table from entries
84 */
85 }
86
87 bool wxAcceleratorTable::Ok() const
88 {
89 // TODO
90 return FALSE;
91 }
92