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