X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/fbfb8bcc3fa17e079d4219655b173f8ed2ccc65a..fd587c7a5e2424a3a29012ac3efa6fff84dba035:/include/wx/generic/grid.h diff --git a/include/wx/generic/grid.h b/include/wx/generic/grid.h index 0d73cd15d5..c554e7236d 100644 --- a/include/wx/generic/grid.h +++ b/include/wx/generic/grid.h @@ -9,8 +9,6 @@ // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// -#include "wx/defs.h" - #ifndef __WXGRID_H__ #define __WXGRID_H__ @@ -103,7 +101,7 @@ public: // calling DecRef() once will delete it. Calling IncRef() allows to lock // it until the matching DecRef() is called void IncRef() { m_nRef++; } - void DecRef() { if ( !--m_nRef ) delete this; } + void DecRef() { if ( --m_nRef == 0 ) delete this; } // interpret renderer parameters: arbitrary string whose interpretatin is // left to the derived classes @@ -658,7 +656,7 @@ public: // calling DecRef() once will delete it. Calling IncRef() allows to lock // it until the matching DecRef() is called void IncRef() { m_nRef++; } - void DecRef() { if ( !--m_nRef ) delete this; } + void DecRef() { if ( --m_nRef == 0 ) delete this; } // setters void SetTextColour(const wxColour& colText) { m_colText = colText; } @@ -1982,6 +1980,14 @@ public: bool MetaDown() { return m_meta; } bool ShiftDown() { return m_shift; } bool AltDown() { return m_alt; } + bool CmdDown() + { +#if defined(__WXMAC__) || defined(__WXCOCOA__) + return MetaDown(); +#else + return ControlDown(); +#endif + } protected: int m_row; @@ -2016,6 +2022,14 @@ public: bool MetaDown() { return m_meta; } bool ShiftDown() { return m_shift; } bool AltDown() { return m_alt; } + bool CmdDown() + { +#if defined(__WXMAC__) || defined(__WXCOCOA__) + return MetaDown(); +#else + return ControlDown(); +#endif + } protected: int m_rowOrCol; @@ -2063,6 +2077,14 @@ public: bool MetaDown() { return m_meta; } bool ShiftDown() { return m_shift; } bool AltDown() { return m_alt; } + bool CmdDown() + { +#if defined(__WXMAC__) || defined(__WXCOCOA__) + return MetaDown(); +#else + return ControlDown(); +#endif + } protected: wxGridCellCoords m_topLeft;