UIPainter.st
author Claus Gittinger <cg@exept.de>
Tue, 01 Jul 1997 19:20:12 +0200
changeset 195 350f95af5d9d
parent 194 2b05bd327785
child 197 646d24a7ad36
permissions -rw-r--r--
check before sending selector to class (allows opening painter on non-existing spec methods)
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:]
183
bb0cc63e2cf1 set masterApllication instead of application
ca
parents: 179
diff changeset
    53
        Claus Gittinger
156
b332d7117c40 added copyrights
Claus Gittinger <cg@exept.de>
parents: 155
diff changeset
    54
        Claus Atzkern
b332d7117c40 added copyrights
Claus Gittinger <cg@exept.de>
parents: 155
diff changeset
    55
127
95070ea7ae42 update layout from view
ca
parents: 124
diff changeset
    56
    [see also:]
95070ea7ae42 update layout from view
ca
parents: 124
diff changeset
    57
        UIBuilder
95070ea7ae42 update layout from view
ca
parents: 124
diff changeset
    58
        ApplicationModel
95070ea7ae42 update layout from view
ca
parents: 124
diff changeset
    59
        UISpecification
60
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
    60
"
109
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
    61
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
    62
! !
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
    63
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
    64
!UIPainter class methodsFor:'instance creation'!
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
    65
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
    66
listHolder:aListHolder
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
    67
    |application|
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
    68
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
    69
    application := self new.
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
    70
    application objectList:aListHolder.
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
    71
  ^ application open
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
    72
!
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
    73
195
350f95af5d9d check before sending selector to class
Claus Gittinger <cg@exept.de>
parents: 194
diff changeset
    74
openOnClass:aClass andSelector:aSelector
350f95af5d9d check before sending selector to class
Claus Gittinger <cg@exept.de>
parents: 194
diff changeset
    75
    ^ self new openOnClass:aClass andSelector:aSelector
350f95af5d9d check before sending selector to class
Claus Gittinger <cg@exept.de>
parents: 194
diff changeset
    76
350f95af5d9d check before sending selector to class
Claus Gittinger <cg@exept.de>
parents: 194
diff changeset
    77
    "Created: 1.7.1997 / 19:16:59 / cg"
350f95af5d9d check before sending selector to class
Claus Gittinger <cg@exept.de>
parents: 194
diff changeset
    78
!
350f95af5d9d check before sending selector to class
Claus Gittinger <cg@exept.de>
parents: 194
diff changeset
    79
109
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
    80
painter:aBuilderView
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
    81
    |application|
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
    82
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
    83
    application := self new.
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
    84
    application painter:aBuilderView.
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
    85
  ^ application open
60
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
    86
! !
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
    87
87
cc6d70449622 add ST-80 queries
ca
parents: 81
diff changeset
    88
!UIPainter class methodsFor:'ST-80 queries'!
cc6d70449622 add ST-80 queries
ca
parents: 81
diff changeset
    89
cc6d70449622 add ST-80 queries
ca
parents: 81
diff changeset
    90
preferenceFor:aSymbol
cc6d70449622 add ST-80 queries
ca
parents: 81
diff changeset
    91
    ^ false
109
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
    92
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
    93
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
    94
! !
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
    95
193
450d9e5c6f4a checkin from browser
ca
parents: 187
diff changeset
    96
!UIPainter class methodsFor:'help specs'!
450d9e5c6f4a checkin from browser
ca
parents: 187
diff changeset
    97
450d9e5c6f4a checkin from browser
ca
parents: 187
diff changeset
    98
helpSpec
450d9e5c6f4a checkin from browser
ca
parents: 187
diff changeset
    99
    "return a dictionary filled with helpKey -> helptext associations.
450d9e5c6f4a checkin from browser
ca
parents: 187
diff changeset
   100
     These are used by the activeHelp tool.
450d9e5c6f4a checkin from browser
ca
parents: 187
diff changeset
   101
    "
450d9e5c6f4a checkin from browser
ca
parents: 187
diff changeset
   102
  ^ super helpSpec addPairsFrom:#(
450d9e5c6f4a checkin from browser
ca
parents: 187
diff changeset
   103
450d9e5c6f4a checkin from browser
ca
parents: 187
diff changeset
   104
#alignSelectionCenterVer
450d9e5c6f4a checkin from browser
ca
parents: 187
diff changeset
   105
'align selection vertical'
450d9e5c6f4a checkin from browser
ca
parents: 187
diff changeset
   106
450d9e5c6f4a checkin from browser
ca
parents: 187
diff changeset
   107
#alignSelectionLeft
450d9e5c6f4a checkin from browser
ca
parents: 187
diff changeset
   108
'align selected components to the left edge of the
450d9e5c6f4a checkin from browser
ca
parents: 187
diff changeset
   109
dominant component ( underlined )'
450d9e5c6f4a checkin from browser
ca
parents: 187
diff changeset
   110
450d9e5c6f4a checkin from browser
ca
parents: 187
diff changeset
   111
#alignSelectionRight
450d9e5c6f4a checkin from browser
ca
parents: 187
diff changeset
   112
'align selected components to the right edge of the
450d9e5c6f4a checkin from browser
ca
parents: 187
diff changeset
   113
dominant component ( underlined )'
450d9e5c6f4a checkin from browser
ca
parents: 187
diff changeset
   114
450d9e5c6f4a checkin from browser
ca
parents: 187
diff changeset
   115
#alignSelectionLeftAndRight
450d9e5c6f4a checkin from browser
ca
parents: 187
diff changeset
   116
'align selected components to the right and left edge
450d9e5c6f4a checkin from browser
ca
parents: 187
diff changeset
   117
of the dominant component ( underlined )'
450d9e5c6f4a checkin from browser
ca
parents: 187
diff changeset
   118
450d9e5c6f4a checkin from browser
ca
parents: 187
diff changeset
   119
#alignSelectionTop
450d9e5c6f4a checkin from browser
ca
parents: 187
diff changeset
   120
'align selected components to the top edge of the
450d9e5c6f4a checkin from browser
ca
parents: 187
diff changeset
   121
dominant component ( underlined )'
450d9e5c6f4a checkin from browser
ca
parents: 187
diff changeset
   122
450d9e5c6f4a checkin from browser
ca
parents: 187
diff changeset
   123
#alignSelectionBottom
450d9e5c6f4a checkin from browser
ca
parents: 187
diff changeset
   124
'align selected components to the bottom edge of the
450d9e5c6f4a checkin from browser
ca
parents: 187
diff changeset
   125
dominant component ( underlined )'
450d9e5c6f4a checkin from browser
ca
parents: 187
diff changeset
   126
450d9e5c6f4a checkin from browser
ca
parents: 187
diff changeset
   127
#alignSelectionTopAndBottom
450d9e5c6f4a checkin from browser
ca
parents: 187
diff changeset
   128
'align selected components to the top and bottom edge
450d9e5c6f4a checkin from browser
ca
parents: 187
diff changeset
   129
of the dominant component ( underlined )'
450d9e5c6f4a checkin from browser
ca
parents: 187
diff changeset
   130
450d9e5c6f4a checkin from browser
ca
parents: 187
diff changeset
   131
#alignSelectionCenterVer
450d9e5c6f4a checkin from browser
ca
parents: 187
diff changeset
   132
'align selected components horizontal to the center of
450d9e5c6f4a checkin from browser
ca
parents: 187
diff changeset
   133
the dominant component ( underlined )'
450d9e5c6f4a checkin from browser
ca
parents: 187
diff changeset
   134
450d9e5c6f4a checkin from browser
ca
parents: 187
diff changeset
   135
#alignSelectionCenterHor
450d9e5c6f4a checkin from browser
ca
parents: 187
diff changeset
   136
'align selected components vertical to the center of
450d9e5c6f4a checkin from browser
ca
parents: 187
diff changeset
   137
the dominant component ( underlined )'
450d9e5c6f4a checkin from browser
ca
parents: 187
diff changeset
   138
194
2b05bd327785 recompute property list when changing view ordering by
ca
parents: 193
diff changeset
   139
#spreadSelectionVer
2b05bd327785 recompute property list when changing view ordering by
ca
parents: 193
diff changeset
   140
'vertical spacing between selected components is made the same'
2b05bd327785 recompute property list when changing view ordering by
ca
parents: 193
diff changeset
   141
2b05bd327785 recompute property list when changing view ordering by
ca
parents: 193
diff changeset
   142
#spreadSelectionHor
2b05bd327785 recompute property list when changing view ordering by
ca
parents: 193
diff changeset
   143
'horizontal spacing between selected components is made the same'
2b05bd327785 recompute property list when changing view ordering by
ca
parents: 193
diff changeset
   144
2b05bd327785 recompute property list when changing view ordering by
ca
parents: 193
diff changeset
   145
#centerSelectionHor
2b05bd327785 recompute property list when changing view ordering by
ca
parents: 193
diff changeset
   146
'center components horizontal in contained view'
2b05bd327785 recompute property list when changing view ordering by
ca
parents: 193
diff changeset
   147
2b05bd327785 recompute property list when changing view ordering by
ca
parents: 193
diff changeset
   148
#centerSelectionVer
2b05bd327785 recompute property list when changing view ordering by
ca
parents: 193
diff changeset
   149
'center vertical horizontal in contained view'
2b05bd327785 recompute property list when changing view ordering by
ca
parents: 193
diff changeset
   150
2b05bd327785 recompute property list when changing view ordering by
ca
parents: 193
diff changeset
   151
#setToDefaultExtent
2b05bd327785 recompute property list when changing view ordering by
ca
parents: 193
diff changeset
   152
'set selected components to their default extent'
2b05bd327785 recompute property list when changing view ordering by
ca
parents: 193
diff changeset
   153
2b05bd327785 recompute property list when changing view ordering by
ca
parents: 193
diff changeset
   154
#setToDefaultWidth
2b05bd327785 recompute property list when changing view ordering by
ca
parents: 193
diff changeset
   155
'set selected components to their default width'
2b05bd327785 recompute property list when changing view ordering by
ca
parents: 193
diff changeset
   156
2b05bd327785 recompute property list when changing view ordering by
ca
parents: 193
diff changeset
   157
#setToDefaultHeight
2b05bd327785 recompute property list when changing view ordering by
ca
parents: 193
diff changeset
   158
'set selected components to their default height'
2b05bd327785 recompute property list when changing view ordering by
ca
parents: 193
diff changeset
   159
2b05bd327785 recompute property list when changing view ordering by
ca
parents: 193
diff changeset
   160
#copyExtent
2b05bd327785 recompute property list when changing view ordering by
ca
parents: 193
diff changeset
   161
'copy extent of the selected component'
2b05bd327785 recompute property list when changing view ordering by
ca
parents: 193
diff changeset
   162
2b05bd327785 recompute property list when changing view ordering by
ca
parents: 193
diff changeset
   163
#pasteExtent
2b05bd327785 recompute property list when changing view ordering by
ca
parents: 193
diff changeset
   164
'change extent of all selected components to the
2b05bd327785 recompute property list when changing view ordering by
ca
parents: 193
diff changeset
   165
last copied extent'
2b05bd327785 recompute property list when changing view ordering by
ca
parents: 193
diff changeset
   166
2b05bd327785 recompute property list when changing view ordering by
ca
parents: 193
diff changeset
   167
#pasteWidth
2b05bd327785 recompute property list when changing view ordering by
ca
parents: 193
diff changeset
   168
'change width of all selected components to the
2b05bd327785 recompute property list when changing view ordering by
ca
parents: 193
diff changeset
   169
last copied extent width'
2b05bd327785 recompute property list when changing view ordering by
ca
parents: 193
diff changeset
   170
2b05bd327785 recompute property list when changing view ordering by
ca
parents: 193
diff changeset
   171
#pasteHeight
2b05bd327785 recompute property list when changing view ordering by
ca
parents: 193
diff changeset
   172
'change height of all selected components to the
2b05bd327785 recompute property list when changing view ordering by
ca
parents: 193
diff changeset
   173
last copied extent height'
2b05bd327785 recompute property list when changing view ordering by
ca
parents: 193
diff changeset
   174
2b05bd327785 recompute property list when changing view ordering by
ca
parents: 193
diff changeset
   175
#copyLayout
2b05bd327785 recompute property list when changing view ordering by
ca
parents: 193
diff changeset
   176
'copy layout of the selected component'
2b05bd327785 recompute property list when changing view ordering by
ca
parents: 193
diff changeset
   177
2b05bd327785 recompute property list when changing view ordering by
ca
parents: 193
diff changeset
   178
#pasteLayout
2b05bd327785 recompute property list when changing view ordering by
ca
parents: 193
diff changeset
   179
'change layout of all selected components to the
2b05bd327785 recompute property list when changing view ordering by
ca
parents: 193
diff changeset
   180
last copied layout'
2b05bd327785 recompute property list when changing view ordering by
ca
parents: 193
diff changeset
   181
2b05bd327785 recompute property list when changing view ordering by
ca
parents: 193
diff changeset
   182
#pasteBuffer
2b05bd327785 recompute property list when changing view ordering by
ca
parents: 193
diff changeset
   183
'paste components at current mouse position'
2b05bd327785 recompute property list when changing view ordering by
ca
parents: 193
diff changeset
   184
2b05bd327785 recompute property list when changing view ordering by
ca
parents: 193
diff changeset
   185
#pasteWithLayout
2b05bd327785 recompute property list when changing view ordering by
ca
parents: 193
diff changeset
   186
'paste components without changing their layouts'
2b05bd327785 recompute property list when changing view ordering by
ca
parents: 193
diff changeset
   187
193
450d9e5c6f4a checkin from browser
ca
parents: 187
diff changeset
   188
)
450d9e5c6f4a checkin from browser
ca
parents: 187
diff changeset
   189
450d9e5c6f4a checkin from browser
ca
parents: 187
diff changeset
   190
450d9e5c6f4a checkin from browser
ca
parents: 187
diff changeset
   191
450d9e5c6f4a checkin from browser
ca
parents: 187
diff changeset
   192
450d9e5c6f4a checkin from browser
ca
parents: 187
diff changeset
   193
! !
450d9e5c6f4a checkin from browser
ca
parents: 187
diff changeset
   194
118
bc196200ea8b enabled and style
ca
parents: 114
diff changeset
   195
!UIPainter class methodsFor:'icons'!
bc196200ea8b enabled and style
ca
parents: 114
diff changeset
   196
bc196200ea8b enabled and style
ca
parents: 114
diff changeset
   197
iconAlignB
bc196200ea8b enabled and style
ca
parents: 114
diff changeset
   198
    ^ Image fromFile:'b_alignB.xbm'
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
bc196200ea8b enabled and style
ca
parents: 114
diff changeset
   202
iconAlignCenterH
bc196200ea8b enabled and style
ca
parents: 114
diff changeset
   203
    ^ Image fromFile:'b_alignCH.xbm'
bc196200ea8b enabled and style
ca
parents: 114
diff changeset
   204
bc196200ea8b enabled and style
ca
parents: 114
diff changeset
   205
!
bc196200ea8b enabled and style
ca
parents: 114
diff changeset
   206
bc196200ea8b enabled and style
ca
parents: 114
diff changeset
   207
iconAlignCenterV
bc196200ea8b enabled and style
ca
parents: 114
diff changeset
   208
    ^ Image fromFile:'b_alignCV.xbm'
bc196200ea8b enabled and style
ca
parents: 114
diff changeset
   209
bc196200ea8b enabled and style
ca
parents: 114
diff changeset
   210
!
bc196200ea8b enabled and style
ca
parents: 114
diff changeset
   211
bc196200ea8b enabled and style
ca
parents: 114
diff changeset
   212
iconAlignL
bc196200ea8b enabled and style
ca
parents: 114
diff changeset
   213
    ^ Image fromFile:'b_alignL.xbm'
bc196200ea8b enabled and style
ca
parents: 114
diff changeset
   214
!
bc196200ea8b enabled and style
ca
parents: 114
diff changeset
   215
bc196200ea8b enabled and style
ca
parents: 114
diff changeset
   216
iconAlignLR
bc196200ea8b enabled and style
ca
parents: 114
diff changeset
   217
    ^ Image fromFile:'b_alignLR.xbm'
bc196200ea8b enabled and style
ca
parents: 114
diff changeset
   218
bc196200ea8b enabled and style
ca
parents: 114
diff changeset
   219
!
bc196200ea8b enabled and style
ca
parents: 114
diff changeset
   220
bc196200ea8b enabled and style
ca
parents: 114
diff changeset
   221
iconAlignR
bc196200ea8b enabled and style
ca
parents: 114
diff changeset
   222
    ^ Image fromFile:'b_alignR.xbm'
bc196200ea8b enabled and style
ca
parents: 114
diff changeset
   223
bc196200ea8b enabled and style
ca
parents: 114
diff changeset
   224
!
bc196200ea8b enabled and style
ca
parents: 114
diff changeset
   225
bc196200ea8b enabled and style
ca
parents: 114
diff changeset
   226
iconAlignT
bc196200ea8b enabled and style
ca
parents: 114
diff changeset
   227
    ^ Image fromFile:'b_alignT.xbm'
bc196200ea8b enabled and style
ca
parents: 114
diff changeset
   228
bc196200ea8b enabled and style
ca
parents: 114
diff changeset
   229
!
bc196200ea8b enabled and style
ca
parents: 114
diff changeset
   230
bc196200ea8b enabled and style
ca
parents: 114
diff changeset
   231
iconAlignTB
bc196200ea8b enabled and style
ca
parents: 114
diff changeset
   232
    ^ Image fromFile:'b_alignTB.xbm'
bc196200ea8b enabled and style
ca
parents: 114
diff changeset
   233
bc196200ea8b enabled and style
ca
parents: 114
diff changeset
   234
! !
bc196200ea8b enabled and style
ca
parents: 114
diff changeset
   235
60
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
   236
!UIPainter class methodsFor:'interface specs'!
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
   237
118
bc196200ea8b enabled and style
ca
parents: 114
diff changeset
   238
menuAlignment
bc196200ea8b enabled and style
ca
parents: 114
diff changeset
   239
    ^ #(#Menu #(
bc196200ea8b enabled and style
ca
parents: 114
diff changeset
   240
                #(#MenuItem
bc196200ea8b enabled and style
ca
parents: 114
diff changeset
   241
                        #'label:' 'align left'
bc196200ea8b enabled and style
ca
parents: 114
diff changeset
   242
                        #'value:' #alignSelectionLeft
