diff --git a/etg/clipbrd.py b/etg/clipbrd.py index bcc7e1ab..bd52abf9 100644 --- a/etg/clipbrd.py +++ b/etg/clipbrd.py @@ -77,6 +77,11 @@ def run(): TheClipboard = _wxPyDelayedInitWrapper(Clipboard.Get) """) + # Add the missing event type for the clipboard event + module.addItem(etgtools.WigCode( + "wxEventType wxEVT_CLIPBOARD_CHANGED /PyName=wxEVT_CLIPBOARD_CHANGED/;")) + + #----------------------------------------------------------------- tools.doCommonTweaks(module) tools.runGenerators(module) diff --git a/src/event_ex.py b/src/event_ex.py index e09418da..01ab19cb 100644 --- a/src/event_ex.py +++ b/src/event_ex.py @@ -217,6 +217,8 @@ EVT_TWO_FINGER_TAP = wx.PyEventBinder( wxEVT_TWO_FINGER_TAP ) EVT_LONG_PRESS = wx.PyEventBinder( wxEVT_LONG_PRESS ) EVT_PRESS_AND_TAP = wx.PyEventBinder( wxEVT_PRESS_AND_TAP ) +EVT_CLIPBOARD_CHANGED = PyEventBinder(wxEVT_CLIPBOARD_CHANGED, 1) + # deprecated wxEVT aliases wxEVT_COMMAND_BUTTON_CLICKED = wxEVT_BUTTON diff --git a/unittests/test_clipbrd.py b/unittests/test_clipbrd.py index 3819eea4..a413cfb3 100644 --- a/unittests/test_clipbrd.py +++ b/unittests/test_clipbrd.py @@ -6,6 +6,11 @@ import wx class clipbrd_Tests(wtc.WidgetTestCase): + def test_clipbrd0(self): + wx.wxEVT_CLIPBOARD_CHANGED + wx.EVT_CLIPBOARD_CHANGED + + def test_clipbrd1(self): # copy data1 = wx.TextDataObject('This is some data.')