UIPainter.st
author ca
Wed, 04 Jun 1997 13:31:50 +0200
changeset 138 035c98964c38
parent 137 335faeed1663
child 142 75f927b856f6
permissions -rw-r--r--
update
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
60
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
     1
ApplicationModel subclass:#UIPainter
109
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
     2
	instanceVariableNames:'objectList currentView selectionPanel tabSelection lastSlice
121
96d6feeeb049 middleButtonMen:
ca
parents: 118
diff changeset
     3
		specView layoutTool fileName specClass specSelector
109
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
     4
		specSuperclass aspects'
60
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
     5
	classVariableNames:''
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
     6
	poolDictionaries:''
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
     7
	category:'Interface-UIPainter'
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
     8
!
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
     9
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
    10
!UIPainter class methodsFor:'documentation'!
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
    11
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
    12
documentation
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
    13
"
127
95070ea7ae42 update layout from view
ca
parents: 124
diff changeset
    14
    GUI-Builder:
95070ea7ae42 update layout from view
ca
parents: 124
diff changeset
    15
    this class allows the user to build its own applications providing a graphical
95070ea7ae42 update layout from view
ca
parents: 124
diff changeset
    16
    user interface to buildin components and to define the behavior of the components
95070ea7ae42 update layout from view
ca
parents: 124
diff changeset
    17
    during runtime. The resulting specifications can be installed as methods on 
95070ea7ae42 update layout from view
ca
parents: 124
diff changeset
    18
    classes, typically subclasses of an ApplicationModel. These specifications
95070ea7ae42 update layout from view
ca
parents: 124
diff changeset
    19
    are used by the UIBuilder to generate the application window and its component
95070ea7ae42 update layout from view
ca
parents: 124
diff changeset
    20
    structues when open the application.
60
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
    21
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
    22
    [start with:]
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
    23
        UIPainter open
127
95070ea7ae42 update layout from view
ca
parents: 124
diff changeset
    24
95070ea7ae42 update layout from view
ca
parents: 124
diff changeset
    25
    [see also:]
95070ea7ae42 update layout from view
ca
parents: 124
diff changeset
    26
        UIBuilder
95070ea7ae42 update layout from view
ca
parents: 124
diff changeset
    27
        ApplicationModel
95070ea7ae42 update layout from view
ca
parents: 124
diff changeset
    28
        UISpecification
60
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
    29
"
109
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
    30
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
    31
! !
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
    32
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
    33
!UIPainter class methodsFor:'instance creation'!
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
    34
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
    35
listHolder:aListHolder
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
    36
    |application|
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
    37
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
    38
    application := self new.
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
    39
    application objectList:aListHolder.
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
    40
  ^ application open
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
    41
!
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
    42
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
    43
painter:aBuilderView
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
    44
    |application|
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
    45
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
    46
    application := self new.
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
    47
    application painter:aBuilderView.
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
    48
  ^ application open
60
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
    49
! !
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
    50
87
cc6d70449622 add ST-80 queries
ca
parents: 81
diff changeset
    51
!UIPainter class methodsFor:'ST-80 queries'!
cc6d70449622 add ST-80 queries
ca
parents: 81
diff changeset
    52
cc6d70449622 add ST-80 queries
ca
parents: 81
diff changeset
    53
preferenceFor:aSymbol
cc6d70449622 add ST-80 queries
ca
parents: 81
diff changeset
    54
    ^ false
109
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
    55
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
    56
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
    57
! !
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
    58
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
    59
!UIPainter class methodsFor:'constants'!
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
    60
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
    61
titleOfLayoutMenu
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
    62
    ^ 'Dimension'
87
cc6d70449622 add ST-80 queries
ca
parents: 81
diff changeset
    63
! !
cc6d70449622 add ST-80 queries
ca
parents: 81
diff changeset
    64
118
bc196200ea8b enabled and style
ca
parents: 114
diff changeset
    65
!UIPainter class methodsFor:'icons'!
bc196200ea8b enabled and style
ca
parents: 114
diff changeset
    66
bc196200ea8b enabled and style
ca
parents: 114
diff changeset
    67
iconAlignB
bc196200ea8b enabled and style
ca
parents: 114
diff changeset
    68
    ^ Image fromFile:'b_alignB.xbm'
bc196200ea8b enabled and style
ca
parents: 114
diff changeset
    69
bc196200ea8b enabled and style
ca
parents: 114
diff changeset
    70
!
bc196200ea8b enabled and style
ca
parents: 114
diff changeset
    71
bc196200ea8b enabled and style
ca
parents: 114
diff changeset
    72
iconAlignCenterH
bc196200ea8b enabled and style
ca
parents: 114
diff changeset
    73
    ^ Image fromFile:'b_alignCH.xbm'
bc196200ea8b enabled and style
ca
parents: 114
diff changeset
    74
bc196200ea8b enabled and style
ca
parents: 114
diff changeset
    75
!
bc196200ea8b enabled and style
ca
parents: 114
diff changeset
    76
bc196200ea8b enabled and style
ca
parents: 114
diff changeset
    77
iconAlignCenterV
bc196200ea8b enabled and style
ca
parents: 114
diff changeset
    78
    ^ Image fromFile:'b_alignCV.xbm'
bc196200ea8b enabled and style
ca
parents: 114
diff changeset
    79
bc196200ea8b enabled and style
ca
parents: 114
diff changeset
    80
!
bc196200ea8b enabled and style
ca
parents: 114
diff changeset
    81
bc196200ea8b enabled and style
ca
parents: 114
diff changeset
    82
iconAlignL
bc196200ea8b enabled and style
ca
parents: 114
diff changeset
    83
    ^ Image fromFile:'b_alignL.xbm'
bc196200ea8b enabled and style
ca
parents: 114
diff changeset
    84
!
bc196200ea8b enabled and style
ca
parents: 114
diff changeset
    85
bc196200ea8b enabled and style
ca
parents: 114
diff changeset
    86
iconAlignLR
bc196200ea8b enabled and style
ca
parents: 114
diff changeset
    87
    ^ Image fromFile:'b_alignLR.xbm'
bc196200ea8b enabled and style
ca
parents: 114
diff changeset
    88
bc196200ea8b enabled and style
ca
parents: 114
diff changeset
    89
!
bc196200ea8b enabled and style
ca
parents: 114
diff changeset
    90
bc196200ea8b enabled and style
ca
parents: 114
diff changeset
    91
iconAlignR
bc196200ea8b enabled and style
ca
parents: 114
diff changeset
    92
    ^ Image fromFile:'b_alignR.xbm'
bc196200ea8b enabled and style
ca
parents: 114
diff changeset
    93
bc196200ea8b enabled and style
ca
parents: 114
diff changeset
    94
!
bc196200ea8b enabled and style
ca
parents: 114
diff changeset
    95
bc196200ea8b enabled and style
ca
parents: 114
diff changeset
    96
iconAlignT
bc196200ea8b enabled and style
ca
parents: 114
diff changeset
    97
    ^ Image fromFile:'b_alignT.xbm'
bc196200ea8b enabled and style
ca
parents: 114
diff changeset
    98
bc196200ea8b enabled and style
ca
parents: 114
diff changeset
    99
!
bc196200ea8b enabled and style
ca
parents: 114
diff changeset
   100
bc196200ea8b enabled and style
ca
parents: 114
diff changeset
   101
iconAlignTB
bc196200ea8b enabled and style
ca
parents: 114
diff changeset
   102
    ^ Image fromFile:'b_alignTB.xbm'
bc196200ea8b enabled and style
ca
parents: 114
diff changeset
   103
bc196200ea8b enabled and style
ca
parents: 114
diff changeset
   104
! !
bc196200ea8b enabled and style
ca
parents: 114
diff changeset
   105
60
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
   106
!UIPainter class methodsFor:'interface specs'!
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
   107
118
bc196200ea8b enabled and style
ca
parents: 114
diff changeset
   108
menuAlignment
bc196200ea8b enabled and style
ca
parents: 114
diff changeset
   109
    ^ #(#Menu #(
bc196200ea8b enabled and style
ca
parents: 114
diff changeset
   110
                #(#MenuItem
bc196200ea8b enabled and style
ca
parents: 114
diff changeset
   111
                        #'label:' 'align left'
bc196200ea8b enabled and style
ca
parents: 114
diff changeset
   112
                        #'value:' #alignSelectionLeft
130
ffa9ea02d276 update menu specifications
ca
parents: 129
diff changeset
   113
                        #'labelImage:' #( ResourceRetriever nil iconAlignL )
118
bc196200ea8b enabled and style
ca
parents: 114
diff changeset
   114
                 )
bc196200ea8b enabled and style
ca
parents: 114
diff changeset
   115
                #(#MenuItem
bc196200ea8b enabled and style
ca
parents: 114
diff changeset
   116
                        #'label:' 'align right'
bc196200ea8b enabled and style
ca
parents: 114
diff changeset
   117
                        #'value:' #alignSelectionRight
130
ffa9ea02d276 update menu specifications
ca
parents: 129
diff changeset
   118
                        #'labelImage:' #( ResourceRetriever nil iconAlignR )
118
bc196200ea8b enabled and style
ca
parents: 114
diff changeset
   119
                 )
bc196200ea8b enabled and style
ca
parents: 114
diff changeset
   120
                #(#MenuItem
bc196200ea8b enabled and style
ca
parents: 114
diff changeset
   121
                        #'label:' 'align left & right'
bc196200ea8b enabled and style
ca
parents: 114
diff changeset
   122
                        #'value:' #alignSelectionLeftAndRight
130
ffa9ea02d276 update menu specifications
ca
parents: 129
diff changeset
   123
                        #'labelImage:' #( ResourceRetriever nil iconAlignLR )
118
bc196200ea8b enabled and style
ca
parents: 114
diff changeset
   124
                 )