130
ffa9ea02d276 update menu specifications
ca
parents: 129
diff changeset
   243
                        #'labelImage:' #( ResourceRetriever nil iconAlignL )
193
450d9e5c6f4a checkin from browser
ca
parents: 187
diff changeset
   244
                        #'activeHelpKey:' #alignSelectionLeft
118
bc196200ea8b enabled and style
ca
parents: 114
diff changeset
   245
                 )
bc196200ea8b enabled and style
ca
parents: 114
diff changeset
   246
                #(#MenuItem
bc196200ea8b enabled and style
ca
parents: 114
diff changeset
   247
                        #'label:' 'align right'
bc196200ea8b enabled and style
ca
parents: 114
diff changeset
   248
                        #'value:' #alignSelectionRight
130
ffa9ea02d276 update menu specifications
ca
parents: 129
diff changeset
   249
                        #'labelImage:' #( ResourceRetriever nil iconAlignR )
193
450d9e5c6f4a checkin from browser
ca
parents: 187
diff changeset
   250
                        #'activeHelpKey:' #alignSelectionRight
118
bc196200ea8b enabled and style
ca
parents: 114
diff changeset
   251
                 )
bc196200ea8b enabled and style
ca
parents: 114
diff changeset
   252
                #(#MenuItem
bc196200ea8b enabled and style
ca
parents: 114
diff changeset
   253
                        #'label:' 'align left & right'
bc196200ea8b enabled and style
ca
parents: 114
diff changeset
   254
                        #'value:' #alignSelectionLeftAndRight
130
ffa9ea02d276 update menu specifications
ca
parents: 129
diff changeset
   255
                        #'labelImage:' #( ResourceRetriever nil iconAlignLR )
193
450d9e5c6f4a checkin from browser
ca
parents: 187
diff changeset
   256
                        #'activeHelpKey:' #alignSelectionLeftAndRight
118
bc196200ea8b enabled and style
ca
parents: 114
diff changeset
   257
                 )
bc196200ea8b enabled and style
ca
parents: 114
diff changeset
   258
                #(#MenuItem
bc196200ea8b enabled and style
ca
parents: 114
diff changeset
   259
                        #'label:' 'align top'
bc196200ea8b enabled and style
ca
parents: 114
diff changeset
   260
                        #'value:' #alignSelectionTop
130
ffa9ea02d276 update menu specifications
ca
parents: 129
diff changeset
   261
                        #'labelImage:' #( ResourceRetriever nil iconAlignT )
193
450d9e5c6f4a checkin from browser
ca
parents: 187
diff changeset
   262
                        #'activeHelpKey:' #alignSelectionTop
118
bc196200ea8b enabled and style
ca
parents: 114
diff changeset
   263
                 )
bc196200ea8b enabled and style
ca
parents: 114
diff changeset
   264
                #(#MenuItem
bc196200ea8b enabled and style
ca
parents: 114
diff changeset
   265
                        #'label:' 'align bottom'
bc196200ea8b enabled and style
ca
parents: 114
diff changeset
   266
                        #'value:' #alignSelectionBottom
130
ffa9ea02d276 update menu specifications
ca
parents: 129
diff changeset
   267
                        #'labelImage:' #( ResourceRetriever nil iconAlignB )
193
450d9e5c6f4a checkin from browser
ca
parents: 187
diff changeset
   268
                        #'activeHelpKey:' #alignSelectionBottom
118
bc196200ea8b enabled and style
ca
parents: 114
diff changeset
   269
                 )
bc196200ea8b enabled and style
ca
parents: 114
diff changeset
   270
                #(#MenuItem
bc196200ea8b enabled and style
ca
parents: 114
diff changeset
   271
                        #'label:' 'align top & bottom'
bc196200ea8b enabled and style
ca
parents: 114
diff changeset
   272
                        #'value:' #alignSelectionTopAndBottom
130
ffa9ea02d276 update menu specifications
ca
parents: 129
diff changeset
   273
                        #'labelImage:' #( ResourceRetriever nil iconAlignTB )
193
450d9e5c6f4a checkin from browser
ca
parents: 187
diff changeset
   274
                        #'activeHelpKey:' #alignSelectionTopAndBottom
118
bc196200ea8b enabled and style
ca
parents: 114
diff changeset
   275
                 )
bc196200ea8b enabled and style
ca
parents: 114
diff changeset
   276
                #(#MenuItem
bc196200ea8b enabled and style
ca
parents: 114
diff changeset
   277
                        #'label:' 'align centered horizontal'
bc196200ea8b enabled and style
ca
parents: 114
diff changeset
   278
                        #'value:' #alignSelectionCenterHor
130
ffa9ea02d276 update menu specifications
ca
parents: 129
diff changeset
   279
                        #'labelImage:' #( ResourceRetriever nil iconAlignCenterH )
193
450d9e5c6f4a checkin from browser
ca
parents: 187
diff changeset
   280
                        #'activeHelpKey:' #alignSelectionCenterHor
118
bc196200ea8b enabled and style
ca
parents: 114
diff changeset
   281
                 )
bc196200ea8b enabled and style
ca
parents: 114
diff changeset
   282
                #(#MenuItem
bc196200ea8b enabled and style
ca
parents: 114
diff changeset
   283
                        #'label:' 'align centered vertical'
bc196200ea8b enabled and style
ca
parents: 114
diff changeset
   284
                        #'value:' #alignSelectionCenterVer
130
ffa9ea02d276 update menu specifications
ca
parents: 129
diff changeset
   285
                        #'labelImage:' #( ResourceRetriever nil iconAlignCenterV )
193
450d9e5c6f4a checkin from browser
ca
parents: 187
diff changeset
   286
                        #'activeHelpKey:' #alignSelectionCenterVer
118
bc196200ea8b enabled and style
ca
parents: 114
diff changeset
   287
                 )
bc196200ea8b enabled and style
ca
parents: 114
diff changeset
   288
                )
171
7a99c53780ef help and close/raise of gallery/painter
ca
parents: 168
diff changeset
   289
               #( 3 3 )
118
bc196200ea8b enabled and style
ca
parents: 114
diff changeset
   290
               nil
bc196200ea8b enabled and style
ca
parents: 114
diff changeset
   291
        )
bc196200ea8b enabled and style
ca
parents: 114
diff changeset
   292
bc196200ea8b enabled and style
ca
parents: 114
diff changeset
   293
!
bc196200ea8b enabled and style
ca
parents: 114
diff changeset
   294
bc196200ea8b enabled and style
ca
parents: 114
diff changeset
   295
menuPullDown
109
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
   296
    ^ #(#Menu #(
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
   297
        #(#MenuItem
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
   298
                #'label:' 'file'
114
93cd25c62a68 menu and handling
ca
parents: 109
diff changeset
   299
                #'value:' #file
109
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
   300
                #'submenu:'
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
   301
                        #(#Menu #(
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
   302
                                 #(#MenuItem
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
   303
                                        #'label:' 'new'
155
575239b7ad0b confirm pick/new/fromClass if unsaved & modified
Claus Gittinger <cg@exept.de>
parents: 152
diff changeset
   304
                                        #'value:' #doNew
109
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
   305
                                  )
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
   306
                                 #(#MenuItem
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
   307
                                        #'label:' 'from class ...'
114
93cd25c62a68 menu and handling
ca
parents: 109
diff changeset
   308
                                        #'value:' #doFromClass
109
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
   309
                                  )
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
   310
                                 #(#MenuItem
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
   311
                                        #'label:' 'pick a view '
114
93cd25c62a68 menu and handling
ca
parents: 109
diff changeset
   312
                                        #'value:' #doPickAView
109
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
   313
                                  )
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
   314
                                 #(#MenuItem
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
   315
                                        #'label:' 'raise'
114
93cd25c62a68 menu and handling
ca
parents: 109
diff changeset
   316
                                        #'value:' #doRaise
109
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
   317
                                  )
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
   318
                                 #(#MenuItem
187
fa52e7ad5cb2 pullDownMenu
ca
parents: 183
diff changeset
   319
                                        #'label:' '='
fa52e7ad5cb2 pullDownMenu
ca
parents: 183
diff changeset
   320
                                  )
fa52e7ad5cb2 pullDownMenu
ca
parents: 183
diff changeset
   321
                                 #(#MenuItem
109
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
   322
                                        #'label:' 'quit'
114
93cd25c62a68 menu and handling
ca
parents: 109
diff changeset
   323
                                        #'value:' #closeRequest
109
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
   324
                                  )
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
   325
                                 )
187
fa52e7ad5cb2 pullDownMenu
ca
parents: 183
diff changeset
   326
                                #( 3 )
109
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
   327
                                nil
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
   328
                       )
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
   329
         )
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
   330
        #(#MenuItem
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
   331
                #'label:' 'misc'
114
93cd25c62a68 menu and handling
ca
parents: 109
diff changeset
   332
                #'value:' #misc
109
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
   333
                #'submenu:'
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
   334
                        #(#Menu #(
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
   335
                                #(#MenuItem
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
   336
                                        #'label:' 'grid'
114
93cd25c62a68 menu and handling
ca
parents: 109
diff changeset
   337
                                        #'value:' #grid
109
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
   338
                                        #'submenu:'
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
   339
                                                #(#Menu #(
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
   340
                                                        #(#MenuItem
137
ca
parents: 136
diff changeset
   341
                                                                #'label:' 'show'
ca
parents: 136
diff changeset
   342
                                                                #'indication:' #gridShown:
109
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
   343
                                                         )
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
   344
                                                        #(#MenuItem
137
ca
parents: 136
diff changeset
   345
                                                                #'label:' 'align'
ca
parents: 136
diff changeset
   346
                                                                #'indication:' #gridAlign:
109
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
   347
                                                         )
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
   348
                                                        )
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
   349
                                                        nil
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
   350
                                                        nil
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
   351
                                                 )
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
   352
                                 )
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
   353
                                #(#MenuItem
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
   354
                                        #'label:' 'undo'
114
93cd25c62a68 menu and handling
ca
parents: 109
diff changeset
   355
                                        #'value:' #undo
109
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
   356
                                        #'submenu:'
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
   357
                                                #(#Menu #(
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
   358
                                                        #(#MenuItem
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
   359
                                                                #'label:' 'last'
114
93cd25c62a68 menu and handling
ca
parents: 109
diff changeset
   360
                                                                #'value:' #undoLast
109
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
   361
                                                         )
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
   362
                                                        #(#MenuItem
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
   363
                                                                #'label:' 'menu'
114
93cd25c62a68 menu and handling
ca
parents: 109
diff changeset
   364
                                                                #'value:' #openUndoMenu
109
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
   365
                                                         )
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
   366
                                                        #(#MenuItem
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
   367
                                                                #'label:' 'delete'
114
93cd25c62a68 menu and handling
ca
parents: 109
diff changeset
   368
                                                                #'value:' #removeUndoHistory
109
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
   369
                                                         )
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
   370
                                                        )
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
   371
                                                        #(2)
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
   372
                                                        nil
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
   373
                                                 )
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
   374
                                  )
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
   375
                                )
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
   376
                                nil
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
   377
                                nil
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
   378
                               )
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
   379
         )
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
   380
        #(#MenuItem
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
   381
                #'label:' 'code'
114
93cd25c62a68 menu and handling
ca
parents: 109
diff changeset
   382
                #'value:' #code
109
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
   383
                #'submenu:'
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
   384
                        #(#Menu #(
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
   385
                                #(#MenuItem
155
575239b7ad0b confirm pick/new/fromClass if unsaved & modified
Claus Gittinger <cg@exept.de>
parents: 152
diff changeset
   386
                                        #'label:' 'class && method ...'
114
93cd25c62a68 menu and handling
ca
parents: 109
diff changeset
   387
                                        #'value:' #defineClassAndSelector
109
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
   388
                                 )
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
   389
                                 #(#MenuItem
187
fa52e7ad5cb2 pullDownMenu
ca
parents: 183
diff changeset
   390
                                        #'label:' '='
fa52e7ad5cb2 pullDownMenu
ca
parents: 183
diff changeset
   391
                                  )
fa52e7ad5cb2 pullDownMenu
ca
parents: 183
diff changeset
   392
                                 #(#MenuItem
fa52e7ad5cb2 pullDownMenu
ca
parents: 183
diff changeset
   393
                                        #'label:' 'install window spec.'
114
93cd25c62a68 menu and handling
ca
parents: 109
diff changeset
   394
                                        #'value:' #doInstallSpec
109
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
   395
                                  )
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
   396
                                 #(#MenuItem
187
fa52e7ad5cb2 pullDownMenu
ca
parents: 183
diff changeset
   397
                                        #'label:' 'install help spec.'
152
ca
parents: 149
diff changeset
   398
                                        #'value:' #doInstallHelp
ca
parents: 149
diff changeset
   399
                                  )
ca
parents: 149
diff changeset
   400
                                 #(#MenuItem
109
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
   401
                                        #'label:' 'install aspects'
114
93cd25c62a68 menu and handling
ca
parents: 109
diff changeset
   402
                                        #'value:' #doInstallAspects
109
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
   403
                                  )
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
   404
                                 #(#MenuItem
187
fa52e7ad5cb2 pullDownMenu
ca
parents: 183
diff changeset
   405
                                        #'label:' '='
fa52e7ad5cb2 pullDownMenu
ca
parents: 183
diff changeset
   406
                                  )
fa52e7ad5cb2 pullDownMenu
ca
parents: 183
diff changeset
   407
                                 #(#MenuItem
fa52e7ad5cb2 pullDownMenu
ca
parents: 183
diff changeset
   408
                                        #'label:' 'show window spec.'
114
93cd25c62a68 menu and handling
ca
parents: 109
diff changeset
   409
                                        #'value:' #doWindowSpec
109
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
   410
                                   )
187
fa52e7ad5cb2 pullDownMenu
ca
parents: 183
diff changeset
   411
                                 #(#MenuItem
fa52e7ad5cb2 pullDownMenu
ca
parents: 183
diff changeset
   412
                                        #'label:' '='
fa52e7ad5cb2 pullDownMenu
ca
parents: 183
diff changeset
   413
                                  )
fa52e7ad5cb2 pullDownMenu
ca
parents: 183
diff changeset
   414
                                 #(#MenuItem
149
e652608690b1 help ...
ca
parents: 144
diff changeset
   415
                                        #'label:' 'browse application'
e652608690b1 help ...
ca
parents: 144
diff changeset
   416
                                        #'value:' #doBrowseAppClass
187
fa52e7ad5cb2 pullDownMenu
ca
parents: 183
diff changeset
   417
                                  )
fa52e7ad5cb2 pullDownMenu
ca
parents: 183
diff changeset
   418
                                 #(#MenuItem
fa52e7ad5cb2 pullDownMenu
ca
parents: 183
diff changeset
   419
                                         #'label:' 'start  application'
fa52e7ad5cb2 pullDownMenu
ca
parents: 183
diff changeset
   420
                                         #'value:' #doStartApplication
fa52e7ad5cb2 pullDownMenu
ca
parents: 183
diff changeset
   421
                                  )
109
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
   422
                                )
187
fa52e7ad5cb2 pullDownMenu
ca
parents: 183
diff changeset
   423
                                #( 4 )
109
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
   424
                                nil
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
   425
                          )
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
   426
         )
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
   427
        #(#MenuItem
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
   428
                #'label:' 'test'
118
bc196200ea8b enabled and style
ca
parents: 114
diff changeset
   429
                #'nameKey:' #test
114
93cd25c62a68 menu and handling
ca
parents: 109
diff changeset
   430
                #'value:' #test
109
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
   431
                #'submenu:'
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
   432
                        #(#Menu #(
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
   433
                                #(#MenuItem
137
ca
parents: 136
diff changeset
   434
                                        #'label:' 'test mode'
ca
parents: 136
diff changeset
   435
                                        #'indication:' #testMode:
109
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
   436
                                 )
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
   437
                                )
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
   438
                                nil
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
   439
                                nil
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
   440
                          )
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
   441
         )
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
   442
        )
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
   443
        nil
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
   444
        nil
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
   445
      )
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
   446
!
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
   447
60
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
   448
nameAndSelectorSpec
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
   449
    "this window spec was automatically generated by the ST/X UIPainter"
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
   450
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
   451
    "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
   452
     handle the specification if its corrupted."
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
   453
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
   454
    "
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
   455
     UIPainter new openOnClass:UIPainter andSelector:#nameAndSelectorSpec
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
   456
     UIPainter new openInterface:#nameAndSelectorSpec
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
   457
    "
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
   458
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
   459
    <resource: #canvas>
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
   460
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
   461
    ^
142
75f927b856f6 update specs; remove color and default values
ca
parents: 137
diff changeset
   462
     
60
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
   463
       #(#FullSpec
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
   464
          #'window:' 
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
   465
           #(#WindowSpec
177
eefd69a52f5b fixed setup of class/selector when picking/fetching via
Claus Gittinger <cg@exept.de>
parents: 176
diff changeset
   466
              #'name:' 'uIPainterView'
60
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
   467
              #'layout:' #(#LayoutFrame 0 0.0 0 0.0 0 1.0 0 1.0)
176
a9e5b1615761 update menu
ca
parents: 174
diff changeset
   468
              #'label:' 'Painter'
177
eefd69a52f5b fixed setup of class/selector when picking/fetching via
Claus Gittinger <cg@exept.de>
parents: 176
diff changeset
   469
              #'bounds:' #(#Rectangle 0 0 391 170)
60
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
   470
          )
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
   471
          #'component:' 
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
   472
           #(#SpecCollection
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
   473
              #'collection:' 
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
   474
               #(
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
   475
                 #(#LabelSpec
176
a9e5b1615761 update menu
ca
parents: 174
diff changeset
   476
                    #'name:' 'classLabel'
177
eefd69a52f5b fixed setup of class/selector when picking/fetching via
Claus Gittinger <cg@exept.de>
parents: 176
diff changeset
   477
                    #'layout:' #(#AlignmentOrigin 45 0.11 51 0 1 0.5)
60
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
   478
                    #'label:' 'class:'
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
   479
                    #'adjust:' #right
176
a9e5b1615761 update menu
ca
parents: 174
diff changeset
   480
                    #'resizeForLabel:' true
60
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
   481
                )
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
   482
                 #(#LabelSpec
176
a9e5b1615761 update menu
ca
parents: 174
diff changeset
   483
                    #'name:' 'superClassLabel'
