]> git.saurik.com Git - wxWidgets.git/blame - include/wx/generic/accel.h
Added wxFopen to the MSLU code.
[wxWidgets.git] / include / wx / generic / accel.h
CommitLineData
21aeca5e
VZ
1/////////////////////////////////////////////////////////////////////////////
2// Name: wx/generic/accel.h
3// Purpose: wxAcceleratorTable class
4// Author: Robert Roebling
5// RCS-ID: $Id$
6// Copyright: (c) Robert Roebling
65571936 7// Licence: wxWindows licence
21aeca5e
VZ
8/////////////////////////////////////////////////////////////////////////////
9
10#ifndef _WX_GENERIC_ACCEL_H_
11#define _WX_GENERIC_ACCEL_H_
12
12028905 13#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA)
21aeca5e
VZ
14#pragma interface "accel.h"
15#endif
16
17class WXDLLEXPORT wxKeyEvent;
18
19// ----------------------------------------------------------------------------
20// wxAcceleratorTable
21// ----------------------------------------------------------------------------
22
23class WXDLLEXPORT wxAcceleratorTable : public wxObject
24{
25public:
26 wxAcceleratorTable();
3c674514 27 wxAcceleratorTable(int n, const wxAcceleratorEntry entries[]);
21aeca5e
VZ
28 virtual ~wxAcceleratorTable();
29
30 wxAcceleratorTable(const wxAcceleratorTable& accel)
d84afea9
GD
31 : wxObject()
32 { Ref(accel); }
21aeca5e
VZ
33 wxAcceleratorTable& operator=(const wxAcceleratorTable& accel)
34 { if ( m_refData != accel.m_refData ) Ref(accel); return *this; }
35
84df1042 36#if WXWIN_COMPATIBILITY_2_4
21aeca5e 37 bool operator==(const wxAcceleratorTable& accel) const
84df1042 38 { return m_refData == accel.m_refData; }
21aeca5e
VZ
39 bool operator!=(const wxAcceleratorTable& accel) const
40 { return !(*this == accel); }
84df1042 41#endif
21aeca5e
VZ
42
43 bool Ok() const;
44
45 void Add(const wxAcceleratorEntry& entry);
46 void Remove(const wxAcceleratorEntry& entry);
47
48 // implementation
49 // --------------
50
51 wxMenuItem *GetMenuItem(const wxKeyEvent& event) const;
52 int GetCommand(const wxKeyEvent& event) const;
53
54 const wxAcceleratorEntry *GetEntry(const wxKeyEvent& event) const;
55
fa03793d
VS
56protected:
57 // ref counting code
58 virtual wxObjectRefData *CreateRefData() const;
59 virtual wxObjectRefData *CloneRefData(const wxObjectRefData *data) const;
60
21aeca5e
VZ
61private:
62 DECLARE_DYNAMIC_CLASS(wxAcceleratorTable)
63};
64
65#endif // _WX_GENERIC_ACCEL_H_
66