bc196200ea8b enabled and style
ca
parents: 114
diff changeset
   125
                #(#MenuItem
bc196200ea8b enabled and style
ca
parents: 114
diff changeset
   126
                        #'label:' 'align top'
bc196200ea8b enabled and style
ca
parents: 114
diff changeset
   127
                        #'value:' #alignSelectionTop
130
ffa9ea02d276 update menu specifications
ca
parents: 129
diff changeset
   128
                        #'labelImage:' #( ResourceRetriever nil iconAlignT )
118
bc196200ea8b enabled and style
ca
parents: 114
diff changeset
   129
                 )
bc196200ea8b enabled and style
ca
parents: 114
diff changeset
   130
                #(#MenuItem
bc196200ea8b enabled and style
ca
parents: 114
diff changeset
   131
                        #'label:' 'align bottom'
bc196200ea8b enabled and style
ca
parents: 114
diff changeset
   132
                        #'value:' #alignSelectionBottom
130
ffa9ea02d276 update menu specifications
ca
parents: 129
diff changeset
   133
                        #'labelImage:' #( ResourceRetriever nil iconAlignB )
118
bc196200ea8b enabled and style
ca
parents: 114
diff changeset
   134
                 )
bc196200ea8b enabled and style
ca
parents: 114
diff changeset
   135
                #(#MenuItem
bc196200ea8b enabled and style
ca
parents: 114
diff changeset
   136
                        #'label:' 'align top & bottom'
bc196200ea8b enabled and style
ca
parents: 114
diff changeset
   137
                        #'value:' #alignSelectionTopAndBottom
130
ffa9ea02d276 update menu specifications
ca
parents: 129
diff changeset
   138
                        #'labelImage:' #( ResourceRetriever nil iconAlignTB )
118
bc196200ea8b enabled and style
ca
parents: 114
diff changeset
   139
                 )
bc196200ea8b enabled and style
ca
parents: 114
diff changeset
   140
                #(#MenuItem
bc196200ea8b enabled and style
ca
parents: 114
diff changeset
   141
                        #'label:' 'align centered horizontal'
bc196200ea8b enabled and style
ca
parents: 114
diff changeset
   142
                        #'value:' #alignSelectionCenterHor
130
ffa9ea02d276 update menu specifications
ca
parents: 129
diff changeset
   143
                        #'labelImage:' #( ResourceRetriever nil iconAlignCenterH )
118
bc196200ea8b enabled and style
ca
parents: 114
diff changeset
   144
                 )
bc196200ea8b enabled and style
ca
parents: 114
diff changeset
   145
                #(#MenuItem
bc196200ea8b enabled and style
ca
parents: 114
diff changeset
   146
                        #'label:' 'align centered vertical'
bc196200ea8b enabled and style
ca
parents: 114
diff changeset
   147
                        #'value:' #alignSelectionCenterVer
130
ffa9ea02d276 update menu specifications
ca
parents: 129
diff changeset
   148
                        #'labelImage:' #( ResourceRetriever nil iconAlignCenterV )
118
bc196200ea8b enabled and style
ca
parents: 114
diff changeset
   149
                 )
bc196200ea8b enabled and style
ca
parents: 114
diff changeset
   150
                )
bc196200ea8b enabled and style
ca
parents: 114
diff changeset
   151
               #( 4 2 )
bc196200ea8b enabled and style
ca
parents: 114
diff changeset
   152
               nil
bc196200ea8b enabled and style
ca
parents: 114
diff changeset
   153
        )
bc196200ea8b enabled and style
ca
parents: 114
diff changeset
   154
bc196200ea8b enabled and style
ca
parents: 114
diff changeset
   155
!
bc196200ea8b enabled and style
ca
parents: 114
diff changeset
   156
bc196200ea8b enabled and style
ca
parents: 114
diff changeset
   157
menuPullDown
109
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
   158
    ^ #(#Menu #(
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
   159
        #(#MenuItem
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
   160
                #'label:' 'file'
114
93cd25c62a68 menu and handling
ca
parents: 109
diff changeset
   161
                #'value:' #file
109
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
   162
                #'submenu:'
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
   163
                        #(#Menu #(
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
   164
                                 #(#MenuItem
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
   165
                                        #'label:' 'new'
114
93cd25c62a68 menu and handling
ca
parents: 109
diff changeset
   166
                                        #'value:' #removeAll
109
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
   167
                                  )
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
   168
                                 #(#MenuItem
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
   169
                                        #'label:' 'from class ...'
114
93cd25c62a68 menu and handling
ca
parents: 109
diff changeset
   170
                                        #'value:' #doFromClass
109
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
   171
                                  )
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
   172
                                 #(#MenuItem
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
   173
                                        #'label:' 'pick a view '
114
93cd25c62a68 menu and handling
ca
parents: 109
diff changeset
   174
                                        #'value:' #doPickAView
109
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
   175
                                  )
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
   176
                                 #(#MenuItem
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
   177
                                        #'label:' 'raise'
114
93cd25c62a68 menu and handling
ca
parents: 109
diff changeset
   178
                                        #'value:' #doRaise
109
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
   179
                                  )
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
   180
                                 #(#MenuItem
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
   181
                                        #'label:' 'quit'
114
93cd25c62a68 menu and handling
ca
parents: 109
diff changeset
   182
                                        #'value:' #closeRequest
109
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
   183
                                  )
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
   184
                                 )
133
e12f82d3afb7 popup box caused by a closeRequest with still open
ca
parents: 130
diff changeset
   185
                                #(3 1)
109
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
   186
                                nil
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
   187
                       )
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
   188
         )
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
   189
        #(#MenuItem
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
   190
                #'label:' 'special'
114
93cd25c62a68 menu and handling
ca
parents: 109
diff changeset
   191
                #'value:' #special
109
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
   192
                #'submenu:' 
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
   193
                        #(#Menu #(
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
   194
                                #(#MenuItem
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
   195
                                        #'label:' 'group radioButtons'
114
93cd25c62a68 menu and handling
ca
parents: 109
diff changeset
   196
                                        #'value:' #groupRadioButtons
109
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
   197
                                 ) 
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
   198
                                #(#MenuItem
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
   199
                                        #'label:' 'group enterFields'
114
93cd25c62a68 menu and handling
ca
parents: 109
diff changeset
   200
                                        #'value:' #groupEnterFields
109
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
   201
                                 )
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
   202
                                )
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
   203
                                nil
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
   204
                                nil
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
   205
                        )
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
   206
         )
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
   207
        #(#MenuItem
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
   208
                #'label:' 'misc'
114
93cd25c62a68 menu and handling
ca
parents: 109
diff changeset
   209
                #'value:' #misc
109
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
   210
                #'submenu:'
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
   211
                        #(#Menu #(
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
   212
                                #(#MenuItem
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
   213
                                        #'label:' 'grid'
114
93cd25c62a68 menu and handling
ca
parents: 109
diff changeset
   214
                                        #'value:' #grid
109
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
   215
                                        #'submenu:'
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
   216
                                                #(#Menu #(
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
   217
                                                        #(#MenuItem
137
ca
parents: 136
diff changeset
   218
                                                                #'label:' 'show'
ca
parents: 136
diff changeset
   219
                                                                #'indication:' #gridShown:
109
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
   220
                                                         )
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
   221
                                                        #(#MenuItem
137
ca
parents: 136
diff changeset
   222
                                                                #'label:' 'align'
ca
parents: 136
diff changeset
   223
                                                                #'indication:' #gridAlign:
109
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
   224
                                                         )
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
   225
                                                        )
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
   226
                                                        nil
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
   227
                                                        nil
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
   228
                                                 )
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
   229
                                 )
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
   230
                                #(#MenuItem
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
   231
                                        #'label:' 'undo'
114
93cd25c62a68 menu and handling
ca
parents: 109
diff changeset
   232
                                        #'value:' #undo
109
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
   233
                                        #'submenu:'
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
   234
                                                #(#Menu #(
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
   235
                                                        #(#MenuItem
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
   236
                                                                #'label:' 'last'
114
93cd25c62a68 menu and handling
ca
parents: 109
diff changeset
   237
                                                                #'value:' #undoLast
109
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
   238
                                                         )
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
   239
                                                        #(#MenuItem
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
   240
                                                                #'label:' 'menu'
114
93cd25c62a68 menu and handling
ca
parents: 109
diff changeset
   241
                                                                #'value:' #openUndoMenu
109
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
   242
                                                         )
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
   243
                                                        #(#MenuItem
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
   244
                                                                #'label:' 'delete'
114
93cd25c62a68 menu and handling
ca
parents: 109
diff changeset
   245
                                                                #'value:' #removeUndoHistory
109
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
   246
                                                         )
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
   247
                                                        )
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
   248
                                                        #(2)
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
   249
                                                        nil
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
   250
                                                 )
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
   251
                                  )
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
   252
                                )
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
   253
                                nil
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
   254
                                nil
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
   255
                               )
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
   256
         )
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
   257
        #(#MenuItem
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
   258
                #'label:' 'code'
114
93cd25c62a68 menu and handling
ca
parents: 109
diff changeset
   259
                #'value:' #code
109
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
   260
                #'submenu:'
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
   261
                        #(#Menu #(
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
   262
                                #(#MenuItem
133
e12f82d3afb7 popup box caused by a closeRequest with still open
ca
parents: 130
diff changeset
   263
                                        #'label:' 'class && method'
114
93cd25c62a68 menu and handling
ca
parents: 109
diff changeset
   264
                                        #'value:' #defineClassAndSelector
109
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
   265
                                 )
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
   266
                                 #(#MenuItem
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
   267
                                        #'label:' 'install spec'
114
93cd25c62a68 menu and handling
ca
parents: 109
diff changeset
   268
                                        #'value:' #doInstallSpec
