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