DeviceWorkstation.st
changeset 3639 d6c5f8560d01
parent 3638 f42af19c7484
child 3641 b8d22011ec2b
--- a/DeviceWorkstation.st	Wed Jul 03 11:30:29 2002 +0200
+++ b/DeviceWorkstation.st	Tue Jul 09 14:02:44 2002 +0200
@@ -10,8 +10,6 @@
  hereby transferred.
 "
 
-'From Smalltalk/X, Version:4.1.4 on 20-Mai-2002 at 15:45:54'                    !
-
 "{ Package: 'stx:libview' }"
 
 HostGraphicsDevice subclass:#DeviceWorkstation
@@ -35,7 +33,7 @@
 		DeviceIOTimeoutErrorSignal ErrorPrinting DefaultScreen AllScreens
 		CurrentScreenQuerySignal LastActiveScreen LastActiveProcess
 		WindowsRightButtonBehavior ExitOnLastClose
-		DrawingOnClosedDeviceSignal'
+		DrawingOnClosedDeviceSignal CopyBufferHistory'
 	poolDictionaries:''
 	category:'Interface-Graphics'
 !
@@ -6722,6 +6720,13 @@
     "Created: 11.12.1996 / 13:34:34 / cg"
 !
 
+getCopyBufferHistory
+    "return the copyBufferHistory. 
+     This is an ST/X internal buffer (i.e. its not visible to alien views)."
+
+    ^ CopyBufferHistory
+!
+
 getLastCopyBuffer
     "return the last copyBuffers contents.
      This is an ST/X internal buffer (i.e. its not visible to alien views)."
@@ -6750,6 +6755,21 @@
     "Modified: 11.12.1996 / 12:56:57 / cg"
 !
 
+rememberCopyBuffer
+    copyBuffer size == 0 ifTrue:[
+        ^ self
+    ].
+
+    CopyBufferHistory isNil ifTrue:[
+        CopyBufferHistory := OrderedCollection new.
+    ].
+    CopyBufferHistory remove:copyBuffer ifAbsent:nil.
+    CopyBufferHistory addFirst:copyBuffer.
+    CopyBufferHistory size > 10 ifTrue:[
+        CopyBufferHistory removeLast
+    ].
+!
+
 selectionAsString
     "return my current selection as a string"
 
@@ -7530,6 +7550,6 @@
 !DeviceWorkstation class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libview/DeviceWorkstation.st,v 1.412 2002-07-03 09:30:29 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libview/DeviceWorkstation.st,v 1.413 2002-07-09 12:02:21 cg Exp $'
 ! !
 DeviceWorkstation initialize!