109
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
   269
                                  )
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
   270
                                 #(#MenuItem
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
   271
                                        #'label:' 'install aspects'
114
93cd25c62a68 menu and handling
ca
parents: 109
diff changeset
   272
                                        #'value:' #doInstallAspects
109
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
   273
                                  )
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
   274
                                 #(#MenuItem
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
   275
                                        #'label:' 'windowSpec'
114
93cd25c62a68 menu and handling
ca
parents: 109
diff changeset
   276
                                        #'value:' #doWindowSpec
109
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
   277
                                   )
133
e12f82d3afb7 popup box caused by a closeRequest with still open
ca
parents: 130
diff changeset
   278
                                #(#MenuItem
e12f82d3afb7 popup box caused by a closeRequest with still open
ca
parents: 130
diff changeset
   279
                                        #'label:' 'browse'
e12f82d3afb7 popup box caused by a closeRequest with still open
ca
parents: 130
diff changeset
   280
                                        #'value:' #browseAppClass
e12f82d3afb7 popup box caused by a closeRequest with still open
ca
parents: 130
diff changeset
   281
                                 )
109
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
   282
                                )
133
e12f82d3afb7 popup box caused by a closeRequest with still open
ca
parents: 130
diff changeset
   283
                                #( 1 2 1)
109
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
   284
                                nil
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
   285
                          )
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
   286
         )
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
   287
        #(#MenuItem
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
   288
                #'label:' 'test'
118
bc196200ea8b enabled and style
ca
parents: 114
diff changeset
   289
                #'nameKey:' #test
114
93cd25c62a68 menu and handling
ca
parents: 109
diff changeset
   290
                #'value:' #test
109
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
   291
                #'submenu:'
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
   292
                        #(#Menu #(
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
   293
                                #(#MenuItem
137
ca
parents: 136
diff changeset
   294
                                        #'label:' 'test mode'
ca
parents: 136
diff changeset
   295
                                        #'indication:' #testMode:
109
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
   296
                                 )
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
   297
                                )
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
   298
                                nil
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
   299
                                nil
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
   300
                          )
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
   301
         )
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
   302
        )
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
   303
        nil
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
   304
        nil
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
   305
      )
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
   306
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
   307
!
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
   308
60
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
   309
nameAndSelectorSpec
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
   310
    "this window spec was automatically generated by the ST/X UIPainter"
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
   311
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
   312
    "do not manually edit this - the painter/builder may not be able to
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
   313
     handle the specification if its corrupted."
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
   314
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
   315
    "
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
   316
     UIPainter new openOnClass:UIPainter andSelector:#nameAndSelectorSpec
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
   317
     UIPainter new openInterface:#nameAndSelectorSpec
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
   318
    "
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
   319
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
   320
    <resource: #canvas>
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
   321
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
   322
    ^
109
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
   323
60
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
   324
       #(#FullSpec
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
   325
          #'window:' 
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
   326
           #(#WindowSpec
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
   327
              #'name:' 'uIPainterView'
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
   328
              #'layout:' #(#LayoutFrame 0 0.0 0 0.0 0 1.0 0 1.0)
127
95070ea7ae42 update layout from view
ca
parents: 124
diff changeset
   329
              #'label:' 'unnamed canvas'
92
79473a16fdc9 spec for class & selector
Claus Gittinger <cg@exept.de>
parents: 87
diff changeset
   330
              #'bounds:' #(#Rectangle 0 0 300 223)
60
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
   331
          )
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
   332
          #'component:' 
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
   333
           #(#SpecCollection
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
   334
              #'collection:' 
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
   335
               #(
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
   336
                 #(#LabelSpec
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
   337
                    #'name:' 'label1'
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
   338
                    #'layout:' #(#LayoutFrame 10 0 50 0 110 0 70 0)
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
   339
                    #'label:' 'class:'
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
   340
                    #'foregroundColor:' #(#Color 0.0 0.0 0.0)
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
   341
                    #'backgroundColor:' #(#Color 66.9993 66.9993 66.9993)
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
   342
                    #'initiallyInvisible:' false
81
7493e2437af5 checkin from browser
ca
parents: 77
diff changeset
   343
                    #'translateLabel:' false
60
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
   344
                    #'level:' 0
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
   345
                    #'adjust:' #right
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
   346
                    #'hasCharacterOrientedLabel:' true
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
   347
                )
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
   348
                 #(#LabelSpec
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
   349
                    #'name:' 'label2'
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
   350
                    #'layout:' #(#LayoutFrame 10 0 90 0 110 0 110 0)
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
   351
                    #'label:' 'superclass:'
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
   352
                    #'foregroundColor:' #(#Color 0.0 0.0 0.0)
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
   353
                    #'backgroundColor:' #(#Color 66.9993 66.9993 66.9993)
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
   354
                    #'initiallyInvisible:' false
81
7493e2437af5 checkin from browser
ca
parents: 77
diff changeset
   355
                    #'translateLabel:' false
60
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
   356
                    #'level:' 0
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
   357
                    #'adjust:' #right
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
   358
                    #'hasCharacterOrientedLabel:' true
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
   359
                )
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
   360
                 #(#LabelSpec
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
   361
                    #'name:' 'label3'
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
   362
                    #'layout:' #(#LayoutFrame 10 0 130 0 110 0 150 0)
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
   363
                    #'label:' 'selector:'
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
   364
                    #'foregroundColor:' #(#Color 0.0 0.0 0.0)
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
   365
                    #'backgroundColor:' #(#Color 66.9993 66.9993 66.9993)
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
   366
                    #'initiallyInvisible:' false
81
7493e2437af5 checkin from browser
ca
parents: 77
diff changeset
   367
                    #'translateLabel:' false
60
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
   368
                    #'level:' 0
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
   369
                    #'adjust:' #right
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
   370
                    #'hasCharacterOrientedLabel:' true
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
   371
                )
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
   372
                 #(#InputFieldSpec
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
   373
                    #'name:' 'classNameField'
92
79473a16fdc9 spec for class & selector
Claus Gittinger <cg@exept.de>
parents: 87
diff changeset
   374
                    #'layout:' #(#LayoutFrame 120 0 50 0 289 0 72 0)
60
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
   375
                    #'model:' #classNameChannel
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
   376
                    #'tabable:' true
129
e3b7b892e732 update all inputField atributes in the spec's
ca
parents: 127
diff changeset
   377
                    #'immediateAccept:' true
60
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
   378
                    #'hasBorder:' false
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
   379
                )
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
   380
                 #(#InputFieldSpec
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
   381
                    #'name:' 'superclassNameField'
92
79473a16fdc9 spec for class & selector
Claus Gittinger <cg@exept.de>
parents: 87
diff changeset
   382
                    #'layout:' #(#LayoutFrame 120 0 90 0 289 0 112 0)
60
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
   383
                    #'model:' #superclassNameChannel
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
   384
                    #'tabable:' true
129
e3b7b892e732 update all inputField atributes in the spec's
ca
parents: 127
diff changeset
   385
                    #'immediateAccept:' true
60
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
   386
                    #'hasBorder:' false
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
   387
                )
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
   388
                 #(#InputFieldSpec
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
   389
                    #'name:' 'methodNameField'
92
79473a16fdc9 spec for class & selector
Claus Gittinger <cg@exept.de>
parents: 87
diff changeset
   390
                    #'layout:' #(#LayoutFrame 120 0 130 0 289 0 152 0)
60
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
   391
                    #'model:' #methodNameChannel
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
   392
                    #'tabable:' true
129
e3b7b892e732 update all inputField atributes in the spec's
ca
parents: 127
diff changeset
   393
                    #'immediateAccept:' true
60
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
   394
                    #'hasBorder:' false
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
   395
                )
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
   396
                 #(#ActionButtonSpec
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
   397
                    #'name:' 'button1'
92
79473a16fdc9 spec for class & selector
Claus Gittinger <cg@exept.de>
parents: 87
diff changeset
   398
                    #'layout:' #(#LayoutFrame 30 0 180 0 129 0 209 0)
60
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
   399
                    #'label:' 'cancel'
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
   400
                    #'foregroundColor:' #(#Color 0.0 0.0 0.0)
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
   401
                    #'backgroundColor:' #(#Color 66.9993 66.9993 66.9993)
81
7493e2437af5 checkin from browser
ca
parents: 77
diff changeset
   402
                    #'translateLabel:' false
60
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
   403
                    #'tabable:' true
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
   404
                    #'model:' #cancel
81
7493e2437af5 checkin from browser
ca
parents: 77
diff changeset
   405
                    #'isTriggerOnDown:' false
60
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
   406
                )
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
   407
                 #(#ActionButtonSpec
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
   408
                    #'name:' 'button2'
92
79473a16fdc9 spec for class & selector
Claus Gittinger <cg@exept.de>
parents: 87
diff changeset
   409
                    #'layout:' #(#LayoutFrame 160 0 180 0 259 0 209 0)
60
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
   410
                    #'label:' 'ok'
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
   411
                    #'foregroundColor:' #(#Color 0.0 0.0 0.0)
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
   412
                    #'backgroundColor:' #(#Color 66.9993 66.9993 66.9993)
81
7493e2437af5 checkin from browser
ca
parents: 77
diff changeset
   413
                    #'translateLabel:' false
60
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
   414
                    #'tabable:' true
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
   415
                    #'isDefault:' true
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
   416
                    #'model:' #accept
81
7493e2437af5 checkin from browser
ca
parents: 77
diff changeset
   417
                    #'isTriggerOnDown:' false
60
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
   418
                )
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
   419
                 #(#LabelSpec
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
   420
                    #'name:' 'boxLabel'
92
79473a16fdc9 spec for class & selector
Claus Gittinger <cg@exept.de>
parents: 87
diff changeset
   421
                    #'layout:' #(#LayoutFrame 0 0.0 11 0 0 1.0 32 0)
