*** empty log message ***
authorClaus Gittinger <cg@exept.de>
Mon, 15 Sep 1997 22:25:21 +0200
changeset 696 a49928754789
parent 695 b27d39658fd2
child 697 030c1ca61ff6
*** empty log message ***
ActiveHelp.st
Menu.st
--- a/ActiveHelp.st	Mon Sep 15 22:16:05 1997 +0200
+++ b/ActiveHelp.st	Mon Sep 15 22:25:21 1997 +0200
@@ -292,8 +292,6 @@
 pointerEnter:state x:x y:y view:aView
     "handle pointer entering a view; setup timeOut to show help"
 
-    |p|
-
     self stopHelpDisplayProcess.
     self hideIfPointerLeft:aView.
     aView topView == currentHelpView ifTrue:[
@@ -421,12 +419,7 @@
 hideIfPointerLeft:aView
     "hide help, if the pointer is not in aView"
 
-    |whereOnScreen p|
-
-"/    showProcess notNil ifTrue:[
-"/        p := showProcess. showProcess := nil.
-"/        p terminate.
-"/    ].
+    |whereOnScreen|
 
     whereOnScreen := aView graphicsDevice pointerPosition.
 
@@ -495,7 +488,7 @@
      re-negotiation of the displayed helpText 
      (for example in a menu, when the selection changes)"
 
-    |text p top app|
+    |text top app|
 
     text := self helpTextFor:aView atX:x y:y.
     lastHelpText = text ifTrue:[
@@ -544,7 +537,7 @@
 showHelp:aHelpText for:view
     "show the help text for aView"
 
-    |org p v dev top app|
+    |org p v dev|
 
     view == currentView ifTrue:[
         lastHelpText = aHelpText ifTrue:[
@@ -618,6 +611,6 @@
 !ActiveHelp class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libview2/ActiveHelp.st,v 1.27 1997-06-28 13:07:32 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libview2/ActiveHelp.st,v 1.28 1997-09-15 20:25:20 cg Exp $'
 ! !
 ActiveHelp initialize!
--- a/Menu.st	Mon Sep 15 22:16:05 1997 +0200
+++ b/Menu.st	Mon Sep 15 22:25:21 1997 +0200
@@ -1,3 +1,5 @@
+'From Smalltalk/X, Version:3.1.10 on 13-sep-1997 at 10:55:54 pm'                !
+
 Object subclass:#Menu
 	instanceVariableNames:'items groupSizes receiver'
 	classVariableNames:''
@@ -59,6 +61,18 @@
         ^self new menuItems: menuItems menuItemGroups: groupLengths values: valueArray
 
     "Modified: 20.6.1997 / 10:46:45 / cg"
+!
+
+labelList:arrayOfGroupStrings values:valueArrayOrNil
+    |labels lines|
+
+    lines := arrayOfGroupStrings collect:[:each | each size].
+    labels := OrderedCollection new.
+    arrayOfGroupStrings do:[:group | labels addAll:group].
+    ^ self labelArray:labels lines:lines values:valueArrayOrNil
+
+    "Modified: 20.6.1997 / 10:46:45 / cg"
+    "Created: 13.9.1997 / 10:35:46 / cg"
 ! !
 
 !Menu methodsFor:'accessing'!
@@ -86,6 +100,16 @@
     ].
 !
 
+atNameKey:aNameKey
+    "return the menuItem for the given nameKey; nil if no such item is in the menu."
+
+    items do:[:anItem | anItem nameKey == aNameKey ifTrue:[^ anItem]].
+    ^ nil
+
+    "Created: 13.9.1997 / 10:25:16 / cg"
+    "Modified: 13.9.1997 / 10:28:44 / cg"
+!
+
 groupSizes
     "return the value of the instance variable 'groupSizes' (automatically generated)"
 
@@ -186,6 +210,18 @@
 
     receiver := something.!
 
+removeItem:aMenuItem
+    |idx|
+    items notNil ifTrue:[
+        idx := items identityIndexOf:aMenuItem.
+        idx ~~ 0 ifTrue:[
+            items removeAtIndex:idx
+        ]
+    ].
+
+    "Created: 13.9.1997 / 10:27:31 / cg"
+!
+
 valueAt:index
     "return a collection of values from my items"
 
@@ -466,5 +502,5 @@
 !Menu class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libview2/Menu.st,v 1.17 1997-07-28 11:17:56 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libview2/Menu.st,v 1.18 1997-09-15 20:25:21 cg Exp $'
 ! !