1 /////////////////////////////////////////////////////////////////////////////
2 // Name: wx/generic/accel.h
3 // Purpose: wxAcceleratorTable class
4 // Author: Robert Roebling
6 // Copyright: (c) Robert Roebling
7 // Licence: wxWindows licence
8 /////////////////////////////////////////////////////////////////////////////
10 #ifndef _WX_GENERIC_ACCEL_H_
11 #define _WX_GENERIC_ACCEL_H_
14 #pragma interface "accel.h"
17 class WXDLLEXPORT wxKeyEvent
;
19 // ----------------------------------------------------------------------------
21 // ----------------------------------------------------------------------------
23 class WXDLLEXPORT wxAcceleratorTable
: public wxObject
27 wxAcceleratorTable(int n
, wxAcceleratorEntry entries
[]);
28 virtual ~wxAcceleratorTable();
30 wxAcceleratorTable(const wxAcceleratorTable
& accel
)
33 wxAcceleratorTable
& operator=(const wxAcceleratorTable
& accel
)
34 { if ( m_refData
!= accel
.m_refData
) Ref(accel
); return *this; }
36 bool operator==(const wxAcceleratorTable
& accel
) const
37 { return m_refData
== accel
.m_refData
; } // FIXME: this is wrong (VZ)
38 bool operator!=(const wxAcceleratorTable
& accel
) const
39 { return !(*this == accel
); }
43 void Add(const wxAcceleratorEntry
& entry
);
44 void Remove(const wxAcceleratorEntry
& entry
);
49 wxMenuItem
*GetMenuItem(const wxKeyEvent
& event
) const;
50 int GetCommand(const wxKeyEvent
& event
) const;
52 const wxAcceleratorEntry
*GetEntry(const wxKeyEvent
& event
) const;
56 virtual wxObjectRefData
*CreateRefData() const;
57 virtual wxObjectRefData
*CloneRefData(const wxObjectRefData
*data
) const;
60 DECLARE_DYNAMIC_CLASS(wxAcceleratorTable
)
63 #endif // _WX_GENERIC_ACCEL_H_