From 3900ddc6a05a2e8e652dec2ac6c5fd48242954d4 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Tue, 3 Nov 2009 14:11:30 +0000 Subject: [PATCH] Provide forward-compatible {Left,Middle,Right}IsDown() accessors. Allow using the same code using XXXIsDown() to work with both 2.8 and 2.9 without provoking deprecation warnings with the latter for XXXDown(). Closes #11382. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_8_BRANCH@62544 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- include/wx/utils.h | 6 ++++++ version-script.in | 1 + 2 files changed, 7 insertions(+) diff --git a/include/wx/utils.h b/include/wx/utils.h index bba3284404..b2c0d71fff 100644 --- a/include/wx/utils.h +++ b/include/wx/utils.h @@ -229,6 +229,12 @@ public: bool MiddleDown() { return m_middleDown; } bool RightDown() { return m_rightDown; } +#if wxABI_VERSION >= 20811 + bool LeftIsDown() { return m_leftDown; } + bool MiddleIsDown() { return m_middleDown; } + bool RightIsDown() { return m_rightDown; } +#endif // wx >= 2.8.11 + bool ControlDown() { return m_controlDown; } bool ShiftDown() { return m_shiftDown; } bool AltDown() { return m_altDown; } diff --git a/version-script.in b/version-script.in index 9c8708a158..88d21a56cc 100644 --- a/version-script.in +++ b/version-script.in @@ -33,6 +33,7 @@ *wxDC*SetDeviceClippingRegion*; *wxGraphicsContext*GetCairoRenderer*; *wxIconizeEvent*IsIconized*; + *wxMouseState*IsDown*; *wxRichTextCtrl*GetContextMenu*; *wxRichTextCtrl*SetContextMenu*; *wxShowEvent*IsShown*;