79473a16fdc9 spec for class & selector
Claus Gittinger <cg@exept.de>
parents: 87
diff changeset
   422
                    #'label:' 'class & selector for code:'
60
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
   423
                    #'foregroundColor:' #(#Color 0.0 0.0 0.0)
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
   424
                    #'backgroundColor:' #(#Color 66.9993 66.9993 66.9993)
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
   425
                    #'initiallyInvisible:' false
81
7493e2437af5 checkin from browser
ca
parents: 77
diff changeset
   426
                    #'translateLabel:' false
60
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
   427
                    #'level:' 0
92
79473a16fdc9 spec for class & selector
Claus Gittinger <cg@exept.de>
parents: 87
diff changeset
   428
                    #'adjust:' #left
60
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
   429
                    #'hasCharacterOrientedLabel:' true
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
   430
                )
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
   431
              )
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
   432
          )
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
   433
      )
92
79473a16fdc9 spec for class & selector
Claus Gittinger <cg@exept.de>
parents: 87
diff changeset
   434
109
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
   435
!
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
   436
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
   437
windowSpec
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
   438
    "this window spec was automatically generated by the ST/X UIPainter"
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
   439
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
   440
    "do not manually edit this - the painter/builder may not be able to
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
   441
     handle the specification if its corrupted."
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
   442
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
   443
    "
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
   444
     UIPainter new openOnClass:UIPainter andSelector:#windowSpec
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
   445
     UIPainter new openInterface:#windowSpec
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
   446
    "
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
   447
    "UIPainter open"
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
   448
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
   449
    <resource: #canvas>
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
   450
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
   451
    ^
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
   452
     
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
   453
       #(#FullSpec
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
   454
          #'window:' 
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
   455
           #(#WindowSpec
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
   456
              #'name:' 'uIPainterView'
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
   457
              #'layout:' #(#LayoutFrame 0 0.0 0 0.0 0 1.0 0 1.0)
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
   458
              #'label:' 'Tree-View'
137
ca
parents: 136
diff changeset
   459
              #'bounds:' #(#Rectangle 0 0 478 429)
109
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
   460
          )
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
   461
          #'component:' 
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
   462
           #(#SpecCollection
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
   463
              #'collection:' 
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
   464
               #(
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
   465
                 #(#MenuPanelSpec
137
ca
parents: 136
diff changeset
   466
                    #'name:' 'menuPullDown'
114
93cd25c62a68 menu and handling
ca
parents: 109
diff changeset
   467
                    #'layout:' #(#LayoutFrame 0 0.0 0 0.0 0 1.0 24 0)
118
bc196200ea8b enabled and style
ca
parents: 114
diff changeset
   468
                    #'menu:' #menuPullDown
bc196200ea8b enabled and style
ca
parents: 114
diff changeset
   469
                    #'showSeparatingLines:' false
bc196200ea8b enabled and style
ca
parents: 114
diff changeset
   470
                    #'verticalLayout:' false
bc196200ea8b enabled and style
ca
parents: 114
diff changeset
   471
                    #'fitFirstPanel:' true
109
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
   472
                )
137
ca
parents: 136
diff changeset
   473
                 #(#MenuPanelSpec
ca
parents: 136
diff changeset
   474
                    #'name:' 'menuAlignment'
ca
parents: 136
diff changeset
   475
                    #'layout:' #(#LayoutFrame 0 0.0 29 0 233 0 54 0)
ca
parents: 136
diff changeset
   476
                    #'menu:' #menuAlignment
ca
parents: 136
diff changeset
   477
                    #'showSeparatingLines:' true
ca
parents: 136
diff changeset
   478
                    #'verticalLayout:' false
ca
parents: 136
diff changeset
   479
                    #'fitFirstPanel:' true
ca
parents: 136
diff changeset
   480
                )
ca
parents: 136
diff changeset
   481
                 #(#PanelViewSpec
ca
parents: 136
diff changeset
   482
                    #'name:' 'panelViewButtons'
ca
parents: 136
diff changeset
   483
                    #'layout:' #(#LayoutFrame -125 1.0 25 0.0 0 1.0 58 0.0)
ca
parents: 136
diff changeset
   484
                    #'component:' 
ca
parents: 136
diff changeset
   485
                     #(#SpecCollection
ca
parents: 136
diff changeset
   486
                        #'collection:' 
ca
parents: 136
diff changeset
   487
                         #(
ca
parents: 136
diff changeset
   488
                           #(#ActionButtonSpec
ca
parents: 136
diff changeset
   489
                              #'name:' 'moveLeft'
ca
parents: 136
diff changeset
   490
                              #'label:' ''
ca
parents: 136
diff changeset
   491
                              #'translateLabel:' true
ca
parents: 136
diff changeset
   492
                              #'labelChannel:' #'LABELb_moveLeft.xbm'
ca
parents: 136
diff changeset
   493
                              #'defaultable:' true
ca
parents: 136
diff changeset
   494
                              #'model:' #moveSelectionLeft
ca
parents: 136
diff changeset
   495
                              #'isTriggerOnDown:' true
ca
parents: 136
diff changeset
   496
                              #'enableChannel:' #enableChannel
ca
parents: 136
diff changeset
   497
                              #'autoRepeat:' false
ca
parents: 136
diff changeset
   498
                              #'extent:' #(#Point 26 24)
ca
parents: 136
diff changeset
   499
                          )
ca
parents: 136
diff changeset
   500
                           #(#ActionButtonSpec
ca
parents: 136
diff changeset
   501
                              #'name:' 'moveRight'
ca
parents: 136
diff changeset
   502
                              #'label:' ''
ca
parents: 136
diff changeset
   503
                              #'translateLabel:' true
ca
parents: 136
diff changeset
   504
                              #'labelChannel:' #'LABELb_moveRight.xbm'
ca
parents: 136
diff changeset
   505
                              #'defaultable:' true
ca
parents: 136
diff changeset
   506
                              #'model:' #moveSelectionRight
ca
parents: 136
diff changeset
   507
                              #'isTriggerOnDown:' true
ca
parents: 136
diff changeset
   508
                              #'enableChannel:' #enableChannel
ca
parents: 136
diff changeset
   509
                              #'autoRepeat:' false
ca
parents: 136
diff changeset
   510
                              #'extent:' #(#Point 26 24)
ca
parents: 136
diff changeset
   511
                          )
ca
parents: 136
diff changeset
   512
                           #(#ActionButtonSpec
ca
parents: 136
diff changeset
   513
                              #'name:' 'moveUp'
ca
parents: 136
diff changeset
   514
                              #'label:' ''
ca
parents: 136
diff changeset
   515
                              #'translateLabel:' true
ca
parents: 136
diff changeset
   516
                              #'labelChannel:' #'LABELb_moveUp.xbm'
ca
parents: 136
diff changeset
   517
                              #'defaultable:' true
ca
parents: 136
diff changeset
   518
                              #'model:' #moveSelectionUp
ca
parents: 136
diff changeset
   519
                              #'isTriggerOnDown:' true
ca
parents: 136
diff changeset
   520
                              #'enableChannel:' #enableChannel
ca
parents: 136
diff changeset
   521
                              #'autoRepeat:' false
ca
parents: 136
diff changeset
   522
                              #'extent:' #(#Point 26 24)
ca
parents: 136
diff changeset
   523
                          )
ca
parents: 136
diff changeset
   524
                           #(#ActionButtonSpec
ca
parents: 136
diff changeset
   525
                              #'name:' 'moveDown'
ca
parents: 136
diff changeset
   526
                              #'label:' ''
ca
parents: 136
diff changeset
   527
                              #'translateLabel:' true
ca
parents: 136
diff changeset
   528
                              #'labelChannel:' #'LABELb_moveDown.xbm'
ca
parents: 136
diff changeset
   529
                              #'defaultable:' true
ca
parents: 136
diff changeset
   530
                              #'model:' #moveSelectionDown
ca
parents: 136
diff changeset
   531
                              #'isTriggerOnDown:' true
ca
parents: 136
diff changeset
   532
                              #'enableChannel:' #enableChannel
ca
parents: 136
diff changeset
   533
                              #'autoRepeat:' false
ca
parents: 136
diff changeset
   534
                              #'extent:' #(#Point 26 24)
ca
parents: 136
diff changeset
   535
                          )
ca
parents: 136
diff changeset
   536
                        )
ca
parents: 136
diff changeset
   537
                    )
ca
parents: 136
diff changeset
   538
                    #'level:' 1
ca
parents: 136
diff changeset
   539
                    #'horizontalLayout:' #fitSpace
ca
parents: 136
diff changeset
   540
                    #'verticalLayout:' #fitSpace
ca
parents: 136
diff changeset
   541
                    #'horizontalSpace:' 4
ca
parents: 136
diff changeset
   542
                    #'verticalSpace:' 4
ca
parents: 136
diff changeset
   543
                )
ca
parents: 136
diff changeset
   544
                 #(#SequenceViewSpec
ca
parents: 136
diff changeset
   545
                    #'name:' 'objectTree'
ca
parents: 136
diff changeset
   546
                    #'layout:' #(#LayoutFrame 0 0.0 59 0.0 0 0.35 0 1.0)
ca
parents: 136
diff changeset
   547
                    #'enableChannel:' #enableChannel
ca
parents: 136
diff changeset
   548
                    #'menu:' #objectListMenu
ca
parents: 136
diff changeset
   549
                    #'tabable:' false
ca
parents: 136
diff changeset
   550
                    #'model:' #objectList
ca
parents: 136
diff changeset
   551
                    #'hasHorizontalScrollBar:' true
ca
parents: 136
diff changeset
   552
                    #'hasVerticalScrollBar:' true
