Move common channels to View.
authorStefan Vogel <sv@exept.de>
Wed, 31 Mar 1999 07:51:55 +0200
changeset 1831 c1dd74b063a7
parent 1830 f732d15043a4
child 1832 192a7e6fdbef
Move common channels to View.
SelListV.st
SelectionInListView.st
--- a/SelListV.st	Wed Mar 31 07:50:41 1999 +0200
+++ b/SelListV.st	Wed Mar 31 07:51:55 1999 +0200
@@ -17,7 +17,7 @@
 		printItems oneItem useIndex hilightLevel hilightFrameColor
 		ignoreReselect arrowLevel smallArrow keyActionStyle
 		returnKeyActionStyle toggleSelect strikeOut iSearchString items
-		doubleClickMsg hilightStyle enableChannel clickPosition allowDrag
+		doubleClickMsg hilightStyle clickPosition allowDrag
 		dragObjectConverter dragIsActive endDragAction dropTarget
 		dropSource visualBlock selectedVisualBlock'
 	classVariableNames:'RightArrowShadowForm RightArrowLightForm RightArrowForm
@@ -1278,12 +1278,6 @@
 
 !SelectionInListView methodsFor:'accessing-behavior'!
 
-disable
-    "disable the view - no selection changes are allowed"
-
-    enabled := false
-!
-
 dragObjectConverter:aBlock
     "set an optional dragObject converter;
      if non-nil, this one will be evaluated on a drag-start,
@@ -1299,12 +1293,6 @@
     "Modified: 6.4.1997 / 14:12:45 / cg"
 !
 
-enable
-    "enable the view - selection changes are allowed"
-
-    enabled := true
-!
-
 enabled
    "return true if selections are possible"
 
@@ -1313,6 +1301,14 @@
     "Created: 29.1.1997 / 12:40:54 / stefan"
 !
 
+enabled:aBoolean
+    "enable/disable the view - selection changes are allowed/disallowed"
+
+    enabled := aBoolean
+
+    "Modified: / 30.3.1999 / 15:26:10 / stefan"
+!
+
 ignoreReselect:aBoolean
     "set/clear the ignoreReselect flag - 
      if set, a click on an already selected entry is ignored.
@@ -1353,24 +1349,6 @@
 
 !SelectionInListView methodsFor:'accessing-channels'!
 
-enableChannel
-    ^ enableChannel
-
-    "Created: 28.3.1997 / 21:24:00 / cg"
-!
-
-enableChannel:aValueHolder 
-    "set the valueHolder, which holds the enable boolean value"
-
-    |prev|
-
-    prev := enableChannel.
-    enableChannel := aValueHolder.
-    self setupChannel:aValueHolder for:nil withOld:prev
-
-    "Modified: / 14.11.1997 / 13:51:15 / cg"
-!
-
 listHolder
     ^ listChannel
 !
@@ -1680,10 +1658,6 @@
             ^ self
         ].
     ].
-    changedObject == enableChannel ifTrue:[
-        self enableStateChange.
-        ^ self
-    ].
     changedObject == listChannel ifFalse:[
         ^ super update:something with:aParameter from:changedObject
     ].
@@ -1744,6 +1718,7 @@
     self getListFromModel.
 
     "Modified: / 14.11.1997 / 13:51:04 / cg"
+    "Modified: / 30.3.1999 / 14:27:42 / stefan"
 ! !
 
 !SelectionInListView methodsFor:'drag & drop - new'!
@@ -2287,17 +2262,6 @@
     "Modified: / 26.10.1997 / 18:51:39 / cg"
 !
 
-enableStateChange
-    enableChannel value ifTrue:[
-        self enable.
-    ] ifFalse:[
-        self disable.
-    ].
-
-    "Created: / 28.3.1997 / 21:25:01 / cg"
-    "Modified: / 26.10.1997 / 18:48:27 / cg"
-!
-
 key:key select:index x:x y:y
     "select an entry by a keyboard action.
      This is treated like a doubleClick on that entry"
