]> git.saurik.com Git - wxWidgets.git/blob - include/wx/motif/accel.h
added some macros to define version strings from version number (instead of having...
[wxWidgets.git] / include / wx / motif / accel.h
1 /////////////////////////////////////////////////////////////////////////////
2 // Name: accel.h
3 // Purpose: wxAcceleratorTable class
4 // Author: Julian Smart
5 // Modified by:
6 // Created: 17/09/98
7 // RCS-ID: $Id$
8 // Copyright: (c) Julian Smart
9 // Licence: wxWindows licence
10 /////////////////////////////////////////////////////////////////////////////
11
12 #ifndef _WX_ACCEL_H_
13 #define _WX_ACCEL_H_
14
15 #ifdef __GNUG__
16 #pragma interface "accel.h"
17 #endif
18
19 #include "wx/object.h"
20 #include "wx/string.h"
21 #include "wx/event.h"
22
23 class WXDLLEXPORT wxAcceleratorTable: public wxObject
24 {
25 DECLARE_DYNAMIC_CLASS(wxAcceleratorTable)
26 public:
27 wxAcceleratorTable();
28 wxAcceleratorTable(const wxString& resource); // Load from .rc resource
29 wxAcceleratorTable(int n, const wxAcceleratorEntry entries[]); // Load from array
30
31 // Copy constructors
32 wxAcceleratorTable(const wxAcceleratorTable& accel) { Ref(accel); }
33 wxAcceleratorTable(const wxAcceleratorTable* accel) { if (accel) Ref(*accel); }
34
35 ~wxAcceleratorTable();
36
37 wxAcceleratorTable& operator = (const wxAcceleratorTable& accel) { if (*this == accel) return (*this); Ref(accel); return *this; }
38 bool operator == (const wxAcceleratorTable& accel) { return m_refData == accel.m_refData; }
39 bool operator != (const wxAcceleratorTable& accel) { return m_refData != accel.m_refData; }
40
41 bool Ok() const;
42
43 // Implementation only
44 int GetCount() const;
45 wxAcceleratorEntry* GetEntries() const;
46 };
47
48 WXDLLEXPORT_DATA(extern wxAcceleratorTable) wxNullAcceleratorTable;
49
50 #endif
51 // _WX_ACCEL_H_