Add missing clipboard event type and binder

This commit is contained in:
Robin Dunn
2020-03-17 15:45:29 -07:00
parent 2c378393a9
commit 4444d63c1f
3 changed files with 12 additions and 0 deletions

View File

@@ -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)

View File

@@ -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

View File

@@ -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.')