X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/62f864c32c53356b7228591c85b14abc491c46f0..ff1bd293e1f57ceea2888fef99b6fb8c5e7f99e0:/src/mac/carbon/accel.cpp diff --git a/src/mac/carbon/accel.cpp b/src/mac/carbon/accel.cpp index a0369c0c48..484b49e5ad 100644 --- a/src/mac/carbon/accel.cpp +++ b/src/mac/carbon/accel.cpp @@ -1,5 +1,5 @@ ///////////////////////////////////////////////////////////////////////////// -// Name: accel.cpp +// Name: src/mac/carbon/accel.cpp // Purpose: wxAcceleratorTable // Author: Stefan Csomor // Modified by: @@ -9,14 +9,13 @@ // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// -#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA) -#pragma implementation "accel.h" -#endif - #include "wx/wxprec.h" #include "wx/accel.h" -#include "wx/string.h" + +#ifndef WX_PRECOMP + #include "wx/string.h" +#endif IMPLEMENT_DYNAMIC_CLASS(wxAcceleratorTable, wxObject) @@ -26,7 +25,7 @@ IMPLEMENT_DYNAMIC_CLASS(wxAcceleratorTable, wxObject) WX_DECLARE_LIST(wxAcceleratorEntry, wxAccelList); #include "wx/listimpl.cpp" -WX_DEFINE_LIST(wxAccelList); +WX_DEFINE_LIST(wxAccelList) // ---------------------------------------------------------------------------- // wxAccelRefData: the data used by wxAcceleratorTable @@ -37,7 +36,7 @@ class WXDLLEXPORT wxAcceleratorRefData: public wxObjectRefData friend class WXDLLEXPORT wxAcceleratorTable; public: wxAcceleratorRefData(); - ~wxAcceleratorRefData(); + virtual ~wxAcceleratorRefData(); wxAccelList m_accels; }; @@ -78,7 +77,7 @@ wxAcceleratorTable::wxAcceleratorTable(int n, const wxAcceleratorEntry entries[] } } -bool wxAcceleratorTable::Ok() const +bool wxAcceleratorTable::IsOk() const { return (m_refData != NULL); } @@ -94,7 +93,8 @@ int wxAcceleratorTable::GetCommand( wxKeyEvent &event ) if ((event.m_keyCode == entry->GetKeyCode()) && (((entry->GetFlags() & wxACCEL_CTRL) == 0) || event.ControlDown()) && (((entry->GetFlags() & wxACCEL_SHIFT) == 0) || event.ShiftDown()) && - (((entry->GetFlags() & wxACCEL_ALT) == 0) || event.AltDown() || event.MetaDown())) + (((entry->GetFlags() & wxACCEL_ALT) == 0) || event.AltDown()) && + (((entry->GetFlags() & wxACCEL_CMD) == 0) || event.CmdDown())) { return entry->GetCommand(); } @@ -103,5 +103,3 @@ int wxAcceleratorTable::GetCommand( wxKeyEvent &event ) return -1; } - -