OptionBox.st
changeset 355 a55f62047156
parent 243 5c411425097d
child 371 ed0d15f84085
--- a/OptionBox.st	Sat Feb 10 17:57:06 1996 +0100
+++ b/OptionBox.st	Sun Feb 11 10:55:05 1996 +0100
@@ -11,11 +11,11 @@
 "
 
 ModalBox subclass:#OptionBox
-	 instanceVariableNames:'formLabel textLabel buttonPanel buttons actions
-                defaultButtonIndex'
-	 classVariableNames:'WarnBitmap'
-	 poolDictionaries:''
-	 category:'Views-DialogBoxes'
+	instanceVariableNames:'formLabel textLabel buttonPanel buttons actions
+		defaultButtonIndex'
+	classVariableNames:'WarnBitmap'
+	poolDictionaries:''
+	category:'Views-DialogBoxes'
 !
 
 !OptionBox class methodsFor:'documentation'!
@@ -36,6 +36,18 @@
 
 documentation
 "
+   Historic note:
+        originally, ST/X had separate classes for the various entry methods;
+        there were YesNoBox, EnterBox, InfoBox and so on.
+        In the meantime, the DialogBox class (and therefore its alias: Dialog)
+        is going to duplicate most funcionality found in these classes.
+
+        In the future, those existing subclasses' functionality is going to
+        be moved fully into Dialog, and the subclasses will be replaced by dummy
+        delegators. (They will be kept for backward compatibility, though).
+
+
+
     OptionBoxes are like YesNoBoxes but with as many buttons as you like;
     this will finally be a superclass of WarnBox and YesNoBox - or maybe merged
     all into DialogBox..
@@ -45,43 +57,43 @@
 
     examples:
 
-	|box|
+        |box|
 
-	box := OptionBox title:'hello' numberOfOptions:4.
-	box showAtPointer
+        box := OptionBox title:'hello' numberOfOptions:4.
+        box showAtPointer
 
 
 
-	|box|
-	box := OptionBox title:'hello' numberOfOptions:3.
-	box buttonTitles:#('one' 'two' 'three').
-	box showAtPointer
+        |box|
+        box := OptionBox title:'hello' numberOfOptions:3.
+        box buttonTitles:#('one' 'two' 'three').
+        box showAtPointer
 
 
      performing an action:
 
-	|box|
-	box := OptionBox title:'hello' numberOfOptions:3.
-	box buttonTitles:#('one' 'two' 'three').
-	box action:[:which | Transcript show:'button ';
-					show: which;
-					showCr:' was pressed'].
-	box showAtPointer
+        |box|
+        box := OptionBox title:'hello' numberOfOptions:3.
+        box buttonTitles:#('one' 'two' 'three').
+        box action:[:which | Transcript show:'button ';
+                                        show: which;
+                                        showCr:' was pressed'].
+        box showAtPointer
 
 
      returning a value:
 
-	|what|
-	what := OptionBox 
-		      request:('text has not been accepted.\\Your modifications will be lost when continuing.') withCRs
-		      label:' Attention'
-		      form:(WarningBox iconBitmap)
-		      buttonLabels:#('abort' 'accept' 'continue')
-		      values:#(#abort #accept #continue).
+        |what|
+        what := OptionBox 
+                      request:('text has not been accepted.\\Your modifications will be lost when continuing.') withCRs
+                      label:' Attention'
+                      form:(WarningBox iconBitmap)
+                      buttonLabels:#('abort' 'accept' 'continue')
+                      values:#(#abort #accept #continue).
 
-	...
-	someObject perform:what.
-	...
+        ...
+        someObject perform:what.
+        ...
 
     CAVEAT: this is a leftover - functionality will be merged into DialogBox
 "
@@ -365,5 +377,5 @@
 !OptionBox class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libwidg/OptionBox.st,v 1.24 1995-12-07 22:23:45 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libwidg/OptionBox.st,v 1.25 1996-02-11 09:53:59 cg Exp $'
 ! !