177
eefd69a52f5b fixed setup of class/selector when picking/fetching via
Claus Gittinger <cg@exept.de>
parents: 176
diff changeset
   484
                    #'layout:' #(#AlignmentOrigin 45 0.11 77 0 1 0.5)
60
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
   485
                    #'label:' 'superclass:'
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
   486
                    #'adjust:' #right
176
a9e5b1615761 update menu
ca
parents: 174
diff changeset
   487
                    #'resizeForLabel:' true
60
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
   488
                )
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
   489
                 #(#LabelSpec
176
a9e5b1615761 update menu
ca
parents: 174
diff changeset
   490
                    #'name:' 'selectorLabel'
177
eefd69a52f5b fixed setup of class/selector when picking/fetching via
Claus Gittinger <cg@exept.de>
parents: 176
diff changeset
   491
                    #'layout:' #(#AlignmentOrigin 45 0.11 105 0 1 0.5)
60
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
   492
                    #'label:' 'selector:'
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
   493
                    #'adjust:' #right
176
a9e5b1615761 update menu
ca
parents: 174
diff changeset
   494
                    #'resizeForLabel:' true
60
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
   495
                )
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
   496
                 #(#InputFieldSpec
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
   497
                    #'name:' 'methodNameField'
177
eefd69a52f5b fixed setup of class/selector when picking/fetching via
Claus Gittinger <cg@exept.de>
parents: 176
diff changeset
   498
                    #'layout:' #(#LayoutFrame 47 0.11 95 0 -5 1.0 117 0)
157
ce974dce3dd4 enhanced class & method dialog
Claus Gittinger <cg@exept.de>
parents: 156
diff changeset
   499
                    #'tabable:' true
60
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
   500
                    #'model:' #methodNameChannel
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
   501
                )
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
   502
                 #(#LabelSpec
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
   503
                    #'name:' 'boxLabel'
176
a9e5b1615761 update menu
ca
parents: 174
diff changeset
   504
                    #'layout:' #(#Point 5 10)
92
79473a16fdc9 spec for class & selector
Claus Gittinger <cg@exept.de>
parents: 87
diff changeset
   505
                    #'label:' 'class & selector for code:'
79473a16fdc9 spec for class & selector
Claus Gittinger <cg@exept.de>
parents: 87
diff changeset
   506
                    #'adjust:' #left
176
a9e5b1615761 update menu
ca
parents: 174
diff changeset
   507
                    #'resizeForLabel:' true
a9e5b1615761 update menu
ca
parents: 174
diff changeset
   508
                )
a9e5b1615761 update menu
ca
parents: 174
diff changeset
   509
                 #(#InputFieldSpec
a9e5b1615761 update menu
ca
parents: 174
diff changeset
   510
                    #'name:' 'classNameField'
177
eefd69a52f5b fixed setup of class/selector when picking/fetching via
Claus Gittinger <cg@exept.de>
parents: 176
diff changeset
   511
                    #'layout:' #(#LayoutFrame 47 0.11 39 0 -5 1.0 61 0)
176
a9e5b1615761 update menu
ca
parents: 174
diff changeset
   512
                    #'tabable:' true
a9e5b1615761 update menu
ca
parents: 174
diff changeset
   513
                    #'model:' #classNameChannel
60
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
   514
                )
157
ce974dce3dd4 enhanced class & method dialog
Claus Gittinger <cg@exept.de>
parents: 156
diff changeset
   515
                 #(#ComboBoxSpec
ce974dce3dd4 enhanced class & method dialog
Claus Gittinger <cg@exept.de>
parents: 156
diff changeset
   516
                    #'name:' 'comboBox1'
177
eefd69a52f5b fixed setup of class/selector when picking/fetching via
Claus Gittinger <cg@exept.de>
parents: 176
diff changeset
   517
                    #'layout:' #(#LayoutFrame 47 0.11 67 0 -5 1.0 89 0)
157
ce974dce3dd4 enhanced class & method dialog
Claus Gittinger <cg@exept.de>
parents: 156
diff changeset
   518
                    #'tabable:' true
ce974dce3dd4 enhanced class & method dialog
Claus Gittinger <cg@exept.de>
parents: 156
diff changeset
   519
                    #'model:' #superclassNameChannel
ce974dce3dd4 enhanced class & method dialog
Claus Gittinger <cg@exept.de>
parents: 156
diff changeset
   520
                    #'comboList:' #superclassNameDefaults
ce974dce3dd4 enhanced class & method dialog
Claus Gittinger <cg@exept.de>
parents: 156
diff changeset
   521
                )
176
a9e5b1615761 update menu
ca
parents: 174
diff changeset
   522
                 #(#HorizontalPanelViewSpec
a9e5b1615761 update menu
ca
parents: 174
diff changeset
   523
                    #'name:' 'commitPanel'
a9e5b1615761 update menu
ca
parents: 174
diff changeset
   524
                    #'layout:' #(#LayoutFrame 0 0.0 -24 1.0 0 1.0 0 1.0)
a9e5b1615761 update menu
ca
parents: 174
diff changeset
   525
                    #'component:' 
a9e5b1615761 update menu
ca
parents: 174
diff changeset
   526
                     #(#SpecCollection
a9e5b1615761 update menu
ca
parents: 174
diff changeset
   527
                        #'collection:' 
a9e5b1615761 update menu
ca
parents: 174
diff changeset
   528
                         #(
a9e5b1615761 update menu
ca
parents: 174
diff changeset
   529
                           #(#ActionButtonSpec
a9e5b1615761 update menu
ca
parents: 174
diff changeset
   530
                              #'name:' 'button1'
a9e5b1615761 update menu
ca
parents: 174
diff changeset
   531
                              #'label:' 'cancel'
a9e5b1615761 update menu
ca
parents: 174
diff changeset
   532
                              #'tabable:' true
a9e5b1615761 update menu
ca
parents: 174
diff changeset
   533
                              #'model:' #cancel
177
eefd69a52f5b fixed setup of class/selector when picking/fetching via
Claus Gittinger <cg@exept.de>
parents: 176
diff changeset
   534
                              #'extent:' #(#Point 191 24)
176
a9e5b1615761 update menu
ca
parents: 174
diff changeset
   535
                          )
a9e5b1615761 update menu
ca
parents: 174
diff changeset
   536
                           #(#ActionButtonSpec
a9e5b1615761 update menu
ca
parents: 174
diff changeset
   537
                              #'name:' 'button2'
a9e5b1615761 update menu
ca
parents: 174
diff changeset
   538
                              #'label:' 'ok'
a9e5b1615761 update menu
ca
parents: 174
diff changeset
   539
                              #'tabable:' true
a9e5b1615761 update menu
ca
parents: 174
diff changeset
   540
                              #'isDefault:' true
a9e5b1615761 update menu
ca
parents: 174
diff changeset
   541
                              #'model:' #accept
177
eefd69a52f5b fixed setup of class/selector when picking/fetching via
Claus Gittinger <cg@exept.de>
parents: 176
diff changeset
   542
                              #'extent:' #(#Point 191 24)
176
a9e5b1615761 update menu
ca
parents: 174
diff changeset
   543
                          )
a9e5b1615761 update menu
ca
parents: 174
diff changeset
   544
                        )
a9e5b1615761 update menu
ca
parents: 174
diff changeset
   545
                    )
a9e5b1615761 update menu
ca
parents: 174
diff changeset
   546
                    #'horizontalLayout:' #fitSpace
a9e5b1615761 update menu
ca
parents: 174
diff changeset
   547
                    #'verticalLayout:' #fit
a9e5b1615761 update menu
ca
parents: 174
diff changeset
   548
                    #'horizontalSpace:' 3
a9e5b1615761 update menu
ca
parents: 174
diff changeset
   549
                    #'verticalSpace:' 3
a9e5b1615761 update menu
ca
parents: 174
diff changeset
   550
                )
60
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
   551
              )
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
   552
          )
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
   553
      )
177
eefd69a52f5b fixed setup of class/selector when picking/fetching via
Claus Gittinger <cg@exept.de>
parents: 176
diff changeset
   554
eefd69a52f5b fixed setup of class/selector when picking/fetching via
Claus Gittinger <cg@exept.de>
parents: 176
diff changeset
   555
    "Modified: 24.6.1997 / 18:50:14 / cg"
109
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
   556
!
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
   557
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
   558
windowSpec
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
   559
    "this window spec was automatically generated by the ST/X UIPainter"
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
   560
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
   561
    "do not manually edit this - the painter/builder may not be able to
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
   562
     handle the specification if its corrupted."
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
   563
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
   564
    "
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
   565
     UIPainter new openOnClass:UIPainter andSelector:#windowSpec
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
   566
     UIPainter new openInterface:#windowSpec
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
   567
    "
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
   568
    "UIPainter open"
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
   569
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
   570
    <resource: #canvas>
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
   571
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
   572
    ^
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
   573
     
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
   574
       #(#FullSpec
171
7a99c53780ef help and close/raise of gallery/painter
ca
parents: 168
diff changeset
   575
          #'flags:' 0
109
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
   576
          #'window:' 
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
   577
           #(#WindowSpec
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
   578
              #'name:' 'uIPainterView'
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
   579
              #'layout:' #(#LayoutFrame 0 0.0 0 0.0 0 1.0 0 1.0)
171
7a99c53780ef help and close/raise of gallery/painter
ca
parents: 168
diff changeset
   580
              #'flags:' 0
109
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
   581
              #'label:' 'Tree-View'
171
7a99c53780ef help and close/raise of gallery/painter
ca
parents: 168
diff changeset
   582
              #'bounds:' #(#Rectangle 0 0 524 456)
109
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
   583
          )
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
   584
          #'component:' 
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
   585
           #(#SpecCollection
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
   586
              #'collection:' 
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
   587
               #(
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
   588
                 #(#MenuPanelSpec
137
ca
parents: 136
diff changeset
   589
                    #'name:' 'menuPullDown'
171
7a99c53780ef help and close/raise of gallery/painter
ca
parents: 168
diff changeset
   590
                    #'layout:' #(#LayoutFrame 0 0.0 0 0.0 0 1.0 25 0)
7a99c53780ef help and close/raise of gallery/painter
ca
parents: 168
diff changeset
   591
                    #'flags:' 0
144
bca8b1953ee8 checkin from browser
ca
parents: 142
diff changeset
   592
                    #'tabable:' true
118
bc196200ea8b enabled and style
ca
parents: 114
diff changeset
   593
                    #'menu:' #menuPullDown
109
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
   594
                )
137
ca
parents: 136
diff changeset
   595
                 #(#MenuPanelSpec
ca
parents: 136
diff changeset
   596
                    #'name:' 'menuAlignment'
ca
parents: 136
diff changeset
   597
                    #'layout:' #(#LayoutFrame 0 0.0 29 0 233 0 54 0)
171
7a99c53780ef help and close/raise of gallery/painter
ca
parents: 168
diff changeset
   598
                    #'flags:' 0
144
bca8b1953ee8 checkin from browser
ca
parents: 142
diff changeset
   599
                    #'tabable:' true
137
ca
parents: 136
diff changeset
   600
                    #'menu:' #menuAlignment
ca
parents: 136
diff changeset
   601
                    #'showSeparatingLines:' true
ca
parents: 136
diff changeset
   602
                )
ca
parents: 136
diff changeset
   603
                 #(#PanelViewSpec
ca
parents: 136
diff changeset
   604
                    #'name:' 'panelViewButtons'
149
e652608690b1 help ...
ca
parents: 144
diff changeset
   605
                    #'layout:' #(#LayoutFrame -125 1.0 25 0.0 0 1.0 57 0.0)
171
7a99c53780ef help and close/raise of gallery/painter
ca
parents: 168
diff changeset
   606
                    #'flags:' 0
137
ca
parents: 136
diff changeset
   607
                    #'component:' 
ca
parents: 136
diff changeset
   608
                     #(#SpecCollection
ca
parents: 136
diff changeset
   609
                        #'collection:' 
ca
parents: 136
diff changeset
   610
                         #(
ca
parents: 136
diff changeset
   611
                           #(#ActionButtonSpec
ca
parents: 136
diff changeset
   612
                              #'name:' 'moveLeft'
171
7a99c53780ef help and close/raise of gallery/painter
ca
parents: 168
diff changeset
   613
                              #'flags:' 0
137
ca
parents: 136
diff changeset
   614
                              #'label:' ''
ca
parents: 136
diff changeset
   615
                              #'translateLabel:' true
ca
parents: 136
diff changeset
   616
                              #'labelChannel:' #'LABELb_moveLeft.xbm'
144
bca8b1953ee8 checkin from browser
ca
parents: 142
diff changeset
   617
                              #'tabable:' true
137
ca
parents: 136
diff changeset
   618
                              #'defaultable:' true
ca
parents: 136
diff changeset
   619
                              #'model:' #moveSelectionLeft
ca
parents: 136
diff changeset
   620
                              #'isTriggerOnDown:' true
ca
parents: 136
diff changeset
   621
                              #'enableChannel:' #enableChannel
ca
parents: 136
diff changeset
   622
                              #'extent:' #(#Point 26 24)
ca
parents: 136
diff changeset
   623
                          )
ca
parents: 136
diff changeset
   624
                           #(#ActionButtonSpec
ca
parents: 136
diff changeset
   625
                              #'name:' 'moveRight'
171
7a99c53780ef help and close/raise of gallery/painter
ca
parents: 168
diff changeset
   626
                              #'flags:' 0
137
ca
parents: 136
diff changeset
   627
                              #'label:' ''
ca
parents: 136
diff changeset
   628
                              #'translateLabel:' true
ca
parents: 136
diff changeset
   629
                              #'labelChannel:' #'LABELb_moveRight.xbm'
144
bca8b1953ee8 checkin from browser
ca
parents: 142
diff changeset
   630
                              #'tabable:' true
137
ca
parents: 136
diff changeset
   631
                              #'defaultable:' true
ca
parents: 136
diff changeset
   632
                              #'model:' #moveSelectionRight
ca
parents: 136
diff changeset
   633
                              #'isTriggerOnDown:' true
ca
parents: 136
diff changeset
   634
                              #'enableChannel:' #enableChannel
ca
parents: 136
diff changeset
   635
                              #'extent:' #(#Point 26 24)
ca
parents: 136
diff changeset
   636
                          )
ca
parents: 136
diff changeset
   637
                           #(#ActionButtonSpec
ca
parents: 136
diff changeset
   638
                              #'name:' 'moveUp'
171
7a99c53780ef help and close/raise of gallery/painter
ca
parents: 168
diff changeset
   639
                              #'flags:' 0
137
ca
parents: 136
diff changeset
   640
                              #'label:' ''
ca
parents: 136
diff changeset
   641
                              #'translateLabel:' true
ca
parents: 136
diff changeset
   642
                              #'labelChannel:' #'LABELb_moveUp.xbm'
144
bca8b1953ee8 checkin from browser
ca
parents: 142
diff changeset
   643
                              #'tabable:' true
137
ca
parents: 136
diff changeset
   644
                              #'defaultable:' true
ca
parents: 136
diff changeset
   645
                              #'model:' #moveSelectionUp
ca
parents: 136
diff changeset
   646
                              #'isTriggerOnDown:' true
ca
parents: 136
diff changeset
   647
                              #'enableChannel:' #enableChannel
ca
parents: 136
diff changeset
   648
                              #'extent:' #(#Point 26 24)
ca
parents: 136
diff changeset
   649
                          )
ca
parents: 136
diff changeset
   650
                           #(#ActionButtonSpec
ca
parents: 136
diff changeset
   651
                              #'name:' 'moveDown'
171
7a99c53780ef help and close/raise of gallery/painter
ca
parents: 168
diff changeset
   652
                              #'flags:' 0
137
ca
parents: 136
diff changeset
   653
                              #'label:' ''
ca
parents: 136
diff changeset
   654
                              #'translateLabel:' true
ca
parents: 136
diff changeset
   655
                              #'labelChannel:' #'LABELb_moveDown.xbm'
144
bca8b1953ee8 checkin from browser
ca
parents: 142
diff changeset
   656
                              #'tabable:' true
137
ca
parents: 136
diff changeset
   657
                              #'defaultable:' true
ca
parents: 136
diff changeset
   658
                              #'model:' #moveSelectionDown
ca
parents: 136
diff changeset
   659
                              #'isTriggerOnDown:' true
ca
parents: 136
diff changeset
   660
                              #'enableChannel:' #enableChannel
ca
parents: 136
diff changeset
   661
                              #'extent:' #(#Point 26 24)
ca
parents: 136
diff changeset
   662
                          )
ca
parents: 136
diff changeset
   663
                        )
ca
parents: 136
diff changeset
   664
                    )
ca
parents: 136
diff changeset
   665
                    #'level:' 1
ca
parents: 136
diff changeset
   666
                    #'horizontalLayout:' #fitSpace
ca
parents: 136
diff changeset
   667
                    #'verticalLayout:' #fitSpace
ca
parents: 136
diff changeset
   668
                    #'horizontalSpace:' 4
ca
parents: 136
diff changeset
   669
                    #'verticalSpace:' 4
ca
parents: 136
diff changeset
   670
                )
ca
parents: 136
diff changeset
   671
                 #(#SequenceViewSpec
ca
parents: 136
diff changeset
   672
                    #'name:' 'objectTree'
149
e652608690b1 help ...
ca
parents: 144
diff changeset
   673
                    #'layout:' #(#LayoutFrame 0 0.0 59 0.0 0 0.35 -25 1.0)
171
7a99c53780ef help and close/raise of gallery/painter
ca
parents: 168
diff changeset
   674
                    #'flags:' 0
137
ca
parents: 136
diff changeset
   675
                    #'enableChannel:' #enableChannel
144
bca8b1953ee8 checkin from browser
ca
parents: 142
diff changeset
   676
                    #'tabable:' true
137
ca
parents: 136
diff changeset
   677
                    #'menu:' #objectListMenu
ca
parents: 136
diff changeset
   678
                    #'model:' #objectList
ca
parents: 136
diff changeset
   679
                    #'hasHorizontalScrollBar:' true
ca
parents: 136
diff changeset
   680
                    #'hasVerticalScrollBar:' true
ca
parents: 136
diff changeset
   681
                    #'miniScrollerHorizontal:' true
ca
parents: 136
diff changeset
   682
                    #'isMultiSelect:' true
ca
parents: 136
diff changeset
   683
                    #'doubleClickSelector:' #doubleClick
ca
parents: 136
diff changeset
   684
                    #'useIndex:' true
ca
parents: 136
diff changeset
   685
                )
