--- a/VariableVerticalPanel.st Sat Nov 11 17:23:54 1995 +0100
+++ b/VariableVerticalPanel.st Tue Nov 14 21:27:51 1995 +0100
@@ -14,10 +14,10 @@
SimpleView subclass:#VariableVerticalPanel
instanceVariableNames:'barHeight barWidth separatingLine shadowForm lightForm showHandle
- handlePosition handleColor handleStyle noColor trackLine
+ handlePosition handleColor handleStyle handleLevel noColor trackLine
redrawLocked'
classVariableNames:'DefaultShowHandle DefaultHandleStyle DefaultHandlePosition
- DefaultTrackingLine DefaultSeparatingLine DefaultHandleColor
+ DefaultTrackingLine DefaultSeparatingLine DefaultHandleColor DefaultHandleLevel
DefaultCursor'
poolDictionaries:''
category:'Views-Layout'
@@ -40,7 +40,7 @@
!
version
- ^ '$Header: /cvs/stx/stx/libwidg/VariableVerticalPanel.st,v 1.21 1995-11-11 16:23:43 cg Exp $'
+ ^ '$Header: /cvs/stx/stx/libwidg/VariableVerticalPanel.st,v 1.22 1995-11-14 20:27:45 cg Exp $'
!
documentation
@@ -81,6 +81,54 @@
origin:0.0 @ 0.0
corner:1.0 @ 1.0
in:top.
+
+ v1 := View origin:0.0@0.0 corner:1.0@(1/3) in:p.
+ v2 := View origin:0.0@(1/3) corner:1.0@(2/3) in:p.
+ v3 := View origin:0.0@(2/3) corner:1.0@1.0 in:p.
+
+ v1 viewBackground:(Color red).
+ v2 viewBackground:(Color green).
+ v3 viewBackground:(Color yellow).
+
+ top open
+
+
+
+ example:
+ |top p v1 v2 v3|
+
+ top := StandardSystemView new.
+ top extent:300@300.
+
+ p := VariableVerticalPanel
+ origin:0.0 @ 0.0
+ corner:1.0 @ 1.0
+ in:top.
+ p handleLevel:-1.
+
+ v1 := View origin:0.0@0.0 corner:1.0@(1/3) in:p.
+ v2 := View origin:0.0@(1/3) corner:1.0@(2/3) in:p.
+ v3 := View origin:0.0@(2/3) corner:1.0@1.0 in:p.
+
+ v1 viewBackground:(Color red).
+ v2 viewBackground:(Color green).
+ v3 viewBackground:(Color yellow).
+
+ top open
+
+
+
+ example:
+ |top p v1 v2 v3|
+
+ top := StandardSystemView new.
+ top extent:300@300.
+
+ p := VariableVerticalPanel
+ origin:0.0 @ 0.0
+ corner:1.0 @ 1.0
+ in:top.
+
v1 := ScrollableView for:SelectionInListView in:p.
v1 origin:0.0 @ 0.0 corner:1.0 @ 0.5.
v1 list:(FileDirectory directoryNamed:'/etc') contents.
@@ -112,6 +160,7 @@
DefaultShowHandle := StyleSheet at:'variablePanelShowHandle' default:true.
DefaultHandleStyle := StyleSheet at:'variablePanelHandleStyle'.
DefaultHandlePosition := StyleSheet at:'variablePanelHandlePosition' default:#right.
+ DefaultHandleLevel := StyleSheet at:'variablePanelHandleLevel' default:2.
DefaultTrackingLine := StyleSheet at:'variablePanelTrackingLine' default:false.
DefaultSeparatingLine := StyleSheet at:'variablePanelSeparatingLine' default:false.
DefaultHandleColor := StyleSheet colorAt:'variablePanelHandleColor' default:Black.
@@ -163,22 +212,28 @@
width:(barWidth + barWidth)
height:h.
- y := hy.
- handleStyle == #st80 ifTrue:[
- y := y - 1
+ handleStyle == #line ifTrue:[
+ self paint:handleColor.
+ self displayLineFromX:hx - barWidth y:y toX:hx + barWidth y:y
+ ] ifFalse:[
+ y := hy.
+ handleStyle == #st80 ifTrue:[
+ y := y - 1
+ ].
+ self drawEdgesForX:(hx - barWidth)
+ y:(y + m)
+ width:(barWidth + barWidth)
+ height:h
+ level:handleLevel.
+
+ handleStyle == #iris ifTrue:[
+ self paint:handleColor.
+ self fillDeviceRectangleX:(hx - barWidth + 2)
+ y:(y + m + 2)
+ width:(barWidth + barWidth - 4)
+ height:h - 4
+ ]
].
- self drawEdgesForX:(hx - barWidth)
- y:(y + m)
- width:(barWidth + barWidth)
- height:h
- level:2.
- handleStyle == #iris ifTrue:[
- self paint:handleColor.
- self fillDeviceRectangleX:(hx - barWidth + 2)
- y:(y + m + 2)
- width:(barWidth + barWidth - 4)
- height:h - 4
- ]
] ifFalse:[
y := hy.
self drawHandleFormAtX:hx y:(y + m)
@@ -204,6 +259,8 @@
].
self fillRectangleX:hx y:hy width:barWidth height:barHeight
]
+
+ "Modified: 14.11.1995 / 20:31:02 / cg"
!
redrawHandlesFrom:start to:stop
@@ -320,10 +377,20 @@
^ handlePosition
!
+handleLevel:aNumber
+ "define the 3D level of the handle (only with some styles).
+ Normally, this is defined via styleSheet files, but this entry allows
+ individual views to be manipulated."
+
+ handleLevel := aNumber
+!
+
style:styleSymbol
"define the style of the handle;
styleSymbol may be #motif to draw a little knob or
- anything else to draw scrollBars handleForm"
+ anything else to draw scrollBars handleForm.
+ Normally, this is defined via styleSheet files, but this entry allows
+ individual views to be manipulated."
(styleSymbol ~~ handleStyle) ifTrue:[
handleStyle := styleSymbol.
@@ -369,6 +436,7 @@
super initStyle.
handleColor := DefaultHandleColor on:device.
+ handleLevel := DefaultHandleLevel.
showHandle := DefaultShowHandle.