]> git.saurik.com Git - wxWidgets.git/blame - include/wx/generic/accel.h
added test for writing empty value to the config
[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
7// Licence: wxWindows licence
8/////////////////////////////////////////////////////////////////////////////
9
10#ifndef _WX_GENERIC_ACCEL_H_
11#define _WX_GENERIC_ACCEL_H_
12
13#ifdef __GNUG__
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();
27 wxAcceleratorTable(int n, wxAcceleratorEntry entries[]);
28 virtual ~wxAcceleratorTable();
29
30 wxAcceleratorTable(const wxAcceleratorTable& accel)
31 { Ref(accel); }
32 wxAcceleratorTable& operator=(const wxAcceleratorTable& accel)
33 { if ( m_refData != accel.m_refData ) Ref(accel); return *this; }
34
35 bool operator==(const wxAcceleratorTable& accel) const
36 { return m_refData == accel.m_refData; } // FIXME: this is wrong (VZ)
37 bool operator!=(const wxAcceleratorTable& accel) const
38 { return !(*this == accel); }
39
40 bool Ok() const;
41
42 void Add(const wxAcceleratorEntry& entry);
43 void Remove(const wxAcceleratorEntry& entry);
44
45 // implementation
46 // --------------
47
48 wxMenuItem *GetMenuItem(const wxKeyEvent& event) const;
49 int GetCommand(const wxKeyEvent& event) const;
50
51 const wxAcceleratorEntry *GetEntry(const wxKeyEvent& event) const;
52
53private:
54 DECLARE_DYNAMIC_CLASS(wxAcceleratorTable)
55};
56
57#endif // _WX_GENERIC_ACCEL_H_
58