ca
parents: 136
diff changeset
   686
                 #(#NoteBookViewSpec
ca
parents: 136
diff changeset
   687
                    #'name:' 'noteBook'
149
e652608690b1 help ...
ca
parents: 144
diff changeset
   688
                    #'layout:' #(#LayoutFrame 0 0.35 59 0.0 0 1.0 -55 1.0)
171
7a99c53780ef help and close/raise of gallery/painter
ca
parents: 168
diff changeset
   689
                    #'flags:' 0
137
ca
parents: 136
diff changeset
   690
                    #'enableChannel:' #enableChannel
144
bca8b1953ee8 checkin from browser
ca
parents: 142
diff changeset
   691
                    #'tabable:' true
137
ca
parents: 136
diff changeset
   692
                    #'menu:' #tabList
ca
parents: 136
diff changeset
   693
                    #'style:' 
ca
parents: 136
diff changeset
   694
                     #(#FontDescription
144
bca8b1953ee8 checkin from browser
ca
parents: 142
diff changeset
   695
                        #helvetica #medium
137
ca
parents: 136
diff changeset
   696
                        #roman #'10'
ca
parents: 136
diff changeset
   697
                    )
ca
parents: 136
diff changeset
   698
                    #'model:' #tabModel
ca
parents: 136
diff changeset
   699
                    #'tabWidget:' #Window
ca
parents: 136
diff changeset
   700
                    #'canvas:' #noteBookView
ca
parents: 136
diff changeset
   701
                )
ca
parents: 136
diff changeset
   702
                 #(#HorizontalPanelViewSpec
ca
parents: 136
diff changeset
   703
                    #'name:' 'modifyPanel'
149
e652608690b1 help ...
ca
parents: 144
diff changeset
   704
                    #'layout:' #(#LayoutFrame 0 0.35 -55 1.0 0 1.0 -25 1.0)
171
7a99c53780ef help and close/raise of gallery/painter
ca
parents: 168
diff changeset
   705
                    #'flags:' 0
137
ca
parents: 136
diff changeset
   706
                    #'component:' 
ca
parents: 136
diff changeset
   707
                     #(#SpecCollection
ca
parents: 136
diff changeset
   708
                        #'collection:' 
ca
parents: 136
diff changeset
   709
                         #(
ca
parents: 136
diff changeset
   710
                           #(#ActionButtonSpec
ca
parents: 136
diff changeset
   711
                              #'name:' 'cancelButton'
171
7a99c53780ef help and close/raise of gallery/painter
ca
parents: 168
diff changeset
   712
                              #'flags:' 0
137
ca
parents: 136
diff changeset
   713
                              #'label:' 'cancel'
144
bca8b1953ee8 checkin from browser
ca
parents: 142
diff changeset
   714
                              #'tabable:' true
137
ca
parents: 136
diff changeset
   715
                              #'model:' #cancel
ca
parents: 136
diff changeset
   716
                              #'enableChannel:' #modifiedChannel
171
7a99c53780ef help and close/raise of gallery/painter
ca
parents: 168
diff changeset
   717
                              #'extent:' #(#Point 166 24)
137
ca
parents: 136
diff changeset
   718
                          )
ca
parents: 136
diff changeset
   719
                           #(#ActionButtonSpec
ca
parents: 136
diff changeset
   720
                              #'name:' 'acceptButton'
171
7a99c53780ef help and close/raise of gallery/painter
ca
parents: 168
diff changeset
   721
                              #'flags:' 0
137
ca
parents: 136
diff changeset
   722
                              #'label:' 'ok'
144
bca8b1953ee8 checkin from browser
ca
parents: 142
diff changeset
   723
                              #'tabable:' true
137
ca
parents: 136
diff changeset
   724
                              #'model:' #accept
ca
parents: 136
diff changeset
   725
                              #'enableChannel:' #modifiedChannel
171
7a99c53780ef help and close/raise of gallery/painter
ca
parents: 168
diff changeset
   726
                              #'extent:' #(#Point 166 24)
137
ca
parents: 136
diff changeset
   727
                          )
ca
parents: 136
diff changeset
   728
                        )
ca
parents: 136
diff changeset
   729
                    )
ca
parents: 136
diff changeset
   730
                    #'level:' 0
ca
parents: 136
diff changeset
   731
                    #'horizontalLayout:' #fitSpace
ca
parents: 136
diff changeset
   732
                    #'verticalLayout:' #fitSpace
ca
parents: 136
diff changeset
   733
                    #'horizontalSpace:' 3
ca
parents: 136
diff changeset
   734
                    #'verticalSpace:' 3
ca
parents: 136
diff changeset
   735
                )
149
e652608690b1 help ...
ca
parents: 144
diff changeset
   736
                 #(#LabelSpec
e652608690b1 help ...
ca
parents: 144
diff changeset
   737
                    #'name:' 'helpInfo'
e652608690b1 help ...
ca
parents: 144
diff changeset
   738
                    #'layout:' #(#LayoutFrame 2 0.0 -25 1.0 -2 1.0 -2 1.0)
171
7a99c53780ef help and close/raise of gallery/painter
ca
parents: 168
diff changeset
   739
                    #'flags:' 0
149
e652608690b1 help ...
ca
parents: 144
diff changeset
   740
                    #'label:' ''
e652608690b1 help ...
ca
parents: 144
diff changeset
   741
                    #'level:' -1
e652608690b1 help ...
ca
parents: 144
diff changeset
   742
                    #'adjust:' #left
e652608690b1 help ...
ca
parents: 144
diff changeset
   743
                )
173
a8468f4e83f0 show/hide painter/gallery
ca
parents: 171
diff changeset
   744
                 #(#ToggleSpec
a8468f4e83f0 show/hide painter/gallery
ca
parents: 171
diff changeset
   745
                    #'name:' 'galleryLabel'
a8468f4e83f0 show/hide painter/gallery
ca
parents: 171
diff changeset
   746
                    #'layout:' #(#LayoutFrame -162 1.0 1 0 -82 1.0 23 0)
171
7a99c53780ef help and close/raise of gallery/painter
ca
parents: 168
diff changeset
   747
                    #'flags:' 0
7a99c53780ef help and close/raise of gallery/painter
ca
parents: 168
diff changeset
   748
                    #'label:' 'Gallery'
173
a8468f4e83f0 show/hide painter/gallery
ca
parents: 171
diff changeset
   749
                    #'model:' #galleryShown
a8468f4e83f0 show/hide painter/gallery
ca
parents: 171
diff changeset
   750
                    #'isTriggerOnDown:' true
a8468f4e83f0 show/hide painter/gallery
ca
parents: 171
diff changeset
   751
                    #'showLamp:' true
a8468f4e83f0 show/hide painter/gallery
ca
parents: 171
diff changeset
   752
                    #'lampColor:' #(#Color 100.0 100.0 0.0)
171
7a99c53780ef help and close/raise of gallery/painter
ca
parents: 168
diff changeset
   753
                )
173
a8468f4e83f0 show/hide painter/gallery
ca
parents: 171
diff changeset
   754
                 #(#ToggleSpec
a8468f4e83f0 show/hide painter/gallery
ca
parents: 171
diff changeset
   755
                    #'name:' 'painterLabel'
a8468f4e83f0 show/hide painter/gallery
ca
parents: 171
diff changeset
   756
                    #'layout:' #(#LayoutFrame -81 1.0 1 0 -1 1.0 23 0)
171
7a99c53780ef help and close/raise of gallery/painter
ca
parents: 168
diff changeset
   757
                    #'flags:' 0
7a99c53780ef help and close/raise of gallery/painter
ca
parents: 168
diff changeset
   758
                    #'label:' 'Painter'
173
a8468f4e83f0 show/hide painter/gallery
ca
parents: 171
diff changeset
   759
                    #'model:' #painterShown
a8468f4e83f0 show/hide painter/gallery
ca
parents: 171
diff changeset
   760
                    #'isTriggerOnDown:' true
a8468f4e83f0 show/hide painter/gallery
ca
parents: 171
diff changeset
   761
                    #'showLamp:' true
a8468f4e83f0 show/hide painter/gallery
ca
parents: 171
diff changeset
   762
                    #'lampColor:' #(#Color 100.0 100.0 0.0)
171
7a99c53780ef help and close/raise of gallery/painter
ca
parents: 168
diff changeset
   763
                )
109
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
   764
              )
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
   765
          )
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
   766
      )
60
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
   767
! !
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
   768
109
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
   769
!UIPainter methodsFor:'actions'!
60
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
   770
109
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
   771
accept
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
   772
    |layout|
60
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
   773
166
cd5699643975 add tools: layout and specification tool
ca
parents: 161
diff changeset
   774
    objectList removeDependent:self.
cd5699643975 add tools: layout and specification tool
ca
parents: 161
diff changeset
   775
cd5699643975 add tools: layout and specification tool
ca
parents: 161
diff changeset
   776
    self isLayoutToolSelected ifTrue:[
144
bca8b1953ee8 checkin from browser
ca
parents: 142
diff changeset
   777
        (layout := layoutTool layout) notNil ifTrue:[
bca8b1953ee8 checkin from browser
ca
parents: 142
diff changeset
   778
            layoutTool layoutType == #Extent ifTrue:[
bca8b1953ee8 checkin from browser
ca
parents: 142
diff changeset
   779
                self painter setExtent:layout
bca8b1953ee8 checkin from browser
ca
parents: 142
diff changeset
   780
            ] ifFalse:[
149
e652608690b1 help ...
ca
parents: 144
diff changeset
   781
                self painter setLayout:layout
109
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
   782
            ]
144
bca8b1953ee8 checkin from browser
ca
parents: 142
diff changeset
   783
        ]
bca8b1953ee8 checkin from browser
ca
parents: 142
diff changeset
   784
    ] ifFalse:[
166
cd5699643975 add tools: layout and specification tool
ca
parents: 161
diff changeset
   785
        self isHelpToolSelected ifTrue:[
149
e652608690b1 help ...
ca
parents: 144
diff changeset
   786
            activeHelpTool accept
e652608690b1 help ...
ca
parents: 144
diff changeset
   787
        ].
171
7a99c53780ef help and close/raise of gallery/painter
ca
parents: 168
diff changeset
   788
        self painter updateFromSpec:(specTool specification).
144
bca8b1953ee8 checkin from browser
ca
parents: 142
diff changeset
   789
    ].
166
cd5699643975 add tools: layout and specification tool
ca
parents: 161
diff changeset
   790
    self modifiedChannel value:false.
cd5699643975 add tools: layout and specification tool
ca
parents: 161
diff changeset
   791
    objectList addDependent:self.
109
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
   792
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
   793
!
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
   794
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
   795
cancel
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
   796
    "cancel all changes and read back attributes from current view
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
   797
    "
166
cd5699643975 add tools: layout and specification tool
ca
parents: 161
diff changeset
   798
    self modifiedChannel value ifTrue:[
171
7a99c53780ef help and close/raise of gallery/painter
ca
parents: 168
diff changeset
   799
        specTool specification:(self painter specForSelection).
166
cd5699643975 add tools: layout and specification tool
ca
parents: 161
diff changeset
   800
        layoutTool layoutView:(layoutTool layoutView).
cd5699643975 add tools: layout and specification tool
ca
parents: 161
diff changeset
   801
        self modifiedChannel value:false.
cd5699643975 add tools: layout and specification tool
ca
parents: 161
diff changeset
   802
    ]
137
ca
parents: 136
diff changeset
   803
!
ca
parents: 136
diff changeset
   804
ca
parents: 136
diff changeset
   805
doubleClick
ca
parents: 136
diff changeset
   806
    objectList selectGroup
60
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
   807
! !
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
   808
149
e652608690b1 help ...
ca
parents: 144
diff changeset
   809
!UIPainter methodsFor:'active help'!
e652608690b1 help ...
ca
parents: 144
diff changeset
   810
171
7a99c53780ef help and close/raise of gallery/painter
ca
parents: 168
diff changeset
   811
activeHelpApplicationClass
7a99c53780ef help and close/raise of gallery/painter
ca
parents: 168
diff changeset
   812
    "gets application class keeping the associated help component
7a99c53780ef help and close/raise of gallery/painter
ca
parents: 168
diff changeset
   813
    "
7a99c53780ef help and close/raise of gallery/painter
ca
parents: 168
diff changeset
   814
    |cls|
7a99c53780ef help and close/raise of gallery/painter
ca
parents: 168
diff changeset
   815
7a99c53780ef help and close/raise of gallery/painter
ca
parents: 168
diff changeset
   816
    specClass notNil ifTrue:[
7a99c53780ef help and close/raise of gallery/painter
ca
parents: 168
diff changeset
   817
        specClass isBehavior ifFalse:[cls := Smalltalk at:specClass asSymbol]
7a99c53780ef help and close/raise of gallery/painter
ca
parents: 168
diff changeset
   818
                              ifTrue:[cls := specClass].
7a99c53780ef help and close/raise of gallery/painter
ca
parents: 168
diff changeset
   819
187
fa52e7ad5cb2 pullDownMenu
ca
parents: 183
diff changeset
   820
        (cls includesBehavior:UISpecification) ifTrue:[
171
7a99c53780ef help and close/raise of gallery/painter
ca
parents: 168
diff changeset
   821
            cls := UISpecificationTool
7a99c53780ef help and close/raise of gallery/painter
ca
parents: 168
diff changeset
   822
        ]
7a99c53780ef help and close/raise of gallery/painter
ca
parents: 168
diff changeset
   823
    ].
7a99c53780ef help and close/raise of gallery/painter
ca
parents: 168
diff changeset
   824
  ^ cls
7a99c53780ef help and close/raise of gallery/painter
ca
parents: 168
diff changeset
   825
!
7a99c53780ef help and close/raise of gallery/painter
ca
parents: 168
diff changeset
   826
149
e652608690b1 help ...
ca
parents: 144
diff changeset
   827
activeHelpTool
152
ca
parents: 149
diff changeset
   828
    |cls|
ca
parents: 149
diff changeset
   829
149
e652608690b1 help ...
ca
parents: 144
diff changeset
   830
    activeHelpTool isNil ifTrue:[
152
ca
parents: 149
diff changeset
   831
        activeHelpTool := UIHelpTool new.
ca
parents: 149
diff changeset
   832
171
7a99c53780ef help and close/raise of gallery/painter
ca
parents: 168
diff changeset
   833
        (cls := self activeHelpApplicationClass) notNil ifTrue:[
166
cd5699643975 add tools: layout and specification tool
ca
parents: 161
diff changeset
   834
            activeHelpTool dictionary:(cls helpSpec).
171
7a99c53780ef help and close/raise of gallery/painter
ca
parents: 168
diff changeset
   835
        ]
149
e652608690b1 help ...
ca
parents: 144
diff changeset
   836
    ].
e652608690b1 help ...
ca
parents: 144
diff changeset
   837
    ^ activeHelpTool
e652608690b1 help ...
ca
parents: 144
diff changeset
   838
!
e652608690b1 help ...
ca
parents: 144
diff changeset
   839
e652608690b1 help ...
ca
parents: 144
diff changeset
   840
showHelp:aHelpText for:view
e652608690b1 help ...
ca
parents: 144
diff changeset
   841
    "hook to allow an application to display active help
e652608690b1 help ...
ca
parents: 144
diff changeset
   842
     texts in its own info area.
e652608690b1 help ...
ca
parents: 144
diff changeset
   843
     This method may be redefined in a concrete application.
e652608690b1 help ...
ca
parents: 144
diff changeset
   844
     If it returns false, the ActiveHelp manager will popup a
e652608690b1 help ...
ca
parents: 144
diff changeset
   845
     bubble with the help text."
e652608690b1 help ...
ca
parents: 144
diff changeset
   846
e652608690b1 help ...
ca
parents: 144
diff changeset
   847
    |l|
e652608690b1 help ...
ca
parents: 144
diff changeset
   848
e652608690b1 help ...
ca
parents: 144
diff changeset
   849
    (l := self builder componentAt:#helpInfo) notNil ifTrue:[
152
ca
parents: 149
diff changeset
   850
        aHelpText replaceAll:(Character cr) by:(Character space).
149
e652608690b1 help ...
ca
parents: 144
diff changeset
   851
        l label:aHelpText.
152
ca
parents: 149
diff changeset
   852
      ^ true.
149
e652608690b1 help ...
ca
parents: 144
diff changeset
   853
    ].
e652608690b1 help ...
ca
parents: 144
diff changeset
   854
    ^ false
e652608690b1 help ...
ca
parents: 144
diff changeset
   855
e652608690b1 help ...
ca
parents: 144
diff changeset
   856
e652608690b1 help ...
ca
parents: 144
diff changeset
   857
! !
e652608690b1 help ...
ca
parents: 144
diff changeset
   858
60
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
   859
!UIPainter methodsFor:'aspects'!
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
   860
118
bc196200ea8b enabled and style
ca
parents: 114
diff changeset
   861
enableChannel
bc196200ea8b enabled and style
ca
parents: 114
diff changeset
   862
    "true if modifications are allowed otherwise running test
bc196200ea8b enabled and style
ca
parents: 114
diff changeset
   863
    "
bc196200ea8b enabled and style
ca
parents: 114
diff changeset
   864
  ^ self painter enableChannel
109
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
   865
!
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
   866
173
a8468f4e83f0 show/hide painter/gallery
ca
parents: 171
diff changeset
   867
galleryShown
a8468f4e83f0 show/hide painter/gallery
ca
parents: 171
diff changeset
   868
    |holder|
a8468f4e83f0 show/hide painter/gallery
ca
parents: 171
diff changeset
   869
a8468f4e83f0 show/hide painter/gallery
ca
parents: 171
diff changeset
   870
    (holder := builder bindingAt:#galleryShown) isNil ifTrue:[
a8468f4e83f0 show/hide painter/gallery
ca
parents: 171
diff changeset
   871
        builder aspectAt:#galleryShown put:(holder :=  true asValue).
a8468f4e83f0 show/hide painter/gallery
ca
parents: 171
diff changeset
   872
        holder addDependent:self
a8468f4e83f0 show/hide painter/gallery
ca
parents: 171
diff changeset
   873
    ].
a8468f4e83f0 show/hide painter/gallery
ca
parents: 171
diff changeset
   874
    ^ holder
a8468f4e83f0 show/hide painter/gallery
ca
parents: 171
diff changeset
   875
a8468f4e83f0 show/hide painter/gallery
ca
parents: 171
diff changeset
   876
!
a8468f4e83f0 show/hide painter/gallery
ca
parents: 171
diff changeset
   877
