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_
13 class WXDLLEXPORT wxKeyEvent
;
15 // ----------------------------------------------------------------------------
17 // ----------------------------------------------------------------------------
19 class WXDLLEXPORT wxAcceleratorTable
: public wxObject
23 wxAcceleratorTable(int n
, const wxAcceleratorEntry entries
[]);
24 virtual ~wxAcceleratorTable();
26 wxAcceleratorTable(const wxAcceleratorTable
& accel
)
29 wxAcceleratorTable
& operator=(const wxAcceleratorTable
& accel
)
30 { if ( m_refData
!= accel
.m_refData
) Ref(accel
); return *this; }
32 #if WXWIN_COMPATIBILITY_2_4
33 bool operator==(const wxAcceleratorTable
& accel
) const
34 { return m_refData
== accel
.m_refData
; }
35 bool operator!=(const wxAcceleratorTable
& accel
) const
36 { return !(*this == accel
); }
41 void Add(const wxAcceleratorEntry
& entry
);
42 void Remove(const wxAcceleratorEntry
& entry
);
47 wxMenuItem
*GetMenuItem(const wxKeyEvent
& event
) const;
48 int GetCommand(const wxKeyEvent
& event
) const;
50 const wxAcceleratorEntry
*GetEntry(const wxKeyEvent
& event
) const;
54 virtual wxObjectRefData
*CreateRefData() const;
55 virtual wxObjectRefData
*CloneRefData(const wxObjectRefData
*data
) const;
58 DECLARE_DYNAMIC_CLASS(wxAcceleratorTable
)
61 #endif // _WX_GENERIC_ACCEL_H_