UIPainter.st
author Claus Gittinger <cg@exept.de>
Thu, 10 Jan 2008 13:59:22 +0100
changeset 2230 33c98cefa7e6
parent 2227 a0af7929bfca
child 2235 ac5b46f34c53
permissions -rw-r--r--
refactorings
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
156
b332d7117c40 added copyrights
Claus Gittinger <cg@exept.de>
parents: 155
diff changeset
     1
"
765
27936ff059d3 obselete methods removed + comments revised
tz
parents: 755
diff changeset
     2
 COPYRIGHT (c) 1995-1998 by eXept Software AG
2217
b54632779619 Use class var for SelectionPanel
Stefan Vogel <sv@exept.de>
parents: 2213
diff changeset
     3
              All Rights Reserved
156
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
"
2023
7a37b7c85092 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2012
diff changeset
    12
"{ Package: 'stx:libtool2' }"
1391
be99f3e9260e set changed label in tree-view for canvas
ca
parents: 1360
diff changeset
    13
2007
77cf7ecc9ecf embedding as special editors
Claus Gittinger <cg@exept.de>
parents: 2001
diff changeset
    14
ResourceSpecEditor subclass:#UIPainter
2218
01fdf3323d89 changed #selectionPanelClass
Stefan Vogel <sv@exept.de>
parents: 2217
diff changeset
    15
	instanceVariableNames:'specSuperclassName treeView selectionPanel specTool layoutTool
01fdf3323d89 changed #selectionPanelClass
Stefan Vogel <sv@exept.de>
parents: 2217
diff changeset
    16
		helpTool painterView painter'
01fdf3323d89 changed #selectionPanelClass
Stefan Vogel <sv@exept.de>
parents: 2217
diff changeset
    17
	classVariableNames:'SelectionPanelClass UseViewScroller'
01fdf3323d89 changed #selectionPanelClass
Stefan Vogel <sv@exept.de>
parents: 2217
diff changeset
    18
	poolDictionaries:''
01fdf3323d89 changed #selectionPanelClass
Stefan Vogel <sv@exept.de>
parents: 2217
diff changeset
    19
	category:'Interface-UIPainter'
60
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
222
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
    22
SelectionInTreeView subclass:#TreeView
2218
01fdf3323d89 changed #selectionPanelClass
Stefan Vogel <sv@exept.de>
parents: 2217
diff changeset
    23
	instanceVariableNames:'lastDrawnMaster cvsEventsDisabled windowSpec windowSpecClass'
01fdf3323d89 changed #selectionPanelClass
Stefan Vogel <sv@exept.de>
parents: 2217
diff changeset
    24
	classVariableNames:''
01fdf3323d89 changed #selectionPanelClass
Stefan Vogel <sv@exept.de>
parents: 2217
diff changeset
    25
	poolDictionaries:''
01fdf3323d89 changed #selectionPanelClass
Stefan Vogel <sv@exept.de>
parents: 2217
diff changeset
    26
	privateIn:UIPainter
222
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
    27
!
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
    28
60
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
    29
!UIPainter class methodsFor:'documentation'!
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
    30
156
b332d7117c40 added copyrights
Claus Gittinger <cg@exept.de>
parents: 155
diff changeset
    31
copyright
b332d7117c40 added copyrights
Claus Gittinger <cg@exept.de>
parents: 155
diff changeset
    32
"
765
27936ff059d3 obselete methods removed + comments revised
tz
parents: 755
diff changeset
    33
 COPYRIGHT (c) 1995-1998 by eXept Software AG
2217
b54632779619 Use class var for SelectionPanel
Stefan Vogel <sv@exept.de>
parents: 2213
diff changeset
    34
              All Rights Reserved
156
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
 This software is furnished under a license and may be used
b332d7117c40 added copyrights
Claus Gittinger <cg@exept.de>
parents: 155
diff changeset
    37
 only in accordance with the terms of that license and with the
b332d7117c40 added copyrights
Claus Gittinger <cg@exept.de>
parents: 155
diff changeset
    38
 inclusion of the above copyright notice.   This software may not
b332d7117c40 added copyrights
Claus Gittinger <cg@exept.de>
parents: 155
diff changeset
    39
 be provided or otherwise made available to, or used by, any
b332d7117c40 added copyrights
Claus Gittinger <cg@exept.de>
parents: 155
diff changeset
    40
 other person.  No title to or ownership of the software is
b332d7117c40 added copyrights
Claus Gittinger <cg@exept.de>
parents: 155
diff changeset
    41
 hereby transferred.
b332d7117c40 added copyrights
Claus Gittinger <cg@exept.de>
parents: 155
diff changeset
    42
"
b332d7117c40 added copyrights
Claus Gittinger <cg@exept.de>
parents: 155
diff changeset
    43
b332d7117c40 added copyrights
Claus Gittinger <cg@exept.de>
parents: 155
diff changeset
    44
!
b332d7117c40 added copyrights
Claus Gittinger <cg@exept.de>
parents: 155
diff changeset
    45
60
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
    46
documentation
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
    47
"
765
27936ff059d3 obselete methods removed + comments revised
tz
parents: 755
diff changeset
    48
    The GUI Painter provides the user with a graphical user interface for building own 
27936ff059d3 obselete methods removed + comments revised
tz
parents: 755
diff changeset
    49
    interfaces by interactively assembling widgets and defining the behavior of the widgets.
27936ff059d3 obselete methods removed + comments revised
tz
parents: 755
diff changeset
    50
    The resulting interface specifications can be saved as methods on the application
27936ff059d3 obselete methods removed + comments revised
tz
parents: 755
diff changeset
    51
    classes, typically subclasses of the class ApplicationModel. These specifications
27936ff059d3 obselete methods removed + comments revised
tz
parents: 755
diff changeset
    52
    are used by the UIBuilder to generate the application window and its widgets when 
27936ff059d3 obselete methods removed + comments revised
tz
parents: 755
diff changeset
    53
    opening the application.
60
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
    54
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
    55
    [start with:]
2217
b54632779619 Use class var for SelectionPanel
Stefan Vogel <sv@exept.de>
parents: 2213
diff changeset
    56
        UIPainter open
127
95070ea7ae42 update layout from view
ca
parents: 124
diff changeset
    57
156
b332d7117c40 added copyrights
Claus Gittinger <cg@exept.de>
parents: 155
diff changeset
    58
    [author:]
2217
b54632779619 Use class var for SelectionPanel
Stefan Vogel <sv@exept.de>
parents: 2213
diff changeset
    59
        Claus Gittinger, eXept Software AG
b54632779619 Use class var for SelectionPanel
Stefan Vogel <sv@exept.de>
parents: 2213
diff changeset
    60
        Claus Atzkern, eXept Software AG
b54632779619 Use class var for SelectionPanel
Stefan Vogel <sv@exept.de>
parents: 2213
diff changeset
    61
        Thomas Zwick, eXept Software AG
156
b332d7117c40 added copyrights
Claus Gittinger <cg@exept.de>
parents: 155
diff changeset
    62
127
95070ea7ae42 update layout from view
ca
parents: 124
diff changeset
    63
    [see also:]
2217
b54632779619 Use class var for SelectionPanel
Stefan Vogel <sv@exept.de>
parents: 2213
diff changeset
    64
        UIBuilder
b54632779619 Use class var for SelectionPanel
Stefan Vogel <sv@exept.de>
parents: 2213
diff changeset
    65
        ApplicationModel
b54632779619 Use class var for SelectionPanel
Stefan Vogel <sv@exept.de>
parents: 2213
diff changeset
    66
        UISpecification
60
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
    67
"
109
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
    68
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
    69
! !
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
    70
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
    71
!UIPainter class methodsFor:'instance creation'!
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
    72
195
350f95af5d9d check before sending selector to class
Claus Gittinger <cg@exept.de>
parents: 194
diff changeset
    73
openOnClass:aClass andSelector:aSelector
1976
969584dd8beb code cleanup & refactoring
Claus Gittinger <cg@exept.de>
parents: 1968
diff changeset
    74
    "open a GUI Painter on aClass and (windowSpec) aSelector"
969584dd8beb code cleanup & refactoring
Claus Gittinger <cg@exept.de>
parents: 1968
diff changeset
    75
969584dd8beb code cleanup & refactoring
Claus Gittinger <cg@exept.de>
parents: 1968
diff changeset
    76
    ^ self new openOnClass:aClass theNonMetaclass andSelector:aSelector
60
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
    77
! !
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
    78
87
cc6d70449622 add ST-80 queries
ca
parents: 81
diff changeset
    79
!UIPainter class methodsFor:'ST-80 queries'!
cc6d70449622 add ST-80 queries
ca
parents: 81
diff changeset
    80
cc6d70449622 add ST-80 queries
ca
parents: 81
diff changeset
    81
preferenceFor:aSymbol
282
bb88d92ae887 checkin from browser
ca
parents: 281
diff changeset
    82
    "ST-80 compatible; always returns false
bb88d92ae887 checkin from browser
ca
parents: 281
diff changeset
    83
    "
87
cc6d70449622 add ST-80 queries
ca
parents: 81
diff changeset
    84
    ^ false
109
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
    85
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
    86
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
    87
! !
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
    88
765
27936ff059d3 obselete methods removed + comments revised
tz
parents: 755
diff changeset
    89
!UIPainter class methodsFor:'accessing'!
713
f94e58bb44ac some changes for the docu
tz
parents: 697
diff changeset
    90
f94e58bb44ac some changes for the docu
tz
parents: 697
diff changeset
    91
defaultNameOfCanvas
765
27936ff059d3 obselete methods removed + comments revised
tz
parents: 755
diff changeset
    92
    "returns the default name of the application"
27936ff059d3 obselete methods removed + comments revised
tz
parents: 755
diff changeset
    93
2208
4e1c31df6014 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2206
diff changeset
    94
    ^ 'NewApplication'
2217
b54632779619 Use class var for SelectionPanel
Stefan Vogel <sv@exept.de>
parents: 2213
diff changeset
    95
!
b54632779619 Use class var for SelectionPanel
Stefan Vogel <sv@exept.de>
parents: 2213
diff changeset
    96
2218
01fdf3323d89 changed #selectionPanelClass
Stefan Vogel <sv@exept.de>
parents: 2217
diff changeset
    97
selectionPanelClass
01fdf3323d89 changed #selectionPanelClass
Stefan Vogel <sv@exept.de>
parents: 2217
diff changeset
    98
    ^ SelectionPanelClass
2225
b01b58d85458 comments
Claus Gittinger <cg@exept.de>
parents: 2223
diff changeset
    99
b01b58d85458 comments
Claus Gittinger <cg@exept.de>
parents: 2223
diff changeset
   100
    "
b01b58d85458 comments
Claus Gittinger <cg@exept.de>
parents: 2223
diff changeset
   101
     UIPainter selectionPanelClass.
b01b58d85458 comments
Claus Gittinger <cg@exept.de>
parents: 2223
diff changeset
   102
     UIPainter selectionPanelClass:UISelectionPanel
b01b58d85458 comments
Claus Gittinger <cg@exept.de>
parents: 2223
diff changeset
   103
    "
2218
01fdf3323d89 changed #selectionPanelClass
Stefan Vogel <sv@exept.de>
parents: 2217
diff changeset
   104
!
01fdf3323d89 changed #selectionPanelClass
Stefan Vogel <sv@exept.de>
parents: 2217
diff changeset
   105
2217
b54632779619 Use class var for SelectionPanel
Stefan Vogel <sv@exept.de>
parents: 2213
diff changeset
   106
selectionPanelClass:something
b54632779619 Use class var for SelectionPanel
Stefan Vogel <sv@exept.de>
parents: 2213
diff changeset
   107
    "set the class used as selection panel.
b54632779619 Use class var for SelectionPanel
Stefan Vogel <sv@exept.de>
parents: 2213
diff changeset
   108
     this is UISelectionPanel as default"
b54632779619 Use class var for SelectionPanel
Stefan Vogel <sv@exept.de>
parents: 2213
diff changeset
   109
b54632779619 Use class var for SelectionPanel
Stefan Vogel <sv@exept.de>
parents: 2213
diff changeset
   110
    SelectionPanelClass := something.
2225
b01b58d85458 comments
Claus Gittinger <cg@exept.de>
parents: 2223
diff changeset
   111
b01b58d85458 comments
Claus Gittinger <cg@exept.de>
parents: 2223
diff changeset
   112
    "
b01b58d85458 comments
Claus Gittinger <cg@exept.de>
parents: 2223
diff changeset
   113
     UIPainter selectionPanelClass:UISelectionPanel
b01b58d85458 comments
Claus Gittinger <cg@exept.de>
parents: 2223
diff changeset
   114
    "
713
f94e58bb44ac some changes for the docu
tz
parents: 697
diff changeset
   115
! !
f94e58bb44ac some changes for the docu
tz
parents: 697
diff changeset
   116
193
450d9e5c6f4a checkin from browser
ca
parents: 187
diff changeset
   117
!UIPainter class methodsFor:'help specs'!
450d9e5c6f4a checkin from browser
ca
parents: 187
diff changeset
   118
1545
4f8b08f745eb flyByHelp stuff
Claus Gittinger <cg@exept.de>
parents: 1540
diff changeset
   119
flyByHelpSpec
4f8b08f745eb flyByHelp stuff
Claus Gittinger <cg@exept.de>
parents: 1540
diff changeset
   120
    <resource: #help>
4f8b08f745eb flyByHelp stuff
Claus Gittinger <cg@exept.de>
parents: 1540
diff changeset
   121
4f8b08f745eb flyByHelp stuff
Claus Gittinger <cg@exept.de>
parents: 1540
diff changeset
   122
    ^super flyByHelpSpec addPairsFrom:#(
4f8b08f745eb flyByHelp stuff
Claus Gittinger <cg@exept.de>
parents: 1540
diff changeset
   123
4f8b08f745eb flyByHelp stuff
Claus Gittinger <cg@exept.de>
parents: 1540
diff changeset
   124
#fileSave
2198
804e778590fc slightly refactored to allow for more redefinition in a subclass
Claus Gittinger <cg@exept.de>
parents: 2175
diff changeset
   125
'Save Spec'
804e778590fc slightly refactored to allow for more redefinition in a subclass
Claus Gittinger <cg@exept.de>
parents: 2175
diff changeset
   126
1545
4f8b08f745eb flyByHelp stuff
Claus Gittinger <cg@exept.de>
parents: 1540
diff changeset
   127
4f8b08f745eb flyByHelp stuff
Claus Gittinger <cg@exept.de>
parents: 1540
diff changeset
   128
)
4f8b08f745eb flyByHelp stuff
Claus Gittinger <cg@exept.de>
parents: 1540
diff changeset
   129
!
4f8b08f745eb flyByHelp stuff
Claus Gittinger <cg@exept.de>
parents: 1540
diff changeset
   130
193
450d9e5c6f4a checkin from browser
ca
parents: 187
diff changeset
   131
helpSpec
743
d58a3e7e39d5 support user defined font styles
tz
parents: 735
diff changeset
   132
    "This resource specification was automatically generated
d58a3e7e39d5 support user defined font styles
tz
parents: 735
diff changeset
   133
     by the UIHelpTool of ST/X."
d58a3e7e39d5 support user defined font styles
tz
parents: 735
diff changeset
   134
d58a3e7e39d5 support user defined font styles
tz
parents: 735
diff changeset
   135
    "Do not manually edit this!! If it is corrupted,
d58a3e7e39d5 support user defined font styles
tz
parents: 735
diff changeset
   136
     the UIHelpTool may not be able to read the specification."
295
114befd1c369 add some help text
ca
parents: 287
diff changeset
   137
193
450d9e5c6f4a checkin from browser
ca
parents: 187
diff changeset
   138
    "
743
d58a3e7e39d5 support user defined font styles
tz
parents: 735
diff changeset
   139
     UIHelpTool openOnClass:UIPainter    
295
114befd1c369 add some help text
ca
parents: 287
diff changeset
   140
    "
114befd1c369 add some help text
ca
parents: 287
diff changeset
   141
743
d58a3e7e39d5 support user defined font styles
tz
parents: 735
diff changeset
   142
    <resource: #help>
d58a3e7e39d5 support user defined font styles
tz
parents: 735
diff changeset
   143
1827
691d1471cd3e WOs changes
werner
parents: 1820
diff changeset
   144
    ^ super helpSpec addPairsFrom:#(
193
450d9e5c6f4a checkin from browser
ca
parents: 187
diff changeset
   145
934
b32cfce56571 help specs
Claus Gittinger <cg@exept.de>
parents: 924
diff changeset
   146
#align
b32cfce56571 help specs
Claus Gittinger <cg@exept.de>
parents: 924
diff changeset
   147
'Widget alignment functions.'
b32cfce56571 help specs
Claus Gittinger <cg@exept.de>
parents: 924
diff changeset
   148
466
daba7254ed49 no separate help saves
tz
parents: 453
diff changeset
   149
#alignSelectionBottom
924
0416d7cbae92 reviewed help texts;
Claus Gittinger <cg@exept.de>
parents: 913
diff changeset
   150
'Aligns the selected widgets bottom edges with the bottom of the dominant widget.'
466
daba7254ed49 no separate help saves
tz
parents: 453
diff changeset
   151
daba7254ed49 no separate help saves
tz
parents: 453
diff changeset
   152
#alignSelectionCenterHor
924
0416d7cbae92 reviewed help texts;
Claus Gittinger <cg@exept.de>
parents: 913
diff changeset
   153
'Aligns the selected widgets centers vertically with the center of the dominant widget.'
466
daba7254ed49 no separate help saves
tz
parents: 453
diff changeset
   154
daba7254ed49 no separate help saves
tz
parents: 453
diff changeset
   155
#alignSelectionCenterVer
924
0416d7cbae92 reviewed help texts;
Claus Gittinger <cg@exept.de>
parents: 913
diff changeset
   156
'Aligns the selected widgets centers horizontally with the center of the dominant widget.'
466
daba7254ed49 no separate help saves
tz
parents: 453
diff changeset
   157
daba7254ed49 no separate help saves
tz
parents: 453
diff changeset
   158
#alignSelectionLeft
924
0416d7cbae92 reviewed help texts;
Claus Gittinger <cg@exept.de>
parents: 913
diff changeset
   159
'Aligns the selected widgets left edges with the left edge of the dominant widget.'
466
daba7254ed49 no separate help saves
tz
parents: 453
diff changeset
   160
daba7254ed49 no separate help saves
tz
parents: 453
diff changeset
   161
#alignSelectionLeftAndRight
924
0416d7cbae92 reviewed help texts;
Claus Gittinger <cg@exept.de>
parents: 913
diff changeset
   162
'Aligns the selected widgets left & right edges with the dominant widget.'
466
daba7254ed49 no separate help saves
tz
parents: 453
diff changeset
   163
daba7254ed49 no separate help saves
tz
parents: 453
diff changeset
   164
#alignSelectionRight
924
0416d7cbae92 reviewed help texts;
Claus Gittinger <cg@exept.de>
parents: 913
diff changeset
   165
'Aligns the selected widgets right edges with the right edge of the dominant widget.'
466
daba7254ed49 no separate help saves
tz
parents: 453
diff changeset
   166
daba7254ed49 no separate help saves
tz
parents: 453
diff changeset
   167
#alignSelectionTop
934
b32cfce56571 help specs
Claus Gittinger <cg@exept.de>
parents: 924
diff changeset
   168
'Aligns the selected widgets top edgegs with the top edge of the dominant widget.'
466
daba7254ed49 no separate help saves
tz
parents: 453
diff changeset
   169
daba7254ed49 no separate help saves
tz
parents: 453
diff changeset
   170
#alignSelectionTopAndBottom
924
0416d7cbae92 reviewed help texts;
Claus Gittinger <cg@exept.de>
parents: 913
diff changeset
   171
'Aligns the selected widgets top and bottom edges with the dominant widget.'
466
daba7254ed49 no separate help saves
tz
parents: 453
diff changeset
   172
daba7254ed49 no separate help saves
tz
parents: 453
diff changeset
   173
#centerSelectionHor
924
0416d7cbae92 reviewed help texts;
Claus Gittinger <cg@exept.de>
parents: 913
diff changeset
   174
'Centers the selected widgets horizontally within their containing widget.'
466
daba7254ed49 no separate help saves
tz
parents: 453
diff changeset
   175
daba7254ed49 no separate help saves
tz
parents: 453
diff changeset
   176
#centerSelectionVer
924
0416d7cbae92 reviewed help texts;
Claus Gittinger <cg@exept.de>
parents: 913
diff changeset
   177
'Centers the selected widgets vertically within their containing widget.'
713
f94e58bb44ac some changes for the docu
tz
parents: 697
diff changeset
   178
f94e58bb44ac some changes for the docu
tz
parents: 697
diff changeset
   179
#changePositionDown
838
0ac5a26498c1 help texts & national strings
Claus Gittinger <cg@exept.de>
parents: 827
diff changeset
   180
'Moves the selected widget(s) towards the bottom.'
713
f94e58bb44ac some changes for the docu
tz
parents: 697
diff changeset
   181
f94e58bb44ac some changes for the docu
tz
parents: 697
diff changeset
   182
#changePositionLeft
838
0ac5a26498c1 help texts & national strings
Claus Gittinger <cg@exept.de>
parents: 827
diff changeset
   183
'Moves the selected widget(s) towards the left.'
713
f94e58bb44ac some changes for the docu
tz
parents: 697
diff changeset
   184
f94e58bb44ac some changes for the docu
tz
parents: 697
diff changeset
   185
#changePositionRight
838
0ac5a26498c1 help texts & national strings
Claus Gittinger <cg@exept.de>
parents: 827
diff changeset
   186
'Moves the selected widget(s) towards the right.'
713
f94e58bb44ac some changes for the docu
tz
parents: 697
diff changeset
   187
f94e58bb44ac some changes for the docu
tz
parents: 697
diff changeset
   188
#changePositionUp
838
0ac5a26498c1 help texts & national strings
Claus Gittinger <cg@exept.de>
parents: 827
diff changeset
   189
'Moves the selected widget(s) towards the top.'
713
f94e58bb44ac some changes for the docu
tz
parents: 697
diff changeset
   190
1827
691d1471cd3e WOs changes
werner
parents: 1820
diff changeset
   191
#drawEdit
691d1471cd3e WOs changes
werner
parents: 1820
diff changeset
   192
''
691d1471cd3e WOs changes
werner
parents: 1820
diff changeset
   193
691d1471cd3e WOs changes
werner
parents: 1820
diff changeset
   194
#editBrowseViewClass
691d1471cd3e WOs changes
werner
parents: 1820
diff changeset
   195
'Opens a browser on the class of the selected widget.'
691d1471cd3e WOs changes
werner
parents: 1820
diff changeset
   196
713
f94e58bb44ac some changes for the docu
tz
parents: 697
diff changeset
   197
#editDimensionCopyExtent
924
0416d7cbae92 reviewed help texts;
Claus Gittinger <cg@exept.de>
parents: 913
diff changeset
   198
'Copies the extent of the selected widget.'
713
f94e58bb44ac some changes for the docu
tz
parents: 697
diff changeset
   199
f94e58bb44ac some changes for the docu
tz
parents: 697
diff changeset
   200
#editDimensionCopyLayout
924
0416d7cbae92 reviewed help texts;
Claus Gittinger <cg@exept.de>
parents: 913
diff changeset
   201
'Copies the layout of the selected widget.'
713
f94e58bb44ac some changes for the docu
tz
parents: 697
diff changeset
   202
f94e58bb44ac some changes for the docu
tz
parents: 697
diff changeset
   203
#editDimensionDefaultExtent
924
0416d7cbae92 reviewed help texts;
Claus Gittinger <cg@exept.de>
parents: 913
diff changeset
   204
'Sets the selected widget(s) extent to their default.'
713
f94e58bb44ac some changes for the docu
tz
parents: 697
diff changeset
   205
f94e58bb44ac some changes for the docu
tz
parents: 697
diff changeset
   206
#editDimensionDefaultHeight
924
0416d7cbae92 reviewed help texts;
Claus Gittinger <cg@exept.de>
parents: 913
diff changeset
   207
'Sets the selected widget(s) height to their default.'
713
f94e58bb44ac some changes for the docu
tz
parents: 697
diff changeset
   208
f94e58bb44ac some changes for the docu
tz
parents: 697
diff changeset
   209
#editDimensionDefaultWidth
924
0416d7cbae92 reviewed help texts;
Claus Gittinger <cg@exept.de>
parents: 913
diff changeset
   210
'Sets the selected widget(s) width to their default.'
713
f94e58bb44ac some changes for the docu
tz
parents: 697
diff changeset
   211
f94e58bb44ac some changes for the docu
tz
parents: 697
diff changeset
   212
#editDimensionPasteExtent
924
0416d7cbae92 reviewed help texts;
Claus Gittinger <cg@exept.de>
parents: 913
diff changeset
   213
'Sets the extent of the selected widget(s) to the last copied extent.'
713
f94e58bb44ac some changes for the docu
tz
parents: 697
diff changeset
   214
f94e58bb44ac some changes for the docu
tz
parents: 697
diff changeset
   215
#editDimensionPasteHeight
924
0416d7cbae92 reviewed help texts;
Claus Gittinger <cg@exept.de>
parents: 913
diff changeset
   216
'Sets the height of the selected widget(s) to the height of the last copied layout/extent.'
713
f94e58bb44ac some changes for the docu
tz
parents: 697
diff changeset
   217
f94e58bb44ac some changes for the docu
tz
parents: 697
diff changeset
   218
#editDimensionPasteLayout
924
0416d7cbae92 reviewed help texts;
Claus Gittinger <cg@exept.de>
parents: 913
diff changeset
   219
'Sets the layout of the selected widget(s) to the last copied layout.'
713
f94e58bb44ac some changes for the docu
tz
parents: 697
diff changeset
   220
f94e58bb44ac some changes for the docu
tz
parents: 697
diff changeset
   221
#editDimensionPasteWidth
924
0416d7cbae92 reviewed help texts;
Claus Gittinger <cg@exept.de>
parents: 913
diff changeset
   222
'Sets the width of the selected widget(s) to the width of the last copied layout/extent.'
713
f94e58bb44ac some changes for the docu
tz
parents: 697
diff changeset
   223
724
7c7fb3f3a927 docu calls added
tz
parents: 721
diff changeset
   224
#editInspectSpec
7c7fb3f3a927 docu calls added
tz
parents: 721
diff changeset
   225
'Opens an inspector on the spec of the selected widget.'
7c7fb3f3a927 docu calls added
tz
parents: 721
diff changeset
   226
755
cfbbec0a33c6 some cleans for grid, etc.
tz
parents: 743
diff changeset
   227
#editInspectView
1742
4c39c2f1dcc7 help texts
Claus Gittinger <cg@exept.de>
parents: 1739
diff changeset
   228
'Opens an inspector on the selected widget.'
755
cfbbec0a33c6 some cleans for grid, etc.
tz
parents: 743
diff changeset
   229
743
d58a3e7e39d5 support user defined font styles
tz
parents: 735
diff changeset
   230
#editOpenSpecDocumentation
d58a3e7e39d5 support user defined font styles
tz
parents: 735
diff changeset
   231
'Opens the documentation of the selected widget.'
d58a3e7e39d5 support user defined font styles
tz
parents: 735
diff changeset
   232
1827
691d1471cd3e WOs changes
werner
parents: 1820
diff changeset
   233
#fileBrowseAspectMethods
691d1471cd3e WOs changes
werner
parents: 1820
diff changeset
   234
'Opens a System Browser on the applications aspect methods.'
691d1471cd3e WOs changes
werner
parents: 1820
diff changeset
   235
1742
4c39c2f1dcc7 help texts
Claus Gittinger <cg@exept.de>
parents: 1739
diff changeset
   236
#fileBrowseClass
4c39c2f1dcc7 help texts
Claus Gittinger <cg@exept.de>
parents: 1739
diff changeset
   237
'Open a System Browser on the applications class.'
4c39c2f1dcc7 help texts
Claus Gittinger <cg@exept.de>
parents: 1739
diff changeset
   238
498
43a78c5f806c help texts added
tz
parents: 496
diff changeset
   239
#fileLoad
1032
abe3ed3bebc9 help texts
Claus Gittinger <cg@exept.de>
parents: 1027
diff changeset
   240
'Opens a dialog to load a window specification from a classes spec method.'
498
43a78c5f806c help texts added
tz
parents: 496
diff changeset
   241
533
dde823aeca4c supports loading of subspecs
tz
parents: 527
diff changeset
   242
#fileLoadSubspec
924
0416d7cbae92 reviewed help texts;
Claus Gittinger <cg@exept.de>
parents: 913
diff changeset
   243
'Opens a dialog to load a sub specification from a classes windowSpec method.'
533
dde823aeca4c supports loading of subspecs
tz
parents: 527
diff changeset
   244
498
43a78c5f806c help texts added
tz
parents: 496
diff changeset
   245
#fileNew
713
f94e58bb44ac some changes for the docu
tz
parents: 697
diff changeset
   246
'Creates a new window spec.'
498
43a78c5f806c help texts added
tz
parents: 496
diff changeset
   247
43a78c5f806c help texts added
tz
parents: 496
diff changeset
   248
#filePickAnInterface
924
0416d7cbae92 reviewed help texts;
Claus Gittinger <cg@exept.de>
parents: 913
diff changeset
   249
'Select a view on the screen, generate a window spec for it and edit this spec.'
498
43a78c5f806c help texts added
tz
parents: 496
diff changeset
   250
43a78c5f806c help texts added
tz
parents: 496
diff changeset
   251
#fileSave
924
0416d7cbae92 reviewed help texts;
Claus Gittinger <cg@exept.de>
parents: 913
diff changeset
   252
'Saves the window spec in the current class (as spec method).'
713
f94e58bb44ac some changes for the docu
tz
parents: 697
diff changeset
   253
f94e58bb44ac some changes for the docu
tz
parents: 697
diff changeset
   254
#fileSaveAs
838
0ac5a26498c1 help texts & national strings
Claus Gittinger <cg@exept.de>
parents: 827
diff changeset
   255
'Opens a dialog to select class and selector for saving the window spec.'
713
f94e58bb44ac some changes for the docu
tz
parents: 697
diff changeset
   256
f94e58bb44ac some changes for the docu
tz
parents: 697
diff changeset
   257
#fileShowWindowSpec
f94e58bb44ac some changes for the docu
tz
parents: 697
diff changeset
   258
'Opens a Workspace showing the current window spec.'
f94e58bb44ac some changes for the docu
tz
parents: 697
diff changeset
   259
f94e58bb44ac some changes for the docu
tz
parents: 697
diff changeset
   260
#generateAspectMethods
f94e58bb44ac some changes for the docu
tz
parents: 697
diff changeset
   261
'Generates aspect methods for defined aspect selectors of the widgets.'
f94e58bb44ac some changes for the docu
tz
parents: 697
diff changeset
   262
f94e58bb44ac some changes for the docu
tz
parents: 697
diff changeset
   263
#generateHookMethods
f94e58bb44ac some changes for the docu
tz
parents: 697
diff changeset
   264
'Generates startup/release methods. (#closeRequest, #postBuildWith:, #postOpenWith:)'
f94e58bb44ac some changes for the docu
tz
parents: 697
diff changeset
   265
755
cfbbec0a33c6 some cleans for grid, etc.
tz
parents: 743
diff changeset
   266
#helpExamples
935
43e8ce3b62ca help specs again.
Claus Gittinger <cg@exept.de>
parents: 934
diff changeset
   267
'Show some examples uses of the GUI Painter.'
755
cfbbec0a33c6 some cleans for grid, etc.
tz
parents: 743
diff changeset
   268
cfbbec0a33c6 some cleans for grid, etc.
tz
parents: 743
diff changeset
   269
#helpFunctions
935
43e8ce3b62ca help specs again.
Claus Gittinger <cg@exept.de>
parents: 934
diff changeset
   270
'Show the documentation on the GUI Painters menu and button functions.'
755
cfbbec0a33c6 some cleans for grid, etc.
tz
parents: 743
diff changeset
   271
cfbbec0a33c6 some cleans for grid, etc.
tz
parents: 743
diff changeset
   272
#helpLayoutTool
935
43e8ce3b62ca help specs again.
Claus Gittinger <cg@exept.de>
parents: 934
diff changeset
   273
'Show the Layout Tools documentation.'
755
cfbbec0a33c6 some cleans for grid, etc.
tz
parents: 743
diff changeset
   274
cfbbec0a33c6 some cleans for grid, etc.
tz
parents: 743
diff changeset
   275
#helpSelectedWidget
935
43e8ce3b62ca help specs again.
Claus Gittinger <cg@exept.de>
parents: 934
diff changeset
   276
'Show the documentation of the selected widget.'
43e8ce3b62ca help specs again.
Claus Gittinger <cg@exept.de>
parents: 934
diff changeset
   277
43e8ce3b62ca help specs again.
Claus Gittinger <cg@exept.de>
parents: 934
diff changeset
   278
#helpTutorial
43e8ce3b62ca help specs again.
Claus Gittinger <cg@exept.de>
parents: 934
diff changeset
   279
'Show the GUI Painters documentation.'
755
cfbbec0a33c6 some cleans for grid, etc.
tz
parents: 743
diff changeset
   280
924
0416d7cbae92 reviewed help texts;
Claus Gittinger <cg@exept.de>
parents: 913
diff changeset
   281
#historyMenuItem
0416d7cbae92 reviewed help texts;
Claus Gittinger <cg@exept.de>
parents: 913
diff changeset
   282
'Edit this windowSpec.'
0416d7cbae92 reviewed help texts;
Claus Gittinger <cg@exept.de>
parents: 913
diff changeset
   283
713
f94e58bb44ac some changes for the docu
tz
parents: 697
diff changeset
   284
#moveWidgetDown
f94e58bb44ac some changes for the docu
tz
parents: 697
diff changeset
   285
'Moves the selected widget one step down.'
f94e58bb44ac some changes for the docu
tz
parents: 697
diff changeset
   286
f94e58bb44ac some changes for the docu
tz
parents: 697
diff changeset
   287
#moveWidgetInto
f94e58bb44ac some changes for the docu
tz
parents: 697
diff changeset
   288
'Moves the selected widget into next widget as child widget.'
f94e58bb44ac some changes for the docu
tz
parents: 697
diff changeset
   289
f94e58bb44ac some changes for the docu
tz
parents: 697
diff changeset
   290
#moveWidgetOut
f94e58bb44ac some changes for the docu
tz
parents: 697
diff changeset
   291
'Moves the selected widget out of its parent widget.'
f94e58bb44ac some changes for the docu
tz
parents: 697
diff changeset
   292
f94e58bb44ac some changes for the docu
tz
parents: 697
diff changeset
   293
#moveWidgetUp
f94e58bb44ac some changes for the docu
tz
parents: 697
diff changeset
   294
'Moves the selected widget one step up.'
287
1ecabfd468dc HelpTool is seperated like LayoutTool
ca
parents: 282
diff changeset
   295
466
daba7254ed49 no separate help saves
tz
parents: 453
diff changeset
   296
#pasteBuffer
838
0ac5a26498c1 help texts & national strings
Claus Gittinger <cg@exept.de>
parents: 827
diff changeset
   297
'Pastes the widgets of the clipboard at the current mouse position.'
466
daba7254ed49 no separate help saves
tz
parents: 453
diff changeset
   298
daba7254ed49 no separate help saves
tz
parents: 453
diff changeset
   299
#pasteWithLayout
713
f94e58bb44ac some changes for the docu
tz
parents: 697
diff changeset
   300
'Pastes the widgets of the clipboard without a changing of their layouts.'
f94e58bb44ac some changes for the docu
tz
parents: 697
diff changeset
   301
1827
691d1471cd3e WOs changes
werner
parents: 1820
diff changeset
   302
#referToCOnfigDatabase
691d1471cd3e WOs changes
werner
parents: 1820
diff changeset
   303
''
691d1471cd3e WOs changes
werner
parents: 1820
diff changeset
   304
691d1471cd3e WOs changes
werner
parents: 1820
diff changeset
   305
#settingsAspectsAsInstances
691d1471cd3e WOs changes
werner
parents: 1820
diff changeset
   306
'Generate aspects as instance variables (or bindings, if off).'
691d1471cd3e WOs changes
werner
parents: 1820
diff changeset
   307
713
f94e58bb44ac some changes for the docu
tz
parents: 697
diff changeset
   308
#settingsCanvas
f94e58bb44ac some changes for the docu
tz
parents: 697
diff changeset
   309
'Shows or hides the canvas window.'
f94e58bb44ac some changes for the docu
tz
parents: 697
diff changeset
   310
f94e58bb44ac some changes for the docu
tz
parents: 697
diff changeset
   311
#settingsGallery
f94e58bb44ac some changes for the docu
tz
parents: 697
diff changeset
   312
'Shows or hides the gallery window.'
f94e58bb44ac some changes for the docu
tz
parents: 697
diff changeset
   313
f94e58bb44ac some changes for the docu
tz
parents: 697
diff changeset
   314
#settingsGridManager
1032
abe3ed3bebc9 help texts
Claus Gittinger <cg@exept.de>
parents: 1027
diff changeset
   315
'Opens a dialog to toggle grid display or to change the grids spacing.'
713
f94e58bb44ac some changes for the docu
tz
parents: 697
diff changeset
   316
f94e58bb44ac some changes for the docu
tz
parents: 697
diff changeset
   317
#settingsRedefineAspectMethods
924
0416d7cbae92 reviewed help texts;
Claus Gittinger <cg@exept.de>
parents: 913
diff changeset
   318
'Toggles the permission to overwrite existing aspect methods.'
0416d7cbae92 reviewed help texts;
Claus Gittinger <cg@exept.de>
parents: 913
diff changeset
   319
743
d58a3e7e39d5 support user defined font styles
tz
parents: 735
diff changeset
   320
#settingsTranscriptHelp
924
0416d7cbae92 reviewed help texts;
Claus Gittinger <cg@exept.de>
parents: 913
diff changeset
   321
'Toggles display of help texts (after opening a new GUI Painter).'
743
d58a3e7e39d5 support user defined font styles
tz
parents: 735
diff changeset
   322
713
f94e58bb44ac some changes for the docu
tz
parents: 697
diff changeset
   323
#settingsUndoManager
838
0ac5a26498c1 help texts & national strings
Claus Gittinger <cg@exept.de>
parents: 827
diff changeset
   324
'Opens a dialog to undo modifications.'
287
1ecabfd468dc HelpTool is seperated like LayoutTool
ca
parents: 282
diff changeset
   325
1ecabfd468dc HelpTool is seperated like LayoutTool
ca
parents: 282
diff changeset
   326
#spreadSelectionHor
1862
Claus Gittinger <cg@exept.de>
parents: 1851
diff changeset
   327
'Sets the horizontal spaces between the selected widgets to the same value.'
287
1ecabfd468dc HelpTool is seperated like LayoutTool
ca
parents: 282
diff changeset
   328
466
daba7254ed49 no separate help saves
tz
parents: 453
diff changeset
   329
#spreadSelectionVer
1862
Claus Gittinger <cg@exept.de>
parents: 1851
diff changeset
   330
'Sets the vertical spaces between the selected widgets to the same value.'
713
f94e58bb44ac some changes for the docu
tz
parents: 697
diff changeset
   331
f94e58bb44ac some changes for the docu
tz
parents: 697
diff changeset
   332
#testGeometryTestMode
924
0416d7cbae92 reviewed help texts;
Claus Gittinger <cg@exept.de>
parents: 913
diff changeset
   333
'Toggles geometry test mode (to define ratios of variable panels and top-window dimension).'
498
43a78c5f806c help texts added
tz
parents: 496
diff changeset
   334
43a78c5f806c help texts added
tz
parents: 496
diff changeset
   335
#testStartApplication
838
0ac5a26498c1 help texts & national strings
Claus Gittinger <cg@exept.de>
parents: 827
diff changeset
   336
'Starts the application with the current window spec.'
194
2b05bd327785 recompute property list when changing view ordering by
ca
parents: 193
diff changeset
   337
193
450d9e5c6f4a checkin from browser
ca
parents: 187
diff changeset
   338
)
450d9e5c6f4a checkin from browser
ca
parents: 187
diff changeset
   339
! !
450d9e5c6f4a checkin from browser
ca
parents: 187
diff changeset
   340
297
14db1276218c change the spec;
ca
parents: 295
diff changeset
   341
!UIPainter class methodsFor:'helpers'!
14db1276218c change the spec;
ca
parents: 295
diff changeset
   342
368
9e588f397bc9 support of lineFeed character \ in the help text
ca
parents: 366
diff changeset
   343
convertString:aString maxLineSize:maxCharactersPerLine skipLineFeed:skipLineFeed
297
14db1276218c change the spec;
ca
parents: 295
diff changeset
   344
    "converts a string to a string collection with maximum characters
14db1276218c change the spec;
ca
parents: 295
diff changeset
   345
     per line
14db1276218c change the spec;
ca
parents: 295
diff changeset
   346
    "
14db1276218c change the spec;
ca
parents: 295
diff changeset
   347
    |stream
2217
b54632779619 Use class var for SelectionPanel
Stefan Vogel <sv@exept.de>
parents: 2213
diff changeset
   348
        max     "{ Class:SmallInteger }"
b54632779619 Use class var for SelectionPanel
Stefan Vogel <sv@exept.de>
parents: 2213
diff changeset
   349
        size    "{ Class:SmallInteger }"
b54632779619 Use class var for SelectionPanel
Stefan Vogel <sv@exept.de>
parents: 2213
diff changeset
   350
        start   "{ Class:SmallInteger }"
b54632779619 Use class var for SelectionPanel
Stefan Vogel <sv@exept.de>
parents: 2213
diff changeset
   351
        stop    "{ Class:SmallInteger }"
b54632779619 Use class var for SelectionPanel
Stefan Vogel <sv@exept.de>
parents: 2213
diff changeset
   352
        cpySz   "{ Class:SmallInteger }"
b54632779619 Use class var for SelectionPanel
Stefan Vogel <sv@exept.de>
parents: 2213
diff changeset
   353
        lnSz    "{ Class:SmallInteger }"
b54632779619 Use class var for SelectionPanel
Stefan Vogel <sv@exept.de>
parents: 2213
diff changeset
   354
        atBeginOfLine|
297
14db1276218c change the spec;
ca
parents: 295
diff changeset
   355
14db1276218c change the spec;
ca
parents: 295
diff changeset
   356
    maxCharactersPerLine < 20 ifFalse:[max := maxCharactersPerLine - 1]
2217
b54632779619 Use class var for SelectionPanel
Stefan Vogel <sv@exept.de>
parents: 2213
diff changeset
   357
                               ifTrue:[max := 20].
297
14db1276218c change the spec;
ca
parents: 295
diff changeset
   358
14db1276218c change the spec;
ca
parents: 295
diff changeset
   359
    (size := aString size) <= max ifTrue:[
2217
b54632779619 Use class var for SelectionPanel
Stefan Vogel <sv@exept.de>
parents: 2213
diff changeset
   360
        ^ aString
297
14db1276218c change the spec;
ca
parents: 295
diff changeset
   361
    ].
14db1276218c change the spec;
ca
parents: 295
diff changeset
   362
    start  := 1.
14db1276218c change the spec;
ca
parents: 295
diff changeset
   363
    lnSz   := 0.
14db1276218c change the spec;
ca
parents: 295
diff changeset
   364
    stream := (String new:size) writeStream.
14db1276218c change the spec;
ca
parents: 295
diff changeset
   365
542
11be1353d34c author in doc method
Claus Gittinger <cg@exept.de>
parents: 538
diff changeset
   366
    atBeginOfLine := true.
11be1353d34c author in doc method
Claus Gittinger <cg@exept.de>
parents: 538
diff changeset
   367
297
14db1276218c change the spec;
ca
parents: 295
diff changeset
   368
    [start <= size] whileTrue:[
2217
b54632779619 Use class var for SelectionPanel
Stefan Vogel <sv@exept.de>
parents: 2213
diff changeset
   369
        (start := aString indexOfNonSeparatorStartingAt:start) == 0 ifTrue:[
b54632779619 Use class var for SelectionPanel
Stefan Vogel <sv@exept.de>
parents: 2213
diff changeset
   370
            ^ stream contents
b54632779619 Use class var for SelectionPanel
Stefan Vogel <sv@exept.de>
parents: 2213
diff changeset
   371
        ].
b54632779619 Use class var for SelectionPanel
Stefan Vogel <sv@exept.de>
parents: 2213
diff changeset
   372
        (aString at:start) == $\ ifTrue:[
b54632779619 Use class var for SelectionPanel
Stefan Vogel <sv@exept.de>
parents: 2213
diff changeset
   373
            skipLineFeed ifFalse:[
b54632779619 Use class var for SelectionPanel
Stefan Vogel <sv@exept.de>
parents: 2213
diff changeset
   374
                stream nextPut:$\
b54632779619 Use class var for SelectionPanel
Stefan Vogel <sv@exept.de>
parents: 2213
diff changeset
   375
            ].
b54632779619 Use class var for SelectionPanel
Stefan Vogel <sv@exept.de>
parents: 2213
diff changeset
   376
            start := start + 1.
b54632779619 Use class var for SelectionPanel
Stefan Vogel <sv@exept.de>
parents: 2213
diff changeset
   377
            stream cr.
b54632779619 Use class var for SelectionPanel
Stefan Vogel <sv@exept.de>
parents: 2213
diff changeset
   378
            start := start + 1.
b54632779619 Use class var for SelectionPanel
Stefan Vogel <sv@exept.de>
parents: 2213
diff changeset
   379
            lnSz := 0.
b54632779619 Use class var for SelectionPanel
Stefan Vogel <sv@exept.de>
parents: 2213
diff changeset
   380
        ] ifFalse:[
b54632779619 Use class var for SelectionPanel
Stefan Vogel <sv@exept.de>
parents: 2213
diff changeset
   381
            (stop := aString indexOfSeparatorStartingAt:start) == 0 ifTrue:[
b54632779619 Use class var for SelectionPanel
Stefan Vogel <sv@exept.de>
parents: 2213
diff changeset
   382
                stop := size + 1
b54632779619 Use class var for SelectionPanel
Stefan Vogel <sv@exept.de>
parents: 2213
diff changeset
   383
            ].
b54632779619 Use class var for SelectionPanel
Stefan Vogel <sv@exept.de>
parents: 2213
diff changeset
   384
            (aString at:(stop - 1)) == $\ ifTrue:[
b54632779619 Use class var for SelectionPanel
Stefan Vogel <sv@exept.de>
parents: 2213
diff changeset
   385
                stop := stop - 1
b54632779619 Use class var for SelectionPanel
Stefan Vogel <sv@exept.de>
parents: 2213
diff changeset
   386
            ].
b54632779619 Use class var for SelectionPanel
Stefan Vogel <sv@exept.de>
parents: 2213
diff changeset
   387
            cpySz := stop - start.
b54632779619 Use class var for SelectionPanel
Stefan Vogel <sv@exept.de>
parents: 2213
diff changeset
   388
b54632779619 Use class var for SelectionPanel
Stefan Vogel <sv@exept.de>
parents: 2213
diff changeset
   389
            lnSz == 0 ifFalse:[
b54632779619 Use class var for SelectionPanel
Stefan Vogel <sv@exept.de>
parents: 2213
diff changeset
   390
                (lnSz := lnSz + cpySz) >= max ifTrue:[stream cr.    lnSz := cpySz. atBeginOfLine := true. ]
b54632779619 Use class var for SelectionPanel
Stefan Vogel <sv@exept.de>
parents: 2213
diff changeset
   391
                                             ifFalse:[stream space. lnSz := lnSz + 1]
b54632779619 Use class var for SelectionPanel
Stefan Vogel <sv@exept.de>
parents: 2213
diff changeset
   392
            ] ifTrue:[
b54632779619 Use class var for SelectionPanel
Stefan Vogel <sv@exept.de>
parents: 2213
diff changeset
   393
                lnSz := cpySz
b54632779619 Use class var for SelectionPanel
Stefan Vogel <sv@exept.de>
parents: 2213
diff changeset
   394
            ].
b54632779619 Use class var for SelectionPanel
Stefan Vogel <sv@exept.de>
parents: 2213
diff changeset
   395
            stream nextPutAll:aString startingAt:start to:(stop - 1).
b54632779619 Use class var for SelectionPanel
Stefan Vogel <sv@exept.de>
parents: 2213
diff changeset
   396
            start := stop.
b54632779619 Use class var for SelectionPanel
Stefan Vogel <sv@exept.de>
parents: 2213
diff changeset
   397
        ]
297
14db1276218c change the spec;
ca
parents: 295
diff changeset
   398
    ].
14db1276218c change the spec;
ca
parents: 295
diff changeset
   399
    ^ stream contents
542
11be1353d34c author in doc method
Claus Gittinger <cg@exept.de>
parents: 538
diff changeset
   400
11be1353d34c author in doc method
Claus Gittinger <cg@exept.de>
parents: 538
diff changeset
   401
    "Modified: / 1.2.1998 / 14:42:56 / cg"
297
14db1276218c change the spec;
ca
parents: 295
diff changeset
   402
! !
14db1276218c change the spec;
ca
parents: 295
diff changeset
   403
735
29c8681ce68d no picking for hierarchical lists + error handler for the starting phase
tz
parents: 729
diff changeset
   404
!UIPainter class methodsFor:'image specs'!
29c8681ce68d no picking for hierarchical lists + error handler for the starting phase
tz
parents: 729
diff changeset
   405
1883
577a267a87cb *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1872
diff changeset
   406
arrowDown
577a267a87cb *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1872
diff changeset
   407
    "This resource specification was automatically generated
577a267a87cb *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1872
diff changeset
   408
     by the ImageEditor of ST/X."
577a267a87cb *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1872
diff changeset
   409
577a267a87cb *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1872
diff changeset
   410
    "Do not manually edit this!! If it is corrupted,
577a267a87cb *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1872
diff changeset
   411
     the ImageEditor may not be able to read the specification."
577a267a87cb *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1872
diff changeset
   412
577a267a87cb *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1872
diff changeset
   413
    "
577a267a87cb *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1872
diff changeset
   414
     self arrowDown inspect
577a267a87cb *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1872
diff changeset
   415
     ImageEditor openOnClass:self andSelector:#arrowDown
577a267a87cb *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1872
diff changeset
   416
     Icon flushCachedIcons
577a267a87cb *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1872
diff changeset
   417
    "
577a267a87cb *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1872
diff changeset
   418
577a267a87cb *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1872
diff changeset
   419
    <resource: #image>
577a267a87cb *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1872
diff changeset
   420
577a267a87cb *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1872
diff changeset
   421
    ^Icon
577a267a87cb *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1872
diff changeset
   422
        constantNamed:#'UIPainter class arrowDown'
577a267a87cb *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1872
diff changeset
   423
        ifAbsentPut:[(Depth1Image new) width: 11; height: 11; photometric:(#palette); bitsPerSample:(#[1]); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'?>C?8O? ?>C@XNC <^C;8O? ?>C?8@@a') ; colorMapFromArray:#[0 0 0 255 255 255]; mask:((Depth1Image new) width: 11; height: 11; photometric:(#blackIs0); bitsPerSample:(#[1]); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'
577a267a87cb *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1872
diff changeset
   424
@@@@@@@@@@@? A<@C @D@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
577a267a87cb *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1872
diff changeset
   425
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@a') ; yourself); yourself]
577a267a87cb *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1872
diff changeset
   426
!
577a267a87cb *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1872
diff changeset
   427
577a267a87cb *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1872
diff changeset
   428
arrowLeft
577a267a87cb *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1872
diff changeset
   429
    "This resource specification was automatically generated
577a267a87cb *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1872
diff changeset
   430
     by the ImageEditor of ST/X."
577a267a87cb *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1872
diff changeset
   431
577a267a87cb *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1872
diff changeset
   432
    "Do not manually edit this!! If it is corrupted,
577a267a87cb *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1872
diff changeset
   433
     the ImageEditor may not be able to read the specification."
577a267a87cb *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1872
diff changeset
   434
577a267a87cb *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1872
diff changeset
   435
    "
577a267a87cb *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1872
diff changeset
   436
     self arrowLeft inspect
577a267a87cb *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1872
diff changeset
   437
     ImageEditor openOnClass:self andSelector:#arrowLeft
577a267a87cb *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1872
diff changeset
   438
     Icon flushCachedIcons
577a267a87cb *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1872
diff changeset
   439
    "
577a267a87cb *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1872
diff changeset
   440
577a267a87cb *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1872
diff changeset
   441
    <resource: #image>
577a267a87cb *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1872
diff changeset
   442
577a267a87cb *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1872
diff changeset
   443
    ^Icon
577a267a87cb *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1872
diff changeset
   444
        constantNamed:#'UIPainter class arrowLeft'
577a267a87cb *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1872
diff changeset
   445
        ifAbsentPut:[(Depth1Image new) width: 11; height: 11; photometric:(#palette); bitsPerSample:(#[1]); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'?>C?8O7 >^C18NG <^C98O7 ?>C?8@@a') ; colorMapFromArray:#[0 0 0 255 255 255]; mask:((Depth1Image new) width: 11; height: 11; photometric:(#blackIs0); bitsPerSample:(#[1]); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@@@@@H@A @N@A8@C PF@@H@@@@@@@@a') ; yourself); yourself]
577a267a87cb *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1872
diff changeset
   446
!
577a267a87cb *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1872
diff changeset
   447
577a267a87cb *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1872
diff changeset
   448
arrowRight
577a267a87cb *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1872
diff changeset
   449
    "This resource specification was automatically generated
577a267a87cb *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1872
diff changeset
   450
     by the ImageEditor of ST/X."
577a267a87cb *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1872
diff changeset
   451
577a267a87cb *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1872
diff changeset
   452
    "Do not manually edit this!! If it is corrupted,
577a267a87cb *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1872
diff changeset
   453
     the ImageEditor may not be able to read the specification."
577a267a87cb *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1872
diff changeset
   454
577a267a87cb *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1872
diff changeset
   455
    "
577a267a87cb *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1872
diff changeset
   456
     self arrowRight inspect
577a267a87cb *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1872
diff changeset
   457
     ImageEditor openOnClass:self andSelector:#arrowRight
577a267a87cb *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1872
diff changeset
   458
     Icon flushCachedIcons
577a267a87cb *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1872
diff changeset
   459
    "
577a267a87cb *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1872
diff changeset
   460
577a267a87cb *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1872
diff changeset
   461
    <resource: #image>
577a267a87cb *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1872
diff changeset
   462
577a267a87cb *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1872
diff changeset
   463
    ^Icon
577a267a87cb *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1872
diff changeset
   464
        constantNamed:#'UIPainter class arrowRight'
577a267a87cb *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1872
diff changeset
   465
        ifAbsentPut:[(Depth1Image new) width: 11; height: 11; photometric:(#palette); bitsPerSample:(#[1]); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'?>C?8O_ <>C18OC <^C38O_ ?>C?8@@a') ; colorMapFromArray:#[0 0 0 255 255 255]; mask:((Depth1Image new) width: 11; height: 11; photometric:(#blackIs0); bitsPerSample:(#[1]); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@@@@@ @C@@NA@<@C @L@@ @@@@@@@@a') ; yourself); yourself]
577a267a87cb *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1872
diff changeset
   466
!
577a267a87cb *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1872
diff changeset
   467
577a267a87cb *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1872
diff changeset
   468
arrowUp
577a267a87cb *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1872
diff changeset
   469
    "This resource specification was automatically generated
577a267a87cb *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1872
diff changeset
   470
     by the ImageEditor of ST/X."
577a267a87cb *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1872
diff changeset
   471
577a267a87cb *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1872
diff changeset
   472
    "Do not manually edit this!! If it is corrupted,
577a267a87cb *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1872
diff changeset
   473
     the ImageEditor may not be able to read the specification."
577a267a87cb *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1872
diff changeset
   474
577a267a87cb *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1872
diff changeset
   475
    "
577a267a87cb *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1872
diff changeset
   476
     self arrowUp inspect
577a267a87cb *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1872
diff changeset
   477
     ImageEditor openOnClass:self andSelector:#arrowUp
577a267a87cb *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1872
diff changeset
   478
     Icon flushCachedIcons
577a267a87cb *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1872
diff changeset
   479
    "
577a267a87cb *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1872
diff changeset
   480
577a267a87cb *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1872
diff changeset
   481
    <resource: #image>
577a267a87cb *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1872
diff changeset
   482
577a267a87cb *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1872
diff changeset
   483
    ^Icon
577a267a87cb *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1872
diff changeset
   484
        constantNamed:#'UIPainter class arrowUp'
577a267a87cb *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1872
diff changeset
   485
        ifAbsentPut:[(Depth1Image new) width: 11; height: 11; photometric:(#palette); bitsPerSample:(#[1]); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'?>C?8O? >>C18NC 0FC?8O? ?>C?8@@a') ; colorMapFromArray:#[0 0 0 255 255 255]; mask:((Depth1Image new) width: 11; height: 11; photometric:(#blackIs0); bitsPerSample:(#[1]); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@@@@@@@A@@NG1<@O8@@@@@@@@@@AP@a') ; yourself); yourself]
577a267a87cb *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1872
diff changeset
   486
!
577a267a87cb *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1872
diff changeset
   487
2210
0a2c19976d82 action creation/browse added
Claus Gittinger <cg@exept.de>
parents: 2208
diff changeset
   488
browseActionImage
0a2c19976d82 action creation/browse added
Claus Gittinger <cg@exept.de>
parents: 2208
diff changeset
   489
    "This resource specification was automatically generated
0a2c19976d82 action creation/browse added
Claus Gittinger <cg@exept.de>
parents: 2208
diff changeset
   490
     by the ImageEditor of ST/X."
0a2c19976d82 action creation/browse added
Claus Gittinger <cg@exept.de>
parents: 2208
diff changeset
   491
0a2c19976d82 action creation/browse added
Claus Gittinger <cg@exept.de>
parents: 2208
diff changeset
   492
    "Do not manually edit this!! If it is corrupted,
0a2c19976d82 action creation/browse added
Claus Gittinger <cg@exept.de>
parents: 2208
diff changeset
   493
     the ImageEditor may not be able to read the specification."
0a2c19976d82 action creation/browse added
Claus Gittinger <cg@exept.de>
parents: 2208
diff changeset
   494
0a2c19976d82 action creation/browse added
Claus Gittinger <cg@exept.de>
parents: 2208
diff changeset
   495
    "
0a2c19976d82 action creation/browse added
Claus Gittinger <cg@exept.de>
parents: 2208
diff changeset
   496
     self browseActionImage inspect
0a2c19976d82 action creation/browse added
Claus Gittinger <cg@exept.de>
parents: 2208
diff changeset
   497
     ImageEditor openOnClass:self andSelector:#browseActionImage
0a2c19976d82 action creation/browse added
Claus Gittinger <cg@exept.de>
parents: 2208
diff changeset
   498
     Icon flushCachedIcons
0a2c19976d82 action creation/browse added
Claus Gittinger <cg@exept.de>
parents: 2208
diff changeset
   499
    "
0a2c19976d82 action creation/browse added
Claus Gittinger <cg@exept.de>
parents: 2208
diff changeset
   500
0a2c19976d82 action creation/browse added
Claus Gittinger <cg@exept.de>
parents: 2208
diff changeset
   501
    <resource: #image>
0a2c19976d82 action creation/browse added
Claus Gittinger <cg@exept.de>
parents: 2208
diff changeset
   502
0a2c19976d82 action creation/browse added
Claus Gittinger <cg@exept.de>
parents: 2208
diff changeset
   503
    ^Icon
0a2c19976d82 action creation/browse added
Claus Gittinger <cg@exept.de>
parents: 2208
diff changeset
   504
        constantNamed:#'UISpecification class browseActionImage'
0a2c19976d82 action creation/browse added
Claus Gittinger <cg@exept.de>
parents: 2208
diff changeset
   505
        ifAbsentPut:[(Depth8Image new) width: 11; height: 12; photometric:(#palette); bitsPerSample:(#[8]); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'
0a2c19976d82 action creation/browse added
Claus Gittinger <cg@exept.de>
parents: 2208
diff changeset
   506
R@@@RT%RST1LTD9H@D%IT%MRSD1PS$!!RT$5RUEILT%INT%UVT%YWU%IVUUIHT%!!YV%-ZVU!!RWD!!MT%Y[@E-VT%5\RD1RU%,@V5YRWU1HT%!!YV%-ZVU!!RWEIU
0a2c19976d82 action creation/browse added
Claus Gittinger <cg@exept.de>
parents: 2208
diff changeset
   507
U%IVU5YRU%URZ%IR@EITT ART&,@@@@@T%MR@@@@@@@@@@@@T @@@@@@') ; colorMapFromArray:#[255 248 248 63 144 224 64 152 232 79 160 232 64 152 224 64 144 224 63 136 224 48 128 216 48 120 216 47 112 216 47 112 208 32 104 208 32 96 208 31 88 200 16 88 200 16 80 200 15 72 192 15 64 192 0 64 192 0 56 184 0 56 176 0 48 160 143 200 248 128 200 248 127 192 248 112 184 248 111 176 248 96 168 248 95 160 248 80 152 248 79 144 248 64 128 248 63 120 248 48 112 248 32 104 248 31 96 248 16 88 248 15 80 248 0 72 248 0 64 240 0 48 168 112 176 248 111 168 248 96 160 248 95 152 248 80 144 248 79 136 248 63 128 248 48 120 248 47 112 248 15 72 248 0 48 176 95 168 232 191 224 248 191 216 248 176 208 248 175 208 248 175 200 248 160 200 248 160 192 248 159 192 248 159 184 248 144 184 248 144 176 248 143 168 248 128 168 248 128 160 248 127 160 248 127 152 240 31 72 176 111 168 232 127 160 216 207 216 240 240 240 248 240 232 240 63 88 176 239 232 240 240 240 240 48 88 176 96 168 224 224 224 232 96 160 224 240 144 24 255 248 48 255 248 96 255 248 24 240 208 24 255 248 152 255 248 88 255 248 136 255 248 176 255 248 200 48 80 176 223 216 224 96 152 224 96 152 216 95 152 216 48 120 208 80 144 208 80 136 208 79 128 200 79 120 200 79 120 192 64 112 192 64 104 184 63 104 184 63 96 184 15 56 160]; mask:((Depth1Image new) width: 11; height: 12; photometric:(#blackIs0); bitsPerSample:(#[1]); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'A@@N@F;@?>A?0G>@O8A?0O? [,@N@@P@') ; yourself); yourself]
0a2c19976d82 action creation/browse added
Claus Gittinger <cg@exept.de>
parents: 2208
diff changeset
   508
!
0a2c19976d82 action creation/browse added
Claus Gittinger <cg@exept.de>
parents: 2208
diff changeset
   509
2157
76aadc90818e mask of icons
Claus Gittinger <cg@exept.de>
parents: 2138
diff changeset
   510
defaultIcon
2175
f8dd64f73dfc icon resource
Claus Gittinger <cg@exept.de>
parents: 2159
diff changeset
   511
    <resource: #programImage>
f8dd64f73dfc icon resource
Claus Gittinger <cg@exept.de>
parents: 2159
diff changeset
   512
2157
76aadc90818e mask of icons
Claus Gittinger <cg@exept.de>
parents: 2138
diff changeset
   513
    ^ ToolbarIconLibrary startUIPainterIcon
76aadc90818e mask of icons
Claus Gittinger <cg@exept.de>
parents: 2138
diff changeset
   514
76aadc90818e mask of icons
Claus Gittinger <cg@exept.de>
parents: 2138
diff changeset
   515
    "Created: / 10-02-2007 / 14:45:56 / cg"
2175
f8dd64f73dfc icon resource
Claus Gittinger <cg@exept.de>
parents: 2159
diff changeset
   516
    "Modified: / 17-09-2007 / 11:36:33 / cg"
2157
76aadc90818e mask of icons
Claus Gittinger <cg@exept.de>
parents: 2138
diff changeset
   517
!
76aadc90818e mask of icons
Claus Gittinger <cg@exept.de>
parents: 2138
diff changeset
   518
735
29c8681ce68d no picking for hierarchical lists + error handler for the starting phase
tz
parents: 729
diff changeset
   519
iconAlignB
743
d58a3e7e39d5 support user defined font styles
tz
parents: 735
diff changeset
   520
    "This resource specification was automatically generated
d58a3e7e39d5 support user defined font styles
tz
parents: 735
diff changeset
   521
     by the ImageEditor of ST/X."
d58a3e7e39d5 support user defined font styles
tz
parents: 735
diff changeset
   522
778
a4b931b2aff6 master widget highlighting changed in the tree list
tz
parents: 774
diff changeset
   523
    "Do not manually edit this!! If it is corrupted,
743
d58a3e7e39d5 support user defined font styles
tz
parents: 735
diff changeset
   524
     the ImageEditor may not be able to read the specification."
d58a3e7e39d5 support user defined font styles
tz
parents: 735
diff changeset
   525
735
29c8681ce68d no picking for hierarchical lists + error handler for the starting phase
tz
parents: 729
diff changeset
   526
    "
743
d58a3e7e39d5 support user defined font styles
tz
parents: 735
diff changeset
   527
     ImageEditor openOnClass:self andSelector:#iconAlignB
735
29c8681ce68d no picking for hierarchical lists + error handler for the starting phase
tz
parents: 729
diff changeset
   528
    "
29c8681ce68d no picking for hierarchical lists + error handler for the starting phase
tz
parents: 729
diff changeset
   529
29c8681ce68d no picking for hierarchical lists + error handler for the starting phase
tz
parents: 729
diff changeset
   530
    <resource: #image>
29c8681ce68d no picking for hierarchical lists + error handler for the starting phase
tz
parents: 729
diff changeset
   531
29c8681ce68d no picking for hierarchical lists + error handler for the starting phase
tz
parents: 729
diff changeset
   532
    ^Icon
2217
b54632779619 Use class var for SelectionPanel
Stefan Vogel <sv@exept.de>
parents: 2213
diff changeset
   533
        constantNamed:#'UIPainter iconAlignB'
b54632779619 Use class var for SelectionPanel
Stefan Vogel <sv@exept.de>
parents: 2213
diff changeset
   534
        ifAbsentPut:[(Depth2Image new) width: 22; height: 22; photometric:(#palette); bitsPerSample:(#(2 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@E@@@@@@@G@@@@@@@G@E@@@@@G@G@@@@@G@G@@@@@G@G@@@E@G@G@@@G@G@G@K@G@G@G@@@G@G@G@A@G@G@G@@@G@G@G@K@@@@@@@@B*****(@B*****(@@@@@@@@@@@@@@@@@@@@@@@@@') ; colorMapFromArray:#[0 0 0 255 255 255 0 0 127 170 170 170]; mask:((Depth1Image new) width: 22; height: 22; photometric:(#blackIs0); bitsPerSample:(#(1 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@@@@@@@@@@@@G C@G @@G'' @G'' @G'' @G'' G'''' G'''' G'''' G''''!!G'''' G'''' G'''' G'''' O??0O??0@@@@@@@C@@@@') ; yourself); yourself]
778
a4b931b2aff6 master widget highlighting changed in the tree list
tz
parents: 774
diff changeset
   535
!
735
29c8681ce68d no picking for hierarchical lists + error handler for the starting phase
tz
parents: 729
diff changeset
   536
29c8681ce68d no picking for hierarchical lists + error handler for the starting phase
tz
parents: 729
diff changeset
   537
iconAlignL
743
d58a3e7e39d5 support user defined font styles
tz
parents: 735
diff changeset
   538
    "This resource specification was automatically generated
d58a3e7e39d5 support user defined font styles
tz
parents: 735
diff changeset
   539
     by the ImageEditor of ST/X."
d58a3e7e39d5 support user defined font styles
tz
parents: 735
diff changeset
   540
778
a4b931b2aff6 master widget highlighting changed in the tree list
tz
parents: 774
diff changeset
   541
    "Do not manually edit this!! If it is corrupted,
743
d58a3e7e39d5 support user defined font styles
tz
parents: 735
diff changeset
   542
     the ImageEditor may not be able to read the specification."
d58a3e7e39d5 support user defined font styles
tz
parents: 735
diff changeset
   543
735
29c8681ce68d no picking for hierarchical lists + error handler for the starting phase
tz
parents: 729
diff changeset
   544
    "
743
d58a3e7e39d5 support user defined font styles
tz
parents: 735
diff changeset
   545
     ImageEditor openOnClass:self andSelector:#iconAlignL
735
29c8681ce68d no picking for hierarchical lists + error handler for the starting phase
tz
parents: 729
diff changeset
   546
    "
29c8681ce68d no picking for hierarchical lists + error handler for the starting phase
tz
parents: 729
diff changeset
   547
29c8681ce68d no picking for hierarchical lists + error handler for the starting phase
tz
parents: 729
diff changeset
   548
    <resource: #image>
29c8681ce68d no picking for hierarchical lists + error handler for the starting phase
tz
parents: 729
diff changeset
   549
29c8681ce68d no picking for hierarchical lists + error handler for the starting phase
tz
parents: 729
diff changeset
   550
    ^Icon
2217
b54632779619 Use class var for SelectionPanel
Stefan Vogel <sv@exept.de>
parents: 2213
diff changeset
   551
        constantNamed:#'UIPainter iconAlignL'
b54632779619 Use class var for SelectionPanel
Stefan Vogel <sv@exept.de>
parents: 2213
diff changeset
   552
        ifAbsentPut:[(Depth2Image new) width: 22; height: 22; photometric:(#palette); bitsPerSample:(#(2 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@@@@@@@@@@@@@@@@(@@@@@@@(@@@@@@@(UUUP@I@(_??0@@@(@@@@@@@(@@@@@@@(@@@@@@@(@@@@@@@(UUUU@@@(_???@@@(@@@@@E@(@@@@@@@(@@@@@@@(@@@@@@@(UU@@@@@(_?@@@@@(@@@@@@@(@@@@@@@@@@@@@E@@@@@@@@') ; colorMapFromArray:#[0 0 0 255 255 255 0 0 127 170 170 170]; mask:((Depth1Image new) width: 22; height: 22; photometric:(#blackIs0); bitsPerSample:(#(1 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@@@@@@@F@@@G?>@G?>@G?>@G?>@F@@@F@@@G?? G?? G?? G?? F@@@F@@@G? @G? @G? @G? @F@@@@@@@@@@@') ; yourself); yourself]
778
a4b931b2aff6 master widget highlighting changed in the tree list
tz
parents: 774
diff changeset
   553
!
735
29c8681ce68d no picking for hierarchical lists + error handler for the starting phase
tz
parents: 729
diff changeset
   554
29c8681ce68d no picking for hierarchical lists + error handler for the starting phase
tz
parents: 729
diff changeset
   555
iconAlignLR
743
d58a3e7e39d5 support user defined font styles
tz
parents: 735
diff changeset
   556
    "This resource specification was automatically generated
d58a3e7e39d5 support user defined font styles
tz
parents: 735
diff changeset
   557
     by the ImageEditor of ST/X."
d58a3e7e39d5 support user defined font styles
tz
parents: 735
diff changeset
   558
785
35ad7901368c avoid selection problems
tz
parents: 778
diff changeset
   559
    "Do not manually edit this!! If it is corrupted,
743
d58a3e7e39d5 support user defined font styles
tz
parents: 735
diff changeset
   560
     the ImageEditor may not be able to read the specification."
d58a3e7e39d5 support user defined font styles
tz
parents: 735
diff changeset
   561
735
29c8681ce68d no picking for hierarchical lists + error handler for the starting phase
tz
parents: 729
diff changeset
   562
    "
743
d58a3e7e39d5 support user defined font styles
tz
parents: 735
diff changeset
   563
     ImageEditor openOnClass:self andSelector:#iconAlignLR
735
29c8681ce68d no picking for hierarchical lists + error handler for the starting phase
tz
parents: 729
diff changeset
   564
    "
29c8681ce68d no picking for hierarchical lists + error handler for the starting phase
tz
parents: 729
diff changeset
   565
29c8681ce68d no picking for hierarchical lists + error handler for the starting phase
tz
parents: 729
diff changeset
   566
    <resource: #image>
29c8681ce68d no picking for hierarchical lists + error handler for the starting phase
tz
parents: 729
diff changeset
   567
29c8681ce68d no picking for hierarchical lists + error handler for the starting phase
tz
parents: 729
diff changeset
   568
    ^Icon
2217
b54632779619 Use class var for SelectionPanel
Stefan Vogel <sv@exept.de>
parents: 2213
diff changeset
   569
        constantNamed:#'UIPainter iconAlignLR'
b54632779619 Use class var for SelectionPanel
Stefan Vogel <sv@exept.de>
parents: 2213
diff changeset
   570
        ifAbsentPut:[(Depth2Image new) width: 22; height: 22; photometric:(#palette); bitsPerSample:(#(2 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@@@@@@@@@@@@@@@@(@@@B @@(@@@B @@(UUUR I@(_??2 @@(@@@B @@(@@@B @@(@@@B @@(@@@B @@(UUUR @@(_??2 @@(@@@B E@(@@@B @@(@@@B @@(@@@B @@(UUUR @@(_??B @@(@@@B @@(@@@B @@@@@@@@E@@@@@@@@') ; colorMapFromArray:#[0 0 0 255 255 255 0 0 127 170 170 170]; mask:((Depth1Image new) width: 22; height: 22; photometric:(#blackIs0); bitsPerSample:(#(1 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@@@@@@@F@A G?? G?? G?? G?? F@A F@A G?? G?? G?? G?? F@A F@A G?? G?? G?; G?? F@A @@@@@@@@') ; yourself); yourself]
785
35ad7901368c avoid selection problems
tz
parents: 778
diff changeset
   571
!
735
29c8681ce68d no picking for hierarchical lists + error handler for the starting phase
tz
parents: 729
diff changeset
   572
29c8681ce68d no picking for hierarchical lists + error handler for the starting phase
tz
parents: 729
diff changeset
   573
iconAlignR
743
d58a3e7e39d5 support user defined font styles
tz
parents: 735
diff changeset
   574
    "This resource specification was automatically generated
d58a3e7e39d5 support user defined font styles
tz
parents: 735
diff changeset
   575
     by the ImageEditor of ST/X."
d58a3e7e39d5 support user defined font styles
tz
parents: 735
diff changeset
   576
778
a4b931b2aff6 master widget highlighting changed in the tree list
tz
parents: 774
diff changeset
   577
    "Do not manually edit this!! If it is corrupted,
743
d58a3e7e39d5 support user defined font styles
tz
parents: 735
diff changeset
   578
     the ImageEditor may not be able to read the specification."
d58a3e7e39d5 support user defined font styles
tz
parents: 735
diff changeset
   579
735
29c8681ce68d no picking for hierarchical lists + error handler for the starting phase
tz
parents: 729
diff changeset
   580
    "
743
d58a3e7e39d5 support user defined font styles
tz
parents: 735
diff changeset
   581
     ImageEditor openOnClass:self andSelector:#iconAlignR
735
29c8681ce68d no picking for hierarchical lists + error handler for the starting phase
tz
parents: 729
diff changeset
   582
    "
29c8681ce68d no picking for hierarchical lists + error handler for the starting phase
tz
parents: 729
diff changeset
   583
29c8681ce68d no picking for hierarchical lists + error handler for the starting phase
tz
parents: 729
diff changeset
   584
    <resource: #image>
29c8681ce68d no picking for hierarchical lists + error handler for the starting phase
tz
parents: 729
diff changeset
   585
29c8681ce68d no picking for hierarchical lists + error handler for the starting phase
tz
parents: 729
diff changeset
   586
    ^Icon
2217
b54632779619 Use class var for SelectionPanel
Stefan Vogel <sv@exept.de>
parents: 2213
diff changeset
   587
        constantNamed:#'UIPainter iconAlignR'
b54632779619 Use class var for SelectionPanel
Stefan Vogel <sv@exept.de>
parents: 2213
diff changeset
   588
        ifAbsentPut:[(Depth2Image new) width: 22; height: 22; photometric:(#palette); bitsPerSample:(#(2 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@@@@@@@@@@@@@@@@@@@@B @@@@@@B @@@UUUR I@@_??2 @@@@@@B @@@@@@B @@@@@@B @@@@@@B @@EUUUR @@G???2 @@@@@@B E@@@@@B @@@@@@B @@@@@@B @@@@EUR @@@@G?2 @@@@@@B @@@@@@B @@@@@@@@E@@@@@@@@') ; colorMapFromArray:#[0 0 0 255 255 255 0 0 127 170 170 170]; mask:((Depth1Image new) width: 22; height: 22; photometric:(#blackIs0); bitsPerSample:(#(1 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@@@@@@@@@A A?? A?? A?? A?? @@A @@A G?? G?? G?? G?? @@A @@A @G? @G? @G? @G? @@A @@@@@@@@') ; yourself); yourself]
1432
c032f34cd7bb remove shortcutKeyCharacter's from menu
ca
parents: 1397
diff changeset
   589
!
735
29c8681ce68d no picking for hierarchical lists + error handler for the starting phase
tz
parents: 729
diff changeset
   590
29c8681ce68d no picking for hierarchical lists + error handler for the starting phase
tz
parents: 729
diff changeset
   591
iconAlignT
743
d58a3e7e39d5 support user defined font styles
tz
parents: 735
diff changeset
   592
    "This resource specification was automatically generated
d58a3e7e39d5 support user defined font styles
tz
parents: 735
diff changeset
   593
     by the ImageEditor of ST/X."
d58a3e7e39d5 support user defined font styles
tz
parents: 735
diff changeset
   594
778
a4b931b2aff6 master widget highlighting changed in the tree list
tz
parents: 774
diff changeset
   595
    "Do not manually edit this!! If it is corrupted,
743
d58a3e7e39d5 support user defined font styles
tz
parents: 735
diff changeset
   596
     the ImageEditor may not be able to read the specification."
d58a3e7e39d5 support user defined font styles
tz
parents: 735
diff changeset
   597
735
29c8681ce68d no picking for hierarchical lists + error handler for the starting phase
tz
parents: 729
diff changeset
   598
    "
743
d58a3e7e39d5 support user defined font styles
tz
parents: 735
diff changeset
   599
     ImageEditor openOnClass:self andSelector:#iconAlignT
735
29c8681ce68d no picking for hierarchical lists + error handler for the starting phase
tz
parents: 729
diff changeset
   600
    "
29c8681ce68d no picking for hierarchical lists + error handler for the starting phase
tz
parents: 729
diff changeset
   601
29c8681ce68d no picking for hierarchical lists + error handler for the starting phase
tz
parents: 729
diff changeset
   602
    <resource: #image>
29c8681ce68d no picking for hierarchical lists + error handler for the starting phase
tz
parents: 729
diff changeset
   603
29c8681ce68d no picking for hierarchical lists + error handler for the starting phase
tz
parents: 729
diff changeset
   604
    ^Icon
2217
b54632779619 Use class var for SelectionPanel
Stefan Vogel <sv@exept.de>
parents: 2213
diff changeset
   605
        constantNamed:#'UIPainter iconAlignT'
b54632779619 Use class var for SelectionPanel
Stefan Vogel <sv@exept.de>
parents: 2213
diff changeset
   606
        ifAbsentPut:[(Depth2Image new) width: 22; height: 22; photometric:(#palette); bitsPerSample:(#(2 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@@@@@@@@@@@@@@@@@@@@@@@B*****(@B*****(@@@@@@@@@@E@E@E@K@G@G@G@@@G@G@G@A@G@G@G@@@G@G@G@K@G@G@G@@@@@G@G@@@@@G@G@@@@@G@G@@@@@G@G@@@@@G@@@@@@@G@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@') ; colorMapFromArray:#[0 0 0 255 255 255 0 0 127 170 170 170]; mask:((Depth1Image new) width: 22; height: 22; photometric:(#blackIs0); bitsPerSample:(#(1 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@@@@@@C@@@@O??0O??0G'''' G'''' G'''' G'''' G''''!!G'''' G'''' G'''' @G'' @G'' @G'' @G'' @G @@G C@@@@@@@@@@@@') ; yourself); yourself]
778
a4b931b2aff6 master widget highlighting changed in the tree list
tz
parents: 774
diff changeset
   607
!
735
29c8681ce68d no picking for hierarchical lists + error handler for the starting phase
tz
parents: 729
diff changeset
   608
29c8681ce68d no picking for hierarchical lists + error handler for the starting phase
tz
parents: 729
diff changeset
   609
iconAlignTB
743
d58a3e7e39d5 support user defined font styles
tz
parents: 735
diff changeset
   610
    "This resource specification was automatically generated
d58a3e7e39d5 support user defined font styles
tz
parents: 735
diff changeset
   611
     by the ImageEditor of ST/X."
d58a3e7e39d5 support user defined font styles
tz
parents: 735
diff changeset
   612
778
a4b931b2aff6 master widget highlighting changed in the tree list
tz
parents: 774
diff changeset
   613
    "Do not manually edit this!! If it is corrupted,
743
d58a3e7e39d5 support user defined font styles
tz
parents: 735
diff changeset
   614
     the ImageEditor may not be able to read the specification."
d58a3e7e39d5 support user defined font styles
tz
parents: 735
diff changeset
   615
735
29c8681ce68d no picking for hierarchical lists + error handler for the starting phase
tz
parents: 729
diff changeset
   616
    "
743
d58a3e7e39d5 support user defined font styles
tz
parents: 735
diff changeset
   617
     ImageEditor openOnClass:self andSelector:#iconAlignTB
735
29c8681ce68d no picking for hierarchical lists + error handler for the starting phase
tz
parents: 729
diff changeset
   618
    "
29c8681ce68d no picking for hierarchical lists + error handler for the starting phase
tz
parents: 729
diff changeset
   619
29c8681ce68d no picking for hierarchical lists + error handler for the starting phase
tz
parents: 729
diff changeset
   620
    <resource: #image>
29c8681ce68d no picking for hierarchical lists + error handler for the starting phase
tz
parents: 729
diff changeset
   621
29c8681ce68d no picking for hierarchical lists + error handler for the starting phase
tz
parents: 729
diff changeset
   622
    ^Icon
2217
b54632779619 Use class var for SelectionPanel
Stefan Vogel <sv@exept.de>
parents: 2213
diff changeset
   623
        constantNamed:#'UIPainter iconAlignTB'
b54632779619 Use class var for SelectionPanel
Stefan Vogel <sv@exept.de>
parents: 2213
diff changeset
   624
        ifAbsentPut:[(Depth2Image new) width: 22; height: 22; photometric:(#palette); bitsPerSample:(#(2 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@@@@@@A@@@@@@@@@@@@@@@@B*****(@B*****(@@@@@@@@@@E@E@E@G@G@G@G@@@G@G@G@@@G@G@G@@@G@G@G@H@G@G@G@@@G@G@G@A@G@G@G@@@G@G@G@@@G@G@D@@@@@@@@@@B*****(@B*****(@@@@@@@@@@@@@@@@H@@@@@@@@') ; colorMapFromArray:#[0 0 0 255 255 255 0 0 127 170 170 170]; mask:((Depth1Image new) width: 22; height: 22; photometric:(#blackIs0); bitsPerSample:(#(1 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@@@@@@C@@@@O??0O??0G'''' G''''!!G'''' G'''' G'''' G'''' G'''' G'''' G''''!!G''''!!G''& G'''' O??0O??2@@@@@@@@@@@@') ; yourself); yourself]
1862
Claus Gittinger <cg@exept.de>
parents: 1851
diff changeset
   625
!
Claus Gittinger <cg@exept.de>
parents: 1851
diff changeset
   626
Claus Gittinger <cg@exept.de>
parents: 1851
diff changeset
   627
iconCenterH
Claus Gittinger <cg@exept.de>
parents: 1851
diff changeset
   628
    "This resource specification was automatically generated
Claus Gittinger <cg@exept.de>
parents: 1851
diff changeset
   629
     by the ImageEditor of ST/X."
Claus Gittinger <cg@exept.de>
parents: 1851
diff changeset
   630
Claus Gittinger <cg@exept.de>
parents: 1851
diff changeset
   631
    "Do not manually edit this!! If it is corrupted,
Claus Gittinger <cg@exept.de>
parents: 1851
diff changeset
   632
     the ImageEditor may not be able to read the specification."
Claus Gittinger <cg@exept.de>
parents: 1851
diff changeset
   633
Claus Gittinger <cg@exept.de>
parents: 1851
diff changeset
   634
    "
Claus Gittinger <cg@exept.de>
parents: 1851
diff changeset
   635
     self iconCenterH inspect
Claus Gittinger <cg@exept.de>
parents: 1851
diff changeset
   636
     ImageEditor openOnClass:self andSelector:#iconCenterH
Claus Gittinger <cg@exept.de>
parents: 1851
diff changeset
   637
     Icon flushCachedIcons
Claus Gittinger <cg@exept.de>
parents: 1851
diff changeset
   638
    "
Claus Gittinger <cg@exept.de>
parents: 1851
diff changeset
   639
Claus Gittinger <cg@exept.de>
parents: 1851
diff changeset
   640
    <resource: #image>
Claus Gittinger <cg@exept.de>
parents: 1851
diff changeset
   641
Claus Gittinger <cg@exept.de>
parents: 1851
diff changeset
   642
    ^Icon
Claus Gittinger <cg@exept.de>
parents: 1851
diff changeset
   643
        constantNamed:#'UIPainter class iconCenterH'
Claus Gittinger <cg@exept.de>
parents: 1851
diff changeset
   644
        ifAbsentPut:[(Depth2Image new) width: 22; height: 22; photometric:(#palette); bitsPerSample:(#(2)); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'
Claus Gittinger <cg@exept.de>
parents: 1851
diff changeset
   645
@@@@@@@@@@@@@@@@@(@J@B @@(@J@B @@(UZUR @@(?:?R @@(@J@B @@(@J@B @@(@J@B @@@@J@@@@@EUZUU@@@O?:?=@@@@@J@@@@@(@J@B @@(@J@B @
Claus Gittinger <cg@exept.de>
parents: 1851
diff changeset
   646
@(@J@B @@(EZUB@@@(O:=B @@(@J@B @@(@J@B @@@@@@@@@@@@@@@@@') ; colorMapFromArray:#[0 0 0 255 255 255 0 0 127 170 170 170]; mask:((Depth1Image new) width: 22; height: 22; photometric:(#blackIs0); bitsPerSample:(#(1)); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@@@@@@@@C@@A?>@A?>@A?>@A?>@@C@@@C@@G?? G?? G?? G??#@C@@@C@C@?<@@?<A@?<@@?<@@C@@@@@A@@@@') ; yourself); yourself]
Claus Gittinger <cg@exept.de>
parents: 1851
diff changeset
   647
!
Claus Gittinger <cg@exept.de>
parents: 1851
diff changeset
   648
Claus Gittinger <cg@exept.de>
parents: 1851
diff changeset
   649
iconCenterHInFrame
Claus Gittinger <cg@exept.de>
parents: 1851
diff changeset
   650
    "This resource specification was automatically generated
Claus Gittinger <cg@exept.de>
parents: 1851
diff changeset
   651
     by the ImageEditor of ST/X."
Claus Gittinger <cg@exept.de>
parents: 1851
diff changeset
   652
Claus Gittinger <cg@exept.de>
parents: 1851
diff changeset
   653
    "Do not manually edit this!! If it is corrupted,
Claus Gittinger <cg@exept.de>
parents: 1851
diff changeset
   654
     the ImageEditor may not be able to read the specification."
Claus Gittinger <cg@exept.de>
parents: 1851
diff changeset
   655
Claus Gittinger <cg@exept.de>
parents: 1851
diff changeset
   656
    "
Claus Gittinger <cg@exept.de>
parents: 1851
diff changeset
   657
     self iconCenterHInFrame inspect
Claus Gittinger <cg@exept.de>
parents: 1851
diff changeset
   658
     ImageEditor openOnClass:self andSelector:#iconCenterHInFrame
Claus Gittinger <cg@exept.de>
parents: 1851
diff changeset
   659
     Icon flushCachedIcons
Claus Gittinger <cg@exept.de>
parents: 1851
diff changeset
   660
    "
Claus Gittinger <cg@exept.de>
parents: 1851
diff changeset
   661
Claus Gittinger <cg@exept.de>
parents: 1851
diff changeset
   662
    <resource: #image>
Claus Gittinger <cg@exept.de>
parents: 1851
diff changeset
   663
Claus Gittinger <cg@exept.de>
parents: 1851
diff changeset
   664
    ^Icon
Claus Gittinger <cg@exept.de>
parents: 1851
diff changeset
   665
        constantNamed:#'UIPainter class iconCenterHInFrame'
Claus Gittinger <cg@exept.de>
parents: 1851
diff changeset
   666
        ifAbsentPut:[(Depth2Image new) width: 22; height: 22; photometric:(#palette); bitsPerSample:(#(2)); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'
Claus Gittinger <cg@exept.de>
parents: 1851
diff changeset
   667
@@@@@@@@J******@H@@@@@B@HL@@@CB@H8UUUR2@HH???RB@H8@@@B2@HH@@@BB@H8@@@B2@H@@@@@B@HEUUUUB@HO???=B@H@@@@@B@H8@@@@2@HH@@@@B@
Claus Gittinger <cg@exept.de>
parents: 1851
diff changeset
   668
H8@@@@2@HHEUUBB@H8O?=B2@HL@@@CB@H@@@@@B@J******@@@@@@@@@') ; colorMapFromArray:#[0 0 0 255 255 255 0 0 127 170 170 170]; mask:((Depth1Image new) width: 22; height: 22; photometric:(#blackIs0); bitsPerSample:(#(1)); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@@@_??8P@@HW??(U?>(U?>(U?>(T@@(T@@(W??(W??(W??(W??+T@@(T@@+T?<(T?<)T?<(W??(P@@H_??9@@@@') ; yourself); yourself]
Claus Gittinger <cg@exept.de>
parents: 1851
diff changeset
   669
!
Claus Gittinger <cg@exept.de>
parents: 1851
diff changeset
   670
Claus Gittinger <cg@exept.de>
parents: 1851
diff changeset
   671
iconCenterV
Claus Gittinger <cg@exept.de>
parents: 1851
diff changeset
   672
    "This resource specification was automatically generated
Claus Gittinger <cg@exept.de>
parents: 1851
diff changeset
   673
     by the ImageEditor of ST/X."
Claus Gittinger <cg@exept.de>
parents: 1851
diff changeset
   674
Claus Gittinger <cg@exept.de>
parents: 1851
diff changeset
   675
    "Do not manually edit this!! If it is corrupted,
Claus Gittinger <cg@exept.de>
parents: 1851
diff changeset
   676
     the ImageEditor may not be able to read the specification."
Claus Gittinger <cg@exept.de>
parents: 1851
diff changeset
   677
Claus Gittinger <cg@exept.de>
parents: 1851
diff changeset
   678
    "
Claus Gittinger <cg@exept.de>
parents: 1851
diff changeset
   679
     self iconCenterV inspect
Claus Gittinger <cg@exept.de>
parents: 1851
diff changeset
   680
     ImageEditor openOnClass:self andSelector:#iconCenterV
Claus Gittinger <cg@exept.de>
parents: 1851
diff changeset
   681
     Icon flushCachedIcons
Claus Gittinger <cg@exept.de>
parents: 1851
diff changeset
   682
    "
Claus Gittinger <cg@exept.de>
parents: 1851
diff changeset
   683
Claus Gittinger <cg@exept.de>
parents: 1851
diff changeset
   684
    <resource: #image>
Claus Gittinger <cg@exept.de>
parents: 1851
diff changeset
   685
Claus Gittinger <cg@exept.de>
parents: 1851
diff changeset
   686
    ^Icon
Claus Gittinger <cg@exept.de>
parents: 1851
diff changeset
   687
        constantNamed:#'UIPainter class iconCenterV'
Claus Gittinger <cg@exept.de>
parents: 1851
diff changeset
   688
        ifAbsentPut:[(Depth2Image new) width: 22; height: 22; photometric:(#palette); bitsPerSample:(#(2)); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'
Claus Gittinger <cg@exept.de>
parents: 1851
diff changeset
   689
@@@@@@@@@@@@@@@@@@@@@@@@B**@J*(@B**MJ*(@@@@M@@@@@@@M@M@@@M@M@M@@@M@M@M@@@M@M@M@@B*****(@B*****(@@M@M@M@@@M@M@M@@@E@M@M@@
Claus Gittinger <cg@exept.de>
parents: 1851
diff changeset
   690
@@@M@E@@@@@M@@@@B**EJ*(@B(*@J*(@@@@@@@@@@@@@@@@@@@@@@@@@') ; colorMapFromArray:#[0 0 0 255 255 255 0 0 127 170 170 170]; mask:((Depth1Image new) width: 22; height: 22; photometric:(#blackIs0); bitsPerSample:(#(1)); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@@@@@@@@@@@@G @@G @@G'' G''''!!G'''' G'''' G'''' O??0O??0G'''' G'''' G'''' G'''' @G''#@G @@G C@@@@@@@@@@@@') ; yourself); yourself]
Claus Gittinger <cg@exept.de>
parents: 1851
diff changeset
   691
!
Claus Gittinger <cg@exept.de>
parents: 1851
diff changeset
   692
Claus Gittinger <cg@exept.de>
parents: 1851
diff changeset
   693
iconCenterVInFrame
Claus Gittinger <cg@exept.de>
parents: 1851
diff changeset
   694
    "This resource specification was automatically generated
Claus Gittinger <cg@exept.de>
parents: 1851
diff changeset
   695
     by the ImageEditor of ST/X."
Claus Gittinger <cg@exept.de>
parents: 1851
diff changeset
   696
Claus Gittinger <cg@exept.de>
parents: 1851
diff changeset
   697
    "Do not manually edit this!! If it is corrupted,
Claus Gittinger <cg@exept.de>
parents: 1851
diff changeset
   698
     the ImageEditor may not be able to read the specification."
Claus Gittinger <cg@exept.de>
parents: 1851
diff changeset
   699
Claus Gittinger <cg@exept.de>
parents: 1851
diff changeset
   700
    "
Claus Gittinger <cg@exept.de>
parents: 1851
diff changeset
   701
     self iconCenterVInFrame inspect
Claus Gittinger <cg@exept.de>
parents: 1851
diff changeset
   702
     ImageEditor openOnClass:self andSelector:#iconCenterVInFrame
Claus Gittinger <cg@exept.de>
parents: 1851
diff changeset
   703
     Icon flushCachedIcons
Claus Gittinger <cg@exept.de>
parents: 1851
diff changeset
   704
    "
Claus Gittinger <cg@exept.de>
parents: 1851
diff changeset
   705
Claus Gittinger <cg@exept.de>
parents: 1851
diff changeset
   706
    <resource: #image>
Claus Gittinger <cg@exept.de>
parents: 1851
diff changeset
   707
Claus Gittinger <cg@exept.de>
parents: 1851
diff changeset
   708
    ^Icon
Claus Gittinger <cg@exept.de>
parents: 1851
diff changeset
   709
        constantNamed:#'UIPainter class iconCenterVInFrame'
Claus Gittinger <cg@exept.de>
parents: 1851
diff changeset
   710
        ifAbsentPut:[(Depth2Image new) width: 22; height: 22; photometric:(#palette); bitsPerSample:(#(2)); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'
Claus Gittinger <cg@exept.de>
parents: 1851
diff changeset
   711
@@@@@@@@J******@H@@@@@B@HL3@L3B@H:*GJ*2@H@@G@@B@HG@G@@B@HG@G@GB@HG@G@GB@HG@G@GB@HG@G@GB@HG@G@GB@HG@G@GB@HG@G@GB@HG@G@EB@
Claus Gittinger <cg@exept.de>
parents: 1851
diff changeset
   712
HE@G@@B@H@@G@@B@H:*E@J2@HL3@L3B@H@@@@@B@J******@@@@@@@@@') ; colorMapFromArray:#[0 0 0 255 255 255 0 0 127 170 170 170]; mask:((Depth1Image new) width: 22; height: 22; photometric:(#blackIs0); bitsPerSample:(#(1)); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@@B_??9P@@HW??(TG (W'' (W''''*W''''(W''''*W'''')W''''(W'''')W''''+W''''*W''''*W''''(W'' )TG (W??(P@@H_??8@@@@') ; yourself); yourself]
Claus Gittinger <cg@exept.de>
parents: 1851
diff changeset
   713
!
Claus Gittinger <cg@exept.de>
parents: 1851
diff changeset
   714
Claus Gittinger <cg@exept.de>
parents: 1851
diff changeset
   715
iconDistributeH
Claus Gittinger <cg@exept.de>
parents: 1851
diff changeset
   716
    "This resource specification was automatically generated
Claus Gittinger <cg@exept.de>
parents: 1851
diff changeset
   717
     by the ImageEditor of ST/X."
Claus Gittinger <cg@exept.de>
parents: 1851
diff changeset
   718
Claus Gittinger <cg@exept.de>
parents: 1851
diff changeset
   719
    "Do not manually edit this!! If it is corrupted,
Claus Gittinger <cg@exept.de>
parents: 1851
diff changeset
   720
     the ImageEditor may not be able to read the specification."
Claus Gittinger <cg@exept.de>
parents: 1851
diff changeset
   721
Claus Gittinger <cg@exept.de>
parents: 1851
diff changeset
   722
    "
Claus Gittinger <cg@exept.de>
parents: 1851
diff changeset
   723
     self iconDistributeH inspect
Claus Gittinger <cg@exept.de>
parents: 1851
diff changeset
   724
     ImageEditor openOnClass:self andSelector:#iconDistributeH
Claus Gittinger <cg@exept.de>
parents: 1851
diff changeset
   725
     Icon flushCachedIcons
Claus Gittinger <cg@exept.de>
parents: 1851
diff changeset
   726
    "
Claus Gittinger <cg@exept.de>
parents: 1851
diff changeset
   727
Claus Gittinger <cg@exept.de>
parents: 1851
diff changeset
   728
    <resource: #image>
Claus Gittinger <cg@exept.de>
parents: 1851
diff changeset
   729
Claus Gittinger <cg@exept.de>
parents: 1851
diff changeset
   730
    ^Icon
Claus Gittinger <cg@exept.de>
parents: 1851
diff changeset
   731
        constantNamed:#'UIPainter class iconDistributeH'
Claus Gittinger <cg@exept.de>
parents: 1851
diff changeset
   732
        ifAbsentPut:[(Depth2Image new) width: 22; height: 22; photometric:(#palette); bitsPerSample:(#(2)); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'
1863
f9a8e3c20143 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1862
diff changeset
   733
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@E@@E@@E@G@@G@@G@G@@G@@G@GHBGHBG@GHBGHBG@GJ*GJ*G@GHBGHBG@GHBGHBG@GB*GJ G@GB*GJ G@
f9a8e3c20143 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1862
diff changeset
   734
G@@G@@G@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@') ; colorMapFromArray:#[0 0 0 255 255 255 0 0 127 170 170 170]; mask:((Depth1Image new) width: 22; height: 22; photometric:(#blackIs0); bitsPerSample:(#(1)); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@@@@@@@@@@@@@@@<G <<G <<G ?<G =>O1?>O1????<>O1<>O1><G <<G ><G <<G ?@@@A@@@@@@@@@@@@@@@A') ; yourself); yourself]
1862
Claus Gittinger <cg@exept.de>
parents: 1851
diff changeset
   735
!
Claus Gittinger <cg@exept.de>
parents: 1851
diff changeset
   736
Claus Gittinger <cg@exept.de>
parents: 1851
diff changeset
   737
iconDistributeV
Claus Gittinger <cg@exept.de>
parents: 1851
diff changeset
   738
    "This resource specification was automatically generated
Claus Gittinger <cg@exept.de>
parents: 1851
diff changeset
   739
     by the ImageEditor of ST/X."
Claus Gittinger <cg@exept.de>
parents: 1851
diff changeset
   740
Claus Gittinger <cg@exept.de>
parents: 1851
diff changeset
   741
    "Do not manually edit this!! If it is corrupted,
Claus Gittinger <cg@exept.de>
parents: 1851
diff changeset
   742
     the ImageEditor may not be able to read the specification."
Claus Gittinger <cg@exept.de>
parents: 1851
diff changeset
   743
Claus Gittinger <cg@exept.de>
parents: 1851
diff changeset
   744
    "
Claus Gittinger <cg@exept.de>
parents: 1851
diff changeset
   745
     self iconDistributeV inspect
Claus Gittinger <cg@exept.de>
parents: 1851
diff changeset
   746
     ImageEditor openOnClass:self andSelector:#iconDistributeV
Claus Gittinger <cg@exept.de>
parents: 1851
diff changeset
   747
     Icon flushCachedIcons
Claus Gittinger <cg@exept.de>
parents: 1851
diff changeset
   748
    "
Claus Gittinger <cg@exept.de>
parents: 1851
diff changeset
   749
Claus Gittinger <cg@exept.de>
parents: 1851
diff changeset
   750
    <resource: #image>
Claus Gittinger <cg@exept.de>
parents: 1851
diff changeset
   751
Claus Gittinger <cg@exept.de>
parents: 1851
diff changeset
   752
    ^Icon
Claus Gittinger <cg@exept.de>
parents: 1851
diff changeset
   753
        constantNamed:#'UIPainter class iconDistributeV'
Claus Gittinger <cg@exept.de>
parents: 1851
diff changeset
   754
        ifAbsentPut:[(Depth2Image new) width: 22; height: 22; photometric:(#palette); bitsPerSample:(#(2)); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'
1863
f9a8e3c20143 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1862
diff changeset
   755
@@@@@@@@@@UUUT@@@@???4@@@@@@@@@@@@@*(@@@@@JB@@@@@@JB@@@@@@JB@@@@@@J*(@@@@@@@@@@@@@UUUT@@@@???4@@@@@@@@@@@@J*(@@@@@JB@@@@
f9a8e3c20143 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1862
diff changeset
   756
@@JB@@@@@@@B@@@@@@@*(@@@@@@@@@@@@@UUUT@@@@???4@@@@@@@@@@') ; colorMapFromArray:#[0 0 0 255 255 255 0 0 127 170 170 170]; mask:((Depth1Image new) width: 22; height: 22; photometric:(#blackIs0); bitsPerSample:(#(1)); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'A??@A??@A??CA??@@G0@@A@@@A@@@A@@@G0CA??@A??@A??@A??@@G0C@A@@@A@@@A@@@G0AA??AA??@A??@A??B') ; yourself); yourself]
778
a4b931b2aff6 master widget highlighting changed in the tree list
tz
parents: 774
diff changeset
   757
! !
735
29c8681ce68d no picking for hierarchical lists + error handler for the starting phase
tz
parents: 729
diff changeset
   758
2217
b54632779619 Use class var for SelectionPanel
Stefan Vogel <sv@exept.de>
parents: 2213
diff changeset
   759
!UIPainter class methodsFor:'initialize'!
b54632779619 Use class var for SelectionPanel
Stefan Vogel <sv@exept.de>
parents: 2213
diff changeset
   760
b54632779619 Use class var for SelectionPanel
Stefan Vogel <sv@exept.de>
parents: 2213
diff changeset
   761
initialize
b54632779619 Use class var for SelectionPanel
Stefan Vogel <sv@exept.de>
parents: 2213
diff changeset
   762
    SelectionPanelClass isNil ifTrue:[
b54632779619 Use class var for SelectionPanel
Stefan Vogel <sv@exept.de>
parents: 2213
diff changeset
   763
        SelectionPanelClass := UISelectionPanel
b54632779619 Use class var for SelectionPanel
Stefan Vogel <sv@exept.de>
parents: 2213
diff changeset
   764
    ].
b54632779619 Use class var for SelectionPanel
Stefan Vogel <sv@exept.de>
parents: 2213
diff changeset
   765
! !
b54632779619 Use class var for SelectionPanel
Stefan Vogel <sv@exept.de>
parents: 2213
diff changeset
   766
60
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
   767
!UIPainter class methodsFor:'interface specs'!
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
   768
743
d58a3e7e39d5 support user defined font styles
tz
parents: 735
diff changeset
   769
dialogSpecForDefiningClassAndSelector
d58a3e7e39d5 support user defined font styles
tz
parents: 735
diff changeset
   770
    "This resource specification was automatically generated
d58a3e7e39d5 support user defined font styles
tz
parents: 735
diff changeset
   771
     by the UIPainter of ST/X."
d58a3e7e39d5 support user defined font styles
tz
parents: 735
diff changeset
   772
765
27936ff059d3 obselete methods removed + comments revised
tz
parents: 755
diff changeset
   773
    "Do not manually edit this!! If it is corrupted,
743
d58a3e7e39d5 support user defined font styles
tz
parents: 735
diff changeset
   774
     the UIPainter may not be able to read the specification."
366
68b0e0a329a4 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 365
diff changeset
   775
68b0e0a329a4 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 365
diff changeset
   776
    "
743
d58a3e7e39d5 support user defined font styles
tz
parents: 735
diff changeset
   777
     UIPainter new openOnClass:UIPainter andSelector:#dialogSpecForDefiningClassAndSelector
d58a3e7e39d5 support user defined font styles
tz
parents: 735
diff changeset
   778
     UIPainter new openInterface:#dialogSpecForDefiningClassAndSelector
366
68b0e0a329a4 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 365
diff changeset
   779
    "
68b0e0a329a4 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 365
diff changeset
   780
68b0e0a329a4 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 365
diff changeset
   781
    <resource: #canvas>
68b0e0a329a4 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 365
diff changeset
   782
68b0e0a329a4 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 365
diff changeset
   783
    ^
446
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
   784
     
366
68b0e0a329a4 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 365
diff changeset
   785
       #(#FullSpec
2217
b54632779619 Use class var for SelectionPanel
Stefan Vogel <sv@exept.de>
parents: 2213
diff changeset
   786
          #window: 
b54632779619 Use class var for SelectionPanel
Stefan Vogel <sv@exept.de>
parents: 2213
diff changeset
   787
           #(#WindowSpec
b54632779619 Use class var for SelectionPanel
Stefan Vogel <sv@exept.de>
parents: 2213
diff changeset
   788
              #name: 'GUI Painter'
b54632779619 Use class var for SelectionPanel
Stefan Vogel <sv@exept.de>
parents: 2213
diff changeset
   789
              #layout: #(#LayoutFrame 291 0 130 0 637 0 289 0)
b54632779619 Use class var for SelectionPanel
Stefan Vogel <sv@exept.de>
parents: 2213
diff changeset
   790
              #label: 'GUI Painter'
b54632779619 Use class var for SelectionPanel
Stefan Vogel <sv@exept.de>
parents: 2213
diff changeset
   791
              #min: #(#Point 350 160)
b54632779619 Use class var for SelectionPanel
Stefan Vogel <sv@exept.de>
parents: 2213
diff changeset
   792
              #max: #(#Point 500 160)
b54632779619 Use class var for SelectionPanel
Stefan Vogel <sv@exept.de>
parents: 2213
diff changeset
   793
              #bounds: #(#Rectangle 291 130 638 290)
b54632779619 Use class var for SelectionPanel
Stefan Vogel <sv@exept.de>
parents: 2213
diff changeset
   794
              #usePreferredExtent: false
b54632779619 Use class var for SelectionPanel
Stefan Vogel <sv@exept.de>
parents: 2213
diff changeset
   795
          )
b54632779619 Use class var for SelectionPanel
Stefan Vogel <sv@exept.de>
parents: 2213
diff changeset
   796
          #component: 
b54632779619 Use class var for SelectionPanel
Stefan Vogel <sv@exept.de>
parents: 2213
diff changeset
   797
           #(#SpecCollection
b54632779619 Use class var for SelectionPanel
Stefan Vogel <sv@exept.de>
parents: 2213
diff changeset
   798
              #collection: 
b54632779619 Use class var for SelectionPanel
Stefan Vogel <sv@exept.de>
parents: 2213
diff changeset
   799
               #(
b54632779619 Use class var for SelectionPanel
Stefan Vogel <sv@exept.de>
parents: 2213
diff changeset
   800
                 #(#FramedBoxSpec
b54632779619 Use class var for SelectionPanel
Stefan Vogel <sv@exept.de>
parents: 2213
diff changeset
   801
                    #name: 'FramedBox'
b54632779619 Use class var for SelectionPanel
Stefan Vogel <sv@exept.de>
parents: 2213
diff changeset
   802
                    #layout: #(#LayoutFrame 0 0.0 3 0.0 0 1.0 -35 1.0)
b54632779619 Use class var for SelectionPanel
Stefan Vogel <sv@exept.de>
parents: 2213
diff changeset
   803
                    #component: 
b54632779619 Use class var for SelectionPanel
Stefan Vogel <sv@exept.de>
parents: 2213
diff changeset
   804
                     #(#SpecCollection
b54632779619 Use class var for SelectionPanel
Stefan Vogel <sv@exept.de>
parents: 2213
diff changeset
   805
                        #collection: 
b54632779619 Use class var for SelectionPanel
Stefan Vogel <sv@exept.de>
parents: 2213
diff changeset
   806
                         #(
b54632779619 Use class var for SelectionPanel
Stefan Vogel <sv@exept.de>
parents: 2213
diff changeset
   807
                           #(#LabelSpec
b54632779619 Use class var for SelectionPanel
Stefan Vogel <sv@exept.de>
parents: 2213
diff changeset
   808
                              #name: 'selectorLabel'
b54632779619 Use class var for SelectionPanel
Stefan Vogel <sv@exept.de>
parents: 2213
diff changeset
   809
                              #layout: #(#AlignmentOrigin 67 0.11 29 0 1 0.5)
b54632779619 Use class var for SelectionPanel
Stefan Vogel <sv@exept.de>
parents: 2213
diff changeset
   810
                              #label: 'Selector:'
b54632779619 Use class var for SelectionPanel
Stefan Vogel <sv@exept.de>
parents: 2213
diff changeset
   811
                              #translateLabel: true
b54632779619 Use class var for SelectionPanel
Stefan Vogel <sv@exept.de>
parents: 2213
diff changeset
   812
                              #adjust: #right
b54632779619 Use class var for SelectionPanel
Stefan Vogel <sv@exept.de>
parents: 2213
diff changeset
   813
                              #resizeForLabel: true
b54632779619 Use class var for SelectionPanel
Stefan Vogel <sv@exept.de>
parents: 2213
diff changeset
   814
                          )
b54632779619 Use class var for SelectionPanel
Stefan Vogel <sv@exept.de>
parents: 2213
diff changeset
   815
                           #(#InputFieldSpec
b54632779619 Use class var for SelectionPanel
Stefan Vogel <sv@exept.de>
parents: 2213
diff changeset
   816
                              #name: 'methodNameField'
b54632779619 Use class var for SelectionPanel
Stefan Vogel <sv@exept.de>
parents: 2213
diff changeset
   817
                              #layout: #(#LayoutFrame 70 0.11 18 0 4 1.0 40 0)
b54632779619 Use class var for SelectionPanel
Stefan Vogel <sv@exept.de>
parents: 2213
diff changeset
   818
                              #tabable: true
b54632779619 Use class var for SelectionPanel
Stefan Vogel <sv@exept.de>
parents: 2213
diff changeset
   819
                              #model: #methodNameChannel
b54632779619 Use class var for SelectionPanel
Stefan Vogel <sv@exept.de>
parents: 2213
diff changeset
   820
                              #group: #inputGroup
b54632779619 Use class var for SelectionPanel
Stefan Vogel <sv@exept.de>
parents: 2213
diff changeset
   821
                          )
b54632779619 Use class var for SelectionPanel
Stefan Vogel <sv@exept.de>
parents: 2213
diff changeset
   822
                           #(#LabelSpec
b54632779619 Use class var for SelectionPanel
Stefan Vogel <sv@exept.de>
parents: 2213
diff changeset
   823
                              #name: 'classLabel'
b54632779619 Use class var for SelectionPanel
Stefan Vogel <sv@exept.de>
parents: 2213
diff changeset
   824
                              #layout: #(#AlignmentOrigin 67 0.11 54 0 1 0.5)
b54632779619 Use class var for SelectionPanel
Stefan Vogel <sv@exept.de>
parents: 2213
diff changeset
   825
                              #label: 'Class:'
b54632779619 Use class var for SelectionPanel
Stefan Vogel <sv@exept.de>
parents: 2213
diff changeset
   826
                              #translateLabel: true
b54632779619 Use class var for SelectionPanel
Stefan Vogel <sv@exept.de>
parents: 2213
diff changeset
   827
                              #adjust: #right
b54632779619 Use class var for SelectionPanel
Stefan Vogel <sv@exept.de>
parents: 2213
diff changeset
   828
                              #resizeForLabel: true
b54632779619 Use class var for SelectionPanel
Stefan Vogel <sv@exept.de>
parents: 2213
diff changeset
   829
                          )
b54632779619 Use class var for SelectionPanel
Stefan Vogel <sv@exept.de>
parents: 2213
diff changeset
   830
                           #(#InputFieldSpec
b54632779619 Use class var for SelectionPanel
Stefan Vogel <sv@exept.de>
parents: 2213
diff changeset
   831
                              #name: 'classNameField'
b54632779619 Use class var for SelectionPanel
Stefan Vogel <sv@exept.de>
parents: 2213
diff changeset
   832
                              #layout: #(#LayoutFrame 70 0.11 43 0 4 1.0 65 0)
b54632779619 Use class var for SelectionPanel
Stefan Vogel <sv@exept.de>
parents: 2213
diff changeset
   833
                              #tabable: true
b54632779619 Use class var for SelectionPanel
Stefan Vogel <sv@exept.de>
parents: 2213
diff changeset
   834
                              #model: #classNameChannel
b54632779619 Use class var for SelectionPanel
Stefan Vogel <sv@exept.de>
parents: 2213
diff changeset
   835
                              #group: #inputGroup
b54632779619 Use class var for SelectionPanel
Stefan Vogel <sv@exept.de>
parents: 2213
diff changeset
   836
                          )
b54632779619 Use class var for SelectionPanel
Stefan Vogel <sv@exept.de>
parents: 2213
diff changeset
   837
                           #(#LabelSpec
b54632779619 Use class var for SelectionPanel
Stefan Vogel <sv@exept.de>
parents: 2213
diff changeset
   838
                              #name: 'superClassLabel'
b54632779619 Use class var for SelectionPanel
Stefan Vogel <sv@exept.de>
parents: 2213
diff changeset
   839
                              #layout: #(#AlignmentOrigin 67 0.11 79 0 1 0.5)
b54632779619 Use class var for SelectionPanel
Stefan Vogel <sv@exept.de>
parents: 2213
diff changeset
   840
                              #label: 'Superclass:'
b54632779619 Use class var for SelectionPanel
Stefan Vogel <sv@exept.de>
parents: 2213
diff changeset
   841
                              #translateLabel: true
b54632779619 Use class var for SelectionPanel
Stefan Vogel <sv@exept.de>
parents: 2213
diff changeset
   842
                              #adjust: #right
b54632779619 Use class var for SelectionPanel
Stefan Vogel <sv@exept.de>
parents: 2213
diff changeset
   843
                              #resizeForLabel: true
b54632779619 Use class var for SelectionPanel
Stefan Vogel <sv@exept.de>
parents: 2213
diff changeset
   844
                          )
b54632779619 Use class var for SelectionPanel
Stefan Vogel <sv@exept.de>
parents: 2213
diff changeset
   845
                           #(#ComboBoxSpec
b54632779619 Use class var for SelectionPanel
Stefan Vogel <sv@exept.de>
parents: 2213
diff changeset
   846
                              #name: 'superclassNameComboBox'
b54632779619 Use class var for SelectionPanel
Stefan Vogel <sv@exept.de>
parents: 2213
diff changeset
   847
                              #layout: #(#LayoutFrame 70 0.11 68 0 4 1.0 90 0)
b54632779619 Use class var for SelectionPanel
Stefan Vogel <sv@exept.de>
parents: 2213
diff changeset
   848
                              #tabable: true
b54632779619 Use class var for SelectionPanel
Stefan Vogel <sv@exept.de>
parents: 2213
diff changeset
   849
                              #model: #superclassNameChannel
b54632779619 Use class var for SelectionPanel
Stefan Vogel <sv@exept.de>
parents: 2213
diff changeset
   850
                              #comboList: #superclassNameDefaults
b54632779619 Use class var for SelectionPanel
Stefan Vogel <sv@exept.de>
parents: 2213
diff changeset
   851
                          )
b54632779619 Use class var for SelectionPanel
Stefan Vogel <sv@exept.de>
parents: 2213
diff changeset
   852
                        )
b54632779619 Use class var for SelectionPanel
Stefan Vogel <sv@exept.de>
parents: 2213
diff changeset
   853
                    )
b54632779619 Use class var for SelectionPanel
Stefan Vogel <sv@exept.de>
parents: 2213
diff changeset
   854
                    #label: 'Define Class And Selector'
b54632779619 Use class var for SelectionPanel
Stefan Vogel <sv@exept.de>
parents: 2213
diff changeset
   855
                    #labelPosition: #topLeft
b54632779619 Use class var for SelectionPanel
Stefan Vogel <sv@exept.de>
parents: 2213
diff changeset
   856
                    #translateLabel: true
b54632779619 Use class var for SelectionPanel
Stefan Vogel <sv@exept.de>
parents: 2213
diff changeset
   857
                )
b54632779619 Use class var for SelectionPanel
Stefan Vogel <sv@exept.de>
parents: 2213
diff changeset
   858
                 #(#UISubSpecification
b54632779619 Use class var for SelectionPanel
Stefan Vogel <sv@exept.de>
parents: 2213
diff changeset
   859
                    #name: 'subSpec'
b54632779619 Use class var for SelectionPanel
Stefan Vogel <sv@exept.de>
parents: 2213
diff changeset
   860
                    #layout: #(#LayoutFrame 0 0.0 -29 1 0 1.0 -5 1)
b54632779619 Use class var for SelectionPanel
Stefan Vogel <sv@exept.de>
parents: 2213
diff changeset
   861
                    #majorKey: #ToolApplicationModel
b54632779619 Use class var for SelectionPanel
Stefan Vogel <sv@exept.de>
parents: 2213
diff changeset
   862
                    #minorKey: #windowSpecForCommitWithoutChannels
b54632779619 Use class var for SelectionPanel
Stefan Vogel <sv@exept.de>
parents: 2213
diff changeset
   863
                )
b54632779619 Use class var for SelectionPanel
Stefan Vogel <sv@exept.de>
parents: 2213
diff changeset
   864
              )
b54632779619 Use class var for SelectionPanel
Stefan Vogel <sv@exept.de>
parents: 2213
diff changeset
   865
          )
743
d58a3e7e39d5 support user defined font styles
tz
parents: 735
diff changeset
   866
      )
838
0ac5a26498c1 help texts & national strings
Claus Gittinger <cg@exept.de>
parents: 827
diff changeset
   867
950
3e227dc788be fixed layout (change with framedBox - sigh)
Claus Gittinger <cg@exept.de>
parents: 939
diff changeset
   868
    "Modified: / 13.8.1998 / 19:59:44 / cg"
743
d58a3e7e39d5 support user defined font styles
tz
parents: 735
diff changeset
   869
!
d58a3e7e39d5 support user defined font styles
tz
parents: 735
diff changeset
   870
d58a3e7e39d5 support user defined font styles
tz
parents: 735
diff changeset
   871
dialogSpecForDefiningGridParameters
d58a3e7e39d5 support user defined font styles
tz
parents: 735
diff changeset
   872
    "This resource specification was automatically generated
d58a3e7e39d5 support user defined font styles
tz
parents: 735
diff changeset
   873
     by the UIPainter of ST/X."
d58a3e7e39d5 support user defined font styles
tz
parents: 735
diff changeset
   874
765
27936ff059d3 obselete methods removed + comments revised
tz
parents: 755
diff changeset
   875
    "Do not manually edit this!! If it is corrupted,
743
d58a3e7e39d5 support user defined font styles
tz
parents: 735
diff changeset
   876
     the UIPainter may not be able to read the specification."
d58a3e7e39d5 support user defined font styles
tz
parents: 735
diff changeset
   877
d58a3e7e39d5 support user defined font styles
tz
parents: 735
diff changeset
   878
    "
d58a3e7e39d5 support user defined font styles
tz
parents: 735
diff changeset
   879
     UIPainter new openOnClass:UIPainter andSelector:#dialogSpecForDefiningGridParameters
d58a3e7e39d5 support user defined font styles
tz
parents: 735
diff changeset
   880
     UIPainter new openInterface:#dialogSpecForDefiningGridParameters
d58a3e7e39d5 support user defined font styles
tz
parents: 735
diff changeset
   881
    "
d58a3e7e39d5 support user defined font styles
tz
parents: 735
diff changeset
   882
d58a3e7e39d5 support user defined font styles
tz
parents: 735
diff changeset
   883
    <resource: #canvas>
d58a3e7e39d5 support user defined font styles
tz
parents: 735
diff changeset
   884
1782
8108839cc262 translate label
Claus Gittinger <cg@exept.de>
parents: 1775
diff changeset
   885
    ^ 
8108839cc262 translate label
Claus Gittinger <cg@exept.de>
parents: 1775
diff changeset
   886
     #(FullSpec
8108839cc262 translate label
Claus Gittinger <cg@exept.de>
parents: 1775
diff changeset
   887
        name: dialogSpecForDefiningGridParameters
8108839cc262 translate label
Claus Gittinger <cg@exept.de>
parents: 1775
diff changeset
   888
        window: 
8108839cc262 translate label
Claus Gittinger <cg@exept.de>
parents: 1775
diff changeset
   889
       (WindowSpec
8108839cc262 translate label
Claus Gittinger <cg@exept.de>
parents: 1775
diff changeset
   890
          label: 'GUI Painter'
8108839cc262 translate label
Claus Gittinger <cg@exept.de>
parents: 1775
diff changeset
   891
          name: 'GUI Painter'
8108839cc262 translate label
Claus Gittinger <cg@exept.de>
parents: 1775
diff changeset
   892
          min: (Point 300 200)
8108839cc262 translate label
Claus Gittinger <cg@exept.de>
parents: 1775
diff changeset
   893
          max: (Point 300 200)
8108839cc262 translate label
Claus Gittinger <cg@exept.de>
parents: 1775
diff changeset
   894
          bounds: (Rectangle 16 46 298 244)
8108839cc262 translate label
Claus Gittinger <cg@exept.de>
parents: 1775
diff changeset
   895
        )
8108839cc262 translate label
Claus Gittinger <cg@exept.de>
parents: 1775
diff changeset
   896
        component: 
8108839cc262 translate label
Claus Gittinger <cg@exept.de>
parents: 1775
diff changeset
   897
       (SpecCollection
8108839cc262 translate label
Claus Gittinger <cg@exept.de>
parents: 1775
diff changeset
   898
          collection: (
8108839cc262 translate label
Claus Gittinger <cg@exept.de>
parents: 1775
diff changeset
   899
           (FramedBoxSpec
8108839cc262 translate label
Claus Gittinger <cg@exept.de>
parents: 1775
diff changeset
   900
              label: 'Grid Parameter'
8108839cc262 translate label
Claus Gittinger <cg@exept.de>
parents: 1775
diff changeset
   901
              name: 'FramedBox'
8108839cc262 translate label
Claus Gittinger <cg@exept.de>
parents: 1775
diff changeset
   902
              layout: (LayoutFrame 0 0.0 3 0.0 0 1.0 -35 1.0)
8108839cc262 translate label
Claus Gittinger <cg@exept.de>
parents: 1775
diff changeset
   903
              labelPosition: topLeft
8108839cc262 translate label
Claus Gittinger <cg@exept.de>
parents: 1775
diff changeset
   904
              translateLabel: true
8108839cc262 translate label
Claus Gittinger <cg@exept.de>
parents: 1775
diff changeset
   905
              component: 
8108839cc262 translate label
Claus Gittinger <cg@exept.de>
parents: 1775
diff changeset
   906
             (SpecCollection
8108839cc262 translate label
Claus Gittinger <cg@exept.de>
parents: 1775
diff changeset
   907
                collection: (
8108839cc262 translate label
Claus Gittinger <cg@exept.de>
parents: 1775
diff changeset
   908
                 (CheckBoxSpec
8108839cc262 translate label
Claus Gittinger <cg@exept.de>
parents: 1775
diff changeset
   909
                    label: 'Show Grid'
8108839cc262 translate label
Claus Gittinger <cg@exept.de>
parents: 1775
diff changeset
   910
                    name: 'ShowGridCheckBox'
8108839cc262 translate label
Claus Gittinger <cg@exept.de>
parents: 1775
diff changeset
   911
                    layout: (Point 13 14)
8108839cc262 translate label
Claus Gittinger <cg@exept.de>
parents: 1775
diff changeset
   912
                    model: showGrid
8108839cc262 translate label
Claus Gittinger <cg@exept.de>
parents: 1775
diff changeset
   913
                    translateLabel: true
8108839cc262 translate label
Claus Gittinger <cg@exept.de>
parents: 1775
diff changeset
   914
                  )
8108839cc262 translate label
Claus Gittinger <cg@exept.de>
parents: 1775
diff changeset
   915
                 (CheckBoxSpec
8108839cc262 translate label
Claus Gittinger <cg@exept.de>
parents: 1775
diff changeset
   916
                    label: 'Align To Grid'
8108839cc262 translate label
Claus Gittinger <cg@exept.de>
parents: 1775
diff changeset
   917
                    name: 'AlignCheckBox'
8108839cc262 translate label
Claus Gittinger <cg@exept.de>
parents: 1775
diff changeset
   918
                    layout: (Point 13 42)
8108839cc262 translate label
Claus Gittinger <cg@exept.de>
parents: 1775
diff changeset
   919
                    model: alignToGrid
8108839cc262 translate label
Claus Gittinger <cg@exept.de>
parents: 1775
diff changeset
   920
                    translateLabel: true
8108839cc262 translate label
Claus Gittinger <cg@exept.de>
parents: 1775
diff changeset
   921
                  )
8108839cc262 translate label
Claus Gittinger <cg@exept.de>
parents: 1775
diff changeset
   922
                 (LabelSpec
8108839cc262 translate label
Claus Gittinger <cg@exept.de>
parents: 1775
diff changeset
   923
                    label: 'Horizontal Pixels:'
8108839cc262 translate label
Claus Gittinger <cg@exept.de>
parents: 1775
diff changeset
   924
                    name: 'HorizontalPixelsLabel'
8108839cc262 translate label
Claus Gittinger <cg@exept.de>
parents: 1775
diff changeset
   925
                    layout: (AlignmentOrigin 138 0 89 0 1 0.5)
8108839cc262 translate label
Claus Gittinger <cg@exept.de>
parents: 1775
diff changeset
   926
                    translateLabel: true
8108839cc262 translate label
Claus Gittinger <cg@exept.de>
parents: 1775
diff changeset
   927
                    resizeForLabel: true
8108839cc262 translate label
Claus Gittinger <cg@exept.de>
parents: 1775
diff changeset
   928
                    adjust: right
8108839cc262 translate label
Claus Gittinger <cg@exept.de>
parents: 1775
diff changeset
   929
                  )
8108839cc262 translate label
Claus Gittinger <cg@exept.de>
parents: 1775
diff changeset
   930
                 (InputFieldSpec
8108839cc262 translate label
Claus Gittinger <cg@exept.de>
parents: 1775
diff changeset
   931
                    name: 'HorizontalPixelsField'
8108839cc262 translate label
Claus Gittinger <cg@exept.de>
parents: 1775
diff changeset
   932
                    layout: (LayoutFrame 144 0 77 0 197 0 99 0)
8108839cc262 translate label
Claus Gittinger <cg@exept.de>
parents: 1775
diff changeset
   933
                    model: hspace
8108839cc262 translate label
Claus Gittinger <cg@exept.de>
parents: 1775
diff changeset
   934
                    group: inputGroup
8108839cc262 translate label
Claus Gittinger <cg@exept.de>
parents: 1775
diff changeset
   935
                    type: numberOrNil
8108839cc262 translate label
Claus Gittinger <cg@exept.de>
parents: 1775
diff changeset
   936
                    acceptOnPointerLeave: false
8108839cc262 translate label
Claus Gittinger <cg@exept.de>
parents: 1775
diff changeset
   937
                  )
8108839cc262 translate label
Claus Gittinger <cg@exept.de>
parents: 1775
diff changeset
   938
                 (LabelSpec
8108839cc262 translate label
Claus Gittinger <cg@exept.de>
parents: 1775
diff changeset
   939
                    label: 'Vertical Pixels:'
8108839cc262 translate label
Claus Gittinger <cg@exept.de>
parents: 1775
diff changeset
   940
                    name: 'VerticalPixelsLabel'
8108839cc262 translate label
Claus Gittinger <cg@exept.de>
parents: 1775
diff changeset
   941
                    layout: (AlignmentOrigin 139 0 114 0 1 0.5)
8108839cc262 translate label
Claus Gittinger <cg@exept.de>
parents: 1775
diff changeset
   942
                    translateLabel: true
8108839cc262 translate label
Claus Gittinger <cg@exept.de>
parents: 1775
diff changeset
   943
                    resizeForLabel: true
8108839cc262 translate label
Claus Gittinger <cg@exept.de>
parents: 1775
diff changeset
   944
                    adjust: right
8108839cc262 translate label
Claus Gittinger <cg@exept.de>
parents: 1775
diff changeset
   945
                  )
8108839cc262 translate label
Claus Gittinger <cg@exept.de>
parents: 1775
diff changeset
   946
                 (InputFieldSpec
8108839cc262 translate label
Claus Gittinger <cg@exept.de>
parents: 1775
diff changeset
   947
                    name: 'VerticalPixelsField'
8108839cc262 translate label
Claus Gittinger <cg@exept.de>
parents: 1775
diff changeset
   948
                    layout: (LayoutFrame 144 0 102 0 197 0 124 0)
8108839cc262 translate label
Claus Gittinger <cg@exept.de>
parents: 1775
diff changeset
   949
                    model: vspace
8108839cc262 translate label
Claus Gittinger <cg@exept.de>
parents: 1775
diff changeset
   950
                    group: inputGroup
8108839cc262 translate label
Claus Gittinger <cg@exept.de>
parents: 1775
diff changeset
   951
                    type: numberOrNil
8108839cc262 translate label
Claus Gittinger <cg@exept.de>
parents: 1775
diff changeset
   952
                    acceptOnPointerLeave: false
8108839cc262 translate label
Claus Gittinger <cg@exept.de>
parents: 1775
diff changeset
   953
                  )
8108839cc262 translate label
Claus Gittinger <cg@exept.de>
parents: 1775
diff changeset
   954
                 )
8108839cc262 translate label
Claus Gittinger <cg@exept.de>
parents: 1775
diff changeset
   955
               
8108839cc262 translate label
Claus Gittinger <cg@exept.de>
parents: 1775
diff changeset
   956
              )
8108839cc262 translate label
Claus Gittinger <cg@exept.de>
parents: 1775
diff changeset
   957
            )
8108839cc262 translate label
Claus Gittinger <cg@exept.de>
parents: 1775
diff changeset
   958
           (UISubSpecification
8108839cc262 translate label
Claus Gittinger <cg@exept.de>
parents: 1775
diff changeset
   959
              name: 'subSpec'
8108839cc262 translate label
Claus Gittinger <cg@exept.de>
parents: 1775
diff changeset
   960
              layout: (LayoutFrame 0 0.0 -29 1 0 1.0 -5 1)
8108839cc262 translate label
Claus Gittinger <cg@exept.de>
parents: 1775
diff changeset
   961
              majorKey: ToolApplicationModel
8108839cc262 translate label
Claus Gittinger <cg@exept.de>
parents: 1775
diff changeset
   962
              minorKey: windowSpecForCommitWithoutChannels
8108839cc262 translate label
Claus Gittinger <cg@exept.de>
parents: 1775
diff changeset
   963
            )
8108839cc262 translate label
Claus Gittinger <cg@exept.de>
parents: 1775
diff changeset
   964
           )
8108839cc262 translate label
Claus Gittinger <cg@exept.de>
parents: 1775
diff changeset
   965
         
8108839cc262 translate label
Claus Gittinger <cg@exept.de>
parents: 1775
diff changeset
   966
        )
366
68b0e0a329a4 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 365
diff changeset
   967
      )
68b0e0a329a4 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 365
diff changeset
   968
!
68b0e0a329a4 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 365
diff changeset
   969
743
d58a3e7e39d5 support user defined font styles
tz
parents: 735
diff changeset
   970
windowSpec
d58a3e7e39d5 support user defined font styles
tz
parents: 735
diff changeset
   971
    "This resource specification was automatically generated
d58a3e7e39d5 support user defined font styles
tz
parents: 735
diff changeset
   972
     by the UIPainter of ST/X."
d58a3e7e39d5 support user defined font styles
tz
parents: 735
diff changeset
   973
d58a3e7e39d5 support user defined font styles
tz
parents: 735
diff changeset
   974
    "Do not manually edit this!! If it is corrupted,
d58a3e7e39d5 support user defined font styles
tz
parents: 735
diff changeset
   975
     the UIPainter may not be able to read the specification."
222
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
   976
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
   977
    "
743
d58a3e7e39d5 support user defined font styles
tz
parents: 735
diff changeset
   978
     UIPainter new openOnClass:UIPainter andSelector:#windowSpec
d58a3e7e39d5 support user defined font styles
tz
parents: 735
diff changeset
   979
     UIPainter new openInterface:#windowSpec
d58a3e7e39d5 support user defined font styles
tz
parents: 735
diff changeset
   980
     UIPainter open
222
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
   981
    "
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
   982
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
   983
    <resource: #canvas>
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
   984
1115
1d0ff67419fc arrowButtons smaller
Claus Gittinger <cg@exept.de>
parents: 1103
diff changeset
   985
    ^ 
1739
f7baa10ebb1c Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1719
diff changeset
   986
     #(FullSpec
f7baa10ebb1c Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1719
diff changeset
   987
        name: windowSpec
f7baa10ebb1c Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1719
diff changeset
   988
        window: 
f7baa10ebb1c Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1719
diff changeset
   989
       (WindowSpec
f7baa10ebb1c Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1719
diff changeset
   990
          label: 'GUI Painter'
f7baa10ebb1c Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1719
diff changeset
   991
          name: 'GUI Painter'
f7baa10ebb1c Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1719
diff changeset
   992
          min: (Point 560 460)
1790
51711e3c7046 translateLabel in NoteBookView
ca
parents: 1782
diff changeset
   993
          bounds: (Rectangle 12 22 620 545)
2157
76aadc90818e mask of icons
Claus Gittinger <cg@exept.de>
parents: 2138
diff changeset
   994
          icon: defaultIcon
1739
f7baa10ebb1c Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1719
diff changeset
   995
          menu: menu
1317
49d6dac15a57 update focusSequence in UIPainter
ca
parents: 1316
diff changeset
   996
        )
1739
f7baa10ebb1c Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1719
diff changeset
   997
        component: 
f7baa10ebb1c Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1719
diff changeset
   998
       (SpecCollection
f7baa10ebb1c Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1719
diff changeset
   999
          collection: (
f7baa10ebb1c Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1719
diff changeset
  1000
           (MenuPanelSpec
f7baa10ebb1c Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1719
diff changeset
  1001
              name: 'menuToolbarView'
f7baa10ebb1c Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1719
diff changeset
  1002
              layout: (LayoutFrame 0 0.0 0 0 0 1.0 32 0)
f7baa10ebb1c Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1719
diff changeset
  1003
              level: 1
f7baa10ebb1c Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1719
diff changeset
  1004
              tabable: true
f7baa10ebb1c Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1719
diff changeset
  1005
              menu: menuToolbar
1317
49d6dac15a57 update focusSequence in UIPainter
ca
parents: 1316
diff changeset
  1006
            )
1739
f7baa10ebb1c Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1719
diff changeset
  1007
           (VariableHorizontalPanelSpec
2001
b12d9b4dd6f2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1994
diff changeset
  1008
              name: 'mainPanel'
1739
f7baa10ebb1c Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1719
diff changeset
  1009
              layout: (LayoutFrame 0 0.0 32 0.0 0 1.0 -24 1.0)
f7baa10ebb1c Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1719
diff changeset
  1010
              level: 1
f7baa10ebb1c Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1719
diff changeset
  1011
              component: 
f7baa10ebb1c Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1719
diff changeset
  1012
             (SpecCollection
f7baa10ebb1c Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1719
diff changeset
  1013
                collection: (
f7baa10ebb1c Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1719
diff changeset
  1014
                 (ArbitraryComponentSpec
f7baa10ebb1c Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1719
diff changeset
  1015
                    name: 'treeView'
f7baa10ebb1c Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1719
diff changeset
  1016
                    tabable: true
f7baa10ebb1c Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1719
diff changeset
  1017
                    menu: menuEdit
f7baa10ebb1c Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1719
diff changeset
  1018
                    hasHorizontalScrollBar: true
f7baa10ebb1c Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1719
diff changeset
  1019
                    hasVerticalScrollBar: true
f7baa10ebb1c Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1719
diff changeset
  1020
                    miniScrollerHorizontal: true
f7baa10ebb1c Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1719
diff changeset
  1021
                    miniScrollerVertical: true
f7baa10ebb1c Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1719
diff changeset
  1022
                    hasBorder: false
f7baa10ebb1c Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1719
diff changeset
  1023
                    component: treeView
1317
49d6dac15a57 update focusSequence in UIPainter
ca
parents: 1316
diff changeset
  1024
                  )
1739
f7baa10ebb1c Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1719
diff changeset
  1025
                 (ViewSpec
f7baa10ebb1c Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1719
diff changeset
  1026
                    name: 'specHolderView'
f7baa10ebb1c Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1719
diff changeset
  1027
                    level: 0
f7baa10ebb1c Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1719
diff changeset
  1028
                    component: 
f7baa10ebb1c Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1719
diff changeset
  1029
                   (SpecCollection
f7baa10ebb1c Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1719
diff changeset
  1030
                      collection: (
f7baa10ebb1c Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1719
diff changeset
  1031
                       (MenuPanelSpec
f7baa10ebb1c Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1719
diff changeset
  1032
                          name: 'menuToolbar2View'
f7baa10ebb1c Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1719
diff changeset
  1033
                          layout: (LayoutFrame 2 0.0 2 0 -2 1.0 32 0)
f7baa10ebb1c Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1719
diff changeset
  1034
                          level: 0
f7baa10ebb1c Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1719
diff changeset
  1035
                          tabable: true
f7baa10ebb1c Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1719
diff changeset
  1036
                          menu: menuToolbar2
1317
49d6dac15a57 update focusSequence in UIPainter
ca
parents: 1316
diff changeset
  1037
                        )
1739
f7baa10ebb1c Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1719
diff changeset
  1038
                       (NoteBookViewSpec
f7baa10ebb1c Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1719
diff changeset
  1039
                          name: 'noteBook'
f7baa10ebb1c Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1719
diff changeset
  1040
                          layout: (LayoutFrame 2 0.0 32 0.0 -2 1.0 -28 1.0)
f7baa10ebb1c Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1719
diff changeset
  1041
                          level: 0
f7baa10ebb1c Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1719
diff changeset
  1042
                          enableChannel: enableChannel
f7baa10ebb1c Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1719
diff changeset
  1043
                          tabable: true
f7baa10ebb1c Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1719
diff changeset
  1044
                          model: tabModel
f7baa10ebb1c Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1719
diff changeset
  1045
                          menu: tabList
1790
51711e3c7046 translateLabel in NoteBookView
ca
parents: 1782
diff changeset
  1046
                          translateLabel: true
1739
f7baa10ebb1c Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1719
diff changeset
  1047
                          canvas: noteBookView
1317
49d6dac15a57 update focusSequence in UIPainter
ca
parents: 1316
diff changeset
  1048
                        )
1739
f7baa10ebb1c Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1719
diff changeset
  1049
                       (HorizontalPanelViewSpec
f7baa10ebb1c Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1719
diff changeset
  1050
                          name: 'HorizontalPanel1'
f7baa10ebb1c Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1719
diff changeset
  1051
                          layout: (LayoutFrame 2 0 -26 1 -2 1 -2 1)
f7baa10ebb1c Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1719
diff changeset
  1052
                          horizontalLayout: fit
f7baa10ebb1c Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1719
diff changeset
  1053
                          verticalLayout: fit
f7baa10ebb1c Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1719
diff changeset
  1054
                          horizontalSpace: 3
f7baa10ebb1c Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1719
diff changeset
  1055
                          verticalSpace: 3
f7baa10ebb1c Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1719
diff changeset
  1056
                          reverseOrderIfOKAtLeft: true
f7baa10ebb1c Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1719
diff changeset
  1057
                          component: 
f7baa10ebb1c Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1719
diff changeset
  1058
                         (SpecCollection
f7baa10ebb1c Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1719
diff changeset
  1059
                            collection: (
f7baa10ebb1c Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1719
diff changeset
  1060
                             (ActionButtonSpec
f7baa10ebb1c Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1719
diff changeset
  1061
                                label: 'Cancel'
f7baa10ebb1c Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1719
diff changeset
  1062
                                name: 'cancelButton'
f7baa10ebb1c Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1719
diff changeset
  1063
                                activeHelpKey: commitCancel
1782
8108839cc262 translate label
Claus Gittinger <cg@exept.de>
parents: 1775
diff changeset
  1064
                                translateLabel: true
1739
f7baa10ebb1c Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1719
diff changeset
  1065
                                tabable: true
f7baa10ebb1c Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1719
diff changeset
  1066
                                model: cancel
f7baa10ebb1c Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1719
diff changeset
  1067
                                enableChannel: modifiedChannel
f7baa10ebb1c Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1719
diff changeset
  1068
                                extent: (Point 201 24)
1457
8c15098c3469 ok button is left in some viewStyles
Claus Gittinger <cg@exept.de>
parents: 1456
diff changeset
  1069
                              )
1739
f7baa10ebb1c Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1719
diff changeset
  1070
                             (ActionButtonSpec
f7baa10ebb1c Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1719
diff changeset
  1071
                                label: 'OK'
f7baa10ebb1c Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1719
diff changeset
  1072
                                name: 'acceptButton'
f7baa10ebb1c Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1719
diff changeset
  1073
                                activeHelpKey: commitOK
1782
8108839cc262 translate label
Claus Gittinger <cg@exept.de>
parents: 1775
diff changeset
  1074
                                translateLabel: true
1739
f7baa10ebb1c Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1719
diff changeset
  1075
                                tabable: true
f7baa10ebb1c Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1719
diff changeset
  1076
                                model: accept
f7baa10ebb1c Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1719
diff changeset
  1077
                                enableChannel: modifiedChannel
f7baa10ebb1c Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1719
diff changeset
  1078
                                extent: (Point 201 24)
1457
8c15098c3469 ok button is left in some viewStyles
Claus Gittinger <cg@exept.de>
parents: 1456
diff changeset
  1079
                              )
8c15098c3469 ok button is left in some viewStyles
Claus Gittinger <cg@exept.de>
parents: 1456
diff changeset
  1080
                             )
8c15098c3469 ok button is left in some viewStyles
Claus Gittinger <cg@exept.de>
parents: 1456
diff changeset
  1081
                           
1317
49d6dac15a57 update focusSequence in UIPainter
ca
parents: 1316
diff changeset
  1082
                          )
49d6dac15a57 update focusSequence in UIPainter
ca
parents: 1316
diff changeset
  1083
                        )
49d6dac15a57 update focusSequence in UIPainter
ca
parents: 1316
diff changeset
  1084
                       )
1115
1d0ff67419fc arrowButtons smaller
Claus Gittinger <cg@exept.de>
parents: 1103
diff changeset
  1085
                     
1317
49d6dac15a57 update focusSequence in UIPainter
ca
parents: 1316
diff changeset
  1086
                    )
49d6dac15a57 update focusSequence in UIPainter
ca
parents: 1316
diff changeset
  1087
                  )
49d6dac15a57 update focusSequence in UIPainter
ca
parents: 1316
diff changeset
  1088
                 )
1115
1d0ff67419fc arrowButtons smaller
Claus Gittinger <cg@exept.de>
parents: 1103
diff changeset
  1089
               
1317
49d6dac15a57 update focusSequence in UIPainter
ca
parents: 1316
diff changeset
  1090
              )
1739
f7baa10ebb1c Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1719
diff changeset
  1091
              handles: (Any 0.318868 1.0)
1317
49d6dac15a57 update focusSequence in UIPainter
ca
parents: 1316
diff changeset
  1092
            )
1739
f7baa10ebb1c Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1719
diff changeset
  1093
           (UISubSpecification
f7baa10ebb1c Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1719
diff changeset
  1094
              name: 'infoBarSubSpec'
f7baa10ebb1c Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1719
diff changeset
  1095
              layout: (LayoutFrame 0 0.0 -24 1 0 1.0 0 1.0)
f7baa10ebb1c Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1719
diff changeset
  1096
              level: 1
f7baa10ebb1c Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1719
diff changeset
  1097
              majorKey: ToolApplicationModel
f7baa10ebb1c Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1719
diff changeset
  1098
              minorKey: windowSpecForInfoBar
1317
49d6dac15a57 update focusSequence in UIPainter
ca
parents: 1316
diff changeset
  1099
            )
49d6dac15a57 update focusSequence in UIPainter
ca
parents: 1316
diff changeset
  1100
           )
1115
1d0ff67419fc arrowButtons smaller
Claus Gittinger <cg@exept.de>
parents: 1103
diff changeset
  1101
         
1317
49d6dac15a57 update focusSequence in UIPainter
ca
parents: 1316
diff changeset
  1102
        )
222
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  1103
      )
2157
76aadc90818e mask of icons
Claus Gittinger <cg@exept.de>
parents: 2138
diff changeset
  1104
76aadc90818e mask of icons
Claus Gittinger <cg@exept.de>
parents: 2138
diff changeset
  1105
    "Modified: / 10-02-2007 / 14:45:31 / cg"
222
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  1106
! !
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  1107
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  1108
!UIPainter class methodsFor:'menu specs'!
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  1109
446
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
  1110
menu
743
d58a3e7e39d5 support user defined font styles
tz
parents: 735
diff changeset
  1111
    "This resource specification was automatically generated
d58a3e7e39d5 support user defined font styles
tz
parents: 735
diff changeset
  1112
     by the MenuEditor of ST/X."
d58a3e7e39d5 support user defined font styles
tz
parents: 735
diff changeset
  1113
d58a3e7e39d5 support user defined font styles
tz
parents: 735
diff changeset
  1114
    "Do not manually edit this!! If it is corrupted,
d58a3e7e39d5 support user defined font styles
tz
parents: 735
diff changeset
  1115
     the MenuEditor may not be able to read the specification."
217
354ba46948b4 access MenuEditor for specs
ca
parents: 206
diff changeset
  1116
354ba46948b4 access MenuEditor for specs
ca
parents: 206
diff changeset
  1117
    "
446
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
  1118
     MenuEditor new openOnClass:UIPainter andSelector:#menu
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
  1119
     (Menu new fromLiteralArrayEncoding:(UIPainter menu)) startUp
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
  1120
    "
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
  1121
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
  1122
    <resource: #menu>
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
  1123
1710
4d81ff7b3412 autoAccept on selectionChange; ok -> apply;
Claus Gittinger <cg@exept.de>
parents: 1698
diff changeset
  1124
    ^ 
1775
695f10f213d1 no flyByHelp for menu
ca
parents: 1772
diff changeset
  1125
     #(Menu
695f10f213d1 no flyByHelp for menu
ca
parents: 1772
diff changeset
  1126
        (
695f10f213d1 no flyByHelp for menu
ca
parents: 1772
diff changeset
  1127
         (MenuItem
695f10f213d1 no flyByHelp for menu
ca
parents: 1772
diff changeset
  1128
            enabled: enableChannel
695f10f213d1 no flyByHelp for menu
ca
parents: 1772
diff changeset
  1129
            label: '&File'
695f10f213d1 no flyByHelp for menu
ca
parents: 1772
diff changeset
  1130
            translateLabel: true
695f10f213d1 no flyByHelp for menu
ca
parents: 1772
diff changeset
  1131
            submenu: 
695f10f213d1 no flyByHelp for menu
ca
parents: 1772
diff changeset
  1132
           (Menu
695f10f213d1 no flyByHelp for menu
ca
parents: 1772
diff changeset
  1133
              (
695f10f213d1 no flyByHelp for menu
ca
parents: 1772
diff changeset
  1134
               (MenuItem
695f10f213d1 no flyByHelp for menu
ca
parents: 1772
diff changeset
  1135
                  activeHelpKey: fileNew
695f10f213d1 no flyByHelp for menu
ca
parents: 1772
diff changeset
  1136
                  label: 'New'
695f10f213d1 no flyByHelp for menu
ca
parents: 1772
diff changeset
  1137
                  itemValue: doNew
695f10f213d1 no flyByHelp for menu
ca
parents: 1772
diff changeset
  1138
                  translateLabel: true
2023
7a37b7c85092 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2012
diff changeset
  1139
                  isVisible: isStandAlone
1710
4d81ff7b3412 autoAccept on selectionChange; ok -> apply;
Claus Gittinger <cg@exept.de>
parents: 1698
diff changeset
  1140
                )
1775
695f10f213d1 no flyByHelp for menu
ca
parents: 1772
diff changeset
  1141
               (MenuItem
695f10f213d1 no flyByHelp for menu
ca
parents: 1772
diff changeset
  1142
                  label: '-'
2023
7a37b7c85092 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2012
diff changeset
  1143
                  isVisible: isStandAlone
1710
4d81ff7b3412 autoAccept on selectionChange; ok -> apply;
Claus Gittinger <cg@exept.de>
parents: 1698
diff changeset
  1144
                )
1775
695f10f213d1 no flyByHelp for menu
ca
parents: 1772
diff changeset
  1145
               (MenuItem
695f10f213d1 no flyByHelp for menu
ca
parents: 1772
diff changeset
  1146
                  activeHelpKey: fileLoad
695f10f213d1 no flyByHelp for menu
ca
parents: 1772
diff changeset
  1147
                  label: 'Load...'
695f10f213d1 no flyByHelp for menu
ca
parents: 1772
diff changeset
  1148
                  itemValue: doLoad
695f10f213d1 no flyByHelp for menu
ca
parents: 1772
diff changeset
  1149
                  translateLabel: true
2023
7a37b7c85092 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2012
diff changeset
  1150
                  isVisible: isStandAlone
1710
4d81ff7b3412 autoAccept on selectionChange; ok -> apply;
Claus Gittinger <cg@exept.de>
parents: 1698
diff changeset
  1151
                )
1775
695f10f213d1 no flyByHelp for menu
ca
parents: 1772
diff changeset
  1152
               (MenuItem
695f10f213d1 no flyByHelp for menu
ca
parents: 1772
diff changeset
  1153
                  activeHelpKey: fileLoadSubspec
695f10f213d1 no flyByHelp for menu
ca
parents: 1772
diff changeset
  1154
                  label: 'Load Subspec...'
695f10f213d1 no flyByHelp for menu
ca
parents: 1772
diff changeset
  1155
                  itemValue: doLoadSubspec
695f10f213d1 no flyByHelp for menu
ca
parents: 1772
diff changeset
  1156
                  translateLabel: true
2023
7a37b7c85092 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2012
diff changeset
  1157
                  isVisible: isStandAlone
1710
4d81ff7b3412 autoAccept on selectionChange; ok -> apply;
Claus Gittinger <cg@exept.de>
parents: 1698
diff changeset
  1158
                )
1775
695f10f213d1 no flyByHelp for menu
ca
parents: 1772
diff changeset
  1159
               (MenuItem
695f10f213d1 no flyByHelp for menu
ca
parents: 1772
diff changeset
  1160
                  label: '-'
2023
7a37b7c85092 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2012
diff changeset
  1161
                  isVisible: isStandAlone
1710
4d81ff7b3412 autoAccept on selectionChange; ok -> apply;
Claus Gittinger <cg@exept.de>
parents: 1698
diff changeset
  1162
                )
1775
695f10f213d1 no flyByHelp for menu
ca
parents: 1772
diff changeset
  1163
               (MenuItem
695f10f213d1 no flyByHelp for menu
ca
parents: 1772
diff changeset
  1164
                  activeHelpKey: fileSave
695f10f213d1 no flyByHelp for menu
ca
parents: 1772
diff changeset
  1165
                  label: 'Save'
695f10f213d1 no flyByHelp for menu
ca
parents: 1772
diff changeset
  1166
                  itemValue: doSave
695f10f213d1 no flyByHelp for menu
ca
parents: 1772
diff changeset
  1167
                  translateLabel: true
1710
4d81ff7b3412 autoAccept on selectionChange; ok -> apply;
Claus Gittinger <cg@exept.de>
parents: 1698
diff changeset
  1168
                )
1775
695f10f213d1 no flyByHelp for menu
ca
parents: 1772
diff changeset
  1169
               (MenuItem
695f10f213d1 no flyByHelp for menu
ca
parents: 1772
diff changeset
  1170
                  activeHelpKey: fileSaveAs
695f10f213d1 no flyByHelp for menu
ca
parents: 1772
diff changeset
  1171
                  label: 'Save As...'
695f10f213d1 no flyByHelp for menu
ca
parents: 1772
diff changeset
  1172
                  itemValue: doSaveAs
695f10f213d1 no flyByHelp for menu
ca
parents: 1772
diff changeset
  1173
                  translateLabel: true
1710
4d81ff7b3412 autoAccept on selectionChange; ok -> apply;
Claus Gittinger <cg@exept.de>
parents: 1698
diff changeset
  1174
                )
1775
695f10f213d1 no flyByHelp for menu
ca
parents: 1772
diff changeset
  1175
               (MenuItem
695f10f213d1 no flyByHelp for menu
ca
parents: 1772
diff changeset
  1176
                  activeHelpKey: fileSaveAs
695f10f213d1 no flyByHelp for menu
ca
parents: 1772
diff changeset
  1177
                  label: 'Define Class and Selector...'
695f10f213d1 no flyByHelp for menu
ca
parents: 1772
diff changeset
  1178
                  itemValue: doDefineClassAndSelector
695f10f213d1 no flyByHelp for menu
ca
parents: 1772
diff changeset
  1179
                  translateLabel: true
2023
7a37b7c85092 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2012
diff changeset
  1180
                  isVisible: isStandAlone
1710
4d81ff7b3412 autoAccept on selectionChange; ok -> apply;
Claus Gittinger <cg@exept.de>
parents: 1698
diff changeset
  1181
                )
1775
695f10f213d1 no flyByHelp for menu
ca
parents: 1772
diff changeset
  1182
               (MenuItem
695f10f213d1 no flyByHelp for menu
ca
parents: 1772
diff changeset
  1183
                  label: '-'
1710
4d81ff7b3412 autoAccept on selectionChange; ok -> apply;
Claus Gittinger <cg@exept.de>
parents: 1698
diff changeset
  1184
                )
1775
695f10f213d1 no flyByHelp for menu
ca
parents: 1772
diff changeset
  1185
               (MenuItem
695f10f213d1 no flyByHelp for menu
ca
parents: 1772
diff changeset
  1186
                  activeHelpKey: filePickAnInterface
695f10f213d1 no flyByHelp for menu
ca
parents: 1772
diff changeset
  1187
                  label: 'Pick a Window Spec...'
695f10f213d1 no flyByHelp for menu
ca
parents: 1772
diff changeset
  1188
                  itemValue: doPickAView
695f10f213d1 no flyByHelp for menu
ca
parents: 1772
diff changeset
  1189
                  translateLabel: true
1710
4d81ff7b3412 autoAccept on selectionChange; ok -> apply;
Claus Gittinger <cg@exept.de>
parents: 1698
diff changeset
  1190
                )
1775
695f10f213d1 no flyByHelp for menu
ca
parents: 1772
diff changeset
  1191
               (MenuItem
695f10f213d1 no flyByHelp for menu
ca
parents: 1772
diff changeset
  1192
                  label: '-'
1710
4d81ff7b3412 autoAccept on selectionChange; ok -> apply;
Claus Gittinger <cg@exept.de>
parents: 1698
diff changeset
  1193
                )
1775
695f10f213d1 no flyByHelp for menu
ca
parents: 1772
diff changeset
  1194
               (MenuItem
695f10f213d1 no flyByHelp for menu
ca
parents: 1772
diff changeset
  1195
                  activeHelpKey: fileShowWindowSpec
695f10f213d1 no flyByHelp for menu
ca
parents: 1772
diff changeset
  1196
                  label: 'Show Window Spec'
695f10f213d1 no flyByHelp for menu
ca
parents: 1772
diff changeset
  1197
                  itemValue: doWindowSpec
695f10f213d1 no flyByHelp for menu
ca
parents: 1772
diff changeset
  1198
                  translateLabel: true
2023
7a37b7c85092 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2012
diff changeset
  1199
                  isVisible: isStandAlone
1498
817cce99fc96 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1487
diff changeset
  1200
                )
1775
695f10f213d1 no flyByHelp for menu
ca
parents: 1772
diff changeset
  1201
               (MenuItem
695f10f213d1 no flyByHelp for menu
ca
parents: 1772
diff changeset
  1202
                  activeHelpKey: fileBrowseClass
695f10f213d1 no flyByHelp for menu
ca
parents: 1772
diff changeset
  1203
                  enabled: hasSpecClass
695f10f213d1 no flyByHelp for menu
ca
parents: 1772
diff changeset
  1204
                  label: 'Browse Applications Class'
695f10f213d1 no flyByHelp for menu
ca
parents: 1772
diff changeset
  1205
                  itemValue: doBrowseClass
695f10f213d1 no flyByHelp for menu
ca
parents: 1772
diff changeset
  1206
                  translateLabel: true
2023
7a37b7c85092 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2012
diff changeset
  1207
                  isVisible: isStandAlone
1710
4d81ff7b3412 autoAccept on selectionChange; ok -> apply;
Claus Gittinger <cg@exept.de>
parents: 1698
diff changeset
  1208
                )
1775
695f10f213d1 no flyByHelp for menu
ca
parents: 1772
diff changeset
  1209
               (MenuItem
695f10f213d1 no flyByHelp for menu
ca
parents: 1772
diff changeset
  1210
                  activeHelpKey: fileBrowseAspectMethods
695f10f213d1 no flyByHelp for menu
ca
parents: 1772
diff changeset
  1211
                  enabled: hasSpecClass
695f10f213d1 no flyByHelp for menu
ca
parents: 1772
diff changeset
  1212
                  label: 'Browse Applications Aspect Methods'
695f10f213d1 no flyByHelp for menu
ca
parents: 1772
diff changeset
  1213
                  itemValue: doBrowseAspectMethods
695f10f213d1 no flyByHelp for menu
ca
parents: 1772
diff changeset
  1214
                  translateLabel: true
1710
4d81ff7b3412 autoAccept on selectionChange; ok -> apply;
Claus Gittinger <cg@exept.de>
parents: 1698
diff changeset
  1215
                )
1775
695f10f213d1 no flyByHelp for menu
ca
parents: 1772
diff changeset
  1216
               (MenuItem
695f10f213d1 no flyByHelp for menu
ca
parents: 1772
diff changeset
  1217
                  label: '-'
2023
7a37b7c85092 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2012
diff changeset
  1218
                  isVisible: isStandAlone
1710
4d81ff7b3412 autoAccept on selectionChange; ok -> apply;
Claus Gittinger <cg@exept.de>
parents: 1698
diff changeset
  1219
                )
1775
695f10f213d1 no flyByHelp for menu
ca
parents: 1772
diff changeset
  1220
               (MenuItem
695f10f213d1 no flyByHelp for menu
ca
parents: 1772
diff changeset
  1221
                  activeHelpKey: fileExit
695f10f213d1 no flyByHelp for menu
ca
parents: 1772
diff changeset
  1222
                  label: 'Exit'
695f10f213d1 no flyByHelp for menu
ca
parents: 1772
diff changeset
  1223
                  itemValue: closeRequest
695f10f213d1 no flyByHelp for menu
ca
parents: 1772
diff changeset
  1224
                  translateLabel: true
2023
7a37b7c85092 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2012
diff changeset
  1225
                  isVisible: isStandAlone
1710
4d81ff7b3412 autoAccept on selectionChange; ok -> apply;
Claus Gittinger <cg@exept.de>
parents: 1698
diff changeset
  1226
                )
4d81ff7b3412 autoAccept on selectionChange; ok -> apply;
Claus Gittinger <cg@exept.de>
parents: 1698
diff changeset
  1227
               )
4d81ff7b3412 autoAccept on selectionChange; ok -> apply;
Claus Gittinger <cg@exept.de>
parents: 1698
diff changeset
  1228
              nil
4d81ff7b3412 autoAccept on selectionChange; ok -> apply;
Claus Gittinger <cg@exept.de>
parents: 1698
diff changeset
  1229
              nil
1498
817cce99fc96 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1487
diff changeset
  1230
            )
1710
4d81ff7b3412 autoAccept on selectionChange; ok -> apply;
Claus Gittinger <cg@exept.de>
parents: 1698
diff changeset
  1231
          )
1775
695f10f213d1 no flyByHelp for menu
ca
parents: 1772
diff changeset
  1232
         (MenuItem
695f10f213d1 no flyByHelp for menu
ca
parents: 1772
diff changeset
  1233
            label: 'Edit'
695f10f213d1 no flyByHelp for menu
ca
parents: 1772
diff changeset
  1234
            translateLabel: true
695f10f213d1 no flyByHelp for menu
ca
parents: 1772
diff changeset
  1235
            submenuChannel: menuEdit
1710
4d81ff7b3412 autoAccept on selectionChange; ok -> apply;
Claus Gittinger <cg@exept.de>
parents: 1698
diff changeset
  1236
          )
1775
695f10f213d1 no flyByHelp for menu
ca
parents: 1772
diff changeset
  1237
         (MenuItem
695f10f213d1 no flyByHelp for menu
ca
parents: 1772
diff changeset
  1238
            label: 'Align'
695f10f213d1 no flyByHelp for menu
ca
parents: 1772
diff changeset
  1239
            translateLabel: true
695f10f213d1 no flyByHelp for menu
ca
parents: 1772
diff changeset
  1240
            submenuChannel: menuAlign
1710
4d81ff7b3412 autoAccept on selectionChange; ok -> apply;
Claus Gittinger <cg@exept.de>
parents: 1698
diff changeset
  1241
          )
1775
695f10f213d1 no flyByHelp for menu
ca
parents: 1772
diff changeset
  1242
         (MenuItem
695f10f213d1 no flyByHelp for menu
ca
parents: 1772
diff changeset
  1243
            label: 'Generate'
695f10f213d1 no flyByHelp for menu
ca
parents: 1772
diff changeset
  1244
            translateLabel: true
2198
804e778590fc slightly refactored to allow for more redefinition in a subclass
Claus Gittinger <cg@exept.de>
parents: 2175
diff changeset
  1245
            isVisible: isNotEditingSpecOnly
1775
695f10f213d1 no flyByHelp for menu
ca
parents: 1772
diff changeset
  1246
            submenu: 
695f10f213d1 no flyByHelp for menu
ca
parents: 1772
diff changeset
  1247
           (Menu
695f10f213d1 no flyByHelp for menu
ca
parents: 1772
diff changeset
  1248
              (
695f10f213d1 no flyByHelp for menu
ca
parents: 1772
diff changeset
  1249
               (MenuItem
695f10f213d1 no flyByHelp for menu
ca
parents: 1772
diff changeset
  1250
                  activeHelpKey: generateAspectMethods
695f10f213d1 no flyByHelp for menu
ca
parents: 1772
diff changeset
  1251
                  enabled: hasSpecClass
695f10f213d1 no flyByHelp for menu
ca
parents: 1772
diff changeset
  1252
                  label: 'Aspect Methods'
695f10f213d1 no flyByHelp for menu
ca
parents: 1772
diff changeset
  1253
                  itemValue: doGenerateAspectMethods
695f10f213d1 no flyByHelp for menu
ca
parents: 1772
diff changeset
  1254
                  translateLabel: true
1498
817cce99fc96 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1487
diff changeset
  1255
                )
1775
695f10f213d1 no flyByHelp for menu
ca
parents: 1772
diff changeset
  1256
               (MenuItem
695f10f213d1 no flyByHelp for menu
ca
parents: 1772
diff changeset
  1257
                  activeHelpKey: generateAspectMethodFor
695f10f213d1 no flyByHelp for menu
ca
parents: 1772
diff changeset
  1258
                  enabled: hasSpecClass
695f10f213d1 no flyByHelp for menu
ca
parents: 1772
diff changeset
  1259
                  label: 'Aspect Method For...'
695f10f213d1 no flyByHelp for menu
ca
parents: 1772
diff changeset
  1260
                  itemValue: doGenerateAspectMethodFor
695f10f213d1 no flyByHelp for menu
ca
parents: 1772
diff changeset
  1261
                  translateLabel: true
1710
4d81ff7b3412 autoAccept on selectionChange; ok -> apply;
Claus Gittinger <cg@exept.de>
parents: 1698
diff changeset
  1262
                )
1775
695f10f213d1 no flyByHelp for menu
ca
parents: 1772
diff changeset
  1263
               (MenuItem
695f10f213d1 no flyByHelp for menu
ca
parents: 1772
diff changeset
  1264
                  enabled: hasSpecClass
695f10f213d1 no flyByHelp for menu
ca
parents: 1772
diff changeset
  1265
                  label: 'Menu Stub Methods'
695f10f213d1 no flyByHelp for menu
ca
parents: 1772
diff changeset
  1266
                  itemValue: doGenerateMenuMethods
695f10f213d1 no flyByHelp for menu
ca
parents: 1772
diff changeset
  1267
                  translateLabel: true
1710
4d81ff7b3412 autoAccept on selectionChange; ok -> apply;
Claus Gittinger <cg@exept.de>
parents: 1698
diff changeset
  1268
                )
1775
695f10f213d1 no flyByHelp for menu
ca
parents: 1772
diff changeset
  1269
               (MenuItem
695f10f213d1 no flyByHelp for menu
ca
parents: 1772
diff changeset
  1270
                  label: '-'
1710
4d81ff7b3412 autoAccept on selectionChange; ok -> apply;
Claus Gittinger <cg@exept.de>
parents: 1698
diff changeset
  1271
                )
1775
695f10f213d1 no flyByHelp for menu
ca
parents: 1772
diff changeset
  1272
               (MenuItem
695f10f213d1 no flyByHelp for menu
ca
parents: 1772
diff changeset
  1273
                  activeHelpKey: generateHookMethods
695f10f213d1 no flyByHelp for menu
ca
parents: 1772
diff changeset
  1274
                  enabled: hasSpecClass
695f10f213d1 no flyByHelp for menu
ca
parents: 1772
diff changeset
  1275
                  label: 'Hook Methods'
695f10f213d1 no flyByHelp for menu
ca
parents: 1772
diff changeset
  1276
                  itemValue: doGenerateHookMethods
695f10f213d1 no flyByHelp for menu
ca
parents: 1772
diff changeset
  1277
                  translateLabel: true
1710
4d81ff7b3412 autoAccept on selectionChange; ok -> apply;
Claus Gittinger <cg@exept.de>
parents: 1698
diff changeset
  1278
                )
4d81ff7b3412 autoAccept on selectionChange; ok -> apply;
Claus Gittinger <cg@exept.de>
parents: 1698
diff changeset
  1279
               )
4d81ff7b3412 autoAccept on selectionChange; ok -> apply;
Claus Gittinger <cg@exept.de>
parents: 1698
diff changeset
  1280
              nil
4d81ff7b3412 autoAccept on selectionChange; ok -> apply;
Claus Gittinger <cg@exept.de>
parents: 1698
diff changeset
  1281
              nil
1498
817cce99fc96 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1487
diff changeset
  1282
            )
1710
4d81ff7b3412 autoAccept on selectionChange; ok -> apply;
Claus Gittinger <cg@exept.de>
parents: 1698
diff changeset
  1283
          )
1775
695f10f213d1 no flyByHelp for menu
ca
parents: 1772
diff changeset
  1284
         (MenuItem
695f10f213d1 no flyByHelp for menu
ca
parents: 1772
diff changeset
  1285
            label: 'Test'
695f10f213d1 no flyByHelp for menu
ca
parents: 1772
diff changeset
  1286
            translateLabel: true
695f10f213d1 no flyByHelp for menu
ca
parents: 1772
diff changeset
  1287
            submenu: 
695f10f213d1 no flyByHelp for menu
ca
parents: 1772
diff changeset
  1288
           (Menu
695f10f213d1 no flyByHelp for menu
ca
parents: 1772
diff changeset
  1289
              (
695f10f213d1 no flyByHelp for menu
ca
parents: 1772
diff changeset
  1290
               (MenuItem
695f10f213d1 no flyByHelp for menu
ca
parents: 1772
diff changeset
  1291
                  activeHelpKey: testStartApplication
695f10f213d1 no flyByHelp for menu
ca
parents: 1772
diff changeset
  1292
                  label: 'Start Application'
695f10f213d1 no flyByHelp for menu
ca
parents: 1772
diff changeset
  1293
                  itemValue: doStartApplication
695f10f213d1 no flyByHelp for menu
ca
parents: 1772
diff changeset
  1294
                  translateLabel: true
2198
804e778590fc slightly refactored to allow for more redefinition in a subclass
Claus Gittinger <cg@exept.de>
parents: 2175
diff changeset
  1295
                  isVisible: isNotEditingSpecOnly
1498
817cce99fc96 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1487
diff changeset
  1296
                )
1775
695f10f213d1 no flyByHelp for menu
ca
parents: 1772
diff changeset
  1297
               (MenuItem
695f10f213d1 no flyByHelp for menu
ca
parents: 1772
diff changeset
  1298
                  label: '-'
2198
804e778590fc slightly refactored to allow for more redefinition in a subclass
Claus Gittinger <cg@exept.de>
parents: 2175
diff changeset
  1299
                  isVisible: isNotEditingSpecOnly
1710
4d81ff7b3412 autoAccept on selectionChange; ok -> apply;
Claus Gittinger <cg@exept.de>
parents: 1698
diff changeset
  1300
                )
1775
695f10f213d1 no flyByHelp for menu
ca
parents: 1772
diff changeset
  1301
               (MenuItem
695f10f213d1 no flyByHelp for menu
ca
parents: 1772
diff changeset
  1302
                  activeHelpKey: testGeometryTestMode
695f10f213d1 no flyByHelp for menu
ca
parents: 1772
diff changeset
  1303
                  label: 'Geometry Test Mode'
695f10f213d1 no flyByHelp for menu
ca
parents: 1772
diff changeset
  1304
                  translateLabel: true
695f10f213d1 no flyByHelp for menu
ca
parents: 1772
diff changeset
  1305
                  indication: testMode:
1710
4d81ff7b3412 autoAccept on selectionChange; ok -> apply;
Claus Gittinger <cg@exept.de>
parents: 1698
diff changeset
  1306
                )
4d81ff7b3412 autoAccept on selectionChange; ok -> apply;
Claus Gittinger <cg@exept.de>
parents: 1698
diff changeset
  1307
               )
4d81ff7b3412 autoAccept on selectionChange; ok -> apply;
Claus Gittinger <cg@exept.de>
parents: 1698
diff changeset
  1308
              nil
4d81ff7b3412 autoAccept on selectionChange; ok -> apply;
Claus Gittinger <cg@exept.de>
parents: 1698
diff changeset
  1309
              nil
1498
817cce99fc96 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1487
diff changeset
  1310
            )
1710
4d81ff7b3412 autoAccept on selectionChange; ok -> apply;
Claus Gittinger <cg@exept.de>
parents: 1698
diff changeset
  1311
          )
1775
695f10f213d1 no flyByHelp for menu
ca
parents: 1772
diff changeset
  1312
         (MenuItem
695f10f213d1 no flyByHelp for menu
ca
parents: 1772
diff changeset
  1313
            label: 'Settings'
695f10f213d1 no flyByHelp for menu
ca
parents: 1772
diff changeset
  1314
            translateLabel: true
695f10f213d1 no flyByHelp for menu
ca
parents: 1772
diff changeset
  1315
            submenu: 
695f10f213d1 no flyByHelp for menu
ca
parents: 1772
diff changeset
  1316
           (Menu
695f10f213d1 no flyByHelp for menu
ca
parents: 1772
diff changeset
  1317
              (
695f10f213d1 no flyByHelp for menu
ca
parents: 1772
diff changeset
  1318
               (MenuItem
695f10f213d1 no flyByHelp for menu
ca
parents: 1772
diff changeset
  1319
                  activeHelpKey: settingsCanvas
695f10f213d1 no flyByHelp for menu
ca
parents: 1772
diff changeset
  1320
                  label: 'Canvas'
695f10f213d1 no flyByHelp for menu
ca
parents: 1772
diff changeset
  1321
                  translateLabel: true
695f10f213d1 no flyByHelp for menu
ca
parents: 1772
diff changeset
  1322
                  indication: painterShown
1710
4d81ff7b3412 autoAccept on selectionChange; ok -> apply;
Claus Gittinger <cg@exept.de>
parents: 1698
diff changeset
  1323
                )
1775
695f10f213d1 no flyByHelp for menu
ca
parents: 1772
diff changeset
  1324
               (MenuItem
695f10f213d1 no flyByHelp for menu
ca
parents: 1772
diff changeset
  1325
                  activeHelpKey: settingsGallery
695f10f213d1 no flyByHelp for menu
ca
parents: 1772
diff changeset
  1326
                  label: 'Gallery'
695f10f213d1 no flyByHelp for menu
ca
parents: 1772
diff changeset
  1327
                  translateLabel: true
695f10f213d1 no flyByHelp for menu
ca
parents: 1772
diff changeset
  1328
                  indication: galleryShown
1710
4d81ff7b3412 autoAccept on selectionChange; ok -> apply;
Claus Gittinger <cg@exept.de>
parents: 1698
diff changeset
  1329
                )
1775
695f10f213d1 no flyByHelp for menu
ca
parents: 1772
diff changeset
  1330
               (MenuItem
695f10f213d1 no flyByHelp for menu
ca
parents: 1772
diff changeset
  1331
                  label: '-'
695f10f213d1 no flyByHelp for menu
ca
parents: 1772
diff changeset
  1332
                )
695f10f213d1 no flyByHelp for menu
ca
parents: 1772
diff changeset
  1333
               (MenuItem
695f10f213d1 no flyByHelp for menu
ca
parents: 1772
diff changeset
  1334
                  activeHelpKey: settingsRedefineAspectMethods
695f10f213d1 no flyByHelp for menu
ca
parents: 1772
diff changeset
  1335
                  enabled: hasSpecClass
695f10f213d1 no flyByHelp for menu
ca
parents: 1772
diff changeset
  1336
                  label: 'Redefine Aspect Methods'
695f10f213d1 no flyByHelp for menu
ca
parents: 1772
diff changeset
  1337
                  translateLabel: true
695f10f213d1 no flyByHelp for menu
ca
parents: 1772
diff changeset
  1338
                  indication: redefineAspectMethods:
2198
804e778590fc slightly refactored to allow for more redefinition in a subclass
Claus Gittinger <cg@exept.de>
parents: 2175
diff changeset
  1339
                  isVisible: isNotEditingSpecOnly
1710
4d81ff7b3412 autoAccept on selectionChange; ok -> apply;
Claus Gittinger <cg@exept.de>
parents: 1698
diff changeset
  1340
                )
1775
695f10f213d1 no flyByHelp for menu
ca
parents: 1772
diff changeset
  1341
               (MenuItem
695f10f213d1 no flyByHelp for menu
ca
parents: 1772
diff changeset
  1342
                  activeHelpKey: settingsAspectsAsInstances
695f10f213d1 no flyByHelp for menu
ca
parents: 1772
diff changeset
  1343
                  enabled: hasSpecClass
695f10f213d1 no flyByHelp for menu
ca
parents: 1772
diff changeset
  1344
                  label: 'Aspects as InstanceVariables'
695f10f213d1 no flyByHelp for menu
ca
parents: 1772
diff changeset
  1345
                  translateLabel: true
695f10f213d1 no flyByHelp for menu
ca
parents: 1772
diff changeset
  1346
                  indication: generateAspectsAsInstanceVariables:
2198
804e778590fc slightly refactored to allow for more redefinition in a subclass
Claus Gittinger <cg@exept.de>
parents: 2175
diff changeset
  1347
                  isVisible: isNotEditingSpecOnly
1498
817cce99fc96 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1487
diff changeset
  1348
                )
1775
695f10f213d1 no flyByHelp for menu
ca
parents: 1772
diff changeset
  1349
               (MenuItem
695f10f213d1 no flyByHelp for menu
ca
parents: 1772
diff changeset
  1350
                  label: 'AutoAccept on Selection-Change '
695f10f213d1 no flyByHelp for menu
ca
parents: 1772
diff changeset
  1351
                  translateLabel: true
695f10f213d1 no flyByHelp for menu
ca
parents: 1772
diff changeset
  1352
                  indication: autoAcceptOnSelectionChange
1710
4d81ff7b3412 autoAccept on selectionChange; ok -> apply;
Claus Gittinger <cg@exept.de>
parents: 1698
diff changeset
  1353
                )
1775
695f10f213d1 no flyByHelp for menu
ca
parents: 1772
diff changeset
  1354
               (MenuItem
695f10f213d1 no flyByHelp for menu
ca
parents: 1772
diff changeset
  1355
                  label: '-'
1710
4d81ff7b3412 autoAccept on selectionChange; ok -> apply;
Claus Gittinger <cg@exept.de>
parents: 1698
diff changeset
  1356
                )
1775
695f10f213d1 no flyByHelp for menu
ca
parents: 1772
diff changeset
  1357
               (MenuItem
695f10f213d1 no flyByHelp for menu
ca
parents: 1772
diff changeset
  1358
                  activeHelpKey: settingsUndoManager
695f10f213d1 no flyByHelp for menu
ca
parents: 1772
diff changeset
  1359
                  enabled: hasUndoHistory
695f10f213d1 no flyByHelp for menu
ca
parents: 1772
diff changeset
  1360
                  label: 'Undo Manager...'
695f10f213d1 no flyByHelp for menu
ca
parents: 1772
diff changeset
  1361
                  itemValue: openUndoMenu
695f10f213d1 no flyByHelp for menu
ca
parents: 1772
diff changeset
  1362
                  translateLabel: true
1710
4d81ff7b3412 autoAccept on selectionChange; ok -> apply;
Claus Gittinger <cg@exept.de>
parents: 1698
diff changeset
  1363
                )
1775
695f10f213d1 no flyByHelp for menu
ca
parents: 1772
diff changeset
  1364
               (MenuItem
695f10f213d1 no flyByHelp for menu
ca
parents: 1772
diff changeset
  1365
                  activeHelpKey: settingsGridManager
695f10f213d1 no flyByHelp for menu
ca
parents: 1772
diff changeset
  1366
                  label: 'Grid Manager...'
695f10f213d1 no flyByHelp for menu
ca
parents: 1772
diff changeset
  1367
                  itemValue: doDefineGrid
695f10f213d1 no flyByHelp for menu
ca
parents: 1772
diff changeset
  1368
                  translateLabel: true
1710
4d81ff7b3412 autoAccept on selectionChange; ok -> apply;
Claus Gittinger <cg@exept.de>
parents: 1698
diff changeset
  1369
                )
4d81ff7b3412 autoAccept on selectionChange; ok -> apply;
Claus Gittinger <cg@exept.de>
parents: 1698
diff changeset
  1370
               )
4d81ff7b3412 autoAccept on selectionChange; ok -> apply;
Claus Gittinger <cg@exept.de>
parents: 1698
diff changeset
  1371
              nil
4d81ff7b3412 autoAccept on selectionChange; ok -> apply;
Claus Gittinger <cg@exept.de>
parents: 1698
diff changeset
  1372
              nil
1498
817cce99fc96 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1487
diff changeset
  1373
            )
1710
4d81ff7b3412 autoAccept on selectionChange; ok -> apply;
Claus Gittinger <cg@exept.de>
parents: 1698
diff changeset
  1374
          )
1775
695f10f213d1 no flyByHelp for menu
ca
parents: 1772
diff changeset
  1375
         (MenuItem
695f10f213d1 no flyByHelp for menu
ca
parents: 1772
diff changeset
  1376
            label: 'History'
695f10f213d1 no flyByHelp for menu
ca
parents: 1772
diff changeset
  1377
            translateLabel: true
2023
7a37b7c85092 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2012
diff changeset
  1378
            isVisible: isStandAlone
1775
695f10f213d1 no flyByHelp for menu
ca
parents: 1772
diff changeset
  1379
            submenuChannel: menuHistory
1710
4d81ff7b3412 autoAccept on selectionChange; ok -> apply;
Claus Gittinger <cg@exept.de>
parents: 1698
diff changeset
  1380
          )
1775
695f10f213d1 no flyByHelp for menu
ca
parents: 1772
diff changeset
  1381
         (MenuItem
2138
55f338a77eb0 support '?' as help (for now: controlled by resources)
Claus Gittinger <cg@exept.de>
parents: 2124
diff changeset
  1382
            label: 'MENU_Help'
1775
695f10f213d1 no flyByHelp for menu
ca
parents: 1772
diff changeset
  1383
            translateLabel: true
2124
214c0d1d3c5a #conditionalRight
Claus Gittinger <cg@exept.de>
parents: 2117
diff changeset
  1384
            startGroup: conditionalRight
1775
695f10f213d1 no flyByHelp for menu
ca
parents: 1772
diff changeset
  1385
            submenu: 
695f10f213d1 no flyByHelp for menu
ca
parents: 1772
diff changeset
  1386
           (Menu
695f10f213d1 no flyByHelp for menu
ca
parents: 1772
diff changeset
  1387
              (
695f10f213d1 no flyByHelp for menu
ca
parents: 1772
diff changeset
  1388
               (MenuItem
695f10f213d1 no flyByHelp for menu
ca
parents: 1772
diff changeset
  1389
                  activeHelpKey: helpTutorial
695f10f213d1 no flyByHelp for menu
ca
parents: 1772
diff changeset
  1390
                  label: 'Tutorial'
695f10f213d1 no flyByHelp for menu
ca
parents: 1772
diff changeset
  1391
                  itemValue: openHTMLDocument:
695f10f213d1 no flyByHelp for menu
ca
parents: 1772
diff changeset
  1392
                  translateLabel: true
695f10f213d1 no flyByHelp for menu
ca
parents: 1772
diff changeset
  1393
                  argument: 'tools/uipainter/TOP.html'
695f10f213d1 no flyByHelp for menu
ca
parents: 1772
diff changeset
  1394
                )
695f10f213d1 no flyByHelp for menu
ca
parents: 1772
diff changeset
  1395
               (MenuItem
695f10f213d1 no flyByHelp for menu
ca
parents: 1772
diff changeset
  1396
                  label: '-'
1710
4d81ff7b3412 autoAccept on selectionChange; ok -> apply;
Claus Gittinger <cg@exept.de>
parents: 1698
diff changeset
  1397
                )
1775
695f10f213d1 no flyByHelp for menu
ca
parents: 1772
diff changeset
  1398
               (MenuItem
695f10f213d1 no flyByHelp for menu
ca
parents: 1772
diff changeset
  1399
                  activeHelpKey: helpFunctions
695f10f213d1 no flyByHelp for menu
ca
parents: 1772
diff changeset
  1400
                  label: 'Functions'
695f10f213d1 no flyByHelp for menu
ca
parents: 1772
diff changeset
  1401
                  itemValue: openHTMLDocument:
695f10f213d1 no flyByHelp for menu
ca
parents: 1772
diff changeset
  1402
                  translateLabel: true
695f10f213d1 no flyByHelp for menu
ca
parents: 1772
diff changeset
  1403
                  argument: 'tools/uipainter/Functions.html'
1710
4d81ff7b3412 autoAccept on selectionChange; ok -> apply;
Claus Gittinger <cg@exept.de>
parents: 1698
diff changeset
  1404
                )
1775
695f10f213d1 no flyByHelp for menu
ca
parents: 1772
diff changeset
  1405
               (MenuItem
695f10f213d1 no flyByHelp for menu
ca
parents: 1772
diff changeset
  1406
                  activeHelpKey: helpExamples
695f10f213d1 no flyByHelp for menu
ca
parents: 1772
diff changeset
  1407
                  label: 'Examples'
695f10f213d1 no flyByHelp for menu
ca
parents: 1772
diff changeset
  1408
                  itemValue: openHTMLDocument:
695f10f213d1 no flyByHelp for menu
ca
parents: 1772
diff changeset
  1409
                  translateLabel: true
695f10f213d1 no flyByHelp for menu
ca
parents: 1772
diff changeset
  1410
                  argument: 'tools/uipainter/Examples.html'
1710
4d81ff7b3412 autoAccept on selectionChange; ok -> apply;
Claus Gittinger <cg@exept.de>
parents: 1698
diff changeset
  1411
                )
1775
695f10f213d1 no flyByHelp for menu
ca
parents: 1772
diff changeset
  1412
               (MenuItem
695f10f213d1 no flyByHelp for menu
ca
parents: 1772
diff changeset
  1413
                  label: '-'
1710
4d81ff7b3412 autoAccept on selectionChange; ok -> apply;
Claus Gittinger <cg@exept.de>
parents: 1698
diff changeset
  1414
                )
1775
695f10f213d1 no flyByHelp for menu
ca
parents: 1772
diff changeset
  1415
               (MenuItem
695f10f213d1 no flyByHelp for menu
ca
parents: 1772
diff changeset
  1416
                  activeHelpKey: helpHelpTool
695f10f213d1 no flyByHelp for menu
ca
parents: 1772
diff changeset
  1417
                  label: 'Help Tool'
695f10f213d1 no flyByHelp for menu
ca
parents: 1772
diff changeset
  1418
                  itemValue: openHTMLDocument:
695f10f213d1 no flyByHelp for menu
ca
parents: 1772
diff changeset
  1419
                  translateLabel: true
695f10f213d1 no flyByHelp for menu
ca
parents: 1772
diff changeset
  1420
                  argument: 'tools/uipainter/HelpTool.html'
1710
4d81ff7b3412 autoAccept on selectionChange; ok -> apply;
Claus Gittinger <cg@exept.de>
parents: 1698
diff changeset
  1421
                )
1775
695f10f213d1 no flyByHelp for menu
ca
parents: 1772
diff changeset
  1422
               (MenuItem
695f10f213d1 no flyByHelp for menu
ca
parents: 1772
diff changeset
  1423
                  activeHelpKey: helpLayoutTool
695f10f213d1 no flyByHelp for menu
ca
parents: 1772
diff changeset
  1424
                  label: 'Layout Tool'
695f10f213d1 no flyByHelp for menu
ca
parents: 1772
diff changeset
  1425
                  itemValue: openHTMLDocument:
695f10f213d1 no flyByHelp for menu
ca
parents: 1772
diff changeset
  1426
                  translateLabel: true
695f10f213d1 no flyByHelp for menu
ca
parents: 1772
diff changeset
  1427
                  argument: 'tools/uipainter/LayoutTool.html'
1710
4d81ff7b3412 autoAccept on selectionChange; ok -> apply;
Claus Gittinger <cg@exept.de>
parents: 1698
diff changeset
  1428
                )
1775
695f10f213d1 no flyByHelp for menu
ca
parents: 1772
diff changeset
  1429
               (MenuItem
695f10f213d1 no flyByHelp for menu
ca
parents: 1772
diff changeset
  1430
                  label: '-'
1710
4d81ff7b3412 autoAccept on selectionChange; ok -> apply;
Claus Gittinger <cg@exept.de>
parents: 1698
diff changeset
  1431
                )
1775
695f10f213d1 no flyByHelp for menu
ca
parents: 1772
diff changeset
  1432
               (MenuItem
695f10f213d1 no flyByHelp for menu
ca
parents: 1772
diff changeset
  1433
                  activeHelpKey: helpSelectedWidget
695f10f213d1 no flyByHelp for menu
ca
parents: 1772
diff changeset
  1434
                  label: 'Selected Widget'
695f10f213d1 no flyByHelp for menu
ca
parents: 1772
diff changeset
  1435
                  itemValue: doOpenWidgetDocumentation
695f10f213d1 no flyByHelp for menu
ca
parents: 1772
diff changeset
  1436
                  translateLabel: true
1710
4d81ff7b3412 autoAccept on selectionChange; ok -> apply;
Claus Gittinger <cg@exept.de>
parents: 1698
diff changeset
  1437
                )
1775
695f10f213d1 no flyByHelp for menu
ca
parents: 1772
diff changeset
  1438
               (MenuItem
695f10f213d1 no flyByHelp for menu
ca
parents: 1772
diff changeset
  1439
                  label: '-'
1710
4d81ff7b3412 autoAccept on selectionChange; ok -> apply;
Claus Gittinger <cg@exept.de>
parents: 1698
diff changeset
  1440
                )
1775
695f10f213d1 no flyByHelp for menu
ca
parents: 1772
diff changeset
  1441
               (MenuItem
695f10f213d1 no flyByHelp for menu
ca
parents: 1772
diff changeset
  1442
                  activeHelpKey: helpShowHelp
695f10f213d1 no flyByHelp for menu
ca
parents: 1772
diff changeset
  1443
                  label: 'Show Help Texts'
695f10f213d1 no flyByHelp for menu
ca
parents: 1772
diff changeset
  1444
                  translateLabel: true
695f10f213d1 no flyByHelp for menu
ca
parents: 1772
diff changeset
  1445
                  indication: showingHelp:
1710
4d81ff7b3412 autoAccept on selectionChange; ok -> apply;
Claus Gittinger <cg@exept.de>
parents: 1698
diff changeset
  1446
                )
1775
695f10f213d1 no flyByHelp for menu
ca
parents: 1772
diff changeset
  1447
               (MenuItem
695f10f213d1 no flyByHelp for menu
ca
parents: 1772
diff changeset
  1448
                  label: '-'
1710
4d81ff7b3412 autoAccept on selectionChange; ok -> apply;
Claus Gittinger <cg@exept.de>
parents: 1698
diff changeset
  1449
                )
1775
695f10f213d1 no flyByHelp for menu
ca
parents: 1772
diff changeset
  1450
               (MenuItem
695f10f213d1 no flyByHelp for menu
ca
parents: 1772
diff changeset
  1451
                  activeHelpKey: aboutThisAppliaction
695f10f213d1 no flyByHelp for menu
ca
parents: 1772
diff changeset
  1452
                  label: 'About this Application...'
695f10f213d1 no flyByHelp for menu
ca
parents: 1772
diff changeset
  1453
                  itemValue: openAboutThisApplication
695f10f213d1 no flyByHelp for menu
ca
parents: 1772
diff changeset
  1454
                  translateLabel: true
1710
4d81ff7b3412 autoAccept on selectionChange; ok -> apply;
Claus Gittinger <cg@exept.de>
parents: 1698
diff changeset
  1455
                )
4d81ff7b3412 autoAccept on selectionChange; ok -> apply;
Claus Gittinger <cg@exept.de>
parents: 1698
diff changeset
  1456
               )
4d81ff7b3412 autoAccept on selectionChange; ok -> apply;
Claus Gittinger <cg@exept.de>
parents: 1698
diff changeset
  1457
              nil
4d81ff7b3412 autoAccept on selectionChange; ok -> apply;
Claus Gittinger <cg@exept.de>
parents: 1698
diff changeset
  1458
              nil
1498
817cce99fc96 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1487
diff changeset
  1459
            )
1710
4d81ff7b3412 autoAccept on selectionChange; ok -> apply;
Claus Gittinger <cg@exept.de>
parents: 1698
diff changeset
  1460
          )
4d81ff7b3412 autoAccept on selectionChange; ok -> apply;
Claus Gittinger <cg@exept.de>
parents: 1698
diff changeset
  1461
         )
4d81ff7b3412 autoAccept on selectionChange; ok -> apply;
Claus Gittinger <cg@exept.de>
parents: 1698
diff changeset
  1462
        nil
4d81ff7b3412 autoAccept on selectionChange; ok -> apply;
Claus Gittinger <cg@exept.de>
parents: 1698
diff changeset
  1463
        nil
564
df1f1e84d94a add menu added
tz
parents: 547
diff changeset
  1464
      )
df1f1e84d94a add menu added
tz
parents: 547
diff changeset
  1465
!
df1f1e84d94a add menu added
tz
parents: 547
diff changeset
  1466
446
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
  1467
menuAlign
743
d58a3e7e39d5 support user defined font styles
tz
parents: 735
diff changeset
  1468
    "This resource specification was automatically generated
d58a3e7e39d5 support user defined font styles
tz
parents: 735
diff changeset
  1469
     by the MenuEditor of ST/X."
d58a3e7e39d5 support user defined font styles
tz
parents: 735
diff changeset
  1470
778
a4b931b2aff6 master widget highlighting changed in the tree list
tz
parents: 774
diff changeset
  1471
    "Do not manually edit this!! If it is corrupted,
743
d58a3e7e39d5 support user defined font styles
tz
parents: 735
diff changeset
  1472
     the MenuEditor may not be able to read the specification."
446
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
  1473
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
  1474
    "
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
  1475
     MenuEditor new openOnClass:UIPainter andSelector:#menuAlign
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
  1476
     (Menu new fromLiteralArrayEncoding:(UIPainter menuAlign)) startUp
217
354ba46948b4 access MenuEditor for specs
ca
parents: 206
diff changeset
  1477
    "
354ba46948b4 access MenuEditor for specs
ca
parents: 206
diff changeset
  1478
354ba46948b4 access MenuEditor for specs
ca
parents: 206
diff changeset
  1479
    <resource: #menu>
354ba46948b4 access MenuEditor for specs
ca
parents: 206
diff changeset
  1480
1862
Claus Gittinger <cg@exept.de>
parents: 1851
diff changeset
  1481
    ^ 
Claus Gittinger <cg@exept.de>
parents: 1851
diff changeset
  1482
     #(Menu
Claus Gittinger <cg@exept.de>
parents: 1851
diff changeset
  1483
        (
Claus Gittinger <cg@exept.de>
parents: 1851
diff changeset
  1484
         (MenuItem
Claus Gittinger <cg@exept.de>
parents: 1851
diff changeset
  1485
            activeHelpKey: alignSelectionLeft
Claus Gittinger <cg@exept.de>
parents: 1851
diff changeset
  1486
            enabled: canMoveOrAlignSelection
Claus Gittinger <cg@exept.de>
parents: 1851
diff changeset
  1487
            label: 'Left'
Claus Gittinger <cg@exept.de>
parents: 1851
diff changeset
  1488
            itemValue: alignSelectionLeft
Claus Gittinger <cg@exept.de>
parents: 1851
diff changeset
  1489
            translateLabel: true
Claus Gittinger <cg@exept.de>
parents: 1851
diff changeset
  1490
            labelImage: (ResourceRetriever UIPainter iconAlignL 'Left')
Claus Gittinger <cg@exept.de>
parents: 1851
diff changeset
  1491
          )
Claus Gittinger <cg@exept.de>
parents: 1851
diff changeset
  1492
         (MenuItem
Claus Gittinger <cg@exept.de>
parents: 1851
diff changeset
  1493
            activeHelpKey: alignSelectionRight
Claus Gittinger <cg@exept.de>
parents: 1851
diff changeset
  1494
            enabled: canMoveOrAlignSelection
Claus Gittinger <cg@exept.de>
parents: 1851
diff changeset
  1495
            label: 'Right'
Claus Gittinger <cg@exept.de>
parents: 1851
diff changeset
  1496
            itemValue: alignSelectionRight
Claus Gittinger <cg@exept.de>
parents: 1851
diff changeset
  1497
            translateLabel: true
Claus Gittinger <cg@exept.de>
parents: 1851
diff changeset
  1498
            labelImage: (ResourceRetriever UIPainter iconAlignR 'Right')
Claus Gittinger <cg@exept.de>
parents: 1851
diff changeset
  1499
          )
Claus Gittinger <cg@exept.de>
parents: 1851
diff changeset
  1500
         (MenuItem
Claus Gittinger <cg@exept.de>
parents: 1851
diff changeset
  1501
            activeHelpKey: alignSelectionLeftAndRight
Claus Gittinger <cg@exept.de>
parents: 1851
diff changeset
  1502
            enabled: canMoveOrAlignSelection
Claus Gittinger <cg@exept.de>
parents: 1851
diff changeset
  1503
            label: 'Left && Right'
Claus Gittinger <cg@exept.de>
parents: 1851
diff changeset
  1504
            itemValue: alignSelectionLeftAndRight
Claus Gittinger <cg@exept.de>
parents: 1851
diff changeset
  1505
            translateLabel: true
Claus Gittinger <cg@exept.de>
parents: 1851
diff changeset
  1506
            labelImage: (ResourceRetriever UIPainter iconAlignLR 'Left & Right')
Claus Gittinger <cg@exept.de>
parents: 1851
diff changeset
  1507
          )
Claus Gittinger <cg@exept.de>
parents: 1851
diff changeset
  1508
         (MenuItem
Claus Gittinger <cg@exept.de>
parents: 1851
diff changeset
  1509
            activeHelpKey: alignSelectionTop
Claus Gittinger <cg@exept.de>
parents: 1851
diff changeset
  1510
            enabled: canMoveOrAlignSelection
Claus Gittinger <cg@exept.de>
parents: 1851
diff changeset
  1511
            label: 'Top'
Claus Gittinger <cg@exept.de>
parents: 1851
diff changeset
  1512
            itemValue: alignSelectionTop
Claus Gittinger <cg@exept.de>
parents: 1851
diff changeset
  1513
            translateLabel: true
Claus Gittinger <cg@exept.de>
parents: 1851
diff changeset
  1514
            labelImage: (ResourceRetriever UIPainter iconAlignT 'Top')
Claus Gittinger <cg@exept.de>
parents: 1851
diff changeset
  1515
          )
Claus Gittinger <cg@exept.de>
parents: 1851
diff changeset
  1516
         (MenuItem
Claus Gittinger <cg@exept.de>
parents: 1851
diff changeset
  1517
            activeHelpKey: alignSelectionBottom
Claus Gittinger <cg@exept.de>
parents: 1851
diff changeset
  1518
            enabled: canMoveOrAlignSelection
Claus Gittinger <cg@exept.de>
parents: 1851
diff changeset
  1519
            label: 'Bottom'
Claus Gittinger <cg@exept.de>
parents: 1851
diff changeset
  1520
            itemValue: alignSelectionBottom
Claus Gittinger <cg@exept.de>
parents: 1851
diff changeset
  1521
            translateLabel: true
Claus Gittinger <cg@exept.de>
parents: 1851
diff changeset
  1522
            labelImage: (ResourceRetriever UIPainter iconAlignB 'Bottom')
Claus Gittinger <cg@exept.de>
parents: 1851
diff changeset
  1523
          )
Claus Gittinger <cg@exept.de>
parents: 1851
diff changeset
  1524
         (MenuItem
Claus Gittinger <cg@exept.de>
parents: 1851
diff changeset
  1525
            activeHelpKey: alignSelectionTopAndBottom
Claus Gittinger <cg@exept.de>
parents: 1851
diff changeset
  1526
            enabled: canMoveOrAlignSelection
Claus Gittinger <cg@exept.de>
parents: 1851
diff changeset
  1527
            label: 'Top && Bottom'
Claus Gittinger <cg@exept.de>
parents: 1851
diff changeset
  1528
            itemValue: alignSelectionTopAndBottom
Claus Gittinger <cg@exept.de>
parents: 1851
diff changeset
  1529
            translateLabel: true
Claus Gittinger <cg@exept.de>
parents: 1851
diff changeset
  1530
            labelImage: (ResourceRetriever UIPainter iconAlignTB 'Top & Bottom')
Claus Gittinger <cg@exept.de>
parents: 1851
diff changeset
  1531
          )
Claus Gittinger <cg@exept.de>
parents: 1851
diff changeset
  1532
         (MenuItem
Claus Gittinger <cg@exept.de>
parents: 1851
diff changeset
  1533
            label: '-'
Claus Gittinger <cg@exept.de>
parents: 1851
diff changeset
  1534
          )
Claus Gittinger <cg@exept.de>
parents: 1851
diff changeset
  1535
         (MenuItem
Claus Gittinger <cg@exept.de>
parents: 1851
diff changeset
  1536
            activeHelpKey: alignSelectionCenterHor
Claus Gittinger <cg@exept.de>
parents: 1851
diff changeset
  1537
            enabled: canMoveOrAlignSelection
Claus Gittinger <cg@exept.de>
parents: 1851
diff changeset
  1538
            label: 'Center Horizontal'
Claus Gittinger <cg@exept.de>
parents: 1851
diff changeset
  1539
            itemValue: alignSelectionCenterHor
Claus Gittinger <cg@exept.de>
parents: 1851
diff changeset
  1540
            translateLabel: true
Claus Gittinger <cg@exept.de>
parents: 1851
diff changeset
  1541
            labelImage: (ResourceRetriever UIPainter iconCenterH '')
Claus Gittinger <cg@exept.de>
parents: 1851
diff changeset
  1542
          )
Claus Gittinger <cg@exept.de>
parents: 1851
diff changeset
  1543
         (MenuItem
Claus Gittinger <cg@exept.de>
parents: 1851
diff changeset
  1544
            activeHelpKey: centerSelectionHor
Claus Gittinger <cg@exept.de>
parents: 1851
diff changeset
  1545
            enabled: canMoveOrAlignSelection
Claus Gittinger <cg@exept.de>
parents: 1851
diff changeset
  1546
            label: 'Center Horizontal in Frame'
Claus Gittinger <cg@exept.de>
parents: 1851
diff changeset
  1547
            itemValue: centerSelectionHor
Claus Gittinger <cg@exept.de>
parents: 1851
diff changeset
  1548
            translateLabel: true
Claus Gittinger <cg@exept.de>
parents: 1851
diff changeset
  1549
            labelImage: (ResourceRetriever UIPainter iconCenterHInFrame '')
Claus Gittinger <cg@exept.de>
parents: 1851
diff changeset
  1550
          )
Claus Gittinger <cg@exept.de>
parents: 1851
diff changeset
  1551
         (MenuItem
Claus Gittinger <cg@exept.de>
parents: 1851
diff changeset
  1552
            activeHelpKey: alignSelectionCenterVer
Claus Gittinger <cg@exept.de>
parents: 1851
diff changeset
  1553
            enabled: canMoveOrAlignSelection
Claus Gittinger <cg@exept.de>
parents: 1851
diff changeset
  1554
            label: 'Center Vertical'
Claus Gittinger <cg@exept.de>
parents: 1851
diff changeset
  1555
            itemValue: alignSelectionCenterVer
Claus Gittinger <cg@exept.de>
parents: 1851
diff changeset
  1556
            translateLabel: true
Claus Gittinger <cg@exept.de>
parents: 1851
diff changeset
  1557
            labelImage: (ResourceRetriever UIPainter iconCenterV '')
Claus Gittinger <cg@exept.de>
parents: 1851
diff changeset
  1558
          )
Claus Gittinger <cg@exept.de>
parents: 1851
diff changeset
  1559
         (MenuItem
Claus Gittinger <cg@exept.de>
parents: 1851
diff changeset
  1560
            activeHelpKey: centerSelectionVer
Claus Gittinger <cg@exept.de>
parents: 1851
diff changeset
  1561
            enabled: canMoveOrAlignSelection
Claus Gittinger <cg@exept.de>
parents: 1851
diff changeset
  1562
            label: 'Center Vertical in Frame'
Claus Gittinger <cg@exept.de>
parents: 1851
diff changeset
  1563
            itemValue: centerSelectionVer
Claus Gittinger <cg@exept.de>
parents: 1851
diff changeset
  1564
            translateLabel: true
Claus Gittinger <cg@exept.de>
parents: 1851
diff changeset
  1565
            labelImage: (ResourceRetriever UIPainter iconCenterVInFrame '')
Claus Gittinger <cg@exept.de>
parents: 1851
diff changeset
  1566
          )
Claus Gittinger <cg@exept.de>
parents: 1851
diff changeset
  1567
         (MenuItem
Claus Gittinger <cg@exept.de>
parents: 1851
diff changeset
  1568
            label: '-'
Claus Gittinger <cg@exept.de>
parents: 1851
diff changeset
  1569
          )
Claus Gittinger <cg@exept.de>
parents: 1851
diff changeset
  1570
         (MenuItem
Claus Gittinger <cg@exept.de>
parents: 1851
diff changeset
  1571
            activeHelpKey: spreadSelectionHor
Claus Gittinger <cg@exept.de>
parents: 1851
diff changeset
  1572
            enabled: canMoveOrAlignSelection
Claus Gittinger <cg@exept.de>
parents: 1851
diff changeset
  1573
            label: 'Distribute Horizontal'
Claus Gittinger <cg@exept.de>
parents: 1851
diff changeset
  1574
            itemValue: spreadSelectionHor
Claus Gittinger <cg@exept.de>
parents: 1851
diff changeset
  1575
            translateLabel: true
Claus Gittinger <cg@exept.de>
parents: 1851
diff changeset
  1576
            labelImage: (ResourceRetriever UIPainter iconDistributeH '')
Claus Gittinger <cg@exept.de>
parents: 1851
diff changeset
  1577
          )
Claus Gittinger <cg@exept.de>
parents: 1851
diff changeset
  1578
         (MenuItem
Claus Gittinger <cg@exept.de>
parents: 1851
diff changeset
  1579
            activeHelpKey: spreadSelectionVer
Claus Gittinger <cg@exept.de>
parents: 1851
diff changeset
  1580
            enabled: canMoveOrAlignSelection
Claus Gittinger <cg@exept.de>
parents: 1851
diff changeset
  1581
            label: 'Distribute Vertical'
Claus Gittinger <cg@exept.de>
parents: 1851
diff changeset
  1582
            itemValue: spreadSelectionVer
Claus Gittinger <cg@exept.de>
parents: 1851
diff changeset
  1583
            translateLabel: true
Claus Gittinger <cg@exept.de>
parents: 1851
diff changeset
  1584
            labelImage: (ResourceRetriever UIPainter iconDistributeV '')
Claus Gittinger <cg@exept.de>
parents: 1851
diff changeset
  1585
          )
Claus Gittinger <cg@exept.de>
parents: 1851
diff changeset
  1586
         )
Claus Gittinger <cg@exept.de>
parents: 1851
diff changeset
  1587
        nil
Claus Gittinger <cg@exept.de>
parents: 1851
diff changeset
  1588
        nil
446
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
  1589
      )
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
  1590
!
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
  1591
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
  1592
menuEdit
743
d58a3e7e39d5 support user defined font styles
tz
parents: 735
diff changeset
  1593
    "This resource specification was automatically generated
d58a3e7e39d5 support user defined font styles
tz
parents: 735
diff changeset
  1594
     by the MenuEditor of ST/X."
d58a3e7e39d5 support user defined font styles
tz
parents: 735
diff changeset
  1595
755
cfbbec0a33c6 some cleans for grid, etc.
tz
parents: 743
diff changeset
  1596
    "Do not manually edit this!! If it is corrupted,
743
d58a3e7e39d5 support user defined font styles
tz
parents: 735
diff changeset
  1597
     the MenuEditor may not be able to read the specification."
446
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
  1598
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
  1599
    "
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
  1600
     MenuEditor new openOnClass:UIPainter andSelector:#menuEdit
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
  1601
     (Menu new fromLiteralArrayEncoding:(UIPainter menuEdit)) startUp
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
  1602
    "
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
  1603
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
  1604
    <resource: #menu>
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
  1605
1827
691d1471cd3e WOs changes
werner
parents: 1820
diff changeset
  1606
    ^ 
691d1471cd3e WOs changes
werner
parents: 1820
diff changeset
  1607
     #(Menu
691d1471cd3e WOs changes
werner
parents: 1820
diff changeset
  1608
        (
691d1471cd3e WOs changes
werner
parents: 1820
diff changeset
  1609
         (MenuItem
691d1471cd3e WOs changes
werner
parents: 1820
diff changeset
  1610
            activeHelpKey: editUndo
691d1471cd3e WOs changes
werner
parents: 1820
diff changeset
  1611
            enabled: hasUndoHistory
691d1471cd3e WOs changes
werner
parents: 1820
diff changeset
  1612
            label: 'Undo'
691d1471cd3e WOs changes
werner
parents: 1820
diff changeset
  1613
            itemValue: undoLast
691d1471cd3e WOs changes
werner
parents: 1820
diff changeset
  1614
            nameKey: undo
691d1471cd3e WOs changes
werner
parents: 1820
diff changeset
  1615
            translateLabel: true
691d1471cd3e WOs changes
werner
parents: 1820
diff changeset
  1616
          )
691d1471cd3e WOs changes
werner
parents: 1820
diff changeset
  1617
         (MenuItem
691d1471cd3e WOs changes
werner
parents: 1820
diff changeset
  1618
            label: '-'
691d1471cd3e WOs changes
werner
parents: 1820
diff changeset
  1619
          )
691d1471cd3e WOs changes
werner
parents: 1820
diff changeset
  1620
         (MenuItem
691d1471cd3e WOs changes
werner
parents: 1820
diff changeset
  1621
            activeHelpKey: editCut
1991
feaad07cb3cf valueOf* methods renamed
Claus Gittinger <cg@exept.de>
parents: 1983
diff changeset
  1622
            enabled: canCutHolder
1827
691d1471cd3e WOs changes
werner
parents: 1820
diff changeset
  1623
            label: 'Cut'
691d1471cd3e WOs changes
werner
parents: 1820
diff changeset
  1624
            itemValue: deleteSelection
691d1471cd3e WOs changes
werner
parents: 1820
diff changeset
  1625
            translateLabel: true
691d1471cd3e WOs changes
werner
parents: 1820
diff changeset
  1626
          )
691d1471cd3e WOs changes
werner
parents: 1820
diff changeset
  1627
         (MenuItem
691d1471cd3e WOs changes
werner
parents: 1820
diff changeset
  1628
            activeHelpKey: editCopy
1991
feaad07cb3cf valueOf* methods renamed
Claus Gittinger <cg@exept.de>
parents: 1983
diff changeset
  1629
            enabled: canCopyHolder
1827
691d1471cd3e WOs changes
werner
parents: 1820
diff changeset
  1630
            label: 'Copy'
691d1471cd3e WOs changes
werner
parents: 1820
diff changeset
  1631
            itemValue: copySelection
691d1471cd3e WOs changes
werner
parents: 1820
diff changeset
  1632
            translateLabel: true
691d1471cd3e WOs changes
werner
parents: 1820
diff changeset
  1633
          )
691d1471cd3e WOs changes
werner
parents: 1820
diff changeset
  1634
         (MenuItem
691d1471cd3e WOs changes
werner
parents: 1820
diff changeset
  1635
            activeHelpKey: pasteBuffer
1991
feaad07cb3cf valueOf* methods renamed
Claus Gittinger <cg@exept.de>
parents: 1983
diff changeset
  1636
            enabled: canPasteHolder
1827
691d1471cd3e WOs changes
werner
parents: 1820
diff changeset
  1637
            label: 'Paste'
691d1471cd3e WOs changes
werner
parents: 1820
diff changeset
  1638
            itemValue: pasteBuffer
691d1471cd3e WOs changes
werner
parents: 1820
diff changeset
  1639
            translateLabel: true
691d1471cd3e WOs changes
werner
parents: 1820
diff changeset
  1640
          )
691d1471cd3e WOs changes
werner
parents: 1820
diff changeset
  1641
         (MenuItem
691d1471cd3e WOs changes
werner
parents: 1820
diff changeset
  1642
            activeHelpKey: pasteWithLayout
1991
feaad07cb3cf valueOf* methods renamed
Claus Gittinger <cg@exept.de>
parents: 1983
diff changeset
  1643
            enabled: canPasteKeepingLayoutHolder
1827
691d1471cd3e WOs changes
werner
parents: 1820
diff changeset
  1644
            label: 'Paste with Layout'
691d1471cd3e WOs changes
werner
parents: 1820
diff changeset
  1645
            itemValue: pasteWithLayout
691d1471cd3e WOs changes
werner
parents: 1820
diff changeset
  1646
            translateLabel: true
691d1471cd3e WOs changes
werner
parents: 1820
diff changeset
  1647
          )
691d1471cd3e WOs changes
werner
parents: 1820
diff changeset
  1648
         (MenuItem
691d1471cd3e WOs changes
werner
parents: 1820
diff changeset
  1649
            activeHelpKey: editPaste
1991
feaad07cb3cf valueOf* methods renamed
Claus Gittinger <cg@exept.de>
parents: 1983
diff changeset
  1650
            enabled: canPasteKeepingLayoutHolder
1827
691d1471cd3e WOs changes
werner
parents: 1820
diff changeset
  1651
            label: 'Paste Keeping Absolute Position'
691d1471cd3e WOs changes
werner
parents: 1820
diff changeset
  1652
            itemValue: pasteKeepingPosition
691d1471cd3e WOs changes
werner
parents: 1820
diff changeset
  1653
            translateLabel: true
691d1471cd3e WOs changes
werner
parents: 1820
diff changeset
  1654
          )
691d1471cd3e WOs changes
werner
parents: 1820
diff changeset
  1655
         (MenuItem
1940
0f9be199d1c5 +replace widget
Claus Gittinger <cg@exept.de>
parents: 1917
diff changeset
  1656
            activeHelpKey: editDelete
1991
feaad07cb3cf valueOf* methods renamed
Claus Gittinger <cg@exept.de>
parents: 1983
diff changeset
  1657
            enabled: canCutHolder
1940
0f9be199d1c5 +replace widget
Claus Gittinger <cg@exept.de>
parents: 1917
diff changeset
  1658
            label: 'Delete'
0f9be199d1c5 +replace widget
Claus Gittinger <cg@exept.de>
parents: 1917
diff changeset
  1659
            itemValue: deleteTotalSelection
0f9be199d1c5 +replace widget
Claus Gittinger <cg@exept.de>
parents: 1917
diff changeset
  1660
            translateLabel: true
0f9be199d1c5 +replace widget
Claus Gittinger <cg@exept.de>
parents: 1917
diff changeset
  1661
          )
0f9be199d1c5 +replace widget
Claus Gittinger <cg@exept.de>
parents: 1917
diff changeset
  1662
         (MenuItem
2023
7a37b7c85092 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2012
diff changeset
  1663
            activeHelpKey: moveWidgetUp
7a37b7c85092 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2012
diff changeset
  1664
            enabled: canReplaceSelection
7a37b7c85092 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2012
diff changeset
  1665
            label: 'Replace...'
7a37b7c85092 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2012
diff changeset
  1666
            itemValue: doAskAndReplaceWidgetBy
1940
0f9be199d1c5 +replace widget
Claus Gittinger <cg@exept.de>
parents: 1917
diff changeset
  1667
            translateLabel: true
0f9be199d1c5 +replace widget
Claus Gittinger <cg@exept.de>
parents: 1917
diff changeset
  1668
          )
0f9be199d1c5 +replace widget
Claus Gittinger <cg@exept.de>
parents: 1917
diff changeset
  1669
         (MenuItem
1827
691d1471cd3e WOs changes
werner
parents: 1820
diff changeset
  1670
            label: '-'
691d1471cd3e WOs changes
werner
parents: 1820
diff changeset
  1671
          )
691d1471cd3e WOs changes
werner
parents: 1820
diff changeset
  1672
         (MenuItem
691d1471cd3e WOs changes
werner
parents: 1820
diff changeset
  1673
            enabled: canMoveSelection
691d1471cd3e WOs changes
werner
parents: 1820
diff changeset
  1674
            label: 'Move'
691d1471cd3e WOs changes
werner
parents: 1820
diff changeset
  1675
            translateLabel: true
691d1471cd3e WOs changes
werner
parents: 1820
diff changeset
  1676
            submenuChannel: menuMove
691d1471cd3e WOs changes
werner
parents: 1820
diff changeset
  1677
          )
691d1471cd3e WOs changes
werner
parents: 1820
diff changeset
  1678
         (MenuItem
691d1471cd3e WOs changes
werner
parents: 1820
diff changeset
  1679
            enabled: hasSelection
691d1471cd3e WOs changes
werner
parents: 1820
diff changeset
  1680
            label: 'Dimension'
691d1471cd3e WOs changes
werner
parents: 1820
diff changeset
  1681
            translateLabel: true
691d1471cd3e WOs changes
werner
parents: 1820
diff changeset
  1682
            submenu: 
691d1471cd3e WOs changes
werner
parents: 1820
diff changeset
  1683
           (Menu
691d1471cd3e WOs changes
werner
parents: 1820
diff changeset
  1684
              (
691d1471cd3e WOs changes
werner
parents: 1820
diff changeset
  1685
               (MenuItem
691d1471cd3e WOs changes
werner
parents: 1820
diff changeset
  1686
                  activeHelpKey: editDimensionDefaultExtent
691d1471cd3e WOs changes
werner
parents: 1820
diff changeset
  1687
                  enabled: canMoveOrAlignSelection
691d1471cd3e WOs changes
werner
parents: 1820
diff changeset
  1688
                  label: 'Default Extent'
691d1471cd3e WOs changes
werner
parents: 1820
diff changeset
  1689
                  itemValue: setToDefaultExtent
691d1471cd3e WOs changes
werner
parents: 1820
diff changeset
  1690
                  translateLabel: true
691d1471cd3e WOs changes
werner
parents: 1820
diff changeset
  1691
                )
691d1471cd3e WOs changes
werner
parents: 1820
diff changeset
  1692
               (MenuItem
691d1471cd3e WOs changes
werner
parents: 1820
diff changeset
  1693
                  activeHelpKey: editDimensionDefaultWidth
691d1471cd3e WOs changes
werner
parents: 1820
diff changeset
  1694
                  enabled: canMoveOrAlignSelection
691d1471cd3e WOs changes
werner
parents: 1820
diff changeset
  1695
                  label: 'Default Width'
691d1471cd3e WOs changes
werner
parents: 1820
diff changeset
  1696
                  itemValue: setToDefaultWidth
691d1471cd3e WOs changes
werner
parents: 1820
diff changeset
  1697
                  translateLabel: true
691d1471cd3e WOs changes
werner
parents: 1820
diff changeset
  1698
                )
691d1471cd3e WOs changes
werner
parents: 1820
diff changeset
  1699
               (MenuItem
691d1471cd3e WOs changes
werner
parents: 1820
diff changeset
  1700
                  activeHelpKey: editDimensionDefaultHeight
691d1471cd3e WOs changes
werner
parents: 1820
diff changeset
  1701
                  enabled: canMoveOrAlignSelection
691d1471cd3e WOs changes
werner
parents: 1820
diff changeset
  1702
                  label: 'Default Height'
691d1471cd3e WOs changes
werner
parents: 1820
diff changeset
  1703
                  itemValue: setToDefaultHeight
691d1471cd3e WOs changes
werner
parents: 1820
diff changeset
  1704
                  translateLabel: true
691d1471cd3e WOs changes
werner
parents: 1820
diff changeset
  1705
                )
691d1471cd3e WOs changes
werner
parents: 1820
diff changeset
  1706
               (MenuItem
691d1471cd3e WOs changes
werner
parents: 1820
diff changeset
  1707
                  label: '-'
691d1471cd3e WOs changes
werner
parents: 1820
diff changeset
  1708
                )
691d1471cd3e WOs changes
werner
parents: 1820
diff changeset
  1709
               (MenuItem
691d1471cd3e WOs changes
werner
parents: 1820
diff changeset
  1710
                  activeHelpKey: editDimensionCopyLayout
691d1471cd3e WOs changes
werner
parents: 1820
diff changeset
  1711
                  enabled: hasSingleSelection
691d1471cd3e WOs changes
werner
parents: 1820
diff changeset
  1712
                  label: 'Copy Layout'
691d1471cd3e WOs changes
werner
parents: 1820
diff changeset
  1713
                  itemValue: copyLayout
691d1471cd3e WOs changes
werner
parents: 1820
diff changeset
  1714
                  translateLabel: true
691d1471cd3e WOs changes
werner
parents: 1820
diff changeset
  1715
                )
691d1471cd3e WOs changes
werner
parents: 1820
diff changeset
  1716
               (MenuItem
691d1471cd3e WOs changes
werner
parents: 1820
diff changeset
  1717
                  activeHelpKey: editDimensionPasteLayout
691d1471cd3e WOs changes
werner
parents: 1820
diff changeset
  1718
                  enabled: canMoveOrAlignSelection
691d1471cd3e WOs changes
werner
parents: 1820
diff changeset
  1719
                  label: 'Paste Layout'
691d1471cd3e WOs changes
werner
parents: 1820
diff changeset
  1720
                  itemValue: pasteLayout
691d1471cd3e WOs changes
werner
parents: 1820
diff changeset
  1721
                  translateLabel: true
691d1471cd3e WOs changes
werner
parents: 1820
diff changeset
  1722
                )
691d1471cd3e WOs changes
werner
parents: 1820
diff changeset
  1723
               (MenuItem
691d1471cd3e WOs changes
werner
parents: 1820
diff changeset
  1724
                  activeHelpKey: editDimensionExchangeLayouts
691d1471cd3e WOs changes
werner
parents: 1820
diff changeset
  1725
                  enabled: canExchangeSelectionLayouts
691d1471cd3e WOs changes
werner
parents: 1820
diff changeset
  1726
                  label: 'Exchange Layouts'
691d1471cd3e WOs changes
werner
parents: 1820
diff changeset
  1727
                  itemValue: exchangeLayouts
691d1471cd3e WOs changes
werner
parents: 1820
diff changeset
  1728
                  translateLabel: true
691d1471cd3e WOs changes
werner
parents: 1820
diff changeset
  1729
                )
691d1471cd3e WOs changes
werner
parents: 1820
diff changeset
  1730
               (MenuItem
691d1471cd3e WOs changes
werner
parents: 1820
diff changeset
  1731
                  label: '-'
691d1471cd3e WOs changes
werner
parents: 1820
diff changeset
  1732
                )
691d1471cd3e WOs changes
werner
parents: 1820
diff changeset
  1733
               (MenuItem
691d1471cd3e WOs changes
werner
parents: 1820
diff changeset
  1734
                  activeHelpKey: editDimensionCopyExtent
691d1471cd3e WOs changes
werner
parents: 1820
diff changeset
  1735
                  enabled: hasSingleSelection
691d1471cd3e WOs changes
werner
parents: 1820
diff changeset
  1736
                  label: 'Copy Extent'
691d1471cd3e WOs changes
werner
parents: 1820
diff changeset
  1737
                  itemValue: copyExtent
691d1471cd3e WOs changes
werner
parents: 1820
diff changeset
  1738
                  translateLabel: true
691d1471cd3e WOs changes
werner
parents: 1820
diff changeset
  1739
                )
691d1471cd3e WOs changes
werner
parents: 1820
diff changeset
  1740
               (MenuItem
691d1471cd3e WOs changes
werner
parents: 1820
diff changeset
  1741
                  activeHelpKey: editDimensionPasteExtent
691d1471cd3e WOs changes
werner
parents: 1820
diff changeset
  1742
                  enabled: canMoveOrAlignSelection
691d1471cd3e WOs changes
werner
parents: 1820
diff changeset
  1743
                  label: 'Paste Extent'
691d1471cd3e WOs changes
werner
parents: 1820
diff changeset
  1744
                  itemValue: pasteExtent
691d1471cd3e WOs changes
werner
parents: 1820
diff changeset
  1745
                  translateLabel: true
691d1471cd3e WOs changes
werner
parents: 1820
diff changeset
  1746
                )
691d1471cd3e WOs changes
werner
parents: 1820
diff changeset
  1747
               (MenuItem
691d1471cd3e WOs changes
werner
parents: 1820
diff changeset
  1748
                  activeHelpKey: editDimensionPasteWidth
691d1471cd3e WOs changes
werner
parents: 1820
diff changeset
  1749
                  enabled: canMoveOrAlignSelection
691d1471cd3e WOs changes
werner
parents: 1820
diff changeset
  1750
                  label: 'Paste Width'
691d1471cd3e WOs changes
werner
parents: 1820
diff changeset
  1751
                  itemValue: pasteWidth
691d1471cd3e WOs changes
werner
parents: 1820
diff changeset
  1752
                  translateLabel: true
691d1471cd3e WOs changes
werner
parents: 1820
diff changeset
  1753
                )
691d1471cd3e WOs changes
werner
parents: 1820
diff changeset
  1754
               (MenuItem
691d1471cd3e WOs changes
werner
parents: 1820
diff changeset
  1755
                  activeHelpKey: editDimensionPasteHeight
691d1471cd3e WOs changes
werner
parents: 1820
diff changeset
  1756
                  enabled: canMoveOrAlignSelection
691d1471cd3e WOs changes
werner
parents: 1820
diff changeset
  1757
                  label: 'Paste Height'
691d1471cd3e WOs changes
werner
parents: 1820
diff changeset
  1758
                  itemValue: pasteHeight
691d1471cd3e WOs changes
werner
parents: 1820
diff changeset
  1759
                  translateLabel: true
691d1471cd3e WOs changes
werner
parents: 1820
diff changeset
  1760
                )
691d1471cd3e WOs changes
werner
parents: 1820
diff changeset
  1761
               )
691d1471cd3e WOs changes
werner
parents: 1820
diff changeset
  1762
              nil
691d1471cd3e WOs changes
werner
parents: 1820
diff changeset
  1763
              nil
1230
23e5d0c133e8 added exchangeLayouts function
Claus Gittinger <cg@exept.de>
parents: 1211
diff changeset
  1764
            )
1827
691d1471cd3e WOs changes
werner
parents: 1820
diff changeset
  1765
          )
691d1471cd3e WOs changes
werner
parents: 1820
diff changeset
  1766
         (MenuItem
691d1471cd3e WOs changes
werner
parents: 1820
diff changeset
  1767
            label: '-'
691d1471cd3e WOs changes
werner
parents: 1820
diff changeset
  1768
          )
691d1471cd3e WOs changes
werner
parents: 1820
diff changeset
  1769
         (MenuItem
691d1471cd3e WOs changes
werner
parents: 1820
diff changeset
  1770
            activeHelpKey: editOpenSpecDocumentation
691d1471cd3e WOs changes
werner
parents: 1820
diff changeset
  1771
            label: 'Open Widget Documentation'
691d1471cd3e WOs changes
werner
parents: 1820
diff changeset
  1772
            itemValue: doOpenWidgetDocumentation
691d1471cd3e WOs changes
werner
parents: 1820
diff changeset
  1773
            translateLabel: true
691d1471cd3e WOs changes
werner
parents: 1820
diff changeset
  1774
          )
691d1471cd3e WOs changes
werner
parents: 1820
diff changeset
  1775
         (MenuItem
691d1471cd3e WOs changes
werner
parents: 1820
diff changeset
  1776
            activeHelpKey: referToCOnfigDatabase
691d1471cd3e WOs changes
werner
parents: 1820
diff changeset
  1777
            label: 'Refer to Config Database'
691d1471cd3e WOs changes
werner
parents: 1820
diff changeset
  1778
            itemValue: configSelection
691d1471cd3e WOs changes
werner
parents: 1820
diff changeset
  1779
            translateLabel: true
691d1471cd3e WOs changes
werner
parents: 1820
diff changeset
  1780
            isVisible: false
691d1471cd3e WOs changes
werner
parents: 1820
diff changeset
  1781
          )
691d1471cd3e WOs changes
werner
parents: 1820
diff changeset
  1782
         (MenuItem
691d1471cd3e WOs changes
werner
parents: 1820
diff changeset
  1783
            label: '-'
691d1471cd3e WOs changes
werner
parents: 1820
diff changeset
  1784
            isVisible: false
691d1471cd3e WOs changes
werner
parents: 1820
diff changeset
  1785
          )
691d1471cd3e WOs changes
werner
parents: 1820
diff changeset
  1786
         (MenuItem
691d1471cd3e WOs changes
werner
parents: 1820
diff changeset
  1787
            activeHelpKey: drawEdit
691d1471cd3e WOs changes
werner
parents: 1820
diff changeset
  1788
            label: 'Draw Edit'
691d1471cd3e WOs changes
werner
parents: 1820
diff changeset
  1789
            itemValue: shapeEdit
691d1471cd3e WOs changes
werner
parents: 1820
diff changeset
  1790
            translateLabel: true
691d1471cd3e WOs changes
werner
parents: 1820
diff changeset
  1791
            isVisible: false
691d1471cd3e WOs changes
werner
parents: 1820
diff changeset
  1792
          )
691d1471cd3e WOs changes
werner
parents: 1820
diff changeset
  1793
         (MenuItem
691d1471cd3e WOs changes
werner
parents: 1820
diff changeset
  1794
            label: '-'
691d1471cd3e WOs changes
werner
parents: 1820
diff changeset
  1795
          )
691d1471cd3e WOs changes
werner
parents: 1820
diff changeset
  1796
         (MenuItem
691d1471cd3e WOs changes
werner
parents: 1820
diff changeset
  1797
            activeHelpKey: group
691d1471cd3e WOs changes
werner
parents: 1820
diff changeset
  1798
            enabled: enGroup
691d1471cd3e WOs changes
werner
parents: 1820
diff changeset
  1799
            label: 'Group'
691d1471cd3e WOs changes
werner
parents: 1820
diff changeset
  1800
            itemValue: group
691d1471cd3e WOs changes
werner
parents: 1820
diff changeset
  1801
            translateLabel: true
691d1471cd3e WOs changes
werner
parents: 1820
diff changeset
  1802
          )
691d1471cd3e WOs changes
werner
parents: 1820
diff changeset
  1803
         (MenuItem
691d1471cd3e WOs changes
werner
parents: 1820
diff changeset
  1804
            activeHelpKey: groupWithLayout
691d1471cd3e WOs changes
werner
parents: 1820
diff changeset
  1805
            enabled: enGroup
691d1471cd3e WOs changes
werner
parents: 1820
diff changeset
  1806
            label: 'Group with Layout'
691d1471cd3e WOs changes
werner
parents: 1820
diff changeset
  1807
            itemValue: groupWithLayout
691d1471cd3e WOs changes
werner
parents: 1820
diff changeset
  1808
            translateLabel: true
691d1471cd3e WOs changes
werner
parents: 1820
diff changeset
  1809
          )
691d1471cd3e WOs changes
werner
parents: 1820
diff changeset
  1810
         (MenuItem
691d1471cd3e WOs changes
werner
parents: 1820
diff changeset
  1811
            activeHelpKey: ungroup
691d1471cd3e WOs changes
werner
parents: 1820
diff changeset
  1812
            enabled: enUngroup
691d1471cd3e WOs changes
werner
parents: 1820
diff changeset
  1813
            label: 'Ungroup'
691d1471cd3e WOs changes
werner
parents: 1820
diff changeset
  1814
            itemValue: ungroup
691d1471cd3e WOs changes
werner
parents: 1820
diff changeset
  1815
            translateLabel: true
691d1471cd3e WOs changes
werner
parents: 1820
diff changeset
  1816
          )
691d1471cd3e WOs changes
werner
parents: 1820
diff changeset
  1817
         (MenuItem
691d1471cd3e WOs changes
werner
parents: 1820
diff changeset
  1818
            activeHelpKey: ungroupWithLayout
691d1471cd3e WOs changes
werner
parents: 1820
diff changeset
  1819
            enabled: enUngroup
691d1471cd3e WOs changes
werner
parents: 1820
diff changeset
  1820
            label: 'Ungroup with Layout'
691d1471cd3e WOs changes
werner
parents: 1820
diff changeset
  1821
            itemValue: ungroupWithLayout
691d1471cd3e WOs changes
werner
parents: 1820
diff changeset
  1822
            translateLabel: true
691d1471cd3e WOs changes
werner
parents: 1820
diff changeset
  1823
          )
691d1471cd3e WOs changes
werner
parents: 1820
diff changeset
  1824
         (MenuItem
691d1471cd3e WOs changes
werner
parents: 1820
diff changeset
  1825
            label: '-'
691d1471cd3e WOs changes
werner
parents: 1820
diff changeset
  1826
          )
691d1471cd3e WOs changes
werner
parents: 1820
diff changeset
  1827
         (MenuItem
691d1471cd3e WOs changes
werner
parents: 1820
diff changeset
  1828
            activeHelpKey: editBrowseViewClass
691d1471cd3e WOs changes
werner
parents: 1820
diff changeset
  1829
            enabled: hasOneSelectionOtherThanCanvas
691d1471cd3e WOs changes
werner
parents: 1820
diff changeset
  1830
            label: 'Browse Widget Class'
691d1471cd3e WOs changes
werner
parents: 1820
diff changeset
  1831
            itemValue: doBrowseViewClass
691d1471cd3e WOs changes
werner
parents: 1820
diff changeset
  1832
            translateLabel: true
691d1471cd3e WOs changes
werner
parents: 1820
diff changeset
  1833
          )
691d1471cd3e WOs changes
werner
parents: 1820
diff changeset
  1834
         (MenuItem
691d1471cd3e WOs changes
werner
parents: 1820
diff changeset
  1835
            activeHelpKey: editInspectView
691d1471cd3e WOs changes
werner
parents: 1820
diff changeset
  1836
            enabled: hasOneSelectionOtherThanCanvas
691d1471cd3e WOs changes
werner
parents: 1820
diff changeset
  1837
            label: 'Inspect Widget'
691d1471cd3e WOs changes
werner
parents: 1820
diff changeset
  1838
            itemValue: doInspectView
691d1471cd3e WOs changes
werner
parents: 1820
diff changeset
  1839
            translateLabel: true
691d1471cd3e WOs changes
werner
parents: 1820
diff changeset
  1840
          )
691d1471cd3e WOs changes
werner
parents: 1820
diff changeset
  1841
         (MenuItem
691d1471cd3e WOs changes
werner
parents: 1820
diff changeset
  1842
            activeHelpKey: editInspectSpec
691d1471cd3e WOs changes
werner
parents: 1820
diff changeset
  1843
            label: 'Inspect Spec'
691d1471cd3e WOs changes
werner
parents: 1820
diff changeset
  1844
            itemValue: doInspectSpec
691d1471cd3e WOs changes
werner
parents: 1820
diff changeset
  1845
            translateLabel: true
691d1471cd3e WOs changes
werner
parents: 1820
diff changeset
  1846
          )
691d1471cd3e WOs changes
werner
parents: 1820
diff changeset
  1847
         )
691d1471cd3e WOs changes
werner
parents: 1820
diff changeset
  1848
        nil
691d1471cd3e WOs changes
werner
parents: 1820
diff changeset
  1849
        nil
498
43a78c5f806c help texts added
tz
parents: 496
diff changeset
  1850
      )
43a78c5f806c help texts added
tz
parents: 496
diff changeset
  1851
!
43a78c5f806c help texts added
tz
parents: 496
diff changeset
  1852
43a78c5f806c help texts added
tz
parents: 496
diff changeset
  1853
menuMove
743
d58a3e7e39d5 support user defined font styles
tz
parents: 735
diff changeset
  1854
    "This resource specification was automatically generated
d58a3e7e39d5 support user defined font styles
tz
parents: 735
diff changeset
  1855
     by the MenuEditor of ST/X."
d58a3e7e39d5 support user defined font styles
tz
parents: 735
diff changeset
  1856
755
cfbbec0a33c6 some cleans for grid, etc.
tz
parents: 743
diff changeset
  1857
    "Do not manually edit this!! If it is corrupted,
743
d58a3e7e39d5 support user defined font styles
tz
parents: 735
diff changeset
  1858
     the MenuEditor may not be able to read the specification."
498
43a78c5f806c help texts added
tz
parents: 496
diff changeset
  1859
43a78c5f806c help texts added
tz
parents: 496
diff changeset
  1860
    "
43a78c5f806c help texts added
tz
parents: 496
diff changeset
  1861
     MenuEditor new openOnClass:UIPainter andSelector:#menuMove
43a78c5f806c help texts added
tz
parents: 496
diff changeset
  1862
     (Menu new fromLiteralArrayEncoding:(UIPainter menuMove)) startUp
43a78c5f806c help texts added
tz
parents: 496
diff changeset
  1863
    "
43a78c5f806c help texts added
tz
parents: 496
diff changeset
  1864
43a78c5f806c help texts added
tz
parents: 496
diff changeset
  1865
    <resource: #menu>
43a78c5f806c help texts added
tz
parents: 496
diff changeset
  1866
43a78c5f806c help texts added
tz
parents: 496
diff changeset
  1867
    ^
43a78c5f806c help texts added
tz
parents: 496
diff changeset
  1868
     
43a78c5f806c help texts added
tz
parents: 496
diff changeset
  1869
       #(#Menu
43a78c5f806c help texts added
tz
parents: 496
diff changeset
  1870
          
2217
b54632779619 Use class var for SelectionPanel
Stefan Vogel <sv@exept.de>
parents: 2213
diff changeset
  1871
           #(
b54632779619 Use class var for SelectionPanel
Stefan Vogel <sv@exept.de>
parents: 2213
diff changeset
  1872
             #(#MenuItem
b54632779619 Use class var for SelectionPanel
Stefan Vogel <sv@exept.de>
parents: 2213
diff changeset
  1873
                #label: 'Up'
b54632779619 Use class var for SelectionPanel
Stefan Vogel <sv@exept.de>
parents: 2213
diff changeset
  1874
                #translateLabel: true
b54632779619 Use class var for SelectionPanel
Stefan Vogel <sv@exept.de>
parents: 2213
diff changeset
  1875
                #value: #doStepUp
b54632779619 Use class var for SelectionPanel
Stefan Vogel <sv@exept.de>
parents: 2213
diff changeset
  1876
                #activeHelpKey: #moveWidgetUp
b54632779619 Use class var for SelectionPanel
Stefan Vogel <sv@exept.de>
parents: 2213
diff changeset
  1877
                #enabled: #canChangeOrderInContainer
b54632779619 Use class var for SelectionPanel
Stefan Vogel <sv@exept.de>
parents: 2213
diff changeset
  1878
                #labelImage: #(#ResourceRetriever #Icon #upIcon 'Up')
b54632779619 Use class var for SelectionPanel
Stefan Vogel <sv@exept.de>
parents: 2213
diff changeset
  1879
            )
b54632779619 Use class var for SelectionPanel
Stefan Vogel <sv@exept.de>
parents: 2213
diff changeset
  1880
             #(#MenuItem
b54632779619 Use class var for SelectionPanel
Stefan Vogel <sv@exept.de>
parents: 2213
diff changeset
  1881
                #label: 'Down'
b54632779619 Use class var for SelectionPanel
Stefan Vogel <sv@exept.de>
parents: 2213
diff changeset
  1882
                #translateLabel: true
b54632779619 Use class var for SelectionPanel
Stefan Vogel <sv@exept.de>
parents: 2213
diff changeset
  1883
                #value: #doStepDown
b54632779619 Use class var for SelectionPanel
Stefan Vogel <sv@exept.de>
parents: 2213
diff changeset
  1884
                #activeHelpKey: #moveWidgetDown
b54632779619 Use class var for SelectionPanel
Stefan Vogel <sv@exept.de>
parents: 2213
diff changeset
  1885
                #enabled: #canChangeOrderInContainer
b54632779619 Use class var for SelectionPanel
Stefan Vogel <sv@exept.de>
parents: 2213
diff changeset
  1886
                #labelImage: #(#ResourceRetriever #Icon #downIcon 'Down')
b54632779619 Use class var for SelectionPanel
Stefan Vogel <sv@exept.de>
parents: 2213
diff changeset
  1887
            )
b54632779619 Use class var for SelectionPanel
Stefan Vogel <sv@exept.de>
parents: 2213
diff changeset
  1888
             #(#MenuItem
b54632779619 Use class var for SelectionPanel
Stefan Vogel <sv@exept.de>
parents: 2213
diff changeset
  1889
                #label: 'Into'
b54632779619 Use class var for SelectionPanel
Stefan Vogel <sv@exept.de>
parents: 2213
diff changeset
  1890
                #translateLabel: true
b54632779619 Use class var for SelectionPanel
Stefan Vogel <sv@exept.de>
parents: 2213
diff changeset
  1891
                #value: #doStepIn
b54632779619 Use class var for SelectionPanel
Stefan Vogel <sv@exept.de>
parents: 2213
diff changeset
  1892
                #activeHelpKey: #moveWidgetInto
b54632779619 Use class var for SelectionPanel
Stefan Vogel <sv@exept.de>
parents: 2213
diff changeset
  1893
                #enabled: #canMoveSelectionIntoContainer
b54632779619 Use class var for SelectionPanel
Stefan Vogel <sv@exept.de>
parents: 2213
diff changeset
  1894
                #labelImage: #(#ResourceRetriever #Icon #downRightIcon 'Into')
b54632779619 Use class var for SelectionPanel
Stefan Vogel <sv@exept.de>
parents: 2213
diff changeset
  1895
            )
b54632779619 Use class var for SelectionPanel
Stefan Vogel <sv@exept.de>
parents: 2213
diff changeset
  1896
             #(#MenuItem
b54632779619 Use class var for SelectionPanel
Stefan Vogel <sv@exept.de>
parents: 2213
diff changeset
  1897
                #label: 'Out'
b54632779619 Use class var for SelectionPanel
Stefan Vogel <sv@exept.de>
parents: 2213
diff changeset
  1898
                #translateLabel: true
b54632779619 Use class var for SelectionPanel
Stefan Vogel <sv@exept.de>
parents: 2213
diff changeset
  1899
                #value: #doStepOut
b54632779619 Use class var for SelectionPanel
Stefan Vogel <sv@exept.de>
parents: 2213
diff changeset
  1900
                #activeHelpKey: #moveWidgetOut
b54632779619 Use class var for SelectionPanel
Stefan Vogel <sv@exept.de>
parents: 2213
diff changeset
  1901
                #enabled: #canMoveSelectionOutOfContainer
b54632779619 Use class var for SelectionPanel
Stefan Vogel <sv@exept.de>
parents: 2213
diff changeset
  1902
                #labelImage: #(#ResourceRetriever #Icon #leftDownIcon 'Out')
b54632779619 Use class var for SelectionPanel
Stefan Vogel <sv@exept.de>
parents: 2213
diff changeset
  1903
            )
b54632779619 Use class var for SelectionPanel
Stefan Vogel <sv@exept.de>
parents: 2213
diff changeset
  1904
          ) nil
b54632779619 Use class var for SelectionPanel
Stefan Vogel <sv@exept.de>
parents: 2213
diff changeset
  1905
          nil
446
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
  1906
      )
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
  1907
!
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
  1908
1940
0f9be199d1c5 +replace widget
Claus Gittinger <cg@exept.de>
parents: 1917
diff changeset
  1909
menuReplaceWidget
0f9be199d1c5 +replace widget
Claus Gittinger <cg@exept.de>
parents: 1917
diff changeset
  1910
    "This resource specification was automatically generated
0f9be199d1c5 +replace widget
Claus Gittinger <cg@exept.de>
parents: 1917
diff changeset
  1911
     by the MenuEditor of ST/X."
0f9be199d1c5 +replace widget
Claus Gittinger <cg@exept.de>
parents: 1917
diff changeset
  1912
0f9be199d1c5 +replace widget
Claus Gittinger <cg@exept.de>
parents: 1917
diff changeset
  1913
    "Do not manually edit this!! If it is corrupted,
0f9be199d1c5 +replace widget
Claus Gittinger <cg@exept.de>
parents: 1917
diff changeset
  1914
     the MenuEditor may not be able to read the specification."
0f9be199d1c5 +replace widget
Claus Gittinger <cg@exept.de>
parents: 1917
diff changeset
  1915
0f9be199d1c5 +replace widget
Claus Gittinger <cg@exept.de>
parents: 1917
diff changeset
  1916
    "
0f9be199d1c5 +replace widget
Claus Gittinger <cg@exept.de>
parents: 1917
diff changeset
  1917
     MenuEditor new openOnClass:UIPainter andSelector:#menuReplaceWidget
0f9be199d1c5 +replace widget
Claus Gittinger <cg@exept.de>
parents: 1917
diff changeset
  1918
     (Menu new fromLiteralArrayEncoding:(UIPainter menuReplaceWidget)) startUp
0f9be199d1c5 +replace widget
Claus Gittinger <cg@exept.de>
parents: 1917
diff changeset
  1919
    "
0f9be199d1c5 +replace widget
Claus Gittinger <cg@exept.de>
parents: 1917
diff changeset
  1920
0f9be199d1c5 +replace widget
Claus Gittinger <cg@exept.de>
parents: 1917
diff changeset
  1921
    <resource: #menu>
0f9be199d1c5 +replace widget
Claus Gittinger <cg@exept.de>
parents: 1917
diff changeset
  1922
0f9be199d1c5 +replace widget
Claus Gittinger <cg@exept.de>
parents: 1917
diff changeset
  1923
    ^ 
0f9be199d1c5 +replace widget
Claus Gittinger <cg@exept.de>
parents: 1917
diff changeset
  1924
     #(Menu
0f9be199d1c5 +replace widget
Claus Gittinger <cg@exept.de>
parents: 1917
diff changeset
  1925
        (
0f9be199d1c5 +replace widget
Claus Gittinger <cg@exept.de>
parents: 1917
diff changeset
  1926
         (MenuItem
0f9be199d1c5 +replace widget
Claus Gittinger <cg@exept.de>
parents: 1917
diff changeset
  1927
            activeHelpKey: moveWidgetUp
0f9be199d1c5 +replace widget
Claus Gittinger <cg@exept.de>
parents: 1917
diff changeset
  1928
            enabled: canChangeOrderInContainer
0f9be199d1c5 +replace widget
Claus Gittinger <cg@exept.de>
parents: 1917
diff changeset
  1929
            label: 'Replace By...'
0f9be199d1c5 +replace widget
Claus Gittinger <cg@exept.de>
parents: 1917
diff changeset
  1930
            itemValue: doAskAndReplaceWidgetBy
0f9be199d1c5 +replace widget
Claus Gittinger <cg@exept.de>
parents: 1917
diff changeset
  1931
            translateLabel: true
0f9be199d1c5 +replace widget
Claus Gittinger <cg@exept.de>
parents: 1917
diff changeset
  1932
          )
0f9be199d1c5 +replace widget
Claus Gittinger <cg@exept.de>
parents: 1917
diff changeset
  1933
         )
0f9be199d1c5 +replace widget
Claus Gittinger <cg@exept.de>
parents: 1917
diff changeset
  1934
        nil
0f9be199d1c5 +replace widget
Claus Gittinger <cg@exept.de>
parents: 1917
diff changeset
  1935
        nil
0f9be199d1c5 +replace widget
Claus Gittinger <cg@exept.de>
parents: 1917
diff changeset
  1936
      )
0f9be199d1c5 +replace widget
Claus Gittinger <cg@exept.de>
parents: 1917
diff changeset
  1937
!
0f9be199d1c5 +replace widget
Claus Gittinger <cg@exept.de>
parents: 1917
diff changeset
  1938
446
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
  1939
menuToolbar
743
d58a3e7e39d5 support user defined font styles
tz
parents: 735
diff changeset
  1940
    "This resource specification was automatically generated
d58a3e7e39d5 support user defined font styles
tz
parents: 735
diff changeset
  1941
     by the MenuEditor of ST/X."
d58a3e7e39d5 support user defined font styles
tz
parents: 735
diff changeset
  1942
778
a4b931b2aff6 master widget highlighting changed in the tree list
tz
parents: 774
diff changeset
  1943
    "Do not manually edit this!! If it is corrupted,
743
d58a3e7e39d5 support user defined font styles
tz
parents: 735
diff changeset
  1944
     the MenuEditor may not be able to read the specification."
446
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
  1945
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
  1946
    "
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
  1947
     MenuEditor new openOnClass:UIPainter andSelector:#menuToolbar
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
  1948
     (Menu new fromLiteralArrayEncoding:(UIPainter menuToolbar)) startUp
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
  1949
    "
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
  1950
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
  1951
    <resource: #menu>
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
  1952
1690
Claus Gittinger <cg@exept.de>
parents: 1689
diff changeset
  1953
    ^ 
1750
f175cc37a17a toolBar: button image
Claus Gittinger <cg@exept.de>
parents: 1742
diff changeset
  1954
     #(Menu
f175cc37a17a toolBar: button image
Claus Gittinger <cg@exept.de>
parents: 1742
diff changeset
  1955
        (
f175cc37a17a toolBar: button image
Claus Gittinger <cg@exept.de>
parents: 1742
diff changeset
  1956
         (MenuItem
f175cc37a17a toolBar: button image
Claus Gittinger <cg@exept.de>
parents: 1742
diff changeset
  1957
            activeHelpKey: testStartApplication
f175cc37a17a toolBar: button image
Claus Gittinger <cg@exept.de>
parents: 1742
diff changeset
  1958
            label: 'Start'
f175cc37a17a toolBar: button image
Claus Gittinger <cg@exept.de>
parents: 1742
diff changeset
  1959
            itemValue: doStartApplication
f175cc37a17a toolBar: button image
Claus Gittinger <cg@exept.de>
parents: 1742
diff changeset
  1960
            translateLabel: true
f175cc37a17a toolBar: button image
Claus Gittinger <cg@exept.de>
parents: 1742
diff changeset
  1961
            isButton: true
f175cc37a17a toolBar: button image
Claus Gittinger <cg@exept.de>
parents: 1742
diff changeset
  1962
            labelImage: (ResourceRetriever ToolbarIconLibrary start22x22Icon)
1690
Claus Gittinger <cg@exept.de>
parents: 1689
diff changeset
  1963
          )
1750
f175cc37a17a toolBar: button image
Claus Gittinger <cg@exept.de>
parents: 1742
diff changeset
  1964
         (MenuItem
1917
53832fa044f1 undo button
Claus Gittinger <cg@exept.de>
parents: 1883
diff changeset
  1965
            label: '-'
1690
Claus Gittinger <cg@exept.de>
parents: 1689
diff changeset
  1966
          )
1750
f175cc37a17a toolBar: button image
Claus Gittinger <cg@exept.de>
parents: 1742
diff changeset
  1967
         (MenuItem
f175cc37a17a toolBar: button image
Claus Gittinger <cg@exept.de>
parents: 1742
diff changeset
  1968
            activeHelpKey: fileNew
f175cc37a17a toolBar: button image
Claus Gittinger <cg@exept.de>
parents: 1742
diff changeset
  1969
            label: 'New'
f175cc37a17a toolBar: button image
Claus Gittinger <cg@exept.de>
parents: 1742
diff changeset
  1970
            itemValue: doNew
f175cc37a17a toolBar: button image
Claus Gittinger <cg@exept.de>
parents: 1742
diff changeset
  1971
            translateLabel: true
f175cc37a17a toolBar: button image
Claus Gittinger <cg@exept.de>
parents: 1742
diff changeset
  1972
            isButton: true
2023
7a37b7c85092 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2012
diff changeset
  1973
            isVisible: isStandAlone
2198
804e778590fc slightly refactored to allow for more redefinition in a subclass
Claus Gittinger <cg@exept.de>
parents: 2175
diff changeset
  1974
            labelImage: (ResourceRetriever ToolbarIconLibrary newWindowSpecIcon)
1690
Claus Gittinger <cg@exept.de>
parents: 1689
diff changeset
  1975
          )
1750
f175cc37a17a toolBar: button image
Claus Gittinger <cg@exept.de>
parents: 1742
diff changeset
  1976
         (MenuItem
1950
aaf6499564ba *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1940
diff changeset
  1977
            label: '-'
2023
7a37b7c85092 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2012
diff changeset
  1978
            isVisible: isStandAlone
1950
aaf6499564ba *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1940
diff changeset
  1979
          )
aaf6499564ba *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1940
diff changeset
  1980
         (MenuItem
1750
f175cc37a17a toolBar: button image
Claus Gittinger <cg@exept.de>
parents: 1742
diff changeset
  1981
            activeHelpKey: fileLoad
f175cc37a17a toolBar: button image
Claus Gittinger <cg@exept.de>
parents: 1742
diff changeset
  1982
            label: 'Load'
f175cc37a17a toolBar: button image
Claus Gittinger <cg@exept.de>
parents: 1742
diff changeset
  1983
            itemValue: doLoad
f175cc37a17a toolBar: button image
Claus Gittinger <cg@exept.de>
parents: 1742
diff changeset
  1984
            translateLabel: true
f175cc37a17a toolBar: button image
Claus Gittinger <cg@exept.de>
parents: 1742
diff changeset
  1985
            isButton: true
2023
7a37b7c85092 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2012
diff changeset
  1986
            isVisible: isStandAlone
2198
804e778590fc slightly refactored to allow for more redefinition in a subclass
Claus Gittinger <cg@exept.de>
parents: 2175
diff changeset
  1987
            labelImage: (ResourceRetriever ToolbarIconLibrary loadFromMethodIcon)
1690
Claus Gittinger <cg@exept.de>
parents: 1689
diff changeset
  1988
          )
1750
f175cc37a17a toolBar: button image
Claus Gittinger <cg@exept.de>
parents: 1742
diff changeset
  1989
         (MenuItem
f175cc37a17a toolBar: button image
Claus Gittinger <cg@exept.de>
parents: 1742
diff changeset
  1990
            activeHelpKey: fileSave
f175cc37a17a toolBar: button image
Claus Gittinger <cg@exept.de>
parents: 1742
diff changeset
  1991
            label: 'Save'
f175cc37a17a toolBar: button image
Claus Gittinger <cg@exept.de>
parents: 1742
diff changeset
  1992
            itemValue: doSave
f175cc37a17a toolBar: button image
Claus Gittinger <cg@exept.de>
parents: 1742
diff changeset
  1993
            translateLabel: true
f175cc37a17a toolBar: button image
Claus Gittinger <cg@exept.de>
parents: 1742
diff changeset
  1994
            isButton: true
1883
577a267a87cb *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1872
diff changeset
  1995
            labelImage: (ResourceRetriever ToolbarIconLibrary saveAsMethodIcon)
1690
Claus Gittinger <cg@exept.de>
parents: 1689
diff changeset
  1996
          )
1750
f175cc37a17a toolBar: button image
Claus Gittinger <cg@exept.de>
parents: 1742
diff changeset
  1997
         (MenuItem
1917
53832fa044f1 undo button
Claus Gittinger <cg@exept.de>
parents: 1883
diff changeset
  1998
            label: '-'
53832fa044f1 undo button
Claus Gittinger <cg@exept.de>
parents: 1883
diff changeset
  1999
          )
53832fa044f1 undo button
Claus Gittinger <cg@exept.de>
parents: 1883
diff changeset
  2000
         (MenuItem
53832fa044f1 undo button
Claus Gittinger <cg@exept.de>
parents: 1883
diff changeset
  2001
            activeHelpKey: editUndo
53832fa044f1 undo button
Claus Gittinger <cg@exept.de>
parents: 1883
diff changeset
  2002
            enabled: hasUndoHistoryHolder
53832fa044f1 undo button
Claus Gittinger <cg@exept.de>
parents: 1883
diff changeset
  2003
            label: 'Undo'
53832fa044f1 undo button
Claus Gittinger <cg@exept.de>
parents: 1883
diff changeset
  2004
            itemValue: undoLast
53832fa044f1 undo button
Claus Gittinger <cg@exept.de>
parents: 1883
diff changeset
  2005
            translateLabel: true
53832fa044f1 undo button
Claus Gittinger <cg@exept.de>
parents: 1883
diff changeset
  2006
            isButton: true
2198
804e778590fc slightly refactored to allow for more redefinition in a subclass
Claus Gittinger <cg@exept.de>
parents: 2175
diff changeset
  2007
            labelImage: (ResourceRetriever ToolbarIconLibrary undoIcon)
1917
53832fa044f1 undo button
Claus Gittinger <cg@exept.de>
parents: 1883
diff changeset
  2008
          )
53832fa044f1 undo button
Claus Gittinger <cg@exept.de>
parents: 1883
diff changeset
  2009
         (MenuItem
53832fa044f1 undo button
Claus Gittinger <cg@exept.de>
parents: 1883
diff changeset
  2010
            label: '-'
1690
Claus Gittinger <cg@exept.de>
parents: 1689
diff changeset
  2011
          )
1750
f175cc37a17a toolBar: button image
Claus Gittinger <cg@exept.de>
parents: 1742
diff changeset
  2012
         (MenuItem
f175cc37a17a toolBar: button image
Claus Gittinger <cg@exept.de>
parents: 1742
diff changeset
  2013
            activeHelpKey: editCut
1991
feaad07cb3cf valueOf* methods renamed
Claus Gittinger <cg@exept.de>
parents: 1983
diff changeset
  2014
            enabled: canCutHolder
1750
f175cc37a17a toolBar: button image
Claus Gittinger <cg@exept.de>
parents: 1742
diff changeset
  2015
            label: 'Cut'
f175cc37a17a toolBar: button image
Claus Gittinger <cg@exept.de>
parents: 1742
diff changeset
  2016
            itemValue: deleteSelection
f175cc37a17a toolBar: button image
Claus Gittinger <cg@exept.de>
parents: 1742
diff changeset
  2017
            translateLabel: true
f175cc37a17a toolBar: button image
Claus Gittinger <cg@exept.de>
parents: 1742
diff changeset
  2018
            isButton: true
1883
577a267a87cb *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1872
diff changeset
  2019
            labelImage: (ResourceRetriever ToolbarIconLibrary cutWidgetIcon)
1690
Claus Gittinger <cg@exept.de>
parents: 1689
diff changeset
  2020
          )
1750
f175cc37a17a toolBar: button image
Claus Gittinger <cg@exept.de>
parents: 1742
diff changeset
  2021
         (MenuItem
f175cc37a17a toolBar: button image
Claus Gittinger <cg@exept.de>
parents: 1742
diff changeset
  2022
            activeHelpKey: editCopy
1991
feaad07cb3cf valueOf* methods renamed
Claus Gittinger <cg@exept.de>
parents: 1983
diff changeset
  2023
            enabled: canCopyHolder
1750
f175cc37a17a toolBar: button image
Claus Gittinger <cg@exept.de>
parents: 1742
diff changeset
  2024
            label: 'Copy'
f175cc37a17a toolBar: button image
Claus Gittinger <cg@exept.de>
parents: 1742
diff changeset
  2025
            itemValue: copySelection
f175cc37a17a toolBar: button image
Claus Gittinger <cg@exept.de>
parents: 1742
diff changeset
  2026
            translateLabel: true
f175cc37a17a toolBar: button image
Claus Gittinger <cg@exept.de>
parents: 1742
diff changeset
  2027
            isButton: true
1883
577a267a87cb *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1872
diff changeset
  2028
            labelImage: (ResourceRetriever ToolbarIconLibrary copyWidgetIcon)
1690
Claus Gittinger <cg@exept.de>
parents: 1689
diff changeset
  2029
          )
1750
f175cc37a17a toolBar: button image
Claus Gittinger <cg@exept.de>
parents: 1742
diff changeset
  2030
         (MenuItem
f175cc37a17a toolBar: button image
Claus Gittinger <cg@exept.de>
parents: 1742
diff changeset
  2031
            activeHelpKey: editPaste
1991
feaad07cb3cf valueOf* methods renamed
Claus Gittinger <cg@exept.de>
parents: 1983
diff changeset
  2032
            enabled: canPasteKeepingLayoutHolder
1750
f175cc37a17a toolBar: button image
Claus Gittinger <cg@exept.de>
parents: 1742
diff changeset
  2033
            label: 'Paste With Layout'
f175cc37a17a toolBar: button image
Claus Gittinger <cg@exept.de>
parents: 1742
diff changeset
  2034
            itemValue: pasteWithLayout
f175cc37a17a toolBar: button image
Claus Gittinger <cg@exept.de>
parents: 1742
diff changeset
  2035
            translateLabel: true
f175cc37a17a toolBar: button image
Claus Gittinger <cg@exept.de>
parents: 1742
diff changeset
  2036
            isButton: true
1883
577a267a87cb *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1872
diff changeset
  2037
            labelImage: (ResourceRetriever ToolbarIconLibrary pasteWidgetIcon)
1690
Claus Gittinger <cg@exept.de>
parents: 1689
diff changeset
  2038
          )
1750
f175cc37a17a toolBar: button image
Claus Gittinger <cg@exept.de>
parents: 1742
diff changeset
  2039
         (MenuItem
f175cc37a17a toolBar: button image
Claus Gittinger <cg@exept.de>
parents: 1742
diff changeset
  2040
            activeHelpKey: editDelete
1991
feaad07cb3cf valueOf* methods renamed
Claus Gittinger <cg@exept.de>
parents: 1983
diff changeset
  2041
            enabled: canCutHolder
1750
f175cc37a17a toolBar: button image
Claus Gittinger <cg@exept.de>
parents: 1742
diff changeset
  2042
            label: 'Delete'
f175cc37a17a toolBar: button image
Claus Gittinger <cg@exept.de>
parents: 1742
diff changeset
  2043
            itemValue: deleteTotalSelection
f175cc37a17a toolBar: button image
Claus Gittinger <cg@exept.de>
parents: 1742
diff changeset
  2044
            translateLabel: true
f175cc37a17a toolBar: button image
Claus Gittinger <cg@exept.de>
parents: 1742
diff changeset
  2045
            isButton: true
1820
3d834d5e5bb4 toolbar icons & help texts
Claus Gittinger <cg@exept.de>
parents: 1819
diff changeset
  2046
            isVisible: false
1883
577a267a87cb *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1872
diff changeset
  2047
            labelImage: (ResourceRetriever ToolbarIconLibrary deleteWidgetIcon)
1690
Claus Gittinger <cg@exept.de>
parents: 1689
diff changeset
  2048
          )
1750
f175cc37a17a toolBar: button image
Claus Gittinger <cg@exept.de>
parents: 1742
diff changeset
  2049
         (MenuItem
1917
53832fa044f1 undo button
Claus Gittinger <cg@exept.de>
parents: 1883
diff changeset
  2050
            label: '-'
1690
Claus Gittinger <cg@exept.de>
parents: 1689
diff changeset
  2051
          )
1750
f175cc37a17a toolBar: button image
Claus Gittinger <cg@exept.de>
parents: 1742
diff changeset
  2052
         (MenuItem
f175cc37a17a toolBar: button image
Claus Gittinger <cg@exept.de>
parents: 1742
diff changeset
  2053
            activeHelpKey: moveWidgetUp
f175cc37a17a toolBar: button image
Claus Gittinger <cg@exept.de>
parents: 1742
diff changeset
  2054
            enabled: canChangeOrderInContainer
f175cc37a17a toolBar: button image
Claus Gittinger <cg@exept.de>
parents: 1742
diff changeset
  2055
            label: 'Move Up'
f175cc37a17a toolBar: button image
Claus Gittinger <cg@exept.de>
parents: 1742
diff changeset
  2056
            itemValue: doStepUp
f175cc37a17a toolBar: button image
Claus Gittinger <cg@exept.de>
parents: 1742
diff changeset
  2057
            translateLabel: true
f175cc37a17a toolBar: button image
Claus Gittinger <cg@exept.de>
parents: 1742
diff changeset
  2058
            isButton: true
1883
577a267a87cb *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1872
diff changeset
  2059
            labelImage: (ResourceRetriever ToolbarIconLibrary moveWidgetUpIcon)
1690
Claus Gittinger <cg@exept.de>
parents: 1689
diff changeset
  2060
          )
1750
f175cc37a17a toolBar: button image
Claus Gittinger <cg@exept.de>
parents: 1742
diff changeset
  2061
         (MenuItem
f175cc37a17a toolBar: button image
Claus Gittinger <cg@exept.de>
parents: 1742
diff changeset
  2062
            activeHelpKey: moveWidgetDown
f175cc37a17a toolBar: button image
Claus Gittinger <cg@exept.de>
parents: 1742
diff changeset
  2063
            enabled: canChangeOrderInContainer
f175cc37a17a toolBar: button image
Claus Gittinger <cg@exept.de>
parents: 1742
diff changeset
  2064
            label: 'Move Down'
f175cc37a17a toolBar: button image
Claus Gittinger <cg@exept.de>
parents: 1742
diff changeset
  2065
            itemValue: doStepDown
f175cc37a17a toolBar: button image
Claus Gittinger <cg@exept.de>
parents: 1742
diff changeset
  2066
            translateLabel: true
f175cc37a17a toolBar: button image
Claus Gittinger <cg@exept.de>
parents: 1742
diff changeset
  2067
            isButton: true
1883
577a267a87cb *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1872
diff changeset
  2068
            labelImage: (ResourceRetriever ToolbarIconLibrary moveWidgetDownIcon)
1690
Claus Gittinger <cg@exept.de>
parents: 1689
diff changeset
  2069
          )
1750
f175cc37a17a toolBar: button image
Claus Gittinger <cg@exept.de>
parents: 1742
diff changeset
  2070
         (MenuItem
f175cc37a17a toolBar: button image
Claus Gittinger <cg@exept.de>
parents: 1742
diff changeset
  2071
            activeHelpKey: moveWidgetInto
f175cc37a17a toolBar: button image
Claus Gittinger <cg@exept.de>
parents: 1742
diff changeset
  2072
            enabled: canMoveSelectionIntoContainer
f175cc37a17a toolBar: button image
Claus Gittinger <cg@exept.de>
parents: 1742
diff changeset
  2073
            label: 'Move Into'
f175cc37a17a toolBar: button image
Claus Gittinger <cg@exept.de>
parents: 1742
diff changeset
  2074
            itemValue: doStepIn
f175cc37a17a toolBar: button image
Claus Gittinger <cg@exept.de>
parents: 1742
diff changeset
  2075
            translateLabel: true
f175cc37a17a toolBar: button image
Claus Gittinger <cg@exept.de>
parents: 1742
diff changeset
  2076
            isButton: true
1883
577a267a87cb *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1872
diff changeset
  2077
            labelImage: (ResourceRetriever ToolbarIconLibrary moveWidgetDownRightIcon)
1690
Claus Gittinger <cg@exept.de>
parents: 1689
diff changeset
  2078
          )
1750
f175cc37a17a toolBar: button image
Claus Gittinger <cg@exept.de>
parents: 1742
diff changeset
  2079
         (MenuItem
f175cc37a17a toolBar: button image
Claus Gittinger <cg@exept.de>
parents: 1742
diff changeset
  2080
            activeHelpKey: moveWidgetOut
f175cc37a17a toolBar: button image
Claus Gittinger <cg@exept.de>
parents: 1742
diff changeset
  2081
            enabled: canMoveSelectionOutOfContainer
f175cc37a17a toolBar: button image
Claus Gittinger <cg@exept.de>
parents: 1742
diff changeset
  2082
            label: 'Move Out'
f175cc37a17a toolBar: button image
Claus Gittinger <cg@exept.de>
parents: 1742
diff changeset
  2083
            itemValue: doStepOut
f175cc37a17a toolBar: button image
Claus Gittinger <cg@exept.de>
parents: 1742
diff changeset
  2084
            translateLabel: true
f175cc37a17a toolBar: button image
Claus Gittinger <cg@exept.de>
parents: 1742
diff changeset
  2085
            isButton: true
1883
577a267a87cb *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1872
diff changeset
  2086
            labelImage: (ResourceRetriever ToolbarIconLibrary moveWidgetLeftDownIcon)
1690
Claus Gittinger <cg@exept.de>
parents: 1689
diff changeset
  2087
          )
1750
f175cc37a17a toolBar: button image
Claus Gittinger <cg@exept.de>
parents: 1742
diff changeset
  2088
         (MenuItem
1917
53832fa044f1 undo button
Claus Gittinger <cg@exept.de>
parents: 1883
diff changeset
  2089
            label: '-'
1820
3d834d5e5bb4 toolbar icons & help texts
Claus Gittinger <cg@exept.de>
parents: 1819
diff changeset
  2090
            startGroup: right
1690
Claus Gittinger <cg@exept.de>
parents: 1689
diff changeset
  2091
          )
1750
f175cc37a17a toolBar: button image
Claus Gittinger <cg@exept.de>
parents: 1742
diff changeset
  2092
         (MenuItem
f175cc37a17a toolBar: button image
Claus Gittinger <cg@exept.de>
parents: 1742
diff changeset
  2093
            activeHelpKey: settingsCanvas
f175cc37a17a toolBar: button image
Claus Gittinger <cg@exept.de>
parents: 1742
diff changeset
  2094
            label: 'Canvas'
f175cc37a17a toolBar: button image
Claus Gittinger <cg@exept.de>
parents: 1742
diff changeset
  2095
            translateLabel: true
f175cc37a17a toolBar: button image
Claus Gittinger <cg@exept.de>
parents: 1742
diff changeset
  2096
            indication: painterShown
1690
Claus Gittinger <cg@exept.de>
parents: 1689
diff changeset
  2097
          )
1750
f175cc37a17a toolBar: button image
Claus Gittinger <cg@exept.de>
parents: 1742
diff changeset
  2098
         (MenuItem
f175cc37a17a toolBar: button image
Claus Gittinger <cg@exept.de>
parents: 1742
diff changeset
  2099
            activeHelpKey: settingsGallery
f175cc37a17a toolBar: button image
Claus Gittinger <cg@exept.de>
parents: 1742
diff changeset
  2100
            label: 'Gallery'
f175cc37a17a toolBar: button image
Claus Gittinger <cg@exept.de>
parents: 1742
diff changeset
  2101
            translateLabel: true
f175cc37a17a toolBar: button image
Claus Gittinger <cg@exept.de>
parents: 1742
diff changeset
  2102
            indication: galleryShown
1690
Claus Gittinger <cg@exept.de>
parents: 1689
diff changeset
  2103
          )
Claus Gittinger <cg@exept.de>
parents: 1689
diff changeset
  2104
         )
Claus Gittinger <cg@exept.de>
parents: 1689
diff changeset
  2105
        nil
Claus Gittinger <cg@exept.de>
parents: 1689
diff changeset
  2106
        nil
713
f94e58bb44ac some changes for the docu
tz
parents: 697
diff changeset
  2107
      )
f94e58bb44ac some changes for the docu
tz
parents: 697
diff changeset
  2108
!
f94e58bb44ac some changes for the docu
tz
parents: 697
diff changeset
  2109
f94e58bb44ac some changes for the docu
tz
parents: 697
diff changeset
  2110
menuToolbar2
743
d58a3e7e39d5 support user defined font styles
tz
parents: 735
diff changeset
  2111
    "This resource specification was automatically generated
d58a3e7e39d5 support user defined font styles
tz
parents: 735
diff changeset
  2112
     by the MenuEditor of ST/X."
d58a3e7e39d5 support user defined font styles
tz
parents: 735
diff changeset
  2113
778
a4b931b2aff6 master widget highlighting changed in the tree list
tz
parents: 774
diff changeset
  2114
    "Do not manually edit this!! If it is corrupted,
743
d58a3e7e39d5 support user defined font styles
tz
parents: 735
diff changeset
  2115
     the MenuEditor may not be able to read the specification."
713
f94e58bb44ac some changes for the docu
tz
parents: 697
diff changeset
  2116
f94e58bb44ac some changes for the docu
tz
parents: 697
diff changeset
  2117
    "
f94e58bb44ac some changes for the docu
tz
parents: 697
diff changeset
  2118
     MenuEditor new openOnClass:UIPainter andSelector:#menuToolbar2
f94e58bb44ac some changes for the docu
tz
parents: 697
diff changeset
  2119
     (Menu new fromLiteralArrayEncoding:(UIPainter menuToolbar2)) startUp
f94e58bb44ac some changes for the docu
tz
parents: 697
diff changeset
  2120
    "
f94e58bb44ac some changes for the docu
tz
parents: 697
diff changeset
  2121
f94e58bb44ac some changes for the docu
tz
parents: 697
diff changeset
  2122
    <resource: #menu>
f94e58bb44ac some changes for the docu
tz
parents: 697
diff changeset
  2123
1565
3282f44c5ca4 *** empty log message ***
ca
parents: 1563
diff changeset
  2124
    ^ 
3282f44c5ca4 *** empty log message ***
ca
parents: 1563
diff changeset
  2125
     #(#Menu
3282f44c5ca4 *** empty log message ***
ca
parents: 1563
diff changeset
  2126
        #(
3282f44c5ca4 *** empty log message ***
ca
parents: 1563
diff changeset
  2127
         #(#MenuItem
3282f44c5ca4 *** empty log message ***
ca
parents: 1563
diff changeset
  2128
            #label: 'Align Left'
3282f44c5ca4 *** empty log message ***
ca
parents: 1563
diff changeset
  2129
            #isButton: true
3282f44c5ca4 *** empty log message ***
ca
parents: 1563
diff changeset
  2130
            #value: #alignSelectionLeft
3282f44c5ca4 *** empty log message ***
ca
parents: 1563
diff changeset
  2131
            #activeHelpKey: #alignSelectionLeft
3282f44c5ca4 *** empty log message ***
ca
parents: 1563
diff changeset
  2132
            #enabled: #canMoveOrAlignSelection
3282f44c5ca4 *** empty log message ***
ca
parents: 1563
diff changeset
  2133
            #labelImage: #(#ResourceRetriever nil #iconAlignL)
3282f44c5ca4 *** empty log message ***
ca
parents: 1563
diff changeset
  2134
          )
3282f44c5ca4 *** empty log message ***
ca
parents: 1563
diff changeset
  2135
         #(#MenuItem
3282f44c5ca4 *** empty log message ***
ca
parents: 1563
diff changeset
  2136
            #label: 'Align Right'
3282f44c5ca4 *** empty log message ***
ca
parents: 1563
diff changeset
  2137
            #isButton: true
3282f44c5ca4 *** empty log message ***
ca
parents: 1563
diff changeset
  2138
            #value: #alignSelectionRight
3282f44c5ca4 *** empty log message ***
ca
parents: 1563
diff changeset
  2139
            #activeHelpKey: #alignSelectionRight
3282f44c5ca4 *** empty log message ***
ca
parents: 1563
diff changeset
  2140
            #enabled: #canMoveOrAlignSelection
3282f44c5ca4 *** empty log message ***
ca
parents: 1563
diff changeset
  2141
            #labelImage: #(#ResourceRetriever nil #iconAlignR)
3282f44c5ca4 *** empty log message ***
ca
parents: 1563
diff changeset
  2142
          )
3282f44c5ca4 *** empty log message ***
ca
parents: 1563
diff changeset
  2143
         #(#MenuItem
3282f44c5ca4 *** empty log message ***
ca
parents: 1563
diff changeset
  2144
            #label: 'Align Left & Right'
3282f44c5ca4 *** empty log message ***
ca
parents: 1563
diff changeset
  2145
            #isButton: true
3282f44c5ca4 *** empty log message ***
ca
parents: 1563
diff changeset
  2146
            #value: #alignSelectionLeftAndRight
3282f44c5ca4 *** empty log message ***
ca
parents: 1563
diff changeset
  2147
            #activeHelpKey: #alignSelectionLeftAndRight
3282f44c5ca4 *** empty log message ***
ca
parents: 1563
diff changeset
  2148
            #enabled: #canMoveOrAlignSelection
3282f44c5ca4 *** empty log message ***
ca
parents: 1563
diff changeset
  2149
            #labelImage: #(#ResourceRetriever nil #iconAlignLR)
3282f44c5ca4 *** empty log message ***
ca
parents: 1563
diff changeset
  2150
          )
3282f44c5ca4 *** empty log message ***
ca
parents: 1563
diff changeset
  2151
         #(#MenuItem
3282f44c5ca4 *** empty log message ***
ca
parents: 1563
diff changeset
  2152
            #label: ''
3282f44c5ca4 *** empty log message ***
ca
parents: 1563
diff changeset
  2153
          )
3282f44c5ca4 *** empty log message ***
ca
parents: 1563
diff changeset
  2154
         #(#MenuItem
3282f44c5ca4 *** empty log message ***
ca
parents: 1563
diff changeset
  2155
            #label: 'Align Top'
3282f44c5ca4 *** empty log message ***
ca
parents: 1563
diff changeset
  2156
            #isButton: true
3282f44c5ca4 *** empty log message ***
ca
parents: 1563
diff changeset
  2157
            #value: #alignSelectionTop
3282f44c5ca4 *** empty log message ***
ca
parents: 1563
diff changeset
  2158
            #activeHelpKey: #alignSelectionTop
3282f44c5ca4 *** empty log message ***
ca
parents: 1563
diff changeset
  2159
            #enabled: #canMoveOrAlignSelection
3282f44c5ca4 *** empty log message ***
ca
parents: 1563
diff changeset
  2160
            #labelImage: #(#ResourceRetriever nil #iconAlignT)
3282f44c5ca4 *** empty log message ***
ca
parents: 1563
diff changeset
  2161
          )
3282f44c5ca4 *** empty log message ***
ca
parents: 1563
diff changeset
  2162
         #(#MenuItem
3282f44c5ca4 *** empty log message ***
ca
parents: 1563
diff changeset
  2163
            #label: 'Align Bottom'
3282f44c5ca4 *** empty log message ***
ca
parents: 1563
diff changeset
  2164
            #isButton: true
3282f44c5ca4 *** empty log message ***
ca
parents: 1563
diff changeset
  2165
            #value: #alignSelectionBottom
3282f44c5ca4 *** empty log message ***
ca
parents: 1563
diff changeset
  2166
            #activeHelpKey: #alignSelectionBottom
3282f44c5ca4 *** empty log message ***
ca
parents: 1563
diff changeset
  2167
            #enabled: #canMoveOrAlignSelection
3282f44c5ca4 *** empty log message ***
ca
parents: 1563
diff changeset
  2168
            #labelImage: #(#ResourceRetriever nil #iconAlignB)
3282f44c5ca4 *** empty log message ***
ca
parents: 1563
diff changeset
  2169
          )
3282f44c5ca4 *** empty log message ***
ca
parents: 1563
diff changeset
  2170
         #(#MenuItem
3282f44c5ca4 *** empty log message ***
ca
parents: 1563
diff changeset
  2171
            #label: 'Align Top & Bottom'
3282f44c5ca4 *** empty log message ***
ca
parents: 1563
diff changeset
  2172
            #isButton: true
3282f44c5ca4 *** empty log message ***
ca
parents: 1563
diff changeset
  2173
            #value: #alignSelectionTopAndBottom
3282f44c5ca4 *** empty log message ***
ca
parents: 1563
diff changeset
  2174
            #activeHelpKey: #alignSelectionTopAndBottom
3282f44c5ca4 *** empty log message ***
ca
parents: 1563
diff changeset
  2175
            #enabled: #canMoveOrAlignSelection
3282f44c5ca4 *** empty log message ***
ca
parents: 1563
diff changeset
  2176
            #labelImage: #(#ResourceRetriever nil #iconAlignTB)
3282f44c5ca4 *** empty log message ***
ca
parents: 1563
diff changeset
  2177
          )
3282f44c5ca4 *** empty log message ***
ca
parents: 1563
diff changeset
  2178
         #(#MenuItem
3282f44c5ca4 *** empty log message ***
ca
parents: 1563
diff changeset
  2179
            #label: ''
3282f44c5ca4 *** empty log message ***
ca
parents: 1563
diff changeset
  2180
          )
3282f44c5ca4 *** empty log message ***
ca
parents: 1563
diff changeset
  2181
         #(#MenuItem
3282f44c5ca4 *** empty log message ***
ca
parents: 1563
diff changeset
  2182
            #label: 'Move Left'
3282f44c5ca4 *** empty log message ***
ca
parents: 1563
diff changeset
  2183
            #isButton: true
3282f44c5ca4 *** empty log message ***
ca
parents: 1563
diff changeset
  2184
            #triggerOnDown: true
3282f44c5ca4 *** empty log message ***
ca
parents: 1563
diff changeset
  2185
            #hideMenuOnActivated: false
3282f44c5ca4 *** empty log message ***
ca
parents: 1563
diff changeset
  2186
            #value: #moveSelectionLeft
3282f44c5ca4 *** empty log message ***
ca
parents: 1563
diff changeset
  2187
            #activeHelpKey: #changePositionLeft
3282f44c5ca4 *** empty log message ***
ca
parents: 1563
diff changeset
  2188
            #enabled: #canMoveOrAlignSelection
1883
577a267a87cb *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1872
diff changeset
  2189
            #labelImage: #(#ResourceRetriever nil #arrowLeft)
1565
3282f44c5ca4 *** empty log message ***
ca
parents: 1563
diff changeset
  2190
          )
3282f44c5ca4 *** empty log message ***
ca
parents: 1563
diff changeset
  2191
         #(#MenuItem
3282f44c5ca4 *** empty log message ***
ca
parents: 1563
diff changeset
  2192
            #label: 'Move Right'
3282f44c5ca4 *** empty log message ***
ca
parents: 1563
diff changeset
  2193
            #isButton: true
3282f44c5ca4 *** empty log message ***
ca
parents: 1563
diff changeset
  2194
            #triggerOnDown: true
3282f44c5ca4 *** empty log message ***
ca
parents: 1563
diff changeset
  2195
            #hideMenuOnActivated: false
3282f44c5ca4 *** empty log message ***
ca
parents: 1563
diff changeset
  2196
            #value: #moveSelectionRight
3282f44c5ca4 *** empty log message ***
ca
parents: 1563
diff changeset
  2197
            #activeHelpKey: #changePositionRight
3282f44c5ca4 *** empty log message ***
ca
parents: 1563
diff changeset
  2198
            #enabled: #canMoveOrAlignSelection
1883
577a267a87cb *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1872
diff changeset
  2199
            #labelImage: #(#ResourceRetriever nil #arrowRight)
1565
3282f44c5ca4 *** empty log message ***
ca
parents: 1563
diff changeset
  2200
          )
3282f44c5ca4 *** empty log message ***
ca
parents: 1563
diff changeset
  2201
         #(#MenuItem
3282f44c5ca4 *** empty log message ***
ca
parents: 1563
diff changeset
  2202
            #label: 'Move Up'
3282f44c5ca4 *** empty log message ***
ca
parents: 1563
diff changeset
  2203
            #isButton: true
3282f44c5ca4 *** empty log message ***
ca
parents: 1563
diff changeset
  2204
            #triggerOnDown: true
3282f44c5ca4 *** empty log message ***
ca
parents: 1563
diff changeset
  2205
            #value: #moveSelectionUp
3282f44c5ca4 *** empty log message ***
ca
parents: 1563
diff changeset
  2206
            #activeHelpKey: #changePositionUp
3282f44c5ca4 *** empty log message ***
ca
parents: 1563
diff changeset
  2207
            #enabled: #canMoveOrAlignSelection
1883
577a267a87cb *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1872
diff changeset
  2208
            #labelImage: #(#ResourceRetriever nil #arrowUp)
1565
3282f44c5ca4 *** empty log message ***
ca
parents: 1563
diff changeset
  2209
          )
3282f44c5ca4 *** empty log message ***
ca
parents: 1563
diff changeset
  2210
         #(#MenuItem
3282f44c5ca4 *** empty log message ***
ca
parents: 1563
diff changeset
  2211
            #label: 'Move Down'
3282f44c5ca4 *** empty log message ***
ca
parents: 1563
diff changeset
  2212
            #isButton: true
3282f44c5ca4 *** empty log message ***
ca
parents: 1563
diff changeset
  2213
            #triggerOnDown: true
3282f44c5ca4 *** empty log message ***
ca
parents: 1563
diff changeset
  2214
            #value: #moveSelectionDown
3282f44c5ca4 *** empty log message ***
ca
parents: 1563
diff changeset
  2215
            #activeHelpKey: #changePositionDown
3282f44c5ca4 *** empty log message ***
ca
parents: 1563
diff changeset
  2216
            #enabled: #canMoveOrAlignSelection
1883
577a267a87cb *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1872
diff changeset
  2217
            #labelImage: #(#ResourceRetriever nil #arrowDown)
1565
3282f44c5ca4 *** empty log message ***
ca
parents: 1563
diff changeset
  2218
          )
3282f44c5ca4 *** empty log message ***
ca
parents: 1563
diff changeset
  2219
         #(#MenuItem
3282f44c5ca4 *** empty log message ***
ca
parents: 1563
diff changeset
  2220
            #label: 'Widget Documentation'
3282f44c5ca4 *** empty log message ***
ca
parents: 1563
diff changeset
  2221
            #translateLabel: true
3282f44c5ca4 *** empty log message ***
ca
parents: 1563
diff changeset
  2222
            #isButton: true
3282f44c5ca4 *** empty log message ***
ca
parents: 1563
diff changeset
  2223
            #startGroup: #right
3282f44c5ca4 *** empty log message ***
ca
parents: 1563
diff changeset
  2224
            #value: #doOpenWidgetDocumentation
3282f44c5ca4 *** empty log message ***
ca
parents: 1563
diff changeset
  2225
            #activeHelpKey: #editOpenSpecDocumentation
3282f44c5ca4 *** empty log message ***
ca
parents: 1563
diff changeset
  2226
            #labelImage: #(#ResourceRetriever #Icon #helpIcon)
3282f44c5ca4 *** empty log message ***
ca
parents: 1563
diff changeset
  2227
          )
3282f44c5ca4 *** empty log message ***
ca
parents: 1563
diff changeset
  2228
         )
3282f44c5ca4 *** empty log message ***
ca
parents: 1563
diff changeset
  2229
        nil
3282f44c5ca4 *** empty log message ***
ca
parents: 1563
diff changeset
  2230
        nil
217
354ba46948b4 access MenuEditor for specs
ca
parents: 206
diff changeset
  2231
      )
446
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
  2232
! !
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
  2233
60
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
  2234
!UIPainter methodsFor:'aspects'!
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
  2235
724
7c7fb3f3a927 docu calls added
tz
parents: 721
diff changeset
  2236
aspectFor:aKey
765
27936ff059d3 obselete methods removed + comments revised
tz
parents: 755
diff changeset
  2237
    "returns the aspect for aKey"
27936ff059d3 obselete methods removed + comments revised
tz
parents: 755
diff changeset
  2238
27936ff059d3 obselete methods removed + comments revised
tz
parents: 755
diff changeset
  2239
    ^aspects at:aKey ifAbsent:[ super aspectFor:aKey ]
724
7c7fb3f3a927 docu calls added
tz
parents: 721
diff changeset
  2240
!
7c7fb3f3a927 docu calls added
tz
parents: 721
diff changeset
  2241
565
8fdeb11c72fd items move enabling
tz
parents: 564
diff changeset
  2242
canChangeOrderInContainer
765
27936ff059d3 obselete methods removed + comments revised
tz
parents: 755
diff changeset
  2243
    "returns a boolean value holder which is true if the widget order can be changed 
27936ff059d3 obselete methods removed + comments revised
tz
parents: 755
diff changeset
  2244
     within their container"
27936ff059d3 obselete methods removed + comments revised
tz
parents: 755
diff changeset
  2245
565
8fdeb11c72fd items move enabling
tz
parents: 564
diff changeset
  2246
    ^ builder booleanValueAspectFor:#canChangeOrderInContainer
8fdeb11c72fd items move enabling
tz
parents: 564
diff changeset
  2247
!
8fdeb11c72fd items move enabling
tz
parents: 564
diff changeset
  2248
1230
23e5d0c133e8 added exchangeLayouts function
Claus Gittinger <cg@exept.de>
parents: 1211
diff changeset
  2249
canExchangeSelectionLayouts
23e5d0c133e8 added exchangeLayouts function
Claus Gittinger <cg@exept.de>
parents: 1211
diff changeset
  2250
    "returns a boolean value holder which is true in case that the selection 
23e5d0c133e8 added exchangeLayouts function
Claus Gittinger <cg@exept.de>
parents: 1211
diff changeset
  2251
     consists of exactly 2 components
23e5d0c133e8 added exchangeLayouts function
Claus Gittinger <cg@exept.de>
parents: 1211
diff changeset
  2252
     and all widgets in the selection can change its layout through to a move or
23e5d0c133e8 added exchangeLayouts function
Claus Gittinger <cg@exept.de>
parents: 1211
diff changeset
  2253
     align operation"
23e5d0c133e8 added exchangeLayouts function
Claus Gittinger <cg@exept.de>
parents: 1211
diff changeset
  2254
23e5d0c133e8 added exchangeLayouts function
Claus Gittinger <cg@exept.de>
parents: 1211
diff changeset
  2255
    ^ builder booleanValueAspectFor:#canExchangeSelectionLayouts
23e5d0c133e8 added exchangeLayouts function
Claus Gittinger <cg@exept.de>
parents: 1211
diff changeset
  2256
!
23e5d0c133e8 added exchangeLayouts function
Claus Gittinger <cg@exept.de>
parents: 1211
diff changeset
  2257
282
bb88d92ae887 checkin from browser
ca
parents: 281
diff changeset
  2258
canMoveOrAlignSelection
bb88d92ae887 checkin from browser
ca
parents: 281
diff changeset
  2259
    "returns a boolean value holder which is true in case that any selection exists
bb88d92ae887 checkin from browser
ca
parents: 281
diff changeset
  2260
     and all widgets in the selection can change its layout through to a move or
765
27936ff059d3 obselete methods removed + comments revised
tz
parents: 755
diff changeset
  2261
     align operation"
27936ff059d3 obselete methods removed + comments revised
tz
parents: 755
diff changeset
  2262
282
bb88d92ae887 checkin from browser
ca
parents: 281
diff changeset
  2263
    ^ builder booleanValueAspectFor:#canMoveOrAlignSelection
222
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  2264
!
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  2265
755
cfbbec0a33c6 some cleans for grid, etc.
tz
parents: 743
diff changeset
  2266
canMoveSelection
cfbbec0a33c6 some cleans for grid, etc.
tz
parents: 743
diff changeset
  2267
765
27936ff059d3 obselete methods removed + comments revised
tz
parents: 755
diff changeset
  2268
    ^self canChangeOrderInContainer value or: [ 
27936ff059d3 obselete methods removed + comments revised
tz
parents: 755
diff changeset
  2269
     self canMoveSelectionOutOfContainer value or: [
27936ff059d3 obselete methods removed + comments revised
tz
parents: 755
diff changeset
  2270
     self canMoveSelectionOutOfContainer value]]
755
cfbbec0a33c6 some cleans for grid, etc.
tz
parents: 743
diff changeset
  2271
!
cfbbec0a33c6 some cleans for grid, etc.
tz
parents: 743
diff changeset
  2272
282
bb88d92ae887 checkin from browser
ca
parents: 281
diff changeset
  2273
canMoveSelectionIntoContainer
765
27936ff059d3 obselete methods removed + comments revised
tz
parents: 755
diff changeset
  2274
    "returns a boolean value holder which is true in case that one widget is selected
282
bb88d92ae887 checkin from browser
ca
parents: 281
diff changeset
  2275
     and can change its container widget to the next element in the list which will have
765
27936ff059d3 obselete methods removed + comments revised
tz
parents: 755
diff changeset
  2276
     the same container"
27936ff059d3 obselete methods removed + comments revised
tz
parents: 755
diff changeset
  2277
282
bb88d92ae887 checkin from browser
ca
parents: 281
diff changeset
  2278
    ^ builder booleanValueAspectFor:#canMoveSelectionIntoContainer
bb88d92ae887 checkin from browser
ca
parents: 281
diff changeset
  2279
!
bb88d92ae887 checkin from browser
ca
parents: 281
diff changeset
  2280
bb88d92ae887 checkin from browser
ca
parents: 281
diff changeset
  2281
canMoveSelectionOutOfContainer
765
27936ff059d3 obselete methods removed + comments revised
tz
parents: 755
diff changeset
  2282
    "returns a boolean value holder which is true in case that one widget is selected
27936ff059d3 obselete methods removed + comments revised
tz
parents: 755
diff changeset
  2283
     which is contained within another component"
27936ff059d3 obselete methods removed + comments revised
tz
parents: 755
diff changeset
  2284
282
bb88d92ae887 checkin from browser
ca
parents: 281
diff changeset
  2285
    ^ builder booleanValueAspectFor:#canMoveSelectionOutOfContainer
222
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  2286
!
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  2287
1991
feaad07cb3cf valueOf* methods renamed
Claus Gittinger <cg@exept.de>
parents: 1983
diff changeset
  2288
canPasteKeepingLayoutHolder
feaad07cb3cf valueOf* methods renamed
Claus Gittinger <cg@exept.de>
parents: 1983
diff changeset
  2289
feaad07cb3cf valueOf* methods renamed
Claus Gittinger <cg@exept.de>
parents: 1983
diff changeset
  2290
    |holder|
feaad07cb3cf valueOf* methods renamed
Claus Gittinger <cg@exept.de>
parents: 1983
diff changeset
  2291
    (holder := builder bindingAt:#valueOfCanPasteWithKeepingLayout) isNil ifTrue:[
feaad07cb3cf valueOf* methods renamed
Claus Gittinger <cg@exept.de>
parents: 1983
diff changeset
  2292
        builder aspectAt:#valueOfCanPasteWithKeepingLayout put:(holder :=  false asValue).
feaad07cb3cf valueOf* methods renamed
Claus Gittinger <cg@exept.de>
parents: 1983
diff changeset
  2293
    ].
feaad07cb3cf valueOf* methods renamed
Claus Gittinger <cg@exept.de>
parents: 1983
diff changeset
  2294
    ^ holder
feaad07cb3cf valueOf* methods renamed
Claus Gittinger <cg@exept.de>
parents: 1983
diff changeset
  2295
!
feaad07cb3cf valueOf* methods renamed
Claus Gittinger <cg@exept.de>
parents: 1983
diff changeset
  2296
1940
0f9be199d1c5 +replace widget
Claus Gittinger <cg@exept.de>
parents: 1917
diff changeset
  2297
canReplaceSelection
0f9be199d1c5 +replace widget
Claus Gittinger <cg@exept.de>
parents: 1917
diff changeset
  2298
    treeView isCanvasSelected ifTrue:[^ false].
0f9be199d1c5 +replace widget
Claus Gittinger <cg@exept.de>
parents: 1917
diff changeset
  2299
    ^ true
0f9be199d1c5 +replace widget
Claus Gittinger <cg@exept.de>
parents: 1917
diff changeset
  2300
!
0f9be199d1c5 +replace widget
Claus Gittinger <cg@exept.de>
parents: 1917
diff changeset
  2301
118
bc196200ea8b enabled and style
ca
parents: 114
diff changeset
  2302
enableChannel
2012
3a3b694c8288 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2007
diff changeset
  2303
    "true if modifications are allowed otherwise in test mode"
3a3b694c8288 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2007
diff changeset
  2304
3a3b694c8288 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2007
diff changeset
  2305
    ^ builder valueAspectFor:#enableChannel initialValue:true
3a3b694c8288 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2007
diff changeset
  2306
!
3a3b694c8288 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2007
diff changeset
  2307
3a3b694c8288 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2007
diff changeset
  2308
enableChannel2
765
27936ff059d3 obselete methods removed + comments revised
tz
parents: 755
diff changeset
  2309
    "true if modifications are allowed otherwise running test"
27936ff059d3 obselete methods removed + comments revised
tz
parents: 755
diff changeset
  2310
27936ff059d3 obselete methods removed + comments revised
tz
parents: 755
diff changeset
  2311
    ^ self painter enableChannel
109
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
  2312
!
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
  2313
173
a8468f4e83f0 show/hide painter/gallery
ca
parents: 171
diff changeset
  2314
galleryShown
765
27936ff059d3 obselete methods removed + comments revised
tz
parents: 755
diff changeset
  2315
    "returns a boolean value holder which is set to true if the gallery is shown"
27936ff059d3 obselete methods removed + comments revised
tz
parents: 755
diff changeset
  2316
173
a8468f4e83f0 show/hide painter/gallery
ca
parents: 171
diff changeset
  2317
    |holder|
a8468f4e83f0 show/hide painter/gallery
ca
parents: 171
diff changeset
  2318
a8468f4e83f0 show/hide painter/gallery
ca
parents: 171
diff changeset
  2319
    (holder := builder bindingAt:#galleryShown) isNil ifTrue:[
2217
b54632779619 Use class var for SelectionPanel
Stefan Vogel <sv@exept.de>
parents: 2213
diff changeset
  2320
        builder aspectAt:#galleryShown put:(holder :=  true asValue).
b54632779619 Use class var for SelectionPanel
Stefan Vogel <sv@exept.de>
parents: 2213
diff changeset
  2321
        holder addDependent:self
173
a8468f4e83f0 show/hide painter/gallery
ca
parents: 171
diff changeset
  2322
    ].
a8468f4e83f0 show/hide painter/gallery
ca
parents: 171
diff changeset
  2323
    ^ holder
a8468f4e83f0 show/hide painter/gallery
ca
parents: 171
diff changeset
  2324
a8468f4e83f0 show/hide painter/gallery
ca
parents: 171
diff changeset
  2325
!
a8468f4e83f0 show/hide painter/gallery
ca
parents: 171
diff changeset
  2326
282
bb88d92ae887 checkin from browser
ca
parents: 281
diff changeset
  2327
hasOneSelectionOtherThanCanvas
765
27936ff059d3 obselete methods removed + comments revised
tz
parents: 755
diff changeset
  2328
    "returns a value holder which is true in case that one widget is selected
27936ff059d3 obselete methods removed + comments revised
tz
parents: 755
diff changeset
  2329
     other than the root"
27936ff059d3 obselete methods removed + comments revised
tz
parents: 755
diff changeset
  2330
282
bb88d92ae887 checkin from browser
ca
parents: 281
diff changeset
  2331
    ^ builder booleanValueAspectFor:#hasOneSelectionOtherThanCanvas
222
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  2332
!
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  2333
1917
53832fa044f1 undo button
Claus Gittinger <cg@exept.de>
parents: 1883
diff changeset
  2334
hasUndoHistory
53832fa044f1 undo button
Claus Gittinger <cg@exept.de>
parents: 1883
diff changeset
  2335
    ^ self painter hasUndoHistory
53832fa044f1 undo button
Claus Gittinger <cg@exept.de>
parents: 1883
diff changeset
  2336
!
53832fa044f1 undo button
Claus Gittinger <cg@exept.de>
parents: 1883
diff changeset
  2337
1954
1344ec1f99eb *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1953
diff changeset
  2338
hasUndoHistoryHolder
1344ec1f99eb *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1953
diff changeset
  2339
    ^ self painter hasUndoHistoryHolder
1344ec1f99eb *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1953
diff changeset
  2340
!
1344ec1f99eb *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1953
diff changeset
  2341
884
a291fc248a8b images moved to class Icon
tz
parents: 877
diff changeset
  2342
helpIcon
a291fc248a8b images moved to class Icon
tz
parents: 877
diff changeset
  2343
a291fc248a8b images moved to class Icon
tz
parents: 877
diff changeset
  2344
    ^Icon helpIcon
a291fc248a8b images moved to class Icon
tz
parents: 877
diff changeset
  2345
!
a291fc248a8b images moved to class Icon
tz
parents: 877
diff changeset
  2346
109
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
  2347
noteBookView
765
27936ff059d3 obselete methods removed + comments revised
tz
parents: 755
diff changeset
  2348
    "returns the notebook view; initialize the tools embedded in the notebook"
27936ff059d3 obselete methods removed + comments revised
tz
parents: 755
diff changeset
  2349
2159
7f02407f0bbf focus handling
ca
parents: 2157
diff changeset
  2350
    |noteBook|
109
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
  2351
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
  2352
    (noteBook := builder bindingAt:#noteBookView) isNil ifTrue:[
1316
d66f0b84aa6b *** empty log message ***
ca
parents: 1314
diff changeset
  2353
        noteBook := View new.
d66f0b84aa6b *** empty log message ***
ca
parents: 1314
diff changeset
  2354
        builder aspectAt:#noteBookView put:noteBook.
d66f0b84aa6b *** empty log message ***
ca
parents: 1314
diff changeset
  2355
2159
7f02407f0bbf focus handling
ca
parents: 2157
diff changeset
  2356
        layoutTool := self createToolApplication:UILayoutTool        spec:#windowSpec in:noteBook.
7f02407f0bbf focus handling
ca
parents: 2157
diff changeset
  2357
        helpTool   := self createToolApplication:UIHelpTool          spec:#innerSpec  in:noteBook.
7f02407f0bbf focus handling
ca
parents: 2157
diff changeset
  2358
        specTool   := self createToolApplication:UISpecificationTool spec:#windowSpec in:noteBook.
7f02407f0bbf focus handling
ca
parents: 2157
diff changeset
  2359
2072
0b0a24d7b198 class vs. className confusion
Claus Gittinger <cg@exept.de>
parents: 2040
diff changeset
  2360
        helpTool loadFromClass:specClass.
109
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
  2361
    ].
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
  2362
    ^ noteBook
2072
0b0a24d7b198 class vs. className confusion
Claus Gittinger <cg@exept.de>
parents: 2040
diff changeset
  2363
0b0a24d7b198 class vs. className confusion
Claus Gittinger <cg@exept.de>
parents: 2040
diff changeset
  2364
    "Modified: / 31-08-2006 / 10:11:15 / cg"
109
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
  2365
!
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
  2366
282
bb88d92ae887 checkin from browser
ca
parents: 281
diff changeset
  2367
painterShown
765
27936ff059d3 obselete methods removed + comments revised
tz
parents: 755
diff changeset
  2368
    "returns a boolean value holder which is set to true if the painter is shown"
27936ff059d3 obselete methods removed + comments revised
tz
parents: 755
diff changeset
  2369
173
a8468f4e83f0 show/hide painter/gallery
ca
parents: 171
diff changeset
  2370
    |holder|
a8468f4e83f0 show/hide painter/gallery
ca
parents: 171
diff changeset
  2371
a8468f4e83f0 show/hide painter/gallery
ca
parents: 171
diff changeset
  2372
    (holder := builder bindingAt:#painterShown) isNil ifTrue:[
2217
b54632779619 Use class var for SelectionPanel
Stefan Vogel <sv@exept.de>
parents: 2213
diff changeset
  2373
        builder aspectAt:#painterShown put:(holder :=  true asValue).
b54632779619 Use class var for SelectionPanel
Stefan Vogel <sv@exept.de>
parents: 2213
diff changeset
  2374
        holder addDependent:self
173
a8468f4e83f0 show/hide painter/gallery
ca
parents: 171
diff changeset
  2375
    ].
a8468f4e83f0 show/hide painter/gallery
ca
parents: 171
diff changeset
  2376
    ^ holder
a8468f4e83f0 show/hide painter/gallery
ca
parents: 171
diff changeset
  2377
a8468f4e83f0 show/hide painter/gallery
ca
parents: 171
diff changeset
  2378
!
a8468f4e83f0 show/hide painter/gallery
ca
parents: 171
diff changeset
  2379
109
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
  2380
tabList
765
27936ff059d3 obselete methods removed + comments revised
tz
parents: 755
diff changeset
  2381
    "returns a value holder which keeps a list of the section labels in the notebook"
27936ff059d3 obselete methods removed + comments revised
tz
parents: 755
diff changeset
  2382
1782
8108839cc262 translate label
Claus Gittinger <cg@exept.de>
parents: 1775
diff changeset
  2383
    |tabs holder|
109
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
  2384
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
  2385
    (holder := builder bindingAt:#tabList) isNil ifTrue:[
1782
8108839cc262 translate label
Claus Gittinger <cg@exept.de>
parents: 1775
diff changeset
  2386
        tabs := #(Basics Details Layout).
8108839cc262 translate label
Claus Gittinger <cg@exept.de>
parents: 1775
diff changeset
  2387
        builder aspectAt:#tabList put:(holder :=  (resources array:tabs) asValue).
109
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
  2388
    ].
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
  2389
    ^ holder
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
  2390
!
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
  2391
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
  2392
tabModel
765
27936ff059d3 obselete methods removed + comments revised
tz
parents: 755
diff changeset
  2393
    "returns a value holder which keeps the label of the current section in the notebook"
27936ff059d3 obselete methods removed + comments revised
tz
parents: 755
diff changeset
  2394
109
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
  2395
    |holder|
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
  2396
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
  2397
    (holder := builder bindingAt:#tabModel) isNil ifTrue:[
2217
b54632779619 Use class var for SelectionPanel
Stefan Vogel <sv@exept.de>
parents: 2213
diff changeset
  2398
        holder := AspectAdaptor new subject:self; forAspect:#tabSelection.
b54632779619 Use class var for SelectionPanel
Stefan Vogel <sv@exept.de>
parents: 2213
diff changeset
  2399
        builder aspectAt:#tabModel put:holder.
109
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
  2400
    ].
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
  2401
    ^ holder
222
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  2402
!
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  2403
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  2404
treeView
765
27936ff059d3 obselete methods removed + comments revised
tz
parents: 755
diff changeset
  2405
    "returns the tree view which holds all widget"
27936ff059d3 obselete methods removed + comments revised
tz
parents: 755
diff changeset
  2406
222
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  2407
    ^ treeView
729
12f157d5e017 askings for modifications completed (?)
tz
parents: 724
diff changeset
  2408
!
12f157d5e017 askings for modifications completed (?)
tz
parents: 724
diff changeset
  2409
12f157d5e017 askings for modifications completed (?)
tz
parents: 724
diff changeset
  2410
valueOfCanPasteWithKeepingLayout
1991
feaad07cb3cf valueOf* methods renamed
Claus Gittinger <cg@exept.de>
parents: 1983
diff changeset
  2411
    self obsoleteMethodWarning:'stupid name - use #canPasteKeepingLayoutHolder'.
feaad07cb3cf valueOf* methods renamed
Claus Gittinger <cg@exept.de>
parents: 1983
diff changeset
  2412
    ^ self canPasteKeepingLayoutHolder
60
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
  2413
! !
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
  2414
587
dd545d089d95 Fix typos. Ensure that specClass is a string.
Stefan Vogel <sv@exept.de>
parents: 572
diff changeset
  2415
!UIPainter methodsFor:'building editors'!
513
a0d00fecb49a support of TabItemEditor
ca
parents: 512
diff changeset
  2416
a0d00fecb49a support of TabItemEditor
ca
parents: 512
diff changeset
  2417
openDataSetColumnEditor
765
27936ff059d3 obselete methods removed + comments revised
tz
parents: 755
diff changeset
  2418
    "opens a Table Column Editor on current widget"
27936ff059d3 obselete methods removed + comments revised
tz
parents: 755
diff changeset
  2419
1453
0cf534cc29a9 bugfix when after close subtool (table menu ..) when reading selector
ca
parents: 1444
diff changeset
  2420
    |cls editor specTool columnHolder tableSelector columns|
824
1d5adf147721 change mechanism for opening the dataset builder (step 2)
tz
parents: 819
diff changeset
  2421
1983
5528c812da8f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1976
diff changeset
  2422
    (cls := self resolveName:specClassName) isNil ifTrue:[
5528c812da8f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1976
diff changeset
  2423
        self askForSaving ifTrue:[cls := self resolveName:specClassName].
1103
ecc91379704b accept before opening an editor
Claus Gittinger <cg@exept.de>
parents: 1071
diff changeset
  2424
    ].
1453
0cf534cc29a9 bugfix when after close subtool (table menu ..) when reading selector
ca
parents: 1444
diff changeset
  2425
    cls isNil ifTrue:[^ self].
0cf534cc29a9 bugfix when after close subtool (table menu ..) when reading selector
ca
parents: 1444
diff changeset
  2426
1103
ecc91379704b accept before opening an editor
Claus Gittinger <cg@exept.de>
parents: 1071
diff changeset
  2427
    self modifiedChannel value ifTrue:[
1453
0cf534cc29a9 bugfix when after close subtool (table menu ..) when reading selector
ca
parents: 1444
diff changeset
  2428
        (self confirm:'Accept changes made to spec ?') ifTrue:[
0cf534cc29a9 bugfix when after close subtool (table menu ..) when reading selector
ca
parents: 1444
diff changeset
  2429
            self accept
0cf534cc29a9 bugfix when after close subtool (table menu ..) when reading selector
ca
parents: 1444
diff changeset
  2430
        ]
513
a0d00fecb49a support of TabItemEditor
ca
parents: 512
diff changeset
  2431
    ].
743
d58a3e7e39d5 support user defined font styles
tz
parents: 735
diff changeset
  2432
1453
0cf534cc29a9 bugfix when after close subtool (table menu ..) when reading selector
ca
parents: 1444
diff changeset
  2433
    editor   := DataSetBuilder new.
0cf534cc29a9 bugfix when after close subtool (table menu ..) when reading selector
ca
parents: 1444
diff changeset
  2434
    specTool := self specTool.
0cf534cc29a9 bugfix when after close subtool (table menu ..) when reading selector
ca
parents: 1444
diff changeset
  2435
513
a0d00fecb49a support of TabItemEditor
ca
parents: 512
diff changeset
  2436
    editor masterApplication:self.
824
1d5adf147721 change mechanism for opening the dataset builder (step 2)
tz
parents: 819
diff changeset
  2437
    editor specClass: cls.
1453
0cf534cc29a9 bugfix when after close subtool (table menu ..) when reading selector
ca
parents: 1444
diff changeset
  2438
    editor rowClassName:(specTool specification rowClassName).
0cf534cc29a9 bugfix when after close subtool (table menu ..) when reading selector
ca
parents: 1444
diff changeset
  2439
0cf534cc29a9 bugfix when after close subtool (table menu ..) when reading selector
ca
parents: 1444
diff changeset
  2440
    columnHolder  := specTool aspectFor:#columnHolder.
0cf534cc29a9 bugfix when after close subtool (table menu ..) when reading selector
ca
parents: 1444
diff changeset
  2441
    tableSelector := columnHolder value.
0cf534cc29a9 bugfix when after close subtool (table menu ..) when reading selector
ca
parents: 1444
diff changeset
  2442
0cf534cc29a9 bugfix when after close subtool (table menu ..) when reading selector
ca
parents: 1444
diff changeset
  2443
    tableSelector := tableSelector size ~~ 0 ifTrue:[tableSelector asSymbol]
0cf534cc29a9 bugfix when after close subtool (table menu ..) when reading selector
ca
parents: 1444
diff changeset
  2444
                                            ifFalse:[nil].
0cf534cc29a9 bugfix when after close subtool (table menu ..) when reading selector
ca
parents: 1444
diff changeset
  2445
1554
d5e4612bf7cf implements -> includesSelector
Claus Gittinger <cg@exept.de>
parents: 1545
diff changeset
  2446
    (tableSelector notNil and:[cls class includesSelector:tableSelector]) ifTrue:[
1453
0cf534cc29a9 bugfix when after close subtool (table menu ..) when reading selector
ca
parents: 1444
diff changeset
  2447
        editor openModalOnClass:cls andSelector:tableSelector
0cf534cc29a9 bugfix when after close subtool (table menu ..) when reading selector
ca
parents: 1444
diff changeset
  2448
    ] ifFalse:[
0cf534cc29a9 bugfix when after close subtool (table menu ..) when reading selector
ca
parents: 1444
diff changeset
  2449
        columns := specTool specification columns.
0cf534cc29a9 bugfix when after close subtool (table menu ..) when reading selector
ca
parents: 1444
diff changeset
  2450
0cf534cc29a9 bugfix when after close subtool (table menu ..) when reading selector
ca
parents: 1444
diff changeset
  2451
        columns size ~~ 0 ifTrue:[
0cf534cc29a9 bugfix when after close subtool (table menu ..) when reading selector
ca
parents: 1444
diff changeset
  2452
            editor openModalOnResourceSpec:columns
0cf534cc29a9 bugfix when after close subtool (table menu ..) when reading selector
ca
parents: 1444
diff changeset
  2453
        ] ifFalse:[
0cf534cc29a9 bugfix when after close subtool (table menu ..) when reading selector
ca
parents: 1444
diff changeset
  2454
            editor openModal
0cf534cc29a9 bugfix when after close subtool (table menu ..) when reading selector
ca
parents: 1444
diff changeset
  2455
        ]
827
aa8f49da0f22 change mechanism for opening the dataset builder (step 3)
tz
parents: 824
diff changeset
  2456
    ].
aa8f49da0f22 change mechanism for opening the dataset builder (step 3)
tz
parents: 824
diff changeset
  2457
1453
0cf534cc29a9 bugfix when after close subtool (table menu ..) when reading selector
ca
parents: 1444
diff changeset
  2458
    editor hasSaved ifTrue:[
0cf534cc29a9 bugfix when after close subtool (table menu ..) when reading selector
ca
parents: 1444
diff changeset
  2459
        specTool specification columns:nil.
0cf534cc29a9 bugfix when after close subtool (table menu ..) when reading selector
ca
parents: 1444
diff changeset
  2460
        specTool specification rowClassName:(editor rowClassName).
0cf534cc29a9 bugfix when after close subtool (table menu ..) when reading selector
ca
parents: 1444
diff changeset
  2461
0cf534cc29a9 bugfix when after close subtool (table menu ..) when reading selector
ca
parents: 1444
diff changeset
  2462
        tableSelector = editor specSelector ifFalse:[
0cf534cc29a9 bugfix when after close subtool (table menu ..) when reading selector
ca
parents: 1444
diff changeset
  2463
            columnHolder value:(editor specSelector).
0cf534cc29a9 bugfix when after close subtool (table menu ..) when reading selector
ca
parents: 1444
diff changeset
  2464
            self accept.
0cf534cc29a9 bugfix when after close subtool (table menu ..) when reading selector
ca
parents: 1444
diff changeset
  2465
        ].
0cf534cc29a9 bugfix when after close subtool (table menu ..) when reading selector
ca
parents: 1444
diff changeset
  2466
        ^ self
827
aa8f49da0f22 change mechanism for opening the dataset builder (step 3)
tz
parents: 824
diff changeset
  2467
    ].
aa8f49da0f22 change mechanism for opening the dataset builder (step 3)
tz
parents: 824
diff changeset
  2468
1453
0cf534cc29a9 bugfix when after close subtool (table menu ..) when reading selector
ca
parents: 1444
diff changeset
  2469
    (editor modified and:[tableSelector isNil]) ifTrue:[
0cf534cc29a9 bugfix when after close subtool (table menu ..) when reading selector
ca
parents: 1444
diff changeset
  2470
        specTool specification columns:(editor columns).
0cf534cc29a9 bugfix when after close subtool (table menu ..) when reading selector
ca
parents: 1444
diff changeset
  2471
        specTool specification rowClassName:(editor rowClassName).
0cf534cc29a9 bugfix when after close subtool (table menu ..) when reading selector
ca
parents: 1444
diff changeset
  2472
        self modifiedChannel value:true.
827
aa8f49da0f22 change mechanism for opening the dataset builder (step 3)
tz
parents: 824
diff changeset
  2473
    ].
513
a0d00fecb49a support of TabItemEditor
ca
parents: 512
diff changeset
  2474
!
a0d00fecb49a support of TabItemEditor
ca
parents: 512
diff changeset
  2475
a0d00fecb49a support of TabItemEditor
ca
parents: 512
diff changeset
  2476
openEditMenu
765
27936ff059d3 obselete methods removed + comments revised
tz
parents: 755
diff changeset
  2477
    "opens a Menu Editor on current widget"
27936ff059d3 obselete methods removed + comments revised
tz
parents: 755
diff changeset
  2478
1453
0cf534cc29a9 bugfix when after close subtool (table menu ..) when reading selector
ca
parents: 1444
diff changeset
  2479
    |cls selectorOrMenu editor selectedSpec spec holder|
513
a0d00fecb49a support of TabItemEditor
ca
parents: 512
diff changeset
  2480
1983
5528c812da8f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1976
diff changeset
  2481
    (cls := self resolveName:specClassName) isNil ifTrue:[
5528c812da8f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1976
diff changeset
  2482
        self askForSaving ifTrue:[cls := self resolveName:specClassName].
1453
0cf534cc29a9 bugfix when after close subtool (table menu ..) when reading selector
ca
parents: 1444
diff changeset
  2483
    ].
0cf534cc29a9 bugfix when after close subtool (table menu ..) when reading selector
ca
parents: 1444
diff changeset
  2484
    cls isNil ifTrue:[^ self].
0cf534cc29a9 bugfix when after close subtool (table menu ..) when reading selector
ca
parents: 1444
diff changeset
  2485
0cf534cc29a9 bugfix when after close subtool (table menu ..) when reading selector
ca
parents: 1444
diff changeset
  2486
    self modifiedChannel value ifTrue:[
0cf534cc29a9 bugfix when after close subtool (table menu ..) when reading selector
ca
parents: 1444
diff changeset
  2487
        (self confirm:'Accept changes made to spec ?') ifTrue:[
0cf534cc29a9 bugfix when after close subtool (table menu ..) when reading selector
ca
parents: 1444
diff changeset
  2488
            self accept
0cf534cc29a9 bugfix when after close subtool (table menu ..) when reading selector
ca
parents: 1444
diff changeset
  2489
        ]
513
a0d00fecb49a support of TabItemEditor
ca
parents: 512
diff changeset
  2490
    ].
1453
0cf534cc29a9 bugfix when after close subtool (table menu ..) when reading selector
ca
parents: 1444
diff changeset
  2491
    spec := self specTool specification.
0cf534cc29a9 bugfix when after close subtool (table menu ..) when reading selector
ca
parents: 1444
diff changeset
  2492
0cf534cc29a9 bugfix when after close subtool (table menu ..) when reading selector
ca
parents: 1444
diff changeset
  2493
    (selectorOrMenu := spec menuSelector) notNil ifTrue:[
0cf534cc29a9 bugfix when after close subtool (table menu ..) when reading selector
ca
parents: 1444
diff changeset
  2494
        selectorOrMenu := selectorOrMenu asSymbol
0cf534cc29a9 bugfix when after close subtool (table menu ..) when reading selector
ca
parents: 1444
diff changeset
  2495
    ] ifFalse:[
0cf534cc29a9 bugfix when after close subtool (table menu ..) when reading selector
ca
parents: 1444
diff changeset
  2496
        "/ cg: q&d hack ...
0cf534cc29a9 bugfix when after close subtool (table menu ..) when reading selector
ca
parents: 1444
diff changeset
  2497
        selectorOrMenu := nil.
0cf534cc29a9 bugfix when after close subtool (table menu ..) when reading selector
ca
parents: 1444
diff changeset
  2498
0cf534cc29a9 bugfix when after close subtool (table menu ..) when reading selector
ca
parents: 1444
diff changeset
  2499
        (selectedSpec := treeView propertySelected) notNil ifTrue:[
1688
389815b12d3a Convert Object>>errorSignal -> Error
Stefan Vogel <sv@exept.de>
parents: 1684
diff changeset
  2500
            Error handle:[:ex |
1453
0cf534cc29a9 bugfix when after close subtool (table menu ..) when reading selector
ca
parents: 1444
diff changeset
  2501
                selectorOrMenu := nil.
0cf534cc29a9 bugfix when after close subtool (table menu ..) when reading selector
ca
parents: 1444
diff changeset
  2502
            ] do:[
0cf534cc29a9 bugfix when after close subtool (table menu ..) when reading selector
ca
parents: 1444
diff changeset
  2503
                selectorOrMenu := selectedSpec view asMenu.
0cf534cc29a9 bugfix when after close subtool (table menu ..) when reading selector
ca
parents: 1444
diff changeset
  2504
            ]
0cf534cc29a9 bugfix when after close subtool (table menu ..) when reading selector
ca
parents: 1444
diff changeset
  2505
        ].
0cf534cc29a9 bugfix when after close subtool (table menu ..) when reading selector
ca
parents: 1444
diff changeset
  2506
    ].
0cf534cc29a9 bugfix when after close subtool (table menu ..) when reading selector
ca
parents: 1444
diff changeset
  2507
0cf534cc29a9 bugfix when after close subtool (table menu ..) when reading selector
ca
parents: 1444
diff changeset
  2508
    editor := MenuEditor new.
0cf534cc29a9 bugfix when after close subtool (table menu ..) when reading selector
ca
parents: 1444
diff changeset
  2509
    editor masterApplication:self.
0cf534cc29a9 bugfix when after close subtool (table menu ..) when reading selector
ca
parents: 1444
diff changeset
  2510
    editor specClass: cls.
1669
e6ea33c843a0 *** empty log message ***
ca
parents: 1663
diff changeset
  2511
    editor useHelpTool:(self helpTool).
1453
0cf534cc29a9 bugfix when after close subtool (table menu ..) when reading selector
ca
parents: 1444
diff changeset
  2512
1698
28250498a2b3 *** empty log message ***
penk
parents: 1690
diff changeset
  2513
    selectorOrMenu class == Menu
28250498a2b3 *** empty log message ***
penk
parents: 1690
diff changeset
  2514
        ifTrue: [editor openModalOnMenu:selectorOrMenu]
28250498a2b3 *** empty log message ***
penk
parents: 1690
diff changeset
  2515
        ifFalse:  [editor openModalOnClass:cls andSelector:selectorOrMenu].
1453
0cf534cc29a9 bugfix when after close subtool (table menu ..) when reading selector
ca
parents: 1444
diff changeset
  2516
0cf534cc29a9 bugfix when after close subtool (table menu ..) when reading selector
ca
parents: 1444
diff changeset
  2517
    editor hasSaved ifTrue:[
0cf534cc29a9 bugfix when after close subtool (table menu ..) when reading selector
ca
parents: 1444
diff changeset
  2518
        holder := self specTool aspectFor:#menuSelector.
0cf534cc29a9 bugfix when after close subtool (table menu ..) when reading selector
ca
parents: 1444
diff changeset
  2519
        holder value:(editor specSelector).
0cf534cc29a9 bugfix when after close subtool (table menu ..) when reading selector
ca
parents: 1444
diff changeset
  2520
        self accept.
1669
e6ea33c843a0 *** empty log message ***
ca
parents: 1663
diff changeset
  2521
        ^ self
1453
0cf534cc29a9 bugfix when after close subtool (table menu ..) when reading selector
ca
parents: 1444
diff changeset
  2522
    ].
513
a0d00fecb49a support of TabItemEditor
ca
parents: 512
diff changeset
  2523
!
a0d00fecb49a support of TabItemEditor
ca
parents: 512
diff changeset
  2524
a0d00fecb49a support of TabItemEditor
ca
parents: 512
diff changeset
  2525
openHierarchicalListEditor
765
27936ff059d3 obselete methods removed + comments revised
tz
parents: 755
diff changeset
  2526
    "opens a Hierarchical List Editor on current widget"
27936ff059d3 obselete methods removed + comments revised
tz
parents: 755
diff changeset
  2527
892
b200d2d9bf5e avoid repeated send-sequences
Claus Gittinger <cg@exept.de>
parents: 890
diff changeset
  2528
    |selector editor spec|
765
27936ff059d3 obselete methods removed + comments revised
tz
parents: 755
diff changeset
  2529
1983
5528c812da8f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1976
diff changeset
  2530
    (self resolveName:specClassName) isNil ifTrue:[
2217
b54632779619 Use class var for SelectionPanel
Stefan Vogel <sv@exept.de>
parents: 2213
diff changeset
  2531
        self askForSaving ifFalse: [^self]
513
a0d00fecb49a support of TabItemEditor
ca
parents: 512
diff changeset
  2532
    ].
a0d00fecb49a support of TabItemEditor
ca
parents: 512
diff changeset
  2533
892
b200d2d9bf5e avoid repeated send-sequences
Claus Gittinger <cg@exept.de>
parents: 890
diff changeset
  2534
    spec := self specTool specification.
b200d2d9bf5e avoid repeated send-sequences
Claus Gittinger <cg@exept.de>
parents: 890
diff changeset
  2535
    (selector := spec hierarchicalList) notNil ifTrue:[
2217
b54632779619 Use class var for SelectionPanel
Stefan Vogel <sv@exept.de>
parents: 2213
diff changeset
  2536
        selector := selector asSymbol
513
a0d00fecb49a support of TabItemEditor
ca
parents: 512
diff changeset
  2537
    ].
735
29c8681ce68d no picking for hierarchical lists + error handler for the starting phase
tz
parents: 729
diff changeset
  2538
513
a0d00fecb49a support of TabItemEditor
ca
parents: 512
diff changeset
  2539
    editor := HierarchicalListEditor new.
a0d00fecb49a support of TabItemEditor
ca
parents: 512
diff changeset
  2540
    editor masterApplication:self.
1983
5528c812da8f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1976
diff changeset
  2541
    editor openModalOnClass:specClassName andSelector:selector.
765
27936ff059d3 obselete methods removed + comments revised
tz
parents: 755
diff changeset
  2542
27936ff059d3 obselete methods removed + comments revised
tz
parents: 755
diff changeset
  2543
    editor specSelector ~= selector ifTrue:[
2217
b54632779619 Use class var for SelectionPanel
Stefan Vogel <sv@exept.de>
parents: 2213
diff changeset
  2544
        editor hasSaved ifTrue:[
b54632779619 Use class var for SelectionPanel
Stefan Vogel <sv@exept.de>
parents: 2213
diff changeset
  2545
            spec hierarchicalList:editor specSelector.
b54632779619 Use class var for SelectionPanel
Stefan Vogel <sv@exept.de>
parents: 2213
diff changeset
  2546
            self modifiedChannel value:true.
b54632779619 Use class var for SelectionPanel
Stefan Vogel <sv@exept.de>
parents: 2213
diff changeset
  2547
            self accept
b54632779619 Use class var for SelectionPanel
Stefan Vogel <sv@exept.de>
parents: 2213
diff changeset
  2548
        ]
513
a0d00fecb49a support of TabItemEditor
ca
parents: 512
diff changeset
  2549
    ]
892
b200d2d9bf5e avoid repeated send-sequences
Claus Gittinger <cg@exept.de>
parents: 890
diff changeset
  2550
b200d2d9bf5e avoid repeated send-sequences
Claus Gittinger <cg@exept.de>
parents: 890
diff changeset
  2551
    "Modified: / 16.7.1998 / 18:15:46 / cg"
513
a0d00fecb49a support of TabItemEditor
ca
parents: 512
diff changeset
  2552
!
a0d00fecb49a support of TabItemEditor
ca
parents: 512
diff changeset
  2553
729
12f157d5e017 askings for modifications completed (?)
tz
parents: 724
diff changeset
  2554
openSubSpecGUIPainter
609
60f89fba074a Allow opening of a GUI Painter for a subSpecification.
Stefan Vogel <sv@exept.de>
parents: 587
diff changeset
  2555
    "opens a GUI Painter on the current subspecification"
60f89fba074a Allow opening of a GUI Painter for a subSpecification.
Stefan Vogel <sv@exept.de>
parents: 587
diff changeset
  2556
60f89fba074a Allow opening of a GUI Painter for a subSpecification.
Stefan Vogel <sv@exept.de>
parents: 587
diff changeset
  2557
    |spec cls meta sel|
60f89fba074a Allow opening of a GUI Painter for a subSpecification.
Stefan Vogel <sv@exept.de>
parents: 587
diff changeset
  2558
1983
5528c812da8f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1976
diff changeset
  2559
    (self resolveName:specClassName) isNil ifTrue:[
1523
a8fe5e15220b *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1521
diff changeset
  2560
        self askForSaving ifFalse: [^self]
913
12e73e6c57b4 do open building editors after defining first new app class
tz
parents: 892
diff changeset
  2561
    ]. 
12e73e6c57b4 do open building editors after defining first new app class
tz
parents: 892
diff changeset
  2562
609
60f89fba074a Allow opening of a GUI Painter for a subSpecification.
Stefan Vogel <sv@exept.de>
parents: 587
diff changeset
  2563
    spec := self specTool specification.
60f89fba074a Allow opening of a GUI Painter for a subSpecification.
Stefan Vogel <sv@exept.de>
parents: 587
diff changeset
  2564
    cls := spec majorKey.
60f89fba074a Allow opening of a GUI Painter for a subSpecification.
Stefan Vogel <sv@exept.de>
parents: 587
diff changeset
  2565
    cls isNil ifTrue:[
1983
5528c812da8f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1976
diff changeset
  2566
        cls := specClassName.
609
60f89fba074a Allow opening of a GUI Painter for a subSpecification.
Stefan Vogel <sv@exept.de>
parents: 587
diff changeset
  2567
    ].
1983
5528c812da8f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1976
diff changeset
  2568
    (cls := self resolveName:cls inClass:(Smalltalk at: specClassName asSymbol)) isNil ifTrue:[
1523
a8fe5e15220b *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1521
diff changeset
  2569
        spec majorKey isNil ifTrue:[
a8fe5e15220b *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1521
diff changeset
  2570
            ^ self warn:'Cannot find class (no majorKey specified).'.
a8fe5e15220b *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1521
diff changeset
  2571
        ].
a8fe5e15220b *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1521
diff changeset
  2572
        ^ self warn:('Cannot find class ', spec majorKey asBoldText, '.').
609
60f89fba074a Allow opening of a GUI Painter for a subSpecification.
Stefan Vogel <sv@exept.de>
parents: 587
diff changeset
  2573
    ].
60f89fba074a Allow opening of a GUI Painter for a subSpecification.
Stefan Vogel <sv@exept.de>
parents: 587
diff changeset
  2574
    sel := spec minorKey.
60f89fba074a Allow opening of a GUI Painter for a subSpecification.
Stefan Vogel <sv@exept.de>
parents: 587
diff changeset
  2575
    meta := cls class whichClassIncludesSelector:sel.
60f89fba074a Allow opening of a GUI Painter for a subSpecification.
Stefan Vogel <sv@exept.de>
parents: 587
diff changeset
  2576
    meta isNil ifTrue:[
1523
a8fe5e15220b *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1521
diff changeset
  2577
        ^ self warn:'Cannot find selector #', (sel ? '') asBoldText, ' in class ', cls name asBoldText, '!!'
609
60f89fba074a Allow opening of a GUI Painter for a subSpecification.
Stefan Vogel <sv@exept.de>
parents: 587
diff changeset
  2578
    ].
60f89fba074a Allow opening of a GUI Painter for a subSpecification.
Stefan Vogel <sv@exept.de>
parents: 587
diff changeset
  2579
1523
a8fe5e15220b *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1521
diff changeset
  2580
    self class 
a8fe5e15220b *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1521
diff changeset
  2581
        openOnClass:meta soleInstance 
a8fe5e15220b *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1521
diff changeset
  2582
        andSelector:spec minorKey.
a8fe5e15220b *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1521
diff changeset
  2583
a8fe5e15220b *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1521
diff changeset
  2584
    "Modified: / 5.11.2001 / 16:51:46 / cg"
609
60f89fba074a Allow opening of a GUI Painter for a subSpecification.
Stefan Vogel <sv@exept.de>
parents: 587
diff changeset
  2585
!
60f89fba074a Allow opening of a GUI Painter for a subSpecification.
Stefan Vogel <sv@exept.de>
parents: 587
diff changeset
  2586
743
d58a3e7e39d5 support user defined font styles
tz
parents: 735
diff changeset
  2587
openTabListEditor
765
27936ff059d3 obselete methods removed + comments revised
tz
parents: 755
diff changeset
  2588
    "opens a Tab List Editor on current widget"
27936ff059d3 obselete methods removed + comments revised
tz
parents: 755
diff changeset
  2589
1453
0cf534cc29a9 bugfix when after close subtool (table menu ..) when reading selector
ca
parents: 1444
diff changeset
  2590
    |selector editor spec cls holder|
0cf534cc29a9 bugfix when after close subtool (table menu ..) when reading selector
ca
parents: 1444
diff changeset
  2591
1983
5528c812da8f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1976
diff changeset
  2592
    (cls := self resolveName:specClassName) isNil ifTrue:[
5528c812da8f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1976
diff changeset
  2593
        self askForSaving ifTrue:[cls := self resolveName:specClassName].
513
a0d00fecb49a support of TabItemEditor
ca
parents: 512
diff changeset
  2594
    ].
1453
0cf534cc29a9 bugfix when after close subtool (table menu ..) when reading selector
ca
parents: 1444
diff changeset
  2595
    cls isNil ifTrue:[^ self].
0cf534cc29a9 bugfix when after close subtool (table menu ..) when reading selector
ca
parents: 1444
diff changeset
  2596
0cf534cc29a9 bugfix when after close subtool (table menu ..) when reading selector
ca
parents: 1444
diff changeset
  2597
    self modifiedChannel value ifTrue:[
0cf534cc29a9 bugfix when after close subtool (table menu ..) when reading selector
ca
parents: 1444
diff changeset
  2598
        (self confirm:'Accept changes made to spec ?') ifTrue:[
0cf534cc29a9 bugfix when after close subtool (table menu ..) when reading selector
ca
parents: 1444
diff changeset
  2599
            self accept
0cf534cc29a9 bugfix when after close subtool (table menu ..) when reading selector
ca
parents: 1444
diff changeset
  2600
        ]
0cf534cc29a9 bugfix when after close subtool (table menu ..) when reading selector
ca
parents: 1444
diff changeset
  2601
    ].
892
b200d2d9bf5e avoid repeated send-sequences
Claus Gittinger <cg@exept.de>
parents: 890
diff changeset
  2602
    spec := self specTool specification.
1453
0cf534cc29a9 bugfix when after close subtool (table menu ..) when reading selector
ca
parents: 1444
diff changeset
  2603
892
b200d2d9bf5e avoid repeated send-sequences
Claus Gittinger <cg@exept.de>
parents: 890
diff changeset
  2604
    (selector := spec listSelector) isArray 
1453
0cf534cc29a9 bugfix when after close subtool (table menu ..) when reading selector
ca
parents: 1444
diff changeset
  2605
        ifTrue: [^self warn: 'Cannot open the Tab List Editor on an array!!'].
743
d58a3e7e39d5 support user defined font styles
tz
parents: 735
diff changeset
  2606
d58a3e7e39d5 support user defined font styles
tz
parents: 735
diff changeset
  2607
    editor := TabListEditor new.
513
a0d00fecb49a support of TabItemEditor
ca
parents: 512
diff changeset
  2608
    editor masterApplication:self.
1453
0cf534cc29a9 bugfix when after close subtool (table menu ..) when reading selector
ca
parents: 1444
diff changeset
  2609
    editor openModalOnClass:cls andSelector:selector.
0cf534cc29a9 bugfix when after close subtool (table menu ..) when reading selector
ca
parents: 1444
diff changeset
  2610
0cf534cc29a9 bugfix when after close subtool (table menu ..) when reading selector
ca
parents: 1444
diff changeset
  2611
    editor hasSaved ifTrue:[
0cf534cc29a9 bugfix when after close subtool (table menu ..) when reading selector
ca
parents: 1444
diff changeset
  2612
        holder := self specTool aspectFor:#listSelector.
0cf534cc29a9 bugfix when after close subtool (table menu ..) when reading selector
ca
parents: 1444
diff changeset
  2613
0cf534cc29a9 bugfix when after close subtool (table menu ..) when reading selector
ca
parents: 1444
diff changeset
  2614
        holder value ~= editor specSelector ifTrue:[
0cf534cc29a9 bugfix when after close subtool (table menu ..) when reading selector
ca
parents: 1444
diff changeset
  2615
            holder value:editor specSelector.
0cf534cc29a9 bugfix when after close subtool (table menu ..) when reading selector
ca
parents: 1444
diff changeset
  2616
            self accept.
0cf534cc29a9 bugfix when after close subtool (table menu ..) when reading selector
ca
parents: 1444
diff changeset
  2617
        ]
0cf534cc29a9 bugfix when after close subtool (table menu ..) when reading selector
ca
parents: 1444
diff changeset
  2618
    ].
513
a0d00fecb49a support of TabItemEditor
ca
parents: 512
diff changeset
  2619
! !
a0d00fecb49a support of TabItemEditor
ca
parents: 512
diff changeset
  2620
109
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
  2621
!UIPainter methodsFor:'change & update'!
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
  2622
222
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  2623
layoutChanged
282
bb88d92ae887 checkin from browser
ca
parents: 281
diff changeset
  2624
    "called by the painter/canvas whenever the layout of the current selected
765
27936ff059d3 obselete methods removed + comments revised
tz
parents: 755
diff changeset
  2625
     widget has changed"
27936ff059d3 obselete methods removed + comments revised
tz
parents: 755
diff changeset
  2626
272
99de6af43afa confirm/cancel changes before switching a section or widget
ca
parents: 271
diff changeset
  2627
    self isModified ifFalse:[
1188
4805027d9d33 code cleanup
Claus Gittinger <cg@exept.de>
parents: 1186
diff changeset
  2628
        self layoutTool update.
4805027d9d33 code cleanup
Claus Gittinger <cg@exept.de>
parents: 1186
diff changeset
  2629
        self clearModifiedFlag
222
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  2630
    ]
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  2631
!
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  2632
272
99de6af43afa confirm/cancel changes before switching a section or widget
ca
parents: 271
diff changeset
  2633
propertyChanged
282
bb88d92ae887 checkin from browser
ca
parents: 281
diff changeset
  2634
    "called by the painter/canvas whenever the property of the current selected
765
27936ff059d3 obselete methods removed + comments revised
tz
parents: 755
diff changeset
  2635
     widget has changed"
27936ff059d3 obselete methods removed + comments revised
tz
parents: 755
diff changeset
  2636
1071
560a9eb1a5d8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1068
diff changeset
  2637
    |property spec|
765
27936ff059d3 obselete methods removed + comments revised
tz
parents: 755
diff changeset
  2638
27936ff059d3 obselete methods removed + comments revised
tz
parents: 755
diff changeset
  2639
    (property := treeView propertySelected) notNil ifTrue:[
1188
4805027d9d33 code cleanup
Claus Gittinger <cg@exept.de>
parents: 1186
diff changeset
  2640
        spec := property spec copy.
4805027d9d33 code cleanup
Claus Gittinger <cg@exept.de>
parents: 1186
diff changeset
  2641
        self specTool specification:spec.
4805027d9d33 code cleanup
Claus Gittinger <cg@exept.de>
parents: 1186
diff changeset
  2642
        self setViewInLayoutTool:(property view) spec:spec.
4805027d9d33 code cleanup
Claus Gittinger <cg@exept.de>
parents: 1186
diff changeset
  2643
        self clearModifiedFlag
272
99de6af43afa confirm/cancel changes before switching a section or widget
ca
parents: 271
diff changeset
  2644
    ] ifFalse:[
1188
4805027d9d33 code cleanup
Claus Gittinger <cg@exept.de>
parents: 1186
diff changeset
  2645
        self layoutTool layoutView notNil ifTrue:[
4805027d9d33 code cleanup
Claus Gittinger <cg@exept.de>
parents: 1186
diff changeset
  2646
            self clearModifiedFlag.
1710
4d81ff7b3412 autoAccept on selectionChange; ok -> apply;
Claus Gittinger <cg@exept.de>
parents: 1698
diff changeset
  2647
            self treeSelectionChanged
1188
4805027d9d33 code cleanup
Claus Gittinger <cg@exept.de>
parents: 1186
diff changeset
  2648
        ]
272
99de6af43afa confirm/cancel changes before switching a section or widget
ca
parents: 271
diff changeset
  2649
    ]
222
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  2650
!
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  2651
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  2652
update:something with:aParameter from:someObject
765
27936ff059d3 obselete methods removed + comments revised
tz
parents: 755
diff changeset
  2653
    "catches change notifications"
27936ff059d3 obselete methods removed + comments revised
tz
parents: 755
diff changeset
  2654
1710
4d81ff7b3412 autoAccept on selectionChange; ok -> apply;
Claus Gittinger <cg@exept.de>
parents: 1698
diff changeset
  2655
    |window lbl|
892
b200d2d9bf5e avoid repeated send-sequences
Claus Gittinger <cg@exept.de>
parents: 890
diff changeset
  2656
222
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  2657
    someObject == treeView model ifTrue:[
1710
4d81ff7b3412 autoAccept on selectionChange; ok -> apply;
Claus Gittinger <cg@exept.de>
parents: 1698
diff changeset
  2658
        (something == #selection
4d81ff7b3412 autoAccept on selectionChange; ok -> apply;
Claus Gittinger <cg@exept.de>
parents: 1698
diff changeset
  2659
        or:[something == #selectionIndex]) ifTrue:[self treeSelectionChanged].
2198
804e778590fc slightly refactored to allow for more redefinition in a subclass
Claus Gittinger <cg@exept.de>
parents: 2175
diff changeset
  2660
        ^ self
173
a8468f4e83f0 show/hide painter/gallery
ca
parents: 171
diff changeset
  2661
    ].
a8468f4e83f0 show/hide painter/gallery
ca
parents: 171
diff changeset
  2662
892
b200d2d9bf5e avoid repeated send-sequences
Claus Gittinger <cg@exept.de>
parents: 890
diff changeset
  2663
    someObject == self galleryShown ifTrue:[
1710
4d81ff7b3412 autoAccept on selectionChange; ok -> apply;
Claus Gittinger <cg@exept.de>
parents: 1698
diff changeset
  2664
        "/ galleryShown toggle changed
4d81ff7b3412 autoAccept on selectionChange; ok -> apply;
Claus Gittinger <cg@exept.de>
parents: 1698
diff changeset
  2665
        window := selectionPanel window.
4d81ff7b3412 autoAccept on selectionChange; ok -> apply;
Claus Gittinger <cg@exept.de>
parents: 1698
diff changeset
  2666
        (someObject value) ifTrue:[
4d81ff7b3412 autoAccept on selectionChange; ok -> apply;
Claus Gittinger <cg@exept.de>
parents: 1698
diff changeset
  2667
            self raiseUIView:window
4d81ff7b3412 autoAccept on selectionChange; ok -> apply;
Claus Gittinger <cg@exept.de>
parents: 1698
diff changeset
  2668
        ] ifFalse:[
4d81ff7b3412 autoAccept on selectionChange; ok -> apply;
Claus Gittinger <cg@exept.de>
parents: 1698
diff changeset
  2669
            self hideUIView:window
4d81ff7b3412 autoAccept on selectionChange; ok -> apply;
Claus Gittinger <cg@exept.de>
parents: 1698
diff changeset
  2670
        ].
2198
804e778590fc slightly refactored to allow for more redefinition in a subclass
Claus Gittinger <cg@exept.de>
parents: 2175
diff changeset
  2671
        ^ self
173
a8468f4e83f0 show/hide painter/gallery
ca
parents: 171
diff changeset
  2672
    ].
a8468f4e83f0 show/hide painter/gallery
ca
parents: 171
diff changeset
  2673
892
b200d2d9bf5e avoid repeated send-sequences
Claus Gittinger <cg@exept.de>
parents: 890
diff changeset
  2674
    someObject == self painterShown ifTrue:[
1710
4d81ff7b3412 autoAccept on selectionChange; ok -> apply;
Claus Gittinger <cg@exept.de>
parents: 1698
diff changeset
  2675
        "/ canvasShown toggle changed
4d81ff7b3412 autoAccept on selectionChange; ok -> apply;
Claus Gittinger <cg@exept.de>
parents: 1698
diff changeset
  2676
        window := self painter topView.
4d81ff7b3412 autoAccept on selectionChange; ok -> apply;
Claus Gittinger <cg@exept.de>
parents: 1698
diff changeset
  2677
        (someObject value) ifTrue:[
4d81ff7b3412 autoAccept on selectionChange; ok -> apply;
Claus Gittinger <cg@exept.de>
parents: 1698
diff changeset
  2678
            self raiseUIView:window
4d81ff7b3412 autoAccept on selectionChange; ok -> apply;
Claus Gittinger <cg@exept.de>
parents: 1698
diff changeset
  2679
        ] ifFalse:[
4d81ff7b3412 autoAccept on selectionChange; ok -> apply;
Claus Gittinger <cg@exept.de>
parents: 1698
diff changeset
  2680
            self hideUIView:window
4d81ff7b3412 autoAccept on selectionChange; ok -> apply;
Claus Gittinger <cg@exept.de>
parents: 1698
diff changeset
  2681
        ].
2198
804e778590fc slightly refactored to allow for more redefinition in a subclass
Claus Gittinger <cg@exept.de>
parents: 2175
diff changeset
  2682
        ^ self
173
a8468f4e83f0 show/hide painter/gallery
ca
parents: 171
diff changeset
  2683
    ].
a8468f4e83f0 show/hide painter/gallery
ca
parents: 171
diff changeset
  2684
1710
4d81ff7b3412 autoAccept on selectionChange; ok -> apply;
Claus Gittinger <cg@exept.de>
parents: 1698
diff changeset
  2685
    someObject == self autoAcceptOnSelectionChange ifTrue:[
4d81ff7b3412 autoAccept on selectionChange; ok -> apply;
Claus Gittinger <cg@exept.de>
parents: 1698
diff changeset
  2686
        lbl := someObject value ifTrue:['Apply'] ifFalse:['OK'].
4d81ff7b3412 autoAccept on selectionChange; ok -> apply;
Claus Gittinger <cg@exept.de>
parents: 1698
diff changeset
  2687
        (builder componentAt:'acceptButton') label:(resources string:lbl).
4d81ff7b3412 autoAccept on selectionChange; ok -> apply;
Claus Gittinger <cg@exept.de>
parents: 1698
diff changeset
  2688
        ^ self
4d81ff7b3412 autoAccept on selectionChange; ok -> apply;
Claus Gittinger <cg@exept.de>
parents: 1698
diff changeset
  2689
    ].
4d81ff7b3412 autoAccept on selectionChange; ok -> apply;
Claus Gittinger <cg@exept.de>
parents: 1698
diff changeset
  2690
892
b200d2d9bf5e avoid repeated send-sequences
Claus Gittinger <cg@exept.de>
parents: 890
diff changeset
  2691
    "Modified: / 16.7.1998 / 19:09:57 / cg"
884
a291fc248a8b images moved to class Icon
tz
parents: 877
diff changeset
  2692
!
a291fc248a8b images moved to class Icon
tz
parents: 877
diff changeset
  2693
a291fc248a8b images moved to class Icon
tz
parents: 877
diff changeset
  2694
updateChannels
a291fc248a8b images moved to class Icon
tz
parents: 877
diff changeset
  2695
    "updates the channels"
a291fc248a8b images moved to class Icon
tz
parents: 877
diff changeset
  2696
892
b200d2d9bf5e avoid repeated send-sequences
Claus Gittinger <cg@exept.de>
parents: 890
diff changeset
  2697
    |canCutOrCopy canPaste clipboard sel treeSelection|
884
a291fc248a8b images moved to class Icon
tz
parents: 877
diff changeset
  2698
a291fc248a8b images moved to class Icon
tz
parents: 877
diff changeset
  2699
    self canMoveOrAlignSelection        value:(treeView canMoveOrAlignSelection).
1230
23e5d0c133e8 added exchangeLayouts function
Claus Gittinger <cg@exept.de>
parents: 1211
diff changeset
  2700
    self canExchangeSelectionLayouts    value:(treeView canExchangeSelectionLayouts).
884
a291fc248a8b images moved to class Icon
tz
parents: 877
diff changeset
  2701
    self canChangeOrderInContainer      value:(treeView canChangeOrderInContainer).
a291fc248a8b images moved to class Icon
tz
parents: 877
diff changeset
  2702
    self canMoveSelectionIntoContainer  value:(treeView canMoveSelectionIntoContainer).
a291fc248a8b images moved to class Icon
tz
parents: 877
diff changeset
  2703
    self canMoveSelectionOutOfContainer value:(treeView canMoveSelectionOutOfContainer).
a291fc248a8b images moved to class Icon
tz
parents: 877
diff changeset
  2704
    self hasOneSelectionOtherThanCanvas value:(treeView hasOneSelectionOtherThanCanvas).
a291fc248a8b images moved to class Icon
tz
parents: 877
diff changeset
  2705
a291fc248a8b images moved to class Icon
tz
parents: 877
diff changeset
  2706
    treeView notNil
a291fc248a8b images moved to class Icon
tz
parents: 877
diff changeset
  2707
    ifTrue:
a291fc248a8b images moved to class Icon
tz
parents: 877
diff changeset
  2708
    [
1230
23e5d0c133e8 added exchangeLayouts function
Claus Gittinger <cg@exept.de>
parents: 1211
diff changeset
  2709
        treeSelection := treeView selection.
23e5d0c133e8 added exchangeLayouts function
Claus Gittinger <cg@exept.de>
parents: 1211
diff changeset
  2710
        "/ the top-node cannot be cut, copied or pasted.
23e5d0c133e8 added exchangeLayouts function
Claus Gittinger <cg@exept.de>
parents: 1211
diff changeset
  2711
        canCutOrCopy := treeSelection size >= 1 and:[treeSelection first ~~ 1].
1872
ab5cc43b193a get selection interface changed
ca
parents: 1870
diff changeset
  2712
        clipboard := self getClipboardObject.
ab5cc43b193a get selection interface changed
ca
parents: 1870
diff changeset
  2713
ab5cc43b193a get selection interface changed
ca
parents: 1870
diff changeset
  2714
        clipboard isCollection 
ab5cc43b193a get selection interface changed
ca
parents: 1870
diff changeset
  2715
                ifTrue:[clipboard notEmpty ifTrue:[sel := clipboard first]]
ab5cc43b193a get selection interface changed
ca
parents: 1870
diff changeset
  2716
                ifFalse:[sel := clipboard].
1230
23e5d0c133e8 added exchangeLayouts function
Claus Gittinger <cg@exept.de>
parents: 1211
diff changeset
  2717
1621
112670159075 cg: check if selection change is allowed BEFORE changing the
tm
parents: 1608
diff changeset
  2718
        canPaste := (sel isKindOf:UISpecification) 
112670159075 cg: check if selection change is allowed BEFORE changing the
tm
parents: 1608
diff changeset
  2719
"/                    and:[treeSelection size  = 1 
112670159075 cg: check if selection change is allowed BEFORE changing the
tm
parents: 1608
diff changeset
  2720
"/                    and:[treeSelection first == 1 
112670159075 cg: check if selection change is allowed BEFORE changing the
tm
parents: 1608
diff changeset
  2721
"/                         or: [self canPasteInto: treeView selectedNode contents view]]]
884
a291fc248a8b images moved to class Icon
tz
parents: 877
diff changeset
  2722
    ].
a291fc248a8b images moved to class Icon
tz
parents: 877
diff changeset
  2723
1991
feaad07cb3cf valueOf* methods renamed
Claus Gittinger <cg@exept.de>
parents: 1983
diff changeset
  2724
    self canCutHolder value: canCutOrCopy.
feaad07cb3cf valueOf* methods renamed
Claus Gittinger <cg@exept.de>
parents: 1983
diff changeset
  2725
    self canCopyHolder value: canCutOrCopy.
feaad07cb3cf valueOf* methods renamed
Claus Gittinger <cg@exept.de>
parents: 1983
diff changeset
  2726
    self canPasteHolder value: canPaste.            
feaad07cb3cf valueOf* methods renamed
Claus Gittinger <cg@exept.de>
parents: 1983
diff changeset
  2727
    self canPasteKeepingLayoutHolder value: (canPaste "&  self canKeepLayoutInSelection").
892
b200d2d9bf5e avoid repeated send-sequences
Claus Gittinger <cg@exept.de>
parents: 890
diff changeset
  2728
1063
9e710dbc7c92 inputFields use modified & acceptChannels
Claus Gittinger <cg@exept.de>
parents: 1059
diff changeset
  2729
"/    self modifiedChannel value: false.
9e710dbc7c92 inputFields use modified & acceptChannels
Claus Gittinger <cg@exept.de>
parents: 1059
diff changeset
  2730
892
b200d2d9bf5e avoid repeated send-sequences
Claus Gittinger <cg@exept.de>
parents: 890
diff changeset
  2731
    "Modified: / 16.7.1998 / 19:13:30 / cg"
109
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
  2732
! !
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
  2733
952
c6408190dc6d checkin from browser
Claus Gittinger <cg@exept.de>
parents: 950
diff changeset
  2734
!UIPainter methodsFor:'defaults'!
c6408190dc6d checkin from browser
Claus Gittinger <cg@exept.de>
parents: 950
diff changeset
  2735
c6408190dc6d checkin from browser
Claus Gittinger <cg@exept.de>
parents: 950
diff changeset
  2736
aboutImage
c6408190dc6d checkin from browser
Claus Gittinger <cg@exept.de>
parents: 950
diff changeset
  2737
    "the image to be displayed in my about-box;
c6408190dc6d checkin from browser
Claus Gittinger <cg@exept.de>
parents: 950
diff changeset
  2738
     If nil is returned, thhe ST/X default image is used."
c6408190dc6d checkin from browser
Claus Gittinger <cg@exept.de>
parents: 950
diff changeset
  2739
c6408190dc6d checkin from browser
Claus Gittinger <cg@exept.de>
parents: 950
diff changeset
  2740
    ^ Image fromFile:'bitmaps/xpmBitmaps/misc_tools/setup_windows.xpm'
c6408190dc6d checkin from browser
Claus Gittinger <cg@exept.de>
parents: 950
diff changeset
  2741
c6408190dc6d checkin from browser
Claus Gittinger <cg@exept.de>
parents: 950
diff changeset
  2742
    "Created: / 13.8.1998 / 20:33:05 / cg"
1466
6fecdd5341dc allow for windowSpecClass to be customized
Claus Gittinger <cg@exept.de>
parents: 1461
diff changeset
  2743
!
6fecdd5341dc allow for windowSpecClass to be customized
Claus Gittinger <cg@exept.de>
parents: 1461
diff changeset
  2744
6fecdd5341dc allow for windowSpecClass to be customized
Claus Gittinger <cg@exept.de>
parents: 1461
diff changeset
  2745
defaultWindowSpecClass
6fecdd5341dc allow for windowSpecClass to be customized
Claus Gittinger <cg@exept.de>
parents: 1461
diff changeset
  2746
    ^ WindowSpec
952
c6408190dc6d checkin from browser
Claus Gittinger <cg@exept.de>
parents: 950
diff changeset
  2747
! !
c6408190dc6d checkin from browser
Claus Gittinger <cg@exept.de>
parents: 950
diff changeset
  2748
109
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
  2749
!UIPainter methodsFor:'event handling'!
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
  2750
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
  2751
doesNotUnderstand:aMessage
1940
0f9be199d1c5 +replace widget
Claus Gittinger <cg@exept.de>
parents: 1917
diff changeset
  2752
    "forward misunderstood messages to the painter"
282
bb88d92ae887 checkin from browser
ca
parents: 281
diff changeset
  2753
bb88d92ae887 checkin from browser
ca
parents: 281
diff changeset
  2754
    |painter|
bb88d92ae887 checkin from browser
ca
parents: 281
diff changeset
  2755
bb88d92ae887 checkin from browser
ca
parents: 281
diff changeset
  2756
    painter := self painter.
bb88d92ae887 checkin from browser
ca
parents: 281
diff changeset
  2757
bb88d92ae887 checkin from browser
ca
parents: 281
diff changeset
  2758
    (painter respondsTo:(aMessage selector)) ifTrue:[
1940
0f9be199d1c5 +replace widget
Claus Gittinger <cg@exept.de>
parents: 1917
diff changeset
  2759
        ^ aMessage sendTo:painter
282
bb88d92ae887 checkin from browser
ca
parents: 281
diff changeset
  2760
    ].
bb88d92ae887 checkin from browser
ca
parents: 281
diff changeset
  2761
    super doesNotUnderstand:aMessage
bb88d92ae887 checkin from browser
ca
parents: 281
diff changeset
  2762
1957
cd30f8cd59f8 Ctrl-CursorUp/Down in tree
Claus Gittinger <cg@exept.de>
parents: 1954
diff changeset
  2763
!
cd30f8cd59f8 Ctrl-CursorUp/Down in tree
Claus Gittinger <cg@exept.de>
parents: 1954
diff changeset
  2764
cd30f8cd59f8 Ctrl-CursorUp/Down in tree
Claus Gittinger <cg@exept.de>
parents: 1954
diff changeset
  2765
processEvent:anEvent
cd30f8cd59f8 Ctrl-CursorUp/Down in tree
Claus Gittinger <cg@exept.de>
parents: 1954
diff changeset
  2766
    "filter keyboard events.
cd30f8cd59f8 Ctrl-CursorUp/Down in tree
Claus Gittinger <cg@exept.de>
parents: 1954
diff changeset
  2767
     Return true, if I have eaten the event"
cd30f8cd59f8 Ctrl-CursorUp/Down in tree
Claus Gittinger <cg@exept.de>
parents: 1954
diff changeset
  2768
cd30f8cd59f8 Ctrl-CursorUp/Down in tree
Claus Gittinger <cg@exept.de>
parents: 1954
diff changeset
  2769
    |key|
cd30f8cd59f8 Ctrl-CursorUp/Down in tree
Claus Gittinger <cg@exept.de>
parents: 1954
diff changeset
  2770
cd30f8cd59f8 Ctrl-CursorUp/Down in tree
Claus Gittinger <cg@exept.de>
parents: 1954
diff changeset
  2771
    anEvent isKeyPressEvent ifTrue:[ 
cd30f8cd59f8 Ctrl-CursorUp/Down in tree
Claus Gittinger <cg@exept.de>
parents: 1954
diff changeset
  2772
cd30f8cd59f8 Ctrl-CursorUp/Down in tree
Claus Gittinger <cg@exept.de>
parents: 1954
diff changeset
  2773
        anEvent targetView == treeView ifFalse:[^ false].
cd30f8cd59f8 Ctrl-CursorUp/Down in tree
Claus Gittinger <cg@exept.de>
parents: 1954
diff changeset
  2774
        treeView hasFocus ifFalse:[^ false].
cd30f8cd59f8 Ctrl-CursorUp/Down in tree
Claus Gittinger <cg@exept.de>
parents: 1954
diff changeset
  2775
cd30f8cd59f8 Ctrl-CursorUp/Down in tree
Claus Gittinger <cg@exept.de>
parents: 1954
diff changeset
  2776
        key := anEvent key.
cd30f8cd59f8 Ctrl-CursorUp/Down in tree
Claus Gittinger <cg@exept.de>
parents: 1954
diff changeset
  2777
cd30f8cd59f8 Ctrl-CursorUp/Down in tree
Claus Gittinger <cg@exept.de>
parents: 1954
diff changeset
  2778
"/        (anEvent rawKey == #Cmdr) ifTrue:[
cd30f8cd59f8 Ctrl-CursorUp/Down in tree
Claus Gittinger <cg@exept.de>
parents: 1954
diff changeset
  2779
"/            self openNameEditorOnTreeSelection.
cd30f8cd59f8 Ctrl-CursorUp/Down in tree
Claus Gittinger <cg@exept.de>
parents: 1954
diff changeset
  2780
"/            ^ true.
cd30f8cd59f8 Ctrl-CursorUp/Down in tree
Claus Gittinger <cg@exept.de>
parents: 1954
diff changeset
  2781
"/        ].
cd30f8cd59f8 Ctrl-CursorUp/Down in tree
Claus Gittinger <cg@exept.de>
parents: 1954
diff changeset
  2782
        (anEvent rawKey == #CtrlCursorUp) ifTrue:[ 
cd30f8cd59f8 Ctrl-CursorUp/Down in tree
Claus Gittinger <cg@exept.de>
parents: 1954
diff changeset
  2783
            self doStepUp.
cd30f8cd59f8 Ctrl-CursorUp/Down in tree
Claus Gittinger <cg@exept.de>
parents: 1954
diff changeset
  2784
            ^ true.
cd30f8cd59f8 Ctrl-CursorUp/Down in tree
Claus Gittinger <cg@exept.de>
parents: 1954
diff changeset
  2785
        ].
cd30f8cd59f8 Ctrl-CursorUp/Down in tree
Claus Gittinger <cg@exept.de>
parents: 1954
diff changeset
  2786
        (anEvent rawKey == #CtrlCursorDown) ifTrue:[ 
cd30f8cd59f8 Ctrl-CursorUp/Down in tree
Claus Gittinger <cg@exept.de>
parents: 1954
diff changeset
  2787
            self doStepDown.
cd30f8cd59f8 Ctrl-CursorUp/Down in tree
Claus Gittinger <cg@exept.de>
parents: 1954
diff changeset
  2788
            ^ true.
cd30f8cd59f8 Ctrl-CursorUp/Down in tree
Claus Gittinger <cg@exept.de>
parents: 1954
diff changeset
  2789
        ].
cd30f8cd59f8 Ctrl-CursorUp/Down in tree
Claus Gittinger <cg@exept.de>
parents: 1954
diff changeset
  2790
        (anEvent rawKey == #CtrlCursorLeft) ifTrue:[ 
cd30f8cd59f8 Ctrl-CursorUp/Down in tree
Claus Gittinger <cg@exept.de>
parents: 1954
diff changeset
  2791
            self doStepOut.
cd30f8cd59f8 Ctrl-CursorUp/Down in tree
Claus Gittinger <cg@exept.de>
parents: 1954
diff changeset
  2792
            ^ true.
cd30f8cd59f8 Ctrl-CursorUp/Down in tree
Claus Gittinger <cg@exept.de>
parents: 1954
diff changeset
  2793
        ].
cd30f8cd59f8 Ctrl-CursorUp/Down in tree
Claus Gittinger <cg@exept.de>
parents: 1954
diff changeset
  2794
        (anEvent rawKey == #CtrlCursorRight) ifTrue:[ 
cd30f8cd59f8 Ctrl-CursorUp/Down in tree
Claus Gittinger <cg@exept.de>
parents: 1954
diff changeset
  2795
            self doStepIn.
cd30f8cd59f8 Ctrl-CursorUp/Down in tree
Claus Gittinger <cg@exept.de>
parents: 1954
diff changeset
  2796
            ^ true.
cd30f8cd59f8 Ctrl-CursorUp/Down in tree
Claus Gittinger <cg@exept.de>
parents: 1954
diff changeset
  2797
        ].
cd30f8cd59f8 Ctrl-CursorUp/Down in tree
Claus Gittinger <cg@exept.de>
parents: 1954
diff changeset
  2798
    ].
cd30f8cd59f8 Ctrl-CursorUp/Down in tree
Claus Gittinger <cg@exept.de>
parents: 1954
diff changeset
  2799
cd30f8cd59f8 Ctrl-CursorUp/Down in tree
Claus Gittinger <cg@exept.de>
parents: 1954
diff changeset
  2800
    ^ false.
282
bb88d92ae887 checkin from browser
ca
parents: 281
diff changeset
  2801
! !
bb88d92ae887 checkin from browser
ca
parents: 281
diff changeset
  2802
547
930b3df19305 help menu item aligned to the right
tz
parents: 542
diff changeset
  2803
!UIPainter methodsFor:'help'!
930b3df19305 help menu item aligned to the right
tz
parents: 542
diff changeset
  2804
572
ac2a1dd83d28 open tutorial added
tz
parents: 565
diff changeset
  2805
defaultInfoLabel
765
27936ff059d3 obselete methods removed + comments revised
tz
parents: 755
diff changeset
  2806
    "returns the default info label"
572
ac2a1dd83d28 open tutorial added
tz
parents: 565
diff changeset
  2807
2072
0b0a24d7b198 class vs. className confusion
Claus Gittinger <cg@exept.de>
parents: 2040
diff changeset
  2808
    specClassName isNil ifTrue: [^'No class defined.'].
877
f31f41b29710 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 852
diff changeset
  2809
    specSelector isNil ifTrue: [^'No selector defined.'].
2001
b12d9b4dd6f2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1994
diff changeset
  2810
    ^ specClassName printString, ' >> ', specSelector
877
f31f41b29710 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 852
diff changeset
  2811
2072
0b0a24d7b198 class vs. className confusion
Claus Gittinger <cg@exept.de>
parents: 2040
diff changeset
  2812
    "Modified: / 31-08-2006 / 10:12:03 / cg"
297
14db1276218c change the spec;
ca
parents: 295
diff changeset
  2813
! !
14db1276218c change the spec;
ca
parents: 295
diff changeset
  2814
1917
53832fa044f1 undo button
Claus Gittinger <cg@exept.de>
parents: 1883
diff changeset
  2815
!UIPainter methodsFor:'help spec'!
53832fa044f1 undo button
Claus Gittinger <cg@exept.de>
parents: 1883
diff changeset
  2816
53832fa044f1 undo button
Claus Gittinger <cg@exept.de>
parents: 1883
diff changeset
  2817
flyByHelpSpec
53832fa044f1 undo button
Claus Gittinger <cg@exept.de>
parents: 1883
diff changeset
  2818
    |spec|
53832fa044f1 undo button
Claus Gittinger <cg@exept.de>
parents: 1883
diff changeset
  2819
53832fa044f1 undo button
Claus Gittinger <cg@exept.de>
parents: 1883
diff changeset
  2820
    spec := self class flyByHelpSpec.
53832fa044f1 undo button
Claus Gittinger <cg@exept.de>
parents: 1883
diff changeset
  2821
    spec at:#editUndo put:(resources string:'Undo (%1)' 
53832fa044f1 undo button
Claus Gittinger <cg@exept.de>
parents: 1883
diff changeset
  2822
                        with:(resources string:self painter undoHistory labelOfLastUndo)).
53832fa044f1 undo button
Claus Gittinger <cg@exept.de>
parents: 1883
diff changeset
  2823
    ^ spec
53832fa044f1 undo button
Claus Gittinger <cg@exept.de>
parents: 1883
diff changeset
  2824
!
53832fa044f1 undo button
Claus Gittinger <cg@exept.de>
parents: 1883
diff changeset
  2825
53832fa044f1 undo button
Claus Gittinger <cg@exept.de>
parents: 1883
diff changeset
  2826
helpSpec
53832fa044f1 undo button
Claus Gittinger <cg@exept.de>
parents: 1883
diff changeset
  2827
    |spec|
53832fa044f1 undo button
Claus Gittinger <cg@exept.de>
parents: 1883
diff changeset
  2828
53832fa044f1 undo button
Claus Gittinger <cg@exept.de>
parents: 1883
diff changeset
  2829
    spec := self class helpSpec.
53832fa044f1 undo button
Claus Gittinger <cg@exept.de>
parents: 1883
diff changeset
  2830
    spec at:#editUndo put:(resources string:'Undo (%1)' 
53832fa044f1 undo button
Claus Gittinger <cg@exept.de>
parents: 1883
diff changeset
  2831
                        with:(resources string:self painter undoHistory labelOfLastUndo)).
53832fa044f1 undo button
Claus Gittinger <cg@exept.de>
parents: 1883
diff changeset
  2832
    ^ spec
53832fa044f1 undo button
Claus Gittinger <cg@exept.de>
parents: 1883
diff changeset
  2833
! !
53832fa044f1 undo button
Claus Gittinger <cg@exept.de>
parents: 1883
diff changeset
  2834
2023
7a37b7c85092 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2012
diff changeset
  2835
!UIPainter methodsFor:'initialization'!
7a37b7c85092 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2012
diff changeset
  2836
7a37b7c85092 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2012
diff changeset
  2837
initialize
2213
cb1e13d68761 UseViewScroller
Claus Gittinger <cg@exept.de>
parents: 2210
diff changeset
  2838
    |name scroller viewScroller|
2023
7a37b7c85092 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2012
diff changeset
  2839
7a37b7c85092 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2012
diff changeset
  2840
    super initialize.
7a37b7c85092 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2012
diff changeset
  2841
7a37b7c85092 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2012
diff changeset
  2842
    modified := false.
7a37b7c85092 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2012
diff changeset
  2843
    aspects := IdentityDictionary new.
7a37b7c85092 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2012
diff changeset
  2844
    aspects at:#classNameChannel put:'NewApplication' asValue.
7a37b7c85092 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2012
diff changeset
  2845
    aspects at:#superclassNameChannel put:'ApplicationModel' asValue.
7a37b7c85092 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2012
diff changeset
  2846
    aspects at:#methodNameChannel put:'windowSpec' asValue.
7a37b7c85092 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2012
diff changeset
  2847
7a37b7c85092 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2012
diff changeset
  2848
    treeView := TreeView new.
7a37b7c85092 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2012
diff changeset
  2849
    treeView windowSpecClass:(self defaultWindowSpecClass).
7a37b7c85092 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2012
diff changeset
  2850
    treeView 
7a37b7c85092 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2012
diff changeset
  2851
        selectConditionBlock:[:newSelection | self selectionChangeAllowed:newSelection ].
7a37b7c85092 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2012
diff changeset
  2852
7a37b7c85092 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2012
diff changeset
  2853
    painterView := StandardSystemView new.
7a37b7c85092 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2012
diff changeset
  2854
    name := name ? UIPainter defaultNameOfCanvas.
7a37b7c85092 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2012
diff changeset
  2855
    painterView beToolWindow.
7a37b7c85092 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2012
diff changeset
  2856
    painterView name:name.
7a37b7c85092 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2012
diff changeset
  2857
    painterView label:name.
7a37b7c85092 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2012
diff changeset
  2858
    painterView extent:(treeView windowSpecClass defaultExtentInUIPainter).
2213
cb1e13d68761 UseViewScroller
Claus Gittinger <cg@exept.de>
parents: 2210
diff changeset
  2859
cb1e13d68761 UseViewScroller
Claus Gittinger <cg@exept.de>
parents: 2210
diff changeset
  2860
    UseViewScroller == true ifTrue:[
cb1e13d68761 UseViewScroller
Claus Gittinger <cg@exept.de>
parents: 2210
diff changeset
  2861
        scroller := HVScrollableView for:ViewScroller in:painterView.
cb1e13d68761 UseViewScroller
Claus Gittinger <cg@exept.de>
parents: 2210
diff changeset
  2862
        scroller
cb1e13d68761 UseViewScroller
Claus Gittinger <cg@exept.de>
parents: 2210
diff changeset
  2863
            horizontalScrollable:true miniScroller:true;
cb1e13d68761 UseViewScroller
Claus Gittinger <cg@exept.de>
parents: 2210
diff changeset
  2864
            verticalScrollable:true; verticalMini:true;
cb1e13d68761 UseViewScroller
Claus Gittinger <cg@exept.de>
parents: 2210
diff changeset
  2865
            autoHideScrollBars:false;
cb1e13d68761 UseViewScroller
Claus Gittinger <cg@exept.de>
parents: 2210
diff changeset
  2866
            layout:(0.0 @ 0.0 corner:1.0 @ 1.0) asLayout.
cb1e13d68761 UseViewScroller
Claus Gittinger <cg@exept.de>
parents: 2210
diff changeset
  2867
        viewScroller := scroller scrolledView.
cb1e13d68761 UseViewScroller
Claus Gittinger <cg@exept.de>
parents: 2210
diff changeset
  2868
        painter := UIPainterView new.
cb1e13d68761 UseViewScroller
Claus Gittinger <cg@exept.de>
parents: 2210
diff changeset
  2869
        painter extent:300@300.
cb1e13d68761 UseViewScroller
Claus Gittinger <cg@exept.de>
parents: 2210
diff changeset
  2870
        viewScroller scrolledView:painter.
cb1e13d68761 UseViewScroller
Claus Gittinger <cg@exept.de>
parents: 2210
diff changeset
  2871
    ] ifFalse:[
cb1e13d68761 UseViewScroller
Claus Gittinger <cg@exept.de>
parents: 2210
diff changeset
  2872
        painter := UIPainterView in:painterView.
cb1e13d68761 UseViewScroller
Claus Gittinger <cg@exept.de>
parents: 2210
diff changeset
  2873
        painter layout:(0.0 @ 0.0 corner:1.0 @ 1.0) asLayout.
cb1e13d68761 UseViewScroller
Claus Gittinger <cg@exept.de>
parents: 2210
diff changeset
  2874
    ].
2023
7a37b7c85092 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2012
diff changeset
  2875
    treeView := treeView canvas:painter specName:name.
7a37b7c85092 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2012
diff changeset
  2876
    painter treeView:treeView.
7a37b7c85092 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2012
diff changeset
  2877
    treeView model addDependent:self.
7a37b7c85092 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2012
diff changeset
  2878
    painter enableChannel:(self enableChannel).
2198
804e778590fc slightly refactored to allow for more redefinition in a subclass
Claus Gittinger <cg@exept.de>
parents: 2175
diff changeset
  2879
804e778590fc slightly refactored to allow for more redefinition in a subclass
Claus Gittinger <cg@exept.de>
parents: 2175
diff changeset
  2880
    selectionPanel := self selectionPanelClass new.
804e778590fc slightly refactored to allow for more redefinition in a subclass
Claus Gittinger <cg@exept.de>
parents: 2175
diff changeset
  2881
    selectionPanel allButOpenInterface:#windowSpec.
2023
7a37b7c85092 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2012
diff changeset
  2882
! !
7a37b7c85092 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2012
diff changeset
  2883
1718
aedf32fc1715 method category rename
Claus Gittinger <cg@exept.de>
parents: 1716
diff changeset
  2884
!UIPainter methodsFor:'menus-dynamic'!
1521
2efd2b9419c4 undo: show type of undo in menu;
Claus Gittinger <cg@exept.de>
parents: 1499
diff changeset
  2885
2efd2b9419c4 undo: show type of undo in menu;
Claus Gittinger <cg@exept.de>
parents: 1499
diff changeset
  2886
menuEdit
1528
4136505d3cbe oops - menu was wrong
Claus Gittinger <cg@exept.de>
parents: 1523
diff changeset
  2887
    ^ [
4136505d3cbe oops - menu was wrong
Claus Gittinger <cg@exept.de>
parents: 1523
diff changeset
  2888
        |m i|
4136505d3cbe oops - menu was wrong
Claus Gittinger <cg@exept.de>
parents: 1523
diff changeset
  2889
4136505d3cbe oops - menu was wrong
Claus Gittinger <cg@exept.de>
parents: 1523
diff changeset
  2890
        m := self class menuEdit.
4136505d3cbe oops - menu was wrong
Claus Gittinger <cg@exept.de>
parents: 1523
diff changeset
  2891
        m := m decodeAsLiteralArray.
4136505d3cbe oops - menu was wrong
Claus Gittinger <cg@exept.de>
parents: 1523
diff changeset
  2892
        i := m detectItem:[:item | item nameKey == #undo] ifNone:nil.
4136505d3cbe oops - menu was wrong
Claus Gittinger <cg@exept.de>
parents: 1523
diff changeset
  2893
        i notNil ifTrue:[
1917
53832fa044f1 undo button
Claus Gittinger <cg@exept.de>
parents: 1883
diff changeset
  2894
            i label:(resources string:(i label , ' (%1)') 
53832fa044f1 undo button
Claus Gittinger <cg@exept.de>
parents: 1883
diff changeset
  2895
                        with:(resources string:self painter undoHistory labelOfLastUndo)).
1528
4136505d3cbe oops - menu was wrong
Claus Gittinger <cg@exept.de>
parents: 1523
diff changeset
  2896
        ].
1540
dda0bf556ebc findGuiResources... now sets the receiver, if not yet set
Claus Gittinger <cg@exept.de>
parents: 1528
diff changeset
  2897
        "/ m receiver:self.   -- now done in findGuiResources ...
1528
4136505d3cbe oops - menu was wrong
Claus Gittinger <cg@exept.de>
parents: 1523
diff changeset
  2898
        m findGuiResourcesIn:self.
4136505d3cbe oops - menu was wrong
Claus Gittinger <cg@exept.de>
parents: 1523
diff changeset
  2899
        m
4136505d3cbe oops - menu was wrong
Claus Gittinger <cg@exept.de>
parents: 1523
diff changeset
  2900
      ].
1940
0f9be199d1c5 +replace widget
Claus Gittinger <cg@exept.de>
parents: 1917
diff changeset
  2901
!
0f9be199d1c5 +replace widget
Claus Gittinger <cg@exept.de>
parents: 1917
diff changeset
  2902
0f9be199d1c5 +replace widget
Claus Gittinger <cg@exept.de>
parents: 1917
diff changeset
  2903
menuReplaceWidget
0f9be199d1c5 +replace widget
Claus Gittinger <cg@exept.de>
parents: 1917
diff changeset
  2904
    ^ [
0f9be199d1c5 +replace widget
Claus Gittinger <cg@exept.de>
parents: 1917
diff changeset
  2905
        |m i specAndView spec usefulReplacementSpecClasses|
0f9be199d1c5 +replace widget
Claus Gittinger <cg@exept.de>
parents: 1917
diff changeset
  2906
0f9be199d1c5 +replace widget
Claus Gittinger <cg@exept.de>
parents: 1917
diff changeset
  2907
        m := self class menuReplaceWidget.
0f9be199d1c5 +replace widget
Claus Gittinger <cg@exept.de>
parents: 1917
diff changeset
  2908
        m := m decodeAsLiteralArray.
0f9be199d1c5 +replace widget
Claus Gittinger <cg@exept.de>
parents: 1917
diff changeset
  2909
0f9be199d1c5 +replace widget
Claus Gittinger <cg@exept.de>
parents: 1917
diff changeset
  2910
        specAndView := self selectedSpecAndView.
0f9be199d1c5 +replace widget
Claus Gittinger <cg@exept.de>
parents: 1917
diff changeset
  2911
        spec := specAndView first.
1968
1a8b9416db6e *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1957
diff changeset
  2912
        spec notNil ifTrue:[
1a8b9416db6e *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1957
diff changeset
  2913
            usefulReplacementSpecClasses := spec usefulReplacementSpecClasses.
1a8b9416db6e *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1957
diff changeset
  2914
            usefulReplacementSpecClasses notEmptyOrNil ifTrue:[
1a8b9416db6e *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1957
diff changeset
  2915
                m addSeparator.
1a8b9416db6e *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1957
diff changeset
  2916
                usefulReplacementSpecClasses do:[:eachClass |      
1a8b9416db6e *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1957
diff changeset
  2917
                    |item|
1a8b9416db6e *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1957
diff changeset
  2918
1a8b9416db6e *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1957
diff changeset
  2919
                    item := MenuItem new label:(resources string:'Replace by %1' with:eachClass userFriendlyName).
1a8b9416db6e *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1957
diff changeset
  2920
                    item value:#replaceWidgetByClass:.
1a8b9416db6e *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1957
diff changeset
  2921
                    item argument:eachClass.
1a8b9416db6e *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1957
diff changeset
  2922
                    m addItem:item.
1a8b9416db6e *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1957
diff changeset
  2923
                ].
1940
0f9be199d1c5 +replace widget
Claus Gittinger <cg@exept.de>
parents: 1917
diff changeset
  2924
            ].
0f9be199d1c5 +replace widget
Claus Gittinger <cg@exept.de>
parents: 1917
diff changeset
  2925
        ].
0f9be199d1c5 +replace widget
Claus Gittinger <cg@exept.de>
parents: 1917
diff changeset
  2926
0f9be199d1c5 +replace widget
Claus Gittinger <cg@exept.de>
parents: 1917
diff changeset
  2927
        m findGuiResourcesIn:self.
0f9be199d1c5 +replace widget
Claus Gittinger <cg@exept.de>
parents: 1917
diff changeset
  2928
        m
0f9be199d1c5 +replace widget
Claus Gittinger <cg@exept.de>
parents: 1917
diff changeset
  2929
      ].
1521
2efd2b9419c4 undo: show type of undo in menu;
Claus Gittinger <cg@exept.de>
parents: 1499
diff changeset
  2930
! !
2efd2b9419c4 undo: show type of undo in menu;
Claus Gittinger <cg@exept.de>
parents: 1499
diff changeset
  2931
109
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
  2932
!UIPainter methodsFor:'private'!
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
  2933
729
12f157d5e017 askings for modifications completed (?)
tz
parents: 724
diff changeset
  2934
askForModification
765
27936ff059d3 obselete methods removed + comments revised
tz
parents: 755
diff changeset
  2935
    "asks for window spec modification"
27936ff059d3 obselete methods removed + comments revised
tz
parents: 755
diff changeset
  2936
1341
83fe4fae7c10 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1338
diff changeset
  2937
    |painter|
83fe4fae7c10 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1338
diff changeset
  2938
83fe4fae7c10 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1338
diff changeset
  2939
    painter := self painter.
83fe4fae7c10 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1338
diff changeset
  2940
765
27936ff059d3 obselete methods removed + comments revised
tz
parents: 755
diff changeset
  2941
    self askForSectionModification.    
729
12f157d5e017 askings for modifications completed (?)
tz
parents: 724
diff changeset
  2942
1341
83fe4fae7c10 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1338
diff changeset
  2943
    (modified or: [painter isModified or: [self helpTool modified]])
83fe4fae7c10 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1338
diff changeset
  2944
    ifTrue:[
1772
e33aee13defe Use 'Discard Changes and Exit' instead of 'Forget it...'
Stefan Vogel <sv@exept.de>
parents: 1760
diff changeset
  2945
        ((YesNoBox title:(resources string:'Window spec was modified. Exit anyway?'))        
1341
83fe4fae7c10 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1338
diff changeset
  2946
            noText:(resources string:'Cancel');
1772
e33aee13defe Use 'Discard Changes and Exit' instead of 'Forget it...'
Stefan Vogel <sv@exept.de>
parents: 1760
diff changeset
  2947
            yesText:(resources string:'Discard Changes and Exit');
1341
83fe4fae7c10 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1338
diff changeset
  2948
            showAtPointer;
83fe4fae7c10 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1338
diff changeset
  2949
            accepted) ifFalse: [^false].
2007
77cf7ecc9ecf embedding as special editors
Claus Gittinger <cg@exept.de>
parents: 2001
diff changeset
  2950
        self clearModified.
1341
83fe4fae7c10 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1338
diff changeset
  2951
        painter resetModification
729
12f157d5e017 askings for modifications completed (?)
tz
parents: 724
diff changeset
  2952
    ].
12f157d5e017 askings for modifications completed (?)
tz
parents: 724
diff changeset
  2953
    ^true
838
0ac5a26498c1 help texts & national strings
Claus Gittinger <cg@exept.de>
parents: 827
diff changeset
  2954
0ac5a26498c1 help texts & national strings
Claus Gittinger <cg@exept.de>
parents: 827
diff changeset
  2955
    "Modified: / 20.5.1998 / 02:03:16 / cg"
729
12f157d5e017 askings for modifications completed (?)
tz
parents: 724
diff changeset
  2956
!
12f157d5e017 askings for modifications completed (?)
tz
parents: 724
diff changeset
  2957
808
4e2ab5e77344 ask first for saving before calling other editors
tz
parents: 807
diff changeset
  2958
askForSaving
4e2ab5e77344 ask first for saving before calling other editors
tz
parents: 807
diff changeset
  2959
    "asks for defining an application class"
4e2ab5e77344 ask first for saving before calling other editors
tz
parents: 807
diff changeset
  2960
4e2ab5e77344 ask first for saving before calling other editors
tz
parents: 807
diff changeset
  2961
    self askForSectionModification.    
4e2ab5e77344 ask first for saving before calling other editors
tz
parents: 807
diff changeset
  2962
4e2ab5e77344 ask first for saving before calling other editors
tz
parents: 807
diff changeset
  2963
    ((YesNoBox title:'No application class defined yet!!')        
2217
b54632779619 Use class var for SelectionPanel
Stefan Vogel <sv@exept.de>
parents: 2213
diff changeset
  2964
        noText:'Cancel';
b54632779619 Use class var for SelectionPanel
Stefan Vogel <sv@exept.de>
parents: 2213
diff changeset
  2965
        yesText:'Define';
b54632779619 Use class var for SelectionPanel
Stefan Vogel <sv@exept.de>
parents: 2213
diff changeset
  2966
        showAtPointer;
b54632779619 Use class var for SelectionPanel
Stefan Vogel <sv@exept.de>
parents: 2213
diff changeset
  2967
        accepted) ifFalse: [^false].
808
4e2ab5e77344 ask first for saving before calling other editors
tz
parents: 807
diff changeset
  2968
4e2ab5e77344 ask first for saving before calling other editors
tz
parents: 807
diff changeset
  2969
    self doSave.
4e2ab5e77344 ask first for saving before calling other editors
tz
parents: 807
diff changeset
  2970
4e2ab5e77344 ask first for saving before calling other editors
tz
parents: 807
diff changeset
  2971
    ^true
4e2ab5e77344 ask first for saving before calling other editors
tz
parents: 807
diff changeset
  2972
!
4e2ab5e77344 ask first for saving before calling other editors
tz
parents: 807
diff changeset
  2973
765
27936ff059d3 obselete methods removed + comments revised
tz
parents: 755
diff changeset
  2974
askForSectionModification
27936ff059d3 obselete methods removed + comments revised
tz
parents: 755
diff changeset
  2975
    "asks for section modification in the notebook"
27936ff059d3 obselete methods removed + comments revised
tz
parents: 755
diff changeset
  2976
27936ff059d3 obselete methods removed + comments revised
tz
parents: 755
diff changeset
  2977
    self isModified ifTrue:[
2217
b54632779619 Use class var for SelectionPanel
Stefan Vogel <sv@exept.de>
parents: 2213
diff changeset
  2978
        (self confirm:'Accept modifications in section ' , tabSelection printString asBoldText, '?') ifTrue:[
b54632779619 Use class var for SelectionPanel
Stefan Vogel <sv@exept.de>
parents: 2213
diff changeset
  2979
            self accept
b54632779619 Use class var for SelectionPanel
Stefan Vogel <sv@exept.de>
parents: 2213
diff changeset
  2980
        ] ifFalse: [
b54632779619 Use class var for SelectionPanel
Stefan Vogel <sv@exept.de>
parents: 2213
diff changeset
  2981
            self cancel
b54632779619 Use class var for SelectionPanel
Stefan Vogel <sv@exept.de>
parents: 2213
diff changeset
  2982
        ]
765
27936ff059d3 obselete methods removed + comments revised
tz
parents: 755
diff changeset
  2983
    ]
27936ff059d3 obselete methods removed + comments revised
tz
parents: 755
diff changeset
  2984
!
27936ff059d3 obselete methods removed + comments revised
tz
parents: 755
diff changeset
  2985
743
d58a3e7e39d5 support user defined font styles
tz
parents: 735
diff changeset
  2986
checkClassAndSelector
765
27936ff059d3 obselete methods removed + comments revised
tz
parents: 755
diff changeset
  2987
    "checks for class & superclass"
743
d58a3e7e39d5 support user defined font styles
tz
parents: 735
diff changeset
  2988
1211
53cfc272acc9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1204
diff changeset
  2989
    |superclass cls|
743
d58a3e7e39d5 support user defined font styles
tz
parents: 735
diff changeset
  2990
1983
5528c812da8f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1976
diff changeset
  2991
    specClassName isNil ifTrue:[^ false].
5528c812da8f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1976
diff changeset
  2992
5528c812da8f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1976
diff changeset
  2993
    cls := self resolveName:specClassName.
743
d58a3e7e39d5 support user defined font styles
tz
parents: 735
diff changeset
  2994
d58a3e7e39d5 support user defined font styles
tz
parents: 735
diff changeset
  2995
    cls isNil ifTrue:[
1976
969584dd8beb code cleanup & refactoring
Claus Gittinger <cg@exept.de>
parents: 1968
diff changeset
  2996
        superclass := self resolveName:specSuperclassName.
969584dd8beb code cleanup & refactoring
Claus Gittinger <cg@exept.de>
parents: 1968
diff changeset
  2997
969584dd8beb code cleanup & refactoring
Claus Gittinger <cg@exept.de>
parents: 1968
diff changeset
  2998
        superclass isNil ifTrue:[
969584dd8beb code cleanup & refactoring
Claus Gittinger <cg@exept.de>
parents: 1968
diff changeset
  2999
            self warn:'No class named ' , specSuperclassName , ' exists!!'.
969584dd8beb code cleanup & refactoring
Claus Gittinger <cg@exept.de>
parents: 1968
diff changeset
  3000
            ^ false.
969584dd8beb code cleanup & refactoring
Claus Gittinger <cg@exept.de>
parents: 1968
diff changeset
  3001
        ].
969584dd8beb code cleanup & refactoring
Claus Gittinger <cg@exept.de>
parents: 1968
diff changeset
  3002
1983
5528c812da8f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1976
diff changeset
  3003
        (self confirm:'Create class ' , specClassName asBoldText, '?') ifTrue:[
1976
969584dd8beb code cleanup & refactoring
Claus Gittinger <cg@exept.de>
parents: 1968
diff changeset
  3004
            cls := superclass 
1983
5528c812da8f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1976
diff changeset
  3005
                        subclass:(specClassName asSymbol)
1976
969584dd8beb code cleanup & refactoring
Claus Gittinger <cg@exept.de>
parents: 1968
diff changeset
  3006
                        instanceVariableNames:''
969584dd8beb code cleanup & refactoring
Claus Gittinger <cg@exept.de>
parents: 1968
diff changeset
  3007
                        classVariableNames:''
969584dd8beb code cleanup & refactoring
Claus Gittinger <cg@exept.de>
parents: 1968
diff changeset
  3008
                        poolDictionaries:''
969584dd8beb code cleanup & refactoring
Claus Gittinger <cg@exept.de>
parents: 1968
diff changeset
  3009
                        category:'Applications'.
969584dd8beb code cleanup & refactoring
Claus Gittinger <cg@exept.de>
parents: 1968
diff changeset
  3010
1983
5528c812da8f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1976
diff changeset
  3011
            cls name ~= specClassName ifTrue:[
1976
969584dd8beb code cleanup & refactoring
Claus Gittinger <cg@exept.de>
parents: 1968
diff changeset
  3012
                self information:'Created new class is ' , cls name.
1983
5528c812da8f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1976
diff changeset
  3013
                specClassName := cls name
1976
969584dd8beb code cleanup & refactoring
Claus Gittinger <cg@exept.de>
parents: 1968
diff changeset
  3014
            ].
969584dd8beb code cleanup & refactoring
Claus Gittinger <cg@exept.de>
parents: 1968
diff changeset
  3015
            ^ true.
969584dd8beb code cleanup & refactoring
Claus Gittinger <cg@exept.de>
parents: 1968
diff changeset
  3016
        ].
969584dd8beb code cleanup & refactoring
Claus Gittinger <cg@exept.de>
parents: 1968
diff changeset
  3017
        ^ false.
743
d58a3e7e39d5 support user defined font styles
tz
parents: 735
diff changeset
  3018
    ].
d58a3e7e39d5 support user defined font styles
tz
parents: 735
diff changeset
  3019
    cls isBehavior ifFalse:[
1983
5528c812da8f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1976
diff changeset
  3020
        self warn:'A global named ' , specClassName , ' exists, but it is no class.'.
1976
969584dd8beb code cleanup & refactoring
Claus Gittinger <cg@exept.de>
parents: 1968
diff changeset
  3021
        ^ false.
743
d58a3e7e39d5 support user defined font styles
tz
parents: 735
diff changeset
  3022
    ].
d58a3e7e39d5 support user defined font styles
tz
parents: 735
diff changeset
  3023
1976
969584dd8beb code cleanup & refactoring
Claus Gittinger <cg@exept.de>
parents: 1968
diff changeset
  3024
    specSuperclassName isBehavior ifFalse:[
2001
b12d9b4dd6f2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1994
diff changeset
  3025
        specSuperclassName notEmptyOrNil ifTrue:[
1976
969584dd8beb code cleanup & refactoring
Claus Gittinger <cg@exept.de>
parents: 1968
diff changeset
  3026
            superclass := self resolveName:specSuperclassName
2001
b12d9b4dd6f2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1994
diff changeset
  3027
        ] ifFalse:[
1976
969584dd8beb code cleanup & refactoring
Claus Gittinger <cg@exept.de>
parents: 1968
diff changeset
  3028
            specSuperclassName := nil.
969584dd8beb code cleanup & refactoring
Claus Gittinger <cg@exept.de>
parents: 1968
diff changeset
  3029
        ]
743
d58a3e7e39d5 support user defined font styles
tz
parents: 735
diff changeset
  3030
    ] ifTrue:[
1976
969584dd8beb code cleanup & refactoring
Claus Gittinger <cg@exept.de>
parents: 1968
diff changeset
  3031
        superclass := specSuperclassName
743
d58a3e7e39d5 support user defined font styles
tz
parents: 735
diff changeset
  3032
    ].
d58a3e7e39d5 support user defined font styles
tz
parents: 735
diff changeset
  3033
1976
969584dd8beb code cleanup & refactoring
Claus Gittinger <cg@exept.de>
parents: 1968
diff changeset
  3034
    specSuperclassName notNil ifTrue:[
969584dd8beb code cleanup & refactoring
Claus Gittinger <cg@exept.de>
parents: 1968
diff changeset
  3035
        superclass isNil ifTrue:[
969584dd8beb code cleanup & refactoring
Claus Gittinger <cg@exept.de>
parents: 1968
diff changeset
  3036
            self warn:'No class named ' , specSuperclassName , ' exists!!'.
969584dd8beb code cleanup & refactoring
Claus Gittinger <cg@exept.de>
parents: 1968
diff changeset
  3037
            ^ false.
969584dd8beb code cleanup & refactoring
Claus Gittinger <cg@exept.de>
parents: 1968
diff changeset
  3038
        ].
969584dd8beb code cleanup & refactoring
Claus Gittinger <cg@exept.de>
parents: 1968
diff changeset
  3039
969584dd8beb code cleanup & refactoring
Claus Gittinger <cg@exept.de>
parents: 1968
diff changeset
  3040
        (cls isSubclassOf:superclass) ifFalse:[
1983
5528c812da8f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1976
diff changeset
  3041
            self information:('A global named ' , specClassName , ' exists,\' ,
1976
969584dd8beb code cleanup & refactoring
Claus Gittinger <cg@exept.de>
parents: 1968
diff changeset
  3042
                              'but is not a subclass of ' , superclass name , '.\\' ,
969584dd8beb code cleanup & refactoring
Claus Gittinger <cg@exept.de>
parents: 1968
diff changeset
  3043
                              'Check and try again if that is not what you want.') withCRs.
969584dd8beb code cleanup & refactoring
Claus Gittinger <cg@exept.de>
parents: 1968
diff changeset
  3044
        ]
743
d58a3e7e39d5 support user defined font styles
tz
parents: 735
diff changeset
  3045
    ].
d58a3e7e39d5 support user defined font styles
tz
parents: 735
diff changeset
  3046
d58a3e7e39d5 support user defined font styles
tz
parents: 735
diff changeset
  3047
    superclass isNil ifTrue:[
1976
969584dd8beb code cleanup & refactoring
Claus Gittinger <cg@exept.de>
parents: 1968
diff changeset
  3048
        cls notNil ifTrue:[
969584dd8beb code cleanup & refactoring
Claus Gittinger <cg@exept.de>
parents: 1968
diff changeset
  3049
            specSuperclassName := cls superclass name
969584dd8beb code cleanup & refactoring
Claus Gittinger <cg@exept.de>
parents: 1968
diff changeset
  3050
        ]
743
d58a3e7e39d5 support user defined font styles
tz
parents: 735
diff changeset
  3051
    ].
d58a3e7e39d5 support user defined font styles
tz
parents: 735
diff changeset
  3052
d58a3e7e39d5 support user defined font styles
tz
parents: 735
diff changeset
  3053
    ^ true
d58a3e7e39d5 support user defined font styles
tz
parents: 735
diff changeset
  3054
d58a3e7e39d5 support user defined font styles
tz
parents: 735
diff changeset
  3055
    "Modified: 12.8.1997 / 23:39:10 / cg"
d58a3e7e39d5 support user defined font styles
tz
parents: 735
diff changeset
  3056
!
d58a3e7e39d5 support user defined font styles
tz
parents: 735
diff changeset
  3057
2159
7f02407f0bbf focus handling
ca
parents: 2157
diff changeset
  3058
createToolApplication:anApplicationClass spec:aSpec in:aView
7f02407f0bbf focus handling
ca
parents: 2157
diff changeset
  3059
    |appl applBuilder applWindow|
7f02407f0bbf focus handling
ca
parents: 2157
diff changeset
  3060
7f02407f0bbf focus handling
ca
parents: 2157
diff changeset
  3061
    appl := anApplicationClass new.
7f02407f0bbf focus handling
ca
parents: 2157
diff changeset
  3062
    appl createBuilder.
7f02407f0bbf focus handling
ca
parents: 2157
diff changeset
  3063
    applBuilder := appl builder.
7f02407f0bbf focus handling
ca
parents: 2157
diff changeset
  3064
7f02407f0bbf focus handling
ca
parents: 2157
diff changeset
  3065
    applWindow  := ApplicationSubView origin:0.0@0.0 corner:1.0@1.0 in:aView.
7f02407f0bbf focus handling
ca
parents: 2157
diff changeset
  3066
    applWindow level:0.
7f02407f0bbf focus handling
ca
parents: 2157
diff changeset
  3067
    applWindow hiddenOnRealize:true.
7f02407f0bbf focus handling
ca
parents: 2157
diff changeset
  3068
7f02407f0bbf focus handling
ca
parents: 2157
diff changeset
  3069
    appl masterApplication:self.
7f02407f0bbf focus handling
ca
parents: 2157
diff changeset
  3070
    applBuilder window:applWindow.
7f02407f0bbf focus handling
ca
parents: 2157
diff changeset
  3071
    applWindow client:appl spec:aSpec builder:applBuilder.
7f02407f0bbf focus handling
ca
parents: 2157
diff changeset
  3072
    appl modifiedHolder:(self modifiedChannel).
7f02407f0bbf focus handling
ca
parents: 2157
diff changeset
  3073
    applBuilder window:applWindow.
7f02407f0bbf focus handling
ca
parents: 2157
diff changeset
  3074
7f02407f0bbf focus handling
ca
parents: 2157
diff changeset
  3075
    ^ appl
7f02407f0bbf focus handling
ca
parents: 2157
diff changeset
  3076
!
7f02407f0bbf focus handling
ca
parents: 2157
diff changeset
  3077
173
a8468f4e83f0 show/hide painter/gallery
ca
parents: 171
diff changeset
  3078
hideUIView:aView
765
27936ff059d3 obselete methods removed + comments revised
tz
parents: 755
diff changeset
  3079
    "hides the view which is an application or top view"
27936ff059d3 obselete methods removed + comments revised
tz
parents: 755
diff changeset
  3080
173
a8468f4e83f0 show/hide painter/gallery
ca
parents: 171
diff changeset
  3081
    aView beIndependent.
a8468f4e83f0 show/hide painter/gallery
ca
parents: 171
diff changeset
  3082
    aView unmap.
a8468f4e83f0 show/hide painter/gallery
ca
parents: 171
diff changeset
  3083
!
a8468f4e83f0 show/hide painter/gallery
ca
parents: 171
diff changeset
  3084
287
1ecabfd468dc HelpTool is seperated like LayoutTool
ca
parents: 282
diff changeset
  3085
raiseTabView
2159
7f02407f0bbf focus handling
ca
parents: 2157
diff changeset
  3086
    |tool|
7f02407f0bbf focus handling
ca
parents: 2157
diff changeset
  3087
7f02407f0bbf focus handling
ca
parents: 2157
diff changeset
  3088
             self isLayoutToolSelected ifTrue:[tool := layoutTool ]
7f02407f0bbf focus handling
ca
parents: 2157
diff changeset
  3089
    ifFalse:[self isHelpToolSelected   ifTrue:[tool := helpTool   ]
7f02407f0bbf focus handling
ca
parents: 2157
diff changeset
  3090
    ifFalse:[
7f02407f0bbf focus handling
ca
parents: 2157
diff changeset
  3091
        tool := specTool.
7f02407f0bbf focus handling
ca
parents: 2157
diff changeset
  3092
        tool notNil ifTrue:[ specTool selection:tabSelection ].
7f02407f0bbf focus handling
ca
parents: 2157
diff changeset
  3093
    ]].
7f02407f0bbf focus handling
ca
parents: 2157
diff changeset
  3094
7f02407f0bbf focus handling
ca
parents: 2157
diff changeset
  3095
    (Array with:helpTool with:layoutTool with:specTool) do:[:aTool|
7f02407f0bbf focus handling
ca
parents: 2157
diff changeset
  3096
        aTool ~~ tool ifTrue:[
7f02407f0bbf focus handling
ca
parents: 2157
diff changeset
  3097
            aTool window beInvisible.
7f02407f0bbf focus handling
ca
parents: 2157
diff changeset
  3098
        ].
7f02407f0bbf focus handling
ca
parents: 2157
diff changeset
  3099
    ].
7f02407f0bbf focus handling
ca
parents: 2157
diff changeset
  3100
    tool notNil ifTrue:[
7f02407f0bbf focus handling
ca
parents: 2157
diff changeset
  3101
        tool window beVisible.
7f02407f0bbf focus handling
ca
parents: 2157
diff changeset
  3102
    ].
173
a8468f4e83f0 show/hide painter/gallery
ca
parents: 171
diff changeset
  3103
!
a8468f4e83f0 show/hide painter/gallery
ca
parents: 171
diff changeset
  3104
a8468f4e83f0 show/hide painter/gallery
ca
parents: 171
diff changeset
  3105
raiseUIView:aView
765
27936ff059d3 obselete methods removed + comments revised
tz
parents: 755
diff changeset
  3106
    "raise the view which is an application or top view"
27936ff059d3 obselete methods removed + comments revised
tz
parents: 755
diff changeset
  3107
1193
ada18c876301 partners must be remapped (at old position)
Claus Gittinger <cg@exept.de>
parents: 1192
diff changeset
  3108
    aView remap.
173
a8468f4e83f0 show/hide painter/gallery
ca
parents: 171
diff changeset
  3109
    aView bePartner.
177
eefd69a52f5b fixed setup of class/selector when picking/fetching via
Claus Gittinger <cg@exept.de>
parents: 176
diff changeset
  3110
!
eefd69a52f5b fixed setup of class/selector when picking/fetching via
Claus Gittinger <cg@exept.de>
parents: 176
diff changeset
  3111
eefd69a52f5b fixed setup of class/selector when picking/fetching via
Claus Gittinger <cg@exept.de>
parents: 176
diff changeset
  3112
setClass:cls selector:selector
765
27936ff059d3 obselete methods removed + comments revised
tz
parents: 755
diff changeset
  3113
    "sets the specClass and the specSelector under which the window spec should be saved"
27936ff059d3 obselete methods removed + comments revised
tz
parents: 755
diff changeset
  3114
177
eefd69a52f5b fixed setup of class/selector when picking/fetching via
Claus Gittinger <cg@exept.de>
parents: 176
diff changeset
  3115
    |clsName superClassName|
eefd69a52f5b fixed setup of class/selector when picking/fetching via
Claus Gittinger <cg@exept.de>
parents: 176
diff changeset
  3116
eefd69a52f5b fixed setup of class/selector when picking/fetching via
Claus Gittinger <cg@exept.de>
parents: 176
diff changeset
  3117
    clsName := cls name.
eefd69a52f5b fixed setup of class/selector when picking/fetching via
Claus Gittinger <cg@exept.de>
parents: 176
diff changeset
  3118
    superClassName := cls superclass name.
eefd69a52f5b fixed setup of class/selector when picking/fetching via
Claus Gittinger <cg@exept.de>
parents: 176
diff changeset
  3119
eefd69a52f5b fixed setup of class/selector when picking/fetching via
Claus Gittinger <cg@exept.de>
parents: 176
diff changeset
  3120
    (self aspectFor:#classNameChannel) value:clsName.
eefd69a52f5b fixed setup of class/selector when picking/fetching via
Claus Gittinger <cg@exept.de>
parents: 176
diff changeset
  3121
    (self aspectFor:#methodNameChannel) value:(selector ? '').
eefd69a52f5b fixed setup of class/selector when picking/fetching via
Claus Gittinger <cg@exept.de>
parents: 176
diff changeset
  3122
    (self aspectFor:#superclassNameChannel) value:superClassName.
eefd69a52f5b fixed setup of class/selector when picking/fetching via
Claus Gittinger <cg@exept.de>
parents: 176
diff changeset
  3123
eefd69a52f5b fixed setup of class/selector when picking/fetching via
Claus Gittinger <cg@exept.de>
parents: 176
diff changeset
  3124
    self painter 
1760
8419c463c4f6 use #and: - not #& you lazy bone, you
Claus Gittinger <cg@exept.de>
parents: 1750
diff changeset
  3125
            className:clsName 
8419c463c4f6 use #and: - not #& you lazy bone, you
Claus Gittinger <cg@exept.de>
parents: 1750
diff changeset
  3126
            superclassName:superClassName
8419c463c4f6 use #and: - not #& you lazy bone, you
Claus Gittinger <cg@exept.de>
parents: 1750
diff changeset
  3127
            selector:(selector ? '').
177
eefd69a52f5b fixed setup of class/selector when picking/fetching via
Claus Gittinger <cg@exept.de>
parents: 176
diff changeset
  3128
287
1ecabfd468dc HelpTool is seperated like LayoutTool
ca
parents: 282
diff changeset
  3129
    self specClass:clsName.
177
eefd69a52f5b fixed setup of class/selector when picking/fetching via
Claus Gittinger <cg@exept.de>
parents: 176
diff changeset
  3130
    specSelector := (selector ? '').
1976
969584dd8beb code cleanup & refactoring
Claus Gittinger <cg@exept.de>
parents: 1968
diff changeset
  3131
    specSuperclassName := superClassName.
177
eefd69a52f5b fixed setup of class/selector when picking/fetching via
Claus Gittinger <cg@exept.de>
parents: 176
diff changeset
  3132
1983
5528c812da8f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1976
diff changeset
  3133
    (specClassName notNil and:[ selector notNil ]) ifTrue:[
2072
0b0a24d7b198 class vs. className confusion
Claus Gittinger <cg@exept.de>
parents: 2040
diff changeset
  3134
        self addHistoryEntryForClass:specClass selector:specSelector.
1760
8419c463c4f6 use #and: - not #& you lazy bone, you
Claus Gittinger <cg@exept.de>
parents: 1750
diff changeset
  3135
        self updateInfoLabel
446
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
  3136
    ].
587
dd545d089d95 Fix typos. Ensure that specClass is a string.
Stefan Vogel <sv@exept.de>
parents: 572
diff changeset
  3137
2072
0b0a24d7b198 class vs. className confusion
Claus Gittinger <cg@exept.de>
parents: 2040
diff changeset
  3138
    "Modified: / 05-02-1998 / 09:44:58 / stefan"
0b0a24d7b198 class vs. className confusion
Claus Gittinger <cg@exept.de>
parents: 2040
diff changeset
  3139
    "Modified: / 31-08-2006 / 10:14:49 / cg"
282
bb88d92ae887 checkin from browser
ca
parents: 281
diff changeset
  3140
!
bb88d92ae887 checkin from browser
ca
parents: 281
diff changeset
  3141
1071
560a9eb1a5d8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1068
diff changeset
  3142
setViewInLayoutTool:aView spec:aSpec
765
27936ff059d3 obselete methods removed + comments revised
tz
parents: 755
diff changeset
  3143
    "sets view for layout tool"
27936ff059d3 obselete methods removed + comments revised
tz
parents: 755
diff changeset
  3144
287
1ecabfd468dc HelpTool is seperated like LayoutTool
ca
parents: 282
diff changeset
  3145
    |type|
1ecabfd468dc HelpTool is seperated like LayoutTool
ca
parents: 282
diff changeset
  3146
1ecabfd468dc HelpTool is seperated like LayoutTool
ca
parents: 282
diff changeset
  3147
    self painter topView == aView ifTrue:[
2213
cb1e13d68761 UseViewScroller
Claus Gittinger <cg@exept.de>
parents: 2210
diff changeset
  3148
        type := #Extent
cb1e13d68761 UseViewScroller
Claus Gittinger <cg@exept.de>
parents: 2210
diff changeset
  3149
    ] ifFalse:[
cb1e13d68761 UseViewScroller
Claus Gittinger <cg@exept.de>
parents: 2210
diff changeset
  3150
        self canvas == aView ifTrue:[
cb1e13d68761 UseViewScroller
Claus Gittinger <cg@exept.de>
parents: 2210
diff changeset
  3151
            type := #Extent
cb1e13d68761 UseViewScroller
Claus Gittinger <cg@exept.de>
parents: 2210
diff changeset
  3152
        ]
287
1ecabfd468dc HelpTool is seperated like LayoutTool
ca
parents: 282
diff changeset
  3153
    ].
1071
560a9eb1a5d8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1068
diff changeset
  3154
    self layoutTool layoutView:aView type:type spec:aSpec
287
1ecabfd468dc HelpTool is seperated like LayoutTool
ca
parents: 282
diff changeset
  3155
!
1ecabfd468dc HelpTool is seperated like LayoutTool
ca
parents: 282
diff changeset
  3156
2072
0b0a24d7b198 class vs. className confusion
Claus Gittinger <cg@exept.de>
parents: 2040
diff changeset
  3157
specClass
0b0a24d7b198 class vs. className confusion
Claus Gittinger <cg@exept.de>
parents: 2040
diff changeset
  3158
    specClass isNil ifTrue:[
0b0a24d7b198 class vs. className confusion
Claus Gittinger <cg@exept.de>
parents: 2040
diff changeset
  3159
        specClassName notNil ifTrue:[
0b0a24d7b198 class vs. className confusion
Claus Gittinger <cg@exept.de>
parents: 2040
diff changeset
  3160
            specClass := Smalltalk classNamed:specClassName.
0b0a24d7b198 class vs. className confusion
Claus Gittinger <cg@exept.de>
parents: 2040
diff changeset
  3161
        ]
0b0a24d7b198 class vs. className confusion
Claus Gittinger <cg@exept.de>
parents: 2040
diff changeset
  3162
    ].
0b0a24d7b198 class vs. className confusion
Claus Gittinger <cg@exept.de>
parents: 2040
diff changeset
  3163
    ^ specClass
0b0a24d7b198 class vs. className confusion
Claus Gittinger <cg@exept.de>
parents: 2040
diff changeset
  3164
0b0a24d7b198 class vs. className confusion
Claus Gittinger <cg@exept.de>
parents: 2040
diff changeset
  3165
    "Created: / 31-08-2006 / 10:08:43 / cg"
0b0a24d7b198 class vs. className confusion
Claus Gittinger <cg@exept.de>
parents: 2040
diff changeset
  3166
    "Modified: / 04-09-2006 / 10:39:21 / cg"
0b0a24d7b198 class vs. className confusion
Claus Gittinger <cg@exept.de>
parents: 2040
diff changeset
  3167
!
0b0a24d7b198 class vs. className confusion
Claus Gittinger <cg@exept.de>
parents: 2040
diff changeset
  3168
1976
969584dd8beb code cleanup & refactoring
Claus Gittinger <cg@exept.de>
parents: 1968
diff changeset
  3169
specClass:aClassOrClassName
765
27936ff059d3 obselete methods removed + comments revised
tz
parents: 755
diff changeset
  3170
    "sets the specClass and updates the Help Tool"
587
dd545d089d95 Fix typos. Ensure that specClass is a string.
Stefan Vogel <sv@exept.de>
parents: 572
diff changeset
  3171
1976
969584dd8beb code cleanup & refactoring
Claus Gittinger <cg@exept.de>
parents: 1968
diff changeset
  3172
    aClassOrClassName isBehavior 
2072
0b0a24d7b198 class vs. className confusion
Claus Gittinger <cg@exept.de>
parents: 2040
diff changeset
  3173
        ifTrue: [ specClass := aClassOrClassName.
0b0a24d7b198 class vs. className confusion
Claus Gittinger <cg@exept.de>
parents: 2040
diff changeset
  3174
                  specClassName := aClassOrClassName name ]
0b0a24d7b198 class vs. className confusion
Claus Gittinger <cg@exept.de>
parents: 2040
diff changeset
  3175
        ifFalse:[ specClass := Smalltalk classNamed:aClassOrClassName.
0b0a24d7b198 class vs. className confusion
Claus Gittinger <cg@exept.de>
parents: 2040
diff changeset
  3176
                  specClassName := aClassOrClassName ].
0b0a24d7b198 class vs. className confusion
Claus Gittinger <cg@exept.de>
parents: 2040
diff changeset
  3177
0b0a24d7b198 class vs. className confusion
Claus Gittinger <cg@exept.de>
parents: 2040
diff changeset
  3178
    self helpTool loadFromClass:specClass.    
0b0a24d7b198 class vs. className confusion
Claus Gittinger <cg@exept.de>
parents: 2040
diff changeset
  3179
    self clearModifiedFlag.
0b0a24d7b198 class vs. className confusion
Claus Gittinger <cg@exept.de>
parents: 2040
diff changeset
  3180
0b0a24d7b198 class vs. className confusion
Claus Gittinger <cg@exept.de>
parents: 2040
diff changeset
  3181
    "Modified: / 31-08-2006 / 10:10:22 / cg"
287
1ecabfd468dc HelpTool is seperated like LayoutTool
ca
parents: 282
diff changeset
  3182
! !
1ecabfd468dc HelpTool is seperated like LayoutTool
ca
parents: 282
diff changeset
  3183
1714
f57812a56d17 method category rename
Claus Gittinger <cg@exept.de>
parents: 1712
diff changeset
  3184
!UIPainter methodsFor:'private-tools'!
287
1ecabfd468dc HelpTool is seperated like LayoutTool
ca
parents: 282
diff changeset
  3185
2213
cb1e13d68761 UseViewScroller
Claus Gittinger <cg@exept.de>
parents: 2210
diff changeset
  3186
canvas
cb1e13d68761 UseViewScroller
Claus Gittinger <cg@exept.de>
parents: 2210
diff changeset
  3187
    "returns the canvas view"
cb1e13d68761 UseViewScroller
Claus Gittinger <cg@exept.de>
parents: 2210
diff changeset
  3188
cb1e13d68761 UseViewScroller
Claus Gittinger <cg@exept.de>
parents: 2210
diff changeset
  3189
    UseViewScroller == true ifTrue:[
cb1e13d68761 UseViewScroller
Claus Gittinger <cg@exept.de>
parents: 2210
diff changeset
  3190
        ^ painter.
cb1e13d68761 UseViewScroller
Claus Gittinger <cg@exept.de>
parents: 2210
diff changeset
  3191
    ].
cb1e13d68761 UseViewScroller
Claus Gittinger <cg@exept.de>
parents: 2210
diff changeset
  3192
cb1e13d68761 UseViewScroller
Claus Gittinger <cg@exept.de>
parents: 2210
diff changeset
  3193
    ^ painter topView.
cb1e13d68761 UseViewScroller
Claus Gittinger <cg@exept.de>
parents: 2210
diff changeset
  3194
"/    ^ treeView canvas
cb1e13d68761 UseViewScroller
Claus Gittinger <cg@exept.de>
parents: 2210
diff changeset
  3195
cb1e13d68761 UseViewScroller
Claus Gittinger <cg@exept.de>
parents: 2210
diff changeset
  3196
    "Modified: / 05-09-2006 / 18:36:32 / cg"
cb1e13d68761 UseViewScroller
Claus Gittinger <cg@exept.de>
parents: 2210
diff changeset
  3197
!
cb1e13d68761 UseViewScroller
Claus Gittinger <cg@exept.de>
parents: 2210
diff changeset
  3198
287
1ecabfd468dc HelpTool is seperated like LayoutTool
ca
parents: 282
diff changeset
  3199
helpTool
765
27936ff059d3 obselete methods removed + comments revised
tz
parents: 755
diff changeset
  3200
    "returns the help tool"
27936ff059d3 obselete methods removed + comments revised
tz
parents: 755
diff changeset
  3201
1316
d66f0b84aa6b *** empty log message ***
ca
parents: 1314
diff changeset
  3202
    helpTool isNil ifTrue:[self noteBookView].
d66f0b84aa6b *** empty log message ***
ca
parents: 1314
diff changeset
  3203
  ^ helpTool
287
1ecabfd468dc HelpTool is seperated like LayoutTool
ca
parents: 282
diff changeset
  3204
!
1ecabfd468dc HelpTool is seperated like LayoutTool
ca
parents: 282
diff changeset
  3205
1ecabfd468dc HelpTool is seperated like LayoutTool
ca
parents: 282
diff changeset
  3206
layoutTool
765
27936ff059d3 obselete methods removed + comments revised
tz
parents: 755
diff changeset
  3207
    "returns the layout tool"
27936ff059d3 obselete methods removed + comments revised
tz
parents: 755
diff changeset
  3208
1316
d66f0b84aa6b *** empty log message ***
ca
parents: 1314
diff changeset
  3209
    layoutTool isNil ifTrue:[self noteBookView].
d66f0b84aa6b *** empty log message ***
ca
parents: 1314
diff changeset
  3210
  ^ layoutTool
287
1ecabfd468dc HelpTool is seperated like LayoutTool
ca
parents: 282
diff changeset
  3211
!
1ecabfd468dc HelpTool is seperated like LayoutTool
ca
parents: 282
diff changeset
  3212
1ecabfd468dc HelpTool is seperated like LayoutTool
ca
parents: 282
diff changeset
  3213
painter
765
27936ff059d3 obselete methods removed + comments revised
tz
parents: 755
diff changeset
  3214
    "returns the canvas view"
27936ff059d3 obselete methods removed + comments revised
tz
parents: 755
diff changeset
  3215
2077
bf7f7207fa07 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2072
diff changeset
  3216
    ^ painter.
bf7f7207fa07 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2072
diff changeset
  3217
"/    ^ treeView canvas
bf7f7207fa07 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2072
diff changeset
  3218
bf7f7207fa07 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2072
diff changeset
  3219
    "Modified: / 05-09-2006 / 18:36:32 / cg"
287
1ecabfd468dc HelpTool is seperated like LayoutTool
ca
parents: 282
diff changeset
  3220
!
1ecabfd468dc HelpTool is seperated like LayoutTool
ca
parents: 282
diff changeset
  3221
1ecabfd468dc HelpTool is seperated like LayoutTool
ca
parents: 282
diff changeset
  3222
specTool
765
27936ff059d3 obselete methods removed + comments revised
tz
parents: 755
diff changeset
  3223
    "returns the spec tool"
27936ff059d3 obselete methods removed + comments revised
tz
parents: 755
diff changeset
  3224
1316
d66f0b84aa6b *** empty log message ***
ca
parents: 1314
diff changeset
  3225
    specTool isNil ifTrue:[self noteBookView].
d66f0b84aa6b *** empty log message ***
ca
parents: 1314
diff changeset
  3226
  ^ specTool
109
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
  3227
! !
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
  3228
166
cd5699643975 add tools: layout and specification tool
ca
parents: 161
diff changeset
  3229
!UIPainter methodsFor:'queries'!
cd5699643975 add tools: layout and specification tool
ca
parents: 161
diff changeset
  3230
217
354ba46948b4 access MenuEditor for specs
ca
parents: 206
diff changeset
  3231
hasSpecClass
765
27936ff059d3 obselete methods removed + comments revised
tz
parents: 755
diff changeset
  3232
    "answers whether an application class is defined"
27936ff059d3 obselete methods removed + comments revised
tz
parents: 755
diff changeset
  3233
1983
5528c812da8f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1976
diff changeset
  3234
    ^ (self resolveName:specClassName) notNil
217
354ba46948b4 access MenuEditor for specs
ca
parents: 206
diff changeset
  3235
!
354ba46948b4 access MenuEditor for specs
ca
parents: 206
diff changeset
  3236
354ba46948b4 access MenuEditor for specs
ca
parents: 206
diff changeset
  3237
hasSpecClassAndSelector
765
27936ff059d3 obselete methods removed + comments revised
tz
parents: 755
diff changeset
  3238
    "answers whether an application class and a selector under which
27936ff059d3 obselete methods removed + comments revised
tz
parents: 755
diff changeset
  3239
     the window spec is stored is defined"
27936ff059d3 obselete methods removed + comments revised
tz
parents: 755
diff changeset
  3240
217
354ba46948b4 access MenuEditor for specs
ca
parents: 206
diff changeset
  3241
    specSelector size > 1 ifTrue:[
2217
b54632779619 Use class var for SelectionPanel
Stefan Vogel <sv@exept.de>
parents: 2213
diff changeset
  3242
        ^ self hasSpecClass
217
354ba46948b4 access MenuEditor for specs
ca
parents: 206
diff changeset
  3243
    ].
765
27936ff059d3 obselete methods removed + comments revised
tz
parents: 755
diff changeset
  3244
    ^ false
217
354ba46948b4 access MenuEditor for specs
ca
parents: 206
diff changeset
  3245
!
354ba46948b4 access MenuEditor for specs
ca
parents: 206
diff changeset
  3246
166
cd5699643975 add tools: layout and specification tool
ca
parents: 161
diff changeset
  3247
isHelpToolSelected
765
27936ff059d3 obselete methods removed + comments revised
tz
parents: 755
diff changeset
  3248
    "answers whether the current selected section in the noteBook is the Help Tool"
27936ff059d3 obselete methods removed + comments revised
tz
parents: 755
diff changeset
  3249
287
1ecabfd468dc HelpTool is seperated like LayoutTool
ca
parents: 282
diff changeset
  3250
    ^ tabSelection = UIHelpTool label
166
cd5699643975 add tools: layout and specification tool
ca
parents: 161
diff changeset
  3251
!
cd5699643975 add tools: layout and specification tool
ca
parents: 161
diff changeset
  3252
cd5699643975 add tools: layout and specification tool
ca
parents: 161
diff changeset
  3253
isLayoutToolSelected
765
27936ff059d3 obselete methods removed + comments revised
tz
parents: 755
diff changeset
  3254
    "answers whether the current selected section in the noteBook is the Layout Tool"
27936ff059d3 obselete methods removed + comments revised
tz
parents: 755
diff changeset
  3255
287
1ecabfd468dc HelpTool is seperated like LayoutTool
ca
parents: 282
diff changeset
  3256
    ^ tabSelection = UILayoutTool label
217
354ba46948b4 access MenuEditor for specs
ca
parents: 206
diff changeset
  3257
!
354ba46948b4 access MenuEditor for specs
ca
parents: 206
diff changeset
  3258
272
99de6af43afa confirm/cancel changes before switching a section or widget
ca
parents: 271
diff changeset
  3259
isModified
765
27936ff059d3 obselete methods removed + comments revised
tz
parents: 755
diff changeset
  3260
    "answers whether the current window spec or a layout is modified"
27936ff059d3 obselete methods removed + comments revised
tz
parents: 755
diff changeset
  3261
272
99de6af43afa confirm/cancel changes before switching a section or widget
ca
parents: 271
diff changeset
  3262
    ^ self modifiedChannel value
99de6af43afa confirm/cancel changes before switching a section or widget
ca
parents: 271
diff changeset
  3263
!
99de6af43afa confirm/cancel changes before switching a section or widget
ca
parents: 271
diff changeset
  3264
2198
804e778590fc slightly refactored to allow for more redefinition in a subclass
Claus Gittinger <cg@exept.de>
parents: 2175
diff changeset
  3265
isNotEditingSpecOnly
804e778590fc slightly refactored to allow for more redefinition in a subclass
Claus Gittinger <cg@exept.de>
parents: 2175
diff changeset
  3266
    ^ true
804e778590fc slightly refactored to allow for more redefinition in a subclass
Claus Gittinger <cg@exept.de>
parents: 2175
diff changeset
  3267
!
804e778590fc slightly refactored to allow for more redefinition in a subclass
Claus Gittinger <cg@exept.de>
parents: 2175
diff changeset
  3268
217
354ba46948b4 access MenuEditor for specs
ca
parents: 206
diff changeset
  3269
isPainterEnabled
765
27936ff059d3 obselete methods removed + comments revised
tz
parents: 755
diff changeset
  3270
    "answers whether I am running in test mode"
27936ff059d3 obselete methods removed + comments revised
tz
parents: 755
diff changeset
  3271
217
354ba46948b4 access MenuEditor for specs
ca
parents: 206
diff changeset
  3272
    ^ self painter enabled
1608
2ad8ca8b5260 isUIPainter query added
penk
parents: 1596
diff changeset
  3273
!
2ad8ca8b5260 isUIPainter query added
penk
parents: 1596
diff changeset
  3274
2ad8ca8b5260 isUIPainter query added
penk
parents: 1596
diff changeset
  3275
isUIPainter
2ad8ca8b5260 isUIPainter query added
penk
parents: 1596
diff changeset
  3276
    ^ true
166
cd5699643975 add tools: layout and specification tool
ca
parents: 161
diff changeset
  3277
! !
cd5699643975 add tools: layout and specification tool
ca
parents: 161
diff changeset
  3278
109
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
  3279
!UIPainter methodsFor:'selection'!
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
  3280
1621
112670159075 cg: check if selection change is allowed BEFORE changing the
tm
parents: 1608
diff changeset
  3281
askForUnsavedModifications
112670159075 cg: check if selection change is allowed BEFORE changing the
tm
parents: 1608
diff changeset
  3282
    |whatToDo|
112670159075 cg: check if selection change is allowed BEFORE changing the
tm
parents: 1608
diff changeset
  3283
112670159075 cg: check if selection change is allowed BEFORE changing the
tm
parents: 1608
diff changeset
  3284
    self isModified ifFalse:[^ true].
112670159075 cg: check if selection change is allowed BEFORE changing the
tm
parents: 1608
diff changeset
  3285
112670159075 cg: check if selection change is allowed BEFORE changing the
tm
parents: 1608
diff changeset
  3286
    whatToDo := DialogBox 
112670159075 cg: check if selection change is allowed BEFORE changing the
tm
parents: 1608
diff changeset
  3287
                    confirmWithCancel:'Accept modifications in section ' , tabSelection printString asBoldText, ' ?'
112670159075 cg: check if selection change is allowed BEFORE changing the
tm
parents: 1608
diff changeset
  3288
                    labels:#('Cancel' 'Ignore' 'Accept')
112670159075 cg: check if selection change is allowed BEFORE changing the
tm
parents: 1608
diff changeset
  3289
                    default:3.
112670159075 cg: check if selection change is allowed BEFORE changing the
tm
parents: 1608
diff changeset
  3290
    whatToDo isNil ifTrue:[^ false].
112670159075 cg: check if selection change is allowed BEFORE changing the
tm
parents: 1608
diff changeset
  3291
    whatToDo == true ifTrue:[
112670159075 cg: check if selection change is allowed BEFORE changing the
tm
parents: 1608
diff changeset
  3292
        self accept
112670159075 cg: check if selection change is allowed BEFORE changing the
tm
parents: 1608
diff changeset
  3293
    ] ifFalse:[
112670159075 cg: check if selection change is allowed BEFORE changing the
tm
parents: 1608
diff changeset
  3294
        self cancel
112670159075 cg: check if selection change is allowed BEFORE changing the
tm
parents: 1608
diff changeset
  3295
    ].
112670159075 cg: check if selection change is allowed BEFORE changing the
tm
parents: 1608
diff changeset
  3296
112670159075 cg: check if selection change is allowed BEFORE changing the
tm
parents: 1608
diff changeset
  3297
    ^ true
112670159075 cg: check if selection change is allowed BEFORE changing the
tm
parents: 1608
diff changeset
  3298
!
112670159075 cg: check if selection change is allowed BEFORE changing the
tm
parents: 1608
diff changeset
  3299
112670159075 cg: check if selection change is allowed BEFORE changing the
tm
parents: 1608
diff changeset
  3300
copySelection
112670159075 cg: check if selection change is allowed BEFORE changing the
tm
parents: 1608
diff changeset
  3301
    self painter copySelection.
112670159075 cg: check if selection change is allowed BEFORE changing the
tm
parents: 1608
diff changeset
  3302
    self updateChannels.
112670159075 cg: check if selection change is allowed BEFORE changing the
tm
parents: 1608
diff changeset
  3303
!
112670159075 cg: check if selection change is allowed BEFORE changing the
tm
parents: 1608
diff changeset
  3304
1940
0f9be199d1c5 +replace widget
Claus Gittinger <cg@exept.de>
parents: 1917
diff changeset
  3305
selectedSpec
0f9be199d1c5 +replace widget
Claus Gittinger <cg@exept.de>
parents: 1917
diff changeset
  3306
    |specAndView|
0f9be199d1c5 +replace widget
Claus Gittinger <cg@exept.de>
parents: 1917
diff changeset
  3307
0f9be199d1c5 +replace widget
Claus Gittinger <cg@exept.de>
parents: 1917
diff changeset
  3308
    specAndView := self selectedSpecAndView.
0f9be199d1c5 +replace widget
Claus Gittinger <cg@exept.de>
parents: 1917
diff changeset
  3309
    ^ specAndView first
0f9be199d1c5 +replace widget
Claus Gittinger <cg@exept.de>
parents: 1917
diff changeset
  3310
!
0f9be199d1c5 +replace widget
Claus Gittinger <cg@exept.de>
parents: 1917
diff changeset
  3311
0f9be199d1c5 +replace widget
Claus Gittinger <cg@exept.de>
parents: 1917
diff changeset
  3312
selectedSpecAndView
0f9be199d1c5 +replace widget
Claus Gittinger <cg@exept.de>
parents: 1917
diff changeset
  3313
    |spec view property|
0f9be199d1c5 +replace widget
Claus Gittinger <cg@exept.de>
parents: 1917
diff changeset
  3314
0f9be199d1c5 +replace widget
Claus Gittinger <cg@exept.de>
parents: 1917
diff changeset
  3315
    treeView isCanvasSelected ifTrue:[
0f9be199d1c5 +replace widget
Claus Gittinger <cg@exept.de>
parents: 1917
diff changeset
  3316
        spec := treeView canvasSpec.
2213
cb1e13d68761 UseViewScroller
Claus Gittinger <cg@exept.de>
parents: 2210
diff changeset
  3317
        view := self canvas. "/ self painter topView.
1940
0f9be199d1c5 +replace widget
Claus Gittinger <cg@exept.de>
parents: 1917
diff changeset
  3318
    ] ifFalse:[
0f9be199d1c5 +replace widget
Claus Gittinger <cg@exept.de>
parents: 1917
diff changeset
  3319
        (property := treeView propertySelected) notNil ifTrue:[
0f9be199d1c5 +replace widget
Claus Gittinger <cg@exept.de>
parents: 1917
diff changeset
  3320
            treeView canResizeSelectedWidget ifTrue:[
0f9be199d1c5 +replace widget
Claus Gittinger <cg@exept.de>
parents: 1917
diff changeset
  3321
                view := property view.
0f9be199d1c5 +replace widget
Claus Gittinger <cg@exept.de>
parents: 1917
diff changeset
  3322
            ].
0f9be199d1c5 +replace widget
Claus Gittinger <cg@exept.de>
parents: 1917
diff changeset
  3323
            spec := property spec copy.
0f9be199d1c5 +replace widget
Claus Gittinger <cg@exept.de>
parents: 1917
diff changeset
  3324
        ]
0f9be199d1c5 +replace widget
Claus Gittinger <cg@exept.de>
parents: 1917
diff changeset
  3325
    ].
0f9be199d1c5 +replace widget
Claus Gittinger <cg@exept.de>
parents: 1917
diff changeset
  3326
    ^ Array with:spec with:view
0f9be199d1c5 +replace widget
Claus Gittinger <cg@exept.de>
parents: 1917
diff changeset
  3327
!
0f9be199d1c5 +replace widget
Claus Gittinger <cg@exept.de>
parents: 1917
diff changeset
  3328
109
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
  3329
tabSelection
765
27936ff059d3 obselete methods removed + comments revised
tz
parents: 755
diff changeset
  3330
    "returns the label of the current section in the notebook"
27936ff059d3 obselete methods removed + comments revised
tz
parents: 755
diff changeset
  3331
109
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
  3332
    ^ tabSelection
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
  3333
!
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
  3334
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
  3335
tabSelection:something
765
27936ff059d3 obselete methods removed + comments revised
tz
parents: 755
diff changeset
  3336
    "called whenever the section of the notebook has changed"
351
7cb9f9c9a872 more checks
Claus Gittinger <cg@exept.de>
parents: 348
diff changeset
  3337
272
99de6af43afa confirm/cancel changes before switching a section or widget
ca
parents: 271
diff changeset
  3338
    (something isNil or:[tabSelection = something]) ifTrue:[
1621
112670159075 cg: check if selection change is allowed BEFORE changing the
tm
parents: 1608
diff changeset
  3339
        ^ self
272
99de6af43afa confirm/cancel changes before switching a section or widget
ca
parents: 271
diff changeset
  3340
    ].
99de6af43afa confirm/cancel changes before switching a section or widget
ca
parents: 271
diff changeset
  3341
2202
b465c7e48050 changed #tabSelection:
ca
parents: 2198
diff changeset
  3342
    self isModified ifTrue:[
b465c7e48050 changed #tabSelection:
ca
parents: 2198
diff changeset
  3343
        self autoAcceptOnSelectionChange value ifTrue:[
b465c7e48050 changed #tabSelection:
ca
parents: 2198
diff changeset
  3344
            self accept
b465c7e48050 changed #tabSelection:
ca
parents: 2198
diff changeset
  3345
        ] ifFalse:[
b465c7e48050 changed #tabSelection:
ca
parents: 2198
diff changeset
  3346
            self askForUnsavedModifications ifFalse:[^ self].
b465c7e48050 changed #tabSelection:
ca
parents: 2198
diff changeset
  3347
        ].
1710
4d81ff7b3412 autoAccept on selectionChange; ok -> apply;
Claus Gittinger <cg@exept.de>
parents: 1698
diff changeset
  3348
    ].
272
99de6af43afa confirm/cancel changes before switching a section or widget
ca
parents: 271
diff changeset
  3349
    tabSelection := something.
287
1ecabfd468dc HelpTool is seperated like LayoutTool
ca
parents: 282
diff changeset
  3350
    self raiseTabView.
272
99de6af43afa confirm/cancel changes before switching a section or widget
ca
parents: 271
diff changeset
  3351
    self cancel.
99de6af43afa confirm/cancel changes before switching a section or widget
ca
parents: 271
diff changeset
  3352
!
99de6af43afa confirm/cancel changes before switching a section or widget
ca
parents: 271
diff changeset
  3353
1710
4d81ff7b3412 autoAccept on selectionChange; ok -> apply;
Claus Gittinger <cg@exept.de>
parents: 1698
diff changeset
  3354
treeSelectionChanged
765
27936ff059d3 obselete methods removed + comments revised
tz
parents: 755
diff changeset
  3355
    "called whenever the selection of the treeview has changed"
27936ff059d3 obselete methods removed + comments revised
tz
parents: 755
diff changeset
  3356
1940
0f9be199d1c5 +replace widget
Claus Gittinger <cg@exept.de>
parents: 1917
diff changeset
  3357
    |specAndView view spec|
1621
112670159075 cg: check if selection change is allowed BEFORE changing the
tm
parents: 1608
diff changeset
  3358
112670159075 cg: check if selection change is allowed BEFORE changing the
tm
parents: 1608
diff changeset
  3359
    self askForUnsavedModifications ifFalse:[^ self].
112670159075 cg: check if selection change is allowed BEFORE changing the
tm
parents: 1608
diff changeset
  3360
"/    self isModified ifTrue:[
112670159075 cg: check if selection change is allowed BEFORE changing the
tm
parents: 1608
diff changeset
  3361
"/        (self confirm:'Accept modifications in section ' , tabSelection printString asBoldText, '?') ifTrue:[
112670159075 cg: check if selection change is allowed BEFORE changing the
tm
parents: 1608
diff changeset
  3362
"/            self accept
112670159075 cg: check if selection change is allowed BEFORE changing the
tm
parents: 1608
diff changeset
  3363
"/        ]
112670159075 cg: check if selection change is allowed BEFORE changing the
tm
parents: 1608
diff changeset
  3364
"/    ].
713
f94e58bb44ac some changes for the docu
tz
parents: 697
diff changeset
  3365
1940
0f9be199d1c5 +replace widget
Claus Gittinger <cg@exept.de>
parents: 1917
diff changeset
  3366
    specAndView := self selectedSpecAndView.
0f9be199d1c5 +replace widget
Claus Gittinger <cg@exept.de>
parents: 1917
diff changeset
  3367
    spec := specAndView first.
0f9be199d1c5 +replace widget
Claus Gittinger <cg@exept.de>
parents: 1917
diff changeset
  3368
    view := specAndView last.
1621
112670159075 cg: check if selection change is allowed BEFORE changing the
tm
parents: 1608
diff changeset
  3369
1071
560a9eb1a5d8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1068
diff changeset
  3370
    self setViewInLayoutTool:view spec:spec.
287
1ecabfd468dc HelpTool is seperated like LayoutTool
ca
parents: 282
diff changeset
  3371
    self specTool specification:spec.
282
bb88d92ae887 checkin from browser
ca
parents: 281
diff changeset
  3372
1621
112670159075 cg: check if selection change is allowed BEFORE changing the
tm
parents: 1608
diff changeset
  3373
    self updateSlicesForSpec:spec andView:view.
112670159075 cg: check if selection change is allowed BEFORE changing the
tm
parents: 1608
diff changeset
  3374
    self clearModifiedFlag.
112670159075 cg: check if selection change is allowed BEFORE changing the
tm
parents: 1608
diff changeset
  3375
    self updateChannels.
112670159075 cg: check if selection change is allowed BEFORE changing the
tm
parents: 1608
diff changeset
  3376
!
112670159075 cg: check if selection change is allowed BEFORE changing the
tm
parents: 1608
diff changeset
  3377
112670159075 cg: check if selection change is allowed BEFORE changing the
tm
parents: 1608
diff changeset
  3378
updateSlicesForSpec:spec andView:view
2023
7a37b7c85092 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2012
diff changeset
  3379
    |slices "size" list tabComponent|
1621
112670159075 cg: check if selection change is allowed BEFORE changing the
tm
parents: 1608
diff changeset
  3380
112670159075 cg: check if selection change is allowed BEFORE changing the
tm
parents: 1608
diff changeset
  3381
    tabComponent := self componentAt:#noteBook.
112670159075 cg: check if selection change is allowed BEFORE changing the
tm
parents: 1608
diff changeset
  3382
282
bb88d92ae887 checkin from browser
ca
parents: 281
diff changeset
  3383
    spec notNil ifTrue:[
1188
4805027d9d33 code cleanup
Claus Gittinger <cg@exept.de>
parents: 1186
diff changeset
  3384
        self helpTool helpKey:(spec activeHelpKey).
4805027d9d33 code cleanup
Claus Gittinger <cg@exept.de>
parents: 1186
diff changeset
  3385
        slices := spec class slices.
2023
7a37b7c85092 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2012
diff changeset
  3386
7a37b7c85092 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2012
diff changeset
  3387
        list := slices collect:[:eachSlice | eachSlice first asString].
7a37b7c85092 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2012
diff changeset
  3388
        self treeView isCanvasSelected ifFalse:[
2040
2df23da6484a you shalt not add to Arrays !
ab
parents: 2023
diff changeset
  3389
            list := list copyWith:(UIHelpTool label)
2023
7a37b7c85092 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2012
diff changeset
  3390
        ].
1188
4805027d9d33 code cleanup
Claus Gittinger <cg@exept.de>
parents: 1186
diff changeset
  3391
        view notNil ifTrue:[
2040
2df23da6484a you shalt not add to Arrays !
ab
parents: 2023
diff changeset
  3392
            list := list copyWith:UILayoutTool label.
1188
4805027d9d33 code cleanup
Claus Gittinger <cg@exept.de>
parents: 1186
diff changeset
  3393
        ].
4805027d9d33 code cleanup
Claus Gittinger <cg@exept.de>
parents: 1186
diff changeset
  3394
2023
7a37b7c85092 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2012
diff changeset
  3395
"/        size   := slices size.
7a37b7c85092 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2012
diff changeset
  3396
"/        view notNil ifTrue:[
7a37b7c85092 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2012
diff changeset
  3397
"/            self treeView isCanvasSelected ifFalse:[
7a37b7c85092 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2012
diff changeset
  3398
"/                list := Array new:(size + 2).
7a37b7c85092 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2012
diff changeset
  3399
"/                list at:(size + 2) put:(UILayoutTool label).
7a37b7c85092 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2012
diff changeset
  3400
"/            ] ifTrue:[
7a37b7c85092 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2012
diff changeset
  3401
"/                list := Array new:(size + 1).
7a37b7c85092 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2012
diff changeset
  3402
"/                list at:(size + 1) put:(UILayoutTool label).
7a37b7c85092 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2012
diff changeset
  3403
"/            ].
7a37b7c85092 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2012
diff changeset
  3404
"/        ] ifFalse:[
7a37b7c85092 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2012
diff changeset
  3405
"/            list := Array new:(size + 1).
7a37b7c85092 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2012
diff changeset
  3406
"/        ].
7a37b7c85092 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2012
diff changeset
  3407
"/
7a37b7c85092 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2012
diff changeset
  3408
"/        1 to:size do:[:i| list at:i put:((slices at:i) first asString)].
7a37b7c85092 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2012
diff changeset
  3409
"/        self treeView isCanvasSelected ifFalse: [
7a37b7c85092 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2012
diff changeset
  3410
"/            list at:(size + 1) put:(UIHelpTool label)
7a37b7c85092 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2012
diff changeset
  3411
"/        ].
1188
4805027d9d33 code cleanup
Claus Gittinger <cg@exept.de>
parents: 1186
diff changeset
  3412
4805027d9d33 code cleanup
Claus Gittinger <cg@exept.de>
parents: 1186
diff changeset
  3413
        self tabList value:list.
4805027d9d33 code cleanup
Claus Gittinger <cg@exept.de>
parents: 1186
diff changeset
  3414
        self showHelp:spec class name for:self.
4805027d9d33 code cleanup
Claus Gittinger <cg@exept.de>
parents: 1186
diff changeset
  3415
        tabComponent enabled:true.
4805027d9d33 code cleanup
Claus Gittinger <cg@exept.de>
parents: 1186
diff changeset
  3416
4805027d9d33 code cleanup
Claus Gittinger <cg@exept.de>
parents: 1186
diff changeset
  3417
        (tabSelection := tabComponent selection) isNil ifTrue:[
4805027d9d33 code cleanup
Claus Gittinger <cg@exept.de>
parents: 1186
diff changeset
  3418
            tabComponent setSelection:(tabSelection := list first)
4805027d9d33 code cleanup
Claus Gittinger <cg@exept.de>
parents: 1186
diff changeset
  3419
        ].
4805027d9d33 code cleanup
Claus Gittinger <cg@exept.de>
parents: 1186
diff changeset
  3420
        self raiseTabView
282
bb88d92ae887 checkin from browser
ca
parents: 281
diff changeset
  3421
    ] ifFalse:[
1188
4805027d9d33 code cleanup
Claus Gittinger <cg@exept.de>
parents: 1186
diff changeset
  3422
        self helpTool helpKey:nil.
4805027d9d33 code cleanup
Claus Gittinger <cg@exept.de>
parents: 1186
diff changeset
  3423
        tabComponent enabled:false.
4805027d9d33 code cleanup
Claus Gittinger <cg@exept.de>
parents: 1186
diff changeset
  3424
        self defaultInfoLabel.
272
99de6af43afa confirm/cancel changes before switching a section or widget
ca
parents: 271
diff changeset
  3425
    ].
60
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
  3426
! !
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
  3427
765
27936ff059d3 obselete methods removed + comments revised
tz
parents: 755
diff changeset
  3428
!UIPainter methodsFor:'settings'!
27936ff059d3 obselete methods removed + comments revised
tz
parents: 755
diff changeset
  3429
924
0416d7cbae92 reviewed help texts;
Claus Gittinger <cg@exept.de>
parents: 913
diff changeset
  3430
generateAspectsAsInstanceVariables
0416d7cbae92 reviewed help texts;
Claus Gittinger <cg@exept.de>
parents: 913
diff changeset
  3431
    "if on, aspects are held as instance variables;
0416d7cbae92 reviewed help texts;
Claus Gittinger <cg@exept.de>
parents: 913
diff changeset
  3432
     if off (the default), they are kept in the bindings dictionary.
0416d7cbae92 reviewed help texts;
Claus Gittinger <cg@exept.de>
parents: 913
diff changeset
  3433
    "
0416d7cbae92 reviewed help texts;
Claus Gittinger <cg@exept.de>
parents: 913
diff changeset
  3434
    ^ UIPainterView generateAspectsAsInstanceVariables
0416d7cbae92 reviewed help texts;
Claus Gittinger <cg@exept.de>
parents: 913
diff changeset
  3435
0416d7cbae92 reviewed help texts;
Claus Gittinger <cg@exept.de>
parents: 913
diff changeset
  3436
    "Created: / 29.7.1998 / 11:17:59 / cg"
0416d7cbae92 reviewed help texts;
Claus Gittinger <cg@exept.de>
parents: 913
diff changeset
  3437
!
0416d7cbae92 reviewed help texts;
Claus Gittinger <cg@exept.de>
parents: 913
diff changeset
  3438
0416d7cbae92 reviewed help texts;
Claus Gittinger <cg@exept.de>
parents: 913
diff changeset
  3439
generateAspectsAsInstanceVariables:aBoolean
0416d7cbae92 reviewed help texts;
Claus Gittinger <cg@exept.de>
parents: 913
diff changeset
  3440
    "if on, aspects are held as instance variables;
0416d7cbae92 reviewed help texts;
Claus Gittinger <cg@exept.de>
parents: 913
diff changeset
  3441
     if off (the default), they are kept in the bindings dictionary.
0416d7cbae92 reviewed help texts;
Claus Gittinger <cg@exept.de>
parents: 913
diff changeset
  3442
    "
0416d7cbae92 reviewed help texts;
Claus Gittinger <cg@exept.de>
parents: 913
diff changeset
  3443
    ^ UIPainterView generateAspectsAsInstanceVariables:aBoolean
0416d7cbae92 reviewed help texts;
Claus Gittinger <cg@exept.de>
parents: 913
diff changeset
  3444
0416d7cbae92 reviewed help texts;
Claus Gittinger <cg@exept.de>
parents: 913
diff changeset
  3445
    "Created: / 29.7.1998 / 11:18:20 / cg"
0416d7cbae92 reviewed help texts;
Claus Gittinger <cg@exept.de>
parents: 913
diff changeset
  3446
!
0416d7cbae92 reviewed help texts;
Claus Gittinger <cg@exept.de>
parents: 913
diff changeset
  3447
765
27936ff059d3 obselete methods removed + comments revised
tz
parents: 755
diff changeset
  3448
redefineAspectMethods
27936ff059d3 obselete methods removed + comments revised
tz
parents: 755
diff changeset
  3449
    "redefine methods yes or no. If a method is defined in super class
27936ff059d3 obselete methods removed + comments revised
tz
parents: 755
diff changeset
  3450
     should the message be reinstalled ?
27936ff059d3 obselete methods removed + comments revised
tz
parents: 755
diff changeset
  3451
    "
27936ff059d3 obselete methods removed + comments revised
tz
parents: 755
diff changeset
  3452
    ^ UIPainterView redefineAspectMethods
27936ff059d3 obselete methods removed + comments revised
tz
parents: 755
diff changeset
  3453
27936ff059d3 obselete methods removed + comments revised
tz
parents: 755
diff changeset
  3454
27936ff059d3 obselete methods removed + comments revised
tz
parents: 755
diff changeset
  3455
!
27936ff059d3 obselete methods removed + comments revised
tz
parents: 755
diff changeset
  3456
27936ff059d3 obselete methods removed + comments revised
tz
parents: 755
diff changeset
  3457
redefineAspectMethods:aBoolean
27936ff059d3 obselete methods removed + comments revised
tz
parents: 755
diff changeset
  3458
    "redefine methods yes or no. If a method is defined in super class
27936ff059d3 obselete methods removed + comments revised
tz
parents: 755
diff changeset
  3459
     should the message be reinstalled ?
27936ff059d3 obselete methods removed + comments revised
tz
parents: 755
diff changeset
  3460
    "
27936ff059d3 obselete methods removed + comments revised
tz
parents: 755
diff changeset
  3461
    UIPainterView redefineAspectMethods:aBoolean
27936ff059d3 obselete methods removed + comments revised
tz
parents: 755
diff changeset
  3462
27936ff059d3 obselete methods removed + comments revised
tz
parents: 755
diff changeset
  3463
27936ff059d3 obselete methods removed + comments revised
tz
parents: 755
diff changeset
  3464
! !
27936ff059d3 obselete methods removed + comments revised
tz
parents: 755
diff changeset
  3465
1716
5ae373f6fef0 method category rename
Claus Gittinger <cg@exept.de>
parents: 1714
diff changeset
  3466
!UIPainter methodsFor:'startup & release'!
109
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
  3467
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
  3468
closeRequest
2023
7a37b7c85092 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2012
diff changeset
  3469
    "asks for permission before closing"
713
f94e58bb44ac some changes for the docu
tz
parents: 697
diff changeset
  3470
729
12f157d5e017 askings for modifications completed (?)
tz
parents: 724
diff changeset
  3471
    self askForModification ifFalse:[^self].
133
e12f82d3afb7 popup box caused by a closeRequest with still open
ca
parents: 130
diff changeset
  3472
2007
77cf7ecc9ecf embedding as special editors
Claus Gittinger <cg@exept.de>
parents: 2001
diff changeset
  3473
    super closeRequest.
77cf7ecc9ecf embedding as special editors
Claus Gittinger <cg@exept.de>
parents: 2001
diff changeset
  3474
222
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  3475
    treeView model removeDependent:self.
2007
77cf7ecc9ecf embedding as special editors
Claus Gittinger <cg@exept.de>
parents: 2001
diff changeset
  3476
    "/ self painter release.
60
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
  3477
109
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
  3478
    selectionPanel notNil ifTrue:[
2007
77cf7ecc9ecf embedding as special editors
Claus Gittinger <cg@exept.de>
parents: 2001
diff changeset
  3479
        selectionPanel masterApplication:nil.
77cf7ecc9ecf embedding as special editors
Claus Gittinger <cg@exept.de>
parents: 2001
diff changeset
  3480
        selectionPanel closeRequest
109
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
  3481
    ].
149
e652608690b1 help ...
ca
parents: 144
diff changeset
  3482
    selectionPanel := nil.
222
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  3483
    treeView       := nil.
109
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
  3484
!
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
  3485
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
  3486
closeRequestFor:aTopView
765
27936ff059d3 obselete methods removed + comments revised
tz
parents: 755
diff changeset
  3487
    "handles a close request for a specific view"
27936ff059d3 obselete methods removed + comments revised
tz
parents: 755
diff changeset
  3488
173
a8468f4e83f0 show/hide painter/gallery
ca
parents: 171
diff changeset
  3489
    |topView|
60
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
  3490
765
27936ff059d3 obselete methods removed + comments revised
tz
parents: 755
diff changeset
  3491
    (topView := self window) == aTopView ifTrue:[
2217
b54632779619 Use class var for SelectionPanel
Stefan Vogel <sv@exept.de>
parents: 2213
diff changeset
  3492
        super closeRequestFor:aTopView
109
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
  3493
    ] ifFalse:[
2217
b54632779619 Use class var for SelectionPanel
Stefan Vogel <sv@exept.de>
parents: 2213
diff changeset
  3494
        aTopView = selectionPanel window ifTrue:[
b54632779619 Use class var for SelectionPanel
Stefan Vogel <sv@exept.de>
parents: 2213
diff changeset
  3495
            self galleryShown value:false
b54632779619 Use class var for SelectionPanel
Stefan Vogel <sv@exept.de>
parents: 2213
diff changeset
  3496
        ] ifFalse:[
b54632779619 Use class var for SelectionPanel
Stefan Vogel <sv@exept.de>
parents: 2213
diff changeset
  3497
            aTopView == (self painter topView) ifTrue:[
b54632779619 Use class var for SelectionPanel
Stefan Vogel <sv@exept.de>
parents: 2213
diff changeset
  3498
                self painterShown value:false
b54632779619 Use class var for SelectionPanel
Stefan Vogel <sv@exept.de>
parents: 2213
diff changeset
  3499
            ] ifFalse:[
b54632779619 Use class var for SelectionPanel
Stefan Vogel <sv@exept.de>
parents: 2213
diff changeset
  3500
                aTopView closeRequest
b54632779619 Use class var for SelectionPanel
Stefan Vogel <sv@exept.de>
parents: 2213
diff changeset
  3501
            ]
b54632779619 Use class var for SelectionPanel
Stefan Vogel <sv@exept.de>
parents: 2213
diff changeset
  3502
        ].
b54632779619 Use class var for SelectionPanel
Stefan Vogel <sv@exept.de>
parents: 2213
diff changeset
  3503
        topView raise.
109
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
  3504
    ].
60
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
  3505
!
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
  3506
1994
afcf20d971e0 postBuild
Claus Gittinger <cg@exept.de>
parents: 1991
diff changeset
  3507
commonPostBuild
afcf20d971e0 postBuild
Claus Gittinger <cg@exept.de>
parents: 1991
diff changeset
  3508
    "sets the root of the tree view as first selection;
afcf20d971e0 postBuild
Claus Gittinger <cg@exept.de>
parents: 1991
diff changeset
  3509
     sets the grid parameters, if defined"
afcf20d971e0 postBuild
Claus Gittinger <cg@exept.de>
parents: 1991
diff changeset
  3510
afcf20d971e0 postBuild
Claus Gittinger <cg@exept.de>
parents: 1991
diff changeset
  3511
    |cls sel|
afcf20d971e0 postBuild
Claus Gittinger <cg@exept.de>
parents: 1991
diff changeset
  3512
2072
0b0a24d7b198 class vs. className confusion
Claus Gittinger <cg@exept.de>
parents: 2040
diff changeset
  3513
    cls := self specClass.
1994
afcf20d971e0 postBuild
Claus Gittinger <cg@exept.de>
parents: 1991
diff changeset
  3514
    sel := specSelector.
afcf20d971e0 postBuild
Claus Gittinger <cg@exept.de>
parents: 1991
diff changeset
  3515
    cls notNil ifTrue:[
afcf20d971e0 postBuild
Claus Gittinger <cg@exept.de>
parents: 1991
diff changeset
  3516
        self setClass:cls selector:sel.
afcf20d971e0 postBuild
Claus Gittinger <cg@exept.de>
parents: 1991
diff changeset
  3517
afcf20d971e0 postBuild
Claus Gittinger <cg@exept.de>
parents: 1991
diff changeset
  3518
        (cls respondsTo:sel) ifTrue:[  
afcf20d971e0 postBuild
Claus Gittinger <cg@exept.de>
parents: 1991
diff changeset
  3519
            self painter setupFromSpec:(cls perform:sel).
afcf20d971e0 postBuild
Claus Gittinger <cg@exept.de>
parents: 1991
diff changeset
  3520
        ]
afcf20d971e0 postBuild
Claus Gittinger <cg@exept.de>
parents: 1991
diff changeset
  3521
    ].
afcf20d971e0 postBuild
Claus Gittinger <cg@exept.de>
parents: 1991
diff changeset
  3522
afcf20d971e0 postBuild
Claus Gittinger <cg@exept.de>
parents: 1991
diff changeset
  3523
    self autoAcceptOnSelectionChange addDependent:self.
afcf20d971e0 postBuild
Claus Gittinger <cg@exept.de>
parents: 1991
diff changeset
  3524
    self autoAcceptOnSelectionChange value ifTrue:[
afcf20d971e0 postBuild
Claus Gittinger <cg@exept.de>
parents: 1991
diff changeset
  3525
        (builder componentAt:'acceptButton') label:(resources string:'Apply')
afcf20d971e0 postBuild
Claus Gittinger <cg@exept.de>
parents: 1991
diff changeset
  3526
    ].
afcf20d971e0 postBuild
Claus Gittinger <cg@exept.de>
parents: 1991
diff changeset
  3527
2023
7a37b7c85092 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2012
diff changeset
  3528
    "/ using masters infoHolder ?
7a37b7c85092 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2012
diff changeset
  3529
    (builder aspectAt:#useAlienInfoLabelHolder) == true ifTrue:[
7a37b7c85092 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2012
diff changeset
  3530
        (builder componentAt:#mainPanel) layout bottomOffset:0.
7a37b7c85092 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2012
diff changeset
  3531
        (builder componentAt:#infoBarSubSpec) beInvisible
7a37b7c85092 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2012
diff changeset
  3532
    ].
7a37b7c85092 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2012
diff changeset
  3533
2001
b12d9b4dd6f2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1994
diff changeset
  3534
    self updateInfoLabel.
2023
7a37b7c85092 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2012
diff changeset
  3535
2072
0b0a24d7b198 class vs. className confusion
Claus Gittinger <cg@exept.de>
parents: 2040
diff changeset
  3536
    "Modified: / 31-08-2006 / 10:12:53 / cg"
1994
afcf20d971e0 postBuild
Claus Gittinger <cg@exept.de>
parents: 1991
diff changeset
  3537
!
afcf20d971e0 postBuild
Claus Gittinger <cg@exept.de>
parents: 1991
diff changeset
  3538
1976
969584dd8beb code cleanup & refactoring
Claus Gittinger <cg@exept.de>
parents: 1968
diff changeset
  3539
loadFromClass:aClass andSelector:selector
1185
6c14008722e9 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1180
diff changeset
  3540
    "loads a window spec by evaluating aMessageString
6c14008722e9 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1180
diff changeset
  3541
     (which is something like 'fooClass windowSpec')"
6c14008722e9 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1180
diff changeset
  3542
1976
969584dd8beb code cleanup & refactoring
Claus Gittinger <cg@exept.de>
parents: 1968
diff changeset
  3543
    self assert:(aClass isNil or:[aClass isClass]).
969584dd8beb code cleanup & refactoring
Claus Gittinger <cg@exept.de>
parents: 1968
diff changeset
  3544
969584dd8beb code cleanup & refactoring
Claus Gittinger <cg@exept.de>
parents: 1968
diff changeset
  3545
    self askForModification ifFalse:[^ self].
969584dd8beb code cleanup & refactoring
Claus Gittinger <cg@exept.de>
parents: 1968
diff changeset
  3546
969584dd8beb code cleanup & refactoring
Claus Gittinger <cg@exept.de>
parents: 1968
diff changeset
  3547
    self setClass:aClass selector:selector.    
969584dd8beb code cleanup & refactoring
Claus Gittinger <cg@exept.de>
parents: 1968
diff changeset
  3548
969584dd8beb code cleanup & refactoring
Claus Gittinger <cg@exept.de>
parents: 1968
diff changeset
  3549
    (aClass respondsTo:selector) ifTrue:[   
2198
804e778590fc slightly refactored to allow for more redefinition in a subclass
Claus Gittinger <cg@exept.de>
parents: 2175
diff changeset
  3550
        self loadFromSpec:(aClass perform:selector).
1976
969584dd8beb code cleanup & refactoring
Claus Gittinger <cg@exept.de>
parents: 1968
diff changeset
  3551
    ]
969584dd8beb code cleanup & refactoring
Claus Gittinger <cg@exept.de>
parents: 1968
diff changeset
  3552
!
969584dd8beb code cleanup & refactoring
Claus Gittinger <cg@exept.de>
parents: 1968
diff changeset
  3553
969584dd8beb code cleanup & refactoring
Claus Gittinger <cg@exept.de>
parents: 1968
diff changeset
  3554
loadFromMessage:classAndSelector
969584dd8beb code cleanup & refactoring
Claus Gittinger <cg@exept.de>
parents: 1968
diff changeset
  3555
    "loads a window spec by evaluating aMessageString
969584dd8beb code cleanup & refactoring
Claus Gittinger <cg@exept.de>
parents: 1968
diff changeset
  3556
     (which is something like 'fooClass windowSpec')"
969584dd8beb code cleanup & refactoring
Claus Gittinger <cg@exept.de>
parents: 1968
diff changeset
  3557
969584dd8beb code cleanup & refactoring
Claus Gittinger <cg@exept.de>
parents: 1968
diff changeset
  3558
    self askForModification ifFalse:[^ self].
969584dd8beb code cleanup & refactoring
Claus Gittinger <cg@exept.de>
parents: 1968
diff changeset
  3559
969584dd8beb code cleanup & refactoring
Claus Gittinger <cg@exept.de>
parents: 1968
diff changeset
  3560
    classAndSelector notNil ifTrue:[
2198
804e778590fc slightly refactored to allow for more redefinition in a subclass
Claus Gittinger <cg@exept.de>
parents: 2175
diff changeset
  3561
        self 
804e778590fc slightly refactored to allow for more redefinition in a subclass
Claus Gittinger <cg@exept.de>
parents: 2175
diff changeset
  3562
            loadFromClass:classAndSelector methodClass 
804e778590fc slightly refactored to allow for more redefinition in a subclass
Claus Gittinger <cg@exept.de>
parents: 2175
diff changeset
  3563
            andSelector:classAndSelector methodSelector
743
d58a3e7e39d5 support user defined font styles
tz
parents: 735
diff changeset
  3564
    ]
d58a3e7e39d5 support user defined font styles
tz
parents: 735
diff changeset
  3565
!
d58a3e7e39d5 support user defined font styles
tz
parents: 735
diff changeset
  3566
2198
804e778590fc slightly refactored to allow for more redefinition in a subclass
Claus Gittinger <cg@exept.de>
parents: 2175
diff changeset
  3567
loadFromSpec:aSpec
804e778590fc slightly refactored to allow for more redefinition in a subclass
Claus Gittinger <cg@exept.de>
parents: 2175
diff changeset
  3568
    "loads a window spec proper"
804e778590fc slightly refactored to allow for more redefinition in a subclass
Claus Gittinger <cg@exept.de>
parents: 2175
diff changeset
  3569
804e778590fc slightly refactored to allow for more redefinition in a subclass
Claus Gittinger <cg@exept.de>
parents: 2175
diff changeset
  3570
    self askForModification ifFalse:[^ self].
804e778590fc slightly refactored to allow for more redefinition in a subclass
Claus Gittinger <cg@exept.de>
parents: 2175
diff changeset
  3571
804e778590fc slightly refactored to allow for more redefinition in a subclass
Claus Gittinger <cg@exept.de>
parents: 2175
diff changeset
  3572
    self painter setupFromSpec:aSpec.
804e778590fc slightly refactored to allow for more redefinition in a subclass
Claus Gittinger <cg@exept.de>
parents: 2175
diff changeset
  3573
!
804e778590fc slightly refactored to allow for more redefinition in a subclass
Claus Gittinger <cg@exept.de>
parents: 2175
diff changeset
  3574
1850
410f98d259b7 kludge to raise the ui-painters control window
Claus Gittinger <cg@exept.de>
parents: 1827
diff changeset
  3575
openInterface:aSymbol 
1994
afcf20d971e0 postBuild
Claus Gittinger <cg@exept.de>
parents: 1991
diff changeset
  3576
    "in addition to opening my interface, also open up a gallery and a painter"
1850
410f98d259b7 kludge to raise the ui-painters control window
Claus Gittinger <cg@exept.de>
parents: 1827
diff changeset
  3577
    
2198
804e778590fc slightly refactored to allow for more redefinition in a subclass
Claus Gittinger <cg@exept.de>
parents: 2175
diff changeset
  3578
    |topView|
804e778590fc slightly refactored to allow for more redefinition in a subclass
Claus Gittinger <cg@exept.de>
parents: 2175
diff changeset
  3579
804e778590fc slightly refactored to allow for more redefinition in a subclass
Claus Gittinger <cg@exept.de>
parents: 2175
diff changeset
  3580
    self setupSpecClassAndSelector.
1994
afcf20d971e0 postBuild
Claus Gittinger <cg@exept.de>
parents: 1991
diff changeset
  3581
2012
3a3b694c8288 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2007
diff changeset
  3582
"/    treeView := TreeView new.
3a3b694c8288 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2007
diff changeset
  3583
"/    treeView windowSpecClass:(self defaultWindowSpecClass).
3a3b694c8288 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2007
diff changeset
  3584
"/    treeView 
3a3b694c8288 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2007
diff changeset
  3585
"/        selectConditionBlock:[:newSelection | self selectionChangeAllowed:newSelection ].
3a3b694c8288 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2007
diff changeset
  3586
3a3b694c8288 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2007
diff changeset
  3587
"/    painterView := StandardSystemView new.
3a3b694c8288 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2007
diff changeset
  3588
"/    name := name ? UIPainter defaultNameOfCanvas.
3a3b694c8288 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2007
diff changeset
  3589
"/    painterView beToolWindow.
3a3b694c8288 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2007
diff changeset
  3590
"/    painterView name:name.
3a3b694c8288 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2007
diff changeset
  3591
"/    painterView label:name.
3a3b694c8288 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2007
diff changeset
  3592
"/    painterView extent:(treeView windowSpecClass defaultExtentInUIPainter).
3a3b694c8288 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2007
diff changeset
  3593
"/    painter := UIPainterView in:painterView.
3a3b694c8288 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2007
diff changeset
  3594
"/    painter layout:(0.0 @ 0.0 corner:1.0 @ 1.0) asLayout.
3a3b694c8288 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2007
diff changeset
  3595
"/    treeView := treeView canvas:painter specName:name.
3a3b694c8288 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2007
diff changeset
  3596
"/    painter treeView:treeView.
3a3b694c8288 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2007
diff changeset
  3597
"/    treeView model addDependent:self.
3a3b694c8288 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2007
diff changeset
  3598
"/    painter enableChannel:(self enableChannel).
1994
afcf20d971e0 postBuild
Claus Gittinger <cg@exept.de>
parents: 1991
diff changeset
  3599
765
27936ff059d3 obselete methods removed + comments revised
tz
parents: 755
diff changeset
  3600
    super openInterface:aSymbol.
1994
afcf20d971e0 postBuild
Claus Gittinger <cg@exept.de>
parents: 1991
diff changeset
  3601
136
42a2a4494281 remove postOpen
ca
parents: 133
diff changeset
  3602
    topView := self window.
345
c4d8f4c74c26 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 344
diff changeset
  3603
    topView label:'GUI Painter'.
2198
804e778590fc slightly refactored to allow for more redefinition in a subclass
Claus Gittinger <cg@exept.de>
parents: 2175
diff changeset
  3604
804e778590fc slightly refactored to allow for more redefinition in a subclass
Claus Gittinger <cg@exept.de>
parents: 2175
diff changeset
  3605
"/    self setupCanvasAndSelectionPanel.
804e778590fc slightly refactored to allow for more redefinition in a subclass
Claus Gittinger <cg@exept.de>
parents: 2175
diff changeset
  3606
"/
804e778590fc slightly refactored to allow for more redefinition in a subclass
Claus Gittinger <cg@exept.de>
parents: 2175
diff changeset
  3607
"/    selectionPanel window waitUntilVisible.
804e778590fc slightly refactored to allow for more redefinition in a subclass
Claus Gittinger <cg@exept.de>
parents: 2175
diff changeset
  3608
"/    painterView window waitUntilVisible.
804e778590fc slightly refactored to allow for more redefinition in a subclass
Claus Gittinger <cg@exept.de>
parents: 2175
diff changeset
  3609
"/    self window waitUntilVisible.
804e778590fc slightly refactored to allow for more redefinition in a subclass
Claus Gittinger <cg@exept.de>
parents: 2175
diff changeset
  3610
"/    [ Delay waitForSeconds:0.5. self window topView raise ] fork.
2072
0b0a24d7b198 class vs. className confusion
Claus Gittinger <cg@exept.de>
parents: 2040
diff changeset
  3611
0b0a24d7b198 class vs. className confusion
Claus Gittinger <cg@exept.de>
parents: 2040
diff changeset
  3612
    "Modified: / 31-08-2006 / 10:13:16 / cg"
60
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
  3613
!
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
  3614
109
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
  3615
openOnClass:aClass
765
27936ff059d3 obselete methods removed + comments revised
tz
parents: 755
diff changeset
  3616
    "opens the GUI Painter on aClass and #windowSpec"
27936ff059d3 obselete methods removed + comments revised
tz
parents: 755
diff changeset
  3617
109
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
  3618
    self openOnClass:aClass andSelector:#windowSpec
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
  3619
!
0b53bd128667 *** empty log message ***
ca
parents: 101
diff changeset
  3620
60
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
  3621
openOnClass:aClass andSelector:aSelector
1976
969584dd8beb code cleanup & refactoring
Claus Gittinger <cg@exept.de>
parents: 1968
diff changeset
  3622
    "opens the GUI Painter on aClass and aSelector"
969584dd8beb code cleanup & refactoring
Claus Gittinger <cg@exept.de>
parents: 1968
diff changeset
  3623
157
ce974dce3dd4 enhanced class & method dialog
Claus Gittinger <cg@exept.de>
parents: 156
diff changeset
  3624
    aClass isNil ifTrue:[
1976
969584dd8beb code cleanup & refactoring
Claus Gittinger <cg@exept.de>
parents: 1968
diff changeset
  3625
        (self confirm:'No class given to the GUI Painter (class was probably renamed?)\\Open anyway (to create a new window spec) ?' withCRs)
969584dd8beb code cleanup & refactoring
Claus Gittinger <cg@exept.de>
parents: 1968
diff changeset
  3626
        ifFalse:[^ nil].
157
ce974dce3dd4 enhanced class & method dialog
Claus Gittinger <cg@exept.de>
parents: 156
diff changeset
  3627
    ].
60
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
  3628
798
c1116ba57e66 set window specification after realization of the window
ca
parents: 794
diff changeset
  3629
    specSelector := aSelector.
2072
0b0a24d7b198 class vs. className confusion
Claus Gittinger <cg@exept.de>
parents: 2040
diff changeset
  3630
    specClass := aClass.
0b0a24d7b198 class vs. className confusion
Claus Gittinger <cg@exept.de>
parents: 2040
diff changeset
  3631
    specClassName := aClass name.
798
c1116ba57e66 set window specification after realization of the window
ca
parents: 794
diff changeset
  3632
964
476235fbb312 setup class/selector, before opening the interface;
Claus Gittinger <cg@exept.de>
parents: 952
diff changeset
  3633
    self openInterface.
476235fbb312 setup class/selector, before opening the interface;
Claus Gittinger <cg@exept.de>
parents: 952
diff changeset
  3634
476235fbb312 setup class/selector, before opening the interface;
Claus Gittinger <cg@exept.de>
parents: 952
diff changeset
  3635
"/    specSelector := aSelector.
476235fbb312 setup class/selector, before opening the interface;
Claus Gittinger <cg@exept.de>
parents: 952
diff changeset
  3636
"/    specClass := aClass.
476235fbb312 setup class/selector, before opening the interface;
Claus Gittinger <cg@exept.de>
parents: 952
diff changeset
  3637
2072
0b0a24d7b198 class vs. className confusion
Claus Gittinger <cg@exept.de>
parents: 2040
diff changeset
  3638
    "Modified: / 31-08-2006 / 10:13:31 / cg"
713
f94e58bb44ac some changes for the docu
tz
parents: 697
diff changeset
  3639
!
f94e58bb44ac some changes for the docu
tz
parents: 697
diff changeset
  3640
1192
f3f5c92930c9 do painter setup in postBuild, selection in postOpen.
Claus Gittinger <cg@exept.de>
parents: 1188
diff changeset
  3641
postBuildWith: aBuilder
f3f5c92930c9 do painter setup in postBuild, selection in postOpen.
Claus Gittinger <cg@exept.de>
parents: 1188
diff changeset
  3642
    super postBuildWith:aBuilder.
798
c1116ba57e66 set window specification after realization of the window
ca
parents: 794
diff changeset
  3643
1994
afcf20d971e0 postBuild
Claus Gittinger <cg@exept.de>
parents: 1991
diff changeset
  3644
    self setupPainter.
1710
4d81ff7b3412 autoAccept on selectionChange; ok -> apply;
Claus Gittinger <cg@exept.de>
parents: 1698
diff changeset
  3645
1192
f3f5c92930c9 do painter setup in postBuild, selection in postOpen.
Claus Gittinger <cg@exept.de>
parents: 1188
diff changeset
  3646
    "Modified: / 22.8.1998 / 17:41:34 / cg"
f3f5c92930c9 do painter setup in postBuild, selection in postOpen.
Claus Gittinger <cg@exept.de>
parents: 1188
diff changeset
  3647
!
f3f5c92930c9 do painter setup in postBuild, selection in postOpen.
Claus Gittinger <cg@exept.de>
parents: 1188
diff changeset
  3648
f3f5c92930c9 do painter setup in postBuild, selection in postOpen.
Claus Gittinger <cg@exept.de>
parents: 1188
diff changeset
  3649
postOpenWith: aBuilder
1994
afcf20d971e0 postBuild
Claus Gittinger <cg@exept.de>
parents: 1991
diff changeset
  3650
    "spread the painter and gallery views on the screen"
1192
f3f5c92930c9 do painter setup in postBuild, selection in postOpen.
Claus Gittinger <cg@exept.de>
parents: 1188
diff changeset
  3651
1194
651885033545 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1193
diff changeset
  3652
    |myWindow canvasWindow canvasOrg galleryWindow 
1957
cd30f8cd59f8 Ctrl-CursorUp/Down in tree
Claus Gittinger <cg@exept.de>
parents: 1954
diff changeset
  3653
     galleryOrg myOrg myCorner windowGroup|
1192
f3f5c92930c9 do painter setup in postBuild, selection in postOpen.
Claus Gittinger <cg@exept.de>
parents: 1188
diff changeset
  3654
f3f5c92930c9 do painter setup in postBuild, selection in postOpen.
Claus Gittinger <cg@exept.de>
parents: 1188
diff changeset
  3655
    super postOpenWith: aBuilder.
1957
cd30f8cd59f8 Ctrl-CursorUp/Down in tree
Claus Gittinger <cg@exept.de>
parents: 1954
diff changeset
  3656
cd30f8cd59f8 Ctrl-CursorUp/Down in tree
Claus Gittinger <cg@exept.de>
parents: 1954
diff changeset
  3657
    windowGroup := self topApplication windowGroup.
cd30f8cd59f8 Ctrl-CursorUp/Down in tree
Claus Gittinger <cg@exept.de>
parents: 1954
diff changeset
  3658
    windowGroup addPreEventHook:self.
cd30f8cd59f8 Ctrl-CursorUp/Down in tree
Claus Gittinger <cg@exept.de>
parents: 1954
diff changeset
  3659
798
c1116ba57e66 set window specification after realization of the window
ca
parents: 794
diff changeset
  3660
    treeView selection: #(1).
1247
6fb170b75302 clear menuBar in keyProcessor
ca
parents: 1230
diff changeset
  3661
    aBuilder keyboardProcessor menuBar:nil.
798
c1116ba57e66 set window specification after realization of the window
ca
parents: 794
diff changeset
  3662
1192
f3f5c92930c9 do painter setup in postBuild, selection in postOpen.
Claus Gittinger <cg@exept.de>
parents: 1188
diff changeset
  3663
    myWindow := self window.
f3f5c92930c9 do painter setup in postBuild, selection in postOpen.
Claus Gittinger <cg@exept.de>
parents: 1188
diff changeset
  3664
    canvasWindow := self painter topView.
1456
7435d111bb09 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1453
diff changeset
  3665
    [selectionPanel isNil] whileTrue:[
7435d111bb09 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1453
diff changeset
  3666
        Delay waitForSeconds:0.1.
7435d111bb09 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1453
diff changeset
  3667
    ].
2007
77cf7ecc9ecf embedding as special editors
Claus Gittinger <cg@exept.de>
parents: 2001
diff changeset
  3668
1192
f3f5c92930c9 do painter setup in postBuild, selection in postOpen.
Claus Gittinger <cg@exept.de>
parents: 1188
diff changeset
  3669
    galleryWindow := selectionPanel window.
f3f5c92930c9 do painter setup in postBuild, selection in postOpen.
Claus Gittinger <cg@exept.de>
parents: 1188
diff changeset
  3670
f3f5c92930c9 do painter setup in postBuild, selection in postOpen.
Claus Gittinger <cg@exept.de>
parents: 1188
diff changeset
  3671
    myOrg := myWindow origin.
f3f5c92930c9 do painter setup in postBuild, selection in postOpen.
Claus Gittinger <cg@exept.de>
parents: 1188
diff changeset
  3672
    myCorner := myWindow corner.
f3f5c92930c9 do painter setup in postBuild, selection in postOpen.
Claus Gittinger <cg@exept.de>
parents: 1188
diff changeset
  3673
1197
ef91ed58b7d4 only move canvas & gallery, if windowManager placed windows
Claus Gittinger <cg@exept.de>
parents: 1195
diff changeset
  3674
    "/ try to lay out things non-overlapping
2007
77cf7ecc9ecf embedding as special editors
Claus Gittinger <cg@exept.de>
parents: 2001
diff changeset
  3675
    true
77cf7ecc9ecf embedding as special editors
Claus Gittinger <cg@exept.de>
parents: 2001
diff changeset
  3676
1197
ef91ed58b7d4 only move canvas & gallery, if windowManager placed windows
Claus Gittinger <cg@exept.de>
parents: 1195
diff changeset
  3677
    "/ but only, if the window manager placed all windows
ef91ed58b7d4 only move canvas & gallery, if windowManager placed windows
Claus Gittinger <cg@exept.de>
parents: 1195
diff changeset
  3678
    "/ on top of each other
2007
77cf7ecc9ecf embedding as special editors
Claus Gittinger <cg@exept.de>
parents: 2001
diff changeset
  3679
    "/ myOrg = canvasWindow origin 
77cf7ecc9ecf embedding as special editors
Claus Gittinger <cg@exept.de>
parents: 2001
diff changeset
  3680
77cf7ecc9ecf embedding as special editors
Claus Gittinger <cg@exept.de>
parents: 2001
diff changeset
  3681
    ifTrue:[
1197
ef91ed58b7d4 only move canvas & gallery, if windowManager placed windows
Claus Gittinger <cg@exept.de>
parents: 1195
diff changeset
  3682
ef91ed58b7d4 only move canvas & gallery, if windowManager placed windows
Claus Gittinger <cg@exept.de>
parents: 1195
diff changeset
  3683
        canvasOrg := 10@20.
ef91ed58b7d4 only move canvas & gallery, if windowManager placed windows
Claus Gittinger <cg@exept.de>
parents: 1195
diff changeset
  3684
"/        myOrg := (device width - myWindow width - 20) @ 20.
ef91ed58b7d4 only move canvas & gallery, if windowManager placed windows
Claus Gittinger <cg@exept.de>
parents: 1195
diff changeset
  3685
        galleryOrg := (device width - galleryWindow width - 20) 
ef91ed58b7d4 only move canvas & gallery, if windowManager placed windows
Claus Gittinger <cg@exept.de>
parents: 1195
diff changeset
  3686
                      @ 
ef91ed58b7d4 only move canvas & gallery, if windowManager placed windows
Claus Gittinger <cg@exept.de>
parents: 1195
diff changeset
  3687
                      ((myWindow height + 20) min:(device height - galleryWindow height - 20)).
ef91ed58b7d4 only move canvas & gallery, if windowManager placed windows
Claus Gittinger <cg@exept.de>
parents: 1195
diff changeset
  3688
        myWindow origin:myOrg.
ef91ed58b7d4 only move canvas & gallery, if windowManager placed windows
Claus Gittinger <cg@exept.de>
parents: 1195
diff changeset
  3689
ef91ed58b7d4 only move canvas & gallery, if windowManager placed windows
Claus Gittinger <cg@exept.de>
parents: 1195
diff changeset
  3690
        canvasWindow origin:canvasOrg.
ef91ed58b7d4 only move canvas & gallery, if windowManager placed windows
Claus Gittinger <cg@exept.de>
parents: 1195
diff changeset
  3691
        galleryWindow origin:galleryOrg.
ef91ed58b7d4 only move canvas & gallery, if windowManager placed windows
Claus Gittinger <cg@exept.de>
parents: 1195
diff changeset
  3692
ef91ed58b7d4 only move canvas & gallery, if windowManager placed windows
Claus Gittinger <cg@exept.de>
parents: 1195
diff changeset
  3693
        galleryWindow raise.
ef91ed58b7d4 only move canvas & gallery, if windowManager placed windows
Claus Gittinger <cg@exept.de>
parents: 1195
diff changeset
  3694
        canvasWindow raise.
ef91ed58b7d4 only move canvas & gallery, if windowManager placed windows
Claus Gittinger <cg@exept.de>
parents: 1195
diff changeset
  3695
    ].
1192
f3f5c92930c9 do painter setup in postBuild, selection in postOpen.
Claus Gittinger <cg@exept.de>
parents: 1188
diff changeset
  3696
2198
804e778590fc slightly refactored to allow for more redefinition in a subclass
Claus Gittinger <cg@exept.de>
parents: 2175
diff changeset
  3697
    self setupCanvasAndSelectionPanel.
804e778590fc slightly refactored to allow for more redefinition in a subclass
Claus Gittinger <cg@exept.de>
parents: 2175
diff changeset
  3698
804e778590fc slightly refactored to allow for more redefinition in a subclass
Claus Gittinger <cg@exept.de>
parents: 2175
diff changeset
  3699
"/    selectionPanel window waitUntilVisible.
804e778590fc slightly refactored to allow for more redefinition in a subclass
Claus Gittinger <cg@exept.de>
parents: 2175
diff changeset
  3700
"/    painterView window waitUntilVisible.
804e778590fc slightly refactored to allow for more redefinition in a subclass
Claus Gittinger <cg@exept.de>
parents: 2175
diff changeset
  3701
"/    self window waitUntilVisible.
804e778590fc slightly refactored to allow for more redefinition in a subclass
Claus Gittinger <cg@exept.de>
parents: 2175
diff changeset
  3702
    [   Delay waitForSeconds:0.1. 
804e778590fc slightly refactored to allow for more redefinition in a subclass
Claus Gittinger <cg@exept.de>
parents: 2175
diff changeset
  3703
        self window topView raise.
804e778590fc slightly refactored to allow for more redefinition in a subclass
Claus Gittinger <cg@exept.de>
parents: 2175
diff changeset
  3704
        Delay waitForSeconds:0.25. 
804e778590fc slightly refactored to allow for more redefinition in a subclass
Claus Gittinger <cg@exept.de>
parents: 2175
diff changeset
  3705
        self window topView raise 
804e778590fc slightly refactored to allow for more redefinition in a subclass
Claus Gittinger <cg@exept.de>
parents: 2175
diff changeset
  3706
    ] fork.
1195
64f3537ca061 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1194
diff changeset
  3707
    "Modified: / 13.7.1999 / 21:26:52 / cg"
1461
b061747908b5 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1457
diff changeset
  3708
!
b061747908b5 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1457
diff changeset
  3709
b061747908b5 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1457
diff changeset
  3710
selectionPanelClass
2218
01fdf3323d89 changed #selectionPanelClass
Stefan Vogel <sv@exept.de>
parents: 2217
diff changeset
  3711
    ^ SelectionPanelClass
1994
afcf20d971e0 postBuild
Claus Gittinger <cg@exept.de>
parents: 1991
diff changeset
  3712
!
afcf20d971e0 postBuild
Claus Gittinger <cg@exept.de>
parents: 1991
diff changeset
  3713
2198
804e778590fc slightly refactored to allow for more redefinition in a subclass
Claus Gittinger <cg@exept.de>
parents: 2175
diff changeset
  3714
setupCanvasAndSelectionPanel
804e778590fc slightly refactored to allow for more redefinition in a subclass
Claus Gittinger <cg@exept.de>
parents: 2175
diff changeset
  3715
    |topView galleryWindow icon|
804e778590fc slightly refactored to allow for more redefinition in a subclass
Claus Gittinger <cg@exept.de>
parents: 2175
diff changeset
  3716
804e778590fc slightly refactored to allow for more redefinition in a subclass
Claus Gittinger <cg@exept.de>
parents: 2175
diff changeset
  3717
    icon := Smalltalk imageFromFileNamed:'UIPainter.xbm' forClass:self class.
804e778590fc slightly refactored to allow for more redefinition in a subclass
Claus Gittinger <cg@exept.de>
parents: 2175
diff changeset
  3718
804e778590fc slightly refactored to allow for more redefinition in a subclass
Claus Gittinger <cg@exept.de>
parents: 2175
diff changeset
  3719
    topView := self window.
804e778590fc slightly refactored to allow for more redefinition in a subclass
Claus Gittinger <cg@exept.de>
parents: 2175
diff changeset
  3720
804e778590fc slightly refactored to allow for more redefinition in a subclass
Claus Gittinger <cg@exept.de>
parents: 2175
diff changeset
  3721
    painterView openInGroup:(topView windowGroup).
804e778590fc slightly refactored to allow for more redefinition in a subclass
Claus Gittinger <cg@exept.de>
parents: 2175
diff changeset
  3722
    painterView application:self.
804e778590fc slightly refactored to allow for more redefinition in a subclass
Claus Gittinger <cg@exept.de>
parents: 2175
diff changeset
  3723
804e778590fc slightly refactored to allow for more redefinition in a subclass
Claus Gittinger <cg@exept.de>
parents: 2175
diff changeset
  3724
    galleryWindow := selectionPanel window.
804e778590fc slightly refactored to allow for more redefinition in a subclass
Claus Gittinger <cg@exept.de>
parents: 2175
diff changeset
  3725
    galleryWindow beToolWindow.
804e778590fc slightly refactored to allow for more redefinition in a subclass
Claus Gittinger <cg@exept.de>
parents: 2175
diff changeset
  3726
    galleryWindow openInGroup:(topView windowGroup).
804e778590fc slightly refactored to allow for more redefinition in a subclass
Claus Gittinger <cg@exept.de>
parents: 2175
diff changeset
  3727
804e778590fc slightly refactored to allow for more redefinition in a subclass
Claus Gittinger <cg@exept.de>
parents: 2175
diff changeset
  3728
    selectionPanel masterApplication:self.
804e778590fc slightly refactored to allow for more redefinition in a subclass
Claus Gittinger <cg@exept.de>
parents: 2175
diff changeset
  3729
804e778590fc slightly refactored to allow for more redefinition in a subclass
Claus Gittinger <cg@exept.de>
parents: 2175
diff changeset
  3730
    topView iconLabel:'GUI Painter'.
804e778590fc slightly refactored to allow for more redefinition in a subclass
Claus Gittinger <cg@exept.de>
parents: 2175
diff changeset
  3731
    topView icon:icon.
804e778590fc slightly refactored to allow for more redefinition in a subclass
Claus Gittinger <cg@exept.de>
parents: 2175
diff changeset
  3732
    painterView iconLabel:'GUI Canvas'.
804e778590fc slightly refactored to allow for more redefinition in a subclass
Claus Gittinger <cg@exept.de>
parents: 2175
diff changeset
  3733
    painterView icon:icon.
804e778590fc slightly refactored to allow for more redefinition in a subclass
Claus Gittinger <cg@exept.de>
parents: 2175
diff changeset
  3734
    galleryWindow iconLabel:'GUI Gallery'.
804e778590fc slightly refactored to allow for more redefinition in a subclass
Claus Gittinger <cg@exept.de>
parents: 2175
diff changeset
  3735
    galleryWindow icon:icon.
804e778590fc slightly refactored to allow for more redefinition in a subclass
Claus Gittinger <cg@exept.de>
parents: 2175
diff changeset
  3736
    
804e778590fc slightly refactored to allow for more redefinition in a subclass
Claus Gittinger <cg@exept.de>
parents: 2175
diff changeset
  3737
    topView bePartner.
804e778590fc slightly refactored to allow for more redefinition in a subclass
Claus Gittinger <cg@exept.de>
parents: 2175
diff changeset
  3738
    painterView bePartner.
804e778590fc slightly refactored to allow for more redefinition in a subclass
Claus Gittinger <cg@exept.de>
parents: 2175
diff changeset
  3739
    galleryWindow bePartner.
804e778590fc slightly refactored to allow for more redefinition in a subclass
Claus Gittinger <cg@exept.de>
parents: 2175
diff changeset
  3740
!
804e778590fc slightly refactored to allow for more redefinition in a subclass
Claus Gittinger <cg@exept.de>
parents: 2175
diff changeset
  3741
1994
afcf20d971e0 postBuild
Claus Gittinger <cg@exept.de>
parents: 1991
diff changeset
  3742
setupPainter
afcf20d971e0 postBuild
Claus Gittinger <cg@exept.de>
parents: 1991
diff changeset
  3743
    "sets the painter's grid parameters, if defined"
afcf20d971e0 postBuild
Claus Gittinger <cg@exept.de>
parents: 1991
diff changeset
  3744
afcf20d971e0 postBuild
Claus Gittinger <cg@exept.de>
parents: 1991
diff changeset
  3745
    |painter settings gridPara hspace vspace|
afcf20d971e0 postBuild
Claus Gittinger <cg@exept.de>
parents: 1991
diff changeset
  3746
afcf20d971e0 postBuild
Claus Gittinger <cg@exept.de>
parents: 1991
diff changeset
  3747
    painter  := self painter.
afcf20d971e0 postBuild
Claus Gittinger <cg@exept.de>
parents: 1991
diff changeset
  3748
    settings := self class settings.
afcf20d971e0 postBuild
Claus Gittinger <cg@exept.de>
parents: 1991
diff changeset
  3749
    gridPara := painter gridParameters copy.
afcf20d971e0 postBuild
Claus Gittinger <cg@exept.de>
parents: 1991
diff changeset
  3750
    hspace   := settings at: #HGridSpace ifAbsent:10.
afcf20d971e0 postBuild
Claus Gittinger <cg@exept.de>
parents: 1991
diff changeset
  3751
    vspace   := settings at: #VGridSpace ifAbsent:10.
afcf20d971e0 postBuild
Claus Gittinger <cg@exept.de>
parents: 1991
diff changeset
  3752
    gridPara at:1 put:hspace; at:2 put:vspace; at:5 put:hspace; at:6 put:vspace.
afcf20d971e0 postBuild
Claus Gittinger <cg@exept.de>
parents: 1991
diff changeset
  3753
    painter gridParameters:gridPara.
afcf20d971e0 postBuild
Claus Gittinger <cg@exept.de>
parents: 1991
diff changeset
  3754
    painter gridShown: (settings at: #GridShown ifAbsent:false).
afcf20d971e0 postBuild
Claus Gittinger <cg@exept.de>
parents: 1991
diff changeset
  3755
    painter gridAlign: (settings at: #GridAlign ifAbsent:false).
afcf20d971e0 postBuild
Claus Gittinger <cg@exept.de>
parents: 1991
diff changeset
  3756
    painter shown ifTrue:[painter clearView].
afcf20d971e0 postBuild
Claus Gittinger <cg@exept.de>
parents: 1991
diff changeset
  3757
afcf20d971e0 postBuild
Claus Gittinger <cg@exept.de>
parents: 1991
diff changeset
  3758
    "Modified: / 22.8.1998 / 17:41:34 / cg"
2198
804e778590fc slightly refactored to allow for more redefinition in a subclass
Claus Gittinger <cg@exept.de>
parents: 2175
diff changeset
  3759
!
804e778590fc slightly refactored to allow for more redefinition in a subclass
Claus Gittinger <cg@exept.de>
parents: 2175
diff changeset
  3760
804e778590fc slightly refactored to allow for more redefinition in a subclass
Claus Gittinger <cg@exept.de>
parents: 2175
diff changeset
  3761
setupSpecClassAndSelector
804e778590fc slightly refactored to allow for more redefinition in a subclass
Claus Gittinger <cg@exept.de>
parents: 2175
diff changeset
  3762
    |cls name|
804e778590fc slightly refactored to allow for more redefinition in a subclass
Claus Gittinger <cg@exept.de>
parents: 2175
diff changeset
  3763
804e778590fc slightly refactored to allow for more redefinition in a subclass
Claus Gittinger <cg@exept.de>
parents: 2175
diff changeset
  3764
    self specClass notNil ifTrue:[
804e778590fc slightly refactored to allow for more redefinition in a subclass
Claus Gittinger <cg@exept.de>
parents: 2175
diff changeset
  3765
        specClassName isBehavior ifTrue:[
804e778590fc slightly refactored to allow for more redefinition in a subclass
Claus Gittinger <cg@exept.de>
parents: 2175
diff changeset
  3766
            name := specClassName nameWithoutPrefix.
804e778590fc slightly refactored to allow for more redefinition in a subclass
Claus Gittinger <cg@exept.de>
parents: 2175
diff changeset
  3767
        ] ifFalse:[
804e778590fc slightly refactored to allow for more redefinition in a subclass
Claus Gittinger <cg@exept.de>
parents: 2175
diff changeset
  3768
            name := specClassName printString string
804e778590fc slightly refactored to allow for more redefinition in a subclass
Claus Gittinger <cg@exept.de>
parents: 2175
diff changeset
  3769
        ]
804e778590fc slightly refactored to allow for more redefinition in a subclass
Claus Gittinger <cg@exept.de>
parents: 2175
diff changeset
  3770
    ].
804e778590fc slightly refactored to allow for more redefinition in a subclass
Claus Gittinger <cg@exept.de>
parents: 2175
diff changeset
  3771
    (aspects at:#classNameChannel) value:(specClassName ? 'NewApplication').
804e778590fc slightly refactored to allow for more redefinition in a subclass
Claus Gittinger <cg@exept.de>
parents: 2175
diff changeset
  3772
804e778590fc slightly refactored to allow for more redefinition in a subclass
Claus Gittinger <cg@exept.de>
parents: 2175
diff changeset
  3773
    specSuperclassName isNil ifTrue:[
804e778590fc slightly refactored to allow for more redefinition in a subclass
Claus Gittinger <cg@exept.de>
parents: 2175
diff changeset
  3774
        specClassName notNil ifTrue:[
804e778590fc slightly refactored to allow for more redefinition in a subclass
Claus Gittinger <cg@exept.de>
parents: 2175
diff changeset
  3775
            (cls := self resolveName:specClassName) notNil ifTrue:[
804e778590fc slightly refactored to allow for more redefinition in a subclass
Claus Gittinger <cg@exept.de>
parents: 2175
diff changeset
  3776
                specSuperclassName := cls superclass name.
804e778590fc slightly refactored to allow for more redefinition in a subclass
Claus Gittinger <cg@exept.de>
parents: 2175
diff changeset
  3777
            ]
804e778590fc slightly refactored to allow for more redefinition in a subclass
Claus Gittinger <cg@exept.de>
parents: 2175
diff changeset
  3778
        ]
804e778590fc slightly refactored to allow for more redefinition in a subclass
Claus Gittinger <cg@exept.de>
parents: 2175
diff changeset
  3779
    ].
804e778590fc slightly refactored to allow for more redefinition in a subclass
Claus Gittinger <cg@exept.de>
parents: 2175
diff changeset
  3780
    aspects at:#superclassNameChannel
804e778590fc slightly refactored to allow for more redefinition in a subclass
Claus Gittinger <cg@exept.de>
parents: 2175
diff changeset
  3781
        put:((specSuperclassName notNil 
804e778590fc slightly refactored to allow for more redefinition in a subclass
Claus Gittinger <cg@exept.de>
parents: 2175
diff changeset
  3782
                ifTrue:[ specSuperclassName ]
804e778590fc slightly refactored to allow for more redefinition in a subclass
Claus Gittinger <cg@exept.de>
parents: 2175
diff changeset
  3783
                ifFalse:[ 'ApplicationModel' ]) asValue).
804e778590fc slightly refactored to allow for more redefinition in a subclass
Claus Gittinger <cg@exept.de>
parents: 2175
diff changeset
  3784
    aspects at:#superclassNameDefaults
804e778590fc slightly refactored to allow for more redefinition in a subclass
Claus Gittinger <cg@exept.de>
parents: 2175
diff changeset
  3785
        put:#( 'ApplicationModel' 'SimpleDialog' ) asValue.
804e778590fc slightly refactored to allow for more redefinition in a subclass
Claus Gittinger <cg@exept.de>
parents: 2175
diff changeset
  3786
    aspects at:#methodNameChannel
804e778590fc slightly refactored to allow for more redefinition in a subclass
Claus Gittinger <cg@exept.de>
parents: 2175
diff changeset
  3787
        put:((specSelector notNil 
804e778590fc slightly refactored to allow for more redefinition in a subclass
Claus Gittinger <cg@exept.de>
parents: 2175
diff changeset
  3788
                ifTrue:[ specSelector asValue ]
804e778590fc slightly refactored to allow for more redefinition in a subclass
Claus Gittinger <cg@exept.de>
parents: 2175
diff changeset
  3789
                ifFalse:[ #windowSpec ]) asValue).
60
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
  3790
! !
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
  3791
743
d58a3e7e39d5 support user defined font styles
tz
parents: 735
diff changeset
  3792
!UIPainter methodsFor:'user actions'!
446
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
  3793
765
27936ff059d3 obselete methods removed + comments revised
tz
parents: 755
diff changeset
  3794
accept
27936ff059d3 obselete methods removed + comments revised
tz
parents: 755
diff changeset
  3795
    "accepts all modifications done to the attributes of the current section"
27936ff059d3 obselete methods removed + comments revised
tz
parents: 755
diff changeset
  3796
1071
560a9eb1a5d8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1068
diff changeset
  3797
    |painter layout spec layoutTool layoutView t|
1068
dcb2cba5787f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1063
diff changeset
  3798
dcb2cba5787f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1063
diff changeset
  3799
    self acceptChannel value:true; value:false.  "/ force editFields to accept
1188
4805027d9d33 code cleanup
Claus Gittinger <cg@exept.de>
parents: 1186
diff changeset
  3800
    self clearModifiedFlag.
788
8f9f3c3fcf60 avoid modified problems
tz
parents: 787
diff changeset
  3801
765
27936ff059d3 obselete methods removed + comments revised
tz
parents: 755
diff changeset
  3802
    painter := self painter.
1071
560a9eb1a5d8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1068
diff changeset
  3803
    spec := self specTool specification.
765
27936ff059d3 obselete methods removed + comments revised
tz
parents: 755
diff changeset
  3804
27936ff059d3 obselete methods removed + comments revised
tz
parents: 755
diff changeset
  3805
    self isLayoutToolSelected ifTrue:[
1188
4805027d9d33 code cleanup
Claus Gittinger <cg@exept.de>
parents: 1186
diff changeset
  3806
        layoutTool := self layoutTool.
4805027d9d33 code cleanup
Claus Gittinger <cg@exept.de>
parents: 1186
diff changeset
  3807
4805027d9d33 code cleanup
Claus Gittinger <cg@exept.de>
parents: 1186
diff changeset
  3808
        (layout := layoutTool layout) notNil ifTrue:[
4805027d9d33 code cleanup
Claus Gittinger <cg@exept.de>
parents: 1186
diff changeset
  3809
            layoutTool layoutType == #Extent ifTrue:[
4805027d9d33 code cleanup
Claus Gittinger <cg@exept.de>
parents: 1186
diff changeset
  3810
                layoutView := layoutTool layoutView.
4805027d9d33 code cleanup
Claus Gittinger <cg@exept.de>
parents: 1186
diff changeset
  3811
2213
cb1e13d68761 UseViewScroller
Claus Gittinger <cg@exept.de>
parents: 2210
diff changeset
  3812
                layoutView == self canvas ifTrue:[
cb1e13d68761 UseViewScroller
Claus Gittinger <cg@exept.de>
parents: 2210
diff changeset
  3813
                    layoutView extent:layout.
cb1e13d68761 UseViewScroller
Claus Gittinger <cg@exept.de>
parents: 2210
diff changeset
  3814
                    UseViewScroller == true ifTrue:[
cb1e13d68761 UseViewScroller
Claus Gittinger <cg@exept.de>
parents: 2210
diff changeset
  3815
                        layoutView container container sizeChanged:nil.
cb1e13d68761 UseViewScroller
Claus Gittinger <cg@exept.de>
parents: 2210
diff changeset
  3816
                    ].
1188
4805027d9d33 code cleanup
Claus Gittinger <cg@exept.de>
parents: 1186
diff changeset
  3817
                ] ifFalse:[
4805027d9d33 code cleanup
Claus Gittinger <cg@exept.de>
parents: 1186
diff changeset
  3818
                    spec useDefaultExtent:(layoutTool aspectFor:#useDefaultExtent) value.
4805027d9d33 code cleanup
Claus Gittinger <cg@exept.de>
parents: 1186
diff changeset
  3819
                    spec useDefaultExtent ifTrue:[
4805027d9d33 code cleanup
Claus Gittinger <cg@exept.de>
parents: 1186
diff changeset
  3820
                        "/ temporarily unfreeze the widgets size
4805027d9d33 code cleanup
Claus Gittinger <cg@exept.de>
parents: 1186
diff changeset
  3821
                        "/ (but remember, the old setting, which is actually
4805027d9d33 code cleanup
Claus Gittinger <cg@exept.de>
parents: 1186
diff changeset
  3822
                        "/ controlled by the resizeForLabel attribute)
4805027d9d33 code cleanup
Claus Gittinger <cg@exept.de>
parents: 1186
diff changeset
  3823
                        t := layoutView sizeFixed.
4805027d9d33 code cleanup
Claus Gittinger <cg@exept.de>
parents: 1186
diff changeset
  3824
                        layoutView sizeFixed:false.
4805027d9d33 code cleanup
Claus Gittinger <cg@exept.de>
parents: 1186
diff changeset
  3825
                        layout := layoutView preferredExtent.    
4805027d9d33 code cleanup
Claus Gittinger <cg@exept.de>
parents: 1186
diff changeset
  3826
                        layoutView sizeFixed:t.
4805027d9d33 code cleanup
Claus Gittinger <cg@exept.de>
parents: 1186
diff changeset
  3827
                    ].
4805027d9d33 code cleanup
Claus Gittinger <cg@exept.de>
parents: 1186
diff changeset
  3828
                    painter setExtent:layout.
4805027d9d33 code cleanup
Claus Gittinger <cg@exept.de>
parents: 1186
diff changeset
  3829
                    painter updateFromSpec:spec.
4805027d9d33 code cleanup
Claus Gittinger <cg@exept.de>
parents: 1186
diff changeset
  3830
                ]
4805027d9d33 code cleanup
Claus Gittinger <cg@exept.de>
parents: 1186
diff changeset
  3831
            ] ifFalse:[
1444
fec7424dccda clear the useDefaultExtent flag, if the layout is NOT an extent
martin
parents: 1442
diff changeset
  3832
                spec useDefaultExtent:false.
1188
4805027d9d33 code cleanup
Claus Gittinger <cg@exept.de>
parents: 1186
diff changeset
  3833
                painter setLayout:layout
4805027d9d33 code cleanup
Claus Gittinger <cg@exept.de>
parents: 1186
diff changeset
  3834
            ]
4805027d9d33 code cleanup
Claus Gittinger <cg@exept.de>
parents: 1186
diff changeset
  3835
        ]
765
27936ff059d3 obselete methods removed + comments revised
tz
parents: 755
diff changeset
  3836
    ] ifFalse:[
1188
4805027d9d33 code cleanup
Claus Gittinger <cg@exept.de>
parents: 1186
diff changeset
  3837
        self isHelpToolSelected ifTrue:[
4805027d9d33 code cleanup
Claus Gittinger <cg@exept.de>
parents: 1186
diff changeset
  3838
            self helpTool accept.      
4805027d9d33 code cleanup
Claus Gittinger <cg@exept.de>
parents: 1186
diff changeset
  3839
            spec activeHelpKey:self helpTool helpKey.
4805027d9d33 code cleanup
Claus Gittinger <cg@exept.de>
parents: 1186
diff changeset
  3840
        ].      
4805027d9d33 code cleanup
Claus Gittinger <cg@exept.de>
parents: 1186
diff changeset
  3841
        painter updateFromSpec:spec
1071
560a9eb1a5d8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1068
diff changeset
  3842
    ].
560a9eb1a5d8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1068
diff changeset
  3843
2007
77cf7ecc9ecf embedding as special editors
Claus Gittinger <cg@exept.de>
parents: 2001
diff changeset
  3844
    self clearModified
765
27936ff059d3 obselete methods removed + comments revised
tz
parents: 755
diff changeset
  3845
!
27936ff059d3 obselete methods removed + comments revised
tz
parents: 755
diff changeset
  3846
27936ff059d3 obselete methods removed + comments revised
tz
parents: 755
diff changeset
  3847
addWidget: aSpecClass
27936ff059d3 obselete methods removed + comments revised
tz
parents: 755
diff changeset
  3848
    "adds a widget from aSpecClass to the current widget"
27936ff059d3 obselete methods removed + comments revised
tz
parents: 755
diff changeset
  3849
27936ff059d3 obselete methods removed + comments revised
tz
parents: 755
diff changeset
  3850
    self addWidgetOfSpec: (Array with: (Smalltalk at: aSpecClass) new)
27936ff059d3 obselete methods removed + comments revised
tz
parents: 755
diff changeset
  3851
27936ff059d3 obselete methods removed + comments revised
tz
parents: 755
diff changeset
  3852
!
27936ff059d3 obselete methods removed + comments revised
tz
parents: 755
diff changeset
  3853
27936ff059d3 obselete methods removed + comments revised
tz
parents: 755
diff changeset
  3854
addWidgetOfSpec: aSpec
27936ff059d3 obselete methods removed + comments revised
tz
parents: 755
diff changeset
  3855
    "adds a widget from aSpec to the current widget"
27936ff059d3 obselete methods removed + comments revised
tz
parents: 755
diff changeset
  3856
1521
2efd2b9419c4 undo: show type of undo in menu;
Claus Gittinger <cg@exept.de>
parents: 1499
diff changeset
  3857
    |newSel|
2efd2b9419c4 undo: show type of undo in menu;
Claus Gittinger <cg@exept.de>
parents: 1499
diff changeset
  3858
2077
bf7f7207fa07 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2072
diff changeset
  3859
    (newSel := painter pasteSpecifications:aSpec keepLayout:false at:0@0) notNil
bf7f7207fa07 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2072
diff changeset
  3860
    ifTrue:[
bf7f7207fa07 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2072
diff changeset
  3861
        painter select: newSel
bf7f7207fa07 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2072
diff changeset
  3862
    ] ifFalse:[   
1521
2efd2b9419c4 undo: show type of undo in menu;
Claus Gittinger <cg@exept.de>
parents: 1499
diff changeset
  3863
        ((treeView selection size = 0) or: [treeView selectedNode isNil])
2077
bf7f7207fa07 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2072
diff changeset
  3864
        ifTrue:[                          
1521
2efd2b9419c4 undo: show type of undo in menu;
Claus Gittinger <cg@exept.de>
parents: 1499
diff changeset
  3865
            treeView selection: #(1).
2077
bf7f7207fa07 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2072
diff changeset
  3866
        ] ifFalse:[  
1521
2efd2b9419c4 undo: show type of undo in menu;
Claus Gittinger <cg@exept.de>
parents: 1499
diff changeset
  3867
            treeView selectNode: (treeView detectNode: [:n| n = treeView selectedNode parent])
2efd2b9419c4 undo: show type of undo in menu;
Claus Gittinger <cg@exept.de>
parents: 1499
diff changeset
  3868
        ].
2efd2b9419c4 undo: show type of undo in menu;
Claus Gittinger <cg@exept.de>
parents: 1499
diff changeset
  3869
        self addWidgetOfSpec: aSpec
765
27936ff059d3 obselete methods removed + comments revised
tz
parents: 755
diff changeset
  3870
    ]
27936ff059d3 obselete methods removed + comments revised
tz
parents: 755
diff changeset
  3871
2077
bf7f7207fa07 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2072
diff changeset
  3872
    "Modified: / 05-09-2006 / 18:37:12 / cg"
765
27936ff059d3 obselete methods removed + comments revised
tz
parents: 755
diff changeset
  3873
!
27936ff059d3 obselete methods removed + comments revised
tz
parents: 755
diff changeset
  3874
27936ff059d3 obselete methods removed + comments revised
tz
parents: 755
diff changeset
  3875
cancel
27936ff059d3 obselete methods removed + comments revised
tz
parents: 755
diff changeset
  3876
    "cancels all modifications done to the attributes of the current section; 
27936ff059d3 obselete methods removed + comments revised
tz
parents: 755
diff changeset
  3877
     reread the old attributes"
27936ff059d3 obselete methods removed + comments revised
tz
parents: 755
diff changeset
  3878
27936ff059d3 obselete methods removed + comments revised
tz
parents: 755
diff changeset
  3879
    |spec key view|
27936ff059d3 obselete methods removed + comments revised
tz
parents: 755
diff changeset
  3880
27936ff059d3 obselete methods removed + comments revised
tz
parents: 755
diff changeset
  3881
    self isModified ifTrue:[
1188
4805027d9d33 code cleanup
Claus Gittinger <cg@exept.de>
parents: 1186
diff changeset
  3882
        (spec := self painter specForSelection) notNil ifTrue:[
4805027d9d33 code cleanup
Claus Gittinger <cg@exept.de>
parents: 1186
diff changeset
  3883
            key := spec activeHelpKey.
4805027d9d33 code cleanup
Claus Gittinger <cg@exept.de>
parents: 1186
diff changeset
  3884
        ].
4805027d9d33 code cleanup
Claus Gittinger <cg@exept.de>
parents: 1186
diff changeset
  3885
        self helpTool helpKey:key.
4805027d9d33 code cleanup
Claus Gittinger <cg@exept.de>
parents: 1186
diff changeset
  3886
4805027d9d33 code cleanup
Claus Gittinger <cg@exept.de>
parents: 1186
diff changeset
  3887
        treeView isCanvasSelected ifTrue: [
4805027d9d33 code cleanup
Claus Gittinger <cg@exept.de>
parents: 1186
diff changeset
  3888
            spec := treeView canvasSpec.
4805027d9d33 code cleanup
Claus Gittinger <cg@exept.de>
parents: 1186
diff changeset
  3889
        ].
1710
4d81ff7b3412 autoAccept on selectionChange; ok -> apply;
Claus Gittinger <cg@exept.de>
parents: 1698
diff changeset
  3890
1188
4805027d9d33 code cleanup
Claus Gittinger <cg@exept.de>
parents: 1186
diff changeset
  3891
        self specTool specification:spec.
4805027d9d33 code cleanup
Claus Gittinger <cg@exept.de>
parents: 1186
diff changeset
  3892
        view := self layoutTool layoutView.
4805027d9d33 code cleanup
Claus Gittinger <cg@exept.de>
parents: 1186
diff changeset
  3893
4805027d9d33 code cleanup
Claus Gittinger <cg@exept.de>
parents: 1186
diff changeset
  3894
        self setViewInLayoutTool:view spec:spec.
4805027d9d33 code cleanup
Claus Gittinger <cg@exept.de>
parents: 1186
diff changeset
  3895
        spec class == DataSetSpec ifTrue:[
4805027d9d33 code cleanup
Claus Gittinger <cg@exept.de>
parents: 1186
diff changeset
  3896
            view notNil ifTrue:[
4805027d9d33 code cleanup
Claus Gittinger <cg@exept.de>
parents: 1186
diff changeset
  3897
                view columnDescriptors:(spec columns)
4805027d9d33 code cleanup
Claus Gittinger <cg@exept.de>
parents: 1186
diff changeset
  3898
            ]
4805027d9d33 code cleanup
Claus Gittinger <cg@exept.de>
parents: 1186
diff changeset
  3899
        ].        
4805027d9d33 code cleanup
Claus Gittinger <cg@exept.de>
parents: 1186
diff changeset
  3900
        self clearModifiedFlag.
2007
77cf7ecc9ecf embedding as special editors
Claus Gittinger <cg@exept.de>
parents: 2001
diff changeset
  3901
        self clearModified.
765
27936ff059d3 obselete methods removed + comments revised
tz
parents: 755
diff changeset
  3902
    ]
27936ff059d3 obselete methods removed + comments revised
tz
parents: 755
diff changeset
  3903
!
27936ff059d3 obselete methods removed + comments revised
tz
parents: 755
diff changeset
  3904
1940
0f9be199d1c5 +replace widget
Claus Gittinger <cg@exept.de>
parents: 1917
diff changeset
  3905
doAskAndReplaceWidgetBy
0f9be199d1c5 +replace widget
Claus Gittinger <cg@exept.de>
parents: 1917
diff changeset
  3906
    |widgetClass|
0f9be199d1c5 +replace widget
Claus Gittinger <cg@exept.de>
parents: 1917
diff changeset
  3907
0f9be199d1c5 +replace widget
Claus Gittinger <cg@exept.de>
parents: 1917
diff changeset
  3908
    widgetClass := Dialog requestClass:'Spec- or View-Class:' okLabel:'OK' initialAnswer:nil.
0f9be199d1c5 +replace widget
Claus Gittinger <cg@exept.de>
parents: 1917
diff changeset
  3909
    widgetClass isNil ifTrue:[
0f9be199d1c5 +replace widget
Claus Gittinger <cg@exept.de>
parents: 1917
diff changeset
  3910
        ^ self
0f9be199d1c5 +replace widget
Claus Gittinger <cg@exept.de>
parents: 1917
diff changeset
  3911
    ].
0f9be199d1c5 +replace widget
Claus Gittinger <cg@exept.de>
parents: 1917
diff changeset
  3912
    self replaceWidgetByClass:widgetClass
0f9be199d1c5 +replace widget
Claus Gittinger <cg@exept.de>
parents: 1917
diff changeset
  3913
!
0f9be199d1c5 +replace widget
Claus Gittinger <cg@exept.de>
parents: 1917
diff changeset
  3914
2210
0a2c19976d82 action creation/browse added
Claus Gittinger <cg@exept.de>
parents: 2208
diff changeset
  3915
doBrowseActionMethod:aspectSelector
2222
23205ddb56e1 bug fix: saving a spec while grid is on saved the grid-Form
Claus Gittinger <cg@exept.de>
parents: 2220
diff changeset
  3916
    self doBrowseActionMethod:aspectSelector nameAs:aspectSelector
23205ddb56e1 bug fix: saving a spec while grid is on saved the grid-Form
Claus Gittinger <cg@exept.de>
parents: 2220
diff changeset
  3917
!
23205ddb56e1 bug fix: saving a spec while grid is on saved the grid-Form
Claus Gittinger <cg@exept.de>
parents: 2220
diff changeset
  3918
23205ddb56e1 bug fix: saving a spec while grid is on saved the grid-Form
Claus Gittinger <cg@exept.de>
parents: 2220
diff changeset
  3919
doBrowseActionMethod:aspectSelector nameAs:aspectNameShown
2210
0a2c19976d82 action creation/browse added
Claus Gittinger <cg@exept.de>
parents: 2208
diff changeset
  3920
    |cls spec aspect code|
0a2c19976d82 action creation/browse added
Claus Gittinger <cg@exept.de>
parents: 2208
diff changeset
  3921
0a2c19976d82 action creation/browse added
Claus Gittinger <cg@exept.de>
parents: 2208
diff changeset
  3922
    cls := self specClass.
0a2c19976d82 action creation/browse added
Claus Gittinger <cg@exept.de>
parents: 2208
diff changeset
  3923
    cls isNil ifTrue:[
0a2c19976d82 action creation/browse added
Claus Gittinger <cg@exept.de>
parents: 2208
diff changeset
  3924
        Dialog information:'No Application Class defined.'.
0a2c19976d82 action creation/browse added
Claus Gittinger <cg@exept.de>
parents: 2208
diff changeset
  3925
        ^ self
0a2c19976d82 action creation/browse added
Claus Gittinger <cg@exept.de>
parents: 2208
diff changeset
  3926
    ].
0a2c19976d82 action creation/browse added
Claus Gittinger <cg@exept.de>
parents: 2208
diff changeset
  3927
0a2c19976d82 action creation/browse added
Claus Gittinger <cg@exept.de>
parents: 2208
diff changeset
  3928
    spec := painter specForSelection.
0a2c19976d82 action creation/browse added
Claus Gittinger <cg@exept.de>
parents: 2208
diff changeset
  3929
    spec isNil ifTrue:[^ self].
0a2c19976d82 action creation/browse added
Claus Gittinger <cg@exept.de>
parents: 2208
diff changeset
  3930
    aspect := spec perform:aspectSelector.
0a2c19976d82 action creation/browse added
Claus Gittinger <cg@exept.de>
parents: 2208
diff changeset
  3931
    aspect isNil ifTrue:[
0a2c19976d82 action creation/browse added
Claus Gittinger <cg@exept.de>
parents: 2208
diff changeset
  3932
        Dialog information:(resources 
2222
23205ddb56e1 bug fix: saving a spec while grid is on saved the grid-Form
Claus Gittinger <cg@exept.de>
parents: 2220
diff changeset
  3933
                                string:'Please enter a Method name for "%1" first.'
23205ddb56e1 bug fix: saving a spec while grid is on saved the grid-Form
Claus Gittinger <cg@exept.de>
parents: 2220
diff changeset
  3934
                                with:(resources string:aspectNameShown) allBold).
2210
0a2c19976d82 action creation/browse added
Claus Gittinger <cg@exept.de>
parents: 2208
diff changeset
  3935
        ^ self
0a2c19976d82 action creation/browse added
Claus Gittinger <cg@exept.de>
parents: 2208
diff changeset
  3936
    ].
0a2c19976d82 action creation/browse added
Claus Gittinger <cg@exept.de>
parents: 2208
diff changeset
  3937
        
0a2c19976d82 action creation/browse added
Claus Gittinger <cg@exept.de>
parents: 2208
diff changeset
  3938
    (cls implements:aspect asSymbol) ifFalse:[
0a2c19976d82 action creation/browse added
Claus Gittinger <cg@exept.de>
parents: 2208
diff changeset
  3939
        (Dialog confirm:(resources 
0a2c19976d82 action creation/browse added
Claus Gittinger <cg@exept.de>
parents: 2208
diff changeset
  3940
                            stringWithCRs:'%1 does not implement %2.\\Create ?'
0a2c19976d82 action creation/browse added
Claus Gittinger <cg@exept.de>
parents: 2208
diff changeset
  3941
                            with:(cls name allBold)
0a2c19976d82 action creation/browse added
Claus Gittinger <cg@exept.de>
parents: 2208
diff changeset
  3942
                            with:aspect allBold)) 
0a2c19976d82 action creation/browse added
Claus Gittinger <cg@exept.de>
parents: 2208
diff changeset
  3943
        ifFalse:[
0a2c19976d82 action creation/browse added
Claus Gittinger <cg@exept.de>
parents: 2208
diff changeset
  3944
            (Dialog confirm:(resources 
0a2c19976d82 action creation/browse added
Claus Gittinger <cg@exept.de>
parents: 2208
diff changeset
  3945
                                stringWithCRs:'Browse implementors of %1 ?'
0a2c19976d82 action creation/browse added
Claus Gittinger <cg@exept.de>
parents: 2208
diff changeset
  3946
                                with:aspect allBold)) 
0a2c19976d82 action creation/browse added
Claus Gittinger <cg@exept.de>
parents: 2208
diff changeset
  3947
            ifTrue:[
2219
dc5bf7573298 changed #doBrowseActionMethod:
Claus Gittinger <cg@exept.de>
parents: 2218
diff changeset
  3948
                UserPreferences current systemBrowserClass browseImplementorsOf:aspect
2210
0a2c19976d82 action creation/browse added
Claus Gittinger <cg@exept.de>
parents: 2208
diff changeset
  3949
            ].
0a2c19976d82 action creation/browse added
Claus Gittinger <cg@exept.de>
parents: 2208
diff changeset
  3950
            ^ self
0a2c19976d82 action creation/browse added
Claus Gittinger <cg@exept.de>
parents: 2208
diff changeset
  3951
        ].
0a2c19976d82 action creation/browse added
Claus Gittinger <cg@exept.de>
parents: 2208
diff changeset
  3952
        code := painter
0a2c19976d82 action creation/browse added
Claus Gittinger <cg@exept.de>
parents: 2208
diff changeset
  3953
            generateActionMethodFor:aspect 
0a2c19976d82 action creation/browse added
Claus Gittinger <cg@exept.de>
parents: 2208
diff changeset
  3954
            spec:nil 
0a2c19976d82 action creation/browse added
Claus Gittinger <cg@exept.de>
parents: 2208
diff changeset
  3955
            inClass:cls.
0a2c19976d82 action creation/browse added
Claus Gittinger <cg@exept.de>
parents: 2208
diff changeset
  3956
        code readStream fileIn.
0a2c19976d82 action creation/browse added
Claus Gittinger <cg@exept.de>
parents: 2208
diff changeset
  3957
    ].
2219
dc5bf7573298 changed #doBrowseActionMethod:
Claus Gittinger <cg@exept.de>
parents: 2218
diff changeset
  3958
    UserPreferences current systemBrowserClass openInClass:cls selector:aspect
2210
0a2c19976d82 action creation/browse added
Claus Gittinger <cg@exept.de>
parents: 2208
diff changeset
  3959
!
0a2c19976d82 action creation/browse added
Claus Gittinger <cg@exept.de>
parents: 2208
diff changeset
  3960
446
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
  3961
doBrowseAspectMethods
765
27936ff059d3 obselete methods removed + comments revised
tz
parents: 755
diff changeset
  3962
    "opens a browser on the aspect methods"
27936ff059d3 obselete methods removed + comments revised
tz
parents: 755
diff changeset
  3963
27936ff059d3 obselete methods removed + comments revised
tz
parents: 755
diff changeset
  3964
    |methods|
446
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
  3965
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
  3966
    self painter isModified ifTrue:[
1392
f6f7a70c5d41 browserClass from preferences
Claus Gittinger <cg@exept.de>
parents: 1391
diff changeset
  3967
        self warn:'The current window spec has not yet been saved!!\\The System Browser may show the code of the old aspect methods.' withCRs.
446
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
  3968
    ].
765
27936ff059d3 obselete methods removed + comments revised
tz
parents: 755
diff changeset
  3969
27936ff059d3 obselete methods removed + comments revised
tz
parents: 755
diff changeset
  3970
    (methods := self painter aspectMethods) isEmpty ifTrue:[
1683
f95658463570 added selective aspect method generation.
Claus Gittinger <cg@exept.de>
parents: 1671
diff changeset
  3971
        self warn:'No aspect methods found !!'.
1392
f6f7a70c5d41 browserClass from preferences
Claus Gittinger <cg@exept.de>
parents: 1391
diff changeset
  3972
        ^ self.
446
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
  3973
    ].
1684
34b35b8ae80f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1683
diff changeset
  3974
    UserPreferences systemBrowserClass 
34b35b8ae80f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1683
diff changeset
  3975
        browseMethods:methods 
34b35b8ae80f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1683
diff changeset
  3976
        title:'Aspect methods'.
446
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
  3977
!
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
  3978
713
f94e58bb44ac some changes for the docu
tz
parents: 697
diff changeset
  3979
doBrowseClass
765
27936ff059d3 obselete methods removed + comments revised
tz
parents: 755
diff changeset
  3980
    "opens a System Browser on the specClass"
713
f94e58bb44ac some changes for the docu
tz
parents: 697
diff changeset
  3981
f94e58bb44ac some changes for the docu
tz
parents: 697
diff changeset
  3982
    self painter isModified ifTrue:[
1392
f6f7a70c5d41 browserClass from preferences
Claus Gittinger <cg@exept.de>
parents: 1391
diff changeset
  3983
        self warn:'The current window spec has not yet been saved!!\\The System Browser will show the code of the old window spec.' withCRs.
713
f94e58bb44ac some changes for the docu
tz
parents: 697
diff changeset
  3984
    ].
765
27936ff059d3 obselete methods removed + comments revised
tz
parents: 755
diff changeset
  3985
1983
5528c812da8f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1976
diff changeset
  3986
    UserPreferences systemBrowserClass openInClass:(self resolveName:specClassName)
743
d58a3e7e39d5 support user defined font styles
tz
parents: 735
diff changeset
  3987
!
d58a3e7e39d5 support user defined font styles
tz
parents: 735
diff changeset
  3988
1742
4c39c2f1dcc7 help texts
Claus Gittinger <cg@exept.de>
parents: 1739
diff changeset
  3989
doBrowseViewClass
4c39c2f1dcc7 help texts
Claus Gittinger <cg@exept.de>
parents: 1739
diff changeset
  3990
    "opens a browser on the selected widgets class"
4c39c2f1dcc7 help texts
Claus Gittinger <cg@exept.de>
parents: 1739
diff changeset
  3991
4c39c2f1dcc7 help texts
Claus Gittinger <cg@exept.de>
parents: 1739
diff changeset
  3992
    |selection|
4c39c2f1dcc7 help texts
Claus Gittinger <cg@exept.de>
parents: 1739
diff changeset
  3993
4c39c2f1dcc7 help texts
Claus Gittinger <cg@exept.de>
parents: 1739
diff changeset
  3994
    ((selection := self painter selection) isCollection and: [selection size >= 1]) ifTrue:[
4c39c2f1dcc7 help texts
Claus Gittinger <cg@exept.de>
parents: 1739
diff changeset
  3995
        selection first class browse
4c39c2f1dcc7 help texts
Claus Gittinger <cg@exept.de>
parents: 1739
diff changeset
  3996
    ] ifFalse: [
4c39c2f1dcc7 help texts
Claus Gittinger <cg@exept.de>
parents: 1739
diff changeset
  3997
        selection class browse
4c39c2f1dcc7 help texts
Claus Gittinger <cg@exept.de>
parents: 1739
diff changeset
  3998
    ]
4c39c2f1dcc7 help texts
Claus Gittinger <cg@exept.de>
parents: 1739
diff changeset
  3999
!
4c39c2f1dcc7 help texts
Claus Gittinger <cg@exept.de>
parents: 1739
diff changeset
  4000
755
cfbbec0a33c6 some cleans for grid, etc.
tz
parents: 743
diff changeset
  4001
doDefineClassAndSelector
765
27936ff059d3 obselete methods removed + comments revised
tz
parents: 755
diff changeset
  4002
    "launches a dialog for defining class, superclass, and selector of the application"
755
cfbbec0a33c6 some cleans for grid, etc.
tz
parents: 743
diff changeset
  4003
1819
cbf2079fd723 bugfix: test whether specClass is a symbol not a string
ca
parents: 1803
diff changeset
  4004
    |again readFromModelKeyed|
cbf2079fd723 bugfix: test whether specClass is a symbol not a string
ca
parents: 1803
diff changeset
  4005
cbf2079fd723 bugfix: test whether specClass is a symbol not a string
ca
parents: 1803
diff changeset
  4006
    readFromModelKeyed := [:aKey| |ret|
cbf2079fd723 bugfix: test whether specClass is a symbol not a string
ca
parents: 1803
diff changeset
  4007
        ret := (self aspectFor:aKey) value.
cbf2079fd723 bugfix: test whether specClass is a symbol not a string
ca
parents: 1803
diff changeset
  4008
        ret isEmptyOrNil ifTrue:[
cbf2079fd723 bugfix: test whether specClass is a symbol not a string
ca
parents: 1803
diff changeset
  4009
            ret := nil
cbf2079fd723 bugfix: test whether specClass is a symbol not a string
ca
parents: 1803
diff changeset
  4010
        ] ifFalse:[
cbf2079fd723 bugfix: test whether specClass is a symbol not a string
ca
parents: 1803
diff changeset
  4011
            ret isString ifTrue:[
cbf2079fd723 bugfix: test whether specClass is a symbol not a string
ca
parents: 1803
diff changeset
  4012
                ret := ret string withoutSeparators.
cbf2079fd723 bugfix: test whether specClass is a symbol not a string
ca
parents: 1803
diff changeset
  4013
                ret := ret isEmpty ifTrue:[nil] ifFalse:[ret asSymbol].
cbf2079fd723 bugfix: test whether specClass is a symbol not a string
ca
parents: 1803
diff changeset
  4014
            ].
cbf2079fd723 bugfix: test whether specClass is a symbol not a string
ca
parents: 1803
diff changeset
  4015
        ].
cbf2079fd723 bugfix: test whether specClass is a symbol not a string
ca
parents: 1803
diff changeset
  4016
        ret
cbf2079fd723 bugfix: test whether specClass is a symbol not a string
ca
parents: 1803
diff changeset
  4017
    ].
755
cfbbec0a33c6 some cleans for grid, etc.
tz
parents: 743
diff changeset
  4018
cfbbec0a33c6 some cleans for grid, etc.
tz
parents: 743
diff changeset
  4019
    [
1188
4805027d9d33 code cleanup
Claus Gittinger <cg@exept.de>
parents: 1186
diff changeset
  4020
        again := false.
4805027d9d33 code cleanup
Claus Gittinger <cg@exept.de>
parents: 1186
diff changeset
  4021
1983
5528c812da8f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1976
diff changeset
  4022
        aspects at:#classNameChannel      put:(specClassName      ? 'NewApplication')   asValue.
1819
cbf2079fd723 bugfix: test whether specClass is a symbol not a string
ca
parents: 1803
diff changeset
  4023
        aspects at:#methodNameChannel     put:(specSelector   ? 'windowSpec')       asValue.
1976
969584dd8beb code cleanup & refactoring
Claus Gittinger <cg@exept.de>
parents: 1968
diff changeset
  4024
        aspects at:#superclassNameChannel put:(specSuperclassName ? 'ApplicationModel') asValue.
1188
4805027d9d33 code cleanup
Claus Gittinger <cg@exept.de>
parents: 1186
diff changeset
  4025
4805027d9d33 code cleanup
Claus Gittinger <cg@exept.de>
parents: 1186
diff changeset
  4026
        (self openDialogInterface:#dialogSpecForDefiningClassAndSelector) ifTrue:[
2206
1a7921b6c104 changed #doDefineClassAndSelector
Claus Gittinger <cg@exept.de>
parents: 2202
diff changeset
  4027
            specClassName  := readFromModelKeyed value:#classNameChannel.
1819
cbf2079fd723 bugfix: test whether specClass is a symbol not a string
ca
parents: 1803
diff changeset
  4028
            specSelector   := readFromModelKeyed value:#methodNameChannel.
1976
969584dd8beb code cleanup & refactoring
Claus Gittinger <cg@exept.de>
parents: 1968
diff changeset
  4029
            specSuperclassName := readFromModelKeyed value:#superclassNameChannel.
1188
4805027d9d33 code cleanup
Claus Gittinger <cg@exept.de>
parents: 1186
diff changeset
  4030
4805027d9d33 code cleanup
Claus Gittinger <cg@exept.de>
parents: 1186
diff changeset
  4031
            (again := self checkClassAndSelector not) ifFalse:[
1983
5528c812da8f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1976
diff changeset
  4032
                self painter className:specClassName
1976
969584dd8beb code cleanup & refactoring
Claus Gittinger <cg@exept.de>
parents: 1968
diff changeset
  4033
                        superclassName:specSuperclassName
1188
4805027d9d33 code cleanup
Claus Gittinger <cg@exept.de>
parents: 1186
diff changeset
  4034
                              selector:specSelector.
1394
97a7eeabae40 overwriting existing method check (in #defineClass & selector);
Claus Gittinger <cg@exept.de>
parents: 1392
diff changeset
  4035
            ].
97a7eeabae40 overwriting existing method check (in #defineClass & selector);
Claus Gittinger <cg@exept.de>
parents: 1392
diff changeset
  4036
97a7eeabae40 overwriting existing method check (in #defineClass & selector);
Claus Gittinger <cg@exept.de>
parents: 1392
diff changeset
  4037
            again ifFalse:[
1983
5528c812da8f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1976
diff changeset
  4038
                ((Smalltalk at:specClassName asSymbol) notNil
5528c812da8f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1976
diff changeset
  4039
                and:[ (Smalltalk at:specClassName asSymbol) class includesSelector:specSelector ])
1394
97a7eeabae40 overwriting existing method check (in #defineClass & selector);
Claus Gittinger <cg@exept.de>
parents: 1392
diff changeset
  4040
                ifTrue:[
1983
5528c812da8f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1976
diff changeset
  4041
                    (self confirm:('%1 already implements %2. Overwrite ?' bindWith:specClassName with:specSelector))
1394
97a7eeabae40 overwriting existing method check (in #defineClass & selector);
Claus Gittinger <cg@exept.de>
parents: 1392
diff changeset
  4042
                    ifFalse:[
97a7eeabae40 overwriting existing method check (in #defineClass & selector);
Claus Gittinger <cg@exept.de>
parents: 1392
diff changeset
  4043
                        again := true.
97a7eeabae40 overwriting existing method check (in #defineClass & selector);
Claus Gittinger <cg@exept.de>
parents: 1392
diff changeset
  4044
                    ].
97a7eeabae40 overwriting existing method check (in #defineClass & selector);
Claus Gittinger <cg@exept.de>
parents: 1392
diff changeset
  4045
                ].
97a7eeabae40 overwriting existing method check (in #defineClass & selector);
Claus Gittinger <cg@exept.de>
parents: 1392
diff changeset
  4046
            ].
97a7eeabae40 overwriting existing method check (in #defineClass & selector);
Claus Gittinger <cg@exept.de>
parents: 1392
diff changeset
  4047
        ] ifFalse: [
1188
4805027d9d33 code cleanup
Claus Gittinger <cg@exept.de>
parents: 1186
diff changeset
  4048
            ^nil
4805027d9d33 code cleanup
Claus Gittinger <cg@exept.de>
parents: 1186
diff changeset
  4049
        ]
755
cfbbec0a33c6 some cleans for grid, etc.
tz
parents: 743
diff changeset
  4050
cfbbec0a33c6 some cleans for grid, etc.
tz
parents: 743
diff changeset
  4051
    ] doWhile:[again].
cfbbec0a33c6 some cleans for grid, etc.
tz
parents: 743
diff changeset
  4052
1983
5528c812da8f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1976
diff changeset
  4053
    specClassName := specClassName isBehavior ifTrue:[specClassName name]
5528c812da8f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1976
diff changeset
  4054
                                      ifFalse:[specClassName].
755
cfbbec0a33c6 some cleans for grid, etc.
tz
parents: 743
diff changeset
  4055
1188
4805027d9d33 code cleanup
Claus Gittinger <cg@exept.de>
parents: 1186
diff changeset
  4056
    self clearModifiedFlag.
1983
5528c812da8f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1976
diff changeset
  4057
    self helpTool buildAndMergeFromClass:specClassName.
765
27936ff059d3 obselete methods removed + comments revised
tz
parents: 755
diff changeset
  4058
    self updateInfoLabel
892
b200d2d9bf5e avoid repeated send-sequences
Claus Gittinger <cg@exept.de>
parents: 890
diff changeset
  4059
b200d2d9bf5e avoid repeated send-sequences
Claus Gittinger <cg@exept.de>
parents: 890
diff changeset
  4060
    "Modified: / 16.7.1998 / 18:26:33 / cg"
755
cfbbec0a33c6 some cleans for grid, etc.
tz
parents: 743
diff changeset
  4061
!
cfbbec0a33c6 some cleans for grid, etc.
tz
parents: 743
diff changeset
  4062
cfbbec0a33c6 some cleans for grid, etc.
tz
parents: 743
diff changeset
  4063
doDefineGrid
765
27936ff059d3 obselete methods removed + comments revised
tz
parents: 755
diff changeset
  4064
    "opens a dialog for the grid parameters"
27936ff059d3 obselete methods removed + comments revised
tz
parents: 755
diff changeset
  4065
755
cfbbec0a33c6 some cleans for grid, etc.
tz
parents: 743
diff changeset
  4066
    |hspace vspace bindings painter gridPara settings|
cfbbec0a33c6 some cleans for grid, etc.
tz
parents: 743
diff changeset
  4067
cfbbec0a33c6 some cleans for grid, etc.
tz
parents: 743
diff changeset
  4068
    painter  := self painter.
cfbbec0a33c6 some cleans for grid, etc.
tz
parents: 743
diff changeset
  4069
    bindings := IdentityDictionary new.
cfbbec0a33c6 some cleans for grid, etc.
tz
parents: 743
diff changeset
  4070
    gridPara := painter gridParameters copy.
1021
8c1deb0281c7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 984
diff changeset
  4071
    settings := self class settings.
8c1deb0281c7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 984
diff changeset
  4072
8c1deb0281c7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 984
diff changeset
  4073
    bindings at:#showGrid    put:((settings at: #GridShown ifAbsent: [painter gridShown]) asValue).
8c1deb0281c7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 984
diff changeset
  4074
    bindings at:#alignToGrid put:((settings at: #GridAlign ifAbsent: [painter gridAlign]) asValue).
755
cfbbec0a33c6 some cleans for grid, etc.
tz
parents: 743
diff changeset
  4075
    bindings at:#hspace      put:((gridPara at:1) asValue).
cfbbec0a33c6 some cleans for grid, etc.
tz
parents: 743
diff changeset
  4076
    bindings at:#vspace      put:((gridPara at:2) asValue).
cfbbec0a33c6 some cleans for grid, etc.
tz
parents: 743
diff changeset
  4077
cfbbec0a33c6 some cleans for grid, etc.
tz
parents: 743
diff changeset
  4078
    (self openDialogInterface:#dialogSpecForDefiningGridParameters withBindings:bindings) ifFalse:[
1803
a0f73e1695e1 clear -> clearView
Claus Gittinger <cg@exept.de>
parents: 1801
diff changeset
  4079
        ^ self
755
cfbbec0a33c6 some cleans for grid, etc.
tz
parents: 743
diff changeset
  4080
    ].
cfbbec0a33c6 some cleans for grid, etc.
tz
parents: 743
diff changeset
  4081
cfbbec0a33c6 some cleans for grid, etc.
tz
parents: 743
diff changeset
  4082
    hspace := (bindings at:#hspace) value ? 5.
cfbbec0a33c6 some cleans for grid, etc.
tz
parents: 743
diff changeset
  4083
    vspace := (bindings at:#vspace) value ? 5.
cfbbec0a33c6 some cleans for grid, etc.
tz
parents: 743
diff changeset
  4084
cfbbec0a33c6 some cleans for grid, etc.
tz
parents: 743
diff changeset
  4085
    gridPara at:1 put:hspace.
cfbbec0a33c6 some cleans for grid, etc.
tz
parents: 743
diff changeset
  4086
    gridPara at:2 put:vspace.
cfbbec0a33c6 some cleans for grid, etc.
tz
parents: 743
diff changeset
  4087
    gridPara at:5 put:hspace.
cfbbec0a33c6 some cleans for grid, etc.
tz
parents: 743
diff changeset
  4088
    gridPara at:6 put:vspace.
cfbbec0a33c6 some cleans for grid, etc.
tz
parents: 743
diff changeset
  4089
cfbbec0a33c6 some cleans for grid, etc.
tz
parents: 743
diff changeset
  4090
    painter gridShown:false. 
cfbbec0a33c6 some cleans for grid, etc.
tz
parents: 743
diff changeset
  4091
    painter gridAlign:false. 
cfbbec0a33c6 some cleans for grid, etc.
tz
parents: 743
diff changeset
  4092
    painter gridParameters:gridPara.
cfbbec0a33c6 some cleans for grid, etc.
tz
parents: 743
diff changeset
  4093
    painter gridAlign:(bindings at:#alignToGrid) value.
cfbbec0a33c6 some cleans for grid, etc.
tz
parents: 743
diff changeset
  4094
    painter gridShown:(bindings at:#showGrid) value.
1021
8c1deb0281c7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 984
diff changeset
  4095
755
cfbbec0a33c6 some cleans for grid, etc.
tz
parents: 743
diff changeset
  4096
    settings at: #GridShown  put: (bindings at:#showGrid) value.
cfbbec0a33c6 some cleans for grid, etc.
tz
parents: 743
diff changeset
  4097
    settings at: #GridAlign  put: (bindings at:#alignToGrid) value.
cfbbec0a33c6 some cleans for grid, etc.
tz
parents: 743
diff changeset
  4098
    settings at: #HGridSpace put: hspace.
cfbbec0a33c6 some cleans for grid, etc.
tz
parents: 743
diff changeset
  4099
    settings at: #VGridSpace put: vspace.
1803
a0f73e1695e1 clear -> clearView
Claus Gittinger <cg@exept.de>
parents: 1801
diff changeset
  4100
    painter clearView.
755
cfbbec0a33c6 some cleans for grid, etc.
tz
parents: 743
diff changeset
  4101
1021
8c1deb0281c7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 984
diff changeset
  4102
    "Modified: / 4.2.1999 / 15:36:34 / cg"
755
cfbbec0a33c6 some cleans for grid, etc.
tz
parents: 743
diff changeset
  4103
!
cfbbec0a33c6 some cleans for grid, etc.
tz
parents: 743
diff changeset
  4104
1683
f95658463570 added selective aspect method generation.
Claus Gittinger <cg@exept.de>
parents: 1671
diff changeset
  4105
doGenerateAspectMethodFor
1684
34b35b8ae80f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1683
diff changeset
  4106
    |cls code aspectList displayedList selectorsToGenerateCode 
34b35b8ae80f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1683
diff changeset
  4107
     doBrowse methods|
1683
f95658463570 added selective aspect method generation.
Claus Gittinger <cg@exept.de>
parents: 1671
diff changeset
  4108
f95658463570 added selective aspect method generation.
Claus Gittinger <cg@exept.de>
parents: 1671
diff changeset
  4109
    self askForSectionModification.
f95658463570 added selective aspect method generation.
Claus Gittinger <cg@exept.de>
parents: 1671
diff changeset
  4110
f95658463570 added selective aspect method generation.
Claus Gittinger <cg@exept.de>
parents: 1671
diff changeset
  4111
    cls := self targetClass.
f95658463570 added selective aspect method generation.
Claus Gittinger <cg@exept.de>
parents: 1671
diff changeset
  4112
f95658463570 added selective aspect method generation.
Claus Gittinger <cg@exept.de>
parents: 1671
diff changeset
  4113
    aspectList := OrderedCollection new.
f95658463570 added selective aspect method generation.
Claus Gittinger <cg@exept.de>
parents: 1671
diff changeset
  4114
f95658463570 added selective aspect method generation.
Claus Gittinger <cg@exept.de>
parents: 1671
diff changeset
  4115
    self aspectSelectorsAndTypesDo:
f95658463570 added selective aspect method generation.
Claus Gittinger <cg@exept.de>
parents: 1671
diff changeset
  4116
        [:selector :type | 
f95658463570 added selective aspect method generation.
Claus Gittinger <cg@exept.de>
parents: 1671
diff changeset
  4117
            ( #(#modelAspect channelAspect actionSelector valueSelector) includes:type) ifTrue:[
f95658463570 added selective aspect method generation.
Claus Gittinger <cg@exept.de>
parents: 1671
diff changeset
  4118
                (cls includesSelector:selector) ifFalse:[
f95658463570 added selective aspect method generation.
Claus Gittinger <cg@exept.de>
parents: 1671
diff changeset
  4119
                    aspectList add:( Array with:selector with:type ).
f95658463570 added selective aspect method generation.
Claus Gittinger <cg@exept.de>
parents: 1671
diff changeset
  4120
                ]
f95658463570 added selective aspect method generation.
Claus Gittinger <cg@exept.de>
parents: 1671
diff changeset
  4121
            ]
f95658463570 added selective aspect method generation.
Claus Gittinger <cg@exept.de>
parents: 1671
diff changeset
  4122
        ].
f95658463570 added selective aspect method generation.
Claus Gittinger <cg@exept.de>
parents: 1671
diff changeset
  4123
    
f95658463570 added selective aspect method generation.
Claus Gittinger <cg@exept.de>
parents: 1671
diff changeset
  4124
    aspectList isEmpty ifTrue:[
f95658463570 added selective aspect method generation.
Claus Gittinger <cg@exept.de>
parents: 1671
diff changeset
  4125
        self information:'All aspect methods exist.'.
f95658463570 added selective aspect method generation.
Claus Gittinger <cg@exept.de>
parents: 1671
diff changeset
  4126
        ^ self.
f95658463570 added selective aspect method generation.
Claus Gittinger <cg@exept.de>
parents: 1671
diff changeset
  4127
    ].
f95658463570 added selective aspect method generation.
Claus Gittinger <cg@exept.de>
parents: 1671
diff changeset
  4128
2220
ff2b5cb004c2 sort aspects in generateAspectsMethods dialog;
Claus Gittinger <cg@exept.de>
parents: 2219
diff changeset
  4129
    aspectList sort:[:a :b | a first < b first].
1683
f95658463570 added selective aspect method generation.
Claus Gittinger <cg@exept.de>
parents: 1671
diff changeset
  4130
    displayedList := aspectList collect:[:entry | (((entry first) paddedTo:25) contractTo:25) , ' -> ' , entry second ].
f95658463570 added selective aspect method generation.
Claus Gittinger <cg@exept.de>
parents: 1671
diff changeset
  4131
    aspectList := aspectList collect:[:each | each first].
f95658463570 added selective aspect method generation.
Claus Gittinger <cg@exept.de>
parents: 1671
diff changeset
  4132
1684
34b35b8ae80f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1683
diff changeset
  4133
    doBrowse := false.    
1683
f95658463570 added selective aspect method generation.
Claus Gittinger <cg@exept.de>
parents: 1671
diff changeset
  4134
    selectorsToGenerateCode := Dialog
1684
34b35b8ae80f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1683
diff changeset
  4135
        choose:'Select aspect(s) for which code shall be generated:' 
1683
f95658463570 added selective aspect method generation.
Claus Gittinger <cg@exept.de>
parents: 1671
diff changeset
  4136
        fromList:displayedList 
f95658463570 added selective aspect method generation.
Claus Gittinger <cg@exept.de>
parents: 1671
diff changeset
  4137
        values:aspectList 
1684
34b35b8ae80f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1683
diff changeset
  4138
        initialSelection:nil
34b35b8ae80f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1683
diff changeset
  4139
        buttons:nil 
34b35b8ae80f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1683
diff changeset
  4140
        values:nil 
34b35b8ae80f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1683
diff changeset
  4141
        lines:15 
34b35b8ae80f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1683
diff changeset
  4142
        cancel:nil 
34b35b8ae80f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1683
diff changeset
  4143
        multiple:true
34b35b8ae80f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1683
diff changeset
  4144
        postBuildBlock:[:dialog | 
34b35b8ae80f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1683
diff changeset
  4145
                            |b|
34b35b8ae80f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1683
diff changeset
  4146
34b35b8ae80f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1683
diff changeset
  4147
                            b := Button label:'Generate & Browse'.
34b35b8ae80f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1683
diff changeset
  4148
                            b action:[doBrowse := true. dialog okPressed].
34b35b8ae80f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1683
diff changeset
  4149
                            b := dialog addButton:b before:dialog okButton.
34b35b8ae80f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1683
diff changeset
  4150
                       ].
1683
f95658463570 added selective aspect method generation.
Claus Gittinger <cg@exept.de>
parents: 1671
diff changeset
  4151
f95658463570 added selective aspect method generation.
Claus Gittinger <cg@exept.de>
parents: 1671
diff changeset
  4152
    selectorsToGenerateCode isEmptyOrNil ifTrue:[^ self].
f95658463570 added selective aspect method generation.
Claus Gittinger <cg@exept.de>
parents: 1671
diff changeset
  4153
f95658463570 added selective aspect method generation.
Claus Gittinger <cg@exept.de>
parents: 1671
diff changeset
  4154
    code := self painter generateAspectMethodCodeFiltering:selectorsToGenerateCode.
f95658463570 added selective aspect method generation.
Claus Gittinger <cg@exept.de>
parents: 1671
diff changeset
  4155
    code readStream fileIn.
1684
34b35b8ae80f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1683
diff changeset
  4156
1689
5d02658c548a must refetch class after adding instVars (when generating aspects)
Claus Gittinger <cg@exept.de>
parents: 1688
diff changeset
  4157
    "/ refetch - cls is now obsolete
5d02658c548a must refetch class after adding instVars (when generating aspects)
Claus Gittinger <cg@exept.de>
parents: 1688
diff changeset
  4158
    cls := self targetClass.
5d02658c548a must refetch class after adding instVars (when generating aspects)
Claus Gittinger <cg@exept.de>
parents: 1688
diff changeset
  4159
1684
34b35b8ae80f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1683
diff changeset
  4160
    doBrowse ifTrue:[
34b35b8ae80f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1683
diff changeset
  4161
        methods := selectorsToGenerateCode 
1739
f7baa10ebb1c Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1719
diff changeset
  4162
                        collect:[:sel | cls compiledMethodAt:sel]
1684
34b35b8ae80f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1683
diff changeset
  4163
                        thenSelect:[:m | m notNil].
34b35b8ae80f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1683
diff changeset
  4164
34b35b8ae80f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1683
diff changeset
  4165
        UserPreferences systemBrowserClass 
34b35b8ae80f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1683
diff changeset
  4166
            browseMethods:methods 
34b35b8ae80f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1683
diff changeset
  4167
            title:'Some Aspect methods'.
34b35b8ae80f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1683
diff changeset
  4168
    ].
1683
f95658463570 added selective aspect method generation.
Claus Gittinger <cg@exept.de>
parents: 1671
diff changeset
  4169
!
f95658463570 added selective aspect method generation.
Claus Gittinger <cg@exept.de>
parents: 1671
diff changeset
  4170
743
d58a3e7e39d5 support user defined font styles
tz
parents: 735
diff changeset
  4171
doGenerateAspectMethods
765
27936ff059d3 obselete methods removed + comments revised
tz
parents: 755
diff changeset
  4172
    "generates aspect and action methods for the application class"
27936ff059d3 obselete methods removed + comments revised
tz
parents: 755
diff changeset
  4173
27936ff059d3 obselete methods removed + comments revised
tz
parents: 755
diff changeset
  4174
    self askForSectionModification.
1683
f95658463570 added selective aspect method generation.
Claus Gittinger <cg@exept.de>
parents: 1671
diff changeset
  4175
    self withWaitCursorDo:[
f95658463570 added selective aspect method generation.
Claus Gittinger <cg@exept.de>
parents: 1671
diff changeset
  4176
        |code|
f95658463570 added selective aspect method generation.
Claus Gittinger <cg@exept.de>
parents: 1671
diff changeset
  4177
f95658463570 added selective aspect method generation.
Claus Gittinger <cg@exept.de>
parents: 1671
diff changeset
  4178
        code := self painter generateAspectMethodCode.
f95658463570 added selective aspect method generation.
Claus Gittinger <cg@exept.de>
parents: 1671
diff changeset
  4179
        code readStream fileIn.
f95658463570 added selective aspect method generation.
Claus Gittinger <cg@exept.de>
parents: 1671
diff changeset
  4180
    ]
446
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
  4181
!
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
  4182
1357
ba372586f899 checkin from browser
ca
parents: 1356
diff changeset
  4183
doGenerateAspectSelectorsMethod
ba372586f899 checkin from browser
ca
parents: 1356
diff changeset
  4184
    "generates aspectSelectors method for the exported aspects"
ba372586f899 checkin from browser
ca
parents: 1356
diff changeset
  4185
ba372586f899 checkin from browser
ca
parents: 1356
diff changeset
  4186
ba372586f899 checkin from browser
ca
parents: 1356
diff changeset
  4187
    self askForSectionModification.
ba372586f899 checkin from browser
ca
parents: 1356
diff changeset
  4188
ba372586f899 checkin from browser
ca
parents: 1356
diff changeset
  4189
    (ReadStream on:self painter generateAspectSelectorsMethod) fileIn.
ba372586f899 checkin from browser
ca
parents: 1356
diff changeset
  4190
ba372586f899 checkin from browser
ca
parents: 1356
diff changeset
  4191
!
ba372586f899 checkin from browser
ca
parents: 1356
diff changeset
  4192
743
d58a3e7e39d5 support user defined font styles
tz
parents: 735
diff changeset
  4193
doGenerateHookMethods
765
27936ff059d3 obselete methods removed + comments revised
tz
parents: 755
diff changeset
  4194
    "generates hook methods for the application class"
27936ff059d3 obselete methods removed + comments revised
tz
parents: 755
diff changeset
  4195
27936ff059d3 obselete methods removed + comments revised
tz
parents: 755
diff changeset
  4196
    self askForSectionModification.
27936ff059d3 obselete methods removed + comments revised
tz
parents: 755
diff changeset
  4197
27936ff059d3 obselete methods removed + comments revised
tz
parents: 755
diff changeset
  4198
    (ReadStream on:self painter generateHookMethods) fileIn.
27936ff059d3 obselete methods removed + comments revised
tz
parents: 755
diff changeset
  4199
27936ff059d3 obselete methods removed + comments revised
tz
parents: 755
diff changeset
  4200
!
27936ff059d3 obselete methods removed + comments revised
tz
parents: 755
diff changeset
  4201
966
bbea01c1de98 added menu-action code generation
Claus Gittinger <cg@exept.de>
parents: 964
diff changeset
  4202
doGenerateMenuMethods
bbea01c1de98 added menu-action code generation
Claus Gittinger <cg@exept.de>
parents: 964
diff changeset
  4203
    "generates menu stub methods for the application class"
bbea01c1de98 added menu-action code generation
Claus Gittinger <cg@exept.de>
parents: 964
diff changeset
  4204
bbea01c1de98 added menu-action code generation
Claus Gittinger <cg@exept.de>
parents: 964
diff changeset
  4205
    self askForSectionModification.
bbea01c1de98 added menu-action code generation
Claus Gittinger <cg@exept.de>
parents: 964
diff changeset
  4206
bbea01c1de98 added menu-action code generation
Claus Gittinger <cg@exept.de>
parents: 964
diff changeset
  4207
    (ReadStream on:self painter generateMenuMethods) fileIn.
bbea01c1de98 added menu-action code generation
Claus Gittinger <cg@exept.de>
parents: 964
diff changeset
  4208
bbea01c1de98 added menu-action code generation
Claus Gittinger <cg@exept.de>
parents: 964
diff changeset
  4209
    "Created: / 23.8.1998 / 16:10:04 / cg"
bbea01c1de98 added menu-action code generation
Claus Gittinger <cg@exept.de>
parents: 964
diff changeset
  4210
!
bbea01c1de98 added menu-action code generation
Claus Gittinger <cg@exept.de>
parents: 964
diff changeset
  4211
765
27936ff059d3 obselete methods removed + comments revised
tz
parents: 755
diff changeset
  4212
doInspectSpec
27936ff059d3 obselete methods removed + comments revised
tz
parents: 755
diff changeset
  4213
    "opens an inspector on the spec of the selected widget"
27936ff059d3 obselete methods removed + comments revised
tz
parents: 755
diff changeset
  4214
27936ff059d3 obselete methods removed + comments revised
tz
parents: 755
diff changeset
  4215
    |spec|
27936ff059d3 obselete methods removed + comments revised
tz
parents: 755
diff changeset
  4216
2198
804e778590fc slightly refactored to allow for more redefinition in a subclass
Claus Gittinger <cg@exept.de>
parents: 2175
diff changeset
  4217
    (spec := self painter specForSelection) isNil ifTrue:[
804e778590fc slightly refactored to allow for more redefinition in a subclass
Claus Gittinger <cg@exept.de>
parents: 2175
diff changeset
  4218
        treeView isCanvasSelected ifTrue:[
804e778590fc slightly refactored to allow for more redefinition in a subclass
Claus Gittinger <cg@exept.de>
parents: 2175
diff changeset
  4219
            spec := treeView canvasSpec.
804e778590fc slightly refactored to allow for more redefinition in a subclass
Claus Gittinger <cg@exept.de>
parents: 2175
diff changeset
  4220
        ]
446
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
  4221
    ].
765
27936ff059d3 obselete methods removed + comments revised
tz
parents: 755
diff changeset
  4222
    spec notNil ifTrue:[
2198
804e778590fc slightly refactored to allow for more redefinition in a subclass
Claus Gittinger <cg@exept.de>
parents: 2175
diff changeset
  4223
        spec inspect
765
27936ff059d3 obselete methods removed + comments revised
tz
parents: 755
diff changeset
  4224
    ]
27936ff059d3 obselete methods removed + comments revised
tz
parents: 755
diff changeset
  4225
!
27936ff059d3 obselete methods removed + comments revised
tz
parents: 755
diff changeset
  4226
27936ff059d3 obselete methods removed + comments revised
tz
parents: 755
diff changeset
  4227
doInspectView
27936ff059d3 obselete methods removed + comments revised
tz
parents: 755
diff changeset
  4228
    "opens an inspector on the view of the selected widget"
27936ff059d3 obselete methods removed + comments revised
tz
parents: 755
diff changeset
  4229
27936ff059d3 obselete methods removed + comments revised
tz
parents: 755
diff changeset
  4230
    |selection|
27936ff059d3 obselete methods removed + comments revised
tz
parents: 755
diff changeset
  4231
27936ff059d3 obselete methods removed + comments revised
tz
parents: 755
diff changeset
  4232
    ((selection := self painter selection) isCollection and: [selection size >= 1]) ifTrue:[
2217
b54632779619 Use class var for SelectionPanel
Stefan Vogel <sv@exept.de>
parents: 2213
diff changeset
  4233
        selection first inspect
765
27936ff059d3 obselete methods removed + comments revised
tz
parents: 755
diff changeset
  4234
    ] ifFalse: [
2217
b54632779619 Use class var for SelectionPanel
Stefan Vogel <sv@exept.de>
parents: 2213
diff changeset
  4235
        selection inspect
765
27936ff059d3 obselete methods removed + comments revised
tz
parents: 755
diff changeset
  4236
    ]
27936ff059d3 obselete methods removed + comments revised
tz
parents: 755
diff changeset
  4237
446
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
  4238
!
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
  4239
713
f94e58bb44ac some changes for the docu
tz
parents: 697
diff changeset
  4240
doLoad
765
27936ff059d3 obselete methods removed + comments revised
tz
parents: 755
diff changeset
  4241
    "opens a ResourceSelectionBrowser for loading a window spec from a class"
713
f94e58bb44ac some changes for the docu
tz
parents: 697
diff changeset
  4242
729
12f157d5e017 askings for modifications completed (?)
tz
parents: 724
diff changeset
  4243
    self askForModification ifFalse: [^nil].
12f157d5e017 askings for modifications completed (?)
tz
parents: 724
diff changeset
  4244
713
f94e58bb44ac some changes for the docu
tz
parents: 697
diff changeset
  4245
    self loadFromMessage: 
2072
0b0a24d7b198 class vs. className confusion
Claus Gittinger <cg@exept.de>
parents: 2040
diff changeset
  4246
        (ResourceSelectionBrowser
0b0a24d7b198 class vs. className confusion
Claus Gittinger <cg@exept.de>
parents: 2040
diff changeset
  4247
            request: 'Load Window Spec From Class'
0b0a24d7b198 class vs. className confusion
Claus Gittinger <cg@exept.de>
parents: 2040
diff changeset
  4248
            onSuperclass: nil
0b0a24d7b198 class vs. className confusion
Claus Gittinger <cg@exept.de>
parents: 2040
diff changeset
  4249
            andClass: self specClass
0b0a24d7b198 class vs. className confusion
Claus Gittinger <cg@exept.de>
parents: 2040
diff changeset
  4250
            andSelector: specSelector ? #windowSpec
0b0a24d7b198 class vs. className confusion
Claus Gittinger <cg@exept.de>
parents: 2040
diff changeset
  4251
            withResourceTypes: #(canvas))
0b0a24d7b198 class vs. className confusion
Claus Gittinger <cg@exept.de>
parents: 2040
diff changeset
  4252
0b0a24d7b198 class vs. className confusion
Claus Gittinger <cg@exept.de>
parents: 2040
diff changeset
  4253
    "Modified: / 31-08-2006 / 10:14:01 / cg"
713
f94e58bb44ac some changes for the docu
tz
parents: 697
diff changeset
  4254
!
f94e58bb44ac some changes for the docu
tz
parents: 697
diff changeset
  4255
f94e58bb44ac some changes for the docu
tz
parents: 697
diff changeset
  4256
doLoadSubspec
765
27936ff059d3 obselete methods removed + comments revised
tz
parents: 755
diff changeset
  4257
    "opens a ResourceSelectionBrowser for loading a sub spec from a class"
713
f94e58bb44ac some changes for the docu
tz
parents: 697
diff changeset
  4258
1976
969584dd8beb code cleanup & refactoring
Claus Gittinger <cg@exept.de>
parents: 1968
diff changeset
  4259
    |classAndSelector class selector|
729
12f157d5e017 askings for modifications completed (?)
tz
parents: 724
diff changeset
  4260
765
27936ff059d3 obselete methods removed + comments revised
tz
parents: 755
diff changeset
  4261
    self askForSectionModification.
729
12f157d5e017 askings for modifications completed (?)
tz
parents: 724
diff changeset
  4262
1976
969584dd8beb code cleanup & refactoring
Claus Gittinger <cg@exept.de>
parents: 1968
diff changeset
  4263
    classAndSelector := ResourceSelectionBrowser
969584dd8beb code cleanup & refactoring
Claus Gittinger <cg@exept.de>
parents: 1968
diff changeset
  4264
            request: 'Load Subspec From Class'
969584dd8beb code cleanup & refactoring
Claus Gittinger <cg@exept.de>
parents: 1968
diff changeset
  4265
            onSuperclass: nil
2072
0b0a24d7b198 class vs. className confusion
Claus Gittinger <cg@exept.de>
parents: 2040
diff changeset
  4266
            andClass: self specClass
1976
969584dd8beb code cleanup & refactoring
Claus Gittinger <cg@exept.de>
parents: 1968
diff changeset
  4267
            andSelector: specSelector
969584dd8beb code cleanup & refactoring
Claus Gittinger <cg@exept.de>
parents: 1968
diff changeset
  4268
            withResourceTypes: #(canvas).
969584dd8beb code cleanup & refactoring
Claus Gittinger <cg@exept.de>
parents: 1968
diff changeset
  4269
969584dd8beb code cleanup & refactoring
Claus Gittinger <cg@exept.de>
parents: 1968
diff changeset
  4270
    classAndSelector isNil ifTrue:[^ self].
969584dd8beb code cleanup & refactoring
Claus Gittinger <cg@exept.de>
parents: 1968
diff changeset
  4271
    class := classAndSelector methodClass.
969584dd8beb code cleanup & refactoring
Claus Gittinger <cg@exept.de>
parents: 1968
diff changeset
  4272
    selector := classAndSelector methodSelector.
1983
5528c812da8f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1976
diff changeset
  4273
    (class == specClassName and: [selector == specSelector]) ifTrue: [
1976
969584dd8beb code cleanup & refactoring
Claus Gittinger <cg@exept.de>
parents: 1968
diff changeset
  4274
        self warn: 'Current interface as subspec not allowed!!'.
969584dd8beb code cleanup & refactoring
Claus Gittinger <cg@exept.de>
parents: 1968
diff changeset
  4275
        ^ self.
969584dd8beb code cleanup & refactoring
Claus Gittinger <cg@exept.de>
parents: 1968
diff changeset
  4276
    ].
969584dd8beb code cleanup & refactoring
Claus Gittinger <cg@exept.de>
parents: 1968
diff changeset
  4277
    (class respondsTo:selector) ifTrue:[
969584dd8beb code cleanup & refactoring
Claus Gittinger <cg@exept.de>
parents: 1968
diff changeset
  4278
        self addWidgetOfSpec:(Array with: (UISubSpecification new majorKey: class name; minorKey: selector))
713
f94e58bb44ac some changes for the docu
tz
parents: 697
diff changeset
  4279
    ]
2072
0b0a24d7b198 class vs. className confusion
Claus Gittinger <cg@exept.de>
parents: 2040
diff changeset
  4280
0b0a24d7b198 class vs. className confusion
Claus Gittinger <cg@exept.de>
parents: 2040
diff changeset
  4281
    "Modified: / 31-08-2006 / 10:13:56 / cg"
446
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
  4282
!
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
  4283
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
  4284
doNew
765
27936ff059d3 obselete methods removed + comments revised
tz
parents: 755
diff changeset
  4285
    "removes all widgets, specClass, and specSelector"
729
12f157d5e017 askings for modifications completed (?)
tz
parents: 724
diff changeset
  4286
12f157d5e017 askings for modifications completed (?)
tz
parents: 724
diff changeset
  4287
    self askForModification ifFalse: [^nil].
2072
0b0a24d7b198 class vs. className confusion
Claus Gittinger <cg@exept.de>
parents: 2040
diff changeset
  4288
    specClass := specClassName := specSelector := nil.
572
ac2a1dd83d28 open tutorial added
tz
parents: 565
diff changeset
  4289
    self painter removeAll.
729
12f157d5e017 askings for modifications completed (?)
tz
parents: 724
diff changeset
  4290
    treeView canvas topView name:  UIPainter defaultNameOfCanvas.
12f157d5e017 askings for modifications completed (?)
tz
parents: 724
diff changeset
  4291
    treeView canvas topView label: UIPainter defaultNameOfCanvas.
755
cfbbec0a33c6 some cleans for grid, etc.
tz
parents: 743
diff changeset
  4292
    self helpTool doNew.
1710
4d81ff7b3412 autoAccept on selectionChange; ok -> apply;
Claus Gittinger <cg@exept.de>
parents: 1698
diff changeset
  4293
    self treeSelectionChanged.
785
35ad7901368c avoid selection problems
tz
parents: 778
diff changeset
  4294
    treeView selectedNode changed.
35ad7901368c avoid selection problems
tz
parents: 778
diff changeset
  4295
    self tabModel value: self tabList value first.
729
12f157d5e017 askings for modifications completed (?)
tz
parents: 724
diff changeset
  4296
    self updateInfoLabel.
2072
0b0a24d7b198 class vs. className confusion
Claus Gittinger <cg@exept.de>
parents: 2040
diff changeset
  4297
0b0a24d7b198 class vs. className confusion
Claus Gittinger <cg@exept.de>
parents: 2040
diff changeset
  4298
    "Modified: / 31-08-2006 / 10:14:10 / cg"
446
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
  4299
!
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
  4300
765
27936ff059d3 obselete methods removed + comments revised
tz
parents: 755
diff changeset
  4301
doOpenWidgetDocumentation
27936ff059d3 obselete methods removed + comments revised
tz
parents: 755
diff changeset
  4302
    "opens documentation for the selected widget"
27936ff059d3 obselete methods removed + comments revised
tz
parents: 755
diff changeset
  4303
27936ff059d3 obselete methods removed + comments revised
tz
parents: 755
diff changeset
  4304
    |spec document|
27936ff059d3 obselete methods removed + comments revised
tz
parents: 755
diff changeset
  4305
27936ff059d3 obselete methods removed + comments revised
tz
parents: 755
diff changeset
  4306
    (spec := self specForSelection) isNil ifTrue:[
1940
0f9be199d1c5 +replace widget
Claus Gittinger <cg@exept.de>
parents: 1917
diff changeset
  4307
"/        treeView isCanvasSelected ifTrue:[
0f9be199d1c5 +replace widget
Claus Gittinger <cg@exept.de>
parents: 1917
diff changeset
  4308
"/            spec := nil
0f9be199d1c5 +replace widget
Claus Gittinger <cg@exept.de>
parents: 1917
diff changeset
  4309
"/        ]
765
27936ff059d3 obselete methods removed + comments revised
tz
parents: 755
diff changeset
  4310
    ].
27936ff059d3 obselete methods removed + comments revised
tz
parents: 755
diff changeset
  4311
    spec notNil ifTrue:[
1204
faff065c78fd replace userFriendlyName by
Claus Gittinger <cg@exept.de>
parents: 1197
diff changeset
  4312
        document := 'tools/uipainter/', spec documentFileName,'.html'
765
27936ff059d3 obselete methods removed + comments revised
tz
parents: 755
diff changeset
  4313
    ] ifFalse: [
1204
faff065c78fd replace userFriendlyName by
Claus Gittinger <cg@exept.de>
parents: 1197
diff changeset
  4314
        document := 'tools/uipainter/WindowSpec.html'
765
27936ff059d3 obselete methods removed + comments revised
tz
parents: 755
diff changeset
  4315
    ].
27936ff059d3 obselete methods removed + comments revised
tz
parents: 755
diff changeset
  4316
    HTMLDocumentView openFullOnDocumentationFile: document 
27936ff059d3 obselete methods removed + comments revised
tz
parents: 755
diff changeset
  4317
!
27936ff059d3 obselete methods removed + comments revised
tz
parents: 755
diff changeset
  4318
446
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
  4319
doPickAView
765
27936ff059d3 obselete methods removed + comments revised
tz
parents: 755
diff changeset
  4320
    "changes the cursor for picking a view and builds a window spec from it"
27936ff059d3 obselete methods removed + comments revised
tz
parents: 755
diff changeset
  4321
27936ff059d3 obselete methods removed + comments revised
tz
parents: 755
diff changeset
  4322
    |view|
446
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
  4323
729
12f157d5e017 askings for modifications completed (?)
tz
parents: 724
diff changeset
  4324
    self askForModification ifFalse: [^nil].
446
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
  4325
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
  4326
    (view := Screen current viewFromUser) notNil ifTrue:[
2217
b54632779619 Use class var for SelectionPanel
Stefan Vogel <sv@exept.de>
parents: 2213
diff changeset
  4327
        view == Screen current rootView ifFalse:[
b54632779619 Use class var for SelectionPanel
Stefan Vogel <sv@exept.de>
parents: 2213
diff changeset
  4328
            self painter setupFromSpec:(UISpecification fromView:view topView).
b54632779619 Use class var for SelectionPanel
Stefan Vogel <sv@exept.de>
parents: 2213
diff changeset
  4329
        ]
729
12f157d5e017 askings for modifications completed (?)
tz
parents: 724
diff changeset
  4330
    ].
12f157d5e017 askings for modifications completed (?)
tz
parents: 724
diff changeset
  4331
12f157d5e017 askings for modifications completed (?)
tz
parents: 724
diff changeset
  4332
    self updateInfoLabel
12f157d5e017 askings for modifications completed (?)
tz
parents: 724
diff changeset
  4333
446
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
  4334
!
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
  4335
713
f94e58bb44ac some changes for the docu
tz
parents: 697
diff changeset
  4336
doSave
765
27936ff059d3 obselete methods removed + comments revised
tz
parents: 755
diff changeset
  4337
    "saves the window spec"
1850
410f98d259b7 kludge to raise the ui-painters control window
Claus Gittinger <cg@exept.de>
parents: 1827
diff changeset
  4338
    
2213
cb1e13d68761 UseViewScroller
Claus Gittinger <cg@exept.de>
parents: 2210
diff changeset
  4339
    |code painter specClass extentUsed|
713
f94e58bb44ac some changes for the docu
tz
parents: 697
diff changeset
  4340
765
27936ff059d3 obselete methods removed + comments revised
tz
parents: 755
diff changeset
  4341
    self askForSectionModification.
713
f94e58bb44ac some changes for the docu
tz
parents: 697
diff changeset
  4342
    self hasSpecClassAndSelector ifFalse:[
1850
410f98d259b7 kludge to raise the ui-painters control window
Claus Gittinger <cg@exept.de>
parents: 1827
diff changeset
  4343
        self doDefineClassAndSelector isNil ifTrue:[
410f98d259b7 kludge to raise the ui-painters control window
Claus Gittinger <cg@exept.de>
parents: 1827
diff changeset
  4344
            ^ nil
410f98d259b7 kludge to raise the ui-painters control window
Claus Gittinger <cg@exept.de>
parents: 1827
diff changeset
  4345
        ]
713
f94e58bb44ac some changes for the docu
tz
parents: 697
diff changeset
  4346
    ].
2001
b12d9b4dd6f2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1994
diff changeset
  4347
b12d9b4dd6f2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1994
diff changeset
  4348
    specClass := self resolveName:specClassName.
b12d9b4dd6f2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1994
diff changeset
  4349
    (specClass notNil and:[ specClass isClass ]) ifFalse:[
1983
5528c812da8f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1976
diff changeset
  4350
        self warn:('Oops - cannot save - class not found: ' , specClassName).
1976
969584dd8beb code cleanup & refactoring
Claus Gittinger <cg@exept.de>
parents: 1968
diff changeset
  4351
        ^ nil
969584dd8beb code cleanup & refactoring
Claus Gittinger <cg@exept.de>
parents: 1968
diff changeset
  4352
    ].
2001
b12d9b4dd6f2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1994
diff changeset
  4353
713
f94e58bb44ac some changes for the docu
tz
parents: 697
diff changeset
  4354
    painter := self painter.
1177
57a2a0edeb79 namespace resolving
Claus Gittinger <cg@exept.de>
parents: 1174
diff changeset
  4355
    painter 
2001
b12d9b4dd6f2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1994
diff changeset
  4356
        class:specClass
1976
969584dd8beb code cleanup & refactoring
Claus Gittinger <cg@exept.de>
parents: 1968
diff changeset
  4357
        superclassName:specSuperclassName
1341
83fe4fae7c10 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1338
diff changeset
  4358
        selector:specSelector.
1851
d036350188f5 warn if spec is saved too large
Claus Gittinger <cg@exept.de>
parents: 1850
diff changeset
  4359
d036350188f5 warn if spec is saved too large
Claus Gittinger <cg@exept.de>
parents: 1850
diff changeset
  4360
"/    Transcript showCR:'generating windowSpec code...'.
d036350188f5 warn if spec is saved too large
Claus Gittinger <cg@exept.de>
parents: 1850
diff changeset
  4361
2213
cb1e13d68761 UseViewScroller
Claus Gittinger <cg@exept.de>
parents: 2210
diff changeset
  4362
    extentUsed := self canvas extent.
cb1e13d68761 UseViewScroller
Claus Gittinger <cg@exept.de>
parents: 2210
diff changeset
  4363
    (extentUsed > (800 @ 600)) ifTrue:[
1851
d036350188f5 warn if spec is saved too large
Claus Gittinger <cg@exept.de>
parents: 1850
diff changeset
  4364
        Dialog 
d036350188f5 warn if spec is saved too large
Claus Gittinger <cg@exept.de>
parents: 1850
diff changeset
  4365
            warn:(resources
d036350188f5 warn if spec is saved too large
Claus Gittinger <cg@exept.de>
parents: 1850
diff changeset
  4366
                stringWithCRs:'The application''s default window-size is taken from the current size and will be %1.\\This may be too small on some displays - if required, resize and save again.'
2213
cb1e13d68761 UseViewScroller
Claus Gittinger <cg@exept.de>
parents: 2210
diff changeset
  4367
                with:extentUsed printString allBold)
1851
d036350188f5 warn if spec is saved too large
Claus Gittinger <cg@exept.de>
parents: 1850
diff changeset
  4368
    ].
d036350188f5 warn if spec is saved too large
Claus Gittinger <cg@exept.de>
parents: 1850
diff changeset
  4369
713
f94e58bb44ac some changes for the docu
tz
parents: 697
diff changeset
  4370
    code := painter generateWindowSpecMethodSource withCRs.
f94e58bb44ac some changes for the docu
tz
parents: 697
diff changeset
  4371
    (ReadStream on:code) fileIn.
1357
ba372586f899 checkin from browser
ca
parents: 1356
diff changeset
  4372
    self doGenerateAspectSelectorsMethod.
1669
e6ea33c843a0 *** empty log message ***
ca
parents: 1663
diff changeset
  4373
    self helpTool doSave.
713
f94e58bb44ac some changes for the docu
tz
parents: 697
diff changeset
  4374
    self updateInfoLabel.
2007
77cf7ecc9ecf embedding as special editors
Claus Gittinger <cg@exept.de>
parents: 2001
diff changeset
  4375
    self clearModified.
1177
57a2a0edeb79 namespace resolving
Claus Gittinger <cg@exept.de>
parents: 1174
diff changeset
  4376
    painter resetModification.
2001
b12d9b4dd6f2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1994
diff changeset
  4377
    (specClass respondsTo:specSelector) ifTrue:[
b12d9b4dd6f2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1994
diff changeset
  4378
        self addHistoryEntryForClass:specClass selector:specSelector.
713
f94e58bb44ac some changes for the docu
tz
parents: 697
diff changeset
  4379
    ].
f94e58bb44ac some changes for the docu
tz
parents: 697
diff changeset
  4380
!
f94e58bb44ac some changes for the docu
tz
parents: 697
diff changeset
  4381
f94e58bb44ac some changes for the docu
tz
parents: 697
diff changeset
  4382
doSaveAs
765
27936ff059d3 obselete methods removed + comments revised
tz
parents: 755
diff changeset
  4383
    "opens a ResourceSelectionBrowser for saving the window spec on a class"
713
f94e58bb44ac some changes for the docu
tz
parents: 697
diff changeset
  4384
1976
969584dd8beb code cleanup & refactoring
Claus Gittinger <cg@exept.de>
parents: 1968
diff changeset
  4385
    |classAndSelector|
713
f94e58bb44ac some changes for the docu
tz
parents: 697
diff changeset
  4386
765
27936ff059d3 obselete methods removed + comments revised
tz
parents: 755
diff changeset
  4387
    self askForSectionModification.
1976
969584dd8beb code cleanup & refactoring
Claus Gittinger <cg@exept.de>
parents: 1968
diff changeset
  4388
    self askForModification ifFalse:[^ false].
969584dd8beb code cleanup & refactoring
Claus Gittinger <cg@exept.de>
parents: 1968
diff changeset
  4389
969584dd8beb code cleanup & refactoring
Claus Gittinger <cg@exept.de>
parents: 1968
diff changeset
  4390
    classAndSelector := ResourceSelectionBrowser
969584dd8beb code cleanup & refactoring
Claus Gittinger <cg@exept.de>
parents: 1968
diff changeset
  4391
            request: 'Save Window Spec In Class'
969584dd8beb code cleanup & refactoring
Claus Gittinger <cg@exept.de>
parents: 1968
diff changeset
  4392
            onSuperclass: #Object
1983
5528c812da8f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1976
diff changeset
  4393
            andClass: (specClassName ? #ApplicationModel) asSymbol
1976
969584dd8beb code cleanup & refactoring
Claus Gittinger <cg@exept.de>
parents: 1968
diff changeset
  4394
            andSelector: specSelector ? #windowSpec
969584dd8beb code cleanup & refactoring
Claus Gittinger <cg@exept.de>
parents: 1968
diff changeset
  4395
            withResourceTypes: #(canvas).
969584dd8beb code cleanup & refactoring
Claus Gittinger <cg@exept.de>
parents: 1968
diff changeset
  4396
969584dd8beb code cleanup & refactoring
Claus Gittinger <cg@exept.de>
parents: 1968
diff changeset
  4397
    classAndSelector isNil ifTrue:[^ false].
969584dd8beb code cleanup & refactoring
Claus Gittinger <cg@exept.de>
parents: 1968
diff changeset
  4398
2007
77cf7ecc9ecf embedding as special editors
Claus Gittinger <cg@exept.de>
parents: 2001
diff changeset
  4399
    self clearModified.
1976
969584dd8beb code cleanup & refactoring
Claus Gittinger <cg@exept.de>
parents: 1968
diff changeset
  4400
    self painter resetModification.
969584dd8beb code cleanup & refactoring
Claus Gittinger <cg@exept.de>
parents: 1968
diff changeset
  4401
1983
5528c812da8f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1976
diff changeset
  4402
    specClassName := classAndSelector methodClass.
1976
969584dd8beb code cleanup & refactoring
Claus Gittinger <cg@exept.de>
parents: 1968
diff changeset
  4403
    specSelector := classAndSelector methodSelector.
1983
5528c812da8f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1976
diff changeset
  4404
    specSuperclassName := specClassName superclass name.
1976
969584dd8beb code cleanup & refactoring
Claus Gittinger <cg@exept.de>
parents: 1968
diff changeset
  4405
    self doSave.
969584dd8beb code cleanup & refactoring
Claus Gittinger <cg@exept.de>
parents: 1968
diff changeset
  4406
    ^ true
713
f94e58bb44ac some changes for the docu
tz
parents: 697
diff changeset
  4407
!
f94e58bb44ac some changes for the docu
tz
parents: 697
diff changeset
  4408
446
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
  4409
doStartApplication
765
27936ff059d3 obselete methods removed + comments revised
tz
parents: 755
diff changeset
  4410
    "starts the application on the editing window spec"
27936ff059d3 obselete methods removed + comments revised
tz
parents: 755
diff changeset
  4411
1177
57a2a0edeb79 namespace resolving
Claus Gittinger <cg@exept.de>
parents: 1174
diff changeset
  4412
    |cls application|
765
27936ff059d3 obselete methods removed + comments revised
tz
parents: 755
diff changeset
  4413
27936ff059d3 obselete methods removed + comments revised
tz
parents: 755
diff changeset
  4414
    self hasSpecClassAndSelector ifFalse:[
1442
ed108e53c783 allow opening a dialog for a non-dialog/appmodel class
Claus Gittinger <cg@exept.de>
parents: 1439
diff changeset
  4415
        self doSave isNil ifTrue: [^nil].
765
27936ff059d3 obselete methods removed + comments revised
tz
parents: 755
diff changeset
  4416
    ] ifTrue: [
1442
ed108e53c783 allow opening a dialog for a non-dialog/appmodel class
Claus Gittinger <cg@exept.de>
parents: 1439
diff changeset
  4417
        self askForSectionModification.    
ed108e53c783 allow opening a dialog for a non-dialog/appmodel class
Claus Gittinger <cg@exept.de>
parents: 1439
diff changeset
  4418
        (modified or: [self painter isModified or: [self helpTool modified]])
ed108e53c783 allow opening a dialog for a non-dialog/appmodel class
Claus Gittinger <cg@exept.de>
parents: 1439
diff changeset
  4419
        ifTrue:
ed108e53c783 allow opening a dialog for a non-dialog/appmodel class
Claus Gittinger <cg@exept.de>
parents: 1439
diff changeset
  4420
        [
ed108e53c783 allow opening a dialog for a non-dialog/appmodel class
Claus Gittinger <cg@exept.de>
parents: 1439
diff changeset
  4421
            ((YesNoBox title:'Window Spec was modified!!')        
ed108e53c783 allow opening a dialog for a non-dialog/appmodel class
Claus Gittinger <cg@exept.de>
parents: 1439
diff changeset
  4422
                noText:'Cancel';
ed108e53c783 allow opening a dialog for a non-dialog/appmodel class
Claus Gittinger <cg@exept.de>
parents: 1439
diff changeset
  4423
                yesText:'Save it and start';
ed108e53c783 allow opening a dialog for a non-dialog/appmodel class
Claus Gittinger <cg@exept.de>
parents: 1439
diff changeset
  4424
                showAtPointer;
ed108e53c783 allow opening a dialog for a non-dialog/appmodel class
Claus Gittinger <cg@exept.de>
parents: 1439
diff changeset
  4425
                accepted) ifFalse: [^nil].
ed108e53c783 allow opening a dialog for a non-dialog/appmodel class
Claus Gittinger <cg@exept.de>
parents: 1439
diff changeset
  4426
            self doSave isNil ifTrue: [^nil]
ed108e53c783 allow opening a dialog for a non-dialog/appmodel class
Claus Gittinger <cg@exept.de>
parents: 1439
diff changeset
  4427
        ]
446
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
  4428
    ].
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
  4429
1983
5528c812da8f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1976
diff changeset
  4430
    cls := self resolveName:specClassName.
1177
57a2a0edeb79 namespace resolving
Claus Gittinger <cg@exept.de>
parents: 1174
diff changeset
  4431
    cls isNil ifTrue:[
1983
5528c812da8f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1976
diff changeset
  4432
        self warn:'Oops cannot start application - no class:' , specClassName.
1442
ed108e53c783 allow opening a dialog for a non-dialog/appmodel class
Claus Gittinger <cg@exept.de>
parents: 1439
diff changeset
  4433
        ^ nil
1177
57a2a0edeb79 namespace resolving
Claus Gittinger <cg@exept.de>
parents: 1174
diff changeset
  4434
    ].
2227
a0af7929bfca *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2225
diff changeset
  4435
    application := cls new.
a0af7929bfca *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2225
diff changeset
  4436
    (application respondsTo:#openInterface:) ifFalse:[
1442
ed108e53c783 allow opening a dialog for a non-dialog/appmodel class
Claus Gittinger <cg@exept.de>
parents: 1439
diff changeset
  4437
        (self confirm:('The application does not respond to the ''openInterface:'' message.\(maybe the spec is supposed to be used as subApplication/subCanvas)\\Shall I try to open this as a standAlone dialog ?') withCRs)
ed108e53c783 allow opening a dialog for a non-dialog/appmodel class
Claus Gittinger <cg@exept.de>
parents: 1439
diff changeset
  4438
        ifTrue:[
ed108e53c783 allow opening a dialog for a non-dialog/appmodel class
Claus Gittinger <cg@exept.de>
parents: 1439
diff changeset
  4439
            SimpleDialog new openSpec:(cls perform:specSelector) withBindings:nil.
ed108e53c783 allow opening a dialog for a non-dialog/appmodel class
Claus Gittinger <cg@exept.de>
parents: 1439
diff changeset
  4440
        ].
ed108e53c783 allow opening a dialog for a non-dialog/appmodel class
Claus Gittinger <cg@exept.de>
parents: 1439
diff changeset
  4441
        ^ self.
446
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
  4442
    ].        
765
27936ff059d3 obselete methods removed + comments revised
tz
parents: 755
diff changeset
  4443
    application openInterface:specSelector
446
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
  4444
!
b513a621a7a4 new toolbar + other features added
tz
parents: 440
diff changeset
  4445
222
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  4446
doStepDown
765
27936ff059d3 obselete methods removed + comments revised
tz
parents: 755
diff changeset
  4447
    "moves the selected widget one step down in the hierarchy"
27936ff059d3 obselete methods removed + comments revised
tz
parents: 755
diff changeset
  4448
222
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  4449
    treeView doStepOver:1
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  4450
!
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  4451
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  4452
doStepIn
765
27936ff059d3 obselete methods removed + comments revised
tz
parents: 755
diff changeset
  4453
    "moves the selected widget into the next widget as child"
27936ff059d3 obselete methods removed + comments revised
tz
parents: 755
diff changeset
  4454
222
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  4455
    treeView doStepIn
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  4456
!
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  4457
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  4458
doStepOut
765
27936ff059d3 obselete methods removed + comments revised
tz
parents: 755
diff changeset
  4459
    "moves the selected widget out of the parent widget"
27936ff059d3 obselete methods removed + comments revised
tz
parents: 755
diff changeset
  4460
222
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  4461
    treeView doStepOut
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  4462
!
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  4463
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  4464
doStepUp
765
27936ff059d3 obselete methods removed + comments revised
tz
parents: 755
diff changeset
  4465
    "moves the selected widget one step up in the hierarchy"
27936ff059d3 obselete methods removed + comments revised
tz
parents: 755
diff changeset
  4466
222
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  4467
    treeView doStepOver:-1
743
d58a3e7e39d5 support user defined font styles
tz
parents: 735
diff changeset
  4468
!
d58a3e7e39d5 support user defined font styles
tz
parents: 735
diff changeset
  4469
d58a3e7e39d5 support user defined font styles
tz
parents: 735
diff changeset
  4470
doWindowSpec
765
27936ff059d3 obselete methods removed + comments revised
tz
parents: 755
diff changeset
  4471
    "opens a code view with the contents of the window spec"
27936ff059d3 obselete methods removed + comments revised
tz
parents: 755
diff changeset
  4472
27936ff059d3 obselete methods removed + comments revised
tz
parents: 755
diff changeset
  4473
    self askForSectionModification.
27936ff059d3 obselete methods removed + comments revised
tz
parents: 755
diff changeset
  4474
27936ff059d3 obselete methods removed + comments revised
tz
parents: 755
diff changeset
  4475
    CodeView 
2217
b54632779619 Use class var for SelectionPanel
Stefan Vogel <sv@exept.de>
parents: 2213
diff changeset
  4476
        openWith: self painter generateWindowSpecMethodSource 
b54632779619 Use class var for SelectionPanel
Stefan Vogel <sv@exept.de>
parents: 2213
diff changeset
  4477
        title: 'Window Spec'
743
d58a3e7e39d5 support user defined font styles
tz
parents: 735
diff changeset
  4478
1940
0f9be199d1c5 +replace widget
Claus Gittinger <cg@exept.de>
parents: 1917
diff changeset
  4479
!
0f9be199d1c5 +replace widget
Claus Gittinger <cg@exept.de>
parents: 1917
diff changeset
  4480
0f9be199d1c5 +replace widget
Claus Gittinger <cg@exept.de>
parents: 1917
diff changeset
  4481
replaceWidgetByClass:aSpecOrWidgetClass
0f9be199d1c5 +replace widget
Claus Gittinger <cg@exept.de>
parents: 1917
diff changeset
  4482
    |specClass oldSpec newSpec sel painter|
0f9be199d1c5 +replace widget
Claus Gittinger <cg@exept.de>
parents: 1917
diff changeset
  4483
0f9be199d1c5 +replace widget
Claus Gittinger <cg@exept.de>
parents: 1917
diff changeset
  4484
    (aSpecOrWidgetClass isSubclassOf:UISpecification) ifTrue:[
0f9be199d1c5 +replace widget
Claus Gittinger <cg@exept.de>
parents: 1917
diff changeset
  4485
        specClass := aSpecOrWidgetClass.
0f9be199d1c5 +replace widget
Claus Gittinger <cg@exept.de>
parents: 1917
diff changeset
  4486
    ] ifFalse:[
0f9be199d1c5 +replace widget
Claus Gittinger <cg@exept.de>
parents: 1917
diff changeset
  4487
        (aSpecOrWidgetClass isSubclassOf:View) ifTrue:[
0f9be199d1c5 +replace widget
Claus Gittinger <cg@exept.de>
parents: 1917
diff changeset
  4488
            specClass := aSpecOrWidgetClass basicNew specClass.
0f9be199d1c5 +replace widget
Claus Gittinger <cg@exept.de>
parents: 1917
diff changeset
  4489
        ] ifFalse:[
0f9be199d1c5 +replace widget
Claus Gittinger <cg@exept.de>
parents: 1917
diff changeset
  4490
        ].
0f9be199d1c5 +replace widget
Claus Gittinger <cg@exept.de>
parents: 1917
diff changeset
  4491
    ].
0f9be199d1c5 +replace widget
Claus Gittinger <cg@exept.de>
parents: 1917
diff changeset
  4492
    specClass isNil ifTrue:[
0f9be199d1c5 +replace widget
Claus Gittinger <cg@exept.de>
parents: 1917
diff changeset
  4493
        Dialog warn:'Invalid Spec- or View-Class: ' , aSpecOrWidgetClass name.
0f9be199d1c5 +replace widget
Claus Gittinger <cg@exept.de>
parents: 1917
diff changeset
  4494
        ^ self.
0f9be199d1c5 +replace widget
Claus Gittinger <cg@exept.de>
parents: 1917
diff changeset
  4495
    ].
0f9be199d1c5 +replace widget
Claus Gittinger <cg@exept.de>
parents: 1917
diff changeset
  4496
0f9be199d1c5 +replace widget
Claus Gittinger <cg@exept.de>
parents: 1917
diff changeset
  4497
    treeView isCanvasSelected ifTrue:[
0f9be199d1c5 +replace widget
Claus Gittinger <cg@exept.de>
parents: 1917
diff changeset
  4498
        ^ self
0f9be199d1c5 +replace widget
Claus Gittinger <cg@exept.de>
parents: 1917
diff changeset
  4499
    ].
0f9be199d1c5 +replace widget
Claus Gittinger <cg@exept.de>
parents: 1917
diff changeset
  4500
    oldSpec := self selectedSpec.
0f9be199d1c5 +replace widget
Claus Gittinger <cg@exept.de>
parents: 1917
diff changeset
  4501
    newSpec := specClass cloneFrom:oldSpec.
0f9be199d1c5 +replace widget
Claus Gittinger <cg@exept.de>
parents: 1917
diff changeset
  4502
0f9be199d1c5 +replace widget
Claus Gittinger <cg@exept.de>
parents: 1917
diff changeset
  4503
    painter := self painter.
0f9be199d1c5 +replace widget
Claus Gittinger <cg@exept.de>
parents: 1917
diff changeset
  4504
    painter deleteSelectionBuffered:false.
0f9be199d1c5 +replace widget
Claus Gittinger <cg@exept.de>
parents: 1917
diff changeset
  4505
    sel := painter pasteSpecifications:(Array with:newSpec) keepLayout:false.
0f9be199d1c5 +replace widget
Claus Gittinger <cg@exept.de>
parents: 1917
diff changeset
  4506
    painter select:sel.
222
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  4507
! !
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  4508
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  4509
!UIPainter::TreeView class methodsFor:'documentation'!
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  4510
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  4511
documentation
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  4512
"
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  4513
    selection in tree view; only used by the UIPainter
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  4514
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  4515
    [see also:]
2217
b54632779619 Use class var for SelectionPanel
Stefan Vogel <sv@exept.de>
parents: 2213
diff changeset
  4516
        SelectionInTreeView
b54632779619 Use class var for SelectionPanel
Stefan Vogel <sv@exept.de>
parents: 2213
diff changeset
  4517
        SelectionInTree
b54632779619 Use class var for SelectionPanel
Stefan Vogel <sv@exept.de>
parents: 2213
diff changeset
  4518
        TreeItem
b54632779619 Use class var for SelectionPanel
Stefan Vogel <sv@exept.de>
parents: 2213
diff changeset
  4519
        UIPainter
222
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  4520
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  4521
    [author:]
2217
b54632779619 Use class var for SelectionPanel
Stefan Vogel <sv@exept.de>
parents: 2213
diff changeset
  4522
        Claus Atzkern
222
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  4523
"
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  4524
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  4525
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  4526
! !
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  4527
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  4528
!UIPainter::TreeView methodsFor:'accessing'!
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  4529
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  4530
canvas
765
27936ff059d3 obselete methods removed + comments revised
tz
parents: 755
diff changeset
  4531
    "returns the canvas (UIPainterView)"
27936ff059d3 obselete methods removed + comments revised
tz
parents: 755
diff changeset
  4532
27936ff059d3 obselete methods removed + comments revised
tz
parents: 755
diff changeset
  4533
    ^ model root contents view
222
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  4534
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  4535
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  4536
!
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  4537
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  4538
canvas:aCanvas
765
27936ff059d3 obselete methods removed + comments revised
tz
parents: 755
diff changeset
  4539
    "install canvas (UIPainterView)"
27936ff059d3 obselete methods removed + comments revised
tz
parents: 755
diff changeset
  4540
1396
58c4d1027a5e *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1395
diff changeset
  4541
    self canvas:aCanvas specName:nil
281
aabb4037f6a3 window spec
ca
parents: 280
diff changeset
  4542
!
aabb4037f6a3 window spec
ca
parents: 280
diff changeset
  4543
1394
97a7eeabae40 overwriting existing method check (in #defineClass & selector);
Claus Gittinger <cg@exept.de>
parents: 1392
diff changeset
  4544
canvas:aCanvas specName:nameOfSpec
97a7eeabae40 overwriting existing method check (in #defineClass & selector);
Claus Gittinger <cg@exept.de>
parents: 1392
diff changeset
  4545
    "install canvas (UIPainterView)"
97a7eeabae40 overwriting existing method check (in #defineClass & selector);
Claus Gittinger <cg@exept.de>
parents: 1392
diff changeset
  4546
97a7eeabae40 overwriting existing method check (in #defineClass & selector);
Claus Gittinger <cg@exept.de>
parents: 1392
diff changeset
  4547
    |props|
97a7eeabae40 overwriting existing method check (in #defineClass & selector);
Claus Gittinger <cg@exept.de>
parents: 1392
diff changeset
  4548
97a7eeabae40 overwriting existing method check (in #defineClass & selector);
Claus Gittinger <cg@exept.de>
parents: 1392
diff changeset
  4549
    props := UIPainterView::ViewProperty new.
97a7eeabae40 overwriting existing method check (in #defineClass & selector);
Claus Gittinger <cg@exept.de>
parents: 1392
diff changeset
  4550
    props view:aCanvas.
1396
58c4d1027a5e *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1395
diff changeset
  4551
    model root:(TreeItem name:(nameOfSpec ? UIPainter defaultNameOfCanvas) asBoldText contents:props).
1394
97a7eeabae40 overwriting existing method check (in #defineClass & selector);
Claus Gittinger <cg@exept.de>
parents: 1392
diff changeset
  4552
    model root expand.
97a7eeabae40 overwriting existing method check (in #defineClass & selector);
Claus Gittinger <cg@exept.de>
parents: 1392
diff changeset
  4553
    self enableChannel:(aCanvas enableChannel).
97a7eeabae40 overwriting existing method check (in #defineClass & selector);
Claus Gittinger <cg@exept.de>
parents: 1392
diff changeset
  4554
!
97a7eeabae40 overwriting existing method check (in #defineClass & selector);
Claus Gittinger <cg@exept.de>
parents: 1392
diff changeset
  4555
281
aabb4037f6a3 window spec
ca
parents: 280
diff changeset
  4556
canvasSpec
765
27936ff059d3 obselete methods removed + comments revised
tz
parents: 755
diff changeset
  4557
    "returns spec assigned to canvas"
27936ff059d3 obselete methods removed + comments revised
tz
parents: 755
diff changeset
  4558
1574
e4897b61395c Remove unused method var
Stefan Vogel <sv@exept.de>
parents: 1572
diff changeset
  4559
    |spec list cls canvas|
281
aabb4037f6a3 window spec
ca
parents: 280
diff changeset
  4560
1466
6fecdd5341dc allow for windowSpecClass to be customized
Claus Gittinger <cg@exept.de>
parents: 1461
diff changeset
  4561
    spec := self windowSpecClass new.
1356
189c9cec8ce6 exported channels.
ca
parents: 1341
diff changeset
  4562
    canvas := self canvas.
189c9cec8ce6 exported channels.
ca
parents: 1341
diff changeset
  4563
189c9cec8ce6 exported channels.
ca
parents: 1341
diff changeset
  4564
    spec fromView:(canvas topView) callBack:nil.
189c9cec8ce6 exported channels.
ca
parents: 1341
diff changeset
  4565
311
52f954630dca support of menu and srollers for the canvas
ca
parents: 305
diff changeset
  4566
    windowSpec notNil ifTrue:[
1356
189c9cec8ce6 exported channels.
ca
parents: 1341
diff changeset
  4567
        spec copyValuesFromSpec:windowSpec.
311
52f954630dca support of menu and srollers for the canvas
ca
parents: 305
diff changeset
  4568
    ].
1356
189c9cec8ce6 exported channels.
ca
parents: 1341
diff changeset
  4569
189c9cec8ce6 exported channels.
ca
parents: 1341
diff changeset
  4570
    spec exportedAspects isNil ifTrue:[
189c9cec8ce6 exported channels.
ca
parents: 1341
diff changeset
  4571
        (     (cls  := canvas className) notNil
1357
ba372586f899 checkin from browser
ca
parents: 1356
diff changeset
  4572
         and:[(cls  := canvas resolveName:cls) notNil]
1356
189c9cec8ce6 exported channels.
ca
parents: 1341
diff changeset
  4573
        ) ifTrue:[
1357
ba372586f899 checkin from browser
ca
parents: 1356
diff changeset
  4574
            list := cls perform:#aspectSelectors ifNotUnderstood:nil.
1356
189c9cec8ce6 exported channels.
ca
parents: 1341
diff changeset
  4575
        ].
1357
ba372586f899 checkin from browser
ca
parents: 1356
diff changeset
  4576
        spec setExportedAspectsFrom:list.
1360
555429506474 care for nil window
Claus Gittinger <cg@exept.de>
parents: 1357
diff changeset
  4577
        windowSpec notNil ifTrue:[
555429506474 care for nil window
Claus Gittinger <cg@exept.de>
parents: 1357
diff changeset
  4578
            windowSpec exportedAspects:(spec exportedAspects).
555429506474 care for nil window
Claus Gittinger <cg@exept.de>
parents: 1357
diff changeset
  4579
        ]
1356
189c9cec8ce6 exported channels.
ca
parents: 1341
diff changeset
  4580
    ].
189c9cec8ce6 exported channels.
ca
parents: 1341
diff changeset
  4581
1466
6fecdd5341dc allow for windowSpecClass to be customized
Claus Gittinger <cg@exept.de>
parents: 1461
diff changeset
  4582
    self propertiesDo:[:aProp| 
6fecdd5341dc allow for windowSpecClass to be customized
Claus Gittinger <cg@exept.de>
parents: 1461
diff changeset
  4583
        |propsSpec|
6fecdd5341dc allow for windowSpecClass to be customized
Claus Gittinger <cg@exept.de>
parents: 1461
diff changeset
  4584
1357
ba372586f899 checkin from browser
ca
parents: 1356
diff changeset
  4585
        spec exportedAspectsAddKey:(aProp model) type:nil.
1466
6fecdd5341dc allow for windowSpecClass to be customized
Claus Gittinger <cg@exept.de>
parents: 1461
diff changeset
  4586
        propsSpec := aProp spec.
6fecdd5341dc allow for windowSpecClass to be customized
Claus Gittinger <cg@exept.de>
parents: 1461
diff changeset
  4587
        propsSpec aspectSelectors do:[:aKey|spec exportedAspectsAddKey:aKey type:nil].
6fecdd5341dc allow for windowSpecClass to be customized
Claus Gittinger <cg@exept.de>
parents: 1461
diff changeset
  4588
        propsSpec actionSelectors do:[:aKey|spec exportedAspectsAddKey:aKey type:#action].
1356
189c9cec8ce6 exported channels.
ca
parents: 1341
diff changeset
  4589
    ].
189c9cec8ce6 exported channels.
ca
parents: 1341
diff changeset
  4590
  ^ spec
282
bb88d92ae887 checkin from browser
ca
parents: 281
diff changeset
  4591
!
bb88d92ae887 checkin from browser
ca
parents: 281
diff changeset
  4592
311
52f954630dca support of menu and srollers for the canvas
ca
parents: 305
diff changeset
  4593
canvasSpec:aSpec
765
27936ff059d3 obselete methods removed + comments revised
tz
parents: 755
diff changeset
  4594
    "update canvas from spec"
27936ff059d3 obselete methods removed + comments revised
tz
parents: 755
diff changeset
  4595
311
52f954630dca support of menu and srollers for the canvas
ca
parents: 305
diff changeset
  4596
    |spec|
52f954630dca support of menu and srollers for the canvas
ca
parents: 305
diff changeset
  4597
52f954630dca support of menu and srollers for the canvas
ca
parents: 305
diff changeset
  4598
    self setAttributesFromWindowSpec:aSpec.
52f954630dca support of menu and srollers for the canvas
ca
parents: 305
diff changeset
  4599
    spec := aSpec copy.
52f954630dca support of menu and srollers for the canvas
ca
parents: 305
diff changeset
  4600
    spec  menu:nil.
52f954630dca support of menu and srollers for the canvas
ca
parents: 305
diff changeset
  4601
    spec flags:nil.
52f954630dca support of menu and srollers for the canvas
ca
parents: 305
diff changeset
  4602
2213
cb1e13d68761 UseViewScroller
Claus Gittinger <cg@exept.de>
parents: 2210
diff changeset
  4603
    spec setAttributesIn:(self canvas "topView") with:(UIBuilder new isEditing:true).
311
52f954630dca support of menu and srollers for the canvas
ca
parents: 305
diff changeset
  4604
!
52f954630dca support of menu and srollers for the canvas
ca
parents: 305
diff changeset
  4605
1357
ba372586f899 checkin from browser
ca
parents: 1356
diff changeset
  4606
exportedAspects
ba372586f899 checkin from browser
ca
parents: 1356
diff changeset
  4607
    "returns spec assigned to canvas"
ba372586f899 checkin from browser
ca
parents: 1356
diff changeset
  4608
ba372586f899 checkin from browser
ca
parents: 1356
diff changeset
  4609
    windowSpec isNil ifTrue:[^ #()].
ba372586f899 checkin from browser
ca
parents: 1356
diff changeset
  4610
    ^ windowSpec exportedAspects ? #()
ba372586f899 checkin from browser
ca
parents: 1356
diff changeset
  4611
ba372586f899 checkin from browser
ca
parents: 1356
diff changeset
  4612
!
ba372586f899 checkin from browser
ca
parents: 1356
diff changeset
  4613
282
bb88d92ae887 checkin from browser
ca
parents: 281
diff changeset
  4614
itemOfView:aView
765
27936ff059d3 obselete methods removed + comments revised
tz
parents: 755
diff changeset
  4615
    "returns item assigned to view or nil"
27936ff059d3 obselete methods removed + comments revised
tz
parents: 755
diff changeset
  4616
282
bb88d92ae887 checkin from browser
ca
parents: 281
diff changeset
  4617
    aView notNil ifTrue:[
2217
b54632779619 Use class var for SelectionPanel
Stefan Vogel <sv@exept.de>
parents: 2213
diff changeset
  4618
        self allItemsDo:[:anItem|
b54632779619 Use class var for SelectionPanel
Stefan Vogel <sv@exept.de>
parents: 2213
diff changeset
  4619
            (anItem contents view == aView) ifTrue:[^ anItem]
b54632779619 Use class var for SelectionPanel
Stefan Vogel <sv@exept.de>
parents: 2213
diff changeset
  4620
        ]
282
bb88d92ae887 checkin from browser
ca
parents: 281
diff changeset
  4621
    ].
765
27936ff059d3 obselete methods removed + comments revised
tz
parents: 755
diff changeset
  4622
    ^ nil
282
bb88d92ae887 checkin from browser
ca
parents: 281
diff changeset
  4623
bb88d92ae887 checkin from browser
ca
parents: 281
diff changeset
  4624
755
cfbbec0a33c6 some cleans for grid, etc.
tz
parents: 743
diff changeset
  4625
!
cfbbec0a33c6 some cleans for grid, etc.
tz
parents: 743
diff changeset
  4626
cfbbec0a33c6 some cleans for grid, etc.
tz
parents: 743
diff changeset
  4627
lastDrawnMaster
765
27936ff059d3 obselete methods removed + comments revised
tz
parents: 755
diff changeset
  4628
    "returns the lastDrawnMaster"
27936ff059d3 obselete methods removed + comments revised
tz
parents: 755
diff changeset
  4629
27936ff059d3 obselete methods removed + comments revised
tz
parents: 755
diff changeset
  4630
    ^ lastDrawnMaster
755
cfbbec0a33c6 some cleans for grid, etc.
tz
parents: 743
diff changeset
  4631
cfbbec0a33c6 some cleans for grid, etc.
tz
parents: 743
diff changeset
  4632
1466
6fecdd5341dc allow for windowSpecClass to be customized
Claus Gittinger <cg@exept.de>
parents: 1461
diff changeset
  4633
!
6fecdd5341dc allow for windowSpecClass to be customized
Claus Gittinger <cg@exept.de>
parents: 1461
diff changeset
  4634
6fecdd5341dc allow for windowSpecClass to be customized
Claus Gittinger <cg@exept.de>
parents: 1461
diff changeset
  4635
windowSpecClass
6fecdd5341dc allow for windowSpecClass to be customized
Claus Gittinger <cg@exept.de>
parents: 1461
diff changeset
  4636
    "returns the default  windowSpecClass (WindowSpec)"
6fecdd5341dc allow for windowSpecClass to be customized
Claus Gittinger <cg@exept.de>
parents: 1461
diff changeset
  4637
6fecdd5341dc allow for windowSpecClass to be customized
Claus Gittinger <cg@exept.de>
parents: 1461
diff changeset
  4638
    ^ windowSpecClass ? WindowSpec
6fecdd5341dc allow for windowSpecClass to be customized
Claus Gittinger <cg@exept.de>
parents: 1461
diff changeset
  4639
!
6fecdd5341dc allow for windowSpecClass to be customized
Claus Gittinger <cg@exept.de>
parents: 1461
diff changeset
  4640
6fecdd5341dc allow for windowSpecClass to be customized
Claus Gittinger <cg@exept.de>
parents: 1461
diff changeset
  4641
windowSpecClass:aClass
6fecdd5341dc allow for windowSpecClass to be customized
Claus Gittinger <cg@exept.de>
parents: 1461
diff changeset
  4642
    "set the default windowSpecClass"
6fecdd5341dc allow for windowSpecClass to be customized
Claus Gittinger <cg@exept.de>
parents: 1461
diff changeset
  4643
6fecdd5341dc allow for windowSpecClass to be customized
Claus Gittinger <cg@exept.de>
parents: 1461
diff changeset
  4644
    ^ windowSpecClass := aClass
222
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  4645
! !
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  4646
1661
5c0f73b1bd07 category change
Claus Gittinger <cg@exept.de>
parents: 1626
diff changeset
  4647
!UIPainter::TreeView methodsFor:'accessing-property'!
222
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  4648
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  4649
propertiesDo:aOneArgBlock
765
27936ff059d3 obselete methods removed + comments revised
tz
parents: 755
diff changeset
  4650
    "evaluates the argument a block on each property"
27936ff059d3 obselete methods removed + comments revised
tz
parents: 755
diff changeset
  4651
222
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  4652
    self allItemsDo:[:anItem| aOneArgBlock value:(anItem contents)]
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  4653
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  4654
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  4655
!
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  4656
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  4657
propertyDetect:aOneArgBlock
765
27936ff059d3 obselete methods removed + comments revised
tz
parents: 755
diff changeset
  4658
    "evaluates the block on each property"
27936ff059d3 obselete methods removed + comments revised
tz
parents: 755
diff changeset
  4659
222
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  4660
    self allItemsDo:[:anItem|
2217
b54632779619 Use class var for SelectionPanel
Stefan Vogel <sv@exept.de>
parents: 2213
diff changeset
  4661
        (aOneArgBlock value:(anItem contents)) ifTrue:[^ anItem contents]
222
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  4662
    ].
765
27936ff059d3 obselete methods removed + comments revised
tz
parents: 755
diff changeset
  4663
    ^ nil
222
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  4664
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  4665
!
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  4666
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  4667
propertySelected
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  4668
    "returns current selected property or nil in case of multi selection
765
27936ff059d3 obselete methods removed + comments revised
tz
parents: 755
diff changeset
  4669
     or empty selection "
27936ff059d3 obselete methods removed + comments revised
tz
parents: 755
diff changeset
  4670
222
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  4671
    |idx|
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  4672
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  4673
    selection size == 1 ifTrue:[
2217
b54632779619 Use class var for SelectionPanel
Stefan Vogel <sv@exept.de>
parents: 2213
diff changeset
  4674
        (idx := selection first) ~~ 1 ifTrue:[          "canvas: not yet supported"
b54632779619 Use class var for SelectionPanel
Stefan Vogel <sv@exept.de>
parents: 2213
diff changeset
  4675
            ^ (listOfNodes at:idx) contents
b54632779619 Use class var for SelectionPanel
Stefan Vogel <sv@exept.de>
parents: 2213
diff changeset
  4676
        ]
222
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  4677
    ].
765
27936ff059d3 obselete methods removed + comments revised
tz
parents: 755
diff changeset
  4678
    ^ nil
222
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  4679
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  4680
! !
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  4681
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  4682
!UIPainter::TreeView methodsFor:'adding & removing'!
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  4683
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  4684
addProperty:aProperty
765
27936ff059d3 obselete methods removed + comments revised
tz
parents: 755
diff changeset
  4685
    "adds a new item"
27936ff059d3 obselete methods removed + comments revised
tz
parents: 755
diff changeset
  4686
533
dde823aeca4c supports loading of subspecs
tz
parents: 527
diff changeset
  4687
    |parent| 
295
114befd1c369 add some help text
ca
parents: 287
diff changeset
  4688
1870
771fcc38ecb8 set selection interface changed
ca
parents: 1868
diff changeset
  4689
    parent := self detectItemCorespondingToView:(aProperty view superView).
295
114befd1c369 add some help text
ca
parents: 287
diff changeset
  4690
114befd1c369 add some help text
ca
parents: 287
diff changeset
  4691
    parent notNil ifTrue:[
1870
771fcc38ecb8 set selection interface changed
ca
parents: 1868
diff changeset
  4692
        model add:(TreeItem new contents:aProperty) below:parent
295
114befd1c369 add some help text
ca
parents: 287
diff changeset
  4693
    ]
222
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  4694
!
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  4695
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  4696
removeAll
765
27936ff059d3 obselete methods removed + comments revised
tz
parents: 755
diff changeset
  4697
    "removes all items other than canvas"
27936ff059d3 obselete methods removed + comments revised
tz
parents: 755
diff changeset
  4698
222
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  4699
    lastDrawnMaster := nil.
311
52f954630dca support of menu and srollers for the canvas
ca
parents: 305
diff changeset
  4700
    windowSpec := nil.
222
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  4701
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  4702
    self canvas subViews copy do:[:aView|
2217
b54632779619 Use class var for SelectionPanel
Stefan Vogel <sv@exept.de>
parents: 2213
diff changeset
  4703
        "/ care to not destroy the transparent input view
b54632779619 Use class var for SelectionPanel
Stefan Vogel <sv@exept.de>
parents: 2213
diff changeset
  4704
        (aView isInputOnly) ifFalse:[aView destroy]
222
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  4705
    ].
713
f94e58bb44ac some changes for the docu
tz
parents: 697
diff changeset
  4706
    model root name: UIPainter defaultNameOfCanvas asBoldText.
774
5ca0853de0bc reuse methods provided by the model
ca
parents: 765
diff changeset
  4707
    model removeAllOtherThanRoot.
222
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  4708
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  4709
!
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  4710
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  4711
removeView:aView
765
27936ff059d3 obselete methods removed + comments revised
tz
parents: 755
diff changeset
  4712
    "removes a view"
27936ff059d3 obselete methods removed + comments revised
tz
parents: 755
diff changeset
  4713
282
bb88d92ae887 checkin from browser
ca
parents: 281
diff changeset
  4714
    |item prnt|
bb88d92ae887 checkin from browser
ca
parents: 281
diff changeset
  4715
bb88d92ae887 checkin from browser
ca
parents: 281
diff changeset
  4716
    ((item := self itemOfView:aView) notNil and:[(prnt := item parent) notNil]) ifTrue:[
2217
b54632779619 Use class var for SelectionPanel
Stefan Vogel <sv@exept.de>
parents: 2213
diff changeset
  4717
        aView destroy.
b54632779619 Use class var for SelectionPanel
Stefan Vogel <sv@exept.de>
parents: 2213
diff changeset
  4718
        prnt contents view sizeChanged:nil.
b54632779619 Use class var for SelectionPanel
Stefan Vogel <sv@exept.de>
parents: 2213
diff changeset
  4719
        model remove:item
222
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  4720
    ]
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  4721
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  4722
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  4723
! !
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  4724
311
52f954630dca support of menu and srollers for the canvas
ca
parents: 305
diff changeset
  4725
!UIPainter::TreeView methodsFor:'building'!
52f954630dca support of menu and srollers for the canvas
ca
parents: 305
diff changeset
  4726
1058
243d945b1daf name the (full-)spec
tm
parents: 1046
diff changeset
  4727
generateFullSpecForComponents:aSpecArray named:specNameSymbol
765
27936ff059d3 obselete methods removed + comments revised
tz
parents: 755
diff changeset
  4728
    "generates a full spec from aSpecArray"
27936ff059d3 obselete methods removed + comments revised
tz
parents: 755
diff changeset
  4729
351
7cb9f9c9a872 more checks
Claus Gittinger <cg@exept.de>
parents: 348
diff changeset
  4730
    |fullSpec winSpec|
311
52f954630dca support of menu and srollers for the canvas
ca
parents: 305
diff changeset
  4731
52f954630dca support of menu and srollers for the canvas
ca
parents: 305
diff changeset
  4732
    fullSpec := FullSpec new.
1058
243d945b1daf name the (full-)spec
tm
parents: 1046
diff changeset
  4733
    fullSpec name:specNameSymbol.
311
52f954630dca support of menu and srollers for the canvas
ca
parents: 305
diff changeset
  4734
2213
cb1e13d68761 UseViewScroller
Claus Gittinger <cg@exept.de>
parents: 2210
diff changeset
  4735
    fullSpec fromBuilder:(self canvas)
cb1e13d68761 UseViewScroller
Claus Gittinger <cg@exept.de>
parents: 2210
diff changeset
  4736
              components:(SpecCollection new collection:aSpecArray).
311
52f954630dca support of menu and srollers for the canvas
ca
parents: 305
diff changeset
  4737
2223
7cddff46d0ad *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2222
diff changeset
  4738
    winSpec := fullSpec window.
7cddff46d0ad *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2222
diff changeset
  4739
    windowSpec isNil ifTrue:[
7cddff46d0ad *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2222
diff changeset
  4740
        "/ kludge: if grid was on, its now present in the windowSpec (which should not)
7cddff46d0ad *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2222
diff changeset
  4741
        self canvas gridShown ifTrue:[
7cddff46d0ad *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2222
diff changeset
  4742
            fullSpec window backgroundColor:nil.    
7cddff46d0ad *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2222
diff changeset
  4743
        ].
7cddff46d0ad *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2222
diff changeset
  4744
    ] ifFalse:[
2213
cb1e13d68761 UseViewScroller
Claus Gittinger <cg@exept.de>
parents: 2210
diff changeset
  4745
        winSpec copyValuesFromSpec:windowSpec.
311
52f954630dca support of menu and srollers for the canvas
ca
parents: 305
diff changeset
  4746
    ].    
2223
7cddff46d0ad *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2222
diff changeset
  4747
    winSpec name: winSpec label.
311
52f954630dca support of menu and srollers for the canvas
ca
parents: 305
diff changeset
  4748
    ^ fullSpec literalArrayEncoding.
52f954630dca support of menu and srollers for the canvas
ca
parents: 305
diff changeset
  4749
!
52f954630dca support of menu and srollers for the canvas
ca
parents: 305
diff changeset
  4750
52f954630dca support of menu and srollers for the canvas
ca
parents: 305
diff changeset
  4751
setAttributesFromWindowSpec:aWindowSpec
1172
e22253cb348f set the top attributes (especially: viewbackground)
Claus Gittinger <cg@exept.de>
parents: 1167
diff changeset
  4752
    "sets a window spec from aWindowSpec and applies some attributes
e22253cb348f set the top attributes (especially: viewbackground)
Claus Gittinger <cg@exept.de>
parents: 1167
diff changeset
  4753
     to the canvas."
e22253cb348f set the top attributes (especially: viewbackground)
Claus Gittinger <cg@exept.de>
parents: 1167
diff changeset
  4754
1391
be99f3e9260e set changed label in tree-view for canvas
ca
parents: 1360
diff changeset
  4755
    |name canvasView builder|
765
27936ff059d3 obselete methods removed + comments revised
tz
parents: 755
diff changeset
  4756
1466
6fecdd5341dc allow for windowSpecClass to be customized
Claus Gittinger <cg@exept.de>
parents: 1461
diff changeset
  4757
    windowSpec := (self windowSpecClass) new copyValuesFromSpec:aWindowSpec.
1172
e22253cb348f set the top attributes (especially: viewbackground)
Claus Gittinger <cg@exept.de>
parents: 1167
diff changeset
  4758
    canvasView := self canvas.
e22253cb348f set the top attributes (especially: viewbackground)
Claus Gittinger <cg@exept.de>
parents: 1167
diff changeset
  4759
e22253cb348f set the top attributes (especially: viewbackground)
Claus Gittinger <cg@exept.de>
parents: 1167
diff changeset
  4760
    builder := UIBuilder new isEditing:true.
e22253cb348f set the top attributes (especially: viewbackground)
Claus Gittinger <cg@exept.de>
parents: 1167
diff changeset
  4761
    aWindowSpec setAttributesIn:canvasView with:builder.
e22253cb348f set the top attributes (especially: viewbackground)
Claus Gittinger <cg@exept.de>
parents: 1167
diff changeset
  4762
1391
be99f3e9260e set changed label in tree-view for canvas
ca
parents: 1360
diff changeset
  4763
    name := aWindowSpec label.
be99f3e9260e set changed label in tree-view for canvas
ca
parents: 1360
diff changeset
  4764
    canvasView topView name:name.
be99f3e9260e set changed label in tree-view for canvas
ca
parents: 1360
diff changeset
  4765
    self canvasNameChanged:name.
1710
4d81ff7b3412 autoAccept on selectionChange; ok -> apply;
Claus Gittinger <cg@exept.de>
parents: 1698
diff changeset
  4766
    self application treeSelectionChanged.
311
52f954630dca support of menu and srollers for the canvas
ca
parents: 305
diff changeset
  4767
! !
52f954630dca support of menu and srollers for the canvas
ca
parents: 305
diff changeset
  4768
222
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  4769
!UIPainter::TreeView methodsFor:'canvas selection'!
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  4770
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  4771
cvsSelection:aSelection
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  4772
    "canvas changed its selection
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  4773
    "
805
99e70b6c02e5 new indication of the master widget
tz
parents: 798
diff changeset
  4774
    |sel list size|
99e70b6c02e5 new indication of the master widget
tz
parents: 798
diff changeset
  4775
99e70b6c02e5 new indication of the master widget
tz
parents: 798
diff changeset
  4776
    ((sel := aSelection) isNil or:[sel isCollection]) ifFalse:[
2217
b54632779619 Use class var for SelectionPanel
Stefan Vogel <sv@exept.de>
parents: 2213
diff changeset
  4777
        sel := Array with:sel
774
5ca0853de0bc reuse methods provided by the model
ca
parents: 765
diff changeset
  4778
    ].
805
99e70b6c02e5 new indication of the master widget
tz
parents: 798
diff changeset
  4779
99e70b6c02e5 new indication of the master widget
tz
parents: 798
diff changeset
  4780
    (size := sel size) ~~ 0 ifTrue:[
2217
b54632779619 Use class var for SelectionPanel
Stefan Vogel <sv@exept.de>
parents: 2213
diff changeset
  4781
        list := OrderedCollection new:size.
b54632779619 Use class var for SelectionPanel
Stefan Vogel <sv@exept.de>
parents: 2213
diff changeset
  4782
b54632779619 Use class var for SelectionPanel
Stefan Vogel <sv@exept.de>
parents: 2213
diff changeset
  4783
        sel do:[:aView||item|
b54632779619 Use class var for SelectionPanel
Stefan Vogel <sv@exept.de>
parents: 2213
diff changeset
  4784
            (item := self itemOfView:aView) notNil ifTrue:[
b54632779619 Use class var for SelectionPanel
Stefan Vogel <sv@exept.de>
parents: 2213
diff changeset
  4785
                list add:item.
b54632779619 Use class var for SelectionPanel
Stefan Vogel <sv@exept.de>
parents: 2213
diff changeset
  4786
                model doMakeVisible:item.
b54632779619 Use class var for SelectionPanel
Stefan Vogel <sv@exept.de>
parents: 2213
diff changeset
  4787
            ]
b54632779619 Use class var for SelectionPanel
Stefan Vogel <sv@exept.de>
parents: 2213
diff changeset
  4788
        ].
b54632779619 Use class var for SelectionPanel
Stefan Vogel <sv@exept.de>
parents: 2213
diff changeset
  4789
        sel := list collect:[:anItem| self indexOfNode:anItem ].
774
5ca0853de0bc reuse methods provided by the model
ca
parents: 765
diff changeset
  4790
    ].
222
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  4791
    self cvsEventsDisabledDo:[ self selection:sel ].            
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  4792
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  4793
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  4794
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  4795
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  4796
!
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  4797
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  4798
cvsSelectionAdd:aView
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  4799
    "canvas adds a view to current selection
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  4800
    "
774
5ca0853de0bc reuse methods provided by the model
ca
parents: 765
diff changeset
  4801
    |item index oldSel|
222
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  4802
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  4803
    item := self itemOfView:aView.
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  4804
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  4805
    item notNil ifTrue:[
2217
b54632779619 Use class var for SelectionPanel
Stefan Vogel <sv@exept.de>
parents: 2213
diff changeset
  4806
        model doMakeVisible:item.
b54632779619 Use class var for SelectionPanel
Stefan Vogel <sv@exept.de>
parents: 2213
diff changeset
  4807
b54632779619 Use class var for SelectionPanel
Stefan Vogel <sv@exept.de>
parents: 2213
diff changeset
  4808
        (index := self indexOfNode:item) ~~ 0 ifTrue:[
b54632779619 Use class var for SelectionPanel
Stefan Vogel <sv@exept.de>
parents: 2213
diff changeset
  4809
            oldSel := selection copy.
b54632779619 Use class var for SelectionPanel
Stefan Vogel <sv@exept.de>
parents: 2213
diff changeset
  4810
            self addToSelection:index.
b54632779619 Use class var for SelectionPanel
Stefan Vogel <sv@exept.de>
parents: 2213
diff changeset
  4811
            self selectionChangedFrom:oldSel
b54632779619 Use class var for SelectionPanel
Stefan Vogel <sv@exept.de>
parents: 2213
diff changeset
  4812
        ]        
774
5ca0853de0bc reuse methods provided by the model
ca
parents: 765
diff changeset
  4813
    ]            
222
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  4814
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  4815
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  4816
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  4817
!
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  4818
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  4819
cvsSelectionRemove:aView
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  4820
    "canvas removes a view from current selection
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  4821
    "
774
5ca0853de0bc reuse methods provided by the model
ca
parents: 765
diff changeset
  4822
    |item index oldSel|
5ca0853de0bc reuse methods provided by the model
ca
parents: 765
diff changeset
  4823
5ca0853de0bc reuse methods provided by the model
ca
parents: 765
diff changeset
  4824
    (     (item := self itemOfView:aView) notNil
5ca0853de0bc reuse methods provided by the model
ca
parents: 765
diff changeset
  4825
     and:[(index := self indexOfNode:item) ~~ 0
5ca0853de0bc reuse methods provided by the model
ca
parents: 765
diff changeset
  4826
     and:[self isInSelection:index]]
5ca0853de0bc reuse methods provided by the model
ca
parents: 765
diff changeset
  4827
    ) ifTrue:[
2217
b54632779619 Use class var for SelectionPanel
Stefan Vogel <sv@exept.de>
parents: 2213
diff changeset
  4828
        oldSel := selection copy.
b54632779619 Use class var for SelectionPanel
Stefan Vogel <sv@exept.de>
parents: 2213
diff changeset
  4829
        self removeFromSelection:index.
b54632779619 Use class var for SelectionPanel
Stefan Vogel <sv@exept.de>
parents: 2213
diff changeset
  4830
        self selectionChangedFrom:oldSel.
774
5ca0853de0bc reuse methods provided by the model
ca
parents: 765
diff changeset
  4831
    ].
222
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  4832
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  4833
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  4834
! !
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  4835
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  4836
!UIPainter::TreeView methodsFor:'change & update'!
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  4837
281
aabb4037f6a3 window spec
ca
parents: 280
diff changeset
  4838
canvasNameChanged:aName
aabb4037f6a3 window spec
ca
parents: 280
diff changeset
  4839
    "called if identification name assigned to window (canvas) changed
aabb4037f6a3 window spec
ca
parents: 280
diff changeset
  4840
    "
aabb4037f6a3 window spec
ca
parents: 280
diff changeset
  4841
    |name node|
aabb4037f6a3 window spec
ca
parents: 280
diff changeset
  4842
aabb4037f6a3 window spec
ca
parents: 280
diff changeset
  4843
    node := listOfNodes at:1.
aabb4037f6a3 window spec
ca
parents: 280
diff changeset
  4844
aabb4037f6a3 window spec
ca
parents: 280
diff changeset
  4845
    (    aName size ~~ 0
aabb4037f6a3 window spec
ca
parents: 280
diff changeset
  4846
     and:[(name := aName string withoutSeparators) size ~~ 0
aabb4037f6a3 window spec
ca
parents: 280
diff changeset
  4847
     and:[(self propertyDetect:[:p| p name = name]) isNil
aabb4037f6a3 window spec
ca
parents: 280
diff changeset
  4848
     and:[node name ~= name]]]
aabb4037f6a3 window spec
ca
parents: 280
diff changeset
  4849
    ) ifTrue:[
2217
b54632779619 Use class var for SelectionPanel
Stefan Vogel <sv@exept.de>
parents: 2213
diff changeset
  4850
        node name: name asBoldText.
b54632779619 Use class var for SelectionPanel
Stefan Vogel <sv@exept.de>
parents: 2213
diff changeset
  4851
        node changed.   
281
aabb4037f6a3 window spec
ca
parents: 280
diff changeset
  4852
    ].
aabb4037f6a3 window spec
ca
parents: 280
diff changeset
  4853
!
aabb4037f6a3 window spec
ca
parents: 280
diff changeset
  4854
222
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  4855
layoutChanged
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  4856
    "layout of any component changed; in case of single selection, the
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  4857
     application will be informed to update its layout
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  4858
    "
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  4859
    selection size == 1 ifTrue:[
2217
b54632779619 Use class var for SelectionPanel
Stefan Vogel <sv@exept.de>
parents: 2213
diff changeset
  4860
        self application layoutChanged
222
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  4861
    ]
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  4862
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  4863
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  4864
!
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  4865
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  4866
propertyChanged:aProperty
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  4867
    "property of view derived from argument a property changed
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  4868
    "
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  4869
    |item idx end|
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  4870
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  4871
    item := self itemOfView:(aProperty view).
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  4872
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  4873
    item notNil ifTrue:[
2217
b54632779619 Use class var for SelectionPanel
Stefan Vogel <sv@exept.de>
parents: 2213
diff changeset
  4874
        item contents:aProperty.
b54632779619 Use class var for SelectionPanel
Stefan Vogel <sv@exept.de>
parents: 2213
diff changeset
  4875
b54632779619 Use class var for SelectionPanel
Stefan Vogel <sv@exept.de>
parents: 2213
diff changeset
  4876
        item name = aProperty name ifFalse:[
b54632779619 Use class var for SelectionPanel
Stefan Vogel <sv@exept.de>
parents: 2213
diff changeset
  4877
            idx := self firstLineShown.
b54632779619 Use class var for SelectionPanel
Stefan Vogel <sv@exept.de>
parents: 2213
diff changeset
  4878
b54632779619 Use class var for SelectionPanel
Stefan Vogel <sv@exept.de>
parents: 2213
diff changeset
  4879
            (end := self lastLineShown) > listOfNodes size ifTrue:[
b54632779619 Use class var for SelectionPanel
Stefan Vogel <sv@exept.de>
parents: 2213
diff changeset
  4880
                end := listOfNodes size
b54632779619 Use class var for SelectionPanel
Stefan Vogel <sv@exept.de>
parents: 2213
diff changeset
  4881
            ].                          
b54632779619 Use class var for SelectionPanel
Stefan Vogel <sv@exept.de>
parents: 2213
diff changeset
  4882
            item changed.   
b54632779619 Use class var for SelectionPanel
Stefan Vogel <sv@exept.de>
parents: 2213
diff changeset
  4883
b54632779619 Use class var for SelectionPanel
Stefan Vogel <sv@exept.de>
parents: 2213
diff changeset
  4884
            [idx <= end] whileTrue:[
b54632779619 Use class var for SelectionPanel
Stefan Vogel <sv@exept.de>
parents: 2213
diff changeset
  4885
                (listOfNodes at:idx) == item ifTrue:[
b54632779619 Use class var for SelectionPanel
Stefan Vogel <sv@exept.de>
parents: 2213
diff changeset
  4886
                    self redrawLine:idx.                "/ is visible; redraw line
b54632779619 Use class var for SelectionPanel
Stefan Vogel <sv@exept.de>
parents: 2213
diff changeset
  4887
                    end := 0
b54632779619 Use class var for SelectionPanel
Stefan Vogel <sv@exept.de>
parents: 2213
diff changeset
  4888
                ] ifFalse:[
b54632779619 Use class var for SelectionPanel
Stefan Vogel <sv@exept.de>
parents: 2213
diff changeset
  4889
                    idx := idx + 1
b54632779619 Use class var for SelectionPanel
Stefan Vogel <sv@exept.de>
parents: 2213
diff changeset
  4890
                ]
b54632779619 Use class var for SelectionPanel
Stefan Vogel <sv@exept.de>
parents: 2213
diff changeset
  4891
            ]
b54632779619 Use class var for SelectionPanel
Stefan Vogel <sv@exept.de>
parents: 2213
diff changeset
  4892
        ].
b54632779619 Use class var for SelectionPanel
Stefan Vogel <sv@exept.de>
parents: 2213
diff changeset
  4893
b54632779619 Use class var for SelectionPanel
Stefan Vogel <sv@exept.de>
parents: 2213
diff changeset
  4894
        self selectedNode == item ifTrue:[              "/ inform application
b54632779619 Use class var for SelectionPanel
Stefan Vogel <sv@exept.de>
parents: 2213
diff changeset
  4895
            self application propertyChanged
b54632779619 Use class var for SelectionPanel
Stefan Vogel <sv@exept.de>
parents: 2213
diff changeset
  4896
        ]
222
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  4897
    ].
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  4898
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  4899
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  4900
! !
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  4901
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  4902
!UIPainter::TreeView methodsFor:'drag & drop'!
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  4903
2117
3d456b890124 drag and drop cleanup
Claus Gittinger <cg@exept.de>
parents: 2114
diff changeset
  4904
canDrop:aDropContext
1953
3b5022bccca4 drag and drop cleanup
Claus Gittinger <cg@exept.de>
parents: 1950
diff changeset
  4905
    "can drop ? -> delegate to canvas"
3b5022bccca4 drag and drop cleanup
Claus Gittinger <cg@exept.de>
parents: 1950
diff changeset
  4906
2117
3d456b890124 drag and drop cleanup
Claus Gittinger <cg@exept.de>
parents: 2114
diff changeset
  4907
    ^ self canvas canDrop:aDropContext
3d456b890124 drag and drop cleanup
Claus Gittinger <cg@exept.de>
parents: 2114
diff changeset
  4908
3d456b890124 drag and drop cleanup
Claus Gittinger <cg@exept.de>
parents: 2114
diff changeset
  4909
    "Modified: / 13-10-2006 / 16:08:43 / cg"
222
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  4910
!
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  4911
2117
3d456b890124 drag and drop cleanup
Claus Gittinger <cg@exept.de>
parents: 2114
diff changeset
  4912
canDrop:aDropContext at:aPoint
2114
eca72652fa9e drag and drop cleanup
Claus Gittinger <cg@exept.de>
parents: 2077
diff changeset
  4913
    "can drop ? -> delegate to canvas"
eca72652fa9e drag and drop cleanup
Claus Gittinger <cg@exept.de>
parents: 2077
diff changeset
  4914
2117
3d456b890124 drag and drop cleanup
Claus Gittinger <cg@exept.de>
parents: 2114
diff changeset
  4915
    ^ self canvas canDrop:aDropContext at:aPoint
2114
eca72652fa9e drag and drop cleanup
Claus Gittinger <cg@exept.de>
parents: 2077
diff changeset
  4916
eca72652fa9e drag and drop cleanup
Claus Gittinger <cg@exept.de>
parents: 2077
diff changeset
  4917
    "Created: / 13-10-2006 / 12:35:53 / cg"
2117
3d456b890124 drag and drop cleanup
Claus Gittinger <cg@exept.de>
parents: 2114
diff changeset
  4918
    "Modified: / 13-10-2006 / 16:08:46 / cg"
2114
eca72652fa9e drag and drop cleanup
Claus Gittinger <cg@exept.de>
parents: 2077
diff changeset
  4919
!
eca72652fa9e drag and drop cleanup
Claus Gittinger <cg@exept.de>
parents: 2077
diff changeset
  4920
2117
3d456b890124 drag and drop cleanup
Claus Gittinger <cg@exept.de>
parents: 2114
diff changeset
  4921
canDropObjects:aCollectionOfDropObjects
3d456b890124 drag and drop cleanup
Claus Gittinger <cg@exept.de>
parents: 2114
diff changeset
  4922
    "can drop ? -> delegate to canvas"
3d456b890124 drag and drop cleanup
Claus Gittinger <cg@exept.de>
parents: 2114
diff changeset
  4923
3d456b890124 drag and drop cleanup
Claus Gittinger <cg@exept.de>
parents: 2114
diff changeset
  4924
    ^ self canvas canDropObjects:aCollectionOfDropObjects
3d456b890124 drag and drop cleanup
Claus Gittinger <cg@exept.de>
parents: 2114
diff changeset
  4925
3d456b890124 drag and drop cleanup
Claus Gittinger <cg@exept.de>
parents: 2114
diff changeset
  4926
    "Created: / 13-10-2006 / 16:08:31 / cg"
3d456b890124 drag and drop cleanup
Claus Gittinger <cg@exept.de>
parents: 2114
diff changeset
  4927
!
3d456b890124 drag and drop cleanup
Claus Gittinger <cg@exept.de>
parents: 2114
diff changeset
  4928
3d456b890124 drag and drop cleanup
Claus Gittinger <cg@exept.de>
parents: 2114
diff changeset
  4929
canDropObjects:aCollectionOfDropObjects at:aPoint
3d456b890124 drag and drop cleanup
Claus Gittinger <cg@exept.de>
parents: 2114
diff changeset
  4930
    "can drop ? -> delegate to canvas"
3d456b890124 drag and drop cleanup
Claus Gittinger <cg@exept.de>
parents: 2114
diff changeset
  4931
3d456b890124 drag and drop cleanup
Claus Gittinger <cg@exept.de>
parents: 2114
diff changeset
  4932
    ^ self canvas canDropObjects:aCollectionOfDropObjects at:aPoint
3d456b890124 drag and drop cleanup
Claus Gittinger <cg@exept.de>
parents: 2114
diff changeset
  4933
3d456b890124 drag and drop cleanup
Claus Gittinger <cg@exept.de>
parents: 2114
diff changeset
  4934
    "Created: / 13-10-2006 / 16:08:35 / cg"
3d456b890124 drag and drop cleanup
Claus Gittinger <cg@exept.de>
parents: 2114
diff changeset
  4935
!
3d456b890124 drag and drop cleanup
Claus Gittinger <cg@exept.de>
parents: 2114
diff changeset
  4936
3d456b890124 drag and drop cleanup
Claus Gittinger <cg@exept.de>
parents: 2114
diff changeset
  4937
drop:aDropContext
2114
eca72652fa9e drag and drop cleanup
Claus Gittinger <cg@exept.de>
parents: 2077
diff changeset
  4938
    "drop objects -> delegate to canvas"
eca72652fa9e drag and drop cleanup
Claus Gittinger <cg@exept.de>
parents: 2077
diff changeset
  4939
2117
3d456b890124 drag and drop cleanup
Claus Gittinger <cg@exept.de>
parents: 2114
diff changeset
  4940
    self canvas drop:aDropContext
2114
eca72652fa9e drag and drop cleanup
Claus Gittinger <cg@exept.de>
parents: 2077
diff changeset
  4941
eca72652fa9e drag and drop cleanup
Claus Gittinger <cg@exept.de>
parents: 2077
diff changeset
  4942
    "Created: / 13-10-2006 / 12:35:59 / cg"
2117
3d456b890124 drag and drop cleanup
Claus Gittinger <cg@exept.de>
parents: 2114
diff changeset
  4943
    "Modified: / 13-10-2006 / 16:09:04 / cg"
2114
eca72652fa9e drag and drop cleanup
Claus Gittinger <cg@exept.de>
parents: 2077
diff changeset
  4944
!
eca72652fa9e drag and drop cleanup
Claus Gittinger <cg@exept.de>
parents: 2077
diff changeset
  4945
2117
3d456b890124 drag and drop cleanup
Claus Gittinger <cg@exept.de>
parents: 2114
diff changeset
  4946
drop:aDropContext at:aPoint
3d456b890124 drag and drop cleanup
Claus Gittinger <cg@exept.de>
parents: 2114
diff changeset
  4947
    "drop objects -> delegate to canvas"
3d456b890124 drag and drop cleanup
Claus Gittinger <cg@exept.de>
parents: 2114
diff changeset
  4948
3d456b890124 drag and drop cleanup
Claus Gittinger <cg@exept.de>
parents: 2114
diff changeset
  4949
    self canvas drop:aDropContext at:aPoint
3d456b890124 drag and drop cleanup
Claus Gittinger <cg@exept.de>
parents: 2114
diff changeset
  4950
3d456b890124 drag and drop cleanup
Claus Gittinger <cg@exept.de>
parents: 2114
diff changeset
  4951
    "Modified: / 13-10-2006 / 16:09:07 / cg"
3d456b890124 drag and drop cleanup
Claus Gittinger <cg@exept.de>
parents: 2114
diff changeset
  4952
!
3d456b890124 drag and drop cleanup
Claus Gittinger <cg@exept.de>
parents: 2114
diff changeset
  4953
3d456b890124 drag and drop cleanup
Claus Gittinger <cg@exept.de>
parents: 2114
diff changeset
  4954
dropObjects:aCollectionOfDropObjects
1953
3b5022bccca4 drag and drop cleanup
Claus Gittinger <cg@exept.de>
parents: 1950
diff changeset
  4955
    "drop objects -> delegate to canvas"
3b5022bccca4 drag and drop cleanup
Claus Gittinger <cg@exept.de>
parents: 1950
diff changeset
  4956
2117
3d456b890124 drag and drop cleanup
Claus Gittinger <cg@exept.de>
parents: 2114
diff changeset
  4957
    self canvas dropObjects:aCollectionOfDropObjects
3d456b890124 drag and drop cleanup
Claus Gittinger <cg@exept.de>
parents: 2114
diff changeset
  4958
3d456b890124 drag and drop cleanup
Claus Gittinger <cg@exept.de>
parents: 2114
diff changeset
  4959
    "Created: / 13-10-2006 / 16:08:51 / cg"
3d456b890124 drag and drop cleanup
Claus Gittinger <cg@exept.de>
parents: 2114
diff changeset
  4960
!
3d456b890124 drag and drop cleanup
Claus Gittinger <cg@exept.de>
parents: 2114
diff changeset
  4961
3d456b890124 drag and drop cleanup
Claus Gittinger <cg@exept.de>
parents: 2114
diff changeset
  4962
dropObjects:aCollectionOfDropObjects at:aPoint
3d456b890124 drag and drop cleanup
Claus Gittinger <cg@exept.de>
parents: 2114
diff changeset
  4963
    "drop objects -> delegate to canvas"
3d456b890124 drag and drop cleanup
Claus Gittinger <cg@exept.de>
parents: 2114
diff changeset
  4964
3d456b890124 drag and drop cleanup
Claus Gittinger <cg@exept.de>
parents: 2114
diff changeset
  4965
    self canvas dropObjects:aCollectionOfDropObjects at:aPoint
3d456b890124 drag and drop cleanup
Claus Gittinger <cg@exept.de>
parents: 2114
diff changeset
  4966
3d456b890124 drag and drop cleanup
Claus Gittinger <cg@exept.de>
parents: 2114
diff changeset
  4967
    "Created: / 13-10-2006 / 16:08:56 / cg"
222
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  4968
! !
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  4969
282
bb88d92ae887 checkin from browser
ca
parents: 281
diff changeset
  4970
!UIPainter::TreeView methodsFor:'enumerating'!
bb88d92ae887 checkin from browser
ca
parents: 281
diff changeset
  4971
bb88d92ae887 checkin from browser
ca
parents: 281
diff changeset
  4972
allItemsDo:aOneArgBlock
765
27936ff059d3 obselete methods removed + comments revised
tz
parents: 755
diff changeset
  4973
    "evaluates the argument a block on each item other than the canvas"
27936ff059d3 obselete methods removed + comments revised
tz
parents: 755
diff changeset
  4974
282
bb88d92ae887 checkin from browser
ca
parents: 281
diff changeset
  4975
    model root allChildrenDo:aOneArgBlock
bb88d92ae887 checkin from browser
ca
parents: 281
diff changeset
  4976
bb88d92ae887 checkin from browser
ca
parents: 281
diff changeset
  4977
bb88d92ae887 checkin from browser
ca
parents: 281
diff changeset
  4978
! !
bb88d92ae887 checkin from browser
ca
parents: 281
diff changeset
  4979
1719
735984d47d9b method category rename
Claus Gittinger <cg@exept.de>
parents: 1718
diff changeset
  4980
!UIPainter::TreeView methodsFor:'event handling'!
222
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  4981
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  4982
cvsEventsDisabledDo:aBlock
765
27936ff059d3 obselete methods removed + comments revised
tz
parents: 755
diff changeset
  4983
    "evaluates the block without raising selection changed notifications
27936ff059d3 obselete methods removed + comments revised
tz
parents: 755
diff changeset
  4984
     to canvas"
27936ff059d3 obselete methods removed + comments revised
tz
parents: 755
diff changeset
  4985
222
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  4986
    |restoreCvsEvents|
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  4987
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  4988
    restoreCvsEvents  := cvsEventsDisabled.
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  4989
    cvsEventsDisabled := true.
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  4990
    aBlock value.
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  4991
    cvsEventsDisabled := restoreCvsEvents.
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  4992
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  4993
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  4994
!
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  4995
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  4996
doubleClicked
765
27936ff059d3 obselete methods removed + comments revised
tz
parents: 755
diff changeset
  4997
    "disables collapsing of the root item"
27936ff059d3 obselete methods removed + comments revised
tz
parents: 755
diff changeset
  4998
222
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  4999
    self selectedNode == model root ifFalse:[
2217
b54632779619 Use class var for SelectionPanel
Stefan Vogel <sv@exept.de>
parents: 2213
diff changeset
  5000
        super doubleClicked
222
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  5001
    ]
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  5002
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  5003
805
99e70b6c02e5 new indication of the master widget
tz
parents: 798
diff changeset
  5004
!
99e70b6c02e5 new indication of the master widget
tz
parents: 798
diff changeset
  5005
852
c24c7584abe4 replace reimplememented method:
ca
parents: 851
diff changeset
  5006
redrawLabelAt:x y:yTop index:anIndex
805
99e70b6c02e5 new indication of the master widget
tz
parents: 798
diff changeset
  5007
    "draws a tiny rectangle for indicating the master node (first selected node)"
99e70b6c02e5 new indication of the master widget
tz
parents: 798
diff changeset
  5008
99e70b6c02e5 new indication of the master widget
tz
parents: 798
diff changeset
  5009
    |dX|
99e70b6c02e5 new indication of the master widget
tz
parents: 798
diff changeset
  5010
852
c24c7584abe4 replace reimplememented method:
ca
parents: 851
diff changeset
  5011
    super redrawLabelAt:x y:yTop index:anIndex.
805
99e70b6c02e5 new indication of the master widget
tz
parents: 798
diff changeset
  5012
99e70b6c02e5 new indication of the master widget
tz
parents: 798
diff changeset
  5013
    ((selection size > 1) and: [selection first == anIndex]) ifTrue:[
2217
b54632779619 Use class var for SelectionPanel
Stefan Vogel <sv@exept.de>
parents: 2213
diff changeset
  5014
        dX := textInset - 1.
b54632779619 Use class var for SelectionPanel
Stefan Vogel <sv@exept.de>
parents: 2213
diff changeset
  5015
        self paint:(Color red). "/ self application painter handleMasterColor.
b54632779619 Use class var for SelectionPanel
Stefan Vogel <sv@exept.de>
parents: 2213
diff changeset
  5016
        self fillRectangleX:(x - dX - 2)
b54632779619 Use class var for SelectionPanel
Stefan Vogel <sv@exept.de>
parents: 2213
diff changeset
  5017
                          y:yTop + ((fontHeight - dX) // 2)
b54632779619 Use class var for SelectionPanel
Stefan Vogel <sv@exept.de>
parents: 2213
diff changeset
  5018
                      width:dX
b54632779619 Use class var for SelectionPanel
Stefan Vogel <sv@exept.de>
parents: 2213
diff changeset
  5019
                     height:dX
805
99e70b6c02e5 new indication of the master widget
tz
parents: 798
diff changeset
  5020
    ]
222
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  5021
! !
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  5022
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  5023
!UIPainter::TreeView methodsFor:'initialization'!
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  5024
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  5025
initialize
765
27936ff059d3 obselete methods removed + comments revised
tz
parents: 755
diff changeset
  5026
    "initialize the tree view; multiple select and tree item actions"
27936ff059d3 obselete methods removed + comments revised
tz
parents: 755
diff changeset
  5027
222
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  5028
    super initialize.
564
df1f1e84d94a add menu added
tz
parents: 547
diff changeset
  5029
222
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  5030
    self multipleSelectOk:true.
368
9e588f397bc9 support of lineFeed character \ in the help text
ca
parents: 366
diff changeset
  5031
    cvsEventsDisabled := false.
440
1198f19712ff spec items have got individual icons
tz
parents: 437
diff changeset
  5032
    self showDirectoryIndicator: true.
656
21fe350cfa06 tree item labels changed to a more convenient style
tz
parents: 630
diff changeset
  5033
    self showDirectoryIndicatorForRoot: false.
21fe350cfa06 tree item labels changed to a more convenient style
tz
parents: 630
diff changeset
  5034
2220
ff2b5cb004c2 sort aspects in generateAspectsMethods dialog;
Claus Gittinger <cg@exept.de>
parents: 2219
diff changeset
  5035
    self model 
ff2b5cb004c2 sort aspects in generateAspectsMethods dialog;
Claus Gittinger <cg@exept.de>
parents: 2219
diff changeset
  5036
        iconAction: 
ff2b5cb004c2 sort aspects in generateAspectsMethods dialog;
Claus Gittinger <cg@exept.de>
parents: 2219
diff changeset
  5037
            [:aNode|
ff2b5cb004c2 sort aspects in generateAspectsMethods dialog;
Claus Gittinger <cg@exept.de>
parents: 2219
diff changeset
  5038
                |specClass|       
ff2b5cb004c2 sort aspects in generateAspectsMethods dialog;
Claus Gittinger <cg@exept.de>
parents: 2219
diff changeset
  5039
                (specClass := aNode contents spec) isNil 
ff2b5cb004c2 sort aspects in generateAspectsMethods dialog;
Claus Gittinger <cg@exept.de>
parents: 2219
diff changeset
  5040
                    ifTrue: [WindowSpec icon]
ff2b5cb004c2 sort aspects in generateAspectsMethods dialog;
Claus Gittinger <cg@exept.de>
parents: 2219
diff changeset
  5041
                    ifFalse:[specClass class icon]
ff2b5cb004c2 sort aspects in generateAspectsMethods dialog;
Claus Gittinger <cg@exept.de>
parents: 2219
diff changeset
  5042
            ].
ff2b5cb004c2 sort aspects in generateAspectsMethods dialog;
Claus Gittinger <cg@exept.de>
parents: 2219
diff changeset
  5043
ff2b5cb004c2 sort aspects in generateAspectsMethods dialog;
Claus Gittinger <cg@exept.de>
parents: 2219
diff changeset
  5044
    self model 
ff2b5cb004c2 sort aspects in generateAspectsMethods dialog;
Claus Gittinger <cg@exept.de>
parents: 2219
diff changeset
  5045
        labelAction: 
ff2b5cb004c2 sort aspects in generateAspectsMethods dialog;
Claus Gittinger <cg@exept.de>
parents: 2219
diff changeset
  5046
            [:aNode|
ff2b5cb004c2 sort aspects in generateAspectsMethods dialog;
Claus Gittinger <cg@exept.de>
parents: 2219
diff changeset
  5047
                |spec|
ff2b5cb004c2 sort aspects in generateAspectsMethods dialog;
Claus Gittinger <cg@exept.de>
parents: 2219
diff changeset
  5048
                (spec := aNode contents spec) notNil
ff2b5cb004c2 sort aspects in generateAspectsMethods dialog;
Claus Gittinger <cg@exept.de>
parents: 2219
diff changeset
  5049
                    ifTrue: [self nameForSpecInList:spec] 
ff2b5cb004c2 sort aspects in generateAspectsMethods dialog;
Claus Gittinger <cg@exept.de>
parents: 2219
diff changeset
  5050
                    ifFalse:[aNode name]
ff2b5cb004c2 sort aspects in generateAspectsMethods dialog;
Claus Gittinger <cg@exept.de>
parents: 2219
diff changeset
  5051
            ]
222
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  5052
! !
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  5053
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  5054
!UIPainter::TreeView methodsFor:'private'!
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  5055
713
f94e58bb44ac some changes for the docu
tz
parents: 697
diff changeset
  5056
nameForSpecInList:aSpec
765
27936ff059d3 obselete methods removed + comments revised
tz
parents: 755
diff changeset
  5057
    "returns the tree item label for aSpec"
27936ff059d3 obselete methods removed + comments revised
tz
parents: 755
diff changeset
  5058
2230
33c98cefa7e6 refactorings
Claus Gittinger <cg@exept.de>
parents: 2227
diff changeset
  5059
    |aspect|
33c98cefa7e6 refactorings
Claus Gittinger <cg@exept.de>
parents: 2227
diff changeset
  5060
33c98cefa7e6 refactorings
Claus Gittinger <cg@exept.de>
parents: 2227
diff changeset
  5061
    aspect := aSpec nameOfMainAspect.
33c98cefa7e6 refactorings
Claus Gittinger <cg@exept.de>
parents: 2227
diff changeset
  5062
    aspect notNil ifTrue:[
33c98cefa7e6 refactorings
Claus Gittinger <cg@exept.de>
parents: 2227
diff changeset
  5063
        ^ '(',aspect allBold ,') ', aSpec name, ': [', aSpec viewClass name , ']' 
2220
ff2b5cb004c2 sort aspects in generateAspectsMethods dialog;
Claus Gittinger <cg@exept.de>
parents: 2219
diff changeset
  5064
    ].
2230
33c98cefa7e6 refactorings
Claus Gittinger <cg@exept.de>
parents: 2227
diff changeset
  5065
    ^ aSpec name "allBold", ': [', aSpec viewClass name , ']' 
222
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  5066
!
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  5067
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  5068
selectionChangedFrom:oldSelection
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  5069
    "selection has changed. update master selection and raise notification
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  5070
     to canvas in case of enabled cvs events
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  5071
    "
282
bb88d92ae887 checkin from browser
ca
parents: 281
diff changeset
  5072
    |sel size|
222
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  5073
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  5074
    super selectionChangedFrom:oldSelection.
282
bb88d92ae887 checkin from browser
ca
parents: 281
diff changeset
  5075
    size := selection size.
222
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  5076
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  5077
    cvsEventsDisabled ifFalse:[
2217
b54632779619 Use class var for SelectionPanel
Stefan Vogel <sv@exept.de>
parents: 2213
diff changeset
  5078
        (size ~~ 0 and:[size ~~ 1 or:[selection first ~~ 1]]) ifTrue:[
b54632779619 Use class var for SelectionPanel
Stefan Vogel <sv@exept.de>
parents: 2213
diff changeset
  5079
            sel := OrderedCollection new.
b54632779619 Use class var for SelectionPanel
Stefan Vogel <sv@exept.de>
parents: 2213
diff changeset
  5080
b54632779619 Use class var for SelectionPanel
Stefan Vogel <sv@exept.de>
parents: 2213
diff changeset
  5081
            selection do:[:i|
b54632779619 Use class var for SelectionPanel
Stefan Vogel <sv@exept.de>
parents: 2213
diff changeset
  5082
                i ~~ 1 ifTrue:[sel add:(listOfNodes at:i) contents view]
b54632779619 Use class var for SelectionPanel
Stefan Vogel <sv@exept.de>
parents: 2213
diff changeset
  5083
            ]
b54632779619 Use class var for SelectionPanel
Stefan Vogel <sv@exept.de>
parents: 2213
diff changeset
  5084
        ].
b54632779619 Use class var for SelectionPanel
Stefan Vogel <sv@exept.de>
parents: 2213
diff changeset
  5085
        self canvas updateSelectionFromModel:sel
778
a4b931b2aff6 master widget highlighting changed in the tree list
tz
parents: 774
diff changeset
  5086
    ].             
713
f94e58bb44ac some changes for the docu
tz
parents: 697
diff changeset
  5087
    size = 1 ifTrue:[
2217
b54632779619 Use class var for SelectionPanel
Stefan Vogel <sv@exept.de>
parents: 2213
diff changeset
  5088
        oldSelection size > 1 ifTrue: [
b54632779619 Use class var for SelectionPanel
Stefan Vogel <sv@exept.de>
parents: 2213
diff changeset
  5089
            (listOfNodes at:lastDrawnMaster) retrieveLabel.
b54632779619 Use class var for SelectionPanel
Stefan Vogel <sv@exept.de>
parents: 2213
diff changeset
  5090
            self redrawLine: lastDrawnMaster. 
b54632779619 Use class var for SelectionPanel
Stefan Vogel <sv@exept.de>
parents: 2213
diff changeset
  5091
            lastDrawnMaster := selection first
b54632779619 Use class var for SelectionPanel
Stefan Vogel <sv@exept.de>
parents: 2213
diff changeset
  5092
        ]
713
f94e58bb44ac some changes for the docu
tz
parents: 697
diff changeset
  5093
    ].
f94e58bb44ac some changes for the docu
tz
parents: 697
diff changeset
  5094
    size > 1 ifTrue:[
2217
b54632779619 Use class var for SelectionPanel
Stefan Vogel <sv@exept.de>
parents: 2213
diff changeset
  5095
        selection first ~~ lastDrawnMaster ifTrue: [
b54632779619 Use class var for SelectionPanel
Stefan Vogel <sv@exept.de>
parents: 2213
diff changeset
  5096
            (listOfNodes at:selection first) retrieveLabel.
b54632779619 Use class var for SelectionPanel
Stefan Vogel <sv@exept.de>
parents: 2213
diff changeset
  5097
            lastDrawnMaster notNil ifTrue: [(listOfNodes at:lastDrawnMaster) retrieveLabel].
b54632779619 Use class var for SelectionPanel
Stefan Vogel <sv@exept.de>
parents: 2213
diff changeset
  5098
            self redrawLine: lastDrawnMaster. 
b54632779619 Use class var for SelectionPanel
Stefan Vogel <sv@exept.de>
parents: 2213
diff changeset
  5099
            self redrawLine: (lastDrawnMaster := selection first)
b54632779619 Use class var for SelectionPanel
Stefan Vogel <sv@exept.de>
parents: 2213
diff changeset
  5100
        ]
785
35ad7901368c avoid selection problems
tz
parents: 778
diff changeset
  5101
    ]         
713
f94e58bb44ac some changes for the docu
tz
parents: 697
diff changeset
  5102
    ifFalse: [
2217
b54632779619 Use class var for SelectionPanel
Stefan Vogel <sv@exept.de>
parents: 2213
diff changeset
  5103
        lastDrawnMaster := nil
785
35ad7901368c avoid selection problems
tz
parents: 778
diff changeset
  5104
    ] 
222
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  5105
! !
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  5106
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  5107
!UIPainter::TreeView methodsFor:'queries'!
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  5108
565
8fdeb11c72fd items move enabling
tz
parents: 564
diff changeset
  5109
canChangeOrderInContainer
8fdeb11c72fd items move enabling
tz
parents: 564
diff changeset
  5110
    "returns true if any selection exists and all widgets in the selection
765
27936ff059d3 obselete methods removed + comments revised
tz
parents: 755
diff changeset
  5111
     can change their layout through to a move or align operation"
565
8fdeb11c72fd items move enabling
tz
parents: 564
diff changeset
  5112
889
39d326722589 up/down channel updating
tz
parents: 884
diff changeset
  5113
    ^(selection size == 1)  and: 
39d326722589 up/down channel updating
tz
parents: 884
diff changeset
  5114
    [(selection at: 1) ~~ 1 and:   
39d326722589 up/down channel updating
tz
parents: 884
diff changeset
  5115
    [self selectedNode parent children size > 1]] 
39d326722589 up/down channel updating
tz
parents: 884
diff changeset
  5116
39d326722589 up/down channel updating
tz
parents: 884
diff changeset
  5117
565
8fdeb11c72fd items move enabling
tz
parents: 564
diff changeset
  5118
!
8fdeb11c72fd items move enabling
tz
parents: 564
diff changeset
  5119
1230
23e5d0c133e8 added exchangeLayouts function
Claus Gittinger <cg@exept.de>
parents: 1211
diff changeset
  5120
canExchangeSelectionLayouts 
23e5d0c133e8 added exchangeLayouts function
Claus Gittinger <cg@exept.de>
parents: 1211
diff changeset
  5121
    "returns true if the selections size is exactly 2
23e5d0c133e8 added exchangeLayouts function
Claus Gittinger <cg@exept.de>
parents: 1211
diff changeset
  5122
     and all widgets in the selection
23e5d0c133e8 added exchangeLayouts function
Claus Gittinger <cg@exept.de>
parents: 1211
diff changeset
  5123
     can change their layout through to a move or align operation"
23e5d0c133e8 added exchangeLayouts function
Claus Gittinger <cg@exept.de>
parents: 1211
diff changeset
  5124
23e5d0c133e8 added exchangeLayouts function
Claus Gittinger <cg@exept.de>
parents: 1211
diff changeset
  5125
    selection size == 2 ifFalse:[
23e5d0c133e8 added exchangeLayouts function
Claus Gittinger <cg@exept.de>
parents: 1211
diff changeset
  5126
        ^ false
23e5d0c133e8 added exchangeLayouts function
Claus Gittinger <cg@exept.de>
parents: 1211
diff changeset
  5127
    ].
23e5d0c133e8 added exchangeLayouts function
Claus Gittinger <cg@exept.de>
parents: 1211
diff changeset
  5128
    ^ self canMoveOrAlignSelection
23e5d0c133e8 added exchangeLayouts function
Claus Gittinger <cg@exept.de>
parents: 1211
diff changeset
  5129
!
23e5d0c133e8 added exchangeLayouts function
Claus Gittinger <cg@exept.de>
parents: 1211
diff changeset
  5130
282
bb88d92ae887 checkin from browser
ca
parents: 281
diff changeset
  5131
canMoveOrAlignSelection
bb88d92ae887 checkin from browser
ca
parents: 281
diff changeset
  5132
    "returns true if any selection exists and all widgets in the selection
765
27936ff059d3 obselete methods removed + comments revised
tz
parents: 755
diff changeset
  5133
     can change their layout through to a move or align operation"
282
bb88d92ae887 checkin from browser
ca
parents: 281
diff changeset
  5134
bb88d92ae887 checkin from browser
ca
parents: 281
diff changeset
  5135
    selection size == 0 ifTrue:[
2217
b54632779619 Use class var for SelectionPanel
Stefan Vogel <sv@exept.de>
parents: 2213
diff changeset
  5136
        ^ false
282
bb88d92ae887 checkin from browser
ca
parents: 281
diff changeset
  5137
    ].
bb88d92ae887 checkin from browser
ca
parents: 281
diff changeset
  5138
bb88d92ae887 checkin from browser
ca
parents: 281
diff changeset
  5139
    selection do:[:i|
2217
b54632779619 Use class var for SelectionPanel
Stefan Vogel <sv@exept.de>
parents: 2213
diff changeset
  5140
        i == 1 ifTrue:[^ false].
b54632779619 Use class var for SelectionPanel
Stefan Vogel <sv@exept.de>
parents: 2213
diff changeset
  5141
b54632779619 Use class var for SelectionPanel
Stefan Vogel <sv@exept.de>
parents: 2213
diff changeset
  5142
        (self canvas canChangeLayoutOfView:((listOfNodes at:i) contents view)) ifFalse:[
b54632779619 Use class var for SelectionPanel
Stefan Vogel <sv@exept.de>
parents: 2213
diff changeset
  5143
            ^ false
b54632779619 Use class var for SelectionPanel
Stefan Vogel <sv@exept.de>
parents: 2213
diff changeset
  5144
        ]
282
bb88d92ae887 checkin from browser
ca
parents: 281
diff changeset
  5145
    ].
bb88d92ae887 checkin from browser
ca
parents: 281
diff changeset
  5146
    ^ true
bb88d92ae887 checkin from browser
ca
parents: 281
diff changeset
  5147
!
bb88d92ae887 checkin from browser
ca
parents: 281
diff changeset
  5148
bb88d92ae887 checkin from browser
ca
parents: 281
diff changeset
  5149
canMoveSelectionIntoContainer
765
27936ff059d3 obselete methods removed + comments revised
tz
parents: 755
diff changeset
  5150
    "returns true in case that one widget is selected and can change its container
27936ff059d3 obselete methods removed + comments revised
tz
parents: 755
diff changeset
  5151
     widget to the next element in the list which will have the same container"
27936ff059d3 obselete methods removed + comments revised
tz
parents: 755
diff changeset
  5152
1621
112670159075 cg: check if selection change is allowed BEFORE changing the
tm
parents: 1608
diff changeset
  5153
    |item prnt container|
222
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  5154
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  5155
    (     (item := self selectedNode) isNil
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  5156
      or:[(prnt := item parent) isNil
1621
112670159075 cg: check if selection change is allowed BEFORE changing the
tm
parents: 1608
diff changeset
  5157
      or:[(container := prnt childAt:((prnt indexOfChild:item) + 1)) isNil
112670159075 cg: check if selection change is allowed BEFORE changing the
tm
parents: 1608
diff changeset
  5158
      or:[container contents spec class supportsSubComponents not]]]
222
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  5159
    ) ifTrue:[
1621
112670159075 cg: check if selection change is allowed BEFORE changing the
tm
parents: 1608
diff changeset
  5160
        ^ false
222
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  5161
    ].
765
27936ff059d3 obselete methods removed + comments revised
tz
parents: 755
diff changeset
  5162
    ^ true
222
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  5163
!
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  5164
282
bb88d92ae887 checkin from browser
ca
parents: 281
diff changeset
  5165
canMoveSelectionOutOfContainer
765
27936ff059d3 obselete methods removed + comments revised
tz
parents: 755
diff changeset
  5166
    "returns true in case that one widget is selected which is contained within
27936ff059d3 obselete methods removed + comments revised
tz
parents: 755
diff changeset
  5167
     another widget"
27936ff059d3 obselete methods removed + comments revised
tz
parents: 755
diff changeset
  5168
222
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  5169
    |item prnt|
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  5170
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  5171
    (     (item := self selectedNode) isNil
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  5172
      or:[(prnt := item parent) isNil
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  5173
      or:[prnt parent isNil]]
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  5174
    ) ifTrue:[
2217
b54632779619 Use class var for SelectionPanel
Stefan Vogel <sv@exept.de>
parents: 2213
diff changeset
  5175
        ^ false
222
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  5176
    ].
765
27936ff059d3 obselete methods removed + comments revised
tz
parents: 755
diff changeset
  5177
    ^ true
222
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  5178
!
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  5179
301
131f874fc2a2 support of hierarchical list editor
ca
parents: 297
diff changeset
  5180
canResizeSelectedWidget
131f874fc2a2 support of hierarchical list editor
ca
parents: 297
diff changeset
  5181
    "returns true in case of one widget selected and is contained
765
27936ff059d3 obselete methods removed + comments revised
tz
parents: 755
diff changeset
  5182
     within a widget which allows to resize sub components"
27936ff059d3 obselete methods removed + comments revised
tz
parents: 755
diff changeset
  5183
27936ff059d3 obselete methods removed + comments revised
tz
parents: 755
diff changeset
  5184
    |selectedNode|
27936ff059d3 obselete methods removed + comments revised
tz
parents: 755
diff changeset
  5185
27936ff059d3 obselete methods removed + comments revised
tz
parents: 755
diff changeset
  5186
    (selectedNode := self selectedNode) notNil ifTrue:[
2217
b54632779619 Use class var for SelectionPanel
Stefan Vogel <sv@exept.de>
parents: 2213
diff changeset
  5187
        (selectedNode := selectedNode parent) notNil ifTrue:[
b54632779619 Use class var for SelectionPanel
Stefan Vogel <sv@exept.de>
parents: 2213
diff changeset
  5188
            ^ (selectedNode parent isNil or:[selectedNode contents spec class canResizeSubComponents])
b54632779619 Use class var for SelectionPanel
Stefan Vogel <sv@exept.de>
parents: 2213
diff changeset
  5189
        ]
301
131f874fc2a2 support of hierarchical list editor
ca
parents: 297
diff changeset
  5190
    ].
131f874fc2a2 support of hierarchical list editor
ca
parents: 297
diff changeset
  5191
    ^ false
131f874fc2a2 support of hierarchical list editor
ca
parents: 297
diff changeset
  5192
!
131f874fc2a2 support of hierarchical list editor
ca
parents: 297
diff changeset
  5193
282
bb88d92ae887 checkin from browser
ca
parents: 281
diff changeset
  5194
hasOneSelectionOtherThanCanvas
765
27936ff059d3 obselete methods removed + comments revised
tz
parents: 755
diff changeset
  5195
    "returns true in case that one selection exists other than the canvas"
27936ff059d3 obselete methods removed + comments revised
tz
parents: 755
diff changeset
  5196
27936ff059d3 obselete methods removed + comments revised
tz
parents: 755
diff changeset
  5197
    ^ selection size == 1 and:[selection first ~~ 1]
281
aabb4037f6a3 window spec
ca
parents: 280
diff changeset
  5198
!
aabb4037f6a3 window spec
ca
parents: 280
diff changeset
  5199
aabb4037f6a3 window spec
ca
parents: 280
diff changeset
  5200
isCanvasSelected
aabb4037f6a3 window spec
ca
parents: 280
diff changeset
  5201
    "returns true in case of a single selection and the
765
27936ff059d3 obselete methods removed + comments revised
tz
parents: 755
diff changeset
  5202
     selection is the canvas (index 1)"
27936ff059d3 obselete methods removed + comments revised
tz
parents: 755
diff changeset
  5203
27936ff059d3 obselete methods removed + comments revised
tz
parents: 755
diff changeset
  5204
    ^ selection size == 1 and:[self isInSelection:1]
222
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  5205
! !
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  5206
765
27936ff059d3 obselete methods removed + comments revised
tz
parents: 755
diff changeset
  5207
!UIPainter::TreeView methodsFor:'searching'!
282
bb88d92ae887 checkin from browser
ca
parents: 281
diff changeset
  5208
1870
771fcc38ecb8 set selection interface changed
ca
parents: 1868
diff changeset
  5209
detectItemCorespondingToView:aView
771fcc38ecb8 set selection interface changed
ca
parents: 1868
diff changeset
  5210
    "detects the item coresponding to the view. The item of the view or the first
282
bb88d92ae887 checkin from browser
ca
parents: 281
diff changeset
  5211
     subview providing the item is returned. If no property is detected nil is
765
27936ff059d3 obselete methods removed + comments revised
tz
parents: 755
diff changeset
  5212
     returned"
27936ff059d3 obselete methods removed + comments revised
tz
parents: 755
diff changeset
  5213
282
bb88d92ae887 checkin from browser
ca
parents: 281
diff changeset
  5214
    |view item|
bb88d92ae887 checkin from browser
ca
parents: 281
diff changeset
  5215
bb88d92ae887 checkin from browser
ca
parents: 281
diff changeset
  5216
    (view := aView) notNil ifTrue:[
1870
771fcc38ecb8 set selection interface changed
ca
parents: 1868
diff changeset
  5217
        [(item := self itemOfView:view) isNil] whileTrue:[
771fcc38ecb8 set selection interface changed
ca
parents: 1868
diff changeset
  5218
            (view := view superView) isNil ifTrue:[^ listOfNodes at:1]
771fcc38ecb8 set selection interface changed
ca
parents: 1868
diff changeset
  5219
        ].
282
bb88d92ae887 checkin from browser
ca
parents: 281
diff changeset
  5220
    ].
bb88d92ae887 checkin from browser
ca
parents: 281
diff changeset
  5221
    ^ item
bb88d92ae887 checkin from browser
ca
parents: 281
diff changeset
  5222
! !
bb88d92ae887 checkin from browser
ca
parents: 281
diff changeset
  5223
1439
540781421bbf category change
Claus Gittinger <cg@exept.de>
parents: 1432
diff changeset
  5224
!UIPainter::TreeView methodsFor:'user interaction'!
222
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  5225
1621
112670159075 cg: check if selection change is allowed BEFORE changing the
tm
parents: 1608
diff changeset
  5226
askForSelectionChangeAllowed 
112670159075 cg: check if selection change is allowed BEFORE changing the
tm
parents: 1608
diff changeset
  5227
    selectConditionBlock notNil ifTrue:[
112670159075 cg: check if selection change is allowed BEFORE changing the
tm
parents: 1608
diff changeset
  5228
        ^ selectConditionBlock value:nil 
112670159075 cg: check if selection change is allowed BEFORE changing the
tm
parents: 1608
diff changeset
  5229
    ].
112670159075 cg: check if selection change is allowed BEFORE changing the
tm
parents: 1608
diff changeset
  5230
    ^ true
112670159075 cg: check if selection change is allowed BEFORE changing the
tm
parents: 1608
diff changeset
  5231
!
112670159075 cg: check if selection change is allowed BEFORE changing the
tm
parents: 1608
diff changeset
  5232
774
5ca0853de0bc reuse methods provided by the model
ca
parents: 765
diff changeset
  5233
doChangeHierarchyOf:anItem
5ca0853de0bc reuse methods provided by the model
ca
parents: 765
diff changeset
  5234
5ca0853de0bc reuse methods provided by the model
ca
parents: 765
diff changeset
  5235
    |canvas|
5ca0853de0bc reuse methods provided by the model
ca
parents: 765
diff changeset
  5236
5ca0853de0bc reuse methods provided by the model
ca
parents: 765
diff changeset
  5237
    anItem isNil ifTrue:[
1621
112670159075 cg: check if selection change is allowed BEFORE changing the
tm
parents: 1608
diff changeset
  5238
        ^ self
774
5ca0853de0bc reuse methods provided by the model
ca
parents: 765
diff changeset
  5239
    ].
1621
112670159075 cg: check if selection change is allowed BEFORE changing the
tm
parents: 1608
diff changeset
  5240
    self askForSelectionChangeAllowed ifFalse:[^ self].    
774
5ca0853de0bc reuse methods provided by the model
ca
parents: 765
diff changeset
  5241
    self setSelection:nil.
5ca0853de0bc reuse methods provided by the model
ca
parents: 765
diff changeset
  5242
5ca0853de0bc reuse methods provided by the model
ca
parents: 765
diff changeset
  5243
    canvas := self canvas.
5ca0853de0bc reuse methods provided by the model
ca
parents: 765
diff changeset
  5244
    canvas deleteSelection.
5ca0853de0bc reuse methods provided by the model
ca
parents: 765
diff changeset
  5245
    canvas setSelection:(anItem contents view) withRedraw:false.
5ca0853de0bc reuse methods provided by the model
ca
parents: 765
diff changeset
  5246
    canvas pasteWithLayout.
5ca0853de0bc reuse methods provided by the model
ca
parents: 765
diff changeset
  5247
!
5ca0853de0bc reuse methods provided by the model
ca
parents: 765
diff changeset
  5248
222
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  5249
doStepIn
774
5ca0853de0bc reuse methods provided by the model
ca
parents: 765
diff changeset
  5250
    |item prnt|
222
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  5251
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  5252
    (     (item := self selectedNode) isNil
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  5253
      or:[(prnt := item parent) isNil
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  5254
      or:[(prnt := prnt childAt:((prnt indexOfChild:item) + 1)) isNil
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  5255
      or:[prnt contents spec class supportsSubComponents not]]]
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  5256
    ) ifFalse:[
2217
b54632779619 Use class var for SelectionPanel
Stefan Vogel <sv@exept.de>
parents: 2213
diff changeset
  5257
        self doChangeHierarchyOf:prnt
222
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  5258
    ]
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  5259
!
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  5260
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  5261
doStepOut
774
5ca0853de0bc reuse methods provided by the model
ca
parents: 765
diff changeset
  5262
    |item|
5ca0853de0bc reuse methods provided by the model
ca
parents: 765
diff changeset
  5263
5ca0853de0bc reuse methods provided by the model
ca
parents: 765
diff changeset
  5264
    ((item := self selectedNode) notNil and:[(item := item parent) notNil]) ifTrue:[
2217
b54632779619 Use class var for SelectionPanel
Stefan Vogel <sv@exept.de>
parents: 2213
diff changeset
  5265
        self doChangeHierarchyOf:(item parent)
222
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  5266
    ].
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  5267
!
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  5268
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  5269
doStepOver:anIndex
765
27936ff059d3 obselete methods removed + comments revised
tz
parents: 755
diff changeset
  5270
    "moves child 'anOffset' forward or backward in list of children"
27936ff059d3 obselete methods removed + comments revised
tz
parents: 755
diff changeset
  5271
282
bb88d92ae887 checkin from browser
ca
parents: 281
diff changeset
  5272
    |item idx size prnt spVw view canvas|
222
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  5273
1621
112670159075 cg: check if selection change is allowed BEFORE changing the
tm
parents: 1608
diff changeset
  5274
    self askForSelectionChangeAllowed ifFalse:[^ self].
112670159075 cg: check if selection change is allowed BEFORE changing the
tm
parents: 1608
diff changeset
  5275
222
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  5276
    (    (item := self selectedNode) isNil
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  5277
     or:[(prnt := item parent) isNil
282
bb88d92ae887 checkin from browser
ca
parents: 281
diff changeset
  5278
     or:[(size := prnt children size) < 2
bb88d92ae887 checkin from browser
ca
parents: 281
diff changeset
  5279
     or:[(idx  := prnt indexOfChild:item) == 0]]]
bb88d92ae887 checkin from browser
ca
parents: 281
diff changeset
  5280
    ) ifTrue:[
1621
112670159075 cg: check if selection change is allowed BEFORE changing the
tm
parents: 1608
diff changeset
  5281
        ^ self
282
bb88d92ae887 checkin from browser
ca
parents: 281
diff changeset
  5282
    ].
bb88d92ae887 checkin from browser
ca
parents: 281
diff changeset
  5283
    idx := idx + anIndex.
bb88d92ae887 checkin from browser
ca
parents: 281
diff changeset
  5284
bb88d92ae887 checkin from browser
ca
parents: 281
diff changeset
  5285
    idx < 1 ifTrue:[idx := size]
1621
112670159075 cg: check if selection change is allowed BEFORE changing the
tm
parents: 1608
diff changeset
  5286
           ifFalse:[idx > size ifTrue:[idx := 1]].
282
bb88d92ae887 checkin from browser
ca
parents: 281
diff changeset
  5287
774
5ca0853de0bc reuse methods provided by the model
ca
parents: 765
diff changeset
  5288
    self setSelection:nil.
5ca0853de0bc reuse methods provided by the model
ca
parents: 765
diff changeset
  5289
    model remove:item.
282
bb88d92ae887 checkin from browser
ca
parents: 281
diff changeset
  5290
    model add:item beforeIndex:idx below:prnt.
774
5ca0853de0bc reuse methods provided by the model
ca
parents: 765
diff changeset
  5291
282
bb88d92ae887 checkin from browser
ca
parents: 281
diff changeset
  5292
    idx    := prnt indexOfChild:item.
bb88d92ae887 checkin from browser
ca
parents: 281
diff changeset
  5293
    view   := item contents view.
bb88d92ae887 checkin from browser
ca
parents: 281
diff changeset
  5294
    spVw   := prnt contents view.
bb88d92ae887 checkin from browser
ca
parents: 281
diff changeset
  5295
    canvas := self canvas.
bb88d92ae887 checkin from browser
ca
parents: 281
diff changeset
  5296
bb88d92ae887 checkin from browser
ca
parents: 281
diff changeset
  5297
    canvas hideSelection.
bb88d92ae887 checkin from browser
ca
parents: 281
diff changeset
  5298
bb88d92ae887 checkin from browser
ca
parents: 281
diff changeset
  5299
    spVw changeSequenceOrderFor:view to:idx.
bb88d92ae887 checkin from browser
ca
parents: 281
diff changeset
  5300
bb88d92ae887 checkin from browser
ca
parents: 281
diff changeset
  5301
    spVw specClass isLayoutContainer ifFalse:[
1621
112670159075 cg: check if selection change is allowed BEFORE changing the
tm
parents: 1608
diff changeset
  5302
        spVw subViews do:[:v| v raise ].
282
bb88d92ae887 checkin from browser
ca
parents: 281
diff changeset
  5303
    ].
bb88d92ae887 checkin from browser
ca
parents: 281
diff changeset
  5304
    canvas showSelection.
bb88d92ae887 checkin from browser
ca
parents: 281
diff changeset
  5305
    self selectNode:item.
222
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  5306
! !
dd2688307d90 added treeView; change specs
ca
parents: 217
diff changeset
  5307
60
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
  5308
!UIPainter class methodsFor:'documentation'!
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
  5309
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
  5310
version
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
  5311
    ^ '$Header$'
7542ab7fbbfe *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 59
diff changeset
  5312
! !
2217
b54632779619 Use class var for SelectionPanel
Stefan Vogel <sv@exept.de>
parents: 2213
diff changeset
  5313
b54632779619 Use class var for SelectionPanel
Stefan Vogel <sv@exept.de>
parents: 2213
diff changeset
  5314
UIPainter initialize!