@@ -3634,5 +3598,5 @@
 !SelectionInListView class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libwidg/Attic/SelListV.st,v 1.144 1999-03-30 07:49:34 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libwidg/Attic/SelListV.st,v 1.145 1999-03-31 05:51:55 stefan Exp $'
 ! !
--- a/SelectionInListView.st	Wed Mar 31 07:50:41 1999 +0200
+++ b/SelectionInListView.st	Wed Mar 31 07:51:55 1999 +0200
@@ -17,7 +17,7 @@
 		printItems oneItem useIndex hilightLevel hilightFrameColor
 		ignoreReselect arrowLevel smallArrow keyActionStyle
 		returnKeyActionStyle toggleSelect strikeOut iSearchString items
-		doubleClickMsg hilightStyle enableChannel clickPosition allowDrag
+		doubleClickMsg hilightStyle clickPosition allowDrag
 		dragObjectConverter dragIsActive endDragAction dropTarget
 		dropSource visualBlock selectedVisualBlock'
 	classVariableNames:'RightArrowShadowForm RightArrowLightForm RightArrowForm
@@ -1278,12 +1278,6 @@
 
 !SelectionInListView methodsFor:'accessing-behavior'!
 
-disable
-    "disable the view - no selection changes are allowed"
-
-    enabled := false
-!
-
 dragObjectConverter:aBlock
     "set an optional dragObject converter;
      if non-nil, this one will be evaluated on a drag-start,
@@ -1299,12 +1293,6 @@
     "Modified: 6.4.1997 / 14:12:45 / cg"
 !
 
-enable
-    "enable the view - selection changes are allowed"
-
-    enabled := true
-!
-
 enabled
    "return true if selections are possible"
 
@@ -1313,6 +1301,14 @@
     "Created: 29.1.1997 / 12:40:54 / stefan"
 !
 
+enabled:aBoolean
+    "enable/disable the view - selection changes are allowed/disallowed"
+
+    enabled := aBoolean
+
+    "Modified: / 30.3.1999 / 15:26:10 / stefan"
+!
+
 ignoreReselect:aBoolean
     "set/clear the ignoreReselect flag - 
      if set, a click on an already selected entry is ignored.
@@ -1353,24 +1349,6 @@
 
 !SelectionInListView methodsFor:'accessing-channels'!
 
-enableChannel
-    ^ enableChannel
-
-    "Created: 28.3.1997 / 21:24:00 / cg"
-!
-
-enableChannel:aValueHolder 
-    "set the valueHolder, which holds the enable boolean value"
-
-    |prev|
-
-    prev := enableChannel.
-    enableChannel := aValueHolder.
-    self setupChannel:aValueHolder for:nil withOld:prev
-
-    "Modified: / 14.11.1997 / 13:51:15 / cg"
-!
-
 listHolder
     ^ listChannel
 !
@@ -1680,10 +1658,6 @@
             ^ self
         ].
     ].
-    changedObject == enableChannel ifTrue:[
-        self enableStateChange.
-        ^ self
-    ].
     changedObject == listChannel ifFalse:[
         ^ super update:something with:aParameter from:changedObject
     ].
@@ -1744,6 +1718,7 @@
     self getListFromModel.
 
     "Modified: / 14.11.1997 / 13:51:04 / cg"
+    "Modified: / 30.3.1999 / 14:27:42 / stefan"
 ! !
 
 !SelectionInListView methodsFor:'drag & drop - new'!
@@ -2287,17 +2262,6 @@
     "Modified: / 26.10.1997 / 18:51:39 / cg"
 !
 
-enableStateChange
-    enableChannel value ifTrue:[
-        self enable.
-    ] ifFalse:[
-        self disable.
-    ].
-
-    "Created: / 28.3.1997 / 21:25:01 / cg"
-    "Modified: / 26.10.1997 / 18:48:27 / cg"
-!
-
 key:key select:index x:x y:y
     "select an entry by a keyboard action.
      This is treated like a doubleClick on that entry"
@@ -3634,5 +3598,5 @@
 !SelectionInListView class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libwidg/SelectionInListView.st,v 1.144 1999-03-30 07:49:34 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libwidg/SelectionInListView.st,v 1.145 1999-03-31 05:51:55 stefan Exp $'
 ! !