X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/bcf1fa6bb46c38751072a1b5294bbd803ceb657e..cf1a9b45c7b70f217d3cc282ab77df8feaadcdeb:/include/wx/gtk1/accel.h?ds=inline diff --git a/include/wx/gtk1/accel.h b/include/wx/gtk1/accel.h index 44bfd043ae..51efa101f7 100644 --- a/include/wx/gtk1/accel.h +++ b/include/wx/gtk1/accel.h @@ -1,9 +1,8 @@ ///////////////////////////////////////////////////////////////////////////// // Name: accel.h // Purpose: wxAcceleratorTable class -// Author: Robert -// Modified by: -// RCS-ID: +// Author: Robert Roebling +// RCS-ID: $Id$ // Copyright: (c) Robert Roebling // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// @@ -16,6 +15,9 @@ #endif #include "wx/defs.h" + +#if wxUSE_ACCEL + #include "wx/object.h" #include "wx/event.h" @@ -52,10 +54,9 @@ extern wxAcceleratorTable wxNullAcceleratorTable; // wxAcceleratorEntry //----------------------------------------------------------------------------- -class wxAcceleratorEntry +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; } @@ -77,30 +78,33 @@ class wxAcceleratorEntry 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: - - int GetCommand( wxKeyEvent &event ); + // implementation + // -------------- + + int GetCommand( wxKeyEvent &event ); +private: + DECLARE_DYNAMIC_CLASS(wxAcceleratorTable) }; #endif + +#endif