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