hiding tabs
authorClaus Gittinger <cg@exept.de>
Fri, 28 Mar 1997 15:40:43 +0100
changeset 330 e216c5a56f88
parent 329 098318898b01
child 331 d6fad4b27a9a
hiding tabs
TabSpecRuler.st
--- a/TabSpecRuler.st	Fri Mar 28 15:22:14 1997 +0100
+++ b/TabSpecRuler.st	Fri Mar 28 15:40:43 1997 +0100
@@ -13,7 +13,7 @@
 SimpleView subclass:#TabSpecRuler
 	instanceVariableNames:'tabSpec titleEntry handleStyle handleCursor movedTabIndex
 		movedTabX synchronousOperation handleWidth fixedTabs
-		tabsAreVariable'
+		tabsAreVariable hiddenTabs'
 	classVariableNames:'DefaultHandleStyle'
 	poolDictionaries:''
 	category:'Views-Misc'
@@ -104,6 +104,26 @@
     "Modified: 28.3.1997 / 15:03:18 / cg"
 !
 
+hiddenTabs
+    "return the collection of tabs which are to be hidden
+     (or nil if all are to be shown)"
+
+    ^ hiddenTabs
+
+    "Created: 28.3.1997 / 15:35:54 / cg"
+    "Modified: 28.3.1997 / 15:36:18 / cg"
+!
+
+hiddenTabs:something
+    "set the collection of tabs which are to be hidden
+     (or nil if all are to be shown)"
+
+    hiddenTabs := something.
+
+    "Created: 28.3.1997 / 15:35:54 / cg"
+    "Modified: 28.3.1997 / 15:36:24 / cg"
+!
+
 synchronousOperation
     "return the synchronousOperation mode settings value"
 
@@ -359,6 +379,8 @@
     |x|
 
     tabSpec isNil ifTrue:[^ self].
+    (hiddenTabs notNil and:[hiddenTabs includes:idx]) ifTrue:[^ self].
+
     idx == movedTabIndex ifTrue:[
         x := movedTabX
     ] ifFalse:[
@@ -367,11 +389,11 @@
     self drawHandleAtX:x type:(tabSpec typeOfTab:idx).
 
     "Created: 28.3.1997 / 13:57:54 / cg"
-    "Modified: 28.3.1997 / 14:26:36 / cg"
+    "Modified: 28.3.1997 / 15:37:07 / cg"
 ! !
 
 !TabSpecRuler class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libwidg2/TabSpecRuler.st,v 1.9 1997-03-28 14:20:59 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libwidg2/TabSpecRuler.st,v 1.10 1997-03-28 14:40:43 cg Exp $'
 ! !