X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/ad81651f00edc6f489d9b6a0839d316a964fd521..4b3f61d14cbc6cc117373d173ecf08fbec4c9a38:/src/motif/accel.cpp diff --git a/src/motif/accel.cpp b/src/motif/accel.cpp index d90a47b958..4f8cd0311c 100644 --- a/src/motif/accel.cpp +++ b/src/motif/accel.cpp @@ -1,5 +1,5 @@ ///////////////////////////////////////////////////////////////////////////// -// Name: accel.cpp +// Name: src/motif/accel.cpp // Purpose: wxAcceleratorTable // Author: Julian Smart // Modified by: @@ -9,24 +9,26 @@ // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// -#ifdef __GNUG__ -#pragma implementation "accel.h" -#endif +// For compilers that support precompilation, includes "wx.h". +#include "wx/wxprec.h" -#include "wx/setup.h" #include "wx/accel.h" -#include "wx/string.h" -#include "wx/utils.h" + +#ifndef WX_PRECOMP + #include "wx/string.h" + #include "wx/utils.h" +#endif + #include IMPLEMENT_DYNAMIC_CLASS(wxAcceleratorTable, wxObject) class WXDLLEXPORT wxAcceleratorRefData: public wxObjectRefData { - friend class WXDLLEXPORT wxAcceleratorTable; + friend class wxAcceleratorTable; public: wxAcceleratorRefData(); - ~wxAcceleratorRefData(); + virtual ~wxAcceleratorRefData(); public: int m_count; @@ -65,7 +67,7 @@ wxAcceleratorTable::wxAcceleratorTable(const wxString& WXUNUSED(resource)) } // Create from an array -wxAcceleratorTable::wxAcceleratorTable(int n, wxAcceleratorEntry entries[]) +wxAcceleratorTable::wxAcceleratorTable(int n, const wxAcceleratorEntry entries[]) { wxAcceleratorRefData* data = new wxAcceleratorRefData; m_refData = data; @@ -78,7 +80,7 @@ wxAcceleratorTable::wxAcceleratorTable(int n, wxAcceleratorEntry entries[]) } -bool wxAcceleratorTable::Ok() const +bool wxAcceleratorTable::IsOk() const { return (m_refData != (wxAcceleratorRefData*) NULL); } @@ -99,7 +101,7 @@ bool wxAcceleratorEntry::MatchesEvent(const wxKeyEvent& event) const bool eventAltDown = event.AltDown(); bool eventCtrlDown = event.ControlDown(); bool eventShiftDown = event.ShiftDown(); - int eventKeyCode = event.KeyCode(); + int eventKeyCode = event.GetKeyCode(); bool accAltDown = ((GetFlags() & wxACCEL_ALT) == wxACCEL_ALT); bool accCtrlDown = ((GetFlags() & wxACCEL_CTRL) == wxACCEL_CTRL); @@ -113,4 +115,3 @@ bool wxAcceleratorEntry::MatchesEvent(const wxKeyEvent& event) const (eventShiftDown == accShiftDown) && ((eventKeyCode == accKeyCode || eventKeyCode == accKeyCode2))) ; } -