X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/dbf858b5d69f53efd3950cae99322f54355aa983..2bc1aa1174ee3ddd68615827c3531549cf204918:/include/wx/gtk/accel.h diff --git a/include/wx/gtk/accel.h b/include/wx/gtk/accel.h index d2eb53c070..a60eb15e98 100644 --- a/include/wx/gtk/accel.h +++ b/include/wx/gtk/accel.h @@ -15,6 +15,9 @@ #endif #include "wx/defs.h" + +#if wxUSE_ACCEL + #include "wx/object.h" #include "wx/event.h" @@ -53,8 +56,7 @@ extern wxAcceleratorTable wxNullAcceleratorTable; class wxAcceleratorEntry: public wxObject { - public: - +public: wxAcceleratorEntry(int flags = 0, int keyCode = 0, int cmd = 0) { m_flags = flags; m_keyCode = keyCode; m_command = cmd; } @@ -76,30 +78,32 @@ class wxAcceleratorEntry: public wxObject class wxAcceleratorTable: public wxObject { - DECLARE_DYNAMIC_CLASS(wxAcceleratorTable) - - public: +public: wxAcceleratorTable(); wxAcceleratorTable(int n, wxAcceleratorEntry entries[] ); ~wxAcceleratorTable(); - inline wxAcceleratorTable(const wxAcceleratorTable& accel) + inline wxAcceleratorTable(const wxAcceleratorTable& accel) : wxObject() { Ref(accel); } inline wxAcceleratorTable(const wxAcceleratorTable* accel) { if (accel) Ref(*accel); } - inline wxAcceleratorTable& operator = (const wxAcceleratorTable& accel) - { if (*this == accel) return (*this); Ref(accel); return *this; } - inline bool operator == (const wxAcceleratorTable& accel) + inline bool operator == (const wxAcceleratorTable& accel) { return m_refData == accel.m_refData; } inline bool operator != (const wxAcceleratorTable& accel) { return m_refData != accel.m_refData; } + inline wxAcceleratorTable& operator = (const wxAcceleratorTable& accel) + { if (*this == accel) return (*this); Ref(accel); return *this; } bool Ok() const; -// private: +// implementation - int GetCommand( wxKeyEvent &event ); + int GetCommand( wxKeyEvent &event ); +private: + DECLARE_DYNAMIC_CLASS(wxAcceleratorTable) }; #endif + +#endif