ca
parents: 136
diff changeset
   553
                    #'miniScrollerHorizontal:' true
ca
parents: 136
diff changeset
   554
                    #'miniScrollerVertical:' false
ca
parents: 136
diff changeset
   555
                    #'isMultiSelect:' true
ca
parents: 136
diff changeset
   556
                    #'doubleClickSelector:' #doubleClick
ca
parents: 136
diff changeset
   557
                    #'useIndex:' true
ca
parents: 136
diff changeset
   558
                )
ca
parents: 136
diff changeset
   559
                 #(#NoteBookViewSpec
ca
parents: 136
diff changeset
   560
                    #'name:' 'noteBook'
ca
parents: 136
diff changeset
   561
                    #'layout:' #(#LayoutFrame 0 0.35 59 0.0 0 1.0 -30 1.0)
ca
parents: 136
diff changeset
   562
                    #'enableChannel:' #enableChannel
ca
parents: 136
diff changeset
   563
                    #'menu:' #tabList
ca
parents: 136
diff changeset
   564
                    #'style:' 
ca
parents: 136
diff changeset
   565
                     #(#FontDescription
ca
parents: 136
diff changeset
   566
                        #fixed #medium
ca
parents: 136
diff changeset
   567
                        #roman #'10'
ca
parents: 136
diff changeset
   568
                    )
ca
parents: 136
diff changeset
   569
                    #'model:' #tabModel
ca
parents: 136
diff changeset
   570
                    #'tabWidget:' #Window
ca
parents: 136
diff changeset
   571
                    #'useIndex:' false
ca
parents: 136
diff changeset
   572
                    #'level:' 0
ca
parents: 136
diff changeset
   573
                    #'canvas:' #noteBookView
ca
parents: 136
diff changeset
   574
                )
ca
parents: 136
diff changeset
   575
                 #(#HorizontalPanelViewSpec
ca
parents: 136
diff changeset
   576
                    #'name:' 'modifyPanel'
ca
parents: 136
diff changeset
   577
                    #'layout:' #(#LayoutFrame 0 0.35 -30 1.0 0 1.0 0 1.0)
ca
parents: 136
diff changeset
   578
                    #'component:' 
ca
parents: 136
diff changeset
   579
                     #(#SpecCollection
ca
parents: 136
diff changeset
   580
                        #'collection:' 
ca
parents: 136
diff changeset
   581
                         #(
ca
parents: 136
diff changeset
   582
                           #(#ActionButtonSpec
ca
parents: 136
diff changeset
   583
                              #'name:' 'cancelButton'
ca
parents: 136
diff changeset
   584
                              #'label:' 'cancel'
ca
parents: 136
diff changeset
   585
                              #'model:' #cancel
ca
parents: 136
diff changeset
   586
                              #'isTriggerOnDown:' false
ca
parents: 136
diff changeset
   587
                              #'enableChannel:' #modifiedChannel
ca
parents: 136
diff changeset
   588
                              #'autoRepeat:' false
ca
parents: 136
diff changeset
   589
                              #'extent:' #(#Point 151 24)
ca
parents: 136
diff changeset
   590
                          )
ca
parents: 136
diff changeset
   591
                           #(#ActionButtonSpec
ca
parents: 136
diff changeset
   592
                              #'name:' 'acceptButton'
ca
parents: 136
diff changeset
   593
                              #'label:' 'ok'
ca
parents: 136
diff changeset
   594
                              #'model:' #accept
ca
parents: 136
diff changeset
   595
                              #'isTriggerOnDown:' false
ca
parents: 136
diff changeset
   596
                              #'enableChannel:' #modifiedChannel
ca
parents: 136
diff changeset
   597
                              #'autoRepeat:' false
ca
parents: 136
diff changeset
   598
                              #'extent:' #(#Point 151 24)
ca
parents: 136
diff changeset
   599
                          )
ca
parents: 136
diff changeset
   600
                        )
ca
parents: 136
diff changeset
   601
                    )
ca
parents: 136
diff changeset
   602
                    #'level:' 0
ca
parents: 136
diff changeset
   603
                    #'horizontalLayout:' #fitSpace
ca
parents: 136
diff changeset
   604
                    #'verticalLayout:' #fitSpace
ca
parents: 136
diff changeset
   605
                    #'horizontalSpace:' 3
ca
parents: 136
diff changeset
   606
                    #'verticalSpace:' 3
ca
parents: 136
diff changeset
   607
                )
109
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
   608
              )
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
   609
          )
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
   610
      )
60
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
   611
! !
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
   612
109
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
   613
!UIPainter methodsFor:'actions'!
60
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
   614
109
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
   615
accept
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
   616
    "automatically generated by UIPainter ..."
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
   617
    |layout|
60
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
   618
109
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
   619
    currentView notNil ifTrue:[
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
   620
        tabSelection = 'Dimension' ifTrue:[
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
   621
            (layout := layoutTool layout) notNil ifTrue:[
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
   622
                layoutTool layoutType == #Extent ifTrue:[
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
   623
                    self painter setExtent:layout
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
   624
                ] ifFalse:[
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
   625
                    self painter setDimension:layout
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
   626
                ]
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
   627
            ]
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
   628
        ] ifFalse:[
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
   629
            self painter updateFromSpec:(specView specEdited).
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
   630
        ].
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
   631
        self cancel
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
   632
    ]
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
   633
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
   634
!
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
   635
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
   636
cancel
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
   637
    "cancel all changes and read back attributes from current view
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
   638
    "
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
   639
    specView specEdited:(self painter specFor:currentView).
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
   640
    layoutTool forView:currentView.
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
   641
    self modifiedChannel value:false.
137
ca
parents: 136
diff changeset
   642
!
ca
parents: 136
diff changeset
   643
ca
parents: 136
diff changeset
   644
doubleClick
ca
parents: 136
diff changeset
   645
    objectList selectGroup
60
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
   646
! !
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
   647
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
   648
!UIPainter methodsFor:'aspects'!
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
   649
118
bc196200ea8b enabled and style
ca
parents: 114
diff changeset
   650
enableChannel
bc196200ea8b enabled and style
ca
parents: 114
diff changeset
   651
    "true if modifications are allowed otherwise running test
bc196200ea8b enabled and style
ca
parents: 114
diff changeset
   652
    "
bc196200ea8b enabled and style
ca
parents: 114
diff changeset
   653
  ^ self painter enableChannel
109
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
   654
!
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
   655
118
bc196200ea8b enabled and style
ca
parents: 114
diff changeset
   656
menuAlignment
bc196200ea8b enabled and style
ca
parents: 114
diff changeset
   657
    |menu channel|
bc196200ea8b enabled and style
ca
parents: 114
diff changeset
   658
bc196200ea8b enabled and style
ca
parents: 114
diff changeset
   659
    channel := self enableChannel.
bc196200ea8b enabled and style
ca
parents: 114
diff changeset
   660
bc196200ea8b enabled and style
ca
parents: 114
diff changeset
   661
    menu := Menu new.
bc196200ea8b enabled and style
ca
parents: 114
diff changeset
   662
    menu fromLiteralArrayEncoding:(self class menuAlignment).
bc196200ea8b enabled and style
ca
parents: 114
diff changeset
   663
    menu receiver:self.
bc196200ea8b enabled and style
ca
parents: 114
diff changeset
   664
    menu menuItems do:[:anItem| anItem enabled:channel].
bc196200ea8b enabled and style
ca
parents: 114
diff changeset
   665
  ^ menu
bc196200ea8b enabled and style
ca
parents: 114
diff changeset
   666
!
bc196200ea8b enabled and style
ca
parents: 114
diff changeset
   667
bc196200ea8b enabled and style
ca
parents: 114
diff changeset
   668
menuPullDown
bc196200ea8b enabled and style
ca
parents: 114
diff changeset
   669
    |menu channel|
bc196200ea8b enabled and style
ca
parents: 114
diff changeset
   670
bc196200ea8b enabled and style
ca
parents: 114
diff changeset
   671
    channel := self enableChannel.
bc196200ea8b enabled and style
ca
parents: 114
diff changeset
   672
bc196200ea8b enabled and style
ca
parents: 114
diff changeset
   673
    menu := Menu new.
bc196200ea8b enabled and style
ca
parents: 114
diff changeset
   674
    menu fromLiteralArrayEncoding:(self class menuPullDown).
bc196200ea8b enabled and style
ca
parents: 114
diff changeset
   675
    menu receiver:self.
bc196200ea8b enabled and style
ca
parents: 114
diff changeset
   676
bc196200ea8b enabled and style
ca
parents: 114
diff changeset
   677
    menu menuItems do:[:anItem| 
bc196200ea8b enabled and style
ca
parents: 114
diff changeset
   678
        anItem nameKey ~~ #test ifTrue:[anItem enabled:channel]
133
e12f82d3afb7 popup box caused by a closeRequest with still open
ca
parents: 130
diff changeset
   679
                               ifFalse:[anItem value:channel].
118
bc196200ea8b enabled and style
ca
parents: 114
diff changeset
   680
    ].
bc196200ea8b enabled and style
ca
parents: 114
diff changeset
   681
  ^ menu
109
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
   682
!
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
   683
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
   684
modifiedChannel
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
   685
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
   686
    |holder|
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
   687
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
   688
    (holder := builder bindingAt:#modifiedChannel) isNil ifTrue:[
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
   689
        builder aspectAt:#modifiedChannel put:(holder :=  false asValue).
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
   690
    ].
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
   691
    ^ holder
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
   692
!
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
   693
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
   694