118
bc196200ea8b enabled and style
ca
parents: 114
diff changeset
   878
menuAlignment
bc196200ea8b enabled and style
ca
parents: 114
diff changeset
   879
    |menu channel|
bc196200ea8b enabled and style
ca
parents: 114
diff changeset
   880
bc196200ea8b enabled and style
ca
parents: 114
diff changeset
   881
    channel := self enableChannel.
bc196200ea8b enabled and style
ca
parents: 114
diff changeset
   882
bc196200ea8b enabled and style
ca
parents: 114
diff changeset
   883
    menu := Menu new.
bc196200ea8b enabled and style
ca
parents: 114
diff changeset
   884
    menu fromLiteralArrayEncoding:(self class menuAlignment).
bc196200ea8b enabled and style
ca
parents: 114
diff changeset
   885
    menu receiver:self.
bc196200ea8b enabled and style
ca
parents: 114
diff changeset
   886
    menu menuItems do:[:anItem| anItem enabled:channel].
bc196200ea8b enabled and style
ca
parents: 114
diff changeset
   887
  ^ menu
bc196200ea8b enabled and style
ca
parents: 114
diff changeset
   888
!
bc196200ea8b enabled and style
ca
parents: 114
diff changeset
   889
bc196200ea8b enabled and style
ca
parents: 114
diff changeset
   890
menuPullDown
bc196200ea8b enabled and style
ca
parents: 114
diff changeset
   891
    |menu channel|
bc196200ea8b enabled and style
ca
parents: 114
diff changeset
   892
bc196200ea8b enabled and style
ca
parents: 114
diff changeset
   893
    channel := self enableChannel.
bc196200ea8b enabled and style
ca
parents: 114
diff changeset
   894
bc196200ea8b enabled and style
ca
parents: 114
diff changeset
   895
    menu := Menu new.
bc196200ea8b enabled and style
ca
parents: 114
diff changeset
   896
    menu fromLiteralArrayEncoding:(self class menuPullDown).
bc196200ea8b enabled and style
ca
parents: 114
diff changeset
   897
    menu receiver:self.
bc196200ea8b enabled and style
ca
parents: 114
diff changeset
   898
bc196200ea8b enabled and style
ca
parents: 114
diff changeset
   899
    menu menuItems do:[:anItem| 
bc196200ea8b enabled and style
ca
parents: 114
diff changeset
   900
        anItem nameKey ~~ #test ifTrue:[anItem enabled:channel]
133
e12f82d3afb7 popup box caused by a closeRequest with still open
ca
parents: 130
diff changeset
   901
                               ifFalse:[anItem value:channel].
118
bc196200ea8b enabled and style
ca
parents: 114
diff changeset
   902
    ].
bc196200ea8b enabled and style
ca
parents: 114
diff changeset
   903
  ^ menu
109
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
   904
!
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
   905
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
   906
modifiedChannel
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
   907
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
   908
    |holder|
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
   909
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
   910
    (holder := builder bindingAt:#modifiedChannel) isNil ifTrue:[
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
   911
        builder aspectAt:#modifiedChannel put:(holder :=  false asValue).
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
   912
    ].
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
   913
    ^ holder
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
   914
!
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
   915
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
   916
noteBookView
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
   917
    "automatically generated by UIPainter ..."
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
   918
166
cd5699643975 add tools: layout and specification tool
ca
parents: 161
diff changeset
   919
    |noteBook channel n1 n2|
109
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
   920
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
   921
    (noteBook := builder bindingAt:#noteBookView) isNil ifTrue:[
166
cd5699643975 add tools: layout and specification tool
ca
parents: 161
diff changeset
   922
        noteBook   := View new.
cd5699643975 add tools: layout and specification tool
ca
parents: 161
diff changeset
   923
        layoutTool := UILayoutTool new.
cd5699643975 add tools: layout and specification tool
ca
parents: 161
diff changeset
   924
        specTool   := UISpecificationTool new.
144
bca8b1953ee8 checkin from browser
ca
parents: 142
diff changeset
   925
        channel    := self modifiedChannel.
166
cd5699643975 add tools: layout and specification tool
ca
parents: 161
diff changeset
   926
152
ca
parents: 149
diff changeset
   927
        layoutTool masterApplication:self.
166
cd5699643975 add tools: layout and specification tool
ca
parents: 161
diff changeset
   928
        specTool   masterApplication:self.
cd5699643975 add tools: layout and specification tool
ca
parents: 161
diff changeset
   929
cd5699643975 add tools: layout and specification tool
ca
parents: 161
diff changeset
   930
        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
   931
        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
   932
cd5699643975 add tools: layout and specification tool
ca
parents: 161
diff changeset
   933
        n1 client:layoutTool.
cd5699643975 add tools: layout and specification tool
ca
parents: 161
diff changeset
   934
        specTool builder:(n2 client:specTool).
cd5699643975 add tools: layout and specification tool
ca
parents: 161
diff changeset
   935
cd5699643975 add tools: layout and specification tool
ca
parents: 161
diff changeset
   936
        layoutTool masterApplication:self.
cd5699643975 add tools: layout and specification tool
ca
parents: 161
diff changeset
   937
        specTool   masterApplication:self.
109
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
   938
        layoutTool modifiedHolder:channel.
166
cd5699643975 add tools: layout and specification tool
ca
parents: 161
diff changeset
   939
        specTool   modifiedHolder:channel.
109
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
   940
        builder aspectAt:#noteBookView put:noteBook.
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
   941
    ].
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
   942
    ^ noteBook
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
   943
!
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
   944
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
   945
objectList
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
   946
    ^ objectList
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
   947
!
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
   948
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
   949
objectListMenu
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
   950
    "returns a block which returns the menu
114
93cd25c62a68 menu and handling
ca
parents: 109
diff changeset
   951
     !!hack!!
109
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
   952
    "
121
96d6feeeb049 middleButtonMen:
ca
parents: 118
diff changeset
   953
    ^ [ self painter showMiddleButtonMenu ].
109
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
   954
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
   955
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
   956
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
   957
!
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
   958
173
a8468f4e83f0 show/hide painter/gallery
ca
parents: 171
diff changeset
   959
painterShown
a8468f4e83f0 show/hide painter/gallery
ca
parents: 171
diff changeset
   960
    |holder|
a8468f4e83f0 show/hide painter/gallery
ca
parents: 171
diff changeset
   961
a8468f4e83f0 show/hide painter/gallery
ca
parents: 171
diff changeset
   962
    (holder := builder bindingAt:#painterShown) isNil ifTrue:[
a8468f4e83f0 show/hide painter/gallery
ca
parents: 171
diff changeset
   963
        builder aspectAt:#painterShown put:(holder :=  true asValue).
a8468f4e83f0 show/hide painter/gallery
ca
parents: 171
diff changeset
   964
        holder addDependent:self
a8468f4e83f0 show/hide painter/gallery
ca
parents: 171
diff changeset
   965
    ].
a8468f4e83f0 show/hide painter/gallery
ca
parents: 171
diff changeset
   966
    ^ holder
a8468f4e83f0 show/hide painter/gallery
ca
parents: 171
diff changeset
   967
a8468f4e83f0 show/hide painter/gallery
ca
parents: 171
diff changeset
   968
!
a8468f4e83f0 show/hide painter/gallery
ca
parents: 171
diff changeset
   969
109
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
   970
tabList
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
   971
    "automatically generated by UIPainter ..."
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
   972
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
   973
    |holder|
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
   974
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
   975
    (holder := builder bindingAt:#tabList) isNil ifTrue:[
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
   976
        builder aspectAt:#tabList put:(holder :=  ValueHolder new).
144
bca8b1953ee8 checkin from browser
ca
parents: 142
diff changeset
   977
        holder value:#( 'Properties' ).
109
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
   978
    ].
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
   979
    ^ holder
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
   980
!
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
   981
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
   982
tabModel
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
   983
    "automatically generated by UIPainter ..."
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
   984
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
   985
    |holder|
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
   986
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
   987
    (holder := builder bindingAt:#tabModel) isNil ifTrue:[
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
   988
        holder := AspectAdaptor new subject:self; forAspect:#tabSelection.
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
   989
        builder aspectAt:#tabModel put:holder.
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
   990
    ].
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
   991
    ^ holder
60
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
   992
! !
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
   993
109
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
   994
!UIPainter methodsFor:'binding access'!
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
   995
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
   996
aspectFor:aKey
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
   997
    "check wether aspect is assigned to a label icon
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
   998
    "
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
   999
    (aKey startsWith:'LABEL') ifFalse:[
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
  1000
        ^ aspects at:aKey ifAbsent:[ super aspectFor:aKey ]
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
  1001
    ].
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
  1002
  ^ Image fromFile:(aKey copyFrom:(('LABEL' size) + 1))
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
  1003
! !
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
  1004
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
  1005
!UIPainter methodsFor:'change & update'!
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
  1006
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
  1007
update:something with:aParameter from:someObject
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
  1008
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
  1009
    (someObject == objectList and:[something ~~ #list]) ifTrue:[
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
  1010
        something ~~ #layout ifTrue:[
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
  1011
            self objectListChanged
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
  1012
        ] ifFalse:[
166
cd5699643975 add tools: layout and specification tool
ca
parents: 161
diff changeset
  1013
            self modifiedChannel value ifTrue:[
cd5699643975 add tools: layout and specification tool
ca
parents: 161
diff changeset
  1014
                ^ self
cd5699643975 add tools: layout and specification tool
ca
parents: 161
diff changeset
  1015
            ].
cd5699643975 add tools: layout and specification tool
ca
parents: 161
diff changeset
  1016
            layoutTool update
cd5699643975 add tools: layout and specification tool
ca
parents: 161
diff changeset
  1017
        ].
173
a8468f4e83f0 show/hide painter/gallery
ca
parents: 171
diff changeset
  1018
      ^ self modifiedChannel value:false
a8468f4e83f0 show/hide painter/gallery
ca
parents: 171
diff changeset
  1019
    ].
a8468f4e83f0 show/hide painter/gallery
ca
parents: 171
diff changeset
  1020
a8468f4e83f0 show/hide painter/gallery
ca
parents: 171
diff changeset
  1021
    self galleryShown == someObject ifTrue:[
a8468f4e83f0 show/hide painter/gallery
ca
parents: 171
diff changeset
  1022
        (self galleryShown value) ifTrue:[
a8468f4e83f0 show/hide painter/gallery
ca
parents: 171
diff changeset
  1023
            self raiseUIView:(selectionPanel window)
a8468f4e83f0 show/hide painter/gallery
ca
parents: 171
diff changeset
  1024
        ] ifFalse:[
a8468f4e83f0 show/hide painter/gallery
ca
parents: 171
diff changeset
  1025
            self hideUIView:(selectionPanel window)
a8468f4e83f0 show/hide painter/gallery
ca
parents: 171
diff changeset
  1026
        ].
a8468f4e83f0 show/hide painter/gallery
ca
parents: 171
diff changeset
  1027
      ^ self
a8468f4e83f0 show/hide painter/gallery
ca
parents: 171
diff changeset
  1028
    ].
a8468f4e83f0 show/hide painter/gallery
ca
parents: 171
diff changeset
  1029
a8468f4e83f0 show/hide painter/gallery
ca
parents: 171
diff changeset
  1030
    self painterShown == someObject ifTrue:[
a8468f4e83f0 show/hide painter/gallery
ca
parents: 171
diff changeset
  1031
        (self painterShown value) ifTrue:[
a8468f4e83f0 show/hide painter/gallery
ca
parents: 171
diff changeset
  1032
            self raiseUIView:(self painter topView)
a8468f4e83f0 show/hide painter/gallery
ca
parents: 171
diff changeset
  1033
        ] ifFalse:[
a8468f4e83f0 show/hide painter/gallery
ca
parents: 171
diff changeset
  1034
            self hideUIView:(self painter topView)
a8468f4e83f0 show/hide painter/gallery
ca
parents: 171
diff changeset
  1035
        ].
a8468f4e83f0 show/hide painter/gallery
ca
parents: 171
diff changeset
  1036
      ^ self
a8468f4e83f0 show/hide painter/gallery
ca
parents: 171
diff changeset
  1037
    ].
a8468f4e83f0 show/hide painter/gallery
ca
parents: 171
diff changeset
  1038
109
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
  1039
! !
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
  1040
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
  1041
!UIPainter methodsFor:'event handling'!
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
  1042
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
  1043
doesNotUnderstand:aMessage
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
  1044
   |painter|
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
  1045
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
  1046
   painter := self painter.
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
  1047
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
  1048
   (painter respondsTo:(aMessage selector)) ifTrue:[
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
  1049
        ^ aMessage sendTo:painter
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
  1050
   ].
149
e652608690b1 help ...
ca
parents: 144
diff changeset
  1051
   super doesNotUnderstand:aMessage
109
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
  1052
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
  1053
!
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
  1054
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
  1055
objectListChanged
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
  1056
    "something changed in the painter view
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
  1057
    "
171
7a99c53780ef help and close/raise of gallery/painter
ca
parents: 168
diff changeset
  1058
    |oldSelection view slices list spec props size nameOfSpec|
109
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
  1059
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
  1060
    props := objectList selectedProperty.
166
cd5699643975 add tools: layout and specification tool
ca
parents: 161
diff changeset
  1061
    oldSelection := tabSelection.
109
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
  1062
    tabSelection := nil.
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
  1063
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
  1064
    props isNil ifFalse:[
144
bca8b1953ee8 checkin from browser
ca
parents: 142
diff changeset
  1065
        view := props view.
bca8b1953ee8 checkin from browser
ca
parents: 142
diff changeset
  1066
        spec := props spec copy.
142
75f927b856f6 update specs; remove color and default values
ca
parents: 137
diff changeset
  1067
166
cd5699643975 add tools: layout and specification tool
ca
parents: 161
diff changeset
  1068
        layoutTool layoutView == view ifFalse:[
144
bca8b1953ee8 checkin from browser
ca
parents: 142
diff changeset
  1069
            slices := spec class slices.
bca8b1953ee8 checkin from browser
ca
parents: 142
diff changeset
  1070
            size   := slices size + 1.
bca8b1953ee8 checkin from browser
ca
parents: 142
diff changeset
  1071
            list   := Array new:size.
bca8b1953ee8 checkin from browser
ca
parents: 142
diff changeset
  1072
            slices keysAndValuesDo:[:i :s|list at:i put:(s first asString)].
166
cd5699643975 add tools: layout and specification tool
ca
parents: 161
diff changeset
  1073
            list at:size put:(layoutTool class label).
144
bca8b1953ee8 checkin from browser
ca
parents: 142
diff changeset
  1074
            (self tabList) value:list.
bca8b1953ee8 checkin from browser
ca
parents: 142
diff changeset
  1075
        ] ifTrue:[
bca8b1953ee8 checkin from browser
ca
parents: 142
diff changeset
  1076
            list := self tabList value
142
75f927b856f6 update specs; remove color and default values
ca
parents: 137
diff changeset
  1077
        ].
166
cd5699643975 add tools: layout and specification tool
ca
parents: 161
diff changeset
  1078
        (list findFirst:[:n| n = oldSelection ]) ~~ 0 ifTrue:[
cd5699643975 add tools: layout and specification tool
ca
parents: 161
diff changeset
  1079
            tabSelection := oldSelection
cd5699643975 add tools: layout and specification tool
ca
parents: 161
diff changeset
  1080
        ] ifFalse:[
cd5699643975 add tools: layout and specification tool
ca
parents: 161
diff changeset
  1081
            tabSelection := list first
171
7a99c53780ef help and close/raise of gallery/painter
ca
parents: 168
diff changeset
  1082
        ].
7a99c53780ef help and close/raise of gallery/painter
ca
parents: 168
diff changeset
  1083
        nameOfSpec := spec class name.
7a99c53780ef help and close/raise of gallery/painter
ca
parents: 168
diff changeset
  1084
    ] ifTrue:[
7a99c53780ef help and close/raise of gallery/painter
ca
parents: 168
diff changeset
  1085
        nameOfSpec := ''
109
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
  1086
    ].
171
7a99c53780ef help and close/raise of gallery/painter
ca
parents: 168
diff changeset
  1087
7a99c53780ef help and close/raise of gallery/painter
ca
parents: 168
diff changeset
  1088
    self showHelp:nameOfSpec for:nil.
7a99c53780ef help and close/raise of gallery/painter
ca
parents: 168
diff changeset
  1089
166
cd5699643975 add tools: layout and specification tool
ca
parents: 161
diff changeset
  1090
    layoutTool layoutView:view.
171
7a99c53780ef help and close/raise of gallery/painter
ca
parents: 168
diff changeset
  1091
    specTool specification:spec.
60
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
  1092
166
cd5699643975 add tools: layout and specification tool
ca
parents: 161
diff changeset
  1093
    tabSelection notNil ifTrue:[
cd5699643975 add tools: layout and specification tool
ca
parents: 161
diff changeset
  1094
        self isLayoutToolSelected ifTrue:[
cd5699643975 add tools: layout and specification tool
ca
parents: 161
diff changeset
  1095
            (self noteBookView subViews at:1) raise
cd5699643975 add tools: layout and specification tool
ca
parents: 161
diff changeset
  1096
        ] ifFalse:[
cd5699643975 add tools: layout and specification tool
ca
parents: 161
diff changeset
  1097
            specTool selection:tabSelection.
cd5699643975 add tools: layout and specification tool
ca
parents: 161
diff changeset
  1098
            (self noteBookView subViews at:2) raise
cd5699643975 add tools: layout and specification tool
ca
parents: 161
diff changeset
  1099
        ]
60
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
  1100
    ].
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
  1101
