Author: reinhard
Date: 2006-07-31 12:10:26 -0500 (Mon, 31 Jul 2006)
New Revision: 8544

Modified:
   trunk/gnue-forms/src/uidrivers/wx26/UIdriver.py
Log:
Implement clipboard handling in wx26 driver.


Modified: trunk/gnue-forms/src/uidrivers/wx26/UIdriver.py
===================================================================
--- trunk/gnue-forms/src/uidrivers/wx26/UIdriver.py     2006-07-31 08:47:14 UTC 
(rev 8543)
+++ trunk/gnue-forms/src/uidrivers/wx26/UIdriver.py     2006-07-31 17:10:26 UTC 
(rev 8544)
@@ -199,6 +199,28 @@
 
 
   # ---------------------------------------------------------------------------
+  # Clipboard routines
+  # ---------------------------------------------------------------------------
+
+  def getClipboardContents(self, event):
+
+    event.__result__ = ""
+    if wx.TheClipboard.Open():
+      data = wx.TextDataObject()
+      if wx.TheClipboard.GetData(data):
+        event.__result__ = data.GetText()
+      wx.TheClipboard.Close()
+
+  # ---------------------------------------------------------------------------
+
+  def setClipboardContents(self, event):
+
+    if wx.TheClipboard.Open():
+      value = wx.TheClipboard.SetData(wx.TextDataObject(event.text))
+      assert gDebug(6,"Set Clipboard Status: %s" % value)
+      wx.TheClipboard.Close()
+
+  # ---------------------------------------------------------------------------
   # create a modal message box
   # ---------------------------------------------------------------------------
 



_______________________________________________
commit-gnue mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/commit-gnue

Reply via email to