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