168
8a79add2260f update notification when tab changed
ca
parents: 166
diff changeset
  1102
    (builder componentAt:#noteBook) setSelection:tabSelection.
166
cd5699643975 add tools: layout and specification tool
ca
parents: 161
diff changeset
  1103
    self modifiedChannel value:false.
60
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
  1104
! !
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
  1105
109
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
  1106
!UIPainter methodsFor:'private'!
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
  1107
173
a8468f4e83f0 show/hide painter/gallery
ca
parents: 171
diff changeset
  1108
hideUIView:aView
a8468f4e83f0 show/hide painter/gallery
ca
parents: 171
diff changeset
  1109
    aView beIndependent.
a8468f4e83f0 show/hide painter/gallery
ca
parents: 171
diff changeset
  1110
    aView unmap.
a8468f4e83f0 show/hide painter/gallery
ca
parents: 171
diff changeset
  1111
!
a8468f4e83f0 show/hide painter/gallery
ca
parents: 171
diff changeset
  1112
109
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
  1113
painter
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
  1114
    ^ objectList painter
173
a8468f4e83f0 show/hide painter/gallery
ca
parents: 171
diff changeset
  1115
!
a8468f4e83f0 show/hide painter/gallery
ca
parents: 171
diff changeset
  1116
a8468f4e83f0 show/hide painter/gallery
ca
parents: 171
diff changeset
  1117
raiseUIView:aView
a8468f4e83f0 show/hide painter/gallery
ca
parents: 171
diff changeset
  1118
    aView map.
a8468f4e83f0 show/hide painter/gallery
ca
parents: 171
diff changeset
  1119
    aView bePartner.
177
eefd69a52f5b fixed setup of class/selector when picking/fetching via
Claus Gittinger <cg@exept.de>
parents: 176
diff changeset
  1120
!
eefd69a52f5b fixed setup of class/selector when picking/fetching via
Claus Gittinger <cg@exept.de>
parents: 176
diff changeset
  1121
eefd69a52f5b fixed setup of class/selector when picking/fetching via
Claus Gittinger <cg@exept.de>
parents: 176
diff changeset
  1122
setClass:cls selector:selector
eefd69a52f5b fixed setup of class/selector when picking/fetching via
Claus Gittinger <cg@exept.de>
parents: 176
diff changeset
  1123
    |clsName superClassName|
eefd69a52f5b fixed setup of class/selector when picking/fetching via
Claus Gittinger <cg@exept.de>
parents: 176
diff changeset
  1124
eefd69a52f5b fixed setup of class/selector when picking/fetching via
Claus Gittinger <cg@exept.de>
parents: 176
diff changeset
  1125
    clsName := cls name.
eefd69a52f5b fixed setup of class/selector when picking/fetching via
Claus Gittinger <cg@exept.de>
parents: 176
diff changeset
  1126
    superClassName := cls superclass name.
eefd69a52f5b fixed setup of class/selector when picking/fetching via
Claus Gittinger <cg@exept.de>
parents: 176
diff changeset
  1127
eefd69a52f5b fixed setup of class/selector when picking/fetching via
Claus Gittinger <cg@exept.de>
parents: 176
diff changeset
  1128
    (self aspectFor:#classNameChannel) value:clsName.
eefd69a52f5b fixed setup of class/selector when picking/fetching via
Claus Gittinger <cg@exept.de>
parents: 176
diff changeset
  1129
    (self aspectFor:#methodNameChannel) value:(selector ? '').
eefd69a52f5b fixed setup of class/selector when picking/fetching via
Claus Gittinger <cg@exept.de>
parents: 176
diff changeset
  1130
    (self aspectFor:#superclassNameChannel) value:superClassName.
eefd69a52f5b fixed setup of class/selector when picking/fetching via
Claus Gittinger <cg@exept.de>
parents: 176
diff changeset
  1131
eefd69a52f5b fixed setup of class/selector when picking/fetching via
Claus Gittinger <cg@exept.de>
parents: 176
diff changeset
  1132
    self painter 
eefd69a52f5b fixed setup of class/selector when picking/fetching via
Claus Gittinger <cg@exept.de>
parents: 176
diff changeset
  1133
            className:clsName 
eefd69a52f5b fixed setup of class/selector when picking/fetching via
Claus Gittinger <cg@exept.de>
parents: 176
diff changeset
  1134
            superclassName:superClassName
eefd69a52f5b fixed setup of class/selector when picking/fetching via
Claus Gittinger <cg@exept.de>
parents: 176
diff changeset
  1135
            selector:(selector ? '').
eefd69a52f5b fixed setup of class/selector when picking/fetching via
Claus Gittinger <cg@exept.de>
parents: 176
diff changeset
  1136
eefd69a52f5b fixed setup of class/selector when picking/fetching via
Claus Gittinger <cg@exept.de>
parents: 176
diff changeset
  1137
    specClass := clsName.
eefd69a52f5b fixed setup of class/selector when picking/fetching via
Claus Gittinger <cg@exept.de>
parents: 176
diff changeset
  1138
    specSelector := (selector ? '').
eefd69a52f5b fixed setup of class/selector when picking/fetching via
Claus Gittinger <cg@exept.de>
parents: 176
diff changeset
  1139
    specSuperclass := superClassName.
eefd69a52f5b fixed setup of class/selector when picking/fetching via
Claus Gittinger <cg@exept.de>
parents: 176
diff changeset
  1140
eefd69a52f5b fixed setup of class/selector when picking/fetching via
Claus Gittinger <cg@exept.de>
parents: 176
diff changeset
  1141
    "Modified: 24.6.1997 / 19:07:01 / cg"
109
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
  1142
! !
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
  1143
166
cd5699643975 add tools: layout and specification tool
ca
parents: 161
diff changeset
  1144
!UIPainter methodsFor:'queries'!
cd5699643975 add tools: layout and specification tool
ca
parents: 161
diff changeset
  1145
cd5699643975 add tools: layout and specification tool
ca
parents: 161
diff changeset
  1146
isHelpToolSelected
cd5699643975 add tools: layout and specification tool
ca
parents: 161
diff changeset
  1147
    ^ tabSelection = 'Help'
cd5699643975 add tools: layout and specification tool
ca
parents: 161
diff changeset
  1148
!
cd5699643975 add tools: layout and specification tool
ca
parents: 161
diff changeset
  1149
cd5699643975 add tools: layout and specification tool
ca
parents: 161
diff changeset
  1150
isLayoutToolSelected
cd5699643975 add tools: layout and specification tool
ca
parents: 161
diff changeset
  1151
    ^ tabSelection = layoutTool class label
cd5699643975 add tools: layout and specification tool
ca
parents: 161
diff changeset
  1152
! !
cd5699643975 add tools: layout and specification tool
ca
parents: 161
diff changeset
  1153
109
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
  1154
!UIPainter methodsFor:'selection'!
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
  1155
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
  1156
tabSelection
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
  1157
    ^ tabSelection
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
  1158
!
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
  1159
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
  1160
tabSelection:something
166
cd5699643975 add tools: layout and specification tool
ca
parents: 161
diff changeset
  1161
    |raiseViewIdx|
121
96d6feeeb049 middleButtonMen:
ca
parents: 118
diff changeset
  1162
166
cd5699643975 add tools: layout and specification tool
ca
parents: 161
diff changeset
  1163
    something notNil ifTrue:[
cd5699643975 add tools: layout and specification tool
ca
parents: 161
diff changeset
  1164
        raiseViewIdx := 1.
cd5699643975 add tools: layout and specification tool
ca
parents: 161
diff changeset
  1165
        tabSelection := something.
109
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
  1166
166
cd5699643975 add tools: layout and specification tool
ca
parents: 161
diff changeset
  1167
        self isLayoutToolSelected ifFalse:[
cd5699643975 add tools: layout and specification tool
ca
parents: 161
diff changeset
  1168
            specTool selection:tabSelection.
cd5699643975 add tools: layout and specification tool
ca
parents: 161
diff changeset
  1169
            raiseViewIdx := 2
121
96d6feeeb049 middleButtonMen:
ca
parents: 118
diff changeset
  1170
        ].
166
cd5699643975 add tools: layout and specification tool
ca
parents: 161
diff changeset
  1171
        (self noteBookView subViews at:raiseViewIdx) raise.
cd5699643975 add tools: layout and specification tool
ca
parents: 161
diff changeset
  1172
        self cancel.
109
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
  1173
    ]
60
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
  1174
! !
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
  1175
109
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
  1176
!UIPainter methodsFor:'startup / release'!
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
  1177
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
  1178
closeRequest
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
  1179
    "close all windows open by builder
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
  1180
    "
133
e12f82d3afb7 popup box caused by a closeRequest with still open
ca
parents: 130
diff changeset
  1181
    |anyUnsavedChanges|
e12f82d3afb7 popup box caused by a closeRequest with still open
ca
parents: 130
diff changeset
  1182
e12f82d3afb7 popup box caused by a closeRequest with still open
ca
parents: 130
diff changeset
  1183
    objectList painter isModified ifTrue:[
e12f82d3afb7 popup box caused by a closeRequest with still open
ca
parents: 130
diff changeset
  1184
        (self confirm:'quit without saving ?') ifFalse:[
e12f82d3afb7 popup box caused by a closeRequest with still open
ca
parents: 130
diff changeset
  1185
            ^ self
e12f82d3afb7 popup box caused by a closeRequest with still open
ca
parents: 130
diff changeset
  1186
        ]
e12f82d3afb7 popup box caused by a closeRequest with still open
ca
parents: 130
diff changeset
  1187
    ].
e12f82d3afb7 popup box caused by a closeRequest with still open
ca
parents: 130
diff changeset
  1188
109
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
  1189
    objectList removeDependent:self.
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
  1190
    objectList painter release.
60
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
  1191
109
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
  1192
    selectionPanel notNil ifTrue:[
183
bb0cc63e2cf1 set masterApllication instead of application
ca
parents: 179
diff changeset
  1193
        selectionPanel masterApplication:nil.
109
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
  1194
        selectionPanel closeRequest
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
  1195
    ].
149
e652608690b1 help ...
ca
parents: 144
diff changeset
  1196
    selectionPanel := nil.
e652608690b1 help ...
ca
parents: 144
diff changeset
  1197
    layoutTool     := nil.
e652608690b1 help ...
ca
parents: 144
diff changeset
  1198
    objectList     := nil.
e652608690b1 help ...
ca
parents: 144
diff changeset
  1199
    activeHelpTool := nil.
e652608690b1 help ...
ca
parents: 144
diff changeset
  1200
109
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
  1201
    super closeRequest.
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
  1202
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
  1203
!
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
  1204
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
  1205
closeRequestFor:aTopView
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
  1206
    "handle a close request for a specific view
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
  1207
    "
173
a8468f4e83f0 show/hide painter/gallery
ca
parents: 171
diff changeset
  1208
    |topView|
60
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
  1209
109
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
  1210
    topView := self window.
60
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
  1211
109
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
  1212
    topView == aTopView ifTrue:[
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
  1213
        super closeRequestFor:aTopView
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
  1214
    ] ifFalse:[
173
a8468f4e83f0 show/hide painter/gallery
ca
parents: 171
diff changeset
  1215
        aTopView = selectionPanel window ifTrue:[
a8468f4e83f0 show/hide painter/gallery
ca
parents: 171
diff changeset
  1216
            self galleryShown value:false
a8468f4e83f0 show/hide painter/gallery
ca
parents: 171
diff changeset
  1217
        ] ifFalse:[
a8468f4e83f0 show/hide painter/gallery
ca
parents: 171
diff changeset
  1218
            self painterShown value:false
a8468f4e83f0 show/hide painter/gallery
ca
parents: 171
diff changeset
  1219
        ].
133
e12f82d3afb7 popup box caused by a closeRequest with still open
ca
parents: 130
diff changeset
  1220
        topView raise.
109
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
  1221
    ].
60
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
  1222
!
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
  1223
109
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
  1224
openInterface
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
  1225
    "open interfaces
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
  1226
    "
136
42a2a4494281 remove postOpen
ca
parents: 133
diff changeset
  1227
    |painterView painter cls topView|
60
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
  1228
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
  1229
    aspects := IdentityDictionary new.
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
  1230
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
  1231
    aspects at:#classNameChannel put:(
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
  1232
        (specClass notNil ifTrue:[specClass]
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
  1233
                         ifFalse:['NewApplication']) asValue
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
  1234
    ).
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
  1235
    specSuperclass isNil ifTrue:[
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
  1236
        specClass notNil ifTrue:[
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
  1237
            (cls := Smalltalk at:specClass asSymbol) notNil ifTrue:[
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
  1238
                specSuperclass := cls superclass name.
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
  1239
            ]
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
  1240
        ]
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
  1241
    ].
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
  1242
    aspects at:#superclassNameChannel put:(
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
  1243
        (specSuperclass notNil ifTrue:[specSuperclass]
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
  1244
                         ifFalse:['ApplicationModel']) asValue
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
  1245
    ).
157
ce974dce3dd4 enhanced class & method dialog
Claus Gittinger <cg@exept.de>
parents: 156
diff changeset
  1246
    aspects at:#superclassNameDefaults put:#('ApplicationModel' 'SimpleDialog') asValue.
60
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
  1247
    aspects at:#methodNameChannel put:(
161
12a70f62f414 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 160
diff changeset
  1248
        (specSelector notNil ifTrue:[specSelector asValue]
60
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
  1249
                            ifFalse:[#windowSpec]) asValue
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
  1250
    ).
136
42a2a4494281 remove postOpen
ca
parents: 133
diff changeset
  1251
42a2a4494281 remove postOpen
ca
parents: 133
diff changeset
  1252
    painterView := StandardSystemView new.
42a2a4494281 remove postOpen
ca
parents: 133
diff changeset
  1253
    painterView label:'unnamed canvas'.
42a2a4494281 remove postOpen
ca
parents: 133
diff changeset
  1254
    painterView extent:300@300.
42a2a4494281 remove postOpen
ca
parents: 133
diff changeset
  1255
42a2a4494281 remove postOpen
ca
parents: 133
diff changeset
  1256
    painter := UIPainterView in:painterView.
109
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
  1257
    painter layout:(0.0 @ 0.0 corner:1.0 @ 1.0) asLayout.
136
42a2a4494281 remove postOpen
ca
parents: 133
diff changeset
  1258
109
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
  1259
    objectList := painter listHolder.
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
  1260
    objectList addDependent:self.
136
42a2a4494281 remove postOpen
ca
parents: 133
diff changeset
  1261
109
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
  1262
    super openInterface.
60
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
  1263
136
42a2a4494281 remove postOpen
ca
parents: 133
diff changeset
  1264
    topView := self window.
42a2a4494281 remove postOpen
ca
parents: 133
diff changeset
  1265
    topView bePartner.
42a2a4494281 remove postOpen
ca
parents: 133
diff changeset
  1266
    topView label:'Interface Builder'.
42a2a4494281 remove postOpen
ca
parents: 133
diff changeset
  1267
    topView icon:(Image fromFile:'bitmaps/Builder.xbm' resolution:100).
42a2a4494281 remove postOpen
ca
parents: 133
diff changeset
  1268
42a2a4494281 remove postOpen
ca
parents: 133
diff changeset
  1269
    painterView openInGroup:(topView windowGroup).
42a2a4494281 remove postOpen
ca
parents: 133
diff changeset
  1270
    painterView bePartner.
42a2a4494281 remove postOpen
ca
parents: 133
diff changeset
  1271
    painterView application:self.
42a2a4494281 remove postOpen
ca
parents: 133
diff changeset
  1272
    painterView open.
42a2a4494281 remove postOpen
ca
parents: 133
diff changeset
  1273
42a2a4494281 remove postOpen
ca
parents: 133
diff changeset
  1274
    painterView application:self.
183
bb0cc63e2cf1 set masterApllication instead of application
ca
parents: 179
diff changeset
  1275
    selectionPanel := UISelectionPanel new.
136
42a2a4494281 remove postOpen
ca
parents: 133
diff changeset
  1276
    selectionPanel allButOpenInterface:#windowSpec.
42a2a4494281 remove postOpen
ca
parents: 133
diff changeset
  1277
    selectionPanel window openInGroup:(topView windowGroup).
42a2a4494281 remove postOpen
ca
parents: 133
diff changeset
  1278
    selectionPanel window bePartner.
42a2a4494281 remove postOpen
ca
parents: 133
diff changeset
  1279
    selectionPanel openWindow.
183
bb0cc63e2cf1 set masterApllication instead of application
ca
parents: 179
diff changeset
  1280
    selectionPanel masterApplication:self.
60
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
  1281
!
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
  1282
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
  1283
openNewWindowCanvas
109
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
  1284
    "open new
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
  1285
    "
60
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
  1286
    self open.
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
  1287
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
  1288
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
  1289
!
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
  1290
109
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
  1291
openOnClass:aClass
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
  1292
    "open up an interface builder
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
  1293
    "
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
  1294
    self openOnClass:aClass andSelector:#windowSpec
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
  1295
!
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
  1296
60
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
  1297
openOnClass:aClass andSelector:aSelector
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
  1298
    "open up an interface builder, fetching a spec from someClass
109
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
  1299
     via some selector
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
  1300
    "
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
  1301
    |painter|
60
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
  1302
157
ce974dce3dd4 enhanced class & method dialog
Claus Gittinger <cg@exept.de>
parents: 156
diff changeset
  1303
    aClass isNil ifTrue:[
ce974dce3dd4 enhanced class & method dialog
Claus Gittinger <cg@exept.de>
parents: 156
diff changeset
  1304
        self warn:'nil class given (class was probably renamed ?)'.
ce974dce3dd4 enhanced class & method dialog
Claus Gittinger <cg@exept.de>
parents: 156
diff changeset
  1305
    ].
ce974dce3dd4 enhanced class & method dialog
Claus Gittinger <cg@exept.de>
parents: 156
diff changeset
  1306
109
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
  1307
    self openInterface.
60
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
  1308
157
ce974dce3dd4 enhanced class & method dialog
Claus Gittinger <cg@exept.de>
parents: 156
diff changeset
  1309
    aClass notNil ifTrue:[
ce974dce3dd4 enhanced class & method dialog
Claus Gittinger <cg@exept.de>
parents: 156
diff changeset
  1310
        painter        := self painter.
60
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
  1311
177
eefd69a52f5b fixed setup of class/selector when picking/fetching via
Claus Gittinger <cg@exept.de>
parents: 176
diff changeset
  1312
        self setClass:aClass selector:aSelector.
eefd69a52f5b fixed setup of class/selector when picking/fetching via
Claus Gittinger <cg@exept.de>
parents: 176
diff changeset
  1313
"/        specClass      := aClass name.
eefd69a52f5b fixed setup of class/selector when picking/fetching via
Claus Gittinger <cg@exept.de>
parents: 176
diff changeset
  1314
"/        specSuperclass := aClass superclass name.
eefd69a52f5b fixed setup of class/selector when picking/fetching via
Claus Gittinger <cg@exept.de>
parents: 176
diff changeset
  1315
"/        specSelector   := aSelector.
eefd69a52f5b fixed setup of class/selector when picking/fetching via
Claus Gittinger <cg@exept.de>
parents: 176
diff changeset
  1316
"/
eefd69a52f5b fixed setup of class/selector when picking/fetching via
Claus Gittinger <cg@exept.de>
parents: 176
diff changeset
  1317
"/        (aspects at:#classNameChannel) value:specClass.
eefd69a52f5b fixed setup of class/selector when picking/fetching via
Claus Gittinger <cg@exept.de>
parents: 176
diff changeset
  1318
"/        (aspects at:#superclassNameChannel) value:specSuperclass.
eefd69a52f5b fixed setup of class/selector when picking/fetching via
Claus Gittinger <cg@exept.de>
parents: 176
diff changeset
  1319
"/        (aspects at:#methodNameChannel) value:specSelector asSymbol.
eefd69a52f5b fixed setup of class/selector when picking/fetching via
Claus Gittinger <cg@exept.de>
parents: 176
diff changeset
  1320
"/
eefd69a52f5b fixed setup of class/selector when picking/fetching via
Claus Gittinger <cg@exept.de>
parents: 176
diff changeset
  1321
"/        painter 
eefd69a52f5b fixed setup of class/selector when picking/fetching via
Claus Gittinger <cg@exept.de>
parents: 176
diff changeset
  1322
"/            className:aClass name 
eefd69a52f5b fixed setup of class/selector when picking/fetching via
Claus Gittinger <cg@exept.de>
parents: 176
diff changeset
  1323
"/            superclassName:aClass superclass name
eefd69a52f5b fixed setup of class/selector when picking/fetching via
Claus Gittinger <cg@exept.de>
parents: 176
diff changeset
  1324
"/            selector:aSelector.
60
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
  1325
195
350f95af5d9d check before sending selector to class
Claus Gittinger <cg@exept.de>
parents: 194
diff changeset
  1326
        (aClass respondsTo:aSelector) ifTrue:[
350f95af5d9d check before sending selector to class
Claus Gittinger <cg@exept.de>
parents: 194
diff changeset
  1327
            painter setupFromSpec:(aClass perform:aSelector).
350f95af5d9d check before sending selector to class
Claus Gittinger <cg@exept.de>
parents: 194
diff changeset
  1328
        ]
157
ce974dce3dd4 enhanced class & method dialog
Claus Gittinger <cg@exept.de>
parents: 156
diff changeset
  1329
    ]
ce974dce3dd4 enhanced class & method dialog
Claus Gittinger <cg@exept.de>
parents: 156
diff changeset
  1330
195
350f95af5d9d check before sending selector to class
Claus Gittinger <cg@exept.de>
parents: 194
diff changeset
  1331
    "Modified: 1.7.1997 / 19:18:54 / cg"
60
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
109
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
  1334
!UIPainter methodsFor:'user interaction - dialog'!
60
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
checkClassAndSelector
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
  1337
    "check for class & superclass"
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
  1338
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
  1339
    |superclass cls|
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
  1340
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
  1341
    specClass isNil ifTrue:[^ false].
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
  1342
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
  1343
    specClass isBehavior ifFalse:[
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
  1344
        cls := Smalltalk at:specClass asSymbol
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
  1345
    ] ifTrue:[
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
  1346
        cls := specClass
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
  1347
    ].
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
  1348
    cls isNil ifTrue:[
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
  1349
        (superclass := Smalltalk at:specSuperclass asSymbol) isNil ifTrue:[
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
  1350
            self warn:'no class named ' , specSuperclass , ' exists.'.
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
  1351
            ^ false.
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
  1352
        ].
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
  1353
        (self confirm:'create ' , specClass , ' ?') ifTrue:[
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
  1354
            superclass subclass:(specClass asSymbol)
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
  1355
                       instanceVariableNames:''
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
  1356
                       classVariableNames:''
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
  1357
                       poolDictionaries:''
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
  1358
                       category:'New-Applications'.
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
  1359
            ^ true.
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
  1360
        ].
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
  1361
        ^ false.
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
  1362
    ].
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
  1363
    cls isBehavior ifFalse:[
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
  1364
        self warn:'a global named ' , specClass , ' exists, but is no class.'.
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
  1365
        ^ false.
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
  1366
    ].
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
  1367
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
  1368
    specSuperclass isBehavior ifFalse:[
179
72eec92090f6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 177
diff changeset
  1369
        specSuperclass isEmpty ifFalse:[
72eec92090f6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 177
diff changeset
  1370
            superclass := Smalltalk at:specSuperclass asSymbol
72eec92090f6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 177
diff changeset
  1371
        ] ifTrue:[
72eec92090f6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 177
diff changeset
  1372
            specSuperclass := nil.
72eec92090f6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 177
diff changeset
  1373
        ]
60
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
  1374
    ] ifTrue:[
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
  1375
        superclass := specSuperclass
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
  1376
    ].
179
72eec92090f6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 177
diff changeset
  1377
60
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
  1378
    specSuperclass notNil ifTrue:[
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
  1379
        superclass isNil ifTrue:[
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
  1380
            self warn:'no class named ' , specSuperclass , ' exists.'.
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
  1381
            ^ false.
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
  1382
        ].
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
  1383
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
  1384
        (cls isSubclassOf:superclass) ifFalse:[
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
  1385
            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
  1386
            ^ false.
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
  1387
        ]
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
  1388
    ].
179
72eec92090f6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 177
diff changeset
  1389
72eec92090f6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 177
diff changeset
  1390
    superclass isNil ifTrue:[
72eec92090f6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 177
diff changeset
  1391
        cls notNil ifTrue:[
72eec92090f6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 177
diff changeset
  1392
            specSuperclass := cls superclass name
72eec92090f6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 177
diff changeset
  1393
        ]
72eec92090f6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 177
diff changeset
  1394
    ].
72eec92090f6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 177
diff changeset
  1395
60
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
  1396
    ^ true
109
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
  1397
179
72eec92090f6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 177
diff changeset
  1398
    "Modified: 25.6.1997 / 13:37:11 / cg"
60
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
  1399
!
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
  1400
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
  1401
defineClassAndSelector
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
  1402
    "launch a dialog to define class, superclass and method"
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
  1403
176
a9e5b1615761 update menu
ca
parents: 174
diff changeset
  1404
    |again tmp|
60
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
  1405
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
  1406
    [
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
  1407
        again := false.
160
622b88baeff6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 157
diff changeset
  1408
176
a9e5b1615761 update menu
ca
parents: 174
diff changeset
  1409
        (tmp := specClass) isNil ifTrue:[tmp := 'NewApplication'].
a9e5b1615761 update menu
ca
parents: 174
diff changeset
  1410
        aspects at:#classNameChannel put:tmp asValue.
a9e5b1615761 update menu
ca
parents: 174
diff changeset
  1411
a9e5b1615761 update menu
ca
parents: 174
diff changeset
  1412
        (tmp := specSelector) isNil ifTrue:[tmp := 'windowSpec'].
a9e5b1615761 update menu
ca
parents: 174
diff changeset
  1413
        aspects at:#methodNameChannel put:tmp asValue.
a9e5b1615761 update menu
ca
parents: 174
diff changeset
  1414
a9e5b1615761 update menu
ca
parents: 174
diff changeset
  1415
        (tmp := specSuperclass) isNil ifTrue:[tmp := 'ApplicationModel'].
a9e5b1615761 update menu
ca
parents: 174
diff changeset
  1416
        aspects at:#superclassNameChannel put:tmp asValue.
160
622b88baeff6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 157
diff changeset
  1417
60
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
  1418
        (self openDialogInterface:#nameAndSelectorSpec) ifTrue:[
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
  1419
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
  1420
            specClass := (self aspectFor:#classNameChannel) value.
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
  1421
            specSelector := (self aspectFor:#methodNameChannel) value.
161
12a70f62f414 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 160
diff changeset
  1422
            specSelector notNil ifTrue:[specSelector := specSelector asSymbol].
60
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
  1423
            specSuperclass := (self aspectFor:#superclassNameChannel) value.
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
  1424
109
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
  1425
            (again := self checkClassAndSelector not) ifFalse:[
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
  1426
                self painter className:specClass
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
  1427
                        superclassName:specSuperclass
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
  1428
                              selector:specSelector.
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
  1429
            ]
60
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
  1430
        ]
109
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
  1431
60
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
  1432
    ] doWhile:[again]
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
  1433
161
12a70f62f414 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 160
diff changeset
  1434
    "Modified: 17.6.1997 / 14:42:02 / cg"
60
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
  1435
! !
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
  1436
109
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
  1437
!UIPainter methodsFor:'user interaction - pullDown'!
60
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
  1438
149
e652608690b1 help ...
ca
parents: 144
diff changeset
  1439
doBrowseAppClass
e652608690b1 help ...
ca
parents: 144
diff changeset
  1440
    "open a browser on the class"
e652608690b1 help ...
ca
parents: 144
diff changeset
  1441
e652608690b1 help ...
ca
parents: 144
diff changeset
  1442
    |cls|
e652608690b1 help ...
ca
parents: 144
diff changeset
  1443
e652608690b1 help ...
ca
parents: 144
diff changeset
  1444
    specClass isNil ifTrue:[
e652608690b1 help ...
ca
parents: 144
diff changeset
  1445
        ^ self information:'no class yet'.
e652608690b1 help ...
ca
parents: 144
diff changeset
  1446
    ].
e652608690b1 help ...
ca
parents: 144
diff changeset
  1447
e652608690b1 help ...
ca
parents: 144
diff changeset
  1448
    specClass isBehavior ifFalse:[
e652608690b1 help ...
ca
parents: 144
diff changeset
  1449
        cls := Smalltalk at:specClass asSymbol
e652608690b1 help ...
ca
parents: 144
diff changeset
  1450
    ] ifTrue:[
e652608690b1 help ...
ca
parents: 144
diff changeset
  1451
        cls := specClass
e652608690b1 help ...
ca
parents: 144
diff changeset
  1452
    ].
e652608690b1 help ...
ca
parents: 144
diff changeset
  1453
e652608690b1 help ...
ca
parents: 144
diff changeset
  1454
    cls isNil ifTrue:[
e652608690b1 help ...
ca
parents: 144
diff changeset
  1455
        ^ self information:'no class yet'.
e652608690b1 help ...
ca
parents: 144
diff changeset
  1456
    ].
e652608690b1 help ...
ca
parents: 144
diff changeset
  1457
e652608690b1 help ...
ca
parents: 144
diff changeset
  1458
    SystemBrowser openInClass:cls
e652608690b1 help ...
ca
parents: 144
diff changeset
  1459
e652608690b1 help ...
ca
parents: 144
diff changeset
  1460
e652608690b1 help ...
ca
parents: 144
diff changeset
  1461
!
e652608690b1 help ...
ca
parents: 144
diff changeset
  1462
60
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
  1463
doFromClass
155
575239b7ad0b confirm pick/new/fromClass if unsaved & modified
Claus Gittinger <cg@exept.de>
parents: 152
diff changeset
  1464
    |className methodName cls sel accepted failed spec s painter|
109
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
  1465
155
575239b7ad0b confirm pick/new/fromClass if unsaved & modified
Claus Gittinger <cg@exept.de>
parents: 152
diff changeset
  1466
    objectList painter isModified ifTrue:[
575239b7ad0b confirm pick/new/fromClass if unsaved & modified
Claus Gittinger <cg@exept.de>
parents: 152
diff changeset
  1467
        (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
  1468
            ^ self
575239b7ad0b confirm pick/new/fromClass if unsaved & modified
Claus Gittinger <cg@exept.de>
parents: 152
diff changeset
  1469
        ]
575239b7ad0b confirm pick/new/fromClass if unsaved & modified
Claus Gittinger <cg@exept.de>
parents: 152
diff changeset
  1470
    ].
60
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
  1471
177
eefd69a52f5b fixed setup of class/selector when picking/fetching via
Claus Gittinger <cg@exept.de>
parents: 176
diff changeset
  1472
    className  := (specClass ? '') asValue.
eefd69a52f5b fixed setup of class/selector when picking/fetching via
Claus Gittinger <cg@exept.de>
parents: 176
diff changeset
  1473
    methodName := (specSelector ? '') asValue.
155
575239b7ad0b confirm pick/new/fromClass if unsaved & modified
Claus Gittinger <cg@exept.de>
parents: 152
diff changeset
  1474
    painter    := self painter.
575239b7ad0b confirm pick/new/fromClass if unsaved & modified
Claus Gittinger <cg@exept.de>
parents: 152
diff changeset
  1475
575239b7ad0b confirm pick/new/fromClass if unsaved & modified
Claus Gittinger <cg@exept.de>
parents: 152
diff changeset
  1476
    (s := painter className) notNil ifTrue:[
575239b7ad0b confirm pick/new/fromClass if unsaved & modified
Claus Gittinger <cg@exept.de>
parents: 152
diff changeset
  1477
        className value:s
575239b7ad0b confirm pick/new/fromClass if unsaved & modified
Claus Gittinger <cg@exept.de>
parents: 152
diff changeset
  1478
    ].
575239b7ad0b confirm pick/new/fromClass if unsaved & modified
Claus Gittinger <cg@exept.de>
parents: 152
diff changeset
  1479
    (s := painter methodName) notNil ifTrue:[
575239b7ad0b confirm pick/new/fromClass if unsaved & modified
Claus Gittinger <cg@exept.de>
parents: 152
diff changeset
  1480
        methodName value:s
575239b7ad0b confirm pick/new/fromClass if unsaved & modified
Claus Gittinger <cg@exept.de>
parents: 152
diff changeset
  1481
    ].
60
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
  1482
155
575239b7ad0b confirm pick/new/fromClass if unsaved & modified
Claus Gittinger <cg@exept.de>
parents: 152
diff changeset
  1483
    failed := false.
575239b7ad0b confirm pick/new/fromClass if unsaved & modified
Claus Gittinger <cg@exept.de>
parents: 152
diff changeset
  1484
    [
575239b7ad0b confirm pick/new/fromClass if unsaved & modified
Claus Gittinger <cg@exept.de>
parents: 152
diff changeset
  1485
        accepted :=
575239b7ad0b confirm pick/new/fromClass if unsaved & modified
Claus Gittinger <cg@exept.de>
parents: 152
diff changeset
  1486
            (DialogBox new
575239b7ad0b confirm pick/new/fromClass if unsaved & modified
Claus Gittinger <cg@exept.de>
parents: 152
diff changeset
  1487
                addTextLabel:'Classes name:';
575239b7ad0b confirm pick/new/fromClass if unsaved & modified
Claus Gittinger <cg@exept.de>
parents: 152
diff changeset
  1488
                addInputFieldOn:className; 
575239b7ad0b confirm pick/new/fromClass if unsaved & modified
Claus Gittinger <cg@exept.de>
parents: 152
diff changeset
  1489
                addVerticalSpace;
575239b7ad0b confirm pick/new/fromClass if unsaved & modified
Claus Gittinger <cg@exept.de>
parents: 152
diff changeset
  1490
                addTextLabel:'methods name:';
575239b7ad0b confirm pick/new/fromClass if unsaved & modified
Claus Gittinger <cg@exept.de>
parents: 152
diff changeset
  1491
                addInputFieldOn:methodName; 
575239b7ad0b confirm pick/new/fromClass if unsaved & modified
Claus Gittinger <cg@exept.de>
parents: 152
diff changeset
  1492
                addAbortButton; 
575239b7ad0b confirm pick/new/fromClass if unsaved & modified
Claus Gittinger <cg@exept.de>
parents: 152
diff changeset
  1493
                addOkButton; 
575239b7ad0b confirm pick/new/fromClass if unsaved & modified
Claus Gittinger <cg@exept.de>
parents: 152
diff changeset
  1494
                open
575239b7ad0b confirm pick/new/fromClass if unsaved & modified
Claus Gittinger <cg@exept.de>
parents: 152
diff changeset
  1495
            ) accepted.
575239b7ad0b confirm pick/new/fromClass if unsaved & modified
Claus Gittinger <cg@exept.de>
parents: 152
diff changeset
  1496
575239b7ad0b confirm pick/new/fromClass if unsaved & modified
Claus Gittinger <cg@exept.de>
parents: 152
diff changeset
  1497
         accepted ifTrue:[
575239b7ad0b confirm pick/new/fromClass if unsaved & modified
Claus Gittinger <cg@exept.de>
parents: 152
diff changeset
  1498
            cls := Smalltalk classNamed:className value.
575239b7ad0b confirm pick/new/fromClass if unsaved & modified
Claus Gittinger <cg@exept.de>
parents: 152
diff changeset
  1499
            cls isNil ifTrue:[
575239b7ad0b confirm pick/new/fromClass if unsaved & modified
Claus Gittinger <cg@exept.de>
parents: 152
diff changeset
  1500
                failed := true.
575239b7ad0b confirm pick/new/fromClass if unsaved & modified
Claus Gittinger <cg@exept.de>
parents: 152
diff changeset
  1501
                self warn:'no such class'.
575239b7ad0b confirm pick/new/fromClass if unsaved & modified
Claus Gittinger <cg@exept.de>
parents: 152
diff changeset
  1502
            ] ifFalse:[
575239b7ad0b confirm pick/new/fromClass if unsaved & modified
Claus Gittinger <cg@exept.de>
parents: 152
diff changeset
  1503
                sel := methodName value asSymbol.
575239b7ad0b confirm pick/new/fromClass if unsaved & modified
Claus Gittinger <cg@exept.de>
parents: 152
diff changeset
  1504
                (cls respondsTo:sel ) ifFalse:[
60
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
  1505
                    failed := true.
155
575239b7ad0b confirm pick/new/fromClass if unsaved & modified
Claus Gittinger <cg@exept.de>
parents: 152
diff changeset
  1506
                    self warn:'no such method'
575239b7ad0b confirm pick/new/fromClass if unsaved & modified
Claus Gittinger <cg@exept.de>
parents: 152
diff changeset
  1507
                ] ifTrue:[
575239b7ad0b confirm pick/new/fromClass if unsaved & modified
Claus Gittinger <cg@exept.de>
parents: 152
diff changeset
  1508
                    spec := cls perform:sel.
575239b7ad0b confirm pick/new/fromClass if unsaved & modified
Claus Gittinger <cg@exept.de>
parents: 152
diff changeset
  1509
                    spec isArray ifFalse:[
60
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
  1510
                        failed := true.
155
575239b7ad0b confirm pick/new/fromClass if unsaved & modified
Claus Gittinger <cg@exept.de>
parents: 152
diff changeset
  1511
                        self warn:'not a windowSpec method'    
575239b7ad0b confirm pick/new/fromClass if unsaved & modified
Claus Gittinger <cg@exept.de>
parents: 152
diff changeset
  1512
                    ].
575239b7ad0b confirm pick/new/fromClass if unsaved & modified
Claus Gittinger <cg@exept.de>
parents: 152
diff changeset
  1513
                    "/ ok, got it
177
eefd69a52f5b fixed setup of class/selector when picking/fetching via
Claus Gittinger <cg@exept.de>
parents: 176
diff changeset
  1514
                
eefd69a52f5b fixed setup of class/selector when picking/fetching via
Claus Gittinger <cg@exept.de>
parents: 176
diff changeset
  1515
                    self setClass:cls selector:sel.
eefd69a52f5b fixed setup of class/selector when picking/fetching via
Claus Gittinger <cg@exept.de>
parents: 176
diff changeset
  1516
155
575239b7ad0b confirm pick/new/fromClass if unsaved & modified
Claus Gittinger <cg@exept.de>
parents: 152
diff changeset
  1517
                    painter setupFromSpec:spec.
177
eefd69a52f5b fixed setup of class/selector when picking/fetching via
Claus Gittinger <cg@exept.de>
parents: 176
diff changeset
  1518
eefd69a52f5b fixed setup of class/selector when picking/fetching via
Claus Gittinger <cg@exept.de>
parents: 176
diff changeset
  1519
                    ^ self
155
575239b7ad0b confirm pick/new/fromClass if unsaved & modified
Claus Gittinger <cg@exept.de>
parents: 152
diff changeset
  1520
                 ]
575239b7ad0b confirm pick/new/fromClass if unsaved & modified
Claus Gittinger <cg@exept.de>
parents: 152
diff changeset
  1521
            ]
575239b7ad0b confirm pick/new/fromClass if unsaved & modified
Claus Gittinger <cg@exept.de>
parents: 152
diff changeset
  1522
         ]
575239b7ad0b confirm pick/new/fromClass if unsaved & modified
Claus Gittinger <cg@exept.de>
parents: 152
diff changeset
  1523
    ] doWhile:[accepted and:[failed]].
60
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
  1524
177
eefd69a52f5b fixed setup of class/selector when picking/fetching via
Claus Gittinger <cg@exept.de>
parents: 176
diff changeset
  1525
    "Modified: 24.6.1997 / 18:59:29 / cg"
60
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
  1526
!
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
  1527
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
  1528
doInstallAspects
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
  1529
    |code|
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
  1530
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
  1531
    (specClass isNil or:[specSelector isNil]) ifTrue:[
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
  1532
        self defineClassAndSelector
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
  1533
    ].
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
  1534
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
  1535
    self checkClassAndSelector ifFalse:[
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
  1536
        ^ self
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
  1537
    ].
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
  1538
109
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
  1539
    self painter className:specClass
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
  1540
        superclassName:specSuperclass
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
  1541
              selector:specSelector.
60
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
  1542
109
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
  1543
    code := self painter generateAspectMethods.
60
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
  1544
    (ReadStream on:code) fileIn.
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
  1545
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
  1546
!
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
  1547
152
ca
parents: 149
diff changeset
  1548
doInstallHelp
ca
parents: 149
diff changeset
  1549
    |dict cls src|
ca
parents: 149
diff changeset
  1550
171
7a99c53780ef help and close/raise of gallery/painter
ca
parents: 168
diff changeset
  1551
    cls := self activeHelpApplicationClass.
152
ca
parents: 149
diff changeset
  1552
ca
parents: 149
diff changeset
  1553
    cls isNil ifTrue:[
171
7a99c53780ef help and close/raise of gallery/painter
ca
parents: 168
diff changeset
  1554
        ^ self information:'no application class defined'
152
ca
parents: 149
diff changeset
  1555
    ].
ca
parents: 149
diff changeset
  1556
ca
parents: 149
diff changeset
  1557
    activeHelpTool isNil ifTrue:[
ca
parents: 149
diff changeset
  1558
        ^ self information:'no help text defined'
ca
parents: 149
diff changeset
  1559
    ].    
ca
parents: 149
diff changeset
  1560
    dict := activeHelpTool dictionary.
171
7a99c53780ef help and close/raise of gallery/painter
ca
parents: 168
diff changeset
  1561
    src  := '' writeStream.
7a99c53780ef help and close/raise of gallery/painter
ca
parents: 168
diff changeset
  1562
7a99c53780ef help and close/raise of gallery/painter
ca
parents: 168
diff changeset
  1563
    src nextPutAll:
152
ca
parents: 149
diff changeset
  1564
171
7a99c53780ef help and close/raise of gallery/painter
ca
parents: 168
diff changeset
  1565
'helpSpec
152
ca
parents: 149
diff changeset
  1566
    "return a dictionary filled with helpKey -> helptext associations.
171
7a99c53780ef help and close/raise of gallery/painter
ca
parents: 168
diff changeset
  1567
     These are used by the activeHelp tool.
7a99c53780ef help and close/raise of gallery/painter
ca
parents: 168
diff changeset
  1568
    "
7a99c53780ef help and close/raise of gallery/painter
ca
parents: 168
diff changeset
  1569
  ^ super helpSpec addPairsFrom:#(
152
ca
parents: 149
diff changeset
  1570
ca
parents: 149
diff changeset
  1571
'.
ca
parents: 149
diff changeset
  1572
171
7a99c53780ef help and close/raise of gallery/painter
ca
parents: 168
diff changeset
  1573
    dict keysAndValuesDo:[:key :txt|
152
ca
parents: 149
diff changeset
  1574
        |t|
171
7a99c53780ef help and close/raise of gallery/painter
ca
parents: 168
diff changeset
  1575
        src nextPutLine:key storeString.
7a99c53780ef help and close/raise of gallery/painter
ca
parents: 168
diff changeset
  1576
        
152
ca
parents: 149
diff changeset
  1577
        t := txt asString.
171
7a99c53780ef help and close/raise of gallery/painter
ca
parents: 168
diff changeset
  1578
        (t endsWith:Character cr) ifTrue:[
7a99c53780ef help and close/raise of gallery/painter
ca
parents: 168
diff changeset
  1579
            t := t copyWithoutLast:1
7a99c53780ef help and close/raise of gallery/painter
ca
parents: 168
diff changeset
  1580
        ].
7a99c53780ef help and close/raise of gallery/painter
ca
parents: 168
diff changeset
  1581
        src nextPutLine:t storeString; cr.
152
ca
parents: 149
diff changeset
  1582
    ].
171
7a99c53780ef help and close/raise of gallery/painter
ca
parents: 168
diff changeset
  1583
    src nextPutLine:')'.
152
ca
parents: 149
diff changeset
  1584
    src := src contents.
ca
parents: 149
diff changeset
  1585
    Compiler compile:src forClass:cls class inCategory:'help specs'
ca
parents: 149
diff changeset
  1586
!
ca
parents: 149
diff changeset
  1587
60
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
  1588
doInstallSpec
176
a9e5b1615761 update menu
ca
parents: 174
diff changeset
  1589
    |code painter|
60
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
  1590
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
  1591
    (specClass isNil or:[specSelector isNil]) ifTrue:[
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
  1592
        self defineClassAndSelector
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
  1593
    ].
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
  1594
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
  1595
    self checkClassAndSelector ifFalse:[
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
  1596
        ^ self
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
  1597
    ].
176
a9e5b1615761 update menu
ca
parents: 174
diff changeset
  1598
    painter := self painter.
60
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
  1599
176
a9e5b1615761 update menu
ca
parents: 174
diff changeset
  1600
    painter className:specClass
a9e5b1615761 update menu
ca
parents: 174
diff changeset
  1601
       superclassName:specSuperclass
a9e5b1615761 update menu
ca
parents: 174
diff changeset
  1602
             selector:specSelector.
60
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
  1603
176
a9e5b1615761 update menu
ca
parents: 174
diff changeset
  1604
    code := painter generateWindowSpecMethodSource withCRs.
a9e5b1615761 update menu
ca
parents: 174
diff changeset
  1605
    painter resetModification.
60
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
  1606
    (ReadStream on:code) fileIn.
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
  1607
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
  1608
!
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
  1609
155
575239b7ad0b confirm pick/new/fromClass if unsaved & modified
Claus Gittinger <cg@exept.de>
parents: 152
diff changeset
  1610
doNew
575239b7ad0b confirm pick/new/fromClass if unsaved & modified
Claus Gittinger <cg@exept.de>
parents: 152
diff changeset
  1611
    objectList painter isModified ifTrue:[
575239b7ad0b confirm pick/new/fromClass if unsaved & modified
Claus Gittinger <cg@exept.de>
parents: 152
diff changeset
  1612
        (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
  1613
            ^ self
575239b7ad0b confirm pick/new/fromClass if unsaved & modified
Claus Gittinger <cg@exept.de>
parents: 152
diff changeset
  1614
        ]
575239b7ad0b confirm pick/new/fromClass if unsaved & modified
Claus Gittinger <cg@exept.de>
parents: 152
diff changeset
  1615
    ].
575239b7ad0b confirm pick/new/fromClass if unsaved & modified
Claus Gittinger <cg@exept.de>
parents: 152
diff changeset
  1616
575239b7ad0b confirm pick/new/fromClass if unsaved & modified
Claus Gittinger <cg@exept.de>
parents: 152
diff changeset
  1617
    self removeAll
575239b7ad0b confirm pick/new/fromClass if unsaved & modified
Claus Gittinger <cg@exept.de>
parents: 152
diff changeset
  1618
575239b7ad0b confirm pick/new/fromClass if unsaved & modified
Claus Gittinger <cg@exept.de>
parents: 152
diff changeset
  1619
    "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
  1620
!
575239b7ad0b confirm pick/new/fromClass if unsaved & modified
Claus Gittinger <cg@exept.de>
parents: 152
diff changeset
  1621
60
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
  1622
doPickAView
177
eefd69a52f5b fixed setup of class/selector when picking/fetching via
Claus Gittinger <cg@exept.de>
parents: 176
diff changeset
  1623
    |painter view cls spec|
60
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
  1624
155
575239b7ad0b confirm pick/new/fromClass if unsaved & modified
Claus Gittinger <cg@exept.de>
parents: 152
diff changeset
  1625
    objectList painter isModified ifTrue:[
575239b7ad0b confirm pick/new/fromClass if unsaved & modified
Claus Gittinger <cg@exept.de>
parents: 152
diff changeset
  1626
        (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
  1627
            ^ self
575239b7ad0b confirm pick/new/fromClass if unsaved & modified
Claus Gittinger <cg@exept.de>
parents: 152
diff changeset
  1628
        ]
575239b7ad0b confirm pick/new/fromClass if unsaved & modified
Claus Gittinger <cg@exept.de>
parents: 152
diff changeset
  1629
    ].
575239b7ad0b confirm pick/new/fromClass if unsaved & modified
Claus Gittinger <cg@exept.de>
parents: 152
diff changeset
  1630
171
7a99c53780ef help and close/raise of gallery/painter
ca
parents: 168
diff changeset
  1631
    (view := Screen current viewFromUser) notNil ifTrue:[
174
0e87610c2768 pick a view
ca
parents: 173
diff changeset
  1632
        view == Screen current rootView ifFalse:[
0e87610c2768 pick a view
ca
parents: 173
diff changeset
  1633
            painter := self painter.
0e87610c2768 pick a view
ca
parents: 173
diff changeset
  1634
            spec    := UISpecification fromView:view topView.
60
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
  1635
174
0e87610c2768 pick a view
ca
parents: 173
diff changeset
  1636
         "/ ok, got it
177
eefd69a52f5b fixed setup of class/selector when picking/fetching via
Claus Gittinger <cg@exept.de>
parents: 176
diff changeset
  1637
eefd69a52f5b fixed setup of class/selector when picking/fetching via
Claus Gittinger <cg@exept.de>
parents: 176
diff changeset
  1638
            view application notNil ifTrue:[
eefd69a52f5b fixed setup of class/selector when picking/fetching via
Claus Gittinger <cg@exept.de>
parents: 176
diff changeset
  1639
                cls := view application class
eefd69a52f5b fixed setup of class/selector when picking/fetching via
Claus Gittinger <cg@exept.de>
parents: 176
diff changeset
  1640
            ] ifFalse:[
eefd69a52f5b fixed setup of class/selector when picking/fetching via
Claus Gittinger <cg@exept.de>
parents: 176
diff changeset
  1641
                cls := view class
eefd69a52f5b fixed setup of class/selector when picking/fetching via
Claus Gittinger <cg@exept.de>
parents: 176
diff changeset
  1642
            ].
eefd69a52f5b fixed setup of class/selector when picking/fetching via
Claus Gittinger <cg@exept.de>
parents: 176
diff changeset
  1643
            self setClass:cls selector:nil.
eefd69a52f5b fixed setup of class/selector when picking/fetching via
Claus Gittinger <cg@exept.de>
parents: 176
diff changeset
  1644
174
0e87610c2768 pick a view
ca
parents: 173
diff changeset
  1645
            painter setupFromSpec:spec.
0e87610c2768 pick a view
ca
parents: 173
diff changeset
  1646
        ]
109
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
  1647
    ]
177
eefd69a52f5b fixed setup of class/selector when picking/fetching via
Claus Gittinger <cg@exept.de>
parents: 176
diff changeset
  1648
eefd69a52f5b fixed setup of class/selector when picking/fetching via
Claus Gittinger <cg@exept.de>
parents: 176
diff changeset
  1649
    "Modified: 24.6.1997 / 19:02:57 / cg"
60
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
  1650
!
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
  1651
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
  1652
doRaise
171
7a99c53780ef help and close/raise of gallery/painter
ca
parents: 168
diff changeset
  1653
    |top x|
109
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
  1654
171
7a99c53780ef help and close/raise of gallery/painter
ca
parents: 168
diff changeset
  1655
    top := self painter topView.
7a99c53780ef help and close/raise of gallery/painter
ca
parents: 168
diff changeset
  1656
    top realized ifFalse:[
173
a8468f4e83f0 show/hide painter/gallery
ca
parents: 171
diff changeset
  1657
        self painterShown value:true
171
7a99c53780ef help and close/raise of gallery/painter
ca
parents: 168
diff changeset
  1658
    ].
7a99c53780ef help and close/raise of gallery/painter
ca
parents: 168
diff changeset
  1659
    top raise.
109
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
  1660
171
7a99c53780ef help and close/raise of gallery/painter
ca
parents: 168
diff changeset
  1661
    top := selectionPanel window.
7a99c53780ef help and close/raise of gallery/painter
ca
parents: 168
diff changeset
  1662
    top realized ifFalse:[
173
a8468f4e83f0 show/hide painter/gallery
ca
parents: 171
diff changeset
  1663
        self galleryShown value:true
171
7a99c53780ef help and close/raise of gallery/painter
ca
parents: 168
diff changeset
  1664
    ].
7a99c53780ef help and close/raise of gallery/painter
ca
parents: 168
diff changeset
  1665
    top raise.
60
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
  1666
!
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
  1667
149
e652608690b1 help ...
ca
parents: 144
diff changeset
  1668
doStartApplication
e652608690b1 help ...
ca
parents: 144
diff changeset
  1669
    |cls|
e652608690b1 help ...
ca
parents: 144
diff changeset
  1670
e652608690b1 help ...
ca
parents: 144
diff changeset
  1671
    (specClass isNil or:[specSelector isNil]) ifTrue:[
e652608690b1 help ...
ca
parents: 144
diff changeset
  1672
        ^ self information:'no class or selector defined'.
e652608690b1 help ...
ca
parents: 144
diff changeset
  1673
    ].
e652608690b1 help ...
ca
parents: 144
diff changeset
  1674
e652608690b1 help ...
ca
parents: 144
diff changeset
  1675
    specClass isBehavior ifFalse:[
e652608690b1 help ...
ca
parents: 144
diff changeset
  1676
        cls := Smalltalk at:specClass asSymbol
e652608690b1 help ...
ca
parents: 144
diff changeset
  1677
    ] ifTrue:[
e652608690b1 help ...
ca
parents: 144
diff changeset
  1678
        cls := specClass
e652608690b1 help ...
ca
parents: 144
diff changeset
  1679
    ].
e652608690b1 help ...
ca
parents: 144
diff changeset
  1680
e652608690b1 help ...
ca
parents: 144
diff changeset
  1681
    cls isNil ifTrue:[
e652608690b1 help ...
ca
parents: 144
diff changeset
  1682
        ^ self information:'class not existant'.
e652608690b1 help ...
ca
parents: 144
diff changeset
  1683
    ].
e652608690b1 help ...
ca
parents: 144
diff changeset
  1684
e652608690b1 help ...
ca
parents: 144
diff changeset
  1685
    (cls respondsTo:specSelector) ifFalse:[
161
12a70f62f414 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 160
diff changeset
  1686
self halt.
12a70f62f414 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 160
diff changeset
  1687
        ^ self information:('no method for: #' 
12a70f62f414 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 160
diff changeset
  1688
                             , specSelector , ' in ' , cls name ,
12a70f62f414 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 160
diff changeset
  1689
                             '\\(did you install the spec ?)') withCRs.
149
e652608690b1 help ...
ca
parents: 144
diff changeset
  1690
    ].
e652608690b1 help ...
ca
parents: 144
diff changeset
  1691
    cls new openInterface:specSelector
161
12a70f62f414 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 160
diff changeset
  1692
12a70f62f414 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 160
diff changeset
  1693
    "Modified: 17.6.1997 / 14:40:21 / cg"
149
e652608690b1 help ...
ca
parents: 144
diff changeset
  1694
!
e652608690b1 help ...
ca
parents: 144
diff changeset
  1695
60
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
  1696
doWindowSpec
68
889c3877baf0 layout ....
ca
parents: 65
diff changeset
  1697
   |code code2 v|
60
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
  1698
109
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
  1699
   code := self painter generateWindowSpecMethodSource.
68
889c3877baf0 layout ....
ca
parents: 65
diff changeset
  1700
60
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
  1701
   v := CodeView open.
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
  1702
   v contents:code.
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
  1703
   v label:'windowSpec'.
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
  1704
81
7493e2437af5 checkin from browser
ca
parents: 77
diff changeset
  1705
! !
7493e2437af5 checkin from browser
ca
parents: 77
diff changeset
  1706
60
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
  1707
!UIPainter class methodsFor:'documentation'!
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
  1708
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
  1709
version
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
  1710
    ^ '$Header$'
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
  1711
! !