Initial revision
authorclaus
Sun, 07 Aug 1994 15:22:53 +0200
changeset 37 8dd71a2e79cd
parent 36 641fe12489b2
child 38 4b9b70b2cc87
Initial revision
FSaveBox.st
FileSaveBox.st
HMiniScr.st
HorizontalMiniScroller.st
MiniScr.st
MiniScroller.st
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/FSaveBox.st	Sun Aug 07 15:22:53 1994 +0200
@@ -0,0 +1,85 @@
+"
+ COPYRIGHT (c) 1994 by Claus Gittinger
+              All Rights Reserved
+
+ This software is furnished under a license and may be used
+ only in accordance with the terms of that license and with the
+ inclusion of the above copyright notice.   This software may not
+ be provided or otherwise made available to, or used by, any
+ other person.  No title to or ownership of the software is
+ hereby transferred.
+"
+
+FileSelectionBox subclass:#FileSaveBox
+         instanceVariableNames:'appendAction'
+         classVariableNames:''
+         poolDictionaries:''
+         category:'Views-DialogBoxes'
+!
+
+FileSaveBox comment:'
+COPYRIGHT (c) 1994 by Claus Gittinger
+              All Rights Reserved
+
+$Header: /cvs/stx/stx/libwidg/Attic/FSaveBox.st,v 1.1 1994-08-07 13:21:37 claus Exp $
+'!
+
+!FileSaveBox class methodsFor:'documentation'!
+
+copyright
+"
+ COPYRIGHT (c) 1994 by Claus Gittinger
+              All Rights Reserved
+
+ This software is furnished under a license and may be used
+ only in accordance with the terms of that license and with the
+ inclusion of the above copyright notice.   This software may not
+ be provided or otherwise made available to, or used by, any
+ other person.  No title to or ownership of the software is
+ hereby transferred.
+"
+!
+
+version
+"
+$Header: /cvs/stx/stx/libwidg/Attic/FSaveBox.st,v 1.1 1994-08-07 13:21:37 claus Exp $
+"
+!
+
+documentation
+"
+    Instances of FileSaveBox add an 'append'-button. The other
+    behavior is that of a FileSelectionBox.
+
+    Instance variables:
+        appendAction            action to be performed when append is pressed
+"
+! !
+
+!FileSaveBox methodsFor:'user interaction'!
+
+appendPressed
+    self hideAndEvaluate:[:string |
+        appendAction notNil ifTrue:[
+            appendAction value:string 
+        ]
+    ]
+! !
+
+!FileSaveBox methodsFor:'initialization'!
+
+initialize
+    |b|
+
+    super initialize.
+
+    b := Button label:(resources string:'append').
+    b action:[b turnOffWithoutRedraw. self appendPressed].
+    buttonPanel addSubView:b after:abortButton
+! !
+
+!FileSaveBox methodsFor:'accessing'!
+
+appendAction:aBlock
+    appendAction := aBlock
+! !
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/FileSaveBox.st	Sun Aug 07 15:22:53 1994 +0200
@@ -0,0 +1,85 @@
+"
+ COPYRIGHT (c) 1994 by Claus Gittinger
+              All Rights Reserved
+
+ This software is furnished under a license and may be used
+ only in accordance with the terms of that license and with the
+ inclusion of the above copyright notice.   This software may not
+ be provided or otherwise made available to, or used by, any
+ other person.  No title to or ownership of the software is
+ hereby transferred.
+"
+
+FileSelectionBox subclass:#FileSaveBox
+         instanceVariableNames:'appendAction'
+         classVariableNames:''
+         poolDictionaries:''
+         category:'Views-DialogBoxes'
+!
+
+FileSaveBox comment:'
+COPYRIGHT (c) 1994 by Claus Gittinger
+              All Rights Reserved
+
+$Header: /cvs/stx/stx/libwidg/FileSaveBox.st,v 1.1 1994-08-07 13:21:37 claus Exp $
+'!
+
+!FileSaveBox class methodsFor:'documentation'!
+
+copyright
+"
+ COPYRIGHT (c) 1994 by Claus Gittinger
+              All Rights Reserved
+
+ This software is furnished under a license and may be used
+ only in accordance with the terms of that license and with the
+ inclusion of the above copyright notice.   This software may not
+ be provided or otherwise made available to, or used by, any
+ other person.  No title to or ownership of the software is
+ hereby transferred.
+"
+!
+
+version
+"
+$Header: /cvs/stx/stx/libwidg/FileSaveBox.st,v 1.1 1994-08-07 13:21:37 claus Exp $
+"
+!
+
+documentation
+"
+    Instances of FileSaveBox add an 'append'-button. The other
+    behavior is that of a FileSelectionBox.
+
+    Instance variables:
+        appendAction            action to be performed when append is pressed
+"
+! !
+
+!FileSaveBox methodsFor:'user interaction'!
+
+appendPressed
+    self hideAndEvaluate:[:string |
+        appendAction notNil ifTrue:[
+            appendAction value:string 
+        ]
+    ]
+! !
+
+!FileSaveBox methodsFor:'initialization'!
+
+initialize
+    |b|
+
+    super initialize.
+
+    b := Button label:(resources string:'append').
+    b action:[b turnOffWithoutRedraw. self appendPressed].
+    buttonPanel addSubView:b after:abortButton
+! !
+
+!FileSaveBox methodsFor:'accessing'!
+
+appendAction:aBlock
+    appendAction := aBlock
+! !
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/HMiniScr.st	Sun Aug 07 15:22:53 1994 +0200
@@ -0,0 +1,88 @@
+"
+ COPYRIGHT (c) 1994 by Claus Gittinger
+              All Rights Reserved
+
+ This software is furnished under a license and may be used
+ only in accordance with the terms of that license and with the
+ inclusion of the above copyright notice.   This software may not
+ be provided or otherwise made available to, or used by, any
+ other person.  No title to or ownership of the software is
+ hereby transferred.
+"
+
+HorizontalScroller subclass:#HorizontalMiniScroller
+         instanceVariableNames:''
+         classVariableNames:''
+         poolDictionaries:''
+         category:'Views-Interactors'
+!
+
+HorizontalMiniScroller comment:'
+COPYRIGHT (c) 1994 by Claus Gittinger
+              All Rights Reserved
+
+$Header: /cvs/stx/stx/libwidg/Attic/HMiniScr.st,v 1.1 1994-08-07 13:21:59 claus Exp $
+'!
+
+!HorizontalMiniScroller class methodsFor:'documentation'!
+
+copyright
+"
+ COPYRIGHT (c) 1994 by Claus Gittinger
+              All Rights Reserved
+
+ This software is furnished under a license and may be used
+ only in accordance with the terms of that license and with the
+ inclusion of the above copyright notice.   This software may not
+ be provided or otherwise made available to, or used by, any
+ other person.  No title to or ownership of the software is
+ hereby transferred.
+"
+!
+
+version
+"
+$Header: /cvs/stx/stx/libwidg/Attic/HMiniScr.st,v 1.1 1994-08-07 13:21:59 claus Exp $
+"
+!
+
+documentation
+"
+    like a scroller, but takingless screen space.
+"
+! !
+
+!HorizontalMiniScroller methodsFor:'initialization'!
+
+computeInitialExtent
+    "make my height very small"
+
+    |w h mm|
+
+    w := self class defaultExtent x.
+    mm := (thumbLevel ~~ 0) ifTrue:[2.5] ifFalse:[2.0].
+    h := (device verticalPixelPerMillimeter asFloat * mm) rounded.
+    self extent:w @ h.
+!
+
+initStyle
+    super initStyle.
+    style == #iris ifTrue:[
+        tallyLevel := 0.
+        tallyMarks := 0.
+        thumbSoftEdge := false.
+        thumbLevel := 2.
+    ].
+    ((style ~~ #normal) and:[style ~~ #mswindows]) ifTrue:[
+        style == #st80 ifTrue:[
+            self level:1.
+            self borderWidth:0.
+            inset := 1.
+        ] ifFalse:[
+            self level:-1.
+            self borderWidth:0
+        ].
+    ].
+    shadowForm := lightForm := nil.
+    fixThumbHeight := false
+! !
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/HorizontalMiniScroller.st	Sun Aug 07 15:22:53 1994 +0200
@@ -0,0 +1,88 @@
+"
+ COPYRIGHT (c) 1994 by Claus Gittinger
+              All Rights Reserved
+
+ This software is furnished under a license and may be used
+ only in accordance with the terms of that license and with the
+ inclusion of the above copyright notice.   This software may not
+ be provided or otherwise made available to, or used by, any
+ other person.  No title to or ownership of the software is
+ hereby transferred.
+"
+
+HorizontalScroller subclass:#HorizontalMiniScroller
+         instanceVariableNames:''
+         classVariableNames:''
+         poolDictionaries:''
+         category:'Views-Interactors'
+!
+
+HorizontalMiniScroller comment:'
+COPYRIGHT (c) 1994 by Claus Gittinger
+              All Rights Reserved
+
+$Header: /cvs/stx/stx/libwidg/HorizontalMiniScroller.st,v 1.1 1994-08-07 13:21:59 claus Exp $
+'!
+
+!HorizontalMiniScroller class methodsFor:'documentation'!
+
+copyright
+"
+ COPYRIGHT (c) 1994 by Claus Gittinger
+              All Rights Reserved
+
+ This software is furnished under a license and may be used
+ only in accordance with the terms of that license and with the
+ inclusion of the above copyright notice.   This software may not
+ be provided or otherwise made available to, or used by, any
+ other person.  No title to or ownership of the software is
+ hereby transferred.
+"
+!
+
+version
+"
+$Header: /cvs/stx/stx/libwidg/HorizontalMiniScroller.st,v 1.1 1994-08-07 13:21:59 claus Exp $
+"
+!
+
+documentation
+"
+    like a scroller, but takingless screen space.
+"
+! !
+
+!HorizontalMiniScroller methodsFor:'initialization'!
+
+computeInitialExtent
+    "make my height very small"
+
+    |w h mm|
+
+    w := self class defaultExtent x.
+    mm := (thumbLevel ~~ 0) ifTrue:[2.5] ifFalse:[2.0].
+    h := (device verticalPixelPerMillimeter asFloat * mm) rounded.
+    self extent:w @ h.
+!
+
+initStyle
+    super initStyle.
+    style == #iris ifTrue:[
+        tallyLevel := 0.
+        tallyMarks := 0.
+        thumbSoftEdge := false.
+        thumbLevel := 2.
+    ].
+    ((style ~~ #normal) and:[style ~~ #mswindows]) ifTrue:[
+        style == #st80 ifTrue:[
+            self level:1.
+            self borderWidth:0.
+            inset := 1.
+        ] ifFalse:[
+            self level:-1.
+            self borderWidth:0
+        ].
+    ].
+    shadowForm := lightForm := nil.
+    fixThumbHeight := false
+! !
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/MiniScr.st	Sun Aug 07 15:22:53 1994 +0200
@@ -0,0 +1,87 @@
+"
+ COPYRIGHT (c) 1994 by Claus Gittinger
+              All Rights Reserved
+
+ This software is furnished under a license and may be used
+ only in accordance with the terms of that license and with the
+ inclusion of the above copyright notice.   This software may not
+ be provided or otherwise made available to, or used by, any
+ other person.  No title to or ownership of the software is
+ hereby transferred.
+"
+
+Scroller subclass:#MiniScroller
+         instanceVariableNames:''
+         classVariableNames:''
+         poolDictionaries:''
+         category:'Views-Interactors'
+!
+
+MiniScroller comment:'
+COPYRIGHT (c) 1994 by Claus Gittinger
+              All Rights Reserved
+
+$Header: /cvs/stx/stx/libwidg/Attic/MiniScr.st,v 1.1 1994-08-07 13:22:53 claus Exp $
+'!
+
+!MiniScroller class methodsFor:'documentation'!
+
+copyright
+"
+ COPYRIGHT (c) 1994 by Claus Gittinger
+              All Rights Reserved
+
+ This software is furnished under a license and may be used
+ only in accordance with the terms of that license and with the
+ inclusion of the above copyright notice.   This software may not
+ be provided or otherwise made available to, or used by, any
+ other person.  No title to or ownership of the software is
+ hereby transferred.
+"
+!
+
+version
+"
+$Header: /cvs/stx/stx/libwidg/Attic/MiniScr.st,v 1.1 1994-08-07 13:22:53 claus Exp $
+"
+!
+
+documentation
+"
+    like a scroller, but taking less screen space
+"
+! !
+
+!MiniScroller methodsFor:'initialization'!
+
+computeInitialExtent
+    "make my width very small"
+
+    |w h mm|
+
+    h := self class defaultExtent y.
+    mm := (thumbLevel ~~ 0) ifTrue:[2.5] ifFalse:[2.0].
+    w := (device horizontalPixelPerMillimeter asFloat * mm) rounded.
+    self extent:w @ h.
+!
+
+initStyle
+    super initStyle.
+    style == #iris ifTrue:[
+        tallyLevel := 0.
+        tallyMarks := 0.
+        thumbSoftEdge := false.
+        thumbLevel := 2.
+    ].
+    ((style ~~ #normal) and:[style ~~ #mswindows]) ifTrue:[
+        style == #st80 ifTrue:[
+            self level:1.
+            self borderWidth:0
+        ] ifFalse:[
+            self level:-1.
+            self borderWidth:0
+        ]
+    ].
+    shadowForm := lightForm := nil.
+    fixThumbHeight := false
+! !
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/MiniScroller.st	Sun Aug 07 15:22:53 1994 +0200
@@ -0,0 +1,87 @@
+"
+ COPYRIGHT (c) 1994 by Claus Gittinger
+              All Rights Reserved
+
+ This software is furnished under a license and may be used
+ only in accordance with the terms of that license and with the
+ inclusion of the above copyright notice.   This software may not
+ be provided or otherwise made available to, or used by, any
+ other person.  No title to or ownership of the software is
+ hereby transferred.
+"
+
+Scroller subclass:#MiniScroller
+         instanceVariableNames:''
+         classVariableNames:''
+         poolDictionaries:''
+         category:'Views-Interactors'
+!
+
+MiniScroller comment:'
+COPYRIGHT (c) 1994 by Claus Gittinger
+              All Rights Reserved
+
+$Header: /cvs/stx/stx/libwidg/MiniScroller.st,v 1.1 1994-08-07 13:22:53 claus Exp $
+'!
+
+!MiniScroller class methodsFor:'documentation'!
+
+copyright
+"
+ COPYRIGHT (c) 1994 by Claus Gittinger
+              All Rights Reserved
+
+ This software is furnished under a license and may be used
+ only in accordance with the terms of that license and with the
+ inclusion of the above copyright notice.   This software may not
+ be provided or otherwise made available to, or used by, any
+ other person.  No title to or ownership of the software is
+ hereby transferred.
+"
+!
+
+version
+"
+$Header: /cvs/stx/stx/libwidg/MiniScroller.st,v 1.1 1994-08-07 13:22:53 claus Exp $
+"
+!
+
+documentation
+"
+    like a scroller, but taking less screen space
+"
+! !
+
+!MiniScroller methodsFor:'initialization'!
+
+computeInitialExtent
+    "make my width very small"
+
+    |w h mm|
+
+    h := self class defaultExtent y.
+    mm := (thumbLevel ~~ 0) ifTrue:[2.5] ifFalse:[2.0].
+    w := (device horizontalPixelPerMillimeter asFloat * mm) rounded.
+    self extent:w @ h.
+!
+
+initStyle
+    super initStyle.
+    style == #iris ifTrue:[
+        tallyLevel := 0.
+        tallyMarks := 0.
+        thumbSoftEdge := false.
+        thumbLevel := 2.
+    ].
+    ((style ~~ #normal) and:[style ~~ #mswindows]) ifTrue:[
+        style == #st80 ifTrue:[
+            self level:1.
+            self borderWidth:0
+        ] ifFalse:[
+            self level:-1.
+            self borderWidth:0
+        ]
+    ].
+    shadowForm := lightForm := nil.
+    fixThumbHeight := false
+! !