ClickMenuView.st
changeset 127 462396b08e30
parent 38 4b9b70b2cc87
child 174 d80a6cc3f9b2
--- a/ClickMenuView.st	Wed May 10 04:30:46 1995 +0200
+++ b/ClickMenuView.st	Fri May 12 20:25:18 1995 +0200
@@ -1,6 +1,6 @@
 "
  COPYRIGHT (c) 1991 by Claus Gittinger
-              All Rights Reserved
+	      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
@@ -19,9 +19,9 @@
 
 ClickMenuView comment:'
 COPYRIGHT (c) 1991 by Claus Gittinger
-              All Rights Reserved
+	      All Rights Reserved
 
-$Header: /cvs/stx/stx/libwidg/ClickMenuView.st,v 1.4 1994-08-07 13:21:12 claus Exp $
+$Header: /cvs/stx/stx/libwidg/ClickMenuView.st,v 1.5 1995-05-12 18:23:44 claus Exp $
 '!
 
 !ClickMenuView class methodsFor:'documentation'!
@@ -29,7 +29,7 @@
 copyright
 "
  COPYRIGHT (c) 1991 by Claus Gittinger
-              All Rights Reserved
+	      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
@@ -42,7 +42,7 @@
 
 version
 "
-$Header: /cvs/stx/stx/libwidg/ClickMenuView.st,v 1.4 1994-08-07 13:21:12 claus Exp $
+$Header: /cvs/stx/stx/libwidg/ClickMenuView.st,v 1.5 1995-05-12 18:23:44 claus Exp $
 "
 !
 
@@ -50,6 +50,53 @@
 "
     ClickMenuViews are like menuViews, but deselects automatically
     after clicked on an entry.
+    ClickMenuViews can be used as static menus (i.e. non-popping); 
+    for example, the old launcher uses an instance of ClickMenuView.
+"
+!
+
+examples 
+"
+    |top menu1 menu2|
+
+    top := StandardSystemView new.
+    menu1 := ClickMenuView 
+		labels:#(
+			 'foo'
+			 'bar'
+			 'baz '
+			 '-'
+			 'more foo'
+			 '='
+			 'quit'
+			)
+		selectors:#(
+			foo
+			bar
+			baz
+			nil
+			moreFoo
+			nil
+			destroy
+		       )
+		receiver:top.
+
+    menu1 subMenuAt:#moreFoo put:(
+	PopUpMenu labels:#(
+			    'more1 '
+			    'more2 '
+			    'more3'
+			   )
+	       selectors:#(
+			    more1
+			    more2
+			    more3
+			   )
+		receiver:self
+    ).
+    menu1 resize; open.
+    top add:menu1.
+    top openWithExtent:(menu1 extent).
 "
 ! !