noteBookView
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
   695
    "automatically generated by UIPainter ..."
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
   696
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
   697
    |noteBook channel|
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
   698
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
   699
    (noteBook := builder bindingAt:#noteBookView) isNil ifTrue:[
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
   700
        noteBook   := View origin:0.0 @0.0 corner:1.0@1.0.
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
   701
        layoutTool := UIPropertyView for:#Dimension     in:noteBook.
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
   702
        specView   := UIPropertyView for:#Specification in:noteBook.
60
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
   703
109
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
   704
        channel := self modifiedChannel.
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
   705
        layoutTool modifiedHolder:channel.
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
   706
        specView   modifiedHolder:channel.
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
   707
        specView   viewBackground:(layoutTool viewBackground).
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
   708
        builder aspectAt:#noteBookView put:noteBook.
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
   709
    ].
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
   710
    ^ noteBook
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
   711
!
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
   712
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
   713
objectList
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
   714
    ^ objectList
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
   715
!
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
   716
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
   717
objectListMenu
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
   718
    "returns a block which returns the menu
114
93cd25c62a68 menu and handling
ca
parents: 109
diff changeset
   719
     !!hack!!
109
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
   720
    "
121
96d6feeeb049 middleButtonMen:
ca
parents: 118
diff changeset
   721
    ^ [ self painter showMiddleButtonMenu ].
109
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
   722
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
   723
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
   724
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
   725
!
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
   726
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
   727
tabList
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
   728
    "automatically generated by UIPainter ..."
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
   729
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
   730
    |holder|
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
   731
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
   732
    (holder := builder bindingAt:#tabList) isNil ifTrue:[
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
   733
        builder aspectAt:#tabList put:(holder :=  ValueHolder new).
137
ca
parents: 136
diff changeset
   734
        holder value:#( '  ' '  ' ).
109
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
   735
    ].
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
   736
    ^ holder
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
   737
!
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
   738
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
   739
tabModel
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
   740
    "automatically generated by UIPainter ..."
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
   741
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
   742
    |holder|
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
   743
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
   744
    (holder := builder bindingAt:#tabModel) isNil ifTrue:[
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
   745
        lastSlice := 'Basics'.
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
   746
        holder := AspectAdaptor new subject:self; forAspect:#tabSelection.
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
   747
        builder aspectAt:#tabModel put:holder.
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
   748
    ].
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
   749
    ^ holder
60
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
   750
! !
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
   751
109
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
   752
!UIPainter methodsFor:'binding access'!
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
   753
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
   754
aspectFor:aKey
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
   755
    "check wether aspect is assigned to a label icon
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
   756
    "
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
   757
    (aKey startsWith:'LABEL') ifFalse:[
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
   758
        ^ aspects at:aKey ifAbsent:[ super aspectFor:aKey ]
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
   759
    ].
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
   760
  ^ Image fromFile:(aKey copyFrom:(('LABEL' size) + 1))
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
   761
! !
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
   762
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
   763
!UIPainter methodsFor:'change & update'!
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
   764
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
   765
update:something with:aParameter from:someObject
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
   766
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
   767
    (someObject == objectList and:[something ~~ #list]) ifTrue:[
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
   768
        something ~~ #layout ifTrue:[
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
   769
            self objectListChanged
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
   770
        ] ifFalse:[
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
   771
            (self modifiedChannel value) ifFalse:[
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
   772
                layoutTool forView:currentView
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
   773
            ]
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
   774
        ]
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
   775
    ]
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
   776
! !
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
   777
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
   778
!UIPainter methodsFor:'event handling'!
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
   779
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
   780
doesNotUnderstand:aMessage
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
   781
   |painter|
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
   782
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
   783
   painter := self painter.
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
   784
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
   785
   (painter respondsTo:(aMessage selector)) ifTrue:[
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
   786
        ^ aMessage sendTo:painter
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
   787
   ].
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
   788
   self error
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
   789
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
   790
!
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
   791
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
   792
objectListChanged
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
   793
    "something changed in the painter view
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
   794
    "
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
   795
    |setSel slices list spec props|
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
   796
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
   797
    props := objectList selectedProperty.
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
   798
    tabSelection := nil.
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
   799
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
   800
    props isNil ifFalse:[
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
   801
        currentView := props view.
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
   802
        layoutTool forView:currentView.
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
   803
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
   804
        spec   := props spec copy.
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
   805
        slices := spec class slices.
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
   806
        list   := slices collect:[:slice| slice first asString ].
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
   807
        list add:'Dimension'.
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
   808
        (self tabList) value:list.
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
   809
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
   810
        (list findFirst:[:aName| aName = lastSlice]) ~~ 0 ifTrue:[
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
   811
            setSel := lastSlice
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
   812
        ]
121
96d6feeeb049 middleButtonMen:
ca
parents: 118
diff changeset
   813
    ] ifTrue:[
96d6feeeb049 middleButtonMen:
ca
parents: 118
diff changeset
   814
        layoutTool forView:nil
109
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
   815
    ].
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
   816
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
   817
    specView specEdited:spec.
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
   818
    self tabModel value:setSel.
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
   819
! !
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
   820
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
   821
!UIPainter methodsFor:'file access'!
60
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
   822
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
   823
openFile:aFileName
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
   824
    |aStream |
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
   825
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
   826
    aStream := FileStream readonlyFileNamed:aFileName.
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
   827
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
   828
    aStream notNil ifTrue:[
109
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
   829
        self painter fileInContentsFrom:aStream.
60
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
   830
        aStream close.
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
   831
        fileName := aFileName
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
   832
    ]
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
   833
109
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
   834
60
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
   835
!
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
   836
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
   837
saveAs:aFileName
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
   838
    |aStream|
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
   839
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
   840
    aStream := FileStream newFileNamed:aFileName.
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
   841
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
   842
    aStream notNil ifTrue:[
109
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
   843
        self painter storeContentsOn:aStream.
60
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
   844
        aStream close.
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
   845
        fileName := aFileName
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
   846
    ].
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
   847
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
   848
! !
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
   849
109
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
   850
!UIPainter methodsFor:'private'!
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
   851
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
   852
painter
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
   853
    ^ objectList painter
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
   854
! !
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
   855
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
   856
!UIPainter methodsFor:'selection'!
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
   857
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
   858
tabSelection
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
   859
    ^ tabSelection
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
   860
!
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
   861
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
   862
tabSelection:something
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
   863
    |specEdited slices spec idx|
60
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
   864
121
96d6feeeb049 middleButtonMen:
ca
parents: 118
diff changeset
   865
    something isNil ifTrue:[^ self].
96d6feeeb049 middleButtonMen:
ca
parents: 118
diff changeset
   866
96d6feeeb049 middleButtonMen:
ca
parents: 118
diff changeset
   867
    tabSelection := something.
96d6feeeb049 middleButtonMen:
ca
parents: 118
diff changeset
   868
96d6feeeb049 middleButtonMen:
ca
parents: 118
diff changeset
   869
    (specEdited := specView specEdited) notNil ifTrue:[
96d6feeeb049 middleButtonMen:
ca
parents: 118
diff changeset
   870
        slices    := specEdited class slices.
96d6feeeb049 middleButtonMen:
ca
parents: 118
diff changeset
   871
        lastSlice := tabSelection.
109
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
   872
121
96d6feeeb049 middleButtonMen:
ca
parents: 118
diff changeset
   873
        idx:= slices findFirst:[:aSlice| aSlice first = tabSelection ].
96d6feeeb049 middleButtonMen:
ca
parents: 118
diff changeset
   874
        idx == 0 ifTrue:[
96d6feeeb049 middleButtonMen:
ca
parents: 118
diff changeset
   875
            layoutTool forView:currentView.
96d6feeeb049 middleButtonMen:
ca
parents: 118
diff changeset
   876
          ^ layoutTool raise.
96d6feeeb049 middleButtonMen:
ca
parents: 118
diff changeset
   877
        ].
96d6feeeb049 middleButtonMen:
ca
parents: 118
diff changeset
   878
        spec := specEdited class perform:((slices at:idx) last).
60
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
   879
    ].
121
96d6feeeb049 middleButtonMen:
ca
parents: 118
diff changeset
   880
    specView raise.
96d6feeeb049 middleButtonMen:
ca
parents: 118
diff changeset
   881
109
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
   882
    specEdited isNil ifTrue:[
121
96d6feeeb049 middleButtonMen:
ca
parents: 118
diff changeset
   883
        specView buildFromSpec:nil
109
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
   884
    ] ifFalse:[
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
   885
        specView buildFromSpec:spec
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
   886
    ]
60
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
   887
! !
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
   888
109
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
   889
!UIPainter methodsFor:'startup / release'!
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
   890
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
   891
closeRequest
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
   892
    "close all windows open by builder
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
   893
    "
133
e12f82d3afb7 popup box caused by a closeRequest with still open
ca
parents: 130
diff changeset
   894
    |anyUnsavedChanges|
e12f82d3afb7 popup box caused by a closeRequest with still open
ca
parents: 130
diff changeset
   895
e12f82d3afb7 popup box caused by a closeRequest with still open
ca
parents: 130
diff changeset
   896
    objectList painter isModified ifTrue:[
e12f82d3afb7 popup box caused by a closeRequest with still open
ca
parents: 130
diff changeset
   897
        (self confirm:'quit without saving ?') ifFalse:[
e12f82d3afb7 popup box caused by a closeRequest with still open
ca
parents: 130
diff changeset
   898
            ^ self
e12f82d3afb7 popup box caused by a closeRequest with still open
ca
parents: 130
diff changeset
   899
        ]
e12f82d3afb7 popup box caused by a closeRequest with still open
ca
parents: 130
diff changeset
   900
    ].
e12f82d3afb7 popup box caused by a closeRequest with still open
ca
parents: 130
diff changeset
   901
109
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
   902
    objectList removeDependent:self.
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
   903
    objectList painter release.
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
   904
    objectList := nil.
60
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
   905
109
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
   906
    selectionPanel notNil ifTrue:[
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
   907
        selectionPanel closeRequest
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
   908
    ].
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
   909
    super closeRequest.
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
   910
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
   911
