]> git.saurik.com Git - wxWidgets.git/blame - src/mac/accel.cpp
Added wxYieldIfNeeded
[wxWidgets.git] / src / mac / accel.cpp
CommitLineData
e9576ca5
SC
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
2f1ae414 20#if !USE_SHARED_LIBRARIES
e9576ca5 21IMPLEMENT_DYNAMIC_CLASS(wxAcceleratorTable, wxObject)
2f1ae414 22#endif
e9576ca5
SC
23
24class WXDLLEXPORT wxAcceleratorRefData: public wxObjectRefData
25{
26 friend class WXDLLEXPORT wxAcceleratorTable;
27public:
28 wxAcceleratorRefData();
29 ~wxAcceleratorRefData();
30
31/* TODO: implementation
32 inline HACCEL GetHACCEL() const { return m_hAccel; }
33protected:
34 HACCEL m_hAccel;
35*/
36};
37
38#define M_ACCELDATA ((wxAcceleratorRefData *)m_refData)
39
40wxAcceleratorRefData::wxAcceleratorRefData()
41{
42 // TODO
43/*
44 HACCEL m_hAccel;
45*/
46}
47
48wxAcceleratorRefData::~wxAcceleratorRefData()
49{
50/*
51 if (m_hAccel)
52 {
53 DestroyAcceleratorTable((HACCEL) m_hAccel);
54 }
55 m_hAccel = 0 ;
56*/
57}
58
59wxAcceleratorTable::wxAcceleratorTable()
60{
61 m_refData = NULL;
62}
63
64wxAcceleratorTable::~wxAcceleratorTable()
65{
66}
67
68// Load from .rc resource
69wxAcceleratorTable::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
80wxAcceleratorTable::wxAcceleratorTable(int n, wxAcceleratorEntry entries[])
81{
82 m_refData = new wxAcceleratorRefData;
83
84/* TODO: create table from entries
85 */
86}
87
88bool wxAcceleratorTable::Ok() const
89{
90 // TODO
91 return FALSE;
92}
93