From 5abd2c67f19568a455a1b273734ea4a692f03029 Mon Sep 17 00:00:00 2001 From: Robin Dunn Date: Tue, 15 Jan 2019 14:06:03 -0800 Subject: [PATCH] Added missing setters for the wheel-related properties in wx.MouseEvent --- CHANGES.rst | 2 ++ etg/event.py | 25 +++++++++++++++++++++---- 2 files changed, 23 insertions(+), 4 deletions(-) diff --git a/CHANGES.rst b/CHANGES.rst index 4b2c35d9..2df6dddf 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -20,6 +20,8 @@ Pip: ``pip install wxPython==4.0.5`` Changes in this release include the following: +* Added missing setters for the wheel-related properties in wx.MouseEvent. + (#1140) diff --git a/etg/event.py b/etg/event.py index 11c69b13..166bb79a 100644 --- a/etg/event.py +++ b/etg/event.py @@ -413,10 +413,27 @@ def run(): #--------------------------------------- # wxMouseEvent c = module.find('wxMouseEvent') - c.addProperty('LinesPerAction GetLinesPerAction') - c.addProperty('LogicalPosition GetLogicalPosition') - c.addProperty('WheelDelta GetWheelDelta') - c.addProperty('WheelRotation GetWheelRotation') + + c.addCppMethod('void', 'SetWheelAxis', '(wxMouseWheelAxis wheelAxis)', + body="self->m_wheelAxis = wheelAxis;") + + c.addCppMethod('void', 'SetWheelRotation', '(int wheelRotation)', + body="self->m_wheelRotation = wheelRotation;") + + c.addCppMethod('void', 'SetWheelDelta', '(int wheelDelta)', + body="self->m_wheelDelta = wheelDelta;") + + c.addCppMethod('void', 'SetLinesPerAction', '(int linesPerAction)', + body="self->m_linesPerAction = linesPerAction;") + + c.addCppMethod('void', 'SetColumnsPerAction', '(int columnsPerAction)', + body="self->m_columnsPerAction = columnsPerAction;") + + c.addProperty('WheelAxis GetWheelAxis SetWheelAxis') + c.addProperty('WheelRotation GetWheelRotation SetWheelRotation') + c.addProperty('WheelDelta GetWheelDelta SetWheelDelta') + c.addProperty('LinesPerAction GetLinesPerAction SetLinesPerAction') + c.addProperty('ColumnsPerAction GetColumnsPerAction SetColumnsPerAction') #--------------------------------------- # wxSetCursorEvent