!
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
   912
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
   913
closeRequestFor:aTopView
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
   914
    "handle a close request for a specific view
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
   915
    "
60
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
   916
    |topView|
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
   917
109
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
   918
    topView := self window.
60
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
   919
109
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
   920
    topView == aTopView ifTrue:[
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
   921
        super closeRequestFor:aTopView
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
   922
    ] ifFalse:[
133
e12f82d3afb7 popup box caused by a closeRequest with still open
ca
parents: 130
diff changeset
   923
        topView raise.
e12f82d3afb7 popup box caused by a closeRequest with still open
ca
parents: 130
diff changeset
   924
        topView device beep
109
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
   925
    ].
60
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
   926
!
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
   927
109
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
   928
openInterface
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
   929
    "open interfaces
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
   930
    "
136
42a2a4494281 remove postOpen
ca
parents: 133
diff changeset
   931
    |painterView painter cls topView|
60
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
   932
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
   933
    aspects := IdentityDictionary new.
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
   934
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
   935
    aspects at:#classNameChannel put:(
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
   936
        (specClass notNil ifTrue:[specClass]
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
   937
                         ifFalse:['NewApplication']) asValue
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
   938
    ).
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
   939
    specSuperclass isNil ifTrue:[
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
   940
        specClass notNil ifTrue:[
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
   941
            (cls := Smalltalk at:specClass asSymbol) notNil ifTrue:[
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
   942
                specSuperclass := cls superclass name.
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
   943
            ]
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
   944
        ]
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
   945
    ].
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
   946
    aspects at:#superclassNameChannel put:(
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
   947
        (specSuperclass notNil ifTrue:[specSuperclass]
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
   948
                         ifFalse:['ApplicationModel']) asValue
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
   949
    ).
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
   950
    aspects at:#methodNameChannel put:(
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
   951
        (specSelector notNil ifTrue:[specSelector]
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
   952
                            ifFalse:[#windowSpec]) asValue
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
   953
    ).
136
42a2a4494281 remove postOpen
ca
parents: 133
diff changeset
   954
42a2a4494281 remove postOpen
ca
parents: 133
diff changeset
   955
    painterView := StandardSystemView new.
42a2a4494281 remove postOpen
ca
parents: 133
diff changeset
   956
    painterView label:'unnamed canvas'.
42a2a4494281 remove postOpen
ca
parents: 133
diff changeset
   957
    painterView extent:300@300.
42a2a4494281 remove postOpen
ca
parents: 133
diff changeset
   958
42a2a4494281 remove postOpen
ca
parents: 133
diff changeset
   959
    painter := UIPainterView in:painterView.
109
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
   960
    painter layout:(0.0 @ 0.0 corner:1.0 @ 1.0) asLayout.
136
42a2a4494281 remove postOpen
ca
parents: 133
diff changeset
   961
109
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
   962
    objectList := painter listHolder.
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
   963
    objectList addDependent:self.
136
42a2a4494281 remove postOpen
ca
parents: 133
diff changeset
   964
109
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
   965
    super openInterface.
60
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
   966
136
42a2a4494281 remove postOpen
ca
parents: 133
diff changeset
   967
    topView := self window.
42a2a4494281 remove postOpen
ca
parents: 133
diff changeset
   968
    topView bePartner.
42a2a4494281 remove postOpen
ca
parents: 133
diff changeset
   969
    topView label:'Interface Builder'.
42a2a4494281 remove postOpen
ca
parents: 133
diff changeset
   970
    topView icon:(Image fromFile:'bitmaps/Builder.xbm' resolution:100).
42a2a4494281 remove postOpen
ca
parents: 133
diff changeset
   971
42a2a4494281 remove postOpen
ca
parents: 133
diff changeset
   972
    painterView openInGroup:(topView windowGroup).
42a2a4494281 remove postOpen
ca
parents: 133
diff changeset
   973
    painterView bePartner.
42a2a4494281 remove postOpen
ca
parents: 133
diff changeset
   974
    painterView application:self.
42a2a4494281 remove postOpen
ca
parents: 133
diff changeset
   975
    painterView open.
42a2a4494281 remove postOpen
ca
parents: 133
diff changeset
   976
42a2a4494281 remove postOpen
ca
parents: 133
diff changeset
   977
    painterView application:self.
42a2a4494281 remove postOpen
ca
parents: 133
diff changeset
   978
    selectionPanel := UISelectionPanel newDefault.
42a2a4494281 remove postOpen
ca
parents: 133
diff changeset
   979
    selectionPanel allButOpenInterface:#windowSpec.
42a2a4494281 remove postOpen
ca
parents: 133
diff changeset
   980
    selectionPanel window openInGroup:(topView windowGroup).
42a2a4494281 remove postOpen
ca
parents: 133
diff changeset
   981
    selectionPanel window bePartner.
42a2a4494281 remove postOpen
ca
parents: 133
diff changeset
   982
    selectionPanel openWindow.
42a2a4494281 remove postOpen
ca
parents: 133
diff changeset
   983
    selectionPanel window application:self.
42a2a4494281 remove postOpen
ca
parents: 133
diff changeset
   984
60
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
   985
!
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
   986
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
   987
openNewWindowCanvas
109
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
   988
    "open new
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
   989
    "
60
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
   990
    self open.
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
   991
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
   992
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
   993
!
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
   994
109
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
   995
openOnClass:aClass
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
   996
    "open up an interface builder
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
   997
    "
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
   998
    self openOnClass:aClass andSelector:#windowSpec
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
   999
!
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
  1000
60
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
  1001
openOnClass:aClass andSelector:aSelector
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
  1002
    "open up an interface builder, fetching a spec from someClass
109
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
  1003
     via some selector
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
  1004
    "
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
  1005
    |painter|
60
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
  1006
109
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
  1007
    self openInterface.
60
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
  1008
109
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
  1009
    painter        := self painter.
60
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
  1010
    specClass      := aClass name.
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
  1011
    specSuperclass := aClass superclass name.
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
  1012
    specSelector   := aSelector.
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
  1013
109
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
  1014
    painter className:aClass name.
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
  1015
    painter methodName:aSelector.
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
  1016
    painter setupFromSpec:(aClass perform:aSelector).
60
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
  1017
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
  1018
! !
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
  1019
109
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
  1020
!UIPainter methodsFor:'user interaction - dialog'!
60
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
  1021
133
e12f82d3afb7 popup box caused by a closeRequest with still open
ca
parents: 130
diff changeset
  1022
browseAppClass
e12f82d3afb7 popup box caused by a closeRequest with still open
ca
parents: 130
diff changeset
  1023
    "open a browser on the class"
e12f82d3afb7 popup box caused by a closeRequest with still open
ca
parents: 130
diff changeset
  1024
e12f82d3afb7 popup box caused by a closeRequest with still open
ca
parents: 130
diff changeset
  1025
    |cls|
e12f82d3afb7 popup box caused by a closeRequest with still open
ca
parents: 130
diff changeset
  1026
e12f82d3afb7 popup box caused by a closeRequest with still open
ca
parents: 130
diff changeset
  1027
    specClass isNil ifTrue:[
e12f82d3afb7 popup box caused by a closeRequest with still open
ca
parents: 130
diff changeset
  1028
        self information:'no class yet'.
e12f82d3afb7 popup box caused by a closeRequest with still open
ca
parents: 130
diff changeset
  1029
        ^ self
e12f82d3afb7 popup box caused by a closeRequest with still open
ca
parents: 130
diff changeset
  1030
    ].
e12f82d3afb7 popup box caused by a closeRequest with still open
ca
parents: 130
diff changeset
  1031
e12f82d3afb7 popup box caused by a closeRequest with still open
ca
parents: 130
diff changeset
  1032
    specClass isBehavior ifFalse:[
e12f82d3afb7 popup box caused by a closeRequest with still open
ca
parents: 130
diff changeset
  1033
        cls := Smalltalk at:specClass asSymbol
e12f82d3afb7 popup box caused by a closeRequest with still open
ca
parents: 130
diff changeset
  1034
    ] ifTrue:[
e12f82d3afb7 popup box caused by a closeRequest with still open
ca
parents: 130
diff changeset
  1035
        cls := specClass
e12f82d3afb7 popup box caused by a closeRequest with still open
ca
parents: 130
diff changeset
  1036
    ].
e12f82d3afb7 popup box caused by a closeRequest with still open
ca
parents: 130
diff changeset
  1037
e12f82d3afb7 popup box caused by a closeRequest with still open
ca
parents: 130
diff changeset
  1038
    cls isNil ifTrue:[
e12f82d3afb7 popup box caused by a closeRequest with still open
ca
parents: 130
diff changeset
  1039
        self information:'no class yet'.
e12f82d3afb7 popup box caused by a closeRequest with still open
ca
parents: 130
diff changeset
  1040
        ^ self
e12f82d3afb7 popup box caused by a closeRequest with still open
ca
parents: 130
diff changeset
  1041
    ].
e12f82d3afb7 popup box caused by a closeRequest with still open
ca
parents: 130
diff changeset
  1042
e12f82d3afb7 popup box caused by a closeRequest with still open
ca
parents: 130
diff changeset
  1043
    SystemBrowser openInClass:cls
e12f82d3afb7 popup box caused by a closeRequest with still open
ca
parents: 130
diff changeset
  1044
e12f82d3afb7 popup box caused by a closeRequest with still open
ca
parents: 130
diff changeset
  1045
e12f82d3afb7 popup box caused by a closeRequest with still open
ca
parents: 130
diff changeset
  1046
!
e12f82d3afb7 popup box caused by a closeRequest with still open
ca
parents: 130
diff changeset
  1047
60
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
  1048
checkClassAndSelector
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
  1049
    "check for class & superclass"
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
  1050
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
  1051
    |superclass cls|
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
  1052
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
  1053
    specClass isNil ifTrue:[^ false].
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
  1054
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
  1055
    specClass isBehavior ifFalse:[
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
  1056
        cls := Smalltalk at:specClass asSymbol
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
  1057
    ] ifTrue:[
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
  1058
        cls := specClass
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
  1059
    ].
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
  1060
    cls isNil ifTrue:[
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
  1061
        (superclass := Smalltalk at:specSuperclass asSymbol) isNil ifTrue:[
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
  1062
            self warn:'no class named ' , specSuperclass , ' exists.'.
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
  1063
            ^ false.
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
  1064
        ].
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
  1065
        (self confirm:'create ' , specClass , ' ?') ifTrue:[
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
  1066
            superclass subclass:(specClass asSymbol)
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
  1067
                       instanceVariableNames:''
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
  1068
                       classVariableNames:''
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
  1069
                       poolDictionaries:''
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
  1070
                       category:'New-Applications'.
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
  1071
            ^ true.
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
  1072
        ].
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
  1073
        ^ false.
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
  1074
    ].
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
  1075
    cls isBehavior ifFalse:[
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
  1076
        self warn:'a global named ' , specClass , ' exists, but is no class.'.
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
  1077
        ^ false.
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
  1078
    ].
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
  1079
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
  1080
    specSuperclass isBehavior ifFalse:[
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
  1081
        superclass := Smalltalk at:specSuperclass asSymbol
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
  1082
    ] ifTrue:[
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
  1083
        superclass := specSuperclass
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
  1084
    ].
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
  1085
    specSuperclass notNil ifTrue:[
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
  1086
        superclass isNil ifTrue:[
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
  1087
            self warn:'no class named ' , specSuperclass , ' exists.'.
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
  1088
            ^ false.
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
  1089
        ].
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
  1090
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
  1091
        (cls isSubclassOf:superclass) ifFalse:[
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
  1092
            self warn:'a global named ' , specClass , ' exists, but is not a subclass of ' , superclass name , '.'.
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
  1093
            ^ false.
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
  1094
        ]
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
  1095
    ].
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
  1096
    ^ true
109
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
  1097
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
  1098
60
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
  1099
!
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
  1100
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
  1101
defineClassAndSelector
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
  1102
    "launch a dialog to define class, superclass and method"
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
  1103
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
  1104
    |again|
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
  1105
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
  1106
    [
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
  1107
        again := false.
109
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
  1108
60
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
  1109
        (self openDialogInterface:#nameAndSelectorSpec) ifTrue:[
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
  1110
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
  1111
            specClass := (self aspectFor:#classNameChannel) value.
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
  1112
            specSelector := (self aspectFor:#methodNameChannel) value.
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
  1113
            specSuperclass := (self aspectFor:#superclassNameChannel) value.
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
  1114
109
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
  1115
            (again := self checkClassAndSelector not) ifFalse:[
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
  1116
                self painter className:specClass
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
  1117
                        superclassName:specSuperclass
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
  1118
                              selector:specSelector.
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
  1119
            ]
60
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
  1120
        ]
109
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
  1121
60
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
  1122
    ] doWhile:[again]
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
  1123
109
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
  1124
60
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
  1125
! !
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
  1126
109
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
  1127
!UIPainter methodsFor:'user interaction - pullDown'!
60
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
  1128
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
  1129
doFromClass
109
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
  1130
        |className methodName cls sel accepted failed spec s painter|
60
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
  1131
109
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
  1132
        className  := '' asValue.
60
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
  1133
        methodName := '' asValue.
109
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
  1134
        painter    := self painter.
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
  1135
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
  1136
        (s := painter className) notNil ifTrue:[
60
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
  1137
            className value:s
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
  1138
        ].
109
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
  1139
        (s := painter methodName) notNil ifTrue:[
60
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
  1140
            methodName value:s
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
  1141
        ].
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
  1142
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
  1143
        failed := false.
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
  1144
        [
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
  1145
            accepted :=
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
  1146
                (DialogBox new
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
  1147
                    addTextLabel:'Classes name:';
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
  1148
                    addInputFieldOn:className; 
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
  1149
                    addVerticalSpace;
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
  1150
                    addTextLabel:'methods name:';
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
  1151
                    addInputFieldOn:methodName; 
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
  1152
                    addAbortButton; 
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
  1153
                    addOkButton; 
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
  1154
                    open
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
  1155
                ) accepted.
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
  1156
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
  1157
             accepted ifTrue:[
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
  1158
                cls := Smalltalk classNamed:className value.
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
  1159
                cls isNil ifTrue:[
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
  1160
                    failed := true.
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
  1161
                    self warn:'no such class'.
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
  1162
                ] ifFalse:[
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
  1163
                    sel := methodName value asSymbol.
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
  1164
                    (cls respondsTo:sel ) ifFalse:[
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
  1165
                        failed := true.
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
  1166
                        self warn:'no such method'
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
  1167
                    ] ifTrue:[
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
  1168
                        spec := cls perform:sel.
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
  1169
                        spec isArray ifFalse:[
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
  1170
                            failed := true.
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
  1171
                            self warn:'not a windowSpec method'    
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
  1172
                        ].
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
  1173
                        "/ ok, got it
109
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
  1174
                        painter className:className value.
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
  1175
                        painter methodName:methodName value.
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
  1176
                        painter setupFromSpec:spec.
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
  1177
                      ^ self
60
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
  1178
                     ]
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
  1179
                ]
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
  1180
             ]
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
  1181
        ] doWhile:[accepted and:[failed]].
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
  1182
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
  1183
!
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
  1184
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
  1185
doInstallAspects
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
  1186
    |code|
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
  1187
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
  1188
    (specClass isNil or:[specSelector isNil]) ifTrue:[
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
  1189
        self defineClassAndSelector
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
  1190
    ].
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
  1191
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
  1192
    self checkClassAndSelector ifFalse:[
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
  1193
        ^ self
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
  1194
    ].
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
  1195
109
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
  1196
    self painter className:specClass
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
  1197
        superclassName:specSuperclass
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
  1198
              selector:specSelector.
60
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
  1199
109
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
  1200
    code := self painter generateAspectMethods.
60
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
  1201
    (ReadStream on:code) fileIn.
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
  1202
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
  1203
!
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
  1204
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
  1205
doInstallSpec
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
  1206
    |code|
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
  1207
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
  1208
    (specClass isNil or:[specSelector isNil]) ifTrue:[
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
  1209
        self defineClassAndSelector
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
  1210
    ].
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
  1211
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
  1212
    self checkClassAndSelector ifFalse:[
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
  1213
        ^ self
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
  1214
    ].
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
  1215
109
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
  1216
    self painter className:specClass
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
  1217
            superclassName:specSuperclass
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
  1218
                  selector:specSelector.
60
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
  1219
109
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
  1220
    code := self painter generateCode.
60
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
  1221
    (ReadStream on:code) fileIn.
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
  1222
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
  1223
!
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
  1224
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
  1225
doOpen
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
  1226
    |box|
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
  1227
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
  1228
    box := FileSelectionBox new.
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
  1229
    box title:(resources string:'Which file ?').
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
  1230
    box selectingDirectory:false.
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
  1231
    box pattern:'*.*'.
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
  1232
    box action:[:aFile| self openFile:aFile ].
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
  1233
    box open
109
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
  1234
60
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
  1235
!
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
  1236
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
  1237
doPickAView
109
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
  1238
    |painter view className methodName cls sel accepted spec s|
60
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
  1239
109
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
  1240
    (view := Display viewFromUser) notNil ifTrue:[
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
  1241
        painter := self painter.
60
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
  1242
109
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
  1243
        spec := UISpecification fromView:view topView.
60
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
  1244
109
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
  1245
     "/ ok, got it
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
  1246
        painter setupFromSpec:spec.
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
  1247
        painter className:view class name.
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
  1248
        painter methodName:#newSpec.
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
  1249
    ]
60
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
  1250
!
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
  1251
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
  1252
doRaise
109
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
  1253
    self painter topView raise.
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
  1254
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
  1255
    selectionPanel notNil ifTrue:[
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
  1256
        selectionPanel window raise
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
  1257
    ]
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
  1258
60
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
  1259
!
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
  1260
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
  1261
doSave
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
  1262
    fileName notNil ifTrue:[
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
  1263
        self saveAs:fileName
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
  1264
    ] ifFalse:[
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
  1265
        self doSaveAs
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
  1266
    ]
109
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
  1267
60
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
  1268
!
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
  1269
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
  1270
doSaveAs
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
  1271
    |box|
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
  1272
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
  1273
    box := FileSelectionBox new.
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
  1274
    box title:(resources string:'Which file ?').
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
  1275
    box selectingDirectory:false.
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
  1276
    box pattern:'*.*'.
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
  1277
    box action:[:aFile| self saveAs:aFile ].
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
  1278
    box open
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
  1279
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
  1280
!
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
  1281
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
  1282
doWindowSpec
68
889c3877baf0 layout ....
ca
parents: 65
diff changeset
  1283
   |code code2 v|
60
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
  1284
109
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
  1285
   code := self painter generateWindowSpecMethodSource.
68
889c3877baf0 layout ....
ca
parents: 65
diff changeset
  1286
60
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
  1287
   v := CodeView open.
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
  1288
   v contents:code.
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
  1289
   v label:'windowSpec'.
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
  1290
81
7493e2437af5 checkin from browser
ca
parents: 77
diff changeset
  1291
! !
7493e2437af5 checkin from browser
ca
parents: 77
diff changeset
  1292
60
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
  1293
!UIPainter class methodsFor:'documentation'!
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
  1294
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
  1295
version
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
  1296
    ^ '$Header$'
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
  1297
! !