OptionBox.st
author Claus Gittinger <cg@exept.de>
Tue, 28 Feb 2012 16:00:06 +0100
changeset 4383 7d374bd7b21c
parent 4382 30f95402085b
child 4490 db468327af5d
permissions -rw-r--r--
changed: #initialize
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
0
e6a541c1c0eb Initial revision
claus
parents:
diff changeset
     1
"
5
claus
parents: 3
diff changeset
     2
 COPYRIGHT (c) 1991 by Claus Gittinger
59
450ce95a72a4 *** empty log message ***
claus
parents: 38
diff changeset
     3
	      All Rights Reserved
0
e6a541c1c0eb Initial revision
claus
parents:
diff changeset
     4
e6a541c1c0eb Initial revision
claus
parents:
diff changeset
     5
 This software is furnished under a license and may be used
e6a541c1c0eb Initial revision
claus
parents:
diff changeset
     6
 only in accordance with the terms of that license and with the
e6a541c1c0eb Initial revision
claus
parents:
diff changeset
     7
 inclusion of the above copyright notice.   This software may not
e6a541c1c0eb Initial revision
claus
parents:
diff changeset
     8
 be provided or otherwise made available to, or used by, any
e6a541c1c0eb Initial revision
claus
parents:
diff changeset
     9
 other person.  No title to or ownership of the software is
e6a541c1c0eb Initial revision
claus
parents:
diff changeset
    10
 hereby transferred.
e6a541c1c0eb Initial revision
claus
parents:
diff changeset
    11
"
2212
7475e8be57bb recompute label origin, if the form changes
Claus Gittinger <cg@exept.de>
parents: 2162
diff changeset
    12
"{ Package: 'stx:libwidg' }"
7475e8be57bb recompute label origin, if the form changes
Claus Gittinger <cg@exept.de>
parents: 2162
diff changeset
    13
740
2d5cb01c7e11 no need for focusSequence - DialogBox does it
Claus Gittinger <cg@exept.de>
parents: 713
diff changeset
    14
DialogBox subclass:#OptionBox
3936
01654678a889 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3905
diff changeset
    15
	instanceVariableNames:'labelPanel formLabel textLabel buttons actions defaultButtonIndex'
355
a55f62047156 commentary
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
    16
	classVariableNames:'WarnBitmap'
a55f62047156 commentary
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
    17
	poolDictionaries:''
a55f62047156 commentary
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
    18
	category:'Views-DialogBoxes'
0
e6a541c1c0eb Initial revision
claus
parents:
diff changeset
    19
!
e6a541c1c0eb Initial revision
claus
parents:
diff changeset
    20
847
0d760cfc9a8c commentary
Claus Gittinger <cg@exept.de>
parents: 799
diff changeset
    21
!OptionBox class methodsFor:'documentation'!
7
15a9291b9bd0 *** empty log message ***
claus
parents: 5
diff changeset
    22
38
4b9b70b2cc87 2.10.3 pre-final version
claus
parents: 21
diff changeset
    23
copyright
4b9b70b2cc87 2.10.3 pre-final version
claus
parents: 21
diff changeset
    24
"
4b9b70b2cc87 2.10.3 pre-final version
claus
parents: 21
diff changeset
    25
 COPYRIGHT (c) 1991 by Claus Gittinger
59
450ce95a72a4 *** empty log message ***
claus
parents: 38
diff changeset
    26
	      All Rights Reserved
38
4b9b70b2cc87 2.10.3 pre-final version
claus
parents: 21
diff changeset
    27
4b9b70b2cc87 2.10.3 pre-final version
claus
parents: 21
diff changeset
    28
 This software is furnished under a license and may be used
4b9b70b2cc87 2.10.3 pre-final version
claus
parents: 21
diff changeset
    29
 only in accordance with the terms of that license and with the
4b9b70b2cc87 2.10.3 pre-final version
claus
parents: 21
diff changeset
    30
 inclusion of the above copyright notice.   This software may not
4b9b70b2cc87 2.10.3 pre-final version
claus
parents: 21
diff changeset
    31
 be provided or otherwise made available to, or used by, any
4b9b70b2cc87 2.10.3 pre-final version
claus
parents: 21
diff changeset
    32
 other person.  No title to or ownership of the software is
4b9b70b2cc87 2.10.3 pre-final version
claus
parents: 21
diff changeset
    33
 hereby transferred.
4b9b70b2cc87 2.10.3 pre-final version
claus
parents: 21
diff changeset
    34
"
4b9b70b2cc87 2.10.3 pre-final version
claus
parents: 21
diff changeset
    35
!
4b9b70b2cc87 2.10.3 pre-final version
claus
parents: 21
diff changeset
    36
7
15a9291b9bd0 *** empty log message ***
claus
parents: 5
diff changeset
    37
documentation
15a9291b9bd0 *** empty log message ***
claus
parents: 5
diff changeset
    38
"
646
Claus Gittinger <cg@exept.de>
parents: 585
diff changeset
    39
   CAVEAT: this is a leftover - functionality has been merged into DialogBox
