[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
gnue/forms/src/uidrivers/wx UIdriver.py
From: |
Jason Cater |
Subject: |
gnue/forms/src/uidrivers/wx UIdriver.py |
Date: |
Sun, 17 Feb 2002 19:20:11 -0500 |
CVSROOT: /home/cvs
Module name: gnue
Changes by: Jason Cater <address@hidden> 02/02/17 19:20:11
Modified files:
forms/src/uidrivers/wx: UIdriver.py
Log message:
added code to wx driver to allow forms to access the system-wide
clipboard
CVSWeb URLs:
http://savannah.gnu.org/cgi-bin/viewcvs/gnue/forms/src/uidrivers/wx/UIdriver.py.diff?cvsroot=OldCVS&tr1=1.145&tr2=1.146&r1=text&r2=text
Patches:
Index: gnue/forms/src/uidrivers/wx/UIdriver.py
diff -c gnue/forms/src/uidrivers/wx/UIdriver.py:1.145
gnue/forms/src/uidrivers/wx/UIdriver.py:1.146
*** gnue/forms/src/uidrivers/wx/UIdriver.py:1.145 Sun Feb 17 17:25:31 2002
--- gnue/forms/src/uidrivers/wx/UIdriver.py Sun Feb 17 19:20:11 2002
***************
*** 371,383 ****
pageWidth,unused =
self.statusBar.GetTextExtent(self.statusBar.GetStatusText(4))
# Either double the width if it's set or default to 5
! statusWidth = statusWidth and (statusWidth * 2) or 5
! insertWidth = insertWidth and (insertWidth * 2) or 5
! recordWidth = recordWidth and (recordWidth * 2) or 5
! pageWidth = pageWidth and (pageWidth * 2) or 5
self.statusBar.SetStatusWidths([tipWidth,statusWidth,insertWidth,recordWidth,pageWidth])
!
#############################################################################
#
# Incoming Event Processors
--- 371,383 ----
pageWidth,unused =
self.statusBar.GetTextExtent(self.statusBar.GetStatusText(4))
# Either double the width if it's set or default to 5
! statusWidth = statusWidth and (statusWidth * 2) or 5
! insertWidth = insertWidth and (insertWidth * 2) or 5
! recordWidth = recordWidth and (recordWidth * 2) or 5
! pageWidth = pageWidth and (pageWidth * 2) or 5
self.statusBar.SetStatusWidths([tipWidth,statusWidth,insertWidth,recordWidth,pageWidth])
!
#############################################################################
#
# Incoming Event Processors
***************
*** 424,437 ****
wxBell()
self.statusBar.SetStatusText(event.data,0)
# Called whenever forms goes into a "wait" state in which user cannot
# interact with interface (e.g., while waiting for a query or a commit)
def beginWait (self, event):
wxBeginBusyCursor()
# Called whenever forms leaves a "wait" state
! def endWait (self, event):
wxEndBusyCursor()
#############################################################################
#
--- 424,475 ----
wxBell()
self.statusBar.SetStatusText(event.data,0)
+ #
# Called whenever forms goes into a "wait" state in which user cannot
# interact with interface (e.g., while waiting for a query or a commit)
+ #
def beginWait (self, event):
wxBeginBusyCursor()
+ #
# Called whenever forms leaves a "wait" state
! #
! def endWait (self, event):
wxEndBusyCursor()
+
+
+ #
+ # Clipboard routines
+ #
+ # If a particular UI has a system-wide clipboard,
+ # these methods should be overridden to use that
+ # clipboard.
+ #
+ def getClipboardContents(self, event):
+
+ data = wxTextDataObject()
+ wxTheClipboard.Open()
+ success = wxTheClipboard.GetData(data)
+ wxTheClipboard.Close()
+
+ if success:
+ value = data.GetText()
+ else:
+ value = None
+
+ GDebug.printMesg(5, "Getting clipboard '%s'" % value)
+ event.__result__ = value
+
+
+ def setClipboardContents(self, event):
+
+ print "Setting clipboard '%s'" % event.text
+
+ wxTheClipboard.Open()
+ value = wxTheClipboard.SetData(wxTextDataObject(event.text))
+ wxTheClipboard.Close()
+
+
#############################################################################
#
- gnue/forms/src/uidrivers/wx UIdriver.py,
Jason Cater <=