3936
01654678a889 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3905
diff changeset
    40
   PLEASE use one of the `Dialog chooseXXX' methods instead of OptionBox.
646
Claus Gittinger <cg@exept.de>
parents: 585
diff changeset
    41
Claus Gittinger <cg@exept.de>
parents: 585
diff changeset
    42
355
a55f62047156 commentary
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
    43
   Historic note:
646
Claus Gittinger <cg@exept.de>
parents: 585
diff changeset
    44
      originally, ST/X had separate classes for the various entry methods;
Claus Gittinger <cg@exept.de>
parents: 585
diff changeset
    45
      there were YesNoBox, EnterBox, InfoBox and so on.
Claus Gittinger <cg@exept.de>
parents: 585
diff changeset
    46
      In the meantime, the DialogBox class (and therefore its alias: Dialog)
Claus Gittinger <cg@exept.de>
parents: 585
diff changeset
    47
      is going to duplicate most funcionality found in these classes.
355
a55f62047156 commentary
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
    48
646
Claus Gittinger <cg@exept.de>
parents: 585
diff changeset
    49
      In the future, those existing subclasses' functionality is going to
Claus Gittinger <cg@exept.de>
parents: 585
diff changeset
    50
      be moved fully into Dialog, and the subclasses will be replaced by dummy
Claus Gittinger <cg@exept.de>
parents: 585
diff changeset
    51
      delegators. (They will be kept for backward compatibility, though).
355
a55f62047156 commentary
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
    52
a55f62047156 commentary
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
    53
38
4b9b70b2cc87 2.10.3 pre-final version
claus
parents: 21
diff changeset
    54
    OptionBoxes are like YesNoBoxes but with as many buttons as you like;
91
e8db16616e97 *** empty log message ***
claus
parents: 85
diff changeset
    55
    this will finally be a superclass of WarnBox and YesNoBox - or maybe merged
38
4b9b70b2cc87 2.10.3 pre-final version
claus
parents: 21
diff changeset
    56
    all into DialogBox..
97
cbf495fe3b64 *** empty log message ***
claus
parents: 95
diff changeset
    57
    Use them for multiway questions.
91
e8db16616e97 *** empty log message ***
claus
parents: 85
diff changeset
    58
    For a consistent user interface, the rightmost button is the default return
97
cbf495fe3b64 *** empty log message ***
claus
parents: 95
diff changeset
    59
    button (i.e. pressing return in the box performs this buttons function).
91
e8db16616e97 *** empty log message ***
claus
parents: 85
diff changeset
    60
646
Claus Gittinger <cg@exept.de>
parents: 585
diff changeset
    61
    [author:]
Claus Gittinger <cg@exept.de>
parents: 585
diff changeset
    62
        Claus Gittinger
91
e8db16616e97 *** empty log message ***
claus
parents: 85
diff changeset
    63
646
Claus Gittinger <cg@exept.de>
parents: 585
diff changeset
    64
    [see also:]
Claus Gittinger <cg@exept.de>
parents: 585
diff changeset
    65
        DialogBox
Claus Gittinger <cg@exept.de>
parents: 585
diff changeset
    66
"
Claus Gittinger <cg@exept.de>
parents: 585
diff changeset
    67
!
91
e8db16616e97 *** empty log message ***
claus
parents: 85
diff changeset
    68
646
Claus Gittinger <cg@exept.de>
parents: 585
diff changeset
    69
examples
Claus Gittinger <cg@exept.de>
parents: 585
diff changeset
    70
"
Claus Gittinger <cg@exept.de>
parents: 585
diff changeset
    71
                                                                        [exBegin]
Claus Gittinger <cg@exept.de>
parents: 585
diff changeset
    72
    |box|
97
cbf495fe3b64 *** empty log message ***
claus
parents: 95
diff changeset
    73
646
Claus Gittinger <cg@exept.de>
parents: 585
diff changeset
    74
    box := OptionBox title:'hello' numberOfOptions:4.
Claus Gittinger <cg@exept.de>
parents: 585
diff changeset
    75
    box showAtPointer
Claus Gittinger <cg@exept.de>
parents: 585
diff changeset
    76
                                                                        [exEnd]
97
cbf495fe3b64 *** empty log message ***
claus
parents: 95
diff changeset
    77
cbf495fe3b64 *** empty log message ***
claus
parents: 95
diff changeset
    78
646
Claus Gittinger <cg@exept.de>
parents: 585
diff changeset
    79
                                                                        [exBegin]
Claus Gittinger <cg@exept.de>
parents: 585
diff changeset
    80
    |box|
Claus Gittinger <cg@exept.de>
parents: 585
diff changeset
    81
    box := OptionBox title:'hello' numberOfOptions:3.
Claus Gittinger <cg@exept.de>
parents: 585
diff changeset
    82
    box buttonTitles:#('one' 'two' 'three').
Claus Gittinger <cg@exept.de>
parents: 585
diff changeset
    83
    box showAtPointer
Claus Gittinger <cg@exept.de>
parents: 585
diff changeset
    84
                                                                        [exEnd]
97
cbf495fe3b64 *** empty log message ***
claus
parents: 95
diff changeset
    85
646
Claus Gittinger <cg@exept.de>
parents: 585
diff changeset
    86
 performing an action:
97
cbf495fe3b64 *** empty log message ***
claus
parents: 95
diff changeset
    87
646
Claus Gittinger <cg@exept.de>
parents: 585
diff changeset
    88
                                                                        [exBegin]
Claus Gittinger <cg@exept.de>
parents: 585
diff changeset
    89
    |box|
Claus Gittinger <cg@exept.de>
parents: 585
diff changeset
    90
    box := OptionBox title:'hello' numberOfOptions:3.
Claus Gittinger <cg@exept.de>
parents: 585
diff changeset
    91
    box buttonTitles:#('one' 'two' 'three').
Claus Gittinger <cg@exept.de>
parents: 585
diff changeset
    92
    box action:[:which | Transcript show:'button ';
Claus Gittinger <cg@exept.de>
parents: 585
diff changeset
    93
                                    show: which;
655
acad3ef3a46c showCr: -> showCR:
Claus Gittinger <cg@exept.de>
parents: 646
diff changeset
    94
                                    showCR:' was pressed'].
646
Claus Gittinger <cg@exept.de>
parents: 585
diff changeset
    95
    box showAtPointer
Claus Gittinger <cg@exept.de>
parents: 585
diff changeset
    96
                                                                        [exEnd]
97
cbf495fe3b64 *** empty log message ***
claus
parents: 95
diff changeset
    97
646
Claus Gittinger <cg@exept.de>
parents: 585
diff changeset
    98
 returning a value:
Claus Gittinger <cg@exept.de>
parents: 585
diff changeset
    99
                                                                        [exBegin]
Claus Gittinger <cg@exept.de>
parents: 585
diff changeset
   100
    |what|
133
claus
parents: 132
diff changeset
   101
646
Claus Gittinger <cg@exept.de>
parents: 585
diff changeset
   102
    what := OptionBox 
Claus Gittinger <cg@exept.de>
parents: 585
diff changeset
   103
                  request:('text has not been accepted.\\Your modifications will be lost when continuing.') withCRs
Claus Gittinger <cg@exept.de>
parents: 585
diff changeset
   104
                  label:' Attention'
2969
eb87f1aedd6c Do not use obsolete methods with #form:
Stefan Vogel <sv@exept.de>
parents: 2898
diff changeset
   105
                  image:(WarningBox iconBitmap)
3211
54cb5fb7fd2f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3208
diff changeset
   106
                  buttonLabels:#('Abort' 'Accept' 'Continue')
646
Claus Gittinger <cg@exept.de>
parents: 585
diff changeset
   107
                  values:#(#abort #accept #continue).
655
acad3ef3a46c showCr: -> showCR:
Claus Gittinger <cg@exept.de>
parents: 646
diff changeset
   108
    Transcript showCR:what.
646
Claus Gittinger <cg@exept.de>
parents: 585
diff changeset
   109
                                                                        [exEnd]
3211
54cb5fb7fd2f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3208
diff changeset
   110
54cb5fb7fd2f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3208
diff changeset
   111
54cb5fb7fd2f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3208
diff changeset
   112
 use callBack-hook to intercept creation:
54cb5fb7fd2f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3208
diff changeset
   113
                                                                        [exBegin]
54cb5fb7fd2f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3208
diff changeset
   114
    |what|
54cb5fb7fd2f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3208
diff changeset
   115
54cb5fb7fd2f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3208
diff changeset
   116
    AboutToOpenBoxNotificationSignal handle:[:ex |
54cb5fb7fd2f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3208
diff changeset
   117
        |box|
54cb5fb7fd2f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3208
diff changeset
   118
54cb5fb7fd2f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3208
diff changeset
   119
        box := ex parameter.
54cb5fb7fd2f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3208
diff changeset
   120
        box verticalPanel 
54cb5fb7fd2f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3208
diff changeset
   121
            add:(CheckBox label:'Do no show this Dialog again.'
54cb5fb7fd2f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3208
diff changeset
   122
                          model:false asValue).
54cb5fb7fd2f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3208
diff changeset
   123
        ex proceed.
54cb5fb7fd2f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3208
diff changeset
   124
    ] do:[
54cb5fb7fd2f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3208
diff changeset
   125
        what := OptionBox 
54cb5fb7fd2f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3208
diff changeset
   126
                      request:('bla bla bla bla.\\You must bla bla bla!!') withCRs
54cb5fb7fd2f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3208
diff changeset
   127
                      label:' Attention'
54cb5fb7fd2f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3208
diff changeset
   128
                      image:(WarningBox iconBitmap)
54cb5fb7fd2f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3208
diff changeset
   129
                      buttonLabels:#('Abort' 'Accept' 'Continue')
54cb5fb7fd2f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3208
diff changeset
   130
                      values:#(#abort #accept #continue)
54cb5fb7fd2f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3208
diff changeset
   131
                      default:#continue.
54cb5fb7fd2f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3208
diff changeset
   132
    ].
54cb5fb7fd2f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3208
diff changeset
   133
    Transcript showCR:what.
54cb5fb7fd2f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3208
diff changeset
   134
                                                                        [exEnd]
7
15a9291b9bd0 *** empty log message ***
claus
parents: 5
diff changeset
   135
"
197
00927189c882 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 188
diff changeset
   136
! !
00927189c882 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 188
diff changeset
   137
847
0d760cfc9a8c commentary
Claus Gittinger <cg@exept.de>
parents: 799
diff changeset
   138
!OptionBox class methodsFor:'instance creation'!
197
00927189c882 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 188
diff changeset
   139
00927189c882 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 188
diff changeset
   140
title:titleString numberOfOptions:nOptions
00927189c882 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 188
diff changeset
   141
    "create a new optionBox with title, aTitleString and nOptions options"
00927189c882 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 188
diff changeset
   142
00927189c882 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 188
diff changeset
   143
    |box|
00927189c882 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 188
diff changeset
   144
00927189c882 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 188
diff changeset
   145
    box := (self basicNew) numberOfOptions:nOptions.
00927189c882 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 188
diff changeset
   146
    box device:Screen current.
00927189c882 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 188
diff changeset
   147
    box initialize.
00927189c882 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 188
diff changeset
   148
    box title:titleString.
00927189c882 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 188
diff changeset
   149
    ^ box
7
15a9291b9bd0 *** empty log message ***
claus
parents: 5
diff changeset
   150
! !
15a9291b9bd0 *** empty log message ***
claus
parents: 5
diff changeset
   151
2449
b9bf97bf089d category included a space
Claus Gittinger <cg@exept.de>
parents: 2405
diff changeset
   152
!OptionBox class methodsFor:'easy startup'!
95
7535cfca9509 *** empty log message ***
claus
parents: 91
diff changeset
   153
2969
eb87f1aedd6c Do not use obsolete methods with #form:
Stefan Vogel <sv@exept.de>
parents: 2898
diff changeset
   154
forRequest:title label:label image:anImage buttonLabels:labels values:values default:defaultValue
2585
bc342ad3c166 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2523
diff changeset
   155
    "create a new optionBox and return it.
bc342ad3c166 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2523
diff changeset
   156
     Does not open the box."
bc342ad3c166 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2523
diff changeset
   157
bc342ad3c166 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2523
diff changeset
   158
    |box|
bc342ad3c166 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2523
diff changeset
   159
bc342ad3c166 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2523
diff changeset
   160
    box := OptionBox title:title numberOfOptions:(labels size).
bc342ad3c166 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2523
diff changeset
   161
    box buttonTitles:labels.
bc342ad3c166 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2523
diff changeset
   162
    box defaultButtonIndex:(values indexOf:defaultValue). 
2969
eb87f1aedd6c Do not use obsolete methods with #form:
Stefan Vogel <sv@exept.de>
parents: 2898
diff changeset
   163
    box label:label; image:anImage.
2898
b7ba089497d6 thumbsUp/down
Claus Gittinger <cg@exept.de>
parents: 2711
diff changeset
   164
    values keysAndValuesDo:[:idx :val |
b7ba089497d6 thumbsUp/down
Claus Gittinger <cg@exept.de>
parents: 2711
diff changeset
   165
        val == false ifTrue:[
b7ba089497d6 thumbsUp/down
Claus Gittinger <cg@exept.de>
parents: 2711
diff changeset
   166
            (box buttons at:idx) cursor:(Cursor thumbsDown).
b7ba089497d6 thumbsUp/down
Claus Gittinger <cg@exept.de>
parents: 2711
diff changeset
   167
        ].
b7ba089497d6 thumbsUp/down
Claus Gittinger <cg@exept.de>
parents: 2711
diff changeset
   168
        val == true ifTrue:[
b7ba089497d6 thumbsUp/down
Claus Gittinger <cg@exept.de>
parents: 2711
diff changeset
   169
            (box buttons at:idx) cursor:(Cursor thumbsUp).
b7ba089497d6 thumbsUp/down
Claus Gittinger <cg@exept.de>
parents: 2711
diff changeset
   170
        ].
b7ba089497d6 thumbsUp/down
Claus Gittinger <cg@exept.de>
parents: 2711
diff changeset
   171
    ].
2585
bc342ad3c166 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2523
diff changeset
   172
    ^ box
bc342ad3c166 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2523
diff changeset
   173
bc342ad3c166 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2523
diff changeset
   174
    "Modified: / 23.2.2000 / 11:59:32 / cg"
bc342ad3c166 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2523
diff changeset
   175
!
bc342ad3c166 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2523
diff changeset
   176
2668
c8655a5eb411 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2585
diff changeset
   177
request:title buttonLabels:labels values:values 
c8655a5eb411 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2585
diff changeset
   178
    "create a new optionBox, open it modal and return the value of
2711
e18e9edca978 by default, return nil if cancelled
Claus Gittinger <cg@exept.de>
parents: 2700
diff changeset
   179
     the corresponding values collection. Return nil if cancelled"
2668
c8655a5eb411 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2585
diff changeset
   180
2711
e18e9edca978 by default, return nil if cancelled
Claus Gittinger <cg@exept.de>
parents: 2700
diff changeset
   181
    ^ self 
4223
Claus Gittinger <cg@exept.de>
parents: 3936
diff changeset
   182
        request:title 
Claus Gittinger <cg@exept.de>
parents: 3936
diff changeset
   183
        label:title 
Claus Gittinger <cg@exept.de>
parents: 3936
diff changeset
   184
        buttonLabels:labels 
Claus Gittinger <cg@exept.de>
parents: 3936
diff changeset
   185
        values:values
2668
c8655a5eb411 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2585
diff changeset
   186
c8655a5eb411 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2585
diff changeset
   187
    "
c8655a5eb411 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2585
diff changeset
   188
     OptionBox 
c8655a5eb411 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2585
diff changeset
   189
        request:'please select any'
c8655a5eb411 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2585
diff changeset
   190
        buttonLabels:#('one' 'two' 'three')
c8655a5eb411 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2585
diff changeset
   191
        values:#(1 2 3)   
c8655a5eb411 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2585
diff changeset
   192
    "
4223
Claus Gittinger <cg@exept.de>
parents: 3936
diff changeset
   193
Claus Gittinger <cg@exept.de>
parents: 3936
diff changeset
   194
    "Modified: / 08-02-2011 / 11:22:13 / cg"
2668
c8655a5eb411 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2585
diff changeset
   195
!
c8655a5eb411 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2585
diff changeset
   196
2669
182aa7a00d83 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2668
diff changeset
   197
request:title buttonLabels:labels values:values default:defaultValue
182aa7a00d83 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2668
diff changeset
   198
    "create a new optionBox, open it modal and return the value of
2711
e18e9edca978 by default, return nil if cancelled
Claus Gittinger <cg@exept.de>
parents: 2700
diff changeset
   199
     the corresponding values collection. Return nil if cancelled."
2669
182aa7a00d83 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2668
diff changeset
   200
182aa7a00d83 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2668
diff changeset
   201
    ^ self
2969
eb87f1aedd6c Do not use obsolete methods with #form:
Stefan Vogel <sv@exept.de>
parents: 2898
diff changeset
   202
        request:title label:title image:(YesNoBox iconBitmap) buttonLabels:labels values:values 
2711
e18e9edca978 by default, return nil if cancelled
Claus Gittinger <cg@exept.de>
parents: 2700
diff changeset
   203
        default:defaultValue onCancel:nil
2669
182aa7a00d83 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2668
diff changeset
   204
182aa7a00d83 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2668
diff changeset
   205
    "
182aa7a00d83 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2668
diff changeset
   206
     OptionBox 
182aa7a00d83 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2668
diff changeset
   207
        request:'please select'
182aa7a00d83 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2668
diff changeset
   208
        buttonLabels:#('one' 'two' 'three')
182aa7a00d83 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2668
diff changeset
   209
        values:#(1 2 3)   
182aa7a00d83 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2668
diff changeset
   210
        default:3   
182aa7a00d83 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2668
diff changeset
   211
    "
182aa7a00d83 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2668
diff changeset
   212
!
182aa7a00d83 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2668
diff changeset
   213
2405
dcdb739b64f8 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2390
diff changeset
   214
request:title label:label buttonLabels:labels values:values 
dcdb739b64f8 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2390
diff changeset
   215
    "create a new optionBox, open it modal and return the value of
2711
e18e9edca978 by default, return nil if cancelled
Claus Gittinger <cg@exept.de>
parents: 2700
diff changeset
   216
     the corresponding values collection. Return nil if cancelled"
2405
dcdb739b64f8 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2390
diff changeset
   217
dcdb739b64f8 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2390
diff changeset
   218
    ^ self 
4224
Claus Gittinger <cg@exept.de>
parents: 4223
diff changeset
   219
        request:title 
Claus Gittinger <cg@exept.de>
parents: 4223
diff changeset
   220
        label:label 
Claus Gittinger <cg@exept.de>
parents: 4223
diff changeset
   221
        image:(YesNoBox iconBitmap)
Claus Gittinger <cg@exept.de>
parents: 4223
diff changeset
   222
        buttonLabels:labels 
Claus Gittinger <cg@exept.de>
parents: 4223
diff changeset
   223
        values:values 
Claus Gittinger <cg@exept.de>
parents: 4223
diff changeset
   224
        default:nil 
Claus Gittinger <cg@exept.de>
parents: 4223
diff changeset
   225
        onCancel:nil
2668
c8655a5eb411 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2585
diff changeset
   226
c8655a5eb411 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2585
diff changeset
   227
    "
c8655a5eb411 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2585
diff changeset
   228
     OptionBox 
c8655a5eb411 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2585
diff changeset
   229
        request:'please select'
c8655a5eb411 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2585
diff changeset
   230
        label:'select any'
c8655a5eb411 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2585
diff changeset
   231
        buttonLabels:#('one' 'two' 'three')
c8655a5eb411 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2585
diff changeset
   232
        values:#(1 2 3)   
c8655a5eb411 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2585
diff changeset
   233
    "
4224
Claus Gittinger <cg@exept.de>
parents: 4223
diff changeset
   234
Claus Gittinger <cg@exept.de>
parents: 4223
diff changeset
   235
    "Modified: / 08-02-2011 / 11:32:48 / cg"
2405
dcdb739b64f8 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2390
diff changeset
   236
!
dcdb739b64f8 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2390
diff changeset
   237
dcdb739b64f8 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2390
diff changeset
   238
request:title label:label buttonLabels:labels values:values default:defaultValue
dcdb739b64f8 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2390
diff changeset
   239
    "create a new optionBox, open it modal and return the value of
2711
e18e9edca978 by default, return nil if cancelled
Claus Gittinger <cg@exept.de>
parents: 2700
diff changeset
   240
     the corresponding values collection. Return nil if cancelled"
2405
dcdb739b64f8 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2390
diff changeset
   241
dcdb739b64f8 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2390
diff changeset
   242
    ^ self
2969
eb87f1aedd6c Do not use obsolete methods with #form:
Stefan Vogel <sv@exept.de>
parents: 2898
diff changeset
   243
        request:title label:label image:(YesNoBox iconBitmap) buttonLabels:labels values:values 
2711
e18e9edca978 by default, return nil if cancelled
Claus Gittinger <cg@exept.de>
parents: 2700
diff changeset
   244
        default:defaultValue onCancel:nil
2668
c8655a5eb411 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2585
diff changeset
   245
c8655a5eb411 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2585
diff changeset
   246
    "
c8655a5eb411 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2585
diff changeset
   247
     OptionBox 
c8655a5eb411 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2585
diff changeset
   248
        request:'please select'
c8655a5eb411 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2585
diff changeset
   249
        label:'select any'
c8655a5eb411 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2585
diff changeset
   250
        buttonLabels:#('one' 'two' 'three')
c8655a5eb411 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2585
diff changeset
   251
        values:#(1 2 3)   
c8655a5eb411 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2585
diff changeset
   252
        default:3   
c8655a5eb411 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2585
diff changeset
   253
    "
2405
dcdb739b64f8 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2390
diff changeset
   254
!
dcdb739b64f8 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2390
diff changeset
   255
dcdb739b64f8 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2390
diff changeset
   256
request:title label:label buttonLabels:labels values:values default:defaultValue onCancel:cancelValue
dcdb739b64f8 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2390
diff changeset
   257
    "create a new optionBox, open it modal and return the value of
2711
e18e9edca978 by default, return nil if cancelled
Claus Gittinger <cg@exept.de>
parents: 2700
diff changeset
   258
     the corresponding values collection. Return cancelValue if cancelled."
2405
dcdb739b64f8 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2390
diff changeset
   259
dcdb739b64f8 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2390
diff changeset
   260
    ^ self
2969
eb87f1aedd6c Do not use obsolete methods with #form:
Stefan Vogel <sv@exept.de>
parents: 2898
diff changeset
   261
        request:title label:label image:(YesNoBox iconBitmap) buttonLabels:labels values:values 
2405
dcdb739b64f8 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2390
diff changeset
   262
        default:defaultValue onCancel:cancelValue
2668
c8655a5eb411 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2585
diff changeset
   263
c8655a5eb411 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2585
diff changeset
   264
    "
c8655a5eb411 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2585
diff changeset
   265
     OptionBox 
c8655a5eb411 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2585
diff changeset
   266
        request:'please select'
c8655a5eb411 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2585
diff changeset
   267
        label:'select any'
c8655a5eb411 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2585
diff changeset
   268
        buttonLabels:#('one' 'two' 'three')
c8655a5eb411 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2585
diff changeset
   269
        values:#(1 2 3)   
c8655a5eb411 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2585
diff changeset
   270
        default:3   
c8655a5eb411 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2585
diff changeset
   271
        onCancel:2   
c8655a5eb411 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2585
diff changeset
   272
    "
2405
dcdb739b64f8 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2390
diff changeset
   273
!
dcdb739b64f8 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2390
diff changeset
   274
2969
eb87f1aedd6c Do not use obsolete methods with #form:
Stefan Vogel <sv@exept.de>
parents: 2898
diff changeset
   275
request:title label:label image:anImage buttonLabels:labels values:values 
133
claus
parents: 132
diff changeset
   276
    "create a new optionBox, open it modal and return the value of
2711
e18e9edca978 by default, return nil if cancelled
Claus Gittinger <cg@exept.de>
parents: 2700
diff changeset
   277
     the corresponding values collection. Return nil, if cancelled."
133
claus
parents: 132
diff changeset
   278
2711
e18e9edca978 by default, return nil if cancelled
Claus Gittinger <cg@exept.de>
parents: 2700
diff changeset
   279
    ^ self 
2969
eb87f1aedd6c Do not use obsolete methods with #form:
Stefan Vogel <sv@exept.de>
parents: 2898
diff changeset
   280
        request:title label:label image:anImage buttonLabels:labels values:values 
2711
e18e9edca978 by default, return nil if cancelled
Claus Gittinger <cg@exept.de>
parents: 2700
diff changeset
   281
        default:nil onCancel:nil
2668
c8655a5eb411 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2585
diff changeset
   282
c8655a5eb411 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2585
diff changeset
   283
    "
c8655a5eb411 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2585
diff changeset
   284
     OptionBox 
c8655a5eb411 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2585
diff changeset
   285
        request:'please select'
c8655a5eb411 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2585
diff changeset
   286
        label:'select any'
2969
eb87f1aedd6c Do not use obsolete methods with #form:
Stefan Vogel <sv@exept.de>
parents: 2898
diff changeset
   287
        image:(WarningBox iconBitmap)
2668
c8655a5eb411 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2585
diff changeset
   288
        buttonLabels:#('one' 'two' 'three')
c8655a5eb411 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2585
diff changeset
   289
        values:#(1 2 3)
c8655a5eb411 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2585
diff changeset
   290
    "
133
claus
parents: 132
diff changeset
   291
!
claus
parents: 132
diff changeset
   292
2969
eb87f1aedd6c Do not use obsolete methods with #form:
Stefan Vogel <sv@exept.de>
parents: 2898
diff changeset
   293
request:title label:label image:anImage buttonLabels:labels values:values default:defaultValue
95
7535cfca9509 *** empty log message ***
claus
parents: 91
diff changeset
   294
    "create a new optionBox, open it modal and return the value of
2711
e18e9edca978 by default, return nil if cancelled
Claus Gittinger <cg@exept.de>
parents: 2700
diff changeset
   295
     the corresponding values collection. Return nil if cancelled."
95
7535cfca9509 *** empty log message ***
claus
parents: 91
diff changeset
   296
2390
0a72663d8e59 added onCancel: value
Claus Gittinger <cg@exept.de>
parents: 2389
diff changeset
   297
    ^ self
2969
eb87f1aedd6c Do not use obsolete methods with #form:
Stefan Vogel <sv@exept.de>
parents: 2898
diff changeset
   298
        request:title label:label image:anImage buttonLabels:labels values:values 
2711
e18e9edca978 by default, return nil if cancelled
Claus Gittinger <cg@exept.de>
parents: 2700
diff changeset
   299
        default:defaultValue onCancel:nil
2668
c8655a5eb411 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2585
diff changeset
   300
c8655a5eb411 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2585
diff changeset
   301
    "
c8655a5eb411 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2585
diff changeset
   302
     OptionBox 
c8655a5eb411 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2585
diff changeset
   303
        request:'please select'
c8655a5eb411 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2585
diff changeset
   304
        label:'select any'
2969
eb87f1aedd6c Do not use obsolete methods with #form:
Stefan Vogel <sv@exept.de>
parents: 2898
diff changeset
   305
        image:(WarningBox iconBitmap)
2668
c8655a5eb411 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2585
diff changeset
   306
        buttonLabels:#('one' 'two' 'three')
c8655a5eb411 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2585
diff changeset
   307
        values:#(1 2 3)
c8655a5eb411 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2585
diff changeset
   308
        default:3
c8655a5eb411 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2585
diff changeset
   309
    "
2390
0a72663d8e59 added onCancel: value
Claus Gittinger <cg@exept.de>
parents: 2389
diff changeset
   310
!
0a72663d8e59 added onCancel: value
Claus Gittinger <cg@exept.de>
parents: 2389
diff changeset
   311
2969
eb87f1aedd6c Do not use obsolete methods with #form:
Stefan Vogel <sv@exept.de>
parents: 2898
diff changeset
   312
request:title label:label image:anImage buttonLabels:labels values:values default:defaultValue onCancel:cancelValue
2390
0a72663d8e59 added onCancel: value
Claus Gittinger <cg@exept.de>
parents: 2389
diff changeset
   313
    "create a new optionBox, open it modal and return the value of
2711
e18e9edca978 by default, return nil if cancelled
Claus Gittinger <cg@exept.de>
parents: 2700
diff changeset
   314
     the corresponding values collection. Return cancelValue if cancelled."
2390
0a72663d8e59 added onCancel: value
Claus Gittinger <cg@exept.de>
parents: 2389
diff changeset
   315
2162
9ef1004f8e74 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1914
diff changeset
   316
    |box retVal|
95
7535cfca9509 *** empty log message ***
claus
parents: 91
diff changeset
   317
2390
0a72663d8e59 added onCancel: value
Claus Gittinger <cg@exept.de>
parents: 2389
diff changeset
   318
    retVal := cancelValue.
2585
bc342ad3c166 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2523
diff changeset
   319
    box := self
bc342ad3c166 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2523
diff changeset
   320
                forRequest:title 
bc342ad3c166 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2523
diff changeset
   321
                label:label 
2969
eb87f1aedd6c Do not use obsolete methods with #form:
Stefan Vogel <sv@exept.de>
parents: 2898
diff changeset
   322
                image:anImage 
2585
bc342ad3c166 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2523
diff changeset
   323
                buttonLabels:labels 
bc342ad3c166 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2523
diff changeset
   324
                values:values 
bc342ad3c166 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2523
diff changeset
   325
                default:defaultValue.
bc342ad3c166 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2523
diff changeset
   326
2162
9ef1004f8e74 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1914
diff changeset
   327
    box action:[:n | retVal := values at:n].
3211
54cb5fb7fd2f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3208
diff changeset
   328
    self showAndThenDestroyBox:box.
2389
ca78debb0223 return nil if cancelled
Claus Gittinger <cg@exept.de>
parents: 2328
diff changeset
   329
2162
9ef1004f8e74 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1914
diff changeset
   330
    ^ retVal
95
7535cfca9509 *** empty log message ***
claus
parents: 91
diff changeset
   331
7535cfca9509 *** empty log message ***
claus
parents: 91
diff changeset
   332
    "
2668
c8655a5eb411 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2585
diff changeset
   333
     OptionBox 
c8655a5eb411 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2585
diff changeset
   334
        request:'please select'
c8655a5eb411 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2585
diff changeset
   335
        label:'select any'
2969
eb87f1aedd6c Do not use obsolete methods with #form:
Stefan Vogel <sv@exept.de>
parents: 2898
diff changeset
   336
        image:(WarningBox iconBitmap)
2668
c8655a5eb411 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2585
diff changeset
   337
        buttonLabels:#('one' 'two' 'three')
c8655a5eb411 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2585
diff changeset
   338
        values:#(1 2 3)
c8655a5eb411 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2585
diff changeset
   339
        default:3
c8655a5eb411 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2585
diff changeset
   340
        onCancel:nil
95
7535cfca9509 *** empty log message ***
claus
parents: 91
diff changeset
   341
    "
920
8487cf717bdf destroy the box after use
Claus Gittinger <cg@exept.de>
parents: 899
diff changeset
   342
2162
9ef1004f8e74 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1914
diff changeset
   343
    "Modified: / 23.2.2000 / 11:59:32 / cg"
95
7535cfca9509 *** empty log message ***
claus
parents: 91
diff changeset
   344
! !
7535cfca9509 *** empty log message ***
claus
parents: 91
diff changeset
   345
2969
eb87f1aedd6c Do not use obsolete methods with #form:
Stefan Vogel <sv@exept.de>
parents: 2898
diff changeset
   346
!OptionBox class methodsFor:'obsolete'!
eb87f1aedd6c Do not use obsolete methods with #form:
Stefan Vogel <sv@exept.de>
parents: 2898
diff changeset
   347
eb87f1aedd6c Do not use obsolete methods with #form:
Stefan Vogel <sv@exept.de>
parents: 2898
diff changeset
   348
forRequest:title label:label form:anImage buttonLabels:labels values:values default:defaultValue
eb87f1aedd6c Do not use obsolete methods with #form:
Stefan Vogel <sv@exept.de>
parents: 2898
diff changeset
   349
    "create a new optionBox and return it.
eb87f1aedd6c Do not use obsolete methods with #form:
Stefan Vogel <sv@exept.de>
parents: 2898
diff changeset
   350
     Does not open the box."
eb87f1aedd6c Do not use obsolete methods with #form:
Stefan Vogel <sv@exept.de>
parents: 2898
diff changeset
   351
eb87f1aedd6c Do not use obsolete methods with #form:
Stefan Vogel <sv@exept.de>
parents: 2898
diff changeset
   352
    <resource:#obsolete>
eb87f1aedd6c Do not use obsolete methods with #form:
Stefan Vogel <sv@exept.de>
parents: 2898
diff changeset
   353
eb87f1aedd6c Do not use obsolete methods with #form:
Stefan Vogel <sv@exept.de>
parents: 2898
diff changeset
   354
    self forRequest:title label:label image:anImage buttonLabels:labels values:values default:defaultValue
eb87f1aedd6c Do not use obsolete methods with #form:
Stefan Vogel <sv@exept.de>
parents: 2898
diff changeset
   355
!
eb87f1aedd6c Do not use obsolete methods with #form:
Stefan Vogel <sv@exept.de>
parents: 2898
diff changeset
   356
eb87f1aedd6c Do not use obsolete methods with #form:
Stefan Vogel <sv@exept.de>
parents: 2898
diff changeset
   357
request:title label:label form:aForm buttonLabels:labels values:values 
eb87f1aedd6c Do not use obsolete methods with #form:
Stefan Vogel <sv@exept.de>
parents: 2898
diff changeset
   358
    "create a new optionBox, open it modal and return the value of
eb87f1aedd6c Do not use obsolete methods with #form:
Stefan Vogel <sv@exept.de>
parents: 2898
diff changeset
   359
     the corresponding values collection. Return nil, if cancelled."
eb87f1aedd6c Do not use obsolete methods with #form:
Stefan Vogel <sv@exept.de>
parents: 2898
diff changeset
   360
eb87f1aedd6c Do not use obsolete methods with #form:
Stefan Vogel <sv@exept.de>
parents: 2898
diff changeset
   361
    <resource:#obsolete>
eb87f1aedd6c Do not use obsolete methods with #form:
Stefan Vogel <sv@exept.de>
parents: 2898
diff changeset
   362
eb87f1aedd6c Do not use obsolete methods with #form:
Stefan Vogel <sv@exept.de>
parents: 2898
diff changeset
   363
    ^ self 
eb87f1aedd6c Do not use obsolete methods with #form:
Stefan Vogel <sv@exept.de>
parents: 2898
diff changeset
   364
        request:title label:label image:aForm buttonLabels:labels values:values 
eb87f1aedd6c Do not use obsolete methods with #form:
Stefan Vogel <sv@exept.de>
parents: 2898
diff changeset
   365
        default:nil onCancel:nil
eb87f1aedd6c Do not use obsolete methods with #form:
Stefan Vogel <sv@exept.de>
parents: 2898
diff changeset
   366
!
eb87f1aedd6c Do not use obsolete methods with #form:
Stefan Vogel <sv@exept.de>
parents: 2898
diff changeset
   367
eb87f1aedd6c Do not use obsolete methods with #form:
Stefan Vogel <sv@exept.de>
parents: 2898
diff changeset
   368
request:title label:label form:aForm buttonLabels:labels values:values default:defaultValue
eb87f1aedd6c Do not use obsolete methods with #form:
Stefan Vogel <sv@exept.de>
parents: 2898
diff changeset
   369
    "create a new optionBox, open it modal and return the value of
eb87f1aedd6c Do not use obsolete methods with #form:
Stefan Vogel <sv@exept.de>
parents: 2898
diff changeset
   370
     the corresponding values collection. Return nil if cancelled."
eb87f1aedd6c Do not use obsolete methods with #form:
Stefan Vogel <sv@exept.de>
parents: 2898
diff changeset
   371
eb87f1aedd6c Do not use obsolete methods with #form:
Stefan Vogel <sv@exept.de>
parents: 2898
diff changeset
   372
    <resource:#obsolete>
eb87f1aedd6c Do not use obsolete methods with #form:
Stefan Vogel <sv@exept.de>
parents: 2898
diff changeset
   373
eb87f1aedd6c Do not use obsolete methods with #form:
Stefan Vogel <sv@exept.de>
parents: 2898
diff changeset
   374
    ^ self
2991
f8ba5fe56ea6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2969
diff changeset
   375
        request:title 
f8ba5fe56ea6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2969
diff changeset
   376
        label:label 
f8ba5fe56ea6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2969
diff changeset
   377
        image:aForm 
f8ba5fe56ea6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2969
diff changeset
   378
        buttonLabels:labels 
f8ba5fe56ea6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2969
diff changeset
   379
        values:values 
f8ba5fe56ea6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2969
diff changeset
   380
        default:defaultValue 
f8ba5fe56ea6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2969
diff changeset
   381
        onCancel:nil
2969
eb87f1aedd6c Do not use obsolete methods with #form:
Stefan Vogel <sv@exept.de>
parents: 2898
diff changeset
   382
!
eb87f1aedd6c Do not use obsolete methods with #form:
Stefan Vogel <sv@exept.de>
parents: 2898
diff changeset
   383
eb87f1aedd6c Do not use obsolete methods with #form:
Stefan Vogel <sv@exept.de>
parents: 2898
diff changeset
   384
request:title label:label form:aForm buttonLabels:labels values:values default:defaultValue onCancel:cancelValue
eb87f1aedd6c Do not use obsolete methods with #form:
Stefan Vogel <sv@exept.de>
parents: 2898
diff changeset
   385
    "create a new optionBox, open it modal and return the value of
eb87f1aedd6c Do not use obsolete methods with #form:
Stefan Vogel <sv@exept.de>
parents: 2898
diff changeset
   386
     the corresponding values collection. Return cancelValue if cancelled."
eb87f1aedd6c Do not use obsolete methods with #form:
Stefan Vogel <sv@exept.de>
parents: 2898
diff changeset
   387
eb87f1aedd6c Do not use obsolete methods with #form:
Stefan Vogel <sv@exept.de>
parents: 2898
diff changeset
   388
    <resource:#obsolete>
eb87f1aedd6c Do not use obsolete methods with #form:
Stefan Vogel <sv@exept.de>
parents: 2898
diff changeset
   389
eb87f1aedd6c Do not use obsolete methods with #form:
Stefan Vogel <sv@exept.de>
parents: 2898
diff changeset
   390
    ^ self request:title label:label image:aForm buttonLabels:labels values:values default:defaultValue onCancel:cancelValue
eb87f1aedd6c Do not use obsolete methods with #form:
Stefan Vogel <sv@exept.de>
parents: 2898
diff changeset
   391
! !
eb87f1aedd6c Do not use obsolete methods with #form:
Stefan Vogel <sv@exept.de>
parents: 2898
diff changeset
   392
197
00927189c882 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 188
diff changeset
   393
!OptionBox methodsFor:'accessing'!
00927189c882 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 188
diff changeset
   394
00927189c882 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 188
diff changeset
   395
action:actionBlock
00927189c882 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 188
diff changeset
   396
    "define a single the action for all buttons.
00927189c882 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 188
diff changeset
   397
     The action will be evaluated with the button index as argument."
00927189c882 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 188
diff changeset
   398
00927189c882 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 188
diff changeset
   399
    buttons keysAndValuesDo:[:index :button |
00927189c882 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 188
diff changeset
   400
	button action:[
00927189c882 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 188
diff changeset
   401
		       button turnOffWithoutRedraw.
00927189c882 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 188
diff changeset
   402
		       self hide.
00927189c882 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 188
diff changeset
   403
		       actionBlock value:index
00927189c882 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 188
diff changeset
   404
		      ]
00927189c882 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 188
diff changeset
   405
    ].
00927189c882 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 188
diff changeset
   406
!
00927189c882 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 188
diff changeset
   407
00927189c882 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 188
diff changeset
   408
actions:actionBlocks
00927189c882 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 188
diff changeset
   409
    "define the actions"
0
e6a541c1c0eb Initial revision
claus
parents:
diff changeset
   410
197
00927189c882 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 188
diff changeset
   411
    actions := actionBlocks
00927189c882 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 188
diff changeset
   412
!
00927189c882 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 188
diff changeset
   413
00927189c882 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 188
diff changeset
   414
buttonTitles:titles actions:actionBlocks
00927189c882 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 188
diff changeset
   415
    "define both button titles and actions"
00927189c882 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 188
diff changeset
   416
00927189c882 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 188
diff changeset
   417
    self buttonTitles:titles.
00927189c882 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 188
diff changeset
   418
    actions := actionBlocks.
00927189c882 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 188
diff changeset
   419
!
0
e6a541c1c0eb Initial revision
claus
parents:
diff changeset
   420
197
00927189c882 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 188
diff changeset
   421
defaultButtonIndex:index
847
0d760cfc9a8c commentary
Claus Gittinger <cg@exept.de>
parents: 799
diff changeset
   422
    "define which button is the default (i.e. return-) button.
0d760cfc9a8c commentary
Claus Gittinger <cg@exept.de>
parents: 799
diff changeset
   423
     By default, no returnButton is setup. The argument must be an
0d760cfc9a8c commentary
Claus Gittinger <cg@exept.de>
parents: 799
diff changeset
   424
     index 1..nButtons, or nil"
0d760cfc9a8c commentary
Claus Gittinger <cg@exept.de>
parents: 799
diff changeset
   425
197
00927189c882 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 188
diff changeset
   426
    defaultButtonIndex notNil ifTrue:[
847
0d760cfc9a8c commentary
Claus Gittinger <cg@exept.de>
parents: 799
diff changeset
   427
        (buttons at:defaultButtonIndex) isReturnButton:false
197
00927189c882 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 188
diff changeset
   428
    ].
00927189c882 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 188
diff changeset
   429
    (index notNil and:[index ~~ 0]) ifTrue:[
847
0d760cfc9a8c commentary
Claus Gittinger <cg@exept.de>
parents: 799
diff changeset
   430
        defaultButtonIndex := index.
0d760cfc9a8c commentary
Claus Gittinger <cg@exept.de>
parents: 799
diff changeset
   431
        defaultButtonIndex notNil ifTrue:[
0d760cfc9a8c commentary
Claus Gittinger <cg@exept.de>
parents: 799
diff changeset
   432
            (buttons at:defaultButtonIndex) isReturnButton:true 
0d760cfc9a8c commentary
Claus Gittinger <cg@exept.de>
parents: 799
diff changeset
   433
        ].
197
00927189c882 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 188
diff changeset
   434
    ]
847
0d760cfc9a8c commentary
Claus Gittinger <cg@exept.de>
parents: 799
diff changeset
   435
0d760cfc9a8c commentary
Claus Gittinger <cg@exept.de>
parents: 799
diff changeset
   436
    "Modified: 18.10.1996 / 14:53:36 / cg"
197
00927189c882 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 188
diff changeset
   437
!
00927189c882 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 188
diff changeset
   438
00927189c882 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 188
diff changeset
   439
numberOfOptions
00927189c882 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 188
diff changeset
   440
    "return the number of options"
00927189c882 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 188
diff changeset
   441
00927189c882 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 188
diff changeset
   442
    ^ buttons size
00927189c882 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 188
diff changeset
   443
!
00927189c882 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 188
diff changeset
   444
00927189c882 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 188
diff changeset
   445
numberOfOptions:nOptions
847
0d760cfc9a8c commentary
Claus Gittinger <cg@exept.de>
parents: 799
diff changeset
   446
    "set the number of options - this is a private interface"
197
00927189c882 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 188
diff changeset
   447
3260
274ba11c1789 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3211
diff changeset
   448
    buttons := OrderedCollection withSize:nOptions.
274ba11c1789 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3211
diff changeset
   449
    actions := OrderedCollection withSize:nOptions
847
0d760cfc9a8c commentary
Claus Gittinger <cg@exept.de>
parents: 799
diff changeset
   450
0d760cfc9a8c commentary
Claus Gittinger <cg@exept.de>
parents: 799
diff changeset
   451
    "Modified: 18.10.1996 / 14:54:30 / cg"
740
2d5cb01c7e11 no need for focusSequence - DialogBox does it
Claus Gittinger <cg@exept.de>
parents: 713
diff changeset
   452
! !
2d5cb01c7e11 no need for focusSequence - DialogBox does it
Claus Gittinger <cg@exept.de>
parents: 713
diff changeset
   453
3208
7b4c5a215af9 use panels, to allow for hooks to add more widgets.
Claus Gittinger <cg@exept.de>
parents: 3201
diff changeset
   454
!OptionBox methodsFor:'accessing-components'!
7b4c5a215af9 use panels, to allow for hooks to add more widgets.
Claus Gittinger <cg@exept.de>
parents: 3201
diff changeset
   455
7b4c5a215af9 use panels, to allow for hooks to add more widgets.
Claus Gittinger <cg@exept.de>
parents: 3201
diff changeset
   456
buttons
7b4c5a215af9 use panels, to allow for hooks to add more widgets.
Claus Gittinger <cg@exept.de>
parents: 3201
diff changeset
   457
    "return the buttons collection"
7b4c5a215af9 use panels, to allow for hooks to add more widgets.
Claus Gittinger <cg@exept.de>
parents: 3201
diff changeset
   458
7b4c5a215af9 use panels, to allow for hooks to add more widgets.
Claus Gittinger <cg@exept.de>
parents: 3201
diff changeset
   459
    ^ buttons
7b4c5a215af9 use panels, to allow for hooks to add more widgets.
Claus Gittinger <cg@exept.de>
parents: 3201
diff changeset
   460
!
7b4c5a215af9 use panels, to allow for hooks to add more widgets.
Claus Gittinger <cg@exept.de>
parents: 3201
diff changeset
   461
7b4c5a215af9 use panels, to allow for hooks to add more widgets.
Claus Gittinger <cg@exept.de>
parents: 3201
diff changeset
   462
labelPanel
7b4c5a215af9 use panels, to allow for hooks to add more widgets.
Claus Gittinger <cg@exept.de>
parents: 3201
diff changeset
   463
    ^ labelPanel
7b4c5a215af9 use panels, to allow for hooks to add more widgets.
Claus Gittinger <cg@exept.de>
parents: 3201
diff changeset
   464
! !
7b4c5a215af9 use panels, to allow for hooks to add more widgets.
Claus Gittinger <cg@exept.de>
parents: 3201
diff changeset
   465
2227
58426f7611f2 category changes
Claus Gittinger <cg@exept.de>
parents: 2212
diff changeset
   466
!OptionBox methodsFor:'accessing-look'!
740
2d5cb01c7e11 no need for focusSequence - DialogBox does it
Claus Gittinger <cg@exept.de>
parents: 713
diff changeset
   467
2d5cb01c7e11 no need for focusSequence - DialogBox does it
Claus Gittinger <cg@exept.de>
parents: 713
diff changeset
   468
buttonTitles:titles
2d5cb01c7e11 no need for focusSequence - DialogBox does it
Claus Gittinger <cg@exept.de>
parents: 713
diff changeset
   469
    "set the button titles"
2d5cb01c7e11 no need for focusSequence - DialogBox does it
Claus Gittinger <cg@exept.de>
parents: 713
diff changeset
   470
2d5cb01c7e11 no need for focusSequence - DialogBox does it
Claus Gittinger <cg@exept.de>
parents: 713
diff changeset
   471
    titles keysAndValuesDo:[:index :aString |
3733
1ff480685a0b button name including button index
fm
parents: 3613
diff changeset
   472
        |b|
740
2d5cb01c7e11 no need for focusSequence - DialogBox does it
Claus Gittinger <cg@exept.de>
parents: 713
diff changeset
   473
3733
1ff480685a0b button name including button index
fm
parents: 3613
diff changeset
   474
        (b := buttons at:index) label:aString.
1ff480685a0b button name including button index
fm
parents: 3613
diff changeset
   475
        b name: (b name? ''), index printString.
1ff480685a0b button name including button index
fm
parents: 3613
diff changeset
   476
        b resize.
740
2d5cb01c7e11 no need for focusSequence - DialogBox does it
Claus Gittinger <cg@exept.de>
parents: 713
diff changeset
   477
    ].
2d5cb01c7e11 no need for focusSequence - DialogBox does it
Claus Gittinger <cg@exept.de>
parents: 713
diff changeset
   478
    shown ifTrue:[self resize]
2d5cb01c7e11 no need for focusSequence - DialogBox does it
Claus Gittinger <cg@exept.de>
parents: 713
diff changeset
   479
!
2d5cb01c7e11 no need for focusSequence - DialogBox does it
Claus Gittinger <cg@exept.de>
parents: 713
diff changeset
   480
2d5cb01c7e11 no need for focusSequence - DialogBox does it
Claus Gittinger <cg@exept.de>
parents: 713
diff changeset
   481
form:aFormOrImage
2969
eb87f1aedd6c Do not use obsolete methods with #form:
Stefan Vogel <sv@exept.de>
parents: 2898
diff changeset
   482
    "historical leftover - define a form to be displayed left of the title"
2212
7475e8be57bb recompute label origin, if the form changes
Claus Gittinger <cg@exept.de>
parents: 2162
diff changeset
   483
2969
eb87f1aedd6c Do not use obsolete methods with #form:
Stefan Vogel <sv@exept.de>
parents: 2898
diff changeset
   484
    <resource:#obsolete>
2212
7475e8be57bb recompute label origin, if the form changes
Claus Gittinger <cg@exept.de>
parents: 2162
diff changeset
   485
2969
eb87f1aedd6c Do not use obsolete methods with #form:
Stefan Vogel <sv@exept.de>
parents: 2898
diff changeset
   486
    self image:aFormOrImage
740
2d5cb01c7e11 no need for focusSequence - DialogBox does it
Claus Gittinger <cg@exept.de>
parents: 713
diff changeset
   487
!
2d5cb01c7e11 no need for focusSequence - DialogBox does it
Claus Gittinger <cg@exept.de>
parents: 713
diff changeset
   488
2d5cb01c7e11 no need for focusSequence - DialogBox does it
Claus Gittinger <cg@exept.de>
parents: 713
diff changeset
   489
formLabel
2d5cb01c7e11 no need for focusSequence - DialogBox does it
Claus Gittinger <cg@exept.de>
parents: 713
diff changeset
   490
    "return the label-view which displays a bitmap"
2d5cb01c7e11 no need for focusSequence - DialogBox does it
Claus Gittinger <cg@exept.de>
parents: 713
diff changeset
   491
2d5cb01c7e11 no need for focusSequence - DialogBox does it
Claus Gittinger <cg@exept.de>
parents: 713
diff changeset
   492
    ^ formLabel
197
00927189c882 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 188
diff changeset
   493
!
0
e6a541c1c0eb Initial revision
claus
parents:
diff changeset
   494
2476
7fb8b94e650c checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2449
diff changeset
   495
image:aFormOrImage
7fb8b94e650c checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2449
diff changeset
   496
    "set the image shown in the label-view"
7fb8b94e650c checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2449
diff changeset
   497
2969
eb87f1aedd6c Do not use obsolete methods with #form:
Stefan Vogel <sv@exept.de>
parents: 2898
diff changeset
   498
    |mm|
2476
7fb8b94e650c checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2449
diff changeset
   499
2969
eb87f1aedd6c Do not use obsolete methods with #form:
Stefan Vogel <sv@exept.de>
parents: 2898
diff changeset
   500
    mm := ViewSpacing.
eb87f1aedd6c Do not use obsolete methods with #form:
Stefan Vogel <sv@exept.de>
parents: 2898
diff changeset
   501
    formLabel label:aFormOrImage.
eb87f1aedd6c Do not use obsolete methods with #form:
Stefan Vogel <sv@exept.de>
parents: 2898
diff changeset
   502
    textLabel origin:((mm + formLabel width + mm) @ mm).
2476
7fb8b94e650c checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2449
diff changeset
   503
!
7fb8b94e650c checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2449
diff changeset
   504
2328
07521b0760e7 access to textLabel
Claus Gittinger <cg@exept.de>
parents: 2227
diff changeset
   505
textLabel
07521b0760e7 access to textLabel
Claus Gittinger <cg@exept.de>
parents: 2227
diff changeset
   506
    "return the label-view which displays a message string"
07521b0760e7 access to textLabel
Claus Gittinger <cg@exept.de>
parents: 2227
diff changeset
   507
07521b0760e7 access to textLabel
Claus Gittinger <cg@exept.de>
parents: 2227
diff changeset
   508
    ^ textLabel
07521b0760e7 access to textLabel
Claus Gittinger <cg@exept.de>
parents: 2227
diff changeset
   509
!
07521b0760e7 access to textLabel
Claus Gittinger <cg@exept.de>
parents: 2227
diff changeset
   510
0
e6a541c1c0eb Initial revision
claus
parents:
diff changeset
   511
title:aString
16
83d4f5c6f76c *** empty log message ***
claus
parents: 7
diff changeset
   512
    "set the boxes title"
0
e6a541c1c0eb Initial revision
claus
parents:
diff changeset
   513
16
83d4f5c6f76c *** empty log message ***
claus
parents: 7
diff changeset
   514
    aString ~= textLabel label ifTrue:[
59
450ce95a72a4 *** empty log message ***
claus
parents: 38
diff changeset
   515
	textLabel label:aString withoutSeparators.
110
eb59f6e31e84 *** empty log message ***
claus
parents: 97
diff changeset
   516
	textLabel forceResize.
97
cbf495fe3b64 *** empty log message ***
claus
parents: 95
diff changeset
   517
	shown ifTrue:[self resize]
16
83d4f5c6f76c *** empty log message ***
claus
parents: 7
diff changeset
   518
    ]
0
e6a541c1c0eb Initial revision
claus
parents:
diff changeset
   519
!
e6a541c1c0eb Initial revision
claus
parents:
diff changeset
   520
97
cbf495fe3b64 *** empty log message ***
claus
parents: 95
diff changeset
   521
title:aString numberOfOptions:nOptions
cbf495fe3b64 *** empty log message ***
claus
parents: 95
diff changeset
   522
    "set the boxes title and number of options"
cbf495fe3b64 *** empty log message ***
claus
parents: 95
diff changeset
   523
cbf495fe3b64 *** empty log message ***
claus
parents: 95
diff changeset
   524
    self title:aString.
cbf495fe3b64 *** empty log message ***
claus
parents: 95
diff changeset
   525
    buttons grow:nOptions.
cbf495fe3b64 *** empty log message ***
claus
parents: 95
diff changeset
   526
    actions grow:nOptions
197
00927189c882 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 188
diff changeset
   527
! !
97
cbf495fe3b64 *** empty log message ***
claus
parents: 95
diff changeset
   528
197
00927189c882 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 188
diff changeset
   529
!OptionBox methodsFor:'events'!
77
565b052f5277 *** empty log message ***
claus
parents: 63
diff changeset
   530
197
00927189c882 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 188
diff changeset
   531
keyPress:aKey x:x y:y
2700
d6bc43ddc80f Spelling (du Dubl!)
Stefan Vogel <sv@exept.de>
parents: 2669
diff changeset
   532
    "return-key duplicates ok-function if acceptReturnAsOK is true"
77
565b052f5277 *** empty log message ***
claus
parents: 63
diff changeset
   533
490
08e8adfb783c resources
Claus Gittinger <cg@exept.de>
parents: 372
diff changeset
   534
    <resource: #keyboard (#Return)>
08e8adfb783c resources
Claus Gittinger <cg@exept.de>
parents: 372
diff changeset
   535
3804
8a4b07e9ee4e no need to care for RETURN-keyPress; its already done by the keyboard processor
Claus Gittinger <cg@exept.de>
parents: 3757
diff changeset
   536
"/ now done by keyboard processor
8a4b07e9ee4e no need to care for RETURN-keyPress; its already done by the keyboard processor
Claus Gittinger <cg@exept.de>
parents: 3757
diff changeset
   537
"/    |action|
8a4b07e9ee4e no need to care for RETURN-keyPress; its already done by the keyboard processor
Claus Gittinger <cg@exept.de>
parents: 3757
diff changeset
   538
"/
8a4b07e9ee4e no need to care for RETURN-keyPress; its already done by the keyboard processor
Claus Gittinger <cg@exept.de>
parents: 3757
diff changeset
   539
"/    defaultButtonIndex notNil ifTrue:[
8a4b07e9ee4e no need to care for RETURN-keyPress; its already done by the keyboard processor
Claus Gittinger <cg@exept.de>
parents: 3757
diff changeset
   540
"/        (aKey == #Return) ifTrue:[
8a4b07e9ee4e no need to care for RETURN-keyPress; its already done by the keyboard processor
Claus Gittinger <cg@exept.de>
parents: 3757
diff changeset
   541
"/            self hide.
8a4b07e9ee4e no need to care for RETURN-keyPress; its already done by the keyboard processor
Claus Gittinger <cg@exept.de>
parents: 3757
diff changeset
   542
"/            action := actions at:defaultButtonIndex.
8a4b07e9ee4e no need to care for RETURN-keyPress; its already done by the keyboard processor
Claus Gittinger <cg@exept.de>
parents: 3757
diff changeset
   543
"/            action value
8a4b07e9ee4e no need to care for RETURN-keyPress; its already done by the keyboard processor
Claus Gittinger <cg@exept.de>
parents: 3757
diff changeset
   544
"/        ]
8a4b07e9ee4e no need to care for RETURN-keyPress; its already done by the keyboard processor
Claus Gittinger <cg@exept.de>
parents: 3757
diff changeset
   545
"/    ].
197
00927189c882 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 188
diff changeset
   546
    super keyPress:aKey x:x y:y
490
08e8adfb783c resources
Claus Gittinger <cg@exept.de>
parents: 372
diff changeset
   547
08e8adfb783c resources
Claus Gittinger <cg@exept.de>
parents: 372
diff changeset
   548
    "Modified: 7.3.1996 / 13:17:36 / cg"
197
00927189c882 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 188
diff changeset
   549
! !
0
e6a541c1c0eb Initial revision
claus
parents:
diff changeset
   550
2523
c10ebb01ab09 category rename
Claus Gittinger <cg@exept.de>
parents: 2476
diff changeset
   551
!OptionBox methodsFor:'initialization'!
7
15a9291b9bd0 *** empty log message ***
claus
parents: 5
diff changeset
   552
197
00927189c882 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 188
diff changeset
   553
initFormBitmap
00927189c882 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 188
diff changeset
   554
    WarnBitmap isNil ifTrue:[
1914
f337a7fd99f5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1612
diff changeset
   555
        WarnBitmap := WarningBox iconBitmap.
f337a7fd99f5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1612
diff changeset
   556
"/        WarnBitmap := Image fromFile:'bitmaps/Warning.xbm' resolution:100 on:Display 
0
e6a541c1c0eb Initial revision
claus
parents:
diff changeset
   557
    ].
2969
eb87f1aedd6c Do not use obsolete methods with #form:
Stefan Vogel <sv@exept.de>
parents: 2898
diff changeset
   558
    formLabel label:WarnBitmap
899
aa84d3d39d94 use Image instead of Form
Claus Gittinger <cg@exept.de>
parents: 847
diff changeset
   559
1914
f337a7fd99f5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1612
diff changeset
   560
    "Modified: / 25.5.1999 / 16:08:06 / cg"
0
e6a541c1c0eb Initial revision
claus
parents:
diff changeset
   561
!
e6a541c1c0eb Initial revision
claus
parents:
diff changeset
   562
e6a541c1c0eb Initial revision
claus
parents:
diff changeset
   563
initialize
4383
7d374bd7b21c changed: #initialize
Claus Gittinger <cg@exept.de>
parents: 4382
diff changeset
   564
    |mm vPanelLayout|
0
e6a541c1c0eb Initial revision
claus
parents:
diff changeset
   565
e6a541c1c0eb Initial revision
claus
parents:
diff changeset
   566
    super initialize.
e6a541c1c0eb Initial revision
claus
parents:
diff changeset
   567
372
2ee5887b00f0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 371
diff changeset
   568
    mm := ViewSpacing.
2ee5887b00f0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 371
diff changeset
   569
3208
7b4c5a215af9 use panels, to allow for hooks to add more widgets.
Claus Gittinger <cg@exept.de>
parents: 3201
diff changeset
   570
    verticalPanel := VerticalPanelView in:self.
7b4c5a215af9 use panels, to allow for hooks to add more widgets.
Claus Gittinger <cg@exept.de>
parents: 3201
diff changeset
   571
    vPanelLayout := LayoutFrame origin:(mm @ mm) corner:(1.0@1.0).
7b4c5a215af9 use panels, to allow for hooks to add more widgets.
Claus Gittinger <cg@exept.de>
parents: 3201
diff changeset
   572
    vPanelLayout bottomOffset:(font height + (mm * 5)) negated.
7b4c5a215af9 use panels, to allow for hooks to add more widgets.
Claus Gittinger <cg@exept.de>
parents: 3201
diff changeset
   573
    vPanelLayout rightOffset:mm negated.
7b4c5a215af9 use panels, to allow for hooks to add more widgets.
Claus Gittinger <cg@exept.de>
parents: 3201
diff changeset
   574
    verticalPanel geometryLayout:vPanelLayout.
7b4c5a215af9 use panels, to allow for hooks to add more widgets.
Claus Gittinger <cg@exept.de>
parents: 3201
diff changeset
   575
    verticalPanel horizontalLayout:#fit.
7b4c5a215af9 use panels, to allow for hooks to add more widgets.
Claus Gittinger <cg@exept.de>
parents: 3201
diff changeset
   576
    verticalPanel verticalLayout:#bottomFit.
7b4c5a215af9 use panels, to allow for hooks to add more widgets.
Claus Gittinger <cg@exept.de>
parents: 3201
diff changeset
   577
7b4c5a215af9 use panels, to allow for hooks to add more widgets.
Claus Gittinger <cg@exept.de>
parents: 3201
diff changeset
   578
    labelPanel := HorizontalPanelView in:verticalPanel.
7b4c5a215af9 use panels, to allow for hooks to add more widgets.
Claus Gittinger <cg@exept.de>
parents: 3201
diff changeset
   579
    labelPanel horizontalLayout:#leftSpace.
7b4c5a215af9 use panels, to allow for hooks to add more widgets.
Claus Gittinger <cg@exept.de>
parents: 3201
diff changeset
   580
    labelPanel verticalLayout:#topSpace.
3613
0a1963025199 added preferredWidth & preferredHeight
Claus Gittinger <cg@exept.de>
parents: 3260
diff changeset
   581
    labelPanel height:(labelPanel preferredHeight + (mm * 4)).
3208
7b4c5a215af9 use panels, to allow for hooks to add more widgets.
Claus Gittinger <cg@exept.de>
parents: 3201
diff changeset
   582
7b4c5a215af9 use panels, to allow for hooks to add more widgets.
Claus Gittinger <cg@exept.de>
parents: 3201
diff changeset
   583
    formLabel := Label in:labelPanel.
38
4b9b70b2cc87 2.10.3 pre-final version
claus
parents: 21
diff changeset
   584
    self initFormBitmap.
0
e6a541c1c0eb Initial revision
claus
parents:
diff changeset
   585
    formLabel borderWidth:0.
3208
7b4c5a215af9 use panels, to allow for hooks to add more widgets.
Claus Gittinger <cg@exept.de>
parents: 3201
diff changeset
   586
"/    formLabel origin:(mm @ mm).
0
e6a541c1c0eb Initial revision
claus
parents:
diff changeset
   587
3208
7b4c5a215af9 use panels, to allow for hooks to add more widgets.
Claus Gittinger <cg@exept.de>
parents: 3201
diff changeset
   588
    textLabel := Label label:'Select' in:labelPanel.
0
e6a541c1c0eb Initial revision
claus
parents:
diff changeset
   589
    textLabel borderWidth:0.
3208
7b4c5a215af9 use panels, to allow for hooks to add more widgets.
Claus Gittinger <cg@exept.de>
parents: 3201
diff changeset
   590
"/    textLabel origin:((mm + formLabel width + mm) @ mm).
7b4c5a215af9 use panels, to allow for hooks to add more widgets.
Claus Gittinger <cg@exept.de>
parents: 3201
diff changeset
   591
7b4c5a215af9 use panels, to allow for hooks to add more widgets.
Claus Gittinger <cg@exept.de>
parents: 3201
diff changeset
   592
    verticalPanel resize.
4383
7d374bd7b21c changed: #initialize
Claus Gittinger <cg@exept.de>
parents: 4382
diff changeset
   593
    "/ cannot be done here - verticalPanel still has its defaul height and may be
7d374bd7b21c changed: #initialize
Claus Gittinger <cg@exept.de>
parents: 4382
diff changeset
   594
    "/ not yet filled...
7d374bd7b21c changed: #initialize
Claus Gittinger <cg@exept.de>
parents: 4382
diff changeset
   595
    "/ yPosition := verticalPanel height + (mm * 3).
0
e6a541c1c0eb Initial revision
claus
parents:
diff changeset
   596
1612
e7d3bc88a533 oops - two buttonPanels where created (MD's fix).
Claus Gittinger <cg@exept.de>
parents: 953
diff changeset
   597
"/    buttonPanel isNil ifTrue:[
e7d3bc88a533 oops - two buttonPanels where created (MD's fix).
Claus Gittinger <cg@exept.de>
parents: 953
diff changeset
   598
"/        buttonPanel := HorizontalPanelView origin:(0.0 @ 1.0) corner:(1.0 @ 1.0) in:self.
e7d3bc88a533 oops - two buttonPanels where created (MD's fix).
Claus Gittinger <cg@exept.de>
parents: 953
diff changeset
   599
"/    ].
130
claus
parents: 119
diff changeset
   600
    buttonPanel 
3208
7b4c5a215af9 use panels, to allow for hooks to add more widgets.
Claus Gittinger <cg@exept.de>
parents: 3201
diff changeset
   601
        bottomInset:0 "mm";
7b4c5a215af9 use panels, to allow for hooks to add more widgets.
Claus Gittinger <cg@exept.de>
parents: 3201
diff changeset
   602
        topInset:(font height + (mm * 4)) negated.
130
claus
parents: 119
diff changeset
   603
    buttonPanel 
372
2ee5887b00f0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 371
diff changeset
   604
        borderWidth:0; 
2ee5887b00f0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 371
diff changeset
   605
        horizontalLayout:#fitSpace.
59
450ce95a72a4 *** empty log message ***
claus
parents: 38
diff changeset
   606
4383
7d374bd7b21c changed: #initialize
Claus Gittinger <cg@exept.de>
parents: 4382
diff changeset
   607
    1 to:(buttons size) do:[:index |
372
2ee5887b00f0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 371
diff changeset
   608
        |button|
7
15a9291b9bd0 *** empty log message ***
claus
parents: 5
diff changeset
   609
372
2ee5887b00f0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 371
diff changeset
   610
        button := Button label:'press'.
2ee5887b00f0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 371
diff changeset
   611
        button action:[
2ee5887b00f0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 371
diff changeset
   612
                       (buttons at:index) turnOffWithoutRedraw.
2ee5887b00f0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 371
diff changeset
   613
                       self hide.
3804
8a4b07e9ee4e no need to care for RETURN-keyPress; its already done by the keyboard processor
Claus Gittinger <cg@exept.de>
parents: 3757
diff changeset
   614
                       (actions at:index) value
372
2ee5887b00f0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 371
diff changeset
   615
                      ].
133
claus
parents: 132
diff changeset
   616
"/        index == nButt ifTrue:[
claus
parents: 132
diff changeset
   617
"/            button isReturnButton:true
claus
parents: 132
diff changeset
   618
"/        ].
372
2ee5887b00f0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 371
diff changeset
   619
        buttonPanel addSubView:button.
2ee5887b00f0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 371
diff changeset
   620
        buttons at:index put:button.
91
e8db16616e97 *** empty log message ***
claus
parents: 85
diff changeset
   621
    ].
e8db16616e97 *** empty log message ***
claus
parents: 85
diff changeset
   622
e8db16616e97 *** empty log message ***
claus
parents: 85
diff changeset
   623
    "
e8db16616e97 *** empty log message ***
claus
parents: 85
diff changeset
   624
     |box|
e8db16616e97 *** empty log message ***
claus
parents: 85
diff changeset
   625
e8db16616e97 *** empty log message ***
claus
parents: 85
diff changeset
   626
     box := OptionBox title:'hello' numberOfOptions:4.
e8db16616e97 *** empty log message ***
claus
parents: 85
diff changeset
   627
     box open
e8db16616e97 *** empty log message ***
claus
parents: 85
diff changeset
   628
    "
372
2ee5887b00f0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 371
diff changeset
   629
4383
7d374bd7b21c changed: #initialize
Claus Gittinger <cg@exept.de>
parents: 4382
diff changeset
   630
    "Modified: / 28-02-2012 / 15:56:57 / cg"
133
claus
parents: 132
diff changeset
   631
! !
claus
parents: 132
diff changeset
   632
63
f4eaf04d1eaf *** empty log message ***
claus
parents: 59
diff changeset
   633
!OptionBox methodsFor:'queries'!
0
e6a541c1c0eb Initial revision
claus
parents:
diff changeset
   634
130
claus
parents: 119
diff changeset
   635
preferredExtent 
59
450ce95a72a4 *** empty log message ***
claus
parents: 38
diff changeset
   636
    "return a size to make everything fit into myself"
450ce95a72a4 *** empty log message ***
claus
parents: 38
diff changeset
   637
3208
7b4c5a215af9 use panels, to allow for hooks to add more widgets.
Claus Gittinger <cg@exept.de>
parents: 3201
diff changeset
   638
    |w w1 h buttonPanelsPref vPanelsPref mm|
0
e6a541c1c0eb Initial revision
claus
parents:
diff changeset
   639
3757
551f24a728dc changed #preferredExtent - use explicitExtent instvar
Stefan Vogel <sv@exept.de>
parents: 3743
diff changeset
   640
    "/ If I have an explicit preferredExtent..
551f24a728dc changed #preferredExtent - use explicitExtent instvar
Stefan Vogel <sv@exept.de>
parents: 3743
diff changeset
   641
    explicitExtent notNil ifTrue:[
551f24a728dc changed #preferredExtent - use explicitExtent instvar
Stefan Vogel <sv@exept.de>
parents: 3743
diff changeset
   642
        ^ explicitExtent
551f24a728dc changed #preferredExtent - use explicitExtent instvar
Stefan Vogel <sv@exept.de>
parents: 3743
diff changeset
   643
    ].
799
64f8700489a4 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 740
diff changeset
   644
3757
551f24a728dc changed #preferredExtent - use explicitExtent instvar
Stefan Vogel <sv@exept.de>
parents: 3743
diff changeset
   645
    "/ If I have a cached preferredExtent value..
713
0c38ad51016d care for preSet preferredExtent
Claus Gittinger <cg@exept.de>
parents: 655
diff changeset
   646
    preferredExtent notNil ifTrue:[
0c38ad51016d care for preSet preferredExtent
Claus Gittinger <cg@exept.de>
parents: 655
diff changeset
   647
        ^ preferredExtent
0c38ad51016d care for preSet preferredExtent
Claus Gittinger <cg@exept.de>
parents: 655
diff changeset
   648
    ].
0c38ad51016d care for preSet preferredExtent
Claus Gittinger <cg@exept.de>
parents: 655
diff changeset
   649
371
ed0d15f84085 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 355
diff changeset
   650
    mm := ViewSpacing.
ed0d15f84085 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 355
diff changeset
   651
3208
7b4c5a215af9 use panels, to allow for hooks to add more widgets.
Claus Gittinger <cg@exept.de>
parents: 3201
diff changeset
   652
    vPanelsPref := verticalPanel preferredExtent.
371
ed0d15f84085 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 355
diff changeset
   653
    w1 := (mm * 3) + formLabel width + textLabel width.
3208
7b4c5a215af9 use panels, to allow for hooks to add more widgets.
Claus Gittinger <cg@exept.de>
parents: 3201
diff changeset
   654
    buttonPanelsPref := buttonPanel preferredExtent.
7b4c5a215af9 use panels, to allow for hooks to add more widgets.
Claus Gittinger <cg@exept.de>
parents: 3201
diff changeset
   655
    w := w1 max:buttonPanelsPref x.
7b4c5a215af9 use panels, to allow for hooks to add more widgets.
Claus Gittinger <cg@exept.de>
parents: 3201
diff changeset
   656
    w := w max:vPanelsPref x.
38
4b9b70b2cc87 2.10.3 pre-final version
claus
parents: 21
diff changeset
   657
3208
7b4c5a215af9 use panels, to allow for hooks to add more widgets.
Claus Gittinger <cg@exept.de>
parents: 3201
diff changeset
   658
    h := mm
7b4c5a215af9 use panels, to allow for hooks to add more widgets.
Claus Gittinger <cg@exept.de>
parents: 3201
diff changeset
   659
         + vPanelsPref y
7b4c5a215af9 use panels, to allow for hooks to add more widgets.
Claus Gittinger <cg@exept.de>
parents: 3201
diff changeset
   660
         + mm
7b4c5a215af9 use panels, to allow for hooks to add more widgets.
Claus Gittinger <cg@exept.de>
parents: 3201
diff changeset
   661
         + buttonPanelsPref y
7b4c5a215af9 use panels, to allow for hooks to add more widgets.
Claus Gittinger <cg@exept.de>
parents: 3201
diff changeset
   662
         + mm.
0
e6a541c1c0eb Initial revision
claus
parents:
diff changeset
   663
3905
9005cad02a02 preferredExtent computation (care for additional components)
Claus Gittinger <cg@exept.de>
parents: 3804
diff changeset
   664
    self subViews do:[:v |
9005cad02a02 preferredExtent computation (care for additional components)
Claus Gittinger <cg@exept.de>
parents: 3804
diff changeset
   665
        (v ~~ verticalPanel and:[v ~~ buttonPanel]) ifTrue:[
9005cad02a02 preferredExtent computation (care for additional components)
Claus Gittinger <cg@exept.de>
parents: 3804
diff changeset
   666
            h := h + v preferredExtent y.
9005cad02a02 preferredExtent computation (care for additional components)
Claus Gittinger <cg@exept.de>
parents: 3804
diff changeset
   667
            w := w max:(v preferredExtent x).
9005cad02a02 preferredExtent computation (care for additional components)
Claus Gittinger <cg@exept.de>
parents: 3804
diff changeset
   668
        ].
9005cad02a02 preferredExtent computation (care for additional components)
Claus Gittinger <cg@exept.de>
parents: 3804
diff changeset
   669
    ].
9005cad02a02 preferredExtent computation (care for additional components)
Claus Gittinger <cg@exept.de>
parents: 3804
diff changeset
   670
9005cad02a02 preferredExtent computation (care for additional components)
Claus Gittinger <cg@exept.de>
parents: 3804
diff changeset
   671
    preferredExtent := super preferredExtent max:(w @ h).
9005cad02a02 preferredExtent computation (care for additional components)
Claus Gittinger <cg@exept.de>
parents: 3804
diff changeset
   672
    ^ preferredExtent
371
ed0d15f84085 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 355
diff changeset
   673
799
64f8700489a4 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 740
diff changeset
   674
    "Modified: 19.7.1996 / 20:45:11 / cg"
0
e6a541c1c0eb Initial revision
claus
parents:
diff changeset
   675
! !
197
00927189c882 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 188
diff changeset
   676
847
0d760cfc9a8c commentary
Claus Gittinger <cg@exept.de>
parents: 799
diff changeset
   677
!OptionBox class methodsFor:'documentation'!
243
5c411425097d checkin from browser
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
   678
5c411425097d checkin from browser
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
   679
version
4383
7d374bd7b21c changed: #initialize
Claus Gittinger <cg@exept.de>
parents: 4382
diff changeset
   680
    ^ '$Header: /cvs/stx/stx/libwidg/OptionBox.st,v 1.74 2012-02-28 15:00:06 cg Exp $'
4223
Claus Gittinger <cg@exept.de>
parents: 3936
diff changeset
   681
!
Claus Gittinger <cg@exept.de>
parents: 3936
diff changeset
   682
Claus Gittinger <cg@exept.de>
parents: 3936
diff changeset
   683
version_CVS
4383
7d374bd7b21c changed: #initialize
Claus Gittinger <cg@exept.de>
parents: 4382
diff changeset
   684
    ^ '$Header: /cvs/stx/stx/libwidg/OptionBox.st,v 1.74 2012-02-28 15:00:06 cg Exp $'
243
5c411425097d checkin from browser
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
   685
! !