ToolApplicationModel.st
author alkurz
Tue, 02 Jul 2019 14:10:25 +0200
changeset 4287 9e5dc8a88380
parent 4263 d349fa8d2945
child 4345 9402c8b96f6d
permissions -rw-r--r--
#FEATURE by alkurz class: ApplicationModel openDialogInterface:withBindings: accepts an already decoded spec as argument
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
756
4dba5a8797ec *** empty log message ***
tz
parents: 753
diff changeset
     1
"
784
b08b05900f30 copyright changed
tz
parents: 783
diff changeset
     2
 COPYRIGHT (c) 1997 by eXept Software AG
756
4dba5a8797ec *** empty log message ***
tz
parents: 753
diff changeset
     3
              All Rights Reserved
4dba5a8797ec *** empty log message ***
tz
parents: 753
diff changeset
     4
4dba5a8797ec *** empty log message ***
tz
parents: 753
diff changeset
     5
 This software is furnished under a license and may be used
4dba5a8797ec *** empty log message ***
tz
parents: 753
diff changeset
     6
 only in accordance with the terms of that license and with the
4dba5a8797ec *** empty log message ***
tz
parents: 753
diff changeset
     7
 inclusion of the above copyright notice. This software may not
4dba5a8797ec *** empty log message ***
tz
parents: 753
diff changeset
     8
 be provided or otherwise made available to, or used by, any
4dba5a8797ec *** empty log message ***
tz
parents: 753
diff changeset
     9
 other person. No title to or ownership of the software is
4dba5a8797ec *** empty log message ***
tz
parents: 753
diff changeset
    10
 hereby transferred.
4dba5a8797ec *** empty log message ***
tz
parents: 753
diff changeset
    11
"
1391
383411d95966 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1343
diff changeset
    12
"{ Package: 'stx:libview2' }"
383411d95966 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1343
diff changeset
    13
3508
ba75f68aaa04 #UI_ENHANCEMENT
Claus Gittinger <cg@exept.de>
parents: 3354
diff changeset
    14
"{ NameSpace: Smalltalk }"
ba75f68aaa04 #UI_ENHANCEMENT
Claus Gittinger <cg@exept.de>
parents: 3354
diff changeset
    15
753
9c837d99f109 intitial checkin
tz
parents:
diff changeset
    16
ApplicationModel subclass:#ToolApplicationModel
782
5b8c4cf62cb5 activeHelp changed as instClassVar + some other cleans
tz
parents: 779
diff changeset
    17
	instanceVariableNames:'timeBlock'
753
9c837d99f109 intitial checkin
tz
parents:
diff changeset
    18
	classVariableNames:''
9c837d99f109 intitial checkin
tz
parents:
diff changeset
    19
	poolDictionaries:''
834
ac1655bd31bb class category changed
tz
parents: 833
diff changeset
    20
	category:'Interface-Framework'
753
9c837d99f109 intitial checkin
tz
parents:
diff changeset
    21
!
9c837d99f109 intitial checkin
tz
parents:
diff changeset
    22
1969
8e8f5998d053 separate fileHistory
Claus Gittinger <cg@exept.de>
parents: 1809
diff changeset
    23
ToolApplicationModel class instanceVariableNames:'history fileHistory clipboard settings showingHelp instances'
753
9c837d99f109 intitial checkin
tz
parents:
diff changeset
    24
9c837d99f109 intitial checkin
tz
parents:
diff changeset
    25
"
9c837d99f109 intitial checkin
tz
parents:
diff changeset
    26
 The following class instance variables are inherited by this class:
9c837d99f109 intitial checkin
tz
parents:
diff changeset
    27
9c837d99f109 intitial checkin
tz
parents:
diff changeset
    28
	ApplicationModel - ClassResources
9c837d99f109 intitial checkin
tz
parents:
diff changeset
    29
	Model - 
9c837d99f109 intitial checkin
tz
parents:
diff changeset
    30
	Object - 
9c837d99f109 intitial checkin
tz
parents:
diff changeset
    31
"
9c837d99f109 intitial checkin
tz
parents:
diff changeset
    32
!
9c837d99f109 intitial checkin
tz
parents:
diff changeset
    33
2098
37ea7570cd6b code cleanup & refactoring
Claus Gittinger <cg@exept.de>
parents: 2084
diff changeset
    34
Object subclass:#HistoryEntry
37ea7570cd6b code cleanup & refactoring
Claus Gittinger <cg@exept.de>
parents: 2084
diff changeset
    35
	instanceVariableNames:''
37ea7570cd6b code cleanup & refactoring
Claus Gittinger <cg@exept.de>
parents: 2084
diff changeset
    36
	classVariableNames:''
37ea7570cd6b code cleanup & refactoring
Claus Gittinger <cg@exept.de>
parents: 2084
diff changeset
    37
	poolDictionaries:''
37ea7570cd6b code cleanup & refactoring
Claus Gittinger <cg@exept.de>
parents: 2084
diff changeset
    38
	privateIn:ToolApplicationModel
37ea7570cd6b code cleanup & refactoring
Claus Gittinger <cg@exept.de>
parents: 2084
diff changeset
    39
!
37ea7570cd6b code cleanup & refactoring
Claus Gittinger <cg@exept.de>
parents: 2084
diff changeset
    40
37ea7570cd6b code cleanup & refactoring
Claus Gittinger <cg@exept.de>
parents: 2084
diff changeset
    41
ToolApplicationModel::HistoryEntry subclass:#HistoryEntryForFile
37ea7570cd6b code cleanup & refactoring
Claus Gittinger <cg@exept.de>
parents: 2084
diff changeset
    42
	instanceVariableNames:'filename'
37ea7570cd6b code cleanup & refactoring
Claus Gittinger <cg@exept.de>
parents: 2084
diff changeset
    43
	classVariableNames:''
37ea7570cd6b code cleanup & refactoring
Claus Gittinger <cg@exept.de>
parents: 2084
diff changeset
    44
	poolDictionaries:''
37ea7570cd6b code cleanup & refactoring
Claus Gittinger <cg@exept.de>
parents: 2084
diff changeset
    45
	privateIn:ToolApplicationModel
37ea7570cd6b code cleanup & refactoring
Claus Gittinger <cg@exept.de>
parents: 2084
diff changeset
    46
!
37ea7570cd6b code cleanup & refactoring
Claus Gittinger <cg@exept.de>
parents: 2084
diff changeset
    47
37ea7570cd6b code cleanup & refactoring
Claus Gittinger <cg@exept.de>
parents: 2084
diff changeset
    48
ToolApplicationModel::HistoryEntry subclass:#HistoryEntryForMethod
37ea7570cd6b code cleanup & refactoring
Claus Gittinger <cg@exept.de>
parents: 2084
diff changeset
    49
	instanceVariableNames:'methodClass methodSelector'
37ea7570cd6b code cleanup & refactoring
Claus Gittinger <cg@exept.de>
parents: 2084
diff changeset
    50
	classVariableNames:''
37ea7570cd6b code cleanup & refactoring
Claus Gittinger <cg@exept.de>
parents: 2084
diff changeset
    51
	poolDictionaries:''
37ea7570cd6b code cleanup & refactoring
Claus Gittinger <cg@exept.de>
parents: 2084
diff changeset
    52
	privateIn:ToolApplicationModel
37ea7570cd6b code cleanup & refactoring
Claus Gittinger <cg@exept.de>
parents: 2084
diff changeset
    53
!
37ea7570cd6b code cleanup & refactoring
Claus Gittinger <cg@exept.de>
parents: 2084
diff changeset
    54
753
9c837d99f109 intitial checkin
tz
parents:
diff changeset
    55
!ToolApplicationModel class methodsFor:'documentation'!
9c837d99f109 intitial checkin
tz
parents:
diff changeset
    56
756
4dba5a8797ec *** empty log message ***
tz
parents: 753
diff changeset
    57
copyright
4dba5a8797ec *** empty log message ***
tz
parents: 753
diff changeset
    58
"
784
b08b05900f30 copyright changed
tz
parents: 783
diff changeset
    59
 COPYRIGHT (c) 1997 by eXept Software AG
756
4dba5a8797ec *** empty log message ***
tz
parents: 753
diff changeset
    60
              All Rights Reserved
4dba5a8797ec *** empty log message ***
tz
parents: 753
diff changeset
    61
4dba5a8797ec *** empty log message ***
tz
parents: 753
diff changeset
    62
 This software is furnished under a license and may be used
4dba5a8797ec *** empty log message ***
tz
parents: 753
diff changeset
    63
 only in accordance with the terms of that license and with the
4dba5a8797ec *** empty log message ***
tz
parents: 753
diff changeset
    64
 inclusion of the above copyright notice. This software may not
4dba5a8797ec *** empty log message ***
tz
parents: 753
diff changeset
    65
 be provided or otherwise made available to, or used by, any
4dba5a8797ec *** empty log message ***
tz
parents: 753
diff changeset
    66
 other person. No title to or ownership of the software is
4dba5a8797ec *** empty log message ***
tz
parents: 753
diff changeset
    67
 hereby transferred.
4dba5a8797ec *** empty log message ***
tz
parents: 753
diff changeset
    68
"
4dba5a8797ec *** empty log message ***
tz
parents: 753
diff changeset
    69
4dba5a8797ec *** empty log message ***
tz
parents: 753
diff changeset
    70
4dba5a8797ec *** empty log message ***
tz
parents: 753
diff changeset
    71
!
4dba5a8797ec *** empty log message ***
tz
parents: 753
diff changeset
    72
753
9c837d99f109 intitial checkin
tz
parents:
diff changeset
    73
documentation
9c837d99f109 intitial checkin
tz
parents:
diff changeset
    74
"
1200
a86be4f3fd69 added clearModifiedFlag
Claus Gittinger <cg@exept.de>
parents: 1195
diff changeset
    75
    Framework class for tool applications (UIPainter, MenuEditor etc.).
a86be4f3fd69 added clearModifiedFlag
Claus Gittinger <cg@exept.de>
parents: 1195
diff changeset
    76
    Provides hooks for modifiedChannels, history management,
782
5b8c4cf62cb5 activeHelp changed as instClassVar + some other cleans
tz
parents: 779
diff changeset
    77
    showing help texts, about menu, help menu etc.
753
9c837d99f109 intitial checkin
tz
parents:
diff changeset
    78
9c837d99f109 intitial checkin
tz
parents:
diff changeset
    79
    [author:]
876
585929b1fec2 some cleans
tz
parents: 872
diff changeset
    80
        Thomas Zwick, eXept Software AG
753
9c837d99f109 intitial checkin
tz
parents:
diff changeset
    81
"
9c837d99f109 intitial checkin
tz
parents:
diff changeset
    82
! !
9c837d99f109 intitial checkin
tz
parents:
diff changeset
    83
9c837d99f109 intitial checkin
tz
parents:
diff changeset
    84
!ToolApplicationModel class methodsFor:'accessing'!
9c837d99f109 intitial checkin
tz
parents:
diff changeset
    85
1150
5211197a2671 NEVER - redefine allInstances
Claus Gittinger <cg@exept.de>
parents: 1148
diff changeset
    86
allToolInstances
1089
49b05d386ccc removed Thomas's memory leak
Claus Gittinger <cg@exept.de>
parents: 1084
diff changeset
    87
    ^ instances ? #()
49b05d386ccc removed Thomas's memory leak
Claus Gittinger <cg@exept.de>
parents: 1084
diff changeset
    88
49b05d386ccc removed Thomas's memory leak
Claus Gittinger <cg@exept.de>
parents: 1084
diff changeset
    89
    "Created: / 4.2.1999 / 15:34:55 / cg"
49b05d386ccc removed Thomas's memory leak
Claus Gittinger <cg@exept.de>
parents: 1084
diff changeset
    90
!
49b05d386ccc removed Thomas's memory leak
Claus Gittinger <cg@exept.de>
parents: 1084
diff changeset
    91
800
b98050cf7a43 better author extraction.
Claus Gittinger <cg@exept.de>
parents: 799
diff changeset
    92
authorLinesForAboutBox
907
f4087882555a method comments added
tz
parents: 893
diff changeset
    93
    "extracts the author(s) from the documentation method."
800
b98050cf7a43 better author extraction.
Claus Gittinger <cg@exept.de>
parents: 799
diff changeset
    94
2266
2f9a3d9320a7 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2140
diff changeset
    95
    |firstClassWithDocumentation docMethod src s line lines|
753
9c837d99f109 intitial checkin
tz
parents:
diff changeset
    96
1555
ba83d682d20a implements -> includesSelector
Claus Gittinger <cg@exept.de>
parents: 1545
diff changeset
    97
    firstClassWithDocumentation := self class withAllSuperclasses detect:[:metacls| metacls includesSelector:#documentation].
800
b98050cf7a43 better author extraction.
Claus Gittinger <cg@exept.de>
parents: 799
diff changeset
    98
    firstClassWithDocumentation notNil ifTrue:[
b98050cf7a43 better author extraction.
Claus Gittinger <cg@exept.de>
parents: 799
diff changeset
    99
        (firstClassWithDocumentation inheritsFrom:ToolApplicationModel class) ifTrue:[
2266
2f9a3d9320a7 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2140
diff changeset
   100
            docMethod := firstClassWithDocumentation compiledMethodAt:#documentation.
2f9a3d9320a7 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2140
diff changeset
   101
            docMethod notNil ifTrue:[
2f9a3d9320a7 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2140
diff changeset
   102
                src := docMethod source.
2f9a3d9320a7 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2140
diff changeset
   103
                src notNil ifTrue:[
2f9a3d9320a7 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2140
diff changeset
   104
                    s := src readStream.
3296
e05e84f3d3ca class: ToolApplicationModel
Stefan Vogel <sv@exept.de>
parents: 3280
diff changeset
   105
                    s upToAllExcluding:'[author:]'.
2266
2f9a3d9320a7 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2140
diff changeset
   106
                    s nextLine.   "/ skip to end
2f9a3d9320a7 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2140
diff changeset
   107
                    line := s nextLine.   "/ line after [author:]
2f9a3d9320a7 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2140
diff changeset
   108
                    lines := OrderedCollection new.
2f9a3d9320a7 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2140
diff changeset
   109
                    [line notEmptyOrNil] whileTrue:[
2f9a3d9320a7 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2140
diff changeset
   110
                        line := line withoutSeparators.
2f9a3d9320a7 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2140
diff changeset
   111
                        line size > 1 ifTrue:[
2f9a3d9320a7 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2140
diff changeset
   112
                            lines add:line withoutSeparators.
2f9a3d9320a7 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2140
diff changeset
   113
                            line := s nextLine.
2f9a3d9320a7 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2140
diff changeset
   114
                        ] ifFalse:[
2f9a3d9320a7 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2140
diff changeset
   115
                            line := nil
2f9a3d9320a7 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2140
diff changeset
   116
                        ]
2f9a3d9320a7 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2140
diff changeset
   117
                    ].
2f9a3d9320a7 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2140
diff changeset
   118
                    ^ lines.
2f9a3d9320a7 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2140
diff changeset
   119
                ]
800
b98050cf7a43 better author extraction.
Claus Gittinger <cg@exept.de>
parents: 799
diff changeset
   120
            ]
b98050cf7a43 better author extraction.
Claus Gittinger <cg@exept.de>
parents: 799
diff changeset
   121
        ]
b98050cf7a43 better author extraction.
Claus Gittinger <cg@exept.de>
parents: 799
diff changeset
   122
    ].
2266
2f9a3d9320a7 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2140
diff changeset
   123
    ( #('stx' 'exept') includes:self class package asPackageId module) ifTrue:[
2f9a3d9320a7 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2140
diff changeset
   124
        ^ #('eXept Software AG')
2f9a3d9320a7 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2140
diff changeset
   125
    ].
800
b98050cf7a43 better author extraction.
Claus Gittinger <cg@exept.de>
parents: 799
diff changeset
   126
2266
2f9a3d9320a7 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2140
diff changeset
   127
    ^ #('?')
2f9a3d9320a7 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2140
diff changeset
   128
2f9a3d9320a7 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2140
diff changeset
   129
    "Created: / 01-02-1998 / 15:41:43 / cg"
2f9a3d9320a7 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2140
diff changeset
   130
    "Modified: / 25-10-2006 / 17:29:35 / cg"
753
9c837d99f109 intitial checkin
tz
parents:
diff changeset
   131
!
9c837d99f109 intitial checkin
tz
parents:
diff changeset
   132
1089
49b05d386ccc removed Thomas's memory leak
Claus Gittinger <cg@exept.de>
parents: 1084
diff changeset
   133
forgetInstance:anInstance
2121
aaa63f6a0025 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2108
diff changeset
   134
    instances notNil ifTrue:[
aaa63f6a0025 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2108
diff changeset
   135
        instances remove:anInstance ifAbsent:[].
3196
b497c2b5867d class: ToolApplicationModel
Claus Gittinger <cg@exept.de>
parents: 3107
diff changeset
   136
        instances := instances asNilIfEmpty.
2121
aaa63f6a0025 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2108
diff changeset
   137
    ].
1089
49b05d386ccc removed Thomas's memory leak
Claus Gittinger <cg@exept.de>
parents: 1084
diff changeset
   138
49b05d386ccc removed Thomas's memory leak
Claus Gittinger <cg@exept.de>
parents: 1084
diff changeset
   139
    "Modified: / 4.2.1999 / 15:38:49 / cg"
49b05d386ccc removed Thomas's memory leak
Claus Gittinger <cg@exept.de>
parents: 1084
diff changeset
   140
!
49b05d386ccc removed Thomas's memory leak
Claus Gittinger <cg@exept.de>
parents: 1084
diff changeset
   141
753
9c837d99f109 intitial checkin
tz
parents:
diff changeset
   142
label
1018
7222534cb3dc part of the activeHelp framework moved to ApplicationModel.
Claus Gittinger <cg@exept.de>
parents: 1016
diff changeset
   143
    "returns the label for the tool instances of this class;
907
f4087882555a method comments added
tz
parents: 893
diff changeset
   144
     extracted from the class name;
f4087882555a method comments added
tz
parents: 893
diff changeset
   145
     can be redefined in subclasses"
753
9c837d99f109 intitial checkin
tz
parents:
diff changeset
   146
9c837d99f109 intitial checkin
tz
parents:
diff changeset
   147
    |label|
9c837d99f109 intitial checkin
tz
parents:
diff changeset
   148
    label := ''.
9c837d99f109 intitial checkin
tz
parents:
diff changeset
   149
    self name do:
9c837d99f109 intitial checkin
tz
parents:
diff changeset
   150
    [:c|
9c837d99f109 intitial checkin
tz
parents:
diff changeset
   151
        c isUppercase ifTrue: [label := label, $ ].
9c837d99f109 intitial checkin
tz
parents:
diff changeset
   152
        label := label, c
9c837d99f109 intitial checkin
tz
parents:
diff changeset
   153
    ].
9c837d99f109 intitial checkin
tz
parents:
diff changeset
   154
    ^label trimBlanks
1018
7222534cb3dc part of the activeHelp framework moved to ApplicationModel.
Claus Gittinger <cg@exept.de>
parents: 1016
diff changeset
   155
7222534cb3dc part of the activeHelp framework moved to ApplicationModel.
Claus Gittinger <cg@exept.de>
parents: 1016
diff changeset
   156
    "Modified: / 31.7.1998 / 18:04:18 / cg"
782
5b8c4cf62cb5 activeHelp changed as instClassVar + some other cleans
tz
parents: 779
diff changeset
   157
!
5b8c4cf62cb5 activeHelp changed as instClassVar + some other cleans
tz
parents: 779
diff changeset
   158
1089
49b05d386ccc removed Thomas's memory leak
Claus Gittinger <cg@exept.de>
parents: 1084
diff changeset
   159
rememberInstance:anInstance
49b05d386ccc removed Thomas's memory leak
Claus Gittinger <cg@exept.de>
parents: 1084
diff changeset
   160
    instances isNil ifTrue:[
49b05d386ccc removed Thomas's memory leak
Claus Gittinger <cg@exept.de>
parents: 1084
diff changeset
   161
        instances := WeakIdentitySet new
49b05d386ccc removed Thomas's memory leak
Claus Gittinger <cg@exept.de>
parents: 1084
diff changeset
   162
    ].
49b05d386ccc removed Thomas's memory leak
Claus Gittinger <cg@exept.de>
parents: 1084
diff changeset
   163
    instances add:anInstance
49b05d386ccc removed Thomas's memory leak
Claus Gittinger <cg@exept.de>
parents: 1084
diff changeset
   164
49b05d386ccc removed Thomas's memory leak
Claus Gittinger <cg@exept.de>
parents: 1084
diff changeset
   165
    "Created: / 4.2.1999 / 15:33:43 / cg"
49b05d386ccc removed Thomas's memory leak
Claus Gittinger <cg@exept.de>
parents: 1084
diff changeset
   166
    "Modified: / 4.2.1999 / 15:34:14 / cg"
49b05d386ccc removed Thomas's memory leak
Claus Gittinger <cg@exept.de>
parents: 1084
diff changeset
   167
!
49b05d386ccc removed Thomas's memory leak
Claus Gittinger <cg@exept.de>
parents: 1084
diff changeset
   168
850
cdf5ecf904e2 some obselete icons removed
tz
parents: 846
diff changeset
   169
settings
907
f4087882555a method comments added
tz
parents: 893
diff changeset
   170
    "returns the settings dictionary"
850
cdf5ecf904e2 some obselete icons removed
tz
parents: 846
diff changeset
   171
872
a1606dcbd38b better font setting routines
tz
parents: 871
diff changeset
   172
    settings isNil ifTrue: [settings := IdentityDictionary new].
a1606dcbd38b better font setting routines
tz
parents: 871
diff changeset
   173
    ^settings
850
cdf5ecf904e2 some obselete icons removed
tz
parents: 846
diff changeset
   174
!
cdf5ecf904e2 some obselete icons removed
tz
parents: 846
diff changeset
   175
1018
7222534cb3dc part of the activeHelp framework moved to ApplicationModel.
Claus Gittinger <cg@exept.de>
parents: 1016
diff changeset
   176
showingHelp
7222534cb3dc part of the activeHelp framework moved to ApplicationModel.
Claus Gittinger <cg@exept.de>
parents: 1016
diff changeset
   177
    "returns true if active help is turned on for instances of this class"
782
5b8c4cf62cb5 activeHelp changed as instClassVar + some other cleans
tz
parents: 779
diff changeset
   178
2919
b21470d5e318 changed:
Claus Gittinger <cg@exept.de>
parents: 2907
diff changeset
   179
    "/ cg: the default is now false - we use flyByHelp now, not the info-area help
b21470d5e318 changed:
Claus Gittinger <cg@exept.de>
parents: 2907
diff changeset
   180
    showingHelp isNil ifTrue: [showingHelp := false].
1018
7222534cb3dc part of the activeHelp framework moved to ApplicationModel.
Claus Gittinger <cg@exept.de>
parents: 1016
diff changeset
   181
    ^showingHelp
7222534cb3dc part of the activeHelp framework moved to ApplicationModel.
Claus Gittinger <cg@exept.de>
parents: 1016
diff changeset
   182
2919
b21470d5e318 changed:
Claus Gittinger <cg@exept.de>
parents: 2907
diff changeset
   183
    "
b21470d5e318 changed:
Claus Gittinger <cg@exept.de>
parents: 2907
diff changeset
   184
     self withAllSubclassesDo:[:cls | cls showingHelp:false]
b21470d5e318 changed:
Claus Gittinger <cg@exept.de>
parents: 2907
diff changeset
   185
     WorkspaceApplication showingHelp
b21470d5e318 changed:
Claus Gittinger <cg@exept.de>
parents: 2907
diff changeset
   186
    "
b21470d5e318 changed:
Claus Gittinger <cg@exept.de>
parents: 2907
diff changeset
   187
b21470d5e318 changed:
Claus Gittinger <cg@exept.de>
parents: 2907
diff changeset
   188
    "Created: / 31-07-1998 / 18:03:38 / cg"
b21470d5e318 changed:
Claus Gittinger <cg@exept.de>
parents: 2907
diff changeset
   189
    "Modified (comment): / 06-07-2011 / 18:01:13 / cg"
782
5b8c4cf62cb5 activeHelp changed as instClassVar + some other cleans
tz
parents: 779
diff changeset
   190
!
5b8c4cf62cb5 activeHelp changed as instClassVar + some other cleans
tz
parents: 779
diff changeset
   191
1018
7222534cb3dc part of the activeHelp framework moved to ApplicationModel.
Claus Gittinger <cg@exept.de>
parents: 1016
diff changeset
   192
showingHelp: aBoolean
7222534cb3dc part of the activeHelp framework moved to ApplicationModel.
Claus Gittinger <cg@exept.de>
parents: 1016
diff changeset
   193
    "enable/disable active help for instances of this class"
782
5b8c4cf62cb5 activeHelp changed as instClassVar + some other cleans
tz
parents: 779
diff changeset
   194
3280
44c1d175546c class: ToolApplicationModel
Claus Gittinger <cg@exept.de>
parents: 3196
diff changeset
   195
    showingHelp := aBoolean
1018
7222534cb3dc part of the activeHelp framework moved to ApplicationModel.
Claus Gittinger <cg@exept.de>
parents: 1016
diff changeset
   196
2919
b21470d5e318 changed:
Claus Gittinger <cg@exept.de>
parents: 2907
diff changeset
   197
    "
b21470d5e318 changed:
Claus Gittinger <cg@exept.de>
parents: 2907
diff changeset
   198
     self withAllSubclassesDo:[:cls | cls showingHelp:false]
b21470d5e318 changed:
Claus Gittinger <cg@exept.de>
parents: 2907
diff changeset
   199
    "
b21470d5e318 changed:
Claus Gittinger <cg@exept.de>
parents: 2907
diff changeset
   200
b21470d5e318 changed:
Claus Gittinger <cg@exept.de>
parents: 2907
diff changeset
   201
    "Modified: / 31-07-1998 / 18:17:14 / cg"
b21470d5e318 changed:
Claus Gittinger <cg@exept.de>
parents: 2907
diff changeset
   202
    "Modified (comment): / 06-07-2011 / 17:54:13 / cg"
753
9c837d99f109 intitial checkin
tz
parents:
diff changeset
   203
! !
9c837d99f109 intitial checkin
tz
parents:
diff changeset
   204
756
4dba5a8797ec *** empty log message ***
tz
parents: 753
diff changeset
   205
!ToolApplicationModel class methodsFor:'clipboard'!
4dba5a8797ec *** empty log message ***
tz
parents: 753
diff changeset
   206
4dba5a8797ec *** empty log message ***
tz
parents: 753
diff changeset
   207
clipboard
907
f4087882555a method comments added
tz
parents: 893
diff changeset
   208
    "returns the clipboard of this tool class"
756
4dba5a8797ec *** empty log message ***
tz
parents: 753
diff changeset
   209
4dba5a8797ec *** empty log message ***
tz
parents: 753
diff changeset
   210
    ^clipboard
4dba5a8797ec *** empty log message ***
tz
parents: 753
diff changeset
   211
!
4dba5a8797ec *** empty log message ***
tz
parents: 753
diff changeset
   212
4dba5a8797ec *** empty log message ***
tz
parents: 753
diff changeset
   213
clipboard: anEditObject
907
f4087882555a method comments added
tz
parents: 893
diff changeset
   214
    "sets the clipboard for this tool class"
756
4dba5a8797ec *** empty log message ***
tz
parents: 753
diff changeset
   215
4dba5a8797ec *** empty log message ***
tz
parents: 753
diff changeset
   216
    clipboard := anEditObject
4dba5a8797ec *** empty log message ***
tz
parents: 753
diff changeset
   217
! !
4dba5a8797ec *** empty log message ***
tz
parents: 753
diff changeset
   218
1043
32cd5ccbd94f made openAboutSTX a class method for sharability.
Claus Gittinger <cg@exept.de>
parents: 1040
diff changeset
   219
!ToolApplicationModel class methodsFor:'help'!
32cd5ccbd94f made openAboutSTX a class method for sharability.
Claus Gittinger <cg@exept.de>
parents: 1040
diff changeset
   220
32cd5ccbd94f made openAboutSTX a class method for sharability.
Claus Gittinger <cg@exept.de>
parents: 1040
diff changeset
   221
openAboutSTX
32cd5ccbd94f made openAboutSTX a class method for sharability.
Claus Gittinger <cg@exept.de>
parents: 1040
diff changeset
   222
    "opens an about box (on ST/X)"
32cd5ccbd94f made openAboutSTX a class method for sharability.
Claus Gittinger <cg@exept.de>
parents: 1040
diff changeset
   223
32cd5ccbd94f made openAboutSTX a class method for sharability.
Claus Gittinger <cg@exept.de>
parents: 1040
diff changeset
   224
    |box|
32cd5ccbd94f made openAboutSTX a class method for sharability.
Claus Gittinger <cg@exept.de>
parents: 1040
diff changeset
   225
32cd5ccbd94f made openAboutSTX a class method for sharability.
Claus Gittinger <cg@exept.de>
parents: 1040
diff changeset
   226
    AboutBox isNil ifTrue:[
32cd5ccbd94f made openAboutSTX a class method for sharability.
Claus Gittinger <cg@exept.de>
parents: 1040
diff changeset
   227
        "/ this handles bad installations of ST/X,
32cd5ccbd94f made openAboutSTX a class method for sharability.
Claus Gittinger <cg@exept.de>
parents: 1040
diff changeset
   228
        "/ where the AboutBox is missing.
32cd5ccbd94f made openAboutSTX a class method for sharability.
Claus Gittinger <cg@exept.de>
parents: 1040
diff changeset
   229
        "/ (May vanish in the future)
32cd5ccbd94f made openAboutSTX a class method for sharability.
Claus Gittinger <cg@exept.de>
parents: 1040
diff changeset
   230
        ^ self information:('Smalltalk/X rev.' , Smalltalk versionString)
32cd5ccbd94f made openAboutSTX a class method for sharability.
Claus Gittinger <cg@exept.de>
parents: 1040
diff changeset
   231
    ].
32cd5ccbd94f made openAboutSTX a class method for sharability.
Claus Gittinger <cg@exept.de>
parents: 1040
diff changeset
   232
32cd5ccbd94f made openAboutSTX a class method for sharability.
Claus Gittinger <cg@exept.de>
parents: 1040
diff changeset
   233
    box := AboutBox new.
32cd5ccbd94f made openAboutSTX a class method for sharability.
Claus Gittinger <cg@exept.de>
parents: 1040
diff changeset
   234
    box autoHideAfter:10 with:[].
1091
6816bfce45a3 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1089
diff changeset
   235
    box showAtCenter
6816bfce45a3 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1089
diff changeset
   236
"/    box showAtPointer
1043
32cd5ccbd94f made openAboutSTX a class method for sharability.
Claus Gittinger <cg@exept.de>
parents: 1040
diff changeset
   237
32cd5ccbd94f made openAboutSTX a class method for sharability.
Claus Gittinger <cg@exept.de>
parents: 1040
diff changeset
   238
    "Modified: / 14.8.1998 / 13:03:58 / cg"
32cd5ccbd94f made openAboutSTX a class method for sharability.
Claus Gittinger <cg@exept.de>
parents: 1040
diff changeset
   239
    "Created: / 14.8.1998 / 13:17:43 / cg"
32cd5ccbd94f made openAboutSTX a class method for sharability.
Claus Gittinger <cg@exept.de>
parents: 1040
diff changeset
   240
! !
32cd5ccbd94f made openAboutSTX a class method for sharability.
Claus Gittinger <cg@exept.de>
parents: 1040
diff changeset
   241
762
2c25cc1b363e detour help texts into bottomed info label
tz
parents: 761
diff changeset
   242
!ToolApplicationModel class methodsFor:'help specs'!
2c25cc1b363e detour help texts into bottomed info label
tz
parents: 761
diff changeset
   243
2c25cc1b363e detour help texts into bottomed info label
tz
parents: 761
diff changeset
   244
helpSpec
869
b1815e3116c6 font can be chosen for the views
tz
parents: 859
diff changeset
   245
    "This resource specification was automatically generated
b1815e3116c6 font can be chosen for the views
tz
parents: 859
diff changeset
   246
     by the UIHelpTool of ST/X."
b1815e3116c6 font can be chosen for the views
tz
parents: 859
diff changeset
   247
b1815e3116c6 font can be chosen for the views
tz
parents: 859
diff changeset
   248
    "Do not manually edit this!! If it is corrupted,
b1815e3116c6 font can be chosen for the views
tz
parents: 859
diff changeset
   249
     the UIHelpTool may not be able to read the specification."
762
2c25cc1b363e detour help texts into bottomed info label
tz
parents: 761
diff changeset
   250
2c25cc1b363e detour help texts into bottomed info label
tz
parents: 761
diff changeset
   251
    "
3822
b513fec53287 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 3680
diff changeset
   252
     UIHelpTool openOnClass:ToolApplicationModel
762
2c25cc1b363e detour help texts into bottomed info label
tz
parents: 761
diff changeset
   253
    "
2c25cc1b363e detour help texts into bottomed info label
tz
parents: 761
diff changeset
   254
869
b1815e3116c6 font can be chosen for the views
tz
parents: 859
diff changeset
   255
    <resource: #help>
b1815e3116c6 font can be chosen for the views
tz
parents: 859
diff changeset
   256
3822
b513fec53287 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 3680
diff changeset
   257
    ^ super helpSpec addPairsFrom:#(
762
2c25cc1b363e detour help texts into bottomed info label
tz
parents: 761
diff changeset
   258
2c25cc1b363e detour help texts into bottomed info label
tz
parents: 761
diff changeset
   259
#aboutSTX
3107
6343bde3fc47 tooltips
Claus Gittinger <cg@exept.de>
parents: 3024
diff changeset
   260
'Info about the running ST/X'
762
2c25cc1b363e detour help texts into bottomed info label
tz
parents: 761
diff changeset
   261
2c25cc1b363e detour help texts into bottomed info label
tz
parents: 761
diff changeset
   262
#aboutThisAppliaction
3107
6343bde3fc47 tooltips
Claus Gittinger <cg@exept.de>
parents: 3024
diff changeset
   263
'Info about that applications release and author'
762
2c25cc1b363e detour help texts into bottomed info label
tz
parents: 761
diff changeset
   264
823
d812eae12888 help texts added
tz
parents: 822
diff changeset
   265
#add
3107
6343bde3fc47 tooltips
Claus Gittinger <cg@exept.de>
parents: 3024
diff changeset
   266
'Add functions'
823
d812eae12888 help texts added
tz
parents: 822
diff changeset
   267
3822
b513fec53287 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 3680
diff changeset
   268
#addTab
b513fec53287 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 3680
diff changeset
   269
'Add another page (tab)'
b513fec53287 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 3680
diff changeset
   270
823
d812eae12888 help texts added
tz
parents: 822
diff changeset
   271
#commitCancel
3107
6343bde3fc47 tooltips
Claus Gittinger <cg@exept.de>
parents: 3024
diff changeset
   272
'Cancel changes'
823
d812eae12888 help texts added
tz
parents: 822
diff changeset
   273
d812eae12888 help texts added
tz
parents: 822
diff changeset
   274
#commitOK
3107
6343bde3fc47 tooltips
Claus Gittinger <cg@exept.de>
parents: 3024
diff changeset
   275
'Commit changes'
823
d812eae12888 help texts added
tz
parents: 822
diff changeset
   276
d812eae12888 help texts added
tz
parents: 822
diff changeset
   277
#edit
3107
6343bde3fc47 tooltips
Claus Gittinger <cg@exept.de>
parents: 3024
diff changeset
   278
'Edit functions'
823
d812eae12888 help texts added
tz
parents: 822
diff changeset
   279
d812eae12888 help texts added
tz
parents: 822
diff changeset
   280
#editCopy
3107
6343bde3fc47 tooltips
Claus Gittinger <cg@exept.de>
parents: 3024
diff changeset
   281
'Copy the selected item(s) to the clipboard'
762
2c25cc1b363e detour help texts into bottomed info label
tz
parents: 761
diff changeset
   282
782
5b8c4cf62cb5 activeHelp changed as instClassVar + some other cleans
tz
parents: 779
diff changeset
   283
#editCut
3107
6343bde3fc47 tooltips
Claus Gittinger <cg@exept.de>
parents: 3024
diff changeset
   284
'Cut the selected item(s) to the clipboard'
853
19f2d0152fcb time clock only for the launcher
tz
parents: 851
diff changeset
   285
19f2d0152fcb time clock only for the launcher
tz
parents: 851
diff changeset
   286
#editDelete
3107
6343bde3fc47 tooltips
Claus Gittinger <cg@exept.de>
parents: 3024
diff changeset
   287
'Delete the selected item(s)'
782
5b8c4cf62cb5 activeHelp changed as instClassVar + some other cleans
tz
parents: 779
diff changeset
   288
4046
d0fc0a81e0ae #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 4023
diff changeset
   289
#editSearch
d0fc0a81e0ae #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 4023
diff changeset
   290
'Search'
d0fc0a81e0ae #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 4023
diff changeset
   291
823
d812eae12888 help texts added
tz
parents: 822
diff changeset
   292
#editMoveDown
3107
6343bde3fc47 tooltips
Claus Gittinger <cg@exept.de>
parents: 3024
diff changeset
   293
'Move the selected item one step down (in the order list)'
823
d812eae12888 help texts added
tz
parents: 822
diff changeset
   294
d812eae12888 help texts added
tz
parents: 822
diff changeset
   295
#editMoveIn
3107
6343bde3fc47 tooltips
Claus Gittinger <cg@exept.de>
parents: 3024
diff changeset
   296
'Move the selected item into the next item (as child item)'
1471
50775b15e283 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1427
diff changeset
   297
50775b15e283 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1427
diff changeset
   298
#editMoveInAbove
3107
6343bde3fc47 tooltips
Claus Gittinger <cg@exept.de>
parents: 3024
diff changeset
   299
'Move the selected item into the previous item (as child item)'
823
d812eae12888 help texts added
tz
parents: 822
diff changeset
   300
d812eae12888 help texts added
tz
parents: 822
diff changeset
   301
#editMoveOut
3107
6343bde3fc47 tooltips
Claus Gittinger <cg@exept.de>
parents: 3024
diff changeset
   302
'Move the selected item out of its parent item'
823
d812eae12888 help texts added
tz
parents: 822
diff changeset
   303
d812eae12888 help texts added
tz
parents: 822
diff changeset
   304
#editMoveUp
3107
6343bde3fc47 tooltips
Claus Gittinger <cg@exept.de>
parents: 3024
diff changeset
   305
'Move the selected item one step up (in the order list)'
782
5b8c4cf62cb5 activeHelp changed as instClassVar + some other cleans
tz
parents: 779
diff changeset
   306
5b8c4cf62cb5 activeHelp changed as instClassVar + some other cleans
tz
parents: 779
diff changeset
   307
#editPaste
3107
6343bde3fc47 tooltips
Claus Gittinger <cg@exept.de>
parents: 3024
diff changeset
   308
'Paste from the clipboard'
782
5b8c4cf62cb5 activeHelp changed as instClassVar + some other cleans
tz
parents: 779
diff changeset
   309
3822
b513fec53287 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 3680
diff changeset
   310
#editRedo
b513fec53287 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 3680
diff changeset
   311
'Redo the last undone action'
b513fec53287 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 3680
diff changeset
   312
782
5b8c4cf62cb5 activeHelp changed as instClassVar + some other cleans
tz
parents: 779
diff changeset
   313
#editUndo
3107
6343bde3fc47 tooltips
Claus Gittinger <cg@exept.de>
parents: 3024
diff changeset
   314
'Undo the last action'
782
5b8c4cf62cb5 activeHelp changed as instClassVar + some other cleans
tz
parents: 779
diff changeset
   315
823
d812eae12888 help texts added
tz
parents: 822
diff changeset
   316
#fileBrowseClass
3107
6343bde3fc47 tooltips
Claus Gittinger <cg@exept.de>
parents: 3024
diff changeset
   317
'Open a System Browser on the current class'
805
d4c4ee3bb474 now, help menu is very rudimentarily
tz
parents: 804
diff changeset
   318
823
d812eae12888 help texts added
tz
parents: 822
diff changeset
   319
#fileDefineClass
3107
6343bde3fc47 tooltips
Claus Gittinger <cg@exept.de>
parents: 3024
diff changeset
   320
'Open a dialog to define the current class'
805
d4c4ee3bb474 now, help menu is very rudimentarily
tz
parents: 804
diff changeset
   321
d4c4ee3bb474 now, help menu is very rudimentarily
tz
parents: 804
diff changeset
   322
#fileDefineClassAndSelector
3107
6343bde3fc47 tooltips
Claus Gittinger <cg@exept.de>
parents: 3024
diff changeset
   323
'Open a dialog to define the current class and selector'
805
d4c4ee3bb474 now, help menu is very rudimentarily
tz
parents: 804
diff changeset
   324
823
d812eae12888 help texts added
tz
parents: 822
diff changeset
   325
#fileExit
3107
6343bde3fc47 tooltips
Claus Gittinger <cg@exept.de>
parents: 3024
diff changeset
   326
'Exit this application'
823
d812eae12888 help texts added
tz
parents: 822
diff changeset
   327
922
94a40763e3bf checkin from browser
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
   328
#generate
3107
6343bde3fc47 tooltips
Claus Gittinger <cg@exept.de>
parents: 3024
diff changeset
   329
'Code generation'
922
94a40763e3bf checkin from browser
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
   330
876
585929b1fec2 some cleans
tz
parents: 872
diff changeset
   331
#helpHelpTool
3107
6343bde3fc47 tooltips
Claus Gittinger <cg@exept.de>
parents: 3024
diff changeset
   332
'Show the Help Tools documentation'
876
585929b1fec2 some cleans
tz
parents: 872
diff changeset
   333
823
d812eae12888 help texts added
tz
parents: 822
diff changeset
   334
#helpShowHelp
3107
6343bde3fc47 tooltips
Claus Gittinger <cg@exept.de>
parents: 3024
diff changeset
   335
'Toggle display of help texts'
823
d812eae12888 help texts added
tz
parents: 822
diff changeset
   336
d812eae12888 help texts added
tz
parents: 822
diff changeset
   337
#helpTutorial
3107
6343bde3fc47 tooltips
Claus Gittinger <cg@exept.de>
parents: 3024
diff changeset
   338
'Show this applications documentation'
823
d812eae12888 help texts added
tz
parents: 822
diff changeset
   339
d812eae12888 help texts added
tz
parents: 822
diff changeset
   340
#history
3107
6343bde3fc47 tooltips
Claus Gittinger <cg@exept.de>
parents: 3024
diff changeset
   341
'History functions'
803
f6ca4eb5da39 help texts for the history added
tz
parents: 802
diff changeset
   342
f6ca4eb5da39 help texts for the history added
tz
parents: 802
diff changeset
   343
#historyEmptyMenu
3107
6343bde3fc47 tooltips
Claus Gittinger <cg@exept.de>
parents: 3024
diff changeset
   344
'Clear the history'
803
f6ca4eb5da39 help texts for the history added
tz
parents: 802
diff changeset
   345
823
d812eae12888 help texts added
tz
parents: 822
diff changeset
   346
#historyMenuItem
3107
6343bde3fc47 tooltips
Claus Gittinger <cg@exept.de>
parents: 3024
diff changeset
   347
'Switch to that item'
762
2c25cc1b363e detour help texts into bottomed info label
tz
parents: 761
diff changeset
   348
893
8a142b17a0c8 some cleans
tz
parents: 892
diff changeset
   349
#settings
3107
6343bde3fc47 tooltips
Claus Gittinger <cg@exept.de>
parents: 3024
diff changeset
   350
'Settings functions'
893
8a142b17a0c8 some cleans
tz
parents: 892
diff changeset
   351
823
d812eae12888 help texts added
tz
parents: 822
diff changeset
   352
#test
3107
6343bde3fc47 tooltips
Claus Gittinger <cg@exept.de>
parents: 3024
diff changeset
   353
'Test functions'
762
2c25cc1b363e detour help texts into bottomed info label
tz
parents: 761
diff changeset
   354
2c25cc1b363e detour help texts into bottomed info label
tz
parents: 761
diff changeset
   355
)
4116
de0efe21503e #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 4096
diff changeset
   356
de0efe21503e #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 4096
diff changeset
   357
    "Modified: / 07-06-2018 / 18:16:40 / Claus Gittinger"
762
2c25cc1b363e detour help texts into bottomed info label
tz
parents: 761
diff changeset
   358
! !
2c25cc1b363e detour help texts into bottomed info label
tz
parents: 761
diff changeset
   359
753
9c837d99f109 intitial checkin
tz
parents:
diff changeset
   360
!ToolApplicationModel class methodsFor:'history'!
9c837d99f109 intitial checkin
tz
parents:
diff changeset
   361
1969
8e8f5998d053 separate fileHistory
Claus Gittinger <cg@exept.de>
parents: 1809
diff changeset
   362
getFileHistory
8e8f5998d053 separate fileHistory
Claus Gittinger <cg@exept.de>
parents: 1809
diff changeset
   363
    "returns the file-history for this tool class"
8e8f5998d053 separate fileHistory
Claus Gittinger <cg@exept.de>
parents: 1809
diff changeset
   364
8e8f5998d053 separate fileHistory
Claus Gittinger <cg@exept.de>
parents: 1809
diff changeset
   365
    fileHistory isNil ifTrue: [fileHistory := OrderedCollection new].
8e8f5998d053 separate fileHistory
Claus Gittinger <cg@exept.de>
parents: 1809
diff changeset
   366
    ^ fileHistory
8e8f5998d053 separate fileHistory
Claus Gittinger <cg@exept.de>
parents: 1809
diff changeset
   367
!
8e8f5998d053 separate fileHistory
Claus Gittinger <cg@exept.de>
parents: 1809
diff changeset
   368
753
9c837d99f109 intitial checkin
tz
parents:
diff changeset
   369
getHistory
907
f4087882555a method comments added
tz
parents: 893
diff changeset
   370
    "returns the history for this tool class"
753
9c837d99f109 intitial checkin
tz
parents:
diff changeset
   371
761
cc0404f8aec6 #getHistory changed because here #? doesn't work correctly
tz
parents: 760
diff changeset
   372
    history isNil ifTrue: [history := OrderedCollection new].
cc0404f8aec6 #getHistory changed because here #? doesn't work correctly
tz
parents: 760
diff changeset
   373
    ^history
753
9c837d99f109 intitial checkin
tz
parents:
diff changeset
   374
9c837d99f109 intitial checkin
tz
parents:
diff changeset
   375
!
9c837d99f109 intitial checkin
tz
parents:
diff changeset
   376
9c837d99f109 intitial checkin
tz
parents:
diff changeset
   377
historyMaxSize
907
f4087882555a method comments added
tz
parents: 893
diff changeset
   378
    "returns the maximum size for the history of this tool class"
753
9c837d99f109 intitial checkin
tz
parents:
diff changeset
   379
9c837d99f109 intitial checkin
tz
parents:
diff changeset
   380
    ^10
9c837d99f109 intitial checkin
tz
parents:
diff changeset
   381
9c837d99f109 intitial checkin
tz
parents:
diff changeset
   382
! !
9c837d99f109 intitial checkin
tz
parents:
diff changeset
   383
869
b1815e3116c6 font can be chosen for the views
tz
parents: 859
diff changeset
   384
!ToolApplicationModel class methodsFor:'image specs'!
b1815e3116c6 font can be chosen for the views
tz
parents: 859
diff changeset
   385
b1815e3116c6 font can be chosen for the views
tz
parents: 859
diff changeset
   386
desktopIcon
907
f4087882555a method comments added
tz
parents: 893
diff changeset
   387
    "returns the icon used for the desktop"
869
b1815e3116c6 font can be chosen for the views
tz
parents: 859
diff changeset
   388
1054
ab639131be1f find all icons in getAllImageSelectorsFrom:(walk class hierarchy);
Claus Gittinger <cg@exept.de>
parents: 1051
diff changeset
   389
    <resource: #programImage>
ab639131be1f find all icons in getAllImageSelectorsFrom:(walk class hierarchy);
Claus Gittinger <cg@exept.de>
parents: 1051
diff changeset
   390
869
b1815e3116c6 font can be chosen for the views
tz
parents: 859
diff changeset
   391
    ^Icon
b1815e3116c6 font can be chosen for the views
tz
parents: 859
diff changeset
   392
        constantNamed:#'ToolApplicationModel desktopIcon'
b1815e3116c6 font can be chosen for the views
tz
parents: 859
diff changeset
   393
        ifAbsentPut:
b1815e3116c6 font can be chosen for the views
tz
parents: 859
diff changeset
   394
        [
b1815e3116c6 font can be chosen for the views
tz
parents: 859
diff changeset
   395
            |desktopIcon|
990
13f2fe627628 images moved to class Icon
tz
parents: 987
diff changeset
   396
            desktopIcon := Icon stxIcon.
3550
70cd2aa80a7c #REFACTORING
Stefan Vogel <sv@exept.de>
parents: 3547
diff changeset
   397
            desktopIcon magnifiedBy:Screen current preferredIconSize/desktopIcon extent
869
b1815e3116c6 font can be chosen for the views
tz
parents: 859
diff changeset
   398
        ]
b1815e3116c6 font can be chosen for the views
tz
parents: 859
diff changeset
   399
1054
ab639131be1f find all icons in getAllImageSelectorsFrom:(walk class hierarchy);
Claus Gittinger <cg@exept.de>
parents: 1051
diff changeset
   400
    "Modified: / 24.8.1998 / 21:34:38 / cg"
869
b1815e3116c6 font can be chosen for the views
tz
parents: 859
diff changeset
   401
!
b1815e3116c6 font can be chosen for the views
tz
parents: 859
diff changeset
   402
b1815e3116c6 font can be chosen for the views
tz
parents: 859
diff changeset
   403
menuIcon
907
f4087882555a method comments added
tz
parents: 893
diff changeset
   404
    "returns the icon used for the menu bar"
869
b1815e3116c6 font can be chosen for the views
tz
parents: 859
diff changeset
   405
1054
ab639131be1f find all icons in getAllImageSelectorsFrom:(walk class hierarchy);
Claus Gittinger <cg@exept.de>
parents: 1051
diff changeset
   406
    <resource: #programImage>
ab639131be1f find all icons in getAllImageSelectorsFrom:(walk class hierarchy);
Claus Gittinger <cg@exept.de>
parents: 1051
diff changeset
   407
869
b1815e3116c6 font can be chosen for the views
tz
parents: 859
diff changeset
   408
    ^Icon
b1815e3116c6 font can be chosen for the views
tz
parents: 859
diff changeset
   409
        constantNamed:#'ToolApplicationModel menuIcon'
b1815e3116c6 font can be chosen for the views
tz
parents: 859
diff changeset
   410
        ifAbsentPut:
b1815e3116c6 font can be chosen for the views
tz
parents: 859
diff changeset
   411
        [
3550
70cd2aa80a7c #REFACTORING
Stefan Vogel <sv@exept.de>
parents: 3547
diff changeset
   412
            |menuIcon|
990
13f2fe627628 images moved to class Icon
tz
parents: 987
diff changeset
   413
            menuIcon := Icon stxIcon.
3550
70cd2aa80a7c #REFACTORING
Stefan Vogel <sv@exept.de>
parents: 3547
diff changeset
   414
            menuIcon magnifiedBy: (MenuPanel defaultFont heightOn:Screen current)/menuIcon height
869
b1815e3116c6 font can be chosen for the views
tz
parents: 859
diff changeset
   415
        ]
1054
ab639131be1f find all icons in getAllImageSelectorsFrom:(walk class hierarchy);
Claus Gittinger <cg@exept.de>
parents: 1051
diff changeset
   416
ab639131be1f find all icons in getAllImageSelectorsFrom:(walk class hierarchy);
Claus Gittinger <cg@exept.de>
parents: 1051
diff changeset
   417
    "Modified: / 24.8.1998 / 21:34:33 / cg"
987
54c15a2642f6 images moved to class Icon
tz
parents: 984
diff changeset
   418
! !
869
b1815e3116c6 font can be chosen for the views
tz
parents: 859
diff changeset
   419
753
9c837d99f109 intitial checkin
tz
parents:
diff changeset
   420
!ToolApplicationModel class methodsFor:'interface specs'!
9c837d99f109 intitial checkin
tz
parents:
diff changeset
   421
797
bacf790c536d info bar subspec changed
tz
parents: 792
diff changeset
   422
windowSpecForCommit
869
b1815e3116c6 font can be chosen for the views
tz
parents: 859
diff changeset
   423
    "This resource specification was automatically generated
b1815e3116c6 font can be chosen for the views
tz
parents: 859
diff changeset
   424
     by the UIPainter of ST/X."
b1815e3116c6 font can be chosen for the views
tz
parents: 859
diff changeset
   425
b1815e3116c6 font can be chosen for the views
tz
parents: 859
diff changeset
   426
    "Do not manually edit this!! If it is corrupted,
b1815e3116c6 font can be chosen for the views
tz
parents: 859
diff changeset
   427
     the UIPainter may not be able to read the specification."
b1815e3116c6 font can be chosen for the views
tz
parents: 859
diff changeset
   428
b1815e3116c6 font can be chosen for the views
tz
parents: 859
diff changeset
   429
    "
b1815e3116c6 font can be chosen for the views
tz
parents: 859
diff changeset
   430
     UIPainter new openOnClass:ToolApplicationModel andSelector:#windowSpecForCommit
b1815e3116c6 font can be chosen for the views
tz
parents: 859
diff changeset
   431
     ToolApplicationModel new openInterface:#windowSpecForCommit
b1815e3116c6 font can be chosen for the views
tz
parents: 859
diff changeset
   432
    "
797
bacf790c536d info bar subspec changed
tz
parents: 792
diff changeset
   433
bacf790c536d info bar subspec changed
tz
parents: 792
diff changeset
   434
    <resource: #canvas>
bacf790c536d info bar subspec changed
tz
parents: 792
diff changeset
   435
1259
394ab30e07e0 OK/Cancel button spec (reverse if OK atLeft)
Claus Gittinger <cg@exept.de>
parents: 1200
diff changeset
   436
    ^ 
4023
27a1f500ec02 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 4008
diff changeset
   437
    #(FullSpec
27a1f500ec02 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 4008
diff changeset
   438
       name: windowSpecForCommit
4263
d349fa8d2945 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 4253
diff changeset
   439
       uuid: 'eb8ebdbe-761b-11e9-98ea-b8f6b1108e05'
4023
27a1f500ec02 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 4008
diff changeset
   440
       window: 
27a1f500ec02 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 4008
diff changeset
   441
      (WindowSpec
27a1f500ec02 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 4008
diff changeset
   442
         label: 'Commit Buttons'
27a1f500ec02 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 4008
diff changeset
   443
         name: 'Commit Buttons'
27a1f500ec02 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 4008
diff changeset
   444
         uuid: '443e85f0-c5a3-11e7-82f7-c42c033b4871'
27a1f500ec02 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 4008
diff changeset
   445
         min: (Point 100 22)
27a1f500ec02 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 4008
diff changeset
   446
         max: (Point 1152 900)
27a1f500ec02 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 4008
diff changeset
   447
         bounds: (Rectangle 0 0 300 60)
27a1f500ec02 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 4008
diff changeset
   448
       )
27a1f500ec02 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 4008
diff changeset
   449
       component: 
27a1f500ec02 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 4008
diff changeset
   450
      (SpecCollection
27a1f500ec02 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 4008
diff changeset
   451
         collection: (
27a1f500ec02 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 4008
diff changeset
   452
          (HorizontalPanelViewSpec
27a1f500ec02 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 4008
diff changeset
   453
             name: 'HorizontalPanel1'
27a1f500ec02 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 4008
diff changeset
   454
             layout: (LayoutFrame 0 0.0 0 0.0 0 1.0 0 1.0)
27a1f500ec02 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 4008
diff changeset
   455
             uuid: '443e8d2a-c5a3-11e7-82f7-c42c033b4871'
27a1f500ec02 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 4008
diff changeset
   456
             horizontalLayout: fitSpace
4263
d349fa8d2945 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 4253
diff changeset
   457
             verticalLayout: center
d349fa8d2945 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 4253
diff changeset
   458
             horizontalSpace: 2
d349fa8d2945 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 4253
diff changeset
   459
             verticalSpace: 1
4023
27a1f500ec02 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 4008
diff changeset
   460
             reverseOrderIfOKAtLeft: true
27a1f500ec02 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 4008
diff changeset
   461
             component: 
27a1f500ec02 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 4008
diff changeset
   462
            (SpecCollection
27a1f500ec02 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 4008
diff changeset
   463
               collection: (
27a1f500ec02 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 4008
diff changeset
   464
                (ActionButtonSpec
27a1f500ec02 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 4008
diff changeset
   465
                   label: 'Cancel'
27a1f500ec02 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 4008
diff changeset
   466
                   name: 'cancelButton'
27a1f500ec02 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 4008
diff changeset
   467
                   activeHelpKey: commitCancel
27a1f500ec02 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 4008
diff changeset
   468
                   uuid: '443e93e2-c5a3-11e7-82f7-c42c033b4871'
27a1f500ec02 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 4008
diff changeset
   469
                   translateLabel: true
27a1f500ec02 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 4008
diff changeset
   470
                   tabable: true
27a1f500ec02 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 4008
diff changeset
   471
                   model: cancel
27a1f500ec02 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 4008
diff changeset
   472
                   enableChannel: enablingCommitButtonsHolder
4263
d349fa8d2945 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 4253
diff changeset
   473
                   extent: (Point 146 30)
1259
394ab30e07e0 OK/Cancel button spec (reverse if OK atLeft)
Claus Gittinger <cg@exept.de>
parents: 1200
diff changeset
   474
                 )
4023
27a1f500ec02 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 4008
diff changeset
   475
                (ActionButtonSpec
27a1f500ec02 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 4008
diff changeset
   476
                   label: 'OK'
27a1f500ec02 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 4008
diff changeset
   477
                   name: 'okButton'
27a1f500ec02 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 4008
diff changeset
   478
                   activeHelpKey: commitOK
27a1f500ec02 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 4008
diff changeset
   479
                   uuid: '443e9bda-c5a3-11e7-82f7-c42c033b4871'
27a1f500ec02 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 4008
diff changeset
   480
                   translateLabel: true
27a1f500ec02 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 4008
diff changeset
   481
                   tabable: true
27a1f500ec02 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 4008
diff changeset
   482
                   model: accept
27a1f500ec02 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 4008
diff changeset
   483
                   enableChannel: enablingCommitButtonsHolder
4263
d349fa8d2945 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 4253
diff changeset
   484
                   extent: (Point 147 30)
4023
27a1f500ec02 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 4008
diff changeset
   485
                 )
27a1f500ec02 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 4008
diff changeset
   486
                )
27a1f500ec02 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 4008
diff changeset
   487
              
27a1f500ec02 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 4008
diff changeset
   488
             )
1259
394ab30e07e0 OK/Cancel button spec (reverse if OK atLeft)
Claus Gittinger <cg@exept.de>
parents: 1200
diff changeset
   489
           )
4023
27a1f500ec02 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 4008
diff changeset
   490
          )
27a1f500ec02 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 4008
diff changeset
   491
        
27a1f500ec02 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 4008
diff changeset
   492
       )
27a1f500ec02 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 4008
diff changeset
   493
     )
797
bacf790c536d info bar subspec changed
tz
parents: 792
diff changeset
   494
!
bacf790c536d info bar subspec changed
tz
parents: 792
diff changeset
   495
bacf790c536d info bar subspec changed
tz
parents: 792
diff changeset
   496
windowSpecForCommitWithoutChannels
869
b1815e3116c6 font can be chosen for the views
tz
parents: 859
diff changeset
   497
    "This resource specification was automatically generated
b1815e3116c6 font can be chosen for the views
tz
parents: 859
diff changeset
   498
     by the UIPainter of ST/X."
b1815e3116c6 font can be chosen for the views
tz
parents: 859
diff changeset
   499
b1815e3116c6 font can be chosen for the views
tz
parents: 859
diff changeset
   500
    "Do not manually edit this!! If it is corrupted,
b1815e3116c6 font can be chosen for the views
tz
parents: 859
diff changeset
   501
     the UIPainter may not be able to read the specification."
b1815e3116c6 font can be chosen for the views
tz
parents: 859
diff changeset
   502
b1815e3116c6 font can be chosen for the views
tz
parents: 859
diff changeset
   503
    "
b1815e3116c6 font can be chosen for the views
tz
parents: 859
diff changeset
   504
     UIPainter new openOnClass:ToolApplicationModel andSelector:#windowSpecForCommitWithoutChannels
b1815e3116c6 font can be chosen for the views
tz
parents: 859
diff changeset
   505
     ToolApplicationModel new openInterface:#windowSpecForCommitWithoutChannels
b1815e3116c6 font can be chosen for the views
tz
parents: 859
diff changeset
   506
    "
797
bacf790c536d info bar subspec changed
tz
parents: 792
diff changeset
   507
bacf790c536d info bar subspec changed
tz
parents: 792
diff changeset
   508
    <resource: #canvas>
bacf790c536d info bar subspec changed
tz
parents: 792
diff changeset
   509
1259
394ab30e07e0 OK/Cancel button spec (reverse if OK atLeft)
Claus Gittinger <cg@exept.de>
parents: 1200
diff changeset
   510
    ^ 
4023
27a1f500ec02 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 4008
diff changeset
   511
    #(FullSpec
27a1f500ec02 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 4008
diff changeset
   512
       name: windowSpecForCommitWithoutChannels
27a1f500ec02 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 4008
diff changeset
   513
       uuid: '46ec2a78-c5a3-11e7-82f7-c42c033b4871'
27a1f500ec02 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 4008
diff changeset
   514
       window: 
27a1f500ec02 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 4008
diff changeset
   515
      (WindowSpec
27a1f500ec02 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 4008
diff changeset
   516
         label: 'Commit Buttons Without Channels'
27a1f500ec02 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 4008
diff changeset
   517
         name: 'Commit Buttons Without Channels'
27a1f500ec02 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 4008
diff changeset
   518
         uuid: '46ec2e6a-c5a3-11e7-82f7-c42c033b4871'
27a1f500ec02 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 4008
diff changeset
   519
         min: (Point 100 22)
27a1f500ec02 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 4008
diff changeset
   520
         max: (Point 1152 900)
27a1f500ec02 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 4008
diff changeset
   521
         bounds: (Rectangle 0 0 300 46)
27a1f500ec02 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 4008
diff changeset
   522
       )
27a1f500ec02 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 4008
diff changeset
   523
       component: 
27a1f500ec02 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 4008
diff changeset
   524
      (SpecCollection
27a1f500ec02 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 4008
diff changeset
   525
         collection: (
27a1f500ec02 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 4008
diff changeset
   526
          (HorizontalPanelViewSpec
27a1f500ec02 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 4008
diff changeset
   527
             name: 'HorizontalPanel1'
27a1f500ec02 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 4008
diff changeset
   528
             layout: (LayoutFrame 0 0.0 0 0.0 0 1.0 0 1.0)
27a1f500ec02 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 4008
diff changeset
   529
             uuid: '46ec316c-c5a3-11e7-82f7-c42c033b4871'
27a1f500ec02 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 4008
diff changeset
   530
             horizontalLayout: fitSpace
27a1f500ec02 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 4008
diff changeset
   531
             verticalLayout: centerMax
27a1f500ec02 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 4008
diff changeset
   532
             horizontalSpace: 3
27a1f500ec02 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 4008
diff changeset
   533
             verticalSpace: 3
27a1f500ec02 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 4008
diff changeset
   534
             reverseOrderIfOKAtLeft: true
27a1f500ec02 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 4008
diff changeset
   535
             component: 
27a1f500ec02 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 4008
diff changeset
   536
            (SpecCollection
27a1f500ec02 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 4008
diff changeset
   537
               collection: (
27a1f500ec02 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 4008
diff changeset
   538
                (ActionButtonSpec
27a1f500ec02 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 4008
diff changeset
   539
                   label: 'Cancel'
27a1f500ec02 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 4008
diff changeset
   540
                   name: 'cancelButton'
27a1f500ec02 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 4008
diff changeset
   541
                   activeHelpKey: commitCancel
27a1f500ec02 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 4008
diff changeset
   542
                   uuid: '46ec3450-c5a3-11e7-82f7-c42c033b4871'
27a1f500ec02 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 4008
diff changeset
   543
                   translateLabel: true
27a1f500ec02 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 4008
diff changeset
   544
                   tabable: true
27a1f500ec02 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 4008
diff changeset
   545
                   model: cancel
27a1f500ec02 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 4008
diff changeset
   546
                   useDefaultExtent: true
1259
394ab30e07e0 OK/Cancel button spec (reverse if OK atLeft)
Claus Gittinger <cg@exept.de>
parents: 1200
diff changeset
   547
                 )
4023
27a1f500ec02 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 4008
diff changeset
   548
                (ActionButtonSpec
27a1f500ec02 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 4008
diff changeset
   549
                   label: 'OK'
27a1f500ec02 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 4008
diff changeset
   550
                   name: 'okButton'
27a1f500ec02 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 4008
diff changeset
   551
                   activeHelpKey: commitOK
27a1f500ec02 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 4008
diff changeset
   552
                   uuid: '46ec3798-c5a3-11e7-82f7-c42c033b4871'
27a1f500ec02 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 4008
diff changeset
   553
                   translateLabel: true
27a1f500ec02 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 4008
diff changeset
   554
                   tabable: true
27a1f500ec02 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 4008
diff changeset
   555
                   model: accept
27a1f500ec02 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 4008
diff changeset
   556
                   isDefault: true
27a1f500ec02 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 4008
diff changeset
   557
                   useDefaultExtent: true
27a1f500ec02 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 4008
diff changeset
   558
                 )
27a1f500ec02 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 4008
diff changeset
   559
                )
27a1f500ec02 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 4008
diff changeset
   560
              
27a1f500ec02 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 4008
diff changeset
   561
             )
1259
394ab30e07e0 OK/Cancel button spec (reverse if OK atLeft)
Claus Gittinger <cg@exept.de>
parents: 1200
diff changeset
   562
           )
4023
27a1f500ec02 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 4008
diff changeset
   563
          )
27a1f500ec02 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 4008
diff changeset
   564
        
27a1f500ec02 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 4008
diff changeset
   565
       )
27a1f500ec02 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 4008
diff changeset
   566
     )
797
bacf790c536d info bar subspec changed
tz
parents: 792
diff changeset
   567
!
bacf790c536d info bar subspec changed
tz
parents: 792
diff changeset
   568
bacf790c536d info bar subspec changed
tz
parents: 792
diff changeset
   569
windowSpecForInfoBar
869
b1815e3116c6 font can be chosen for the views
tz
parents: 859
diff changeset
   570
    "This resource specification was automatically generated
b1815e3116c6 font can be chosen for the views
tz
parents: 859
diff changeset
   571
     by the UIPainter of ST/X."
b1815e3116c6 font can be chosen for the views
tz
parents: 859
diff changeset
   572
b1815e3116c6 font can be chosen for the views
tz
parents: 859
diff changeset
   573
    "Do not manually edit this!! If it is corrupted,
b1815e3116c6 font can be chosen for the views
tz
parents: 859
diff changeset
   574
     the UIPainter may not be able to read the specification."
b1815e3116c6 font can be chosen for the views
tz
parents: 859
diff changeset
   575
b1815e3116c6 font can be chosen for the views
tz
parents: 859
diff changeset
   576
    "
b1815e3116c6 font can be chosen for the views
tz
parents: 859
diff changeset
   577
     UIPainter new openOnClass:ToolApplicationModel andSelector:#windowSpecForInfoBar
b1815e3116c6 font can be chosen for the views
tz
parents: 859
diff changeset
   578
     ToolApplicationModel new openInterface:#windowSpecForInfoBar
b1815e3116c6 font can be chosen for the views
tz
parents: 859
diff changeset
   579
    "
797
bacf790c536d info bar subspec changed
tz
parents: 792
diff changeset
   580
bacf790c536d info bar subspec changed
tz
parents: 792
diff changeset
   581
    <resource: #canvas>
bacf790c536d info bar subspec changed
tz
parents: 792
diff changeset
   582
1530
8869f644158e info geometry
Claus Gittinger <cg@exept.de>
parents: 1526
diff changeset
   583
    ^ 
4023
27a1f500ec02 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 4008
diff changeset
   584
    #(FullSpec
27a1f500ec02 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 4008
diff changeset
   585
       name: windowSpecForInfoBar
27a1f500ec02 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 4008
diff changeset
   586
       uuid: '4969fb72-c5a3-11e7-82f7-c42c033b4871'
27a1f500ec02 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 4008
diff changeset
   587
       window: 
27a1f500ec02 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 4008
diff changeset
   588
      (WindowSpec
27a1f500ec02 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 4008
diff changeset
   589
         label: 'Info Bar'
27a1f500ec02 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 4008
diff changeset
   590
         name: 'Info Bar'
27a1f500ec02 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 4008
diff changeset
   591
         uuid: '496a0108-c5a3-11e7-82f7-c42c033b4871'
27a1f500ec02 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 4008
diff changeset
   592
         min: (Point 400 320)
27a1f500ec02 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 4008
diff changeset
   593
         max: (Point 1152 900)
27a1f500ec02 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 4008
diff changeset
   594
         bounds: (Rectangle 0 0 500 346)
27a1f500ec02 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 4008
diff changeset
   595
       )
27a1f500ec02 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 4008
diff changeset
   596
       component: 
27a1f500ec02 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 4008
diff changeset
   597
      (SpecCollection
27a1f500ec02 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 4008
diff changeset
   598
         collection: (
27a1f500ec02 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 4008
diff changeset
   599
          (ViewSpec
27a1f500ec02 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 4008
diff changeset
   600
             name: 'infoView'
27a1f500ec02 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 4008
diff changeset
   601
             layout: (LayoutFrame 0 0.0 0 0.0 0 1.0 0 1.0)
27a1f500ec02 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 4008
diff changeset
   602
             uuid: '496a0568-c5a3-11e7-82f7-c42c033b4871'
27a1f500ec02 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 4008
diff changeset
   603
             component: 
27a1f500ec02 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 4008
diff changeset
   604
            (SpecCollection
27a1f500ec02 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 4008
diff changeset
   605
               collection: (
27a1f500ec02 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 4008
diff changeset
   606
                (LabelSpec
27a1f500ec02 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 4008
diff changeset
   607
                   name: 'InfoLabel'
27a1f500ec02 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 4008
diff changeset
   608
                   layout: (LayoutFrame 0 0.0 0 0.0 0 1.0 0 1.0)
27a1f500ec02 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 4008
diff changeset
   609
                   uuid: '496a084c-c5a3-11e7-82f7-c42c033b4871'
4145
1bc96f1a16f9 #UI_ENHANCEMENT by Lukas Vogel
lukas
parents: 4116
diff changeset
   610
                   level: #'infobar.level'
4023
27a1f500ec02 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 4008
diff changeset
   611
                   translateLabel: true
27a1f500ec02 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 4008
diff changeset
   612
                   labelChannel: infoLabelHolder
27a1f500ec02 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 4008
diff changeset
   613
                   resizeForLabel: false
27a1f500ec02 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 4008
diff changeset
   614
                   adjust: left
1530
8869f644158e info geometry
Claus Gittinger <cg@exept.de>
parents: 1526
diff changeset
   615
                 )
4023
27a1f500ec02 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 4008
diff changeset
   616
                )
27a1f500ec02 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 4008
diff changeset
   617
              
27a1f500ec02 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 4008
diff changeset
   618
             )
1530
8869f644158e info geometry
Claus Gittinger <cg@exept.de>
parents: 1526
diff changeset
   619
           )
4023
27a1f500ec02 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 4008
diff changeset
   620
          )
27a1f500ec02 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 4008
diff changeset
   621
        
27a1f500ec02 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 4008
diff changeset
   622
       )
27a1f500ec02 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 4008
diff changeset
   623
     )
797
bacf790c536d info bar subspec changed
tz
parents: 792
diff changeset
   624
!
bacf790c536d info bar subspec changed
tz
parents: 792
diff changeset
   625
bacf790c536d info bar subspec changed
tz
parents: 792
diff changeset
   626
windowSpecForInfoBarWithClock
869
b1815e3116c6 font can be chosen for the views
tz
parents: 859
diff changeset
   627
    "This resource specification was automatically generated
b1815e3116c6 font can be chosen for the views
tz
parents: 859
diff changeset
   628
     by the UIPainter of ST/X."
b1815e3116c6 font can be chosen for the views
tz
parents: 859
diff changeset
   629
b1815e3116c6 font can be chosen for the views
tz
parents: 859
diff changeset
   630
    "Do not manually edit this!! If it is corrupted,
b1815e3116c6 font can be chosen for the views
tz
parents: 859
diff changeset
   631
     the UIPainter may not be able to read the specification."
b1815e3116c6 font can be chosen for the views
tz
parents: 859
diff changeset
   632
b1815e3116c6 font can be chosen for the views
tz
parents: 859
diff changeset
   633
    "
b1815e3116c6 font can be chosen for the views
tz
parents: 859
diff changeset
   634
     UIPainter new openOnClass:ToolApplicationModel andSelector:#windowSpecForInfoBarWithClock
b1815e3116c6 font can be chosen for the views
tz
parents: 859
diff changeset
   635
     ToolApplicationModel new openInterface:#windowSpecForInfoBarWithClock
b1815e3116c6 font can be chosen for the views
tz
parents: 859
diff changeset
   636
    "
797
bacf790c536d info bar subspec changed
tz
parents: 792
diff changeset
   637
bacf790c536d info bar subspec changed
tz
parents: 792
diff changeset
   638
    <resource: #canvas>
bacf790c536d info bar subspec changed
tz
parents: 792
diff changeset
   639
1331
7bb366803653 resizable info/clock bar
Claus Gittinger <cg@exept.de>
parents: 1323
diff changeset
   640
    ^ 
7bb366803653 resizable info/clock bar
Claus Gittinger <cg@exept.de>
parents: 1323
diff changeset
   641
     #(#FullSpec
7bb366803653 resizable info/clock bar
Claus Gittinger <cg@exept.de>
parents: 1323
diff changeset
   642
        #name: #windowSpecForInfoBarWithClock
7bb366803653 resizable info/clock bar
Claus Gittinger <cg@exept.de>
parents: 1323
diff changeset
   643
        #window: 
7bb366803653 resizable info/clock bar
Claus Gittinger <cg@exept.de>
parents: 1323
diff changeset
   644
       #(#WindowSpec
7bb366803653 resizable info/clock bar
Claus Gittinger <cg@exept.de>
parents: 1323
diff changeset
   645
          #label: 'Info Bar'
7bb366803653 resizable info/clock bar
Claus Gittinger <cg@exept.de>
parents: 1323
diff changeset
   646
          #name: 'Info Bar'
7bb366803653 resizable info/clock bar
Claus Gittinger <cg@exept.de>
parents: 1323
diff changeset
   647
          #min: #(#Point 400 320)
7bb366803653 resizable info/clock bar
Claus Gittinger <cg@exept.de>
parents: 1323
diff changeset
   648
          #max: #(#Point 1152 900)
1530
8869f644158e info geometry
Claus Gittinger <cg@exept.de>
parents: 1526
diff changeset
   649
          #bounds: #(#Rectangle 13 23 513 343)
1331
7bb366803653 resizable info/clock bar
Claus Gittinger <cg@exept.de>
parents: 1323
diff changeset
   650
        )
7bb366803653 resizable info/clock bar
Claus Gittinger <cg@exept.de>
parents: 1323
diff changeset
   651
        #component: 
7bb366803653 resizable info/clock bar
Claus Gittinger <cg@exept.de>
parents: 1323
diff changeset
   652
       #(#SpecCollection
7bb366803653 resizable info/clock bar
Claus Gittinger <cg@exept.de>
parents: 1323
diff changeset
   653
          #collection: #(
7bb366803653 resizable info/clock bar
Claus Gittinger <cg@exept.de>
parents: 1323
diff changeset
   654
           #(#VariableHorizontalPanelSpec
2108
91ddaeea8b13 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2104
diff changeset
   655
              #name: 'infoView'
1545
baac1fe1489f infoBar layout
Claus Gittinger <cg@exept.de>
parents: 1544
diff changeset
   656
              #layout: #(#LayoutFrame 0 0 0 0 0 1 0 1)
1331
7bb366803653 resizable info/clock bar
Claus Gittinger <cg@exept.de>
parents: 1323
diff changeset
   657
              #barWidth: 2
7bb366803653 resizable info/clock bar
Claus Gittinger <cg@exept.de>
parents: 1323
diff changeset
   658
              #showHandle: false
7bb366803653 resizable info/clock bar
Claus Gittinger <cg@exept.de>
parents: 1323
diff changeset
   659
              #component: 
7bb366803653 resizable info/clock bar
Claus Gittinger <cg@exept.de>
parents: 1323
diff changeset
   660
             #(#SpecCollection
7bb366803653 resizable info/clock bar
Claus Gittinger <cg@exept.de>
parents: 1323
diff changeset
   661
                #collection: #(
7bb366803653 resizable info/clock bar
Claus Gittinger <cg@exept.de>
parents: 1323
diff changeset
   662
                 #(#LabelSpec
3680
16588aaf2e9d #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 3674
diff changeset
   663
                    #name: 'InfoLabel'
4145
1bc96f1a16f9 #UI_ENHANCEMENT by Lukas Vogel
lukas
parents: 4116
diff changeset
   664
                    #level: #'infobar.level'
2104
ac3c0a89fd95 valueOf* methods renamed
Claus Gittinger <cg@exept.de>
parents: 2098
diff changeset
   665
                    #labelChannel: #infoLabelHolder
1331
7bb366803653 resizable info/clock bar
Claus Gittinger <cg@exept.de>
parents: 1323
diff changeset
   666
                    #resizeForLabel: false
7bb366803653 resizable info/clock bar
Claus Gittinger <cg@exept.de>
parents: 1323
diff changeset
   667
                    #adjust: #left
7bb366803653 resizable info/clock bar
Claus Gittinger <cg@exept.de>
parents: 1323
diff changeset
   668
                  )
7bb366803653 resizable info/clock bar
Claus Gittinger <cg@exept.de>
parents: 1323
diff changeset
   669
                 #(#LabelSpec
7bb366803653 resizable info/clock bar
Claus Gittinger <cg@exept.de>
parents: 1323
diff changeset
   670
                    #name: 'timeLabel'
4145
1bc96f1a16f9 #UI_ENHANCEMENT by Lukas Vogel
lukas
parents: 4116
diff changeset
   671
                    #level: #'infobar.level'
2104
ac3c0a89fd95 valueOf* methods renamed
Claus Gittinger <cg@exept.de>
parents: 2098
diff changeset
   672
                    #labelChannel: #timeLabelHolder
1331
7bb366803653 resizable info/clock bar
Claus Gittinger <cg@exept.de>
parents: 1323
diff changeset
   673
                    #resizeForLabel: false
7bb366803653 resizable info/clock bar
Claus Gittinger <cg@exept.de>
parents: 1323
diff changeset
   674
                    #adjust: #rightLeft
7bb366803653 resizable info/clock bar
Claus Gittinger <cg@exept.de>
parents: 1323
diff changeset
   675
                  )
7bb366803653 resizable info/clock bar
Claus Gittinger <cg@exept.de>
parents: 1323
diff changeset
   676
                 )
7bb366803653 resizable info/clock bar
Claus Gittinger <cg@exept.de>
parents: 1323
diff changeset
   677
               
797
bacf790c536d info bar subspec changed
tz
parents: 792
diff changeset
   678
              )
1331
7bb366803653 resizable info/clock bar
Claus Gittinger <cg@exept.de>
parents: 1323
diff changeset
   679
              #handles: #(#Any 0.854 1.0)
7bb366803653 resizable info/clock bar
Claus Gittinger <cg@exept.de>
parents: 1323
diff changeset
   680
            )
7bb366803653 resizable info/clock bar
Claus Gittinger <cg@exept.de>
parents: 1323
diff changeset
   681
           )
7bb366803653 resizable info/clock bar
Claus Gittinger <cg@exept.de>
parents: 1323
diff changeset
   682
         
7bb366803653 resizable info/clock bar
Claus Gittinger <cg@exept.de>
parents: 1323
diff changeset
   683
        )
797
bacf790c536d info bar subspec changed
tz
parents: 792
diff changeset
   684
      )
bacf790c536d info bar subspec changed
tz
parents: 792
diff changeset
   685
! !
bacf790c536d info bar subspec changed
tz
parents: 792
diff changeset
   686
bacf790c536d info bar subspec changed
tz
parents: 792
diff changeset
   687
!ToolApplicationModel class methodsFor:'menu specs'!
bacf790c536d info bar subspec changed
tz
parents: 792
diff changeset
   688
753
9c837d99f109 intitial checkin
tz
parents:
diff changeset
   689
menuAbout
869
b1815e3116c6 font can be chosen for the views
tz
parents: 859
diff changeset
   690
    "This resource specification was automatically generated
b1815e3116c6 font can be chosen for the views
tz
parents: 859
diff changeset
   691
     by the MenuEditor of ST/X."
b1815e3116c6 font can be chosen for the views
tz
parents: 859
diff changeset
   692
b1815e3116c6 font can be chosen for the views
tz
parents: 859
diff changeset
   693
    "Do not manually edit this!! If it is corrupted,
b1815e3116c6 font can be chosen for the views
tz
parents: 859
diff changeset
   694
     the MenuEditor may not be able to read the specification."
b1815e3116c6 font can be chosen for the views
tz
parents: 859
diff changeset
   695
b1815e3116c6 font can be chosen for the views
tz
parents: 859
diff changeset
   696
    "
b1815e3116c6 font can be chosen for the views
tz
parents: 859
diff changeset
   697
     MenuEditor new openOnClass:ToolApplicationModel andSelector:#menuAbout
b1815e3116c6 font can be chosen for the views
tz
parents: 859
diff changeset
   698
     (Menu new fromLiteralArrayEncoding:(ToolApplicationModel menuAbout)) startUp
b1815e3116c6 font can be chosen for the views
tz
parents: 859
diff changeset
   699
    "
753
9c837d99f109 intitial checkin
tz
parents:
diff changeset
   700
9c837d99f109 intitial checkin
tz
parents:
diff changeset
   701
    <resource: #menu>
9c837d99f109 intitial checkin
tz
parents:
diff changeset
   702
9c837d99f109 intitial checkin
tz
parents:
diff changeset
   703
    ^
859
5d6a438f84d0 docu call changed
tz
parents: 858
diff changeset
   704
     
753
9c837d99f109 intitial checkin
tz
parents:
diff changeset
   705
       #(#Menu
9c837d99f109 intitial checkin
tz
parents:
diff changeset
   706
          
9c837d99f109 intitial checkin
tz
parents:
diff changeset
   707
           #(
9c837d99f109 intitial checkin
tz
parents:
diff changeset
   708
             #(#MenuItem
859
5d6a438f84d0 docu call changed
tz
parents: 858
diff changeset
   709
                #label: 'About Smalltalk/X...'
5d6a438f84d0 docu call changed
tz
parents: 858
diff changeset
   710
                #translateLabel: true
5d6a438f84d0 docu call changed
tz
parents: 858
diff changeset
   711
                #value: #openAbout
5d6a438f84d0 docu call changed
tz
parents: 858
diff changeset
   712
                #activeHelpKey: #aboutSTX
753
9c837d99f109 intitial checkin
tz
parents:
diff changeset
   713
            )
9c837d99f109 intitial checkin
tz
parents:
diff changeset
   714
             #(#MenuItem
859
5d6a438f84d0 docu call changed
tz
parents: 858
diff changeset
   715
                #label: '-'
753
9c837d99f109 intitial checkin
tz
parents:
diff changeset
   716
            )
9c837d99f109 intitial checkin
tz
parents:
diff changeset
   717
             #(#MenuItem
922
94a40763e3bf checkin from browser
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
   718
                #label: 'About this Application...'
859
5d6a438f84d0 docu call changed
tz
parents: 858
diff changeset
   719
                #translateLabel: true
5d6a438f84d0 docu call changed
tz
parents: 858
diff changeset
   720
                #value: #openAboutThisApplication
5d6a438f84d0 docu call changed
tz
parents: 858
diff changeset
   721
                #activeHelpKey: #aboutThisAppliaction
753
9c837d99f109 intitial checkin
tz
parents:
diff changeset
   722
            )
9c837d99f109 intitial checkin
tz
parents:
diff changeset
   723
          ) nil
9c837d99f109 intitial checkin
tz
parents:
diff changeset
   724
          nil
9c837d99f109 intitial checkin
tz
parents:
diff changeset
   725
      )
922
94a40763e3bf checkin from browser
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
   726
94a40763e3bf checkin from browser
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
   727
    "Modified: / 19.5.1998 / 21:44:09 / cg"
753
9c837d99f109 intitial checkin
tz
parents:
diff changeset
   728
!
9c837d99f109 intitial checkin
tz
parents:
diff changeset
   729
1104
a2f59712ce7b removed the (stupid) fontSettings menu support.
Claus Gittinger <cg@exept.de>
parents: 1091
diff changeset
   730
menuHelp
a2f59712ce7b removed the (stupid) fontSettings menu support.
Claus Gittinger <cg@exept.de>
parents: 1091
diff changeset
   731
    "This resource specification was automatically generated
a2f59712ce7b removed the (stupid) fontSettings menu support.
Claus Gittinger <cg@exept.de>
parents: 1091
diff changeset
   732
     by the MenuEditor of ST/X."
a2f59712ce7b removed the (stupid) fontSettings menu support.
Claus Gittinger <cg@exept.de>
parents: 1091
diff changeset
   733
a2f59712ce7b removed the (stupid) fontSettings menu support.
Claus Gittinger <cg@exept.de>
parents: 1091
diff changeset
   734
    "Do not manually edit this!! If it is corrupted,
a2f59712ce7b removed the (stupid) fontSettings menu support.
Claus Gittinger <cg@exept.de>
parents: 1091
diff changeset
   735
     the MenuEditor may not be able to read the specification."
a2f59712ce7b removed the (stupid) fontSettings menu support.
Claus Gittinger <cg@exept.de>
parents: 1091
diff changeset
   736
4263
d349fa8d2945 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 4253
diff changeset
   737
1104
a2f59712ce7b removed the (stupid) fontSettings menu support.
Claus Gittinger <cg@exept.de>
parents: 1091
diff changeset
   738
    "
a2f59712ce7b removed the (stupid) fontSettings menu support.
Claus Gittinger <cg@exept.de>
parents: 1091
diff changeset
   739
     MenuEditor new openOnClass:ToolApplicationModel andSelector:#menuHelp
a2f59712ce7b removed the (stupid) fontSettings menu support.
Claus Gittinger <cg@exept.de>
parents: 1091
diff changeset
   740
     (Menu new fromLiteralArrayEncoding:(ToolApplicationModel menuHelp)) startUp
a2f59712ce7b removed the (stupid) fontSettings menu support.
Claus Gittinger <cg@exept.de>
parents: 1091
diff changeset
   741
    "
a2f59712ce7b removed the (stupid) fontSettings menu support.
Claus Gittinger <cg@exept.de>
parents: 1091
diff changeset
   742
a2f59712ce7b removed the (stupid) fontSettings menu support.
Claus Gittinger <cg@exept.de>
parents: 1091
diff changeset
   743
    <resource: #menu>
a2f59712ce7b removed the (stupid) fontSettings menu support.
Claus Gittinger <cg@exept.de>
parents: 1091
diff changeset
   744
4263
d349fa8d2945 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 4253
diff changeset
   745
    ^ 
d349fa8d2945 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 4253
diff changeset
   746
     #(Menu
d349fa8d2945 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 4253
diff changeset
   747
        (
d349fa8d2945 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 4253
diff changeset
   748
         (MenuItem
d349fa8d2945 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 4253
diff changeset
   749
            activeHelpKey: helpTutorial
d349fa8d2945 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 4253
diff changeset
   750
            enabled: havingDocumentationHolder
d349fa8d2945 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 4253
diff changeset
   751
            label: 'Documentation'
d349fa8d2945 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 4253
diff changeset
   752
            itemValue: openDocumentation
d349fa8d2945 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 4253
diff changeset
   753
          )
d349fa8d2945 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 4253
diff changeset
   754
         (MenuItem
d349fa8d2945 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 4253
diff changeset
   755
            label: '-'
d349fa8d2945 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 4253
diff changeset
   756
            isVisible: false
d349fa8d2945 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 4253
diff changeset
   757
          )
d349fa8d2945 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 4253
diff changeset
   758
         (MenuItem
d349fa8d2945 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 4253
diff changeset
   759
            activeHelpKey: helpShowHelp
d349fa8d2945 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 4253
diff changeset
   760
            label: 'Show Help Texts'
d349fa8d2945 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 4253
diff changeset
   761
            isVisible: false
d349fa8d2945 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 4253
diff changeset
   762
            indication: showingHelp:
d349fa8d2945 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 4253
diff changeset
   763
          )
d349fa8d2945 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 4253
diff changeset
   764
         (MenuItem
d349fa8d2945 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 4253
diff changeset
   765
            label: '-'
d349fa8d2945 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 4253
diff changeset
   766
          )
d349fa8d2945 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 4253
diff changeset
   767
         (MenuItem
d349fa8d2945 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 4253
diff changeset
   768
            activeHelpKey: aboutThisAppliaction
d349fa8d2945 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 4253
diff changeset
   769
            label: 'About this Application...'
d349fa8d2945 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 4253
diff changeset
   770
            itemValue: openAboutThisApplication
d349fa8d2945 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 4253
diff changeset
   771
          )
d349fa8d2945 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 4253
diff changeset
   772
         (MenuItem
d349fa8d2945 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 4253
diff changeset
   773
            activeHelpKey: aboutSTX
d349fa8d2945 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 4253
diff changeset
   774
            label: 'About Smalltalk/X...'
d349fa8d2945 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 4253
diff changeset
   775
            itemValue: openAbout
d349fa8d2945 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 4253
diff changeset
   776
            isVisible: false
d349fa8d2945 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 4253
diff changeset
   777
          )
d349fa8d2945 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 4253
diff changeset
   778
         )
d349fa8d2945 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 4253
diff changeset
   779
        nil
d349fa8d2945 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 4253
diff changeset
   780
        nil
1104
a2f59712ce7b removed the (stupid) fontSettings menu support.
Claus Gittinger <cg@exept.de>
parents: 1091
diff changeset
   781
      )
a2f59712ce7b removed the (stupid) fontSettings menu support.
Claus Gittinger <cg@exept.de>
parents: 1091
diff changeset
   782
!
a2f59712ce7b removed the (stupid) fontSettings menu support.
Claus Gittinger <cg@exept.de>
parents: 1091
diff changeset
   783
a2f59712ce7b removed the (stupid) fontSettings menu support.
Claus Gittinger <cg@exept.de>
parents: 1091
diff changeset
   784
xxxmenuFont
869
b1815e3116c6 font can be chosen for the views
tz
parents: 859
diff changeset
   785
    "This resource specification was automatically generated
b1815e3116c6 font can be chosen for the views
tz
parents: 859
diff changeset
   786
     by the MenuEditor of ST/X."
b1815e3116c6 font can be chosen for the views
tz
parents: 859
diff changeset
   787
b1815e3116c6 font can be chosen for the views
tz
parents: 859
diff changeset
   788
    "Do not manually edit this!! If it is corrupted,
b1815e3116c6 font can be chosen for the views
tz
parents: 859
diff changeset
   789
     the MenuEditor may not be able to read the specification."
b1815e3116c6 font can be chosen for the views
tz
parents: 859
diff changeset
   790
b1815e3116c6 font can be chosen for the views
tz
parents: 859
diff changeset
   791
    "
b1815e3116c6 font can be chosen for the views
tz
parents: 859
diff changeset
   792
     MenuEditor new openOnClass:ToolApplicationModel andSelector:#menuFont
b1815e3116c6 font can be chosen for the views
tz
parents: 859
diff changeset
   793
     (Menu new fromLiteralArrayEncoding:(ToolApplicationModel menuFont)) startUp
b1815e3116c6 font can be chosen for the views
tz
parents: 859
diff changeset
   794
    "
b1815e3116c6 font can be chosen for the views
tz
parents: 859
diff changeset
   795
b1815e3116c6 font can be chosen for the views
tz
parents: 859
diff changeset
   796
    <resource: #menu>
b1815e3116c6 font can be chosen for the views
tz
parents: 859
diff changeset
   797
b1815e3116c6 font can be chosen for the views
tz
parents: 859
diff changeset
   798
    ^
b1815e3116c6 font can be chosen for the views
tz
parents: 859
diff changeset
   799
     
b1815e3116c6 font can be chosen for the views
tz
parents: 859
diff changeset
   800
       #(#Menu
b1815e3116c6 font can be chosen for the views
tz
parents: 859
diff changeset
   801
          
b1815e3116c6 font can be chosen for the views
tz
parents: 859
diff changeset
   802
           #(
b1815e3116c6 font can be chosen for the views
tz
parents: 859
diff changeset
   803
             #(#MenuItem
872
a1606dcbd38b better font setting routines
tz
parents: 871
diff changeset
   804
                #label: 'Label...'
1018
7222534cb3dc part of the activeHelp framework moved to ApplicationModel.
Claus Gittinger <cg@exept.de>
parents: 1016
diff changeset
   805
                #translateLabel: true
869
b1815e3116c6 font can be chosen for the views
tz
parents: 859
diff changeset
   806
                #value: #chooseFont:
b1815e3116c6 font can be chosen for the views
tz
parents: 859
diff changeset
   807
                #argument: 'Label Font'
b1815e3116c6 font can be chosen for the views
tz
parents: 859
diff changeset
   808
            )
b1815e3116c6 font can be chosen for the views
tz
parents: 859
diff changeset
   809
             #(#MenuItem
872
a1606dcbd38b better font setting routines
tz
parents: 871
diff changeset
   810
                #label: 'Button...'
1018
7222534cb3dc part of the activeHelp framework moved to ApplicationModel.
Claus Gittinger <cg@exept.de>
parents: 1016
diff changeset
   811
                #translateLabel: true
869
b1815e3116c6 font can be chosen for the views
tz
parents: 859
diff changeset
   812
                #value: #chooseFont:
b1815e3116c6 font can be chosen for the views
tz
parents: 859
diff changeset
   813
                #argument: 'Button Font'
b1815e3116c6 font can be chosen for the views
tz
parents: 859
diff changeset
   814
            )
b1815e3116c6 font can be chosen for the views
tz
parents: 859
diff changeset
   815
             #(#MenuItem
872
a1606dcbd38b better font setting routines
tz
parents: 871
diff changeset
   816
                #label: 'Edit...'
1018
7222534cb3dc part of the activeHelp framework moved to ApplicationModel.
Claus Gittinger <cg@exept.de>
parents: 1016
diff changeset
   817
                #translateLabel: true
869
b1815e3116c6 font can be chosen for the views
tz
parents: 859
diff changeset
   818
                #value: #chooseFont:
b1815e3116c6 font can be chosen for the views
tz
parents: 859
diff changeset
   819
                #argument: 'Edit Font'
b1815e3116c6 font can be chosen for the views
tz
parents: 859
diff changeset
   820
            )
b1815e3116c6 font can be chosen for the views
tz
parents: 859
diff changeset
   821
             #(#MenuItem
872
a1606dcbd38b better font setting routines
tz
parents: 871
diff changeset
   822
                #label: 'List...'
1018
7222534cb3dc part of the activeHelp framework moved to ApplicationModel.
Claus Gittinger <cg@exept.de>
parents: 1016
diff changeset
   823
                #translateLabel: true
869
b1815e3116c6 font can be chosen for the views
tz
parents: 859
diff changeset
   824
                #value: #chooseFont:
b1815e3116c6 font can be chosen for the views
tz
parents: 859
diff changeset
   825
                #argument: 'List Font'
b1815e3116c6 font can be chosen for the views
tz
parents: 859
diff changeset
   826
            )
b1815e3116c6 font can be chosen for the views
tz
parents: 859
diff changeset
   827
             #(#MenuItem
872
a1606dcbd38b better font setting routines
tz
parents: 871
diff changeset
   828
                #label: 'Tree List...'
1018
7222534cb3dc part of the activeHelp framework moved to ApplicationModel.
Claus Gittinger <cg@exept.de>
parents: 1016
diff changeset
   829
                #translateLabel: true
869
b1815e3116c6 font can be chosen for the views
tz
parents: 859
diff changeset
   830
                #value: #chooseFont:
b1815e3116c6 font can be chosen for the views
tz
parents: 859
diff changeset
   831
                #argument: 'Tree List Font'
b1815e3116c6 font can be chosen for the views
tz
parents: 859
diff changeset
   832
            )
b1815e3116c6 font can be chosen for the views
tz
parents: 859
diff changeset
   833
             #(#MenuItem
872
a1606dcbd38b better font setting routines
tz
parents: 871
diff changeset
   834
                #label: 'Note Book...'
1018
7222534cb3dc part of the activeHelp framework moved to ApplicationModel.
Claus Gittinger <cg@exept.de>
parents: 1016
diff changeset
   835
                #translateLabel: true
872
a1606dcbd38b better font setting routines
tz
parents: 871
diff changeset
   836
                #value: #chooseFont:
a1606dcbd38b better font setting routines
tz
parents: 871
diff changeset
   837
                #argument: 'Note Book Font'
a1606dcbd38b better font setting routines
tz
parents: 871
diff changeset
   838
            )
a1606dcbd38b better font setting routines
tz
parents: 871
diff changeset
   839
             #(#MenuItem
a1606dcbd38b better font setting routines
tz
parents: 871
diff changeset
   840
                #label: 'Framed Box...'
1018
7222534cb3dc part of the activeHelp framework moved to ApplicationModel.
Claus Gittinger <cg@exept.de>
parents: 1016
diff changeset
   841
                #translateLabel: true
872
a1606dcbd38b better font setting routines
tz
parents: 871
diff changeset
   842
                #value: #chooseFont:
a1606dcbd38b better font setting routines
tz
parents: 871
diff changeset
   843
                #argument: 'Framed Box Font'
a1606dcbd38b better font setting routines
tz
parents: 871
diff changeset
   844
            )
a1606dcbd38b better font setting routines
tz
parents: 871
diff changeset
   845
             #(#MenuItem
869
b1815e3116c6 font can be chosen for the views
tz
parents: 859
diff changeset
   846
                #label: '-'
b1815e3116c6 font can be chosen for the views
tz
parents: 859
diff changeset
   847
            )
b1815e3116c6 font can be chosen for the views
tz
parents: 859
diff changeset
   848
             #(#MenuItem
872
a1606dcbd38b better font setting routines
tz
parents: 871
diff changeset
   849
                #label: 'Reset'
1018
7222534cb3dc part of the activeHelp framework moved to ApplicationModel.
Claus Gittinger <cg@exept.de>
parents: 1016
diff changeset
   850
                #translateLabel: true
869
b1815e3116c6 font can be chosen for the views
tz
parents: 859
diff changeset
   851
                #value: #resetFonts
b1815e3116c6 font can be chosen for the views
tz
parents: 859
diff changeset
   852
            )
b1815e3116c6 font can be chosen for the views
tz
parents: 859
diff changeset
   853
          ) nil
b1815e3116c6 font can be chosen for the views
tz
parents: 859
diff changeset
   854
          nil
b1815e3116c6 font can be chosen for the views
tz
parents: 859
diff changeset
   855
      )
1018
7222534cb3dc part of the activeHelp framework moved to ApplicationModel.
Claus Gittinger <cg@exept.de>
parents: 1016
diff changeset
   856
7222534cb3dc part of the activeHelp framework moved to ApplicationModel.
Claus Gittinger <cg@exept.de>
parents: 1016
diff changeset
   857
    "Modified: / 31.7.1998 / 18:55:34 / cg"
753
9c837d99f109 intitial checkin
tz
parents:
diff changeset
   858
! !
9c837d99f109 intitial checkin
tz
parents:
diff changeset
   859
907
f4087882555a method comments added
tz
parents: 893
diff changeset
   860
!ToolApplicationModel class methodsFor:'queries'!
f4087882555a method comments added
tz
parents: 893
diff changeset
   861
3521
3ba988e35485 #DOCUMENTATION
Claus Gittinger <cg@exept.de>
parents: 3508
diff changeset
   862
isAbstract
3ba988e35485 #DOCUMENTATION
Claus Gittinger <cg@exept.de>
parents: 3508
diff changeset
   863
    ^ self == ToolApplicationModel 
907
f4087882555a method comments added
tz
parents: 893
diff changeset
   864
! !
f4087882555a method comments added
tz
parents: 893
diff changeset
   865
2537
03d2731b4ca9 category change
Claus Gittinger <cg@exept.de>
parents: 2480
diff changeset
   866
!ToolApplicationModel class methodsFor:'startup & release'!
753
9c837d99f109 intitial checkin
tz
parents:
diff changeset
   867
782
5b8c4cf62cb5 activeHelp changed as instClassVar + some other cleans
tz
parents: 779
diff changeset
   868
preSnapshot
907
f4087882555a method comments added
tz
parents: 893
diff changeset
   869
    "removes the clipboard before snap shoting"
753
9c837d99f109 intitial checkin
tz
parents:
diff changeset
   870
782
5b8c4cf62cb5 activeHelp changed as instClassVar + some other cleans
tz
parents: 779
diff changeset
   871
    clipboard := nil
753
9c837d99f109 intitial checkin
tz
parents:
diff changeset
   872
!
9c837d99f109 intitial checkin
tz
parents:
diff changeset
   873
782
5b8c4cf62cb5 activeHelp changed as instClassVar + some other cleans
tz
parents: 779
diff changeset
   874
uninitialize
907
f4087882555a method comments added
tz
parents: 893
diff changeset
   875
    "resets the class instance variables"
760
26cf45040420 #preferredExtent cleaned
tz
parents: 758
diff changeset
   876
1969
8e8f5998d053 separate fileHistory
Claus Gittinger <cg@exept.de>
parents: 1809
diff changeset
   877
    settings := instances := showingHelp := history := fileHistory := clipboard := nil
1018
7222534cb3dc part of the activeHelp framework moved to ApplicationModel.
Claus Gittinger <cg@exept.de>
parents: 1016
diff changeset
   878
1089
49b05d386ccc removed Thomas's memory leak
Claus Gittinger <cg@exept.de>
parents: 1084
diff changeset
   879
    "
49b05d386ccc removed Thomas's memory leak
Claus Gittinger <cg@exept.de>
parents: 1084
diff changeset
   880
     self withAllSubclasses do:[:c | c uninitialize]
49b05d386ccc removed Thomas's memory leak
Claus Gittinger <cg@exept.de>
parents: 1084
diff changeset
   881
    "
49b05d386ccc removed Thomas's memory leak
Claus Gittinger <cg@exept.de>
parents: 1084
diff changeset
   882
49b05d386ccc removed Thomas's memory leak
Claus Gittinger <cg@exept.de>
parents: 1084
diff changeset
   883
    "Modified: / 4.2.1999 / 15:37:43 / cg"
753
9c837d99f109 intitial checkin
tz
parents:
diff changeset
   884
! !
9c837d99f109 intitial checkin
tz
parents:
diff changeset
   885
782
5b8c4cf62cb5 activeHelp changed as instClassVar + some other cleans
tz
parents: 779
diff changeset
   886
!ToolApplicationModel methodsFor:'aspects'!
5b8c4cf62cb5 activeHelp changed as instClassVar + some other cleans
tz
parents: 779
diff changeset
   887
1147
bbaa243ddd1c accept & modifiedChannels
Claus Gittinger <cg@exept.de>
parents: 1138
diff changeset
   888
acceptChannel
bbaa243ddd1c accept & modifiedChannels
Claus Gittinger <cg@exept.de>
parents: 1138
diff changeset
   889
    "returns a valueHolder which can be set to true to force all inputFields
bbaa243ddd1c accept & modifiedChannels
Claus Gittinger <cg@exept.de>
parents: 1138
diff changeset
   890
     to accept their value."
bbaa243ddd1c accept & modifiedChannels
Claus Gittinger <cg@exept.de>
parents: 1138
diff changeset
   891
bbaa243ddd1c accept & modifiedChannels
Claus Gittinger <cg@exept.de>
parents: 1138
diff changeset
   892
    |holder|
bbaa243ddd1c accept & modifiedChannels
Claus Gittinger <cg@exept.de>
parents: 1138
diff changeset
   893
bbaa243ddd1c accept & modifiedChannels
Claus Gittinger <cg@exept.de>
parents: 1138
diff changeset
   894
    (holder := builder bindingAt:#acceptChannel) isNil ifTrue:[
1157
feeae3138d3d checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1150
diff changeset
   895
        builder aspectAt:#acceptChannel put:(holder :=  ValueHolder with:false).
1147
bbaa243ddd1c accept & modifiedChannels
Claus Gittinger <cg@exept.de>
parents: 1138
diff changeset
   896
    ].
bbaa243ddd1c accept & modifiedChannels
Claus Gittinger <cg@exept.de>
parents: 1138
diff changeset
   897
    ^ holder
bbaa243ddd1c accept & modifiedChannels
Claus Gittinger <cg@exept.de>
parents: 1138
diff changeset
   898
bbaa243ddd1c accept & modifiedChannels
Claus Gittinger <cg@exept.de>
parents: 1138
diff changeset
   899
    "Modified: / 21.5.1998 / 03:39:49 / cg"
bbaa243ddd1c accept & modifiedChannels
Claus Gittinger <cg@exept.de>
parents: 1138
diff changeset
   900
!
bbaa243ddd1c accept & modifiedChannels
Claus Gittinger <cg@exept.de>
parents: 1138
diff changeset
   901
2104
ac3c0a89fd95 valueOf* methods renamed
Claus Gittinger <cg@exept.de>
parents: 2098
diff changeset
   902
canCopyHolder
ac3c0a89fd95 valueOf* methods renamed
Claus Gittinger <cg@exept.de>
parents: 2098
diff changeset
   903
    "returns whether can copy as value holder"
ac3c0a89fd95 valueOf* methods renamed
Claus Gittinger <cg@exept.de>
parents: 2098
diff changeset
   904
ac3c0a89fd95 valueOf* methods renamed
Claus Gittinger <cg@exept.de>
parents: 2098
diff changeset
   905
    ^ self builder booleanValueAspectFor:#valueOfCanCopy
ac3c0a89fd95 valueOf* methods renamed
Claus Gittinger <cg@exept.de>
parents: 2098
diff changeset
   906
!
ac3c0a89fd95 valueOf* methods renamed
Claus Gittinger <cg@exept.de>
parents: 2098
diff changeset
   907
ac3c0a89fd95 valueOf* methods renamed
Claus Gittinger <cg@exept.de>
parents: 2098
diff changeset
   908
canCutHolder
ac3c0a89fd95 valueOf* methods renamed
Claus Gittinger <cg@exept.de>
parents: 2098
diff changeset
   909
    "returns whether can cut as value holder"
ac3c0a89fd95 valueOf* methods renamed
Claus Gittinger <cg@exept.de>
parents: 2098
diff changeset
   910
ac3c0a89fd95 valueOf* methods renamed
Claus Gittinger <cg@exept.de>
parents: 2098
diff changeset
   911
    ^ builder booleanValueAspectFor:#valueOfCanCut
ac3c0a89fd95 valueOf* methods renamed
Claus Gittinger <cg@exept.de>
parents: 2098
diff changeset
   912
!
ac3c0a89fd95 valueOf* methods renamed
Claus Gittinger <cg@exept.de>
parents: 2098
diff changeset
   913
ac3c0a89fd95 valueOf* methods renamed
Claus Gittinger <cg@exept.de>
parents: 2098
diff changeset
   914
canPasteHolder
ac3c0a89fd95 valueOf* methods renamed
Claus Gittinger <cg@exept.de>
parents: 2098
diff changeset
   915
    "returns whether can paste as value holder"
ac3c0a89fd95 valueOf* methods renamed
Claus Gittinger <cg@exept.de>
parents: 2098
diff changeset
   916
ac3c0a89fd95 valueOf* methods renamed
Claus Gittinger <cg@exept.de>
parents: 2098
diff changeset
   917
    ^ builder booleanValueAspectFor:#valueOfCanPaste
ac3c0a89fd95 valueOf* methods renamed
Claus Gittinger <cg@exept.de>
parents: 2098
diff changeset
   918
!
ac3c0a89fd95 valueOf* methods renamed
Claus Gittinger <cg@exept.de>
parents: 2098
diff changeset
   919
ac3c0a89fd95 valueOf* methods renamed
Claus Gittinger <cg@exept.de>
parents: 2098
diff changeset
   920
canUndoHolder
ac3c0a89fd95 valueOf* methods renamed
Claus Gittinger <cg@exept.de>
parents: 2098
diff changeset
   921
    "returns whether can undo as value holder"
ac3c0a89fd95 valueOf* methods renamed
Claus Gittinger <cg@exept.de>
parents: 2098
diff changeset
   922
ac3c0a89fd95 valueOf* methods renamed
Claus Gittinger <cg@exept.de>
parents: 2098
diff changeset
   923
    ^ builder booleanValueAspectFor:#valueOfCanUndo
ac3c0a89fd95 valueOf* methods renamed
Claus Gittinger <cg@exept.de>
parents: 2098
diff changeset
   924
!
ac3c0a89fd95 valueOf* methods renamed
Claus Gittinger <cg@exept.de>
parents: 2098
diff changeset
   925
ac3c0a89fd95 valueOf* methods renamed
Claus Gittinger <cg@exept.de>
parents: 2098
diff changeset
   926
enablingCommitButtonsHolder
ac3c0a89fd95 valueOf* methods renamed
Claus Gittinger <cg@exept.de>
parents: 2098
diff changeset
   927
    "returns the enabling of the commit of this tool as value holder"
ac3c0a89fd95 valueOf* methods renamed
Claus Gittinger <cg@exept.de>
parents: 2098
diff changeset
   928
ac3c0a89fd95 valueOf* methods renamed
Claus Gittinger <cg@exept.de>
parents: 2098
diff changeset
   929
    ^ builder booleanValueAspectFor:#valueOfEnablingCommitButtons
ac3c0a89fd95 valueOf* methods renamed
Claus Gittinger <cg@exept.de>
parents: 2098
diff changeset
   930
!
ac3c0a89fd95 valueOf* methods renamed
Claus Gittinger <cg@exept.de>
parents: 2098
diff changeset
   931
ac3c0a89fd95 valueOf* methods renamed
Claus Gittinger <cg@exept.de>
parents: 2098
diff changeset
   932
havingDocumentationHolder
ac3c0a89fd95 valueOf* methods renamed
Claus Gittinger <cg@exept.de>
parents: 2098
diff changeset
   933
    "returns the enabling of having documentation for this tool as value holder"
ac3c0a89fd95 valueOf* methods renamed
Claus Gittinger <cg@exept.de>
parents: 2098
diff changeset
   934
ac3c0a89fd95 valueOf* methods renamed
Claus Gittinger <cg@exept.de>
parents: 2098
diff changeset
   935
    ^ (builder booleanValueAspectFor:#valueOfHavingDocumentation) value: (self class includesSelector: #openDocumentation)
ac3c0a89fd95 valueOf* methods renamed
Claus Gittinger <cg@exept.de>
parents: 2098
diff changeset
   936
!
ac3c0a89fd95 valueOf* methods renamed
Claus Gittinger <cg@exept.de>
parents: 2098
diff changeset
   937
ac3c0a89fd95 valueOf* methods renamed
Claus Gittinger <cg@exept.de>
parents: 2098
diff changeset
   938
infoLabelHolder
ac3c0a89fd95 valueOf* methods renamed
Claus Gittinger <cg@exept.de>
parents: 2098
diff changeset
   939
    "returns the info label as value holder"
ac3c0a89fd95 valueOf* methods renamed
Claus Gittinger <cg@exept.de>
parents: 2098
diff changeset
   940
ac3c0a89fd95 valueOf* methods renamed
Claus Gittinger <cg@exept.de>
parents: 2098
diff changeset
   941
    ^ builder nilValueAspectFor:#valueOfInfoLabel
ac3c0a89fd95 valueOf* methods renamed
Claus Gittinger <cg@exept.de>
parents: 2098
diff changeset
   942
!
ac3c0a89fd95 valueOf* methods renamed
Claus Gittinger <cg@exept.de>
parents: 2098
diff changeset
   943
2108
91ddaeea8b13 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2104
diff changeset
   944
infoLabelHolder:aValueHolder
4071
3a7d23495287 #OTHER by stefan
Stefan Vogel <sv@exept.de>
parents: 4069
diff changeset
   945
    builder aspectAt:#useAlienInfoLabel put:true.
2108
91ddaeea8b13 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2104
diff changeset
   946
    builder aspectAt:#valueOfInfoLabel put:aValueHolder.
91ddaeea8b13 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2104
diff changeset
   947
!
91ddaeea8b13 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2104
diff changeset
   948
1147
bbaa243ddd1c accept & modifiedChannels
Claus Gittinger <cg@exept.de>
parents: 1138
diff changeset
   949
modifiedChannel
bbaa243ddd1c accept & modifiedChannels
Claus Gittinger <cg@exept.de>
parents: 1138
diff changeset
   950
    "returns a valueHolder which is set to true, whenever any of
bbaa243ddd1c accept & modifiedChannels
Claus Gittinger <cg@exept.de>
parents: 1138
diff changeset
   951
     my editfields is modified - this is hooked to
2104
ac3c0a89fd95 valueOf* methods renamed
Claus Gittinger <cg@exept.de>
parents: 2098
diff changeset
   952
     the enablingCommitButtonsHolder channel"
1147
bbaa243ddd1c accept & modifiedChannels
Claus Gittinger <cg@exept.de>
parents: 1138
diff changeset
   953
bbaa243ddd1c accept & modifiedChannels
Claus Gittinger <cg@exept.de>
parents: 1138
diff changeset
   954
    |holder|
bbaa243ddd1c accept & modifiedChannels
Claus Gittinger <cg@exept.de>
parents: 1138
diff changeset
   955
bbaa243ddd1c accept & modifiedChannels
Claus Gittinger <cg@exept.de>
parents: 1138
diff changeset
   956
    (holder := builder bindingAt:#modifiedChannel) isNil ifTrue:[
1157
feeae3138d3d checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1150
diff changeset
   957
        builder aspectAt:#modifiedChannel put:(holder :=  ValueHolder with:false).
1147
bbaa243ddd1c accept & modifiedChannels
Claus Gittinger <cg@exept.de>
parents: 1138
diff changeset
   958
        holder 
1331
7bb366803653 resizable info/clock bar
Claus Gittinger <cg@exept.de>
parents: 1323
diff changeset
   959
            onChangeEvaluate:[
1148
b0c0506d044b checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1147
diff changeset
   960
                holder value ifTrue:[
2104
ac3c0a89fd95 valueOf* methods renamed
Claus Gittinger <cg@exept.de>
parents: 2098
diff changeset
   961
                    self enablingCommitButtonsHolder value:true.
1147
bbaa243ddd1c accept & modifiedChannels
Claus Gittinger <cg@exept.de>
parents: 1138
diff changeset
   962
                ]
bbaa243ddd1c accept & modifiedChannels
Claus Gittinger <cg@exept.de>
parents: 1138
diff changeset
   963
               ]
bbaa243ddd1c accept & modifiedChannels
Claus Gittinger <cg@exept.de>
parents: 1138
diff changeset
   964
    ].
bbaa243ddd1c accept & modifiedChannels
Claus Gittinger <cg@exept.de>
parents: 1138
diff changeset
   965
    ^ holder
bbaa243ddd1c accept & modifiedChannels
Claus Gittinger <cg@exept.de>
parents: 1138
diff changeset
   966
bbaa243ddd1c accept & modifiedChannels
Claus Gittinger <cg@exept.de>
parents: 1138
diff changeset
   967
    "Modified: / 21.5.1998 / 03:39:49 / cg"
bbaa243ddd1c accept & modifiedChannels
Claus Gittinger <cg@exept.de>
parents: 1138
diff changeset
   968
!
bbaa243ddd1c accept & modifiedChannels
Claus Gittinger <cg@exept.de>
parents: 1138
diff changeset
   969
2104
ac3c0a89fd95 valueOf* methods renamed
Claus Gittinger <cg@exept.de>
parents: 2098
diff changeset
   970
timeLabelHolder
ac3c0a89fd95 valueOf* methods renamed
Claus Gittinger <cg@exept.de>
parents: 2098
diff changeset
   971
    "returns the time label as value holder"
ac3c0a89fd95 valueOf* methods renamed
Claus Gittinger <cg@exept.de>
parents: 2098
diff changeset
   972
ac3c0a89fd95 valueOf* methods renamed
Claus Gittinger <cg@exept.de>
parents: 2098
diff changeset
   973
    ^ builder nilValueAspectFor:#valueOfTimeLabel
ac3c0a89fd95 valueOf* methods renamed
Claus Gittinger <cg@exept.de>
parents: 2098
diff changeset
   974
!
ac3c0a89fd95 valueOf* methods renamed
Claus Gittinger <cg@exept.de>
parents: 2098
diff changeset
   975
4071
3a7d23495287 #OTHER by stefan
Stefan Vogel <sv@exept.de>
parents: 4069
diff changeset
   976
useAlienInfoLabel
4069
2d11d71a2316 #FEATURE by stefan
Stefan Vogel <sv@exept.de>
parents: 4046
diff changeset
   977
    "answer true, if the master's infolabelHolder should be used"
4071
3a7d23495287 #OTHER by stefan
Stefan Vogel <sv@exept.de>
parents: 4069
diff changeset
   978
    
4069
2d11d71a2316 #FEATURE by stefan
Stefan Vogel <sv@exept.de>
parents: 4046
diff changeset
   979
    ^ builder aspectAt:#useAlienInfoLabelHolder ifAbsent:false.
2d11d71a2316 #FEATURE by stefan
Stefan Vogel <sv@exept.de>
parents: 4046
diff changeset
   980
2d11d71a2316 #FEATURE by stefan
Stefan Vogel <sv@exept.de>
parents: 4046
diff changeset
   981
    "Created: / 20-02-2018 / 13:03:19 / stefan"
2d11d71a2316 #FEATURE by stefan
Stefan Vogel <sv@exept.de>
parents: 4046
diff changeset
   982
!
2d11d71a2316 #FEATURE by stefan
Stefan Vogel <sv@exept.de>
parents: 4046
diff changeset
   983
822
374400d57e0b some useful aspects added
tz
parents: 821
diff changeset
   984
valueOfCanCopy
2388
b0fc901b0cbe Mark obsolte methods as obsolete
Stefan Vogel <sv@exept.de>
parents: 2271
diff changeset
   985
    <resource: #obsolete>
907
f4087882555a method comments added
tz
parents: 893
diff changeset
   986
    "returns whether can copy as value holder"
822
374400d57e0b some useful aspects added
tz
parents: 821
diff changeset
   987
2104
ac3c0a89fd95 valueOf* methods renamed
Claus Gittinger <cg@exept.de>
parents: 2098
diff changeset
   988
    self obsoleteMethodWarning:'stupid name - use #canCopyHolder'.
ac3c0a89fd95 valueOf* methods renamed
Claus Gittinger <cg@exept.de>
parents: 2098
diff changeset
   989
    ^ self canCopyHolder
822
374400d57e0b some useful aspects added
tz
parents: 821
diff changeset
   990
!
374400d57e0b some useful aspects added
tz
parents: 821
diff changeset
   991
374400d57e0b some useful aspects added
tz
parents: 821
diff changeset
   992
valueOfCanCut
2388
b0fc901b0cbe Mark obsolte methods as obsolete
Stefan Vogel <sv@exept.de>
parents: 2271
diff changeset
   993
    <resource: #obsolete>
907
f4087882555a method comments added
tz
parents: 893
diff changeset
   994
    "returns whether can paste as value holder"
822
374400d57e0b some useful aspects added
tz
parents: 821
diff changeset
   995
2104
ac3c0a89fd95 valueOf* methods renamed
Claus Gittinger <cg@exept.de>
parents: 2098
diff changeset
   996
    self obsoleteMethodWarning:'stupid name - use #canCutHolder'.
ac3c0a89fd95 valueOf* methods renamed
Claus Gittinger <cg@exept.de>
parents: 2098
diff changeset
   997
    ^ self canCutHolder
822
374400d57e0b some useful aspects added
tz
parents: 821
diff changeset
   998
936
d3d50ac7cdd0 code compression
Claus Gittinger <cg@exept.de>
parents: 927
diff changeset
   999
    "Modified: / 21.5.1998 / 03:39:13 / cg"
822
374400d57e0b some useful aspects added
tz
parents: 821
diff changeset
  1000
!
374400d57e0b some useful aspects added
tz
parents: 821
diff changeset
  1001
374400d57e0b some useful aspects added
tz
parents: 821
diff changeset
  1002
valueOfCanPaste
2388
b0fc901b0cbe Mark obsolte methods as obsolete
Stefan Vogel <sv@exept.de>
parents: 2271
diff changeset
  1003
    <resource: #obsolete>
907
f4087882555a method comments added
tz
parents: 893
diff changeset
  1004
    "returns whether can paste as value holder"
822
374400d57e0b some useful aspects added
tz
parents: 821
diff changeset
  1005
2104
ac3c0a89fd95 valueOf* methods renamed
Claus Gittinger <cg@exept.de>
parents: 2098
diff changeset
  1006
    self obsoleteMethodWarning:'stupid name - use #canPasteHolder'.
ac3c0a89fd95 valueOf* methods renamed
Claus Gittinger <cg@exept.de>
parents: 2098
diff changeset
  1007
    ^ self canPasteHolder
822
374400d57e0b some useful aspects added
tz
parents: 821
diff changeset
  1008
!
374400d57e0b some useful aspects added
tz
parents: 821
diff changeset
  1009
374400d57e0b some useful aspects added
tz
parents: 821
diff changeset
  1010
valueOfCanUndo
2388
b0fc901b0cbe Mark obsolte methods as obsolete
Stefan Vogel <sv@exept.de>
parents: 2271
diff changeset
  1011
    <resource: #obsolete>
907
f4087882555a method comments added
tz
parents: 893
diff changeset
  1012
    "returns whether can undo as value holder"
822
374400d57e0b some useful aspects added
tz
parents: 821
diff changeset
  1013
2104
ac3c0a89fd95 valueOf* methods renamed
Claus Gittinger <cg@exept.de>
parents: 2098
diff changeset
  1014
    self obsoleteMethodWarning:'stupid name - use #canUndoHolder'.
ac3c0a89fd95 valueOf* methods renamed
Claus Gittinger <cg@exept.de>
parents: 2098
diff changeset
  1015
    ^ self canUndoHolder
822
374400d57e0b some useful aspects added
tz
parents: 821
diff changeset
  1016
936
d3d50ac7cdd0 code compression
Claus Gittinger <cg@exept.de>
parents: 927
diff changeset
  1017
    "Modified: / 21.5.1998 / 03:39:31 / cg"
822
374400d57e0b some useful aspects added
tz
parents: 821
diff changeset
  1018
!
374400d57e0b some useful aspects added
tz
parents: 821
diff changeset
  1019
782
5b8c4cf62cb5 activeHelp changed as instClassVar + some other cleans
tz
parents: 779
diff changeset
  1020
valueOfEnablingCommitButtons
2388
b0fc901b0cbe Mark obsolte methods as obsolete
Stefan Vogel <sv@exept.de>
parents: 2271
diff changeset
  1021
    <resource: #obsolete>
907
f4087882555a method comments added
tz
parents: 893
diff changeset
  1022
    "returns the enabling of the commit of this tool as value holder"
753
9c837d99f109 intitial checkin
tz
parents:
diff changeset
  1023
2104
ac3c0a89fd95 valueOf* methods renamed
Claus Gittinger <cg@exept.de>
parents: 2098
diff changeset
  1024
    self obsoleteMethodWarning:'stupid name - use #enablingCommitButtonsHolder'.
ac3c0a89fd95 valueOf* methods renamed
Claus Gittinger <cg@exept.de>
parents: 2098
diff changeset
  1025
    ^ self enablingCommitButtonsHolder
753
9c837d99f109 intitial checkin
tz
parents:
diff changeset
  1026
936
d3d50ac7cdd0 code compression
Claus Gittinger <cg@exept.de>
parents: 927
diff changeset
  1027
    "Modified: / 21.5.1998 / 03:39:49 / cg"
782
5b8c4cf62cb5 activeHelp changed as instClassVar + some other cleans
tz
parents: 779
diff changeset
  1028
!
5b8c4cf62cb5 activeHelp changed as instClassVar + some other cleans
tz
parents: 779
diff changeset
  1029
858
a36ca9158a69 show help bug fixed
tz
parents: 853
diff changeset
  1030
valueOfHavingDocumentation
2388
b0fc901b0cbe Mark obsolte methods as obsolete
Stefan Vogel <sv@exept.de>
parents: 2271
diff changeset
  1031
    <resource: #obsolete>
1004
6dc621535e26 valueOfHavingDocumentation must be set
tz
parents: 990
diff changeset
  1032
    "returns the enabling of having documentation for this tool as value holder"
803
f6ca4eb5da39 help texts for the history added
tz
parents: 802
diff changeset
  1033
2104
ac3c0a89fd95 valueOf* methods renamed
Claus Gittinger <cg@exept.de>
parents: 2098
diff changeset
  1034
    self obsoleteMethodWarning:'stupid name - use havingDocumentationHolder'.
ac3c0a89fd95 valueOf* methods renamed
Claus Gittinger <cg@exept.de>
parents: 2098
diff changeset
  1035
    ^ self havingDocumentationHolder
803
f6ca4eb5da39 help texts for the history added
tz
parents: 802
diff changeset
  1036
!
f6ca4eb5da39 help texts for the history added
tz
parents: 802
diff changeset
  1037
782
5b8c4cf62cb5 activeHelp changed as instClassVar + some other cleans
tz
parents: 779
diff changeset
  1038
valueOfInfoLabel
2388
b0fc901b0cbe Mark obsolte methods as obsolete
Stefan Vogel <sv@exept.de>
parents: 2271
diff changeset
  1039
    <resource: #obsolete>
907
f4087882555a method comments added
tz
parents: 893
diff changeset
  1040
    "returns the info label as value holder"
782
5b8c4cf62cb5 activeHelp changed as instClassVar + some other cleans
tz
parents: 779
diff changeset
  1041
2104
ac3c0a89fd95 valueOf* methods renamed
Claus Gittinger <cg@exept.de>
parents: 2098
diff changeset
  1042
    self obsoleteMethodWarning:'stupid name - use infoLabelHolder'.
ac3c0a89fd95 valueOf* methods renamed
Claus Gittinger <cg@exept.de>
parents: 2098
diff changeset
  1043
    ^ self infoLabelHolder
753
9c837d99f109 intitial checkin
tz
parents:
diff changeset
  1044
936
d3d50ac7cdd0 code compression
Claus Gittinger <cg@exept.de>
parents: 927
diff changeset
  1045
    "Modified: / 21.5.1998 / 03:40:34 / cg"
782
5b8c4cf62cb5 activeHelp changed as instClassVar + some other cleans
tz
parents: 779
diff changeset
  1046
!
5b8c4cf62cb5 activeHelp changed as instClassVar + some other cleans
tz
parents: 779
diff changeset
  1047
5b8c4cf62cb5 activeHelp changed as instClassVar + some other cleans
tz
parents: 779
diff changeset
  1048
valueOfTimeLabel
2388
b0fc901b0cbe Mark obsolte methods as obsolete
Stefan Vogel <sv@exept.de>
parents: 2271
diff changeset
  1049
    <resource: #obsolete>
907
f4087882555a method comments added
tz
parents: 893
diff changeset
  1050
    "returns the time label as value holder"
753
9c837d99f109 intitial checkin
tz
parents:
diff changeset
  1051
2104
ac3c0a89fd95 valueOf* methods renamed
Claus Gittinger <cg@exept.de>
parents: 2098
diff changeset
  1052
    self obsoleteMethodWarning:'stupid name - use timeLabelHolder'.
ac3c0a89fd95 valueOf* methods renamed
Claus Gittinger <cg@exept.de>
parents: 2098
diff changeset
  1053
    ^ self timeLabelHolder
753
9c837d99f109 intitial checkin
tz
parents:
diff changeset
  1054
936
d3d50ac7cdd0 code compression
Claus Gittinger <cg@exept.de>
parents: 927
diff changeset
  1055
    "Modified: / 21.5.1998 / 03:40:42 / cg"
753
9c837d99f109 intitial checkin
tz
parents:
diff changeset
  1056
! !
9c837d99f109 intitial checkin
tz
parents:
diff changeset
  1057
782
5b8c4cf62cb5 activeHelp changed as instClassVar + some other cleans
tz
parents: 779
diff changeset
  1058
!ToolApplicationModel methodsFor:'clipboard'!
753
9c837d99f109 intitial checkin
tz
parents:
diff changeset
  1059
838
d2588cca5a15 some obselete texts removed
tz
parents: 834
diff changeset
  1060
clipboard
907
f4087882555a method comments added
tz
parents: 893
diff changeset
  1061
    "returns the clipboard"
838
d2588cca5a15 some obselete texts removed
tz
parents: 834
diff changeset
  1062
d2588cca5a15 some obselete texts removed
tz
parents: 834
diff changeset
  1063
    ^self class clipboard
d2588cca5a15 some obselete texts removed
tz
parents: 834
diff changeset
  1064
!
d2588cca5a15 some obselete texts removed
tz
parents: 834
diff changeset
  1065
2104
ac3c0a89fd95 valueOf* methods renamed
Claus Gittinger <cg@exept.de>
parents: 2098
diff changeset
  1066
clipboard:anEditObject
907
f4087882555a method comments added
tz
parents: 893
diff changeset
  1067
    "sets the clipboard and the value holder for can pasting"
753
9c837d99f109 intitial checkin
tz
parents:
diff changeset
  1068
782
5b8c4cf62cb5 activeHelp changed as instClassVar + some other cleans
tz
parents: 779
diff changeset
  1069
    self class clipboard: anEditObject.
753
9c837d99f109 intitial checkin
tz
parents:
diff changeset
  1070
2104
ac3c0a89fd95 valueOf* methods renamed
Claus Gittinger <cg@exept.de>
parents: 2098
diff changeset
  1071
    self canPasteHolder value: anEditObject notNil
782
5b8c4cf62cb5 activeHelp changed as instClassVar + some other cleans
tz
parents: 779
diff changeset
  1072
! !
5b8c4cf62cb5 activeHelp changed as instClassVar + some other cleans
tz
parents: 779
diff changeset
  1073
1195
3e136baa74f9 moved all clock-handling code to one place
Claus Gittinger <cg@exept.de>
parents: 1165
diff changeset
  1074
!ToolApplicationModel methodsFor:'clock handling'!
3e136baa74f9 moved all clock-handling code to one place
Claus Gittinger <cg@exept.de>
parents: 1165
diff changeset
  1075
3e136baa74f9 moved all clock-handling code to one place
Claus Gittinger <cg@exept.de>
parents: 1165
diff changeset
  1076
startClock
3e136baa74f9 moved all clock-handling code to one place
Claus Gittinger <cg@exept.de>
parents: 1165
diff changeset
  1077
    "/ start the time-block
3e136baa74f9 moved all clock-handling code to one place
Claus Gittinger <cg@exept.de>
parents: 1165
diff changeset
  1078
    self startClockOnTimedBlock:[self updateTime]. 
3e136baa74f9 moved all clock-handling code to one place
Claus Gittinger <cg@exept.de>
parents: 1165
diff changeset
  1079
!
3e136baa74f9 moved all clock-handling code to one place
Claus Gittinger <cg@exept.de>
parents: 1165
diff changeset
  1080
3e136baa74f9 moved all clock-handling code to one place
Claus Gittinger <cg@exept.de>
parents: 1165
diff changeset
  1081
startClockOnTimedBlock: aBlock
3e136baa74f9 moved all clock-handling code to one place
Claus Gittinger <cg@exept.de>
parents: 1165
diff changeset
  1082
    "sets and starts the (optional) time block"
3e136baa74f9 moved all clock-handling code to one place
Claus Gittinger <cg@exept.de>
parents: 1165
diff changeset
  1083
3e136baa74f9 moved all clock-handling code to one place
Claus Gittinger <cg@exept.de>
parents: 1165
diff changeset
  1084
    timeBlock := aBlock.
3e136baa74f9 moved all clock-handling code to one place
Claus Gittinger <cg@exept.de>
parents: 1165
diff changeset
  1085
    aBlock value.
3e136baa74f9 moved all clock-handling code to one place
Claus Gittinger <cg@exept.de>
parents: 1165
diff changeset
  1086
3e136baa74f9 moved all clock-handling code to one place
Claus Gittinger <cg@exept.de>
parents: 1165
diff changeset
  1087
    "Modified: / 31.7.1998 / 18:46:28 / cg"
3e136baa74f9 moved all clock-handling code to one place
Claus Gittinger <cg@exept.de>
parents: 1165
diff changeset
  1088
!
3e136baa74f9 moved all clock-handling code to one place
Claus Gittinger <cg@exept.de>
parents: 1165
diff changeset
  1089
3e136baa74f9 moved all clock-handling code to one place
Claus Gittinger <cg@exept.de>
parents: 1165
diff changeset
  1090
stopClock
3e136baa74f9 moved all clock-handling code to one place
Claus Gittinger <cg@exept.de>
parents: 1165
diff changeset
  1091
    "/ stop the time-block
3e136baa74f9 moved all clock-handling code to one place
Claus Gittinger <cg@exept.de>
parents: 1165
diff changeset
  1092
3e136baa74f9 moved all clock-handling code to one place
Claus Gittinger <cg@exept.de>
parents: 1165
diff changeset
  1093
    timeBlock notNil ifTrue:[
3e136baa74f9 moved all clock-handling code to one place
Claus Gittinger <cg@exept.de>
parents: 1165
diff changeset
  1094
        Processor removeTimedBlock:timeBlock.
3e136baa74f9 moved all clock-handling code to one place
Claus Gittinger <cg@exept.de>
parents: 1165
diff changeset
  1095
        timeBlock := nil.
3e136baa74f9 moved all clock-handling code to one place
Claus Gittinger <cg@exept.de>
parents: 1165
diff changeset
  1096
    ].
2104
ac3c0a89fd95 valueOf* methods renamed
Claus Gittinger <cg@exept.de>
parents: 2098
diff changeset
  1097
    self timeLabelHolder value:''
1195
3e136baa74f9 moved all clock-handling code to one place
Claus Gittinger <cg@exept.de>
parents: 1165
diff changeset
  1098
!
3e136baa74f9 moved all clock-handling code to one place
Claus Gittinger <cg@exept.de>
parents: 1165
diff changeset
  1099
3e136baa74f9 moved all clock-handling code to one place
Claus Gittinger <cg@exept.de>
parents: 1165
diff changeset
  1100
updateTime
3e136baa74f9 moved all clock-handling code to one place
Claus Gittinger <cg@exept.de>
parents: 1165
diff changeset
  1101
    "update my time-field"
3e136baa74f9 moved all clock-handling code to one place
Claus Gittinger <cg@exept.de>
parents: 1165
diff changeset
  1102
3e136baa74f9 moved all clock-handling code to one place
Claus Gittinger <cg@exept.de>
parents: 1165
diff changeset
  1103
    |now hours minutes suffix|
3e136baa74f9 moved all clock-handling code to one place
Claus Gittinger <cg@exept.de>
parents: 1165
diff changeset
  1104
3e136baa74f9 moved all clock-handling code to one place
Claus Gittinger <cg@exept.de>
parents: 1165
diff changeset
  1105
    now := Time now.
3e136baa74f9 moved all clock-handling code to one place
Claus Gittinger <cg@exept.de>
parents: 1165
diff changeset
  1106
3e136baa74f9 moved all clock-handling code to one place
Claus Gittinger <cg@exept.de>
parents: 1165
diff changeset
  1107
    hours := now hours.
3e136baa74f9 moved all clock-handling code to one place
Claus Gittinger <cg@exept.de>
parents: 1165
diff changeset
  1108
    minutes := now minutes printString.
3e136baa74f9 moved all clock-handling code to one place
Claus Gittinger <cg@exept.de>
parents: 1165
diff changeset
  1109
    suffix := ' '.
3e136baa74f9 moved all clock-handling code to one place
Claus Gittinger <cg@exept.de>
parents: 1165
diff changeset
  1110
2121
aaa63f6a0025 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2108
diff changeset
  1111
    (resources string:'TIME_FORMAT' default:12) == 12 ifTrue:[
1195
3e136baa74f9 moved all clock-handling code to one place
Claus Gittinger <cg@exept.de>
parents: 1165
diff changeset
  1112
        suffix := ' am '.  
3e136baa74f9 moved all clock-handling code to one place
Claus Gittinger <cg@exept.de>
parents: 1165
diff changeset
  1113
        hours > 12 ifTrue: [hours := hours - 12. suffix := ' pm '].
3e136baa74f9 moved all clock-handling code to one place
Claus Gittinger <cg@exept.de>
parents: 1165
diff changeset
  1114
    ].
3e136baa74f9 moved all clock-handling code to one place
Claus Gittinger <cg@exept.de>
parents: 1165
diff changeset
  1115
3e136baa74f9 moved all clock-handling code to one place
Claus Gittinger <cg@exept.de>
parents: 1165
diff changeset
  1116
    minutes size = 1 ifTrue: [minutes := '0', minutes].
3e136baa74f9 moved all clock-handling code to one place
Claus Gittinger <cg@exept.de>
parents: 1165
diff changeset
  1117
2104
ac3c0a89fd95 valueOf* methods renamed
Claus Gittinger <cg@exept.de>
parents: 2098
diff changeset
  1118
    self timeLabelHolder value:(hours printString, ':', minutes, suffix).
1195
3e136baa74f9 moved all clock-handling code to one place
Claus Gittinger <cg@exept.de>
parents: 1165
diff changeset
  1119
3e136baa74f9 moved all clock-handling code to one place
Claus Gittinger <cg@exept.de>
parents: 1165
diff changeset
  1120
    timeBlock notNil ifTrue:[
3e136baa74f9 moved all clock-handling code to one place
Claus Gittinger <cg@exept.de>
parents: 1165
diff changeset
  1121
        Processor removeTimedBlock:timeBlock.
3e136baa74f9 moved all clock-handling code to one place
Claus Gittinger <cg@exept.de>
parents: 1165
diff changeset
  1122
        Processor addTimedBlock:timeBlock afterSeconds:5
3e136baa74f9 moved all clock-handling code to one place
Claus Gittinger <cg@exept.de>
parents: 1165
diff changeset
  1123
    ]
3e136baa74f9 moved all clock-handling code to one place
Claus Gittinger <cg@exept.de>
parents: 1165
diff changeset
  1124
! !
3e136baa74f9 moved all clock-handling code to one place
Claus Gittinger <cg@exept.de>
parents: 1165
diff changeset
  1125
1006
786de97d72f9 allow redefinition of the about-boxes image.
Claus Gittinger <cg@exept.de>
parents: 1004
diff changeset
  1126
!ToolApplicationModel methodsFor:'defaults'!
786de97d72f9 allow redefinition of the about-boxes image.
Claus Gittinger <cg@exept.de>
parents: 1004
diff changeset
  1127
786de97d72f9 allow redefinition of the about-boxes image.
Claus Gittinger <cg@exept.de>
parents: 1004
diff changeset
  1128
aboutImage
786de97d72f9 allow redefinition of the about-boxes image.
Claus Gittinger <cg@exept.de>
parents: 1004
diff changeset
  1129
    "the image to be displayed in my about-box;
3958
1f59191ed855 #OTHER by mawalch
mawalch
parents: 3892
diff changeset
  1130
     If nil is returned, the ST/X default image is used."
1006
786de97d72f9 allow redefinition of the about-boxes image.
Claus Gittinger <cg@exept.de>
parents: 1004
diff changeset
  1131
2771
9c8ce6487992 changed: #aboutImage
Claus Gittinger <cg@exept.de>
parents: 2587
diff changeset
  1132
    ^ self class defaultIcon
1006
786de97d72f9 allow redefinition of the about-boxes image.
Claus Gittinger <cg@exept.de>
parents: 1004
diff changeset
  1133
3958
1f59191ed855 #OTHER by mawalch
mawalch
parents: 3892
diff changeset
  1134
    "Created: / 25-07-1998 / 20:33:50 / cg"
1f59191ed855 #OTHER by mawalch
mawalch
parents: 3892
diff changeset
  1135
    "Modified (comment): / 23-05-2017 / 16:13:50 / mawalch"
1006
786de97d72f9 allow redefinition of the about-boxes image.
Claus Gittinger <cg@exept.de>
parents: 1004
diff changeset
  1136
! !
786de97d72f9 allow redefinition of the about-boxes image.
Claus Gittinger <cg@exept.de>
parents: 1004
diff changeset
  1137
782
5b8c4cf62cb5 activeHelp changed as instClassVar + some other cleans
tz
parents: 779
diff changeset
  1138
!ToolApplicationModel methodsFor:'help'!
753
9c837d99f109 intitial checkin
tz
parents:
diff changeset
  1139
1526
02941e80a146 refactored aboutBox setup for easier subclassing
Claus Gittinger <cg@exept.de>
parents: 1516
diff changeset
  1140
aboutThisApplicationText
02941e80a146 refactored aboutBox setup for easier subclassing
Claus Gittinger <cg@exept.de>
parents: 1516
diff changeset
  1141
    "text for an about box for this application.
02941e80a146 refactored aboutBox setup for easier subclassing
Claus Gittinger <cg@exept.de>
parents: 1516
diff changeset
  1142
     Extracts some common info (i.e. class revision, author etc.) from
02941e80a146 refactored aboutBox setup for easier subclassing
Claus Gittinger <cg@exept.de>
parents: 1516
diff changeset
  1143
     the classes documentation."
02941e80a146 refactored aboutBox setup for easier subclassing
Claus Gittinger <cg@exept.de>
parents: 1516
diff changeset
  1144
02941e80a146 refactored aboutBox setup for easier subclassing
Claus Gittinger <cg@exept.de>
parents: 1516
diff changeset
  1145
    |rev myClass clsRev msg|
02941e80a146 refactored aboutBox setup for easier subclassing
Claus Gittinger <cg@exept.de>
parents: 1516
diff changeset
  1146
02941e80a146 refactored aboutBox setup for easier subclassing
Claus Gittinger <cg@exept.de>
parents: 1516
diff changeset
  1147
    rev := ''.
2480
e42b4f10bb5c fixed aboutThisApplicationText
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  1148
    myClass := (self class topOwningClass) ? self class.
1526
02941e80a146 refactored aboutBox setup for easier subclassing
Claus Gittinger <cg@exept.de>
parents: 1516
diff changeset
  1149
2271
8ad7158a757a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2266
diff changeset
  1150
    (clsRev := myClass revision) notNil ifTrue: [
8ad7158a757a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2266
diff changeset
  1151
        rev := '  (rev: ', clsRev printString, ')'
8ad7158a757a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2266
diff changeset
  1152
    ].
1526
02941e80a146 refactored aboutBox setup for easier subclassing
Claus Gittinger <cg@exept.de>
parents: 1516
diff changeset
  1153
02941e80a146 refactored aboutBox setup for easier subclassing
Claus Gittinger <cg@exept.de>
parents: 1516
diff changeset
  1154
    msg := '\The application\\' withCRs
3547
f3221c6ff930 #REFACTORING
Claus Gittinger <cg@exept.de>
parents: 3521
diff changeset
  1155
        , myClass name allBold, rev
1526
02941e80a146 refactored aboutBox setup for easier subclassing
Claus Gittinger <cg@exept.de>
parents: 1516
diff changeset
  1156
        , '\\has been designed and implemented by: \' withCRs
2451
a51ca6c7576c about text generation
Claus Gittinger <cg@exept.de>
parents: 2388
diff changeset
  1157
        , ((self class authorLinesForAboutBox collect:[:l | '    ' , l]) asStringWith:$\) withCRs
1526
02941e80a146 refactored aboutBox setup for easier subclassing
Claus Gittinger <cg@exept.de>
parents: 1516
diff changeset
  1158
        , '\\' withCRs.
02941e80a146 refactored aboutBox setup for easier subclassing
Claus Gittinger <cg@exept.de>
parents: 1516
diff changeset
  1159
    msg := msg withTabsExpanded.
02941e80a146 refactored aboutBox setup for easier subclassing
Claus Gittinger <cg@exept.de>
parents: 1516
diff changeset
  1160
    ^msg
02941e80a146 refactored aboutBox setup for easier subclassing
Claus Gittinger <cg@exept.de>
parents: 1516
diff changeset
  1161
2271
8ad7158a757a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2266
diff changeset
  1162
    "Created: / 13-11-2001 / 12:34:19 / cg"
8ad7158a757a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2266
diff changeset
  1163
    "Modified: / 27-10-2006 / 16:13:35 / cg"
1526
02941e80a146 refactored aboutBox setup for easier subclassing
Claus Gittinger <cg@exept.de>
parents: 1516
diff changeset
  1164
!
02941e80a146 refactored aboutBox setup for easier subclassing
Claus Gittinger <cg@exept.de>
parents: 1516
diff changeset
  1165
762
2c25cc1b363e detour help texts into bottomed info label
tz
parents: 761
diff changeset
  1166
defaultInfoLabel
907
f4087882555a method comments added
tz
parents: 893
diff changeset
  1167
    "returns the default info label; here an empty string"
762
2c25cc1b363e detour help texts into bottomed info label
tz
parents: 761
diff changeset
  1168
1018
7222534cb3dc part of the activeHelp framework moved to ApplicationModel.
Claus Gittinger <cg@exept.de>
parents: 1016
diff changeset
  1169
    ^ ''
984
a0a868c45691 show help synchronously
Claus Gittinger <cg@exept.de>
parents: 982
diff changeset
  1170
1018
7222534cb3dc part of the activeHelp framework moved to ApplicationModel.
Claus Gittinger <cg@exept.de>
parents: 1016
diff changeset
  1171
    "Modified: / 31.7.1998 / 18:44:55 / cg"
984
a0a868c45691 show help synchronously
Claus Gittinger <cg@exept.de>
parents: 982
diff changeset
  1172
!
a0a868c45691 show help synchronously
Claus Gittinger <cg@exept.de>
parents: 982
diff changeset
  1173
753
9c837d99f109 intitial checkin
tz
parents:
diff changeset
  1174
openAbout
1018
7222534cb3dc part of the activeHelp framework moved to ApplicationModel.
Claus Gittinger <cg@exept.de>
parents: 1016
diff changeset
  1175
    "opens an about box (on ST/X)"
753
9c837d99f109 intitial checkin
tz
parents:
diff changeset
  1176
1043
32cd5ccbd94f made openAboutSTX a class method for sharability.
Claus Gittinger <cg@exept.de>
parents: 1040
diff changeset
  1177
    self class openAboutSTX
753
9c837d99f109 intitial checkin
tz
parents:
diff changeset
  1178
1043
32cd5ccbd94f made openAboutSTX a class method for sharability.
Claus Gittinger <cg@exept.de>
parents: 1040
diff changeset
  1179
    "Modified: / 14.8.1998 / 13:17:57 / cg"
753
9c837d99f109 intitial checkin
tz
parents:
diff changeset
  1180
!
9c837d99f109 intitial checkin
tz
parents:
diff changeset
  1181
858
a36ca9158a69 show help bug fixed
tz
parents: 853
diff changeset
  1182
openHTMLDocument: aHTMLFilename
907
f4087882555a method comments added
tz
parents: 893
diff changeset
  1183
    "opens a HTML browser on aHTMLFilename"
858
a36ca9158a69 show help bug fixed
tz
parents: 853
diff changeset
  1184
a36ca9158a69 show help bug fixed
tz
parents: 853
diff changeset
  1185
    HTMLDocumentView openFullOnDocumentationFile: aHTMLFilename
a36ca9158a69 show help bug fixed
tz
parents: 853
diff changeset
  1186
!
a36ca9158a69 show help bug fixed
tz
parents: 853
diff changeset
  1187
1018
7222534cb3dc part of the activeHelp framework moved to ApplicationModel.
Claus Gittinger <cg@exept.de>
parents: 1016
diff changeset
  1188
showHelp:aHelpText for:view
1631
14d4694d9a5a Comments
Stefan Vogel <sv@exept.de>
parents: 1624
diff changeset
  1189
    "displays aHelpText in the info label.
14d4694d9a5a Comments
Stefan Vogel <sv@exept.de>
parents: 1624
diff changeset
  1190
     Only text up to '.' is shown"
1018
7222534cb3dc part of the activeHelp framework moved to ApplicationModel.
Claus Gittinger <cg@exept.de>
parents: 1016
diff changeset
  1191
1343
3ee2bcb3527d undo last change
ca
parents: 1341
diff changeset
  1192
"/    masterApplication notNil ifTrue:[
3ee2bcb3527d undo last change
ca
parents: 1341
diff changeset
  1193
"/        ^ masterApplication showHelp:aHelpText for:view
3ee2bcb3527d undo last change
ca
parents: 1341
diff changeset
  1194
"/    ].
3ee2bcb3527d undo last change
ca
parents: 1341
diff changeset
  1195
"/
3508
ba75f68aaa04 #UI_ENHANCEMENT
Claus Gittinger <cg@exept.de>
parents: 3354
diff changeset
  1196
    |lines|
ba75f68aaa04 #UI_ENHANCEMENT
Claus Gittinger <cg@exept.de>
parents: 3354
diff changeset
  1197
    
ba75f68aaa04 #UI_ENHANCEMENT
Claus Gittinger <cg@exept.de>
parents: 3354
diff changeset
  1198
    aHelpText isNil ifTrue:[
ba75f68aaa04 #UI_ENHANCEMENT
Claus Gittinger <cg@exept.de>
parents: 3354
diff changeset
  1199
        self updateInfoLabel
ba75f68aaa04 #UI_ENHANCEMENT
Claus Gittinger <cg@exept.de>
parents: 3354
diff changeset
  1200
    ] ifFalse: [
ba75f68aaa04 #UI_ENHANCEMENT
Claus Gittinger <cg@exept.de>
parents: 3354
diff changeset
  1201
        |text|
ba75f68aaa04 #UI_ENHANCEMENT
Claus Gittinger <cg@exept.de>
parents: 3354
diff changeset
  1202
        
ba75f68aaa04 #UI_ENHANCEMENT
Claus Gittinger <cg@exept.de>
parents: 3354
diff changeset
  1203
        lines := aHelpText asString asStringCollection.
4096
f2a7b387a402 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 4071
diff changeset
  1204
        self infoLabelHolder value:(lines firstOrNil) 
3508
ba75f68aaa04 #UI_ENHANCEMENT
Claus Gittinger <cg@exept.de>
parents: 3354
diff changeset
  1205
    ].
4096
f2a7b387a402 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 4071
diff changeset
  1206
f2a7b387a402 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 4071
diff changeset
  1207
    "Modified: / 27-05-2018 / 12:19:01 / Claus Gittinger"
1018
7222534cb3dc part of the activeHelp framework moved to ApplicationModel.
Claus Gittinger <cg@exept.de>
parents: 1016
diff changeset
  1208
!
7222534cb3dc part of the activeHelp framework moved to ApplicationModel.
Claus Gittinger <cg@exept.de>
parents: 1016
diff changeset
  1209
7222534cb3dc part of the activeHelp framework moved to ApplicationModel.
Claus Gittinger <cg@exept.de>
parents: 1016
diff changeset
  1210
showingHelp
4253
eddc0118e0a5 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 4209
diff changeset
  1211
    "returns true, if automatic display of help (in my infoLine - not the tooltips) 
eddc0118e0a5 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 4209
diff changeset
  1212
     is enabled for this application"
782
5b8c4cf62cb5 activeHelp changed as instClassVar + some other cleans
tz
parents: 779
diff changeset
  1213
783
4e1545900244 show help corrections
tz
parents: 782
diff changeset
  1214
    |currentActiveHelp|
858
a36ca9158a69 show help bug fixed
tz
parents: 853
diff changeset
  1215
783
4e1545900244 show help corrections
tz
parents: 782
diff changeset
  1216
    currentActiveHelp := ActiveHelp currentHelpListener.
4e1545900244 show help corrections
tz
parents: 782
diff changeset
  1217
1018
7222534cb3dc part of the activeHelp framework moved to ApplicationModel.
Claus Gittinger <cg@exept.de>
parents: 1016
diff changeset
  1218
    ^ self class showingHelp 
2919
b21470d5e318 changed:
Claus Gittinger <cg@exept.de>
parents: 2907
diff changeset
  1219
      and: [currentActiveHelp notNil 
b21470d5e318 changed:
Claus Gittinger <cg@exept.de>
parents: 2907
diff changeset
  1220
      and: [ currentActiveHelp interestedIn: self window]]
1051
65dfbf6481b5 showingHelp fixed (tree-item editor)
Claus Gittinger <cg@exept.de>
parents: 1043
diff changeset
  1221
65dfbf6481b5 showingHelp fixed (tree-item editor)
Claus Gittinger <cg@exept.de>
parents: 1043
diff changeset
  1222
"/    ^ self class showingHelp 
65dfbf6481b5 showingHelp fixed (tree-item editor)
Claus Gittinger <cg@exept.de>
parents: 1043
diff changeset
  1223
"/      and: [currentActiveHelp notNil and: [masterApplication notNil 
65dfbf6481b5 showingHelp fixed (tree-item editor)
Claus Gittinger <cg@exept.de>
parents: 1043
diff changeset
  1224
"/                ifFalse: [currentActiveHelp interestedIn: self window]
65dfbf6481b5 showingHelp fixed (tree-item editor)
Claus Gittinger <cg@exept.de>
parents: 1043
diff changeset
  1225
"/                ifTrue:  [currentActiveHelp interestedIn: masterApplication window]]]
782
5b8c4cf62cb5 activeHelp changed as instClassVar + some other cleans
tz
parents: 779
diff changeset
  1226
2919
b21470d5e318 changed:
Claus Gittinger <cg@exept.de>
parents: 2907
diff changeset
  1227
    "Created: / 31-07-1998 / 17:57:03 / cg"
b21470d5e318 changed:
Claus Gittinger <cg@exept.de>
parents: 2907
diff changeset
  1228
    "Modified: / 22-08-1998 / 00:06:38 / cg"
b21470d5e318 changed:
Claus Gittinger <cg@exept.de>
parents: 2907
diff changeset
  1229
    "Modified (format): / 06-07-2011 / 17:47:51 / cg"
782
5b8c4cf62cb5 activeHelp changed as instClassVar + some other cleans
tz
parents: 779
diff changeset
  1230
!
5b8c4cf62cb5 activeHelp changed as instClassVar + some other cleans
tz
parents: 779
diff changeset
  1231
1018
7222534cb3dc part of the activeHelp framework moved to ApplicationModel.
Claus Gittinger <cg@exept.de>
parents: 1016
diff changeset
  1232
showingHelp: aValue
7222534cb3dc part of the activeHelp framework moved to ApplicationModel.
Claus Gittinger <cg@exept.de>
parents: 1016
diff changeset
  1233
    "toggles showing help for this application"
984
a0a868c45691 show help synchronously
Claus Gittinger <cg@exept.de>
parents: 982
diff changeset
  1234
2919
b21470d5e318 changed:
Claus Gittinger <cg@exept.de>
parents: 2907
diff changeset
  1235
    aValue "(self class showingHelp: aValue)"
1018
7222534cb3dc part of the activeHelp framework moved to ApplicationModel.
Claus Gittinger <cg@exept.de>
parents: 1016
diff changeset
  1236
        ifTrue:  [ActiveHelp startFor:self]
7222534cb3dc part of the activeHelp framework moved to ApplicationModel.
Claus Gittinger <cg@exept.de>
parents: 1016
diff changeset
  1237
        ifFalse: [ActiveHelp stopFor:self. self updateInfoLabel]
984
a0a868c45691 show help synchronously
Claus Gittinger <cg@exept.de>
parents: 982
diff changeset
  1238
2919
b21470d5e318 changed:
Claus Gittinger <cg@exept.de>
parents: 2907
diff changeset
  1239
    "Created: / 31-07-1998 / 18:20:44 / cg"
b21470d5e318 changed:
Claus Gittinger <cg@exept.de>
parents: 2907
diff changeset
  1240
    "Modified: / 06-07-2011 / 18:02:48 / cg"
822
374400d57e0b some useful aspects added
tz
parents: 821
diff changeset
  1241
!
374400d57e0b some useful aspects added
tz
parents: 821
diff changeset
  1242
374400d57e0b some useful aspects added
tz
parents: 821
diff changeset
  1243
updateInfoLabel
1018
7222534cb3dc part of the activeHelp framework moved to ApplicationModel.
Claus Gittinger <cg@exept.de>
parents: 1016
diff changeset
  1244
    "updates the info label at the bottom of this application"
822
374400d57e0b some useful aspects added
tz
parents: 821
diff changeset
  1245
2104
ac3c0a89fd95 valueOf* methods renamed
Claus Gittinger <cg@exept.de>
parents: 2098
diff changeset
  1246
    self infoLabelHolder value: self defaultInfoLabel
1018
7222534cb3dc part of the activeHelp framework moved to ApplicationModel.
Claus Gittinger <cg@exept.de>
parents: 1016
diff changeset
  1247
7222534cb3dc part of the activeHelp framework moved to ApplicationModel.
Claus Gittinger <cg@exept.de>
parents: 1016
diff changeset
  1248
    "Modified: / 31.7.1998 / 18:44:46 / cg"
1526
02941e80a146 refactored aboutBox setup for easier subclassing
Claus Gittinger <cg@exept.de>
parents: 1516
diff changeset
  1249
!
02941e80a146 refactored aboutBox setup for easier subclassing
Claus Gittinger <cg@exept.de>
parents: 1516
diff changeset
  1250
02941e80a146 refactored aboutBox setup for easier subclassing
Claus Gittinger <cg@exept.de>
parents: 1516
diff changeset
  1251
xxopenAboutThisApplication
02941e80a146 refactored aboutBox setup for easier subclassing
Claus Gittinger <cg@exept.de>
parents: 1516
diff changeset
  1252
    "opens an about box for this application.
02941e80a146 refactored aboutBox setup for easier subclassing
Claus Gittinger <cg@exept.de>
parents: 1516
diff changeset
  1253
     Extracts some common info (i.e. class revision, author etc. from
02941e80a146 refactored aboutBox setup for easier subclassing
Claus Gittinger <cg@exept.de>
parents: 1516
diff changeset
  1254
     the classes documentation."
02941e80a146 refactored aboutBox setup for easier subclassing
Claus Gittinger <cg@exept.de>
parents: 1516
diff changeset
  1255
02941e80a146 refactored aboutBox setup for easier subclassing
Claus Gittinger <cg@exept.de>
parents: 1516
diff changeset
  1256
    |rev box myClass clsRev image msg|
02941e80a146 refactored aboutBox setup for easier subclassing
Claus Gittinger <cg@exept.de>
parents: 1516
diff changeset
  1257
02941e80a146 refactored aboutBox setup for easier subclassing
Claus Gittinger <cg@exept.de>
parents: 1516
diff changeset
  1258
    rev := ''.
02941e80a146 refactored aboutBox setup for easier subclassing
Claus Gittinger <cg@exept.de>
parents: 1516
diff changeset
  1259
    myClass := self class.
02941e80a146 refactored aboutBox setup for easier subclassing
Claus Gittinger <cg@exept.de>
parents: 1516
diff changeset
  1260
02941e80a146 refactored aboutBox setup for easier subclassing
Claus Gittinger <cg@exept.de>
parents: 1516
diff changeset
  1261
    (clsRev := myClass revision) notNil ifTrue: [rev := '  (rev: ', clsRev printString, ')'].
02941e80a146 refactored aboutBox setup for easier subclassing
Claus Gittinger <cg@exept.de>
parents: 1516
diff changeset
  1262
02941e80a146 refactored aboutBox setup for easier subclassing
Claus Gittinger <cg@exept.de>
parents: 1516
diff changeset
  1263
    msg := '\The application\\' withCRs
3547
f3221c6ff930 #REFACTORING
Claus Gittinger <cg@exept.de>
parents: 3521
diff changeset
  1264
        , myClass name allBold, rev
1526
02941e80a146 refactored aboutBox setup for easier subclassing
Claus Gittinger <cg@exept.de>
parents: 1516
diff changeset
  1265
        , '\\has been designed and implemented by: \' withCRs
02941e80a146 refactored aboutBox setup for easier subclassing
Claus Gittinger <cg@exept.de>
parents: 1516
diff changeset
  1266
        , ((self class authorLinesForAboutBox collect:[:l | '- ' , l]) asStringWith:$\) withCRs
02941e80a146 refactored aboutBox setup for easier subclassing
Claus Gittinger <cg@exept.de>
parents: 1516
diff changeset
  1267
        , '\\' withCRs.
02941e80a146 refactored aboutBox setup for easier subclassing
Claus Gittinger <cg@exept.de>
parents: 1516
diff changeset
  1268
    msg := msg withTabsExpanded.
02941e80a146 refactored aboutBox setup for easier subclassing
Claus Gittinger <cg@exept.de>
parents: 1516
diff changeset
  1269
02941e80a146 refactored aboutBox setup for easier subclassing
Claus Gittinger <cg@exept.de>
parents: 1516
diff changeset
  1270
    AboutBox isNil ifTrue:[
02941e80a146 refactored aboutBox setup for easier subclassing
Claus Gittinger <cg@exept.de>
parents: 1516
diff changeset
  1271
        "/ this handles bad installations of ST/X,
02941e80a146 refactored aboutBox setup for easier subclassing
Claus Gittinger <cg@exept.de>
parents: 1516
diff changeset
  1272
        "/ where the AboutBox is missing.
02941e80a146 refactored aboutBox setup for easier subclassing
Claus Gittinger <cg@exept.de>
parents: 1516
diff changeset
  1273
        "/ (May vanish in the future)
02941e80a146 refactored aboutBox setup for easier subclassing
Claus Gittinger <cg@exept.de>
parents: 1516
diff changeset
  1274
        ^ self information:msg
02941e80a146 refactored aboutBox setup for easier subclassing
Claus Gittinger <cg@exept.de>
parents: 1516
diff changeset
  1275
    ].
02941e80a146 refactored aboutBox setup for easier subclassing
Claus Gittinger <cg@exept.de>
parents: 1516
diff changeset
  1276
02941e80a146 refactored aboutBox setup for easier subclassing
Claus Gittinger <cg@exept.de>
parents: 1516
diff changeset
  1277
    box := AboutBox title:msg.
02941e80a146 refactored aboutBox setup for easier subclassing
Claus Gittinger <cg@exept.de>
parents: 1516
diff changeset
  1278
02941e80a146 refactored aboutBox setup for easier subclassing
Claus Gittinger <cg@exept.de>
parents: 1516
diff changeset
  1279
    image := self aboutImage.
02941e80a146 refactored aboutBox setup for easier subclassing
Claus Gittinger <cg@exept.de>
parents: 1516
diff changeset
  1280
    image notNil ifTrue:[
02941e80a146 refactored aboutBox setup for easier subclassing
Claus Gittinger <cg@exept.de>
parents: 1516
diff changeset
  1281
        box image:image
02941e80a146 refactored aboutBox setup for easier subclassing
Claus Gittinger <cg@exept.de>
parents: 1516
diff changeset
  1282
    ].
02941e80a146 refactored aboutBox setup for easier subclassing
Claus Gittinger <cg@exept.de>
parents: 1516
diff changeset
  1283
    box   label:(resources string:self aboutThisApplicationLabel).
02941e80a146 refactored aboutBox setup for easier subclassing
Claus Gittinger <cg@exept.de>
parents: 1516
diff changeset
  1284
    box   autoHideAfter:10 with:[].
02941e80a146 refactored aboutBox setup for easier subclassing
Claus Gittinger <cg@exept.de>
parents: 1516
diff changeset
  1285
    box   showAtPointer.
02941e80a146 refactored aboutBox setup for easier subclassing
Claus Gittinger <cg@exept.de>
parents: 1516
diff changeset
  1286
02941e80a146 refactored aboutBox setup for easier subclassing
Claus Gittinger <cg@exept.de>
parents: 1516
diff changeset
  1287
    "Modified: / 13.11.2001 / 12:31:28 / cg"
02941e80a146 refactored aboutBox setup for easier subclassing
Claus Gittinger <cg@exept.de>
parents: 1516
diff changeset
  1288
    "Created: / 13.11.2001 / 12:34:27 / cg"
762
2c25cc1b363e detour help texts into bottomed info label
tz
parents: 761
diff changeset
  1289
! !
2c25cc1b363e detour help texts into bottomed info label
tz
parents: 761
diff changeset
  1290
753
9c837d99f109 intitial checkin
tz
parents:
diff changeset
  1291
!ToolApplicationModel methodsFor:'history'!
9c837d99f109 intitial checkin
tz
parents:
diff changeset
  1292
2098
37ea7570cd6b code cleanup & refactoring
Claus Gittinger <cg@exept.de>
parents: 2084
diff changeset
  1293
add:aHistoryEntry toHistory:aHistory
1969
8e8f5998d053 separate fileHistory
Claus Gittinger <cg@exept.de>
parents: 1809
diff changeset
  1294
    "adds aHistoryEntry (format: loadMessage -> evalString) at the top of aHistory,
8e8f5998d053 separate fileHistory
Claus Gittinger <cg@exept.de>
parents: 1809
diff changeset
  1295
     and checks for maximum size of the history"
8e8f5998d053 separate fileHistory
Claus Gittinger <cg@exept.de>
parents: 1809
diff changeset
  1296
2098
37ea7570cd6b code cleanup & refactoring
Claus Gittinger <cg@exept.de>
parents: 2084
diff changeset
  1297
    aHistory remove:aHistoryEntry ifAbsent:nil.
1969
8e8f5998d053 separate fileHistory
Claus Gittinger <cg@exept.de>
parents: 1809
diff changeset
  1298
    aHistory addFirst: aHistoryEntry.
8e8f5998d053 separate fileHistory
Claus Gittinger <cg@exept.de>
parents: 1809
diff changeset
  1299
    [aHistory size > self class historyMaxSize] whileTrue: [aHistory removeLast]
8e8f5998d053 separate fileHistory
Claus Gittinger <cg@exept.de>
parents: 1809
diff changeset
  1300
!
8e8f5998d053 separate fileHistory
Claus Gittinger <cg@exept.de>
parents: 1809
diff changeset
  1301
2098
37ea7570cd6b code cleanup & refactoring
Claus Gittinger <cg@exept.de>
parents: 2084
diff changeset
  1302
addHistoryEntryForClass:classToAdd selector:selectorToAdd
37ea7570cd6b code cleanup & refactoring
Claus Gittinger <cg@exept.de>
parents: 2084
diff changeset
  1303
    "adds aHistoryEntry (format: loadMessage -> evalString) at the top of the history,
37ea7570cd6b code cleanup & refactoring
Claus Gittinger <cg@exept.de>
parents: 2084
diff changeset
  1304
     and checks for maximum size of the history"
37ea7570cd6b code cleanup & refactoring
Claus Gittinger <cg@exept.de>
parents: 2084
diff changeset
  1305
37ea7570cd6b code cleanup & refactoring
Claus Gittinger <cg@exept.de>
parents: 2084
diff changeset
  1306
    |entry|
37ea7570cd6b code cleanup & refactoring
Claus Gittinger <cg@exept.de>
parents: 2084
diff changeset
  1307
37ea7570cd6b code cleanup & refactoring
Claus Gittinger <cg@exept.de>
parents: 2084
diff changeset
  1308
    self assert:(classToAdd isBehavior).
37ea7570cd6b code cleanup & refactoring
Claus Gittinger <cg@exept.de>
parents: 2084
diff changeset
  1309
    entry := HistoryEntryForMethod class:classToAdd selector:selectorToAdd.
37ea7570cd6b code cleanup & refactoring
Claus Gittinger <cg@exept.de>
parents: 2084
diff changeset
  1310
    self addToHistory:entry
37ea7570cd6b code cleanup & refactoring
Claus Gittinger <cg@exept.de>
parents: 2084
diff changeset
  1311
!
37ea7570cd6b code cleanup & refactoring
Claus Gittinger <cg@exept.de>
parents: 2084
diff changeset
  1312
37ea7570cd6b code cleanup & refactoring
Claus Gittinger <cg@exept.de>
parents: 2084
diff changeset
  1313
addHistoryEntryForFile:fileName
37ea7570cd6b code cleanup & refactoring
Claus Gittinger <cg@exept.de>
parents: 2084
diff changeset
  1314
    |entry|
37ea7570cd6b code cleanup & refactoring
Claus Gittinger <cg@exept.de>
parents: 2084
diff changeset
  1315
37ea7570cd6b code cleanup & refactoring
Claus Gittinger <cg@exept.de>
parents: 2084
diff changeset
  1316
    entry := HistoryEntryForFile filename:fileName.
37ea7570cd6b code cleanup & refactoring
Claus Gittinger <cg@exept.de>
parents: 2084
diff changeset
  1317
    self addToHistory:entry
37ea7570cd6b code cleanup & refactoring
Claus Gittinger <cg@exept.de>
parents: 2084
diff changeset
  1318
!
37ea7570cd6b code cleanup & refactoring
Claus Gittinger <cg@exept.de>
parents: 2084
diff changeset
  1319
1969
8e8f5998d053 separate fileHistory
Claus Gittinger <cg@exept.de>
parents: 1809
diff changeset
  1320
addToFileHistory: aHistoryEntry
8e8f5998d053 separate fileHistory
Claus Gittinger <cg@exept.de>
parents: 1809
diff changeset
  1321
    "adds aHistoryEntry (format: loadMessage -> evalString) at the top of the file-history,
8e8f5998d053 separate fileHistory
Claus Gittinger <cg@exept.de>
parents: 1809
diff changeset
  1322
     and checks for maximum size of the history"
8e8f5998d053 separate fileHistory
Claus Gittinger <cg@exept.de>
parents: 1809
diff changeset
  1323
2098
37ea7570cd6b code cleanup & refactoring
Claus Gittinger <cg@exept.de>
parents: 2084
diff changeset
  1324
    self add:aHistoryEntry toHistory:self fileHistory
1969
8e8f5998d053 separate fileHistory
Claus Gittinger <cg@exept.de>
parents: 1809
diff changeset
  1325
!
8e8f5998d053 separate fileHistory
Claus Gittinger <cg@exept.de>
parents: 1809
diff changeset
  1326
753
9c837d99f109 intitial checkin
tz
parents:
diff changeset
  1327
addToHistory: aHistoryEntry
907
f4087882555a method comments added
tz
parents: 893
diff changeset
  1328
    "adds aHistoryEntry (format: loadMessage -> evalString) at the top of the history,
f4087882555a method comments added
tz
parents: 893
diff changeset
  1329
     and checks for maximum size of the history"
753
9c837d99f109 intitial checkin
tz
parents:
diff changeset
  1330
2098
37ea7570cd6b code cleanup & refactoring
Claus Gittinger <cg@exept.de>
parents: 2084
diff changeset
  1331
    self add:aHistoryEntry toHistory:self history
1969
8e8f5998d053 separate fileHistory
Claus Gittinger <cg@exept.de>
parents: 1809
diff changeset
  1332
!
8e8f5998d053 separate fileHistory
Claus Gittinger <cg@exept.de>
parents: 1809
diff changeset
  1333
8e8f5998d053 separate fileHistory
Claus Gittinger <cg@exept.de>
parents: 1809
diff changeset
  1334
emptyFileHistory
8e8f5998d053 separate fileHistory
Claus Gittinger <cg@exept.de>
parents: 1809
diff changeset
  1335
    "removes all history entries"
8e8f5998d053 separate fileHistory
Claus Gittinger <cg@exept.de>
parents: 1809
diff changeset
  1336
8e8f5998d053 separate fileHistory
Claus Gittinger <cg@exept.de>
parents: 1809
diff changeset
  1337
    ^ self fileHistory removeAll
753
9c837d99f109 intitial checkin
tz
parents:
diff changeset
  1338
!
9c837d99f109 intitial checkin
tz
parents:
diff changeset
  1339
9c837d99f109 intitial checkin
tz
parents:
diff changeset
  1340
emptyHistory
907
f4087882555a method comments added
tz
parents: 893
diff changeset
  1341
    "removes all history entries"
753
9c837d99f109 intitial checkin
tz
parents:
diff changeset
  1342
9c837d99f109 intitial checkin
tz
parents:
diff changeset
  1343
    ^self history removeAll
9c837d99f109 intitial checkin
tz
parents:
diff changeset
  1344
!
9c837d99f109 intitial checkin
tz
parents:
diff changeset
  1345
1969
8e8f5998d053 separate fileHistory
Claus Gittinger <cg@exept.de>
parents: 1809
diff changeset
  1346
fileHistory
8e8f5998d053 separate fileHistory
Claus Gittinger <cg@exept.de>
parents: 1809
diff changeset
  1347
    "returns the file-history from tool class"
8e8f5998d053 separate fileHistory
Claus Gittinger <cg@exept.de>
parents: 1809
diff changeset
  1348
8e8f5998d053 separate fileHistory
Claus Gittinger <cg@exept.de>
parents: 1809
diff changeset
  1349
    ^ self class getFileHistory
8e8f5998d053 separate fileHistory
Claus Gittinger <cg@exept.de>
parents: 1809
diff changeset
  1350
!
8e8f5998d053 separate fileHistory
Claus Gittinger <cg@exept.de>
parents: 1809
diff changeset
  1351
753
9c837d99f109 intitial checkin
tz
parents:
diff changeset
  1352
history
907
f4087882555a method comments added
tz
parents: 893
diff changeset
  1353
    "returns the history from tool class"
753
9c837d99f109 intitial checkin
tz
parents:
diff changeset
  1354
1969
8e8f5998d053 separate fileHistory
Claus Gittinger <cg@exept.de>
parents: 1809
diff changeset
  1355
    ^ self class getHistory
753
9c837d99f109 intitial checkin
tz
parents:
diff changeset
  1356
!
9c837d99f109 intitial checkin
tz
parents:
diff changeset
  1357
9c837d99f109 intitial checkin
tz
parents:
diff changeset
  1358
menuHistory
4007
fee18ec30eb3 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 3958
diff changeset
  1359
    "returns a dynamic history submenu.
fee18ec30eb3 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 3958
diff changeset
  1360
     Subclasses should define #history to provide history items which
fee18ec30eb3 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 3958
diff changeset
  1361
     implement printStringInMenu and are passed to loadFromHistoryEntry:"
753
9c837d99f109 intitial checkin
tz
parents:
diff changeset
  1362
1660
a6e519a4b41f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1644
diff changeset
  1363
    <resource: #programMenu >
a6e519a4b41f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1644
diff changeset
  1364
1809
cfcbb13afdb5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1767
diff changeset
  1365
    |menu anyItem clearItem|
920
6b72e4ce4406 must find gui resources (xlations in in history menu)
Claus Gittinger <cg@exept.de>
parents: 910
diff changeset
  1366
753
9c837d99f109 intitial checkin
tz
parents:
diff changeset
  1367
    menu := Menu new receiver: self.
1809
cfcbb13afdb5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1767
diff changeset
  1368
    anyItem := false.
753
9c837d99f109 intitial checkin
tz
parents:
diff changeset
  1369
2098
37ea7570cd6b code cleanup & refactoring
Claus Gittinger <cg@exept.de>
parents: 2084
diff changeset
  1370
    ((self history 
3019
5badbdb40d34 changed: #menuHistory
Stefan Vogel <sv@exept.de>
parents: 2919
diff changeset
  1371
        collect: [:histEntry| histEntry class] as:Set) 
5badbdb40d34 changed: #menuHistory
Stefan Vogel <sv@exept.de>
parents: 2919
diff changeset
  1372
            asSortedCollection:[:a :b | a name < b name]) 
4008
f7f1b89886ef #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 4007
diff changeset
  1373
                do:[:historyEntryType|    
f7f1b89886ef #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 4007
diff changeset
  1374
                    menu addItemGroup:
f7f1b89886ef #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 4007
diff changeset
  1375
                            (self history 
f7f1b89886ef #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 4007
diff changeset
  1376
                                select: [:histEntry| 
f7f1b89886ef #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 4007
diff changeset
  1377
                                    (histEntry class = historyEntryType)
f7f1b89886ef #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 4007
diff changeset
  1378
                                    and:[ histEntry isValid ] 
f7f1b89886ef #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 4007
diff changeset
  1379
                                ] 
f7f1b89886ef #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 4007
diff changeset
  1380
                                thenCollect: [:histEntry|
f7f1b89886ef #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 4007
diff changeset
  1381
                                    anyItem := true.
f7f1b89886ef #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 4007
diff changeset
  1382
                                    MenuItem new 
f7f1b89886ef #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 4007
diff changeset
  1383
                                        label: histEntry printStringInMenu 
f7f1b89886ef #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 4007
diff changeset
  1384
                                        itemValue: #loadFromHistoryEntry: argument: histEntry; 
f7f1b89886ef #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 4007
diff changeset
  1385
                                        activeHelpKey: #historyMenuItem
f7f1b89886ef #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 4007
diff changeset
  1386
                                ]
f7f1b89886ef #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 4007
diff changeset
  1387
                            ).
f7f1b89886ef #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 4007
diff changeset
  1388
                ]. 
1809
cfcbb13afdb5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1767
diff changeset
  1389
3354
a7fd7d764bd0 class: ToolApplicationModel
Claus Gittinger <cg@exept.de>
parents: 3312
diff changeset
  1390
    clearItem := MenuItem label: 'Clear History' itemValue: #emptyHistory enabled:anyItem. 
a7fd7d764bd0 class: ToolApplicationModel
Claus Gittinger <cg@exept.de>
parents: 3312
diff changeset
  1391
    clearItem activeHelpKey: #historyEmptyMenu.
1809
cfcbb13afdb5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1767
diff changeset
  1392
    menu addItem: clearItem.
920
6b72e4ce4406 must find gui resources (xlations in in history menu)
Claus Gittinger <cg@exept.de>
parents: 910
diff changeset
  1393
6b72e4ce4406 must find gui resources (xlations in in history menu)
Claus Gittinger <cg@exept.de>
parents: 910
diff changeset
  1394
    menu findGuiResourcesIn:self.
753
9c837d99f109 intitial checkin
tz
parents:
diff changeset
  1395
    ^menu
920
6b72e4ce4406 must find gui resources (xlations in in history menu)
Claus Gittinger <cg@exept.de>
parents: 910
diff changeset
  1396
4008
f7f1b89886ef #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 4007
diff changeset
  1397
    "Modified: / 01-09-2017 / 10:16:26 / cg"
753
9c837d99f109 intitial checkin
tz
parents:
diff changeset
  1398
!
9c837d99f109 intitial checkin
tz
parents:
diff changeset
  1399
1969
8e8f5998d053 separate fileHistory
Claus Gittinger <cg@exept.de>
parents: 1809
diff changeset
  1400
remove:aHistoryEntry fromHistory: aHistory
8e8f5998d053 separate fileHistory
Claus Gittinger <cg@exept.de>
parents: 1809
diff changeset
  1401
    "removes aHistoryEntry from the history"
8e8f5998d053 separate fileHistory
Claus Gittinger <cg@exept.de>
parents: 1809
diff changeset
  1402
8e8f5998d053 separate fileHistory
Claus Gittinger <cg@exept.de>
parents: 1809
diff changeset
  1403
    aHistory remove: (aHistory detect: [:histEntry| histEntry key = aHistoryEntry key] ifNone: nil) ifAbsent: nil.
8e8f5998d053 separate fileHistory
Claus Gittinger <cg@exept.de>
parents: 1809
diff changeset
  1404
    [aHistory size > self class historyMaxSize] whileTrue: [aHistory removeLast]
8e8f5998d053 separate fileHistory
Claus Gittinger <cg@exept.de>
parents: 1809
diff changeset
  1405
!
8e8f5998d053 separate fileHistory
Claus Gittinger <cg@exept.de>
parents: 1809
diff changeset
  1406
2098
37ea7570cd6b code cleanup & refactoring
Claus Gittinger <cg@exept.de>
parents: 2084
diff changeset
  1407
removeFromHistory:aHistoryEntry
907
f4087882555a method comments added
tz
parents: 893
diff changeset
  1408
    "removes aHistoryEntry from the history"
753
9c837d99f109 intitial checkin
tz
parents:
diff changeset
  1409
1969
8e8f5998d053 separate fileHistory
Claus Gittinger <cg@exept.de>
parents: 1809
diff changeset
  1410
    self remove:aHistoryEntry fromHistory: self history.
753
9c837d99f109 intitial checkin
tz
parents:
diff changeset
  1411
! !
9c837d99f109 intitial checkin
tz
parents:
diff changeset
  1412
982
807f440e0df7 bw. compatibility - needs builder early.
Claus Gittinger <cg@exept.de>
parents: 971
diff changeset
  1413
!ToolApplicationModel methodsFor:'initialization'!
807f440e0df7 bw. compatibility - needs builder early.
Claus Gittinger <cg@exept.de>
parents: 971
diff changeset
  1414
807f440e0df7 bw. compatibility - needs builder early.
Claus Gittinger <cg@exept.de>
parents: 971
diff changeset
  1415
initialize
807f440e0df7 bw. compatibility - needs builder early.
Claus Gittinger <cg@exept.de>
parents: 971
diff changeset
  1416
    super initialize.
807f440e0df7 bw. compatibility - needs builder early.
Claus Gittinger <cg@exept.de>
parents: 971
diff changeset
  1417
    self createBuilder
807f440e0df7 bw. compatibility - needs builder early.
Claus Gittinger <cg@exept.de>
parents: 971
diff changeset
  1418
807f440e0df7 bw. compatibility - needs builder early.
Claus Gittinger <cg@exept.de>
parents: 971
diff changeset
  1419
    "Created: / 20.6.1998 / 14:51:29 / cg"
807f440e0df7 bw. compatibility - needs builder early.
Claus Gittinger <cg@exept.de>
parents: 971
diff changeset
  1420
! !
807f440e0df7 bw. compatibility - needs builder early.
Claus Gittinger <cg@exept.de>
parents: 971
diff changeset
  1421
1200
a86be4f3fd69 added clearModifiedFlag
Claus Gittinger <cg@exept.de>
parents: 1195
diff changeset
  1422
!ToolApplicationModel methodsFor:'misc'!
a86be4f3fd69 added clearModifiedFlag
Claus Gittinger <cg@exept.de>
parents: 1195
diff changeset
  1423
a86be4f3fd69 added clearModifiedFlag
Claus Gittinger <cg@exept.de>
parents: 1195
diff changeset
  1424
clearModifiedFlag
a86be4f3fd69 added clearModifiedFlag
Claus Gittinger <cg@exept.de>
parents: 1195
diff changeset
  1425
    "clear the modifiedChannel.
a86be4f3fd69 added clearModifiedFlag
Claus Gittinger <cg@exept.de>
parents: 1195
diff changeset
  1426
     That one is hooked to components in the right noteBook,
a86be4f3fd69 added clearModifiedFlag
Claus Gittinger <cg@exept.de>
parents: 1195
diff changeset
  1427
     and will be set, when any value is modified.
a86be4f3fd69 added clearModifiedFlag
Claus Gittinger <cg@exept.de>
parents: 1195
diff changeset
  1428
     (to enable OK and cancel buttons)"
a86be4f3fd69 added clearModifiedFlag
Claus Gittinger <cg@exept.de>
parents: 1195
diff changeset
  1429
a86be4f3fd69 added clearModifiedFlag
Claus Gittinger <cg@exept.de>
parents: 1195
diff changeset
  1430
    self modifiedChannel value:false
a86be4f3fd69 added clearModifiedFlag
Claus Gittinger <cg@exept.de>
parents: 1195
diff changeset
  1431
! !
a86be4f3fd69 added clearModifiedFlag
Claus Gittinger <cg@exept.de>
parents: 1195
diff changeset
  1432
782
5b8c4cf62cb5 activeHelp changed as instClassVar + some other cleans
tz
parents: 779
diff changeset
  1433
!ToolApplicationModel methodsFor:'queries'!
5b8c4cf62cb5 activeHelp changed as instClassVar + some other cleans
tz
parents: 779
diff changeset
  1434
876
585929b1fec2 some cleans
tz
parents: 872
diff changeset
  1435
allToolInstances
907
f4087882555a method comments added
tz
parents: 893
diff changeset
  1436
    "returns all instances of this tool class"
876
585929b1fec2 some cleans
tz
parents: 872
diff changeset
  1437
1150
5211197a2671 NEVER - redefine allInstances
Claus Gittinger <cg@exept.de>
parents: 1148
diff changeset
  1438
    ^ self class allToolInstances
1089
49b05d386ccc removed Thomas's memory leak
Claus Gittinger <cg@exept.de>
parents: 1084
diff changeset
  1439
49b05d386ccc removed Thomas's memory leak
Claus Gittinger <cg@exept.de>
parents: 1084
diff changeset
  1440
    "Modified: / 4.2.1999 / 15:34:58 / cg"
876
585929b1fec2 some cleans
tz
parents: 872
diff changeset
  1441
!
585929b1fec2 some cleans
tz
parents: 872
diff changeset
  1442
782
5b8c4cf62cb5 activeHelp changed as instClassVar + some other cleans
tz
parents: 779
diff changeset
  1443
preferredExtent
4209
2a062bc7c378 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 4145
diff changeset
  1444
    "preferred extent of my window; 
2a062bc7c378 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 4145
diff changeset
  1445
     top/main menu and top toolbar (named by 'menuToolbarView')
782
5b8c4cf62cb5 activeHelp changed as instClassVar + some other cleans
tz
parents: 779
diff changeset
  1446
     will be considered"
5b8c4cf62cb5 activeHelp changed as instClassVar + some other cleans
tz
parents: 779
diff changeset
  1447
1998
f1ebf439582d Do not set maxExtent (to the Screen size) in StandartSystemView.
Stefan Vogel <sv@exept.de>
parents: 1989
diff changeset
  1448
    |window menu menuToolbarView preferredExtentOfWindow maxExtent|
782
5b8c4cf62cb5 activeHelp changed as instClassVar + some other cleans
tz
parents: 779
diff changeset
  1449
5b8c4cf62cb5 activeHelp changed as instClassVar + some other cleans
tz
parents: 779
diff changeset
  1450
    window          := self builder window. 
5b8c4cf62cb5 activeHelp changed as instClassVar + some other cleans
tz
parents: 779
diff changeset
  1451
    menu            := window subViews first.
5b8c4cf62cb5 activeHelp changed as instClassVar + some other cleans
tz
parents: 779
diff changeset
  1452
    menuToolbarView := builder componentAt: #menuToolbarView.
5b8c4cf62cb5 activeHelp changed as instClassVar + some other cleans
tz
parents: 779
diff changeset
  1453
1998
f1ebf439582d Do not set maxExtent (to the Screen size) in StandartSystemView.
Stefan Vogel <sv@exept.de>
parents: 1989
diff changeset
  1454
    preferredExtentOfWindow := window extent max:window minExtent.
f1ebf439582d Do not set maxExtent (to the Screen size) in StandartSystemView.
Stefan Vogel <sv@exept.de>
parents: 1989
diff changeset
  1455
    menu class == MenuPanel ifTrue:[
f1ebf439582d Do not set maxExtent (to the Screen size) in StandartSystemView.
Stefan Vogel <sv@exept.de>
parents: 1989
diff changeset
  1456
        preferredExtentOfWindow := preferredExtentOfWindow max:menu preferredExtent
f1ebf439582d Do not set maxExtent (to the Screen size) in StandartSystemView.
Stefan Vogel <sv@exept.de>
parents: 1989
diff changeset
  1457
    ].
f1ebf439582d Do not set maxExtent (to the Screen size) in StandartSystemView.
Stefan Vogel <sv@exept.de>
parents: 1989
diff changeset
  1458
    menuToolbarView notNil ifTrue:[
f1ebf439582d Do not set maxExtent (to the Screen size) in StandartSystemView.
Stefan Vogel <sv@exept.de>
parents: 1989
diff changeset
  1459
        preferredExtentOfWindow := preferredExtentOfWindow max:menuToolbarView preferredExtent
f1ebf439582d Do not set maxExtent (to the Screen size) in StandartSystemView.
Stefan Vogel <sv@exept.de>
parents: 1989
diff changeset
  1460
    ].
782
5b8c4cf62cb5 activeHelp changed as instClassVar + some other cleans
tz
parents: 779
diff changeset
  1461
1998
f1ebf439582d Do not set maxExtent (to the Screen size) in StandartSystemView.
Stefan Vogel <sv@exept.de>
parents: 1989
diff changeset
  1462
    maxExtent := window maxExtent.
f1ebf439582d Do not set maxExtent (to the Screen size) in StandartSystemView.
Stefan Vogel <sv@exept.de>
parents: 1989
diff changeset
  1463
    maxExtent notNil ifTrue:[
f1ebf439582d Do not set maxExtent (to the Screen size) in StandartSystemView.
Stefan Vogel <sv@exept.de>
parents: 1989
diff changeset
  1464
        preferredExtentOfWindow := preferredExtentOfWindow min:maxExtent.
f1ebf439582d Do not set maxExtent (to the Screen size) in StandartSystemView.
Stefan Vogel <sv@exept.de>
parents: 1989
diff changeset
  1465
    ].
f1ebf439582d Do not set maxExtent (to the Screen size) in StandartSystemView.
Stefan Vogel <sv@exept.de>
parents: 1989
diff changeset
  1466
f1ebf439582d Do not set maxExtent (to the Screen size) in StandartSystemView.
Stefan Vogel <sv@exept.de>
parents: 1989
diff changeset
  1467
    ^ preferredExtentOfWindow.
4209
2a062bc7c378 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 4145
diff changeset
  1468
2a062bc7c378 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 4145
diff changeset
  1469
    "Modified (comment): / 09-11-2018 / 20:11:37 / Claus Gittinger"
782
5b8c4cf62cb5 activeHelp changed as instClassVar + some other cleans
tz
parents: 779
diff changeset
  1470
! !
5b8c4cf62cb5 activeHelp changed as instClassVar + some other cleans
tz
parents: 779
diff changeset
  1471
1767
f94850ee9885 method category rename
Claus Gittinger <cg@exept.de>
parents: 1752
diff changeset
  1472
!ToolApplicationModel methodsFor:'startup & release'!
753
9c837d99f109 intitial checkin
tz
parents:
diff changeset
  1473
1107
f900f5d8993c more code cleanup
Claus Gittinger <cg@exept.de>
parents: 1104
diff changeset
  1474
closeDownViews
907
f4087882555a method comments added
tz
parents: 893
diff changeset
  1475
    "uninitializes and closes this tool"
753
9c837d99f109 intitial checkin
tz
parents:
diff changeset
  1476
756
4dba5a8797ec *** empty log message ***
tz
parents: 753
diff changeset
  1477
    self uninitialize.
1107
f900f5d8993c more code cleanup
Claus Gittinger <cg@exept.de>
parents: 1104
diff changeset
  1478
    super closeDownViews
1108
2d57365bc340 fixed a copy-paste bug
Claus Gittinger <cg@exept.de>
parents: 1107
diff changeset
  1479
!
936
d3d50ac7cdd0 code compression
Claus Gittinger <cg@exept.de>
parents: 927
diff changeset
  1480
2098
37ea7570cd6b code cleanup & refactoring
Claus Gittinger <cg@exept.de>
parents: 2084
diff changeset
  1481
loadFromHistoryEntry:aHistoryEntry
37ea7570cd6b code cleanup & refactoring
Claus Gittinger <cg@exept.de>
parents: 2084
diff changeset
  1482
    aHistoryEntry forceLoadIn:self
37ea7570cd6b code cleanup & refactoring
Claus Gittinger <cg@exept.de>
parents: 2084
diff changeset
  1483
!
37ea7570cd6b code cleanup & refactoring
Claus Gittinger <cg@exept.de>
parents: 2084
diff changeset
  1484
790
648fac120039 time clock runs now correctly
tz
parents: 784
diff changeset
  1485
postOpenWith:aBuilder
907
f4087882555a method comments added
tz
parents: 893
diff changeset
  1486
    "starts the active help for this tool (if turned on in the settings)
3668
9cb84252b504 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 3550
diff changeset
  1487
     and updates the info label and the font's (from the settings)"
790
648fac120039 time clock runs now correctly
tz
parents: 784
diff changeset
  1488
648fac120039 time clock runs now correctly
tz
parents: 784
diff changeset
  1489
    super postOpenWith:aBuilder.
648fac120039 time clock runs now correctly
tz
parents: 784
diff changeset
  1490
822
374400d57e0b some useful aspects added
tz
parents: 821
diff changeset
  1491
    self updateInfoLabel.
1104
a2f59712ce7b removed the (stupid) fontSettings menu support.
Claus Gittinger <cg@exept.de>
parents: 1091
diff changeset
  1492
"/    self updateFonts.
2827
d36efbd422cf *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2771
diff changeset
  1493
    self showingHelp:true.
876
585929b1fec2 some cleans
tz
parents: 872
diff changeset
  1494
1018
7222534cb3dc part of the activeHelp framework moved to ApplicationModel.
Claus Gittinger <cg@exept.de>
parents: 1016
diff changeset
  1495
    "Modified: / 31.7.1998 / 18:17:34 / cg"
790
648fac120039 time clock runs now correctly
tz
parents: 784
diff changeset
  1496
!
648fac120039 time clock runs now correctly
tz
parents: 784
diff changeset
  1497
1323
045c3a6e4a88 after restart from image, restart also the timed block if defined
ca
parents: 1284
diff changeset
  1498
restarted
045c3a6e4a88 after restart from image, restart also the timed block if defined
ca
parents: 1284
diff changeset
  1499
    "sent by my windowGroup, when restarted from an image.
045c3a6e4a88 after restart from image, restart also the timed block if defined
ca
parents: 1284
diff changeset
  1500
     restart timed block if defined.
045c3a6e4a88 after restart from image, restart also the timed block if defined
ca
parents: 1284
diff changeset
  1501
    "
045c3a6e4a88 after restart from image, restart also the timed block if defined
ca
parents: 1284
diff changeset
  1502
    timeBlock notNil ifTrue:[
045c3a6e4a88 after restart from image, restart also the timed block if defined
ca
parents: 1284
diff changeset
  1503
        Processor removeTimedBlock:timeBlock.
045c3a6e4a88 after restart from image, restart also the timed block if defined
ca
parents: 1284
diff changeset
  1504
        self startClockOnTimedBlock:timeBlock.
045c3a6e4a88 after restart from image, restart also the timed block if defined
ca
parents: 1284
diff changeset
  1505
    ].
045c3a6e4a88 after restart from image, restart also the timed block if defined
ca
parents: 1284
diff changeset
  1506
    super restarted.
045c3a6e4a88 after restart from image, restart also the timed block if defined
ca
parents: 1284
diff changeset
  1507
!
045c3a6e4a88 after restart from image, restart also the timed block if defined
ca
parents: 1284
diff changeset
  1508
756
4dba5a8797ec *** empty log message ***
tz
parents: 753
diff changeset
  1509
uninitialize
1018
7222534cb3dc part of the activeHelp framework moved to ApplicationModel.
Claus Gittinger <cg@exept.de>
parents: 1016
diff changeset
  1510
    "stops active help for this tool and (if defined) removes the time block"
756
4dba5a8797ec *** empty log message ***
tz
parents: 753
diff changeset
  1511
1018
7222534cb3dc part of the activeHelp framework moved to ApplicationModel.
Claus Gittinger <cg@exept.de>
parents: 1016
diff changeset
  1512
    self showingHelp ifTrue: [ActiveHelp stopFor: self].
876
585929b1fec2 some cleans
tz
parents: 872
diff changeset
  1513
    timeBlock notNil ifTrue: [Processor removeTimedBlock:timeBlock. timeBlock := nil].
585929b1fec2 some cleans
tz
parents: 872
diff changeset
  1514
1018
7222534cb3dc part of the activeHelp framework moved to ApplicationModel.
Claus Gittinger <cg@exept.de>
parents: 1016
diff changeset
  1515
    "Modified: / 31.7.1998 / 18:46:21 / cg"
753
9c837d99f109 intitial checkin
tz
parents:
diff changeset
  1516
! !
9c837d99f109 intitial checkin
tz
parents:
diff changeset
  1517
3312
1bcdfdff5af7 class: ToolApplicationModel
Claus Gittinger <cg@exept.de>
parents: 3296
diff changeset
  1518
!ToolApplicationModel::HistoryEntry class methodsFor:'documentation'!
1bcdfdff5af7 class: ToolApplicationModel
Claus Gittinger <cg@exept.de>
parents: 3296
diff changeset
  1519
1bcdfdff5af7 class: ToolApplicationModel
Claus Gittinger <cg@exept.de>
parents: 3296
diff changeset
  1520
documentation
1bcdfdff5af7 class: ToolApplicationModel
Claus Gittinger <cg@exept.de>
parents: 3296
diff changeset
  1521
"
1bcdfdff5af7 class: ToolApplicationModel
Claus Gittinger <cg@exept.de>
parents: 3296
diff changeset
  1522
    common support code for navigation history entries,
1bcdfdff5af7 class: ToolApplicationModel
Claus Gittinger <cg@exept.de>
parents: 3296
diff changeset
  1523
    for fileBrowser (visited file history) and systemBrowser (visited method history). 
1bcdfdff5af7 class: ToolApplicationModel
Claus Gittinger <cg@exept.de>
parents: 3296
diff changeset
  1524
"
1bcdfdff5af7 class: ToolApplicationModel
Claus Gittinger <cg@exept.de>
parents: 3296
diff changeset
  1525
! !
1bcdfdff5af7 class: ToolApplicationModel
Claus Gittinger <cg@exept.de>
parents: 3296
diff changeset
  1526
2098
37ea7570cd6b code cleanup & refactoring
Claus Gittinger <cg@exept.de>
parents: 2084
diff changeset
  1527
!ToolApplicationModel::HistoryEntry methodsFor:'comparing'!
37ea7570cd6b code cleanup & refactoring
Claus Gittinger <cg@exept.de>
parents: 2084
diff changeset
  1528
37ea7570cd6b code cleanup & refactoring
Claus Gittinger <cg@exept.de>
parents: 2084
diff changeset
  1529
sameAsHistoryEntryForFile:aHistoryEntryForFile
37ea7570cd6b code cleanup & refactoring
Claus Gittinger <cg@exept.de>
parents: 2084
diff changeset
  1530
    ^ false
37ea7570cd6b code cleanup & refactoring
Claus Gittinger <cg@exept.de>
parents: 2084
diff changeset
  1531
!
37ea7570cd6b code cleanup & refactoring
Claus Gittinger <cg@exept.de>
parents: 2084
diff changeset
  1532
37ea7570cd6b code cleanup & refactoring
Claus Gittinger <cg@exept.de>
parents: 2084
diff changeset
  1533
sameAsHistoryEntryForMethod:aHistoryEntryForMethod
37ea7570cd6b code cleanup & refactoring
Claus Gittinger <cg@exept.de>
parents: 2084
diff changeset
  1534
    ^ false
37ea7570cd6b code cleanup & refactoring
Claus Gittinger <cg@exept.de>
parents: 2084
diff changeset
  1535
! !
37ea7570cd6b code cleanup & refactoring
Claus Gittinger <cg@exept.de>
parents: 2084
diff changeset
  1536
4008
f7f1b89886ef #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 4007
diff changeset
  1537
!ToolApplicationModel::HistoryEntry methodsFor:'queries'!
f7f1b89886ef #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 4007
diff changeset
  1538
f7f1b89886ef #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 4007
diff changeset
  1539
isValid
f7f1b89886ef #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 4007
diff changeset
  1540
    "can be redefined to return false if a history item is no longer
f7f1b89886ef #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 4007
diff changeset
  1541
     valid (for example file-items for files which no longer exist)"
f7f1b89886ef #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 4007
diff changeset
  1542
     
f7f1b89886ef #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 4007
diff changeset
  1543
    ^ true
f7f1b89886ef #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 4007
diff changeset
  1544
f7f1b89886ef #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 4007
diff changeset
  1545
    "Created: / 01-09-2017 / 10:12:12 / cg"
f7f1b89886ef #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 4007
diff changeset
  1546
! !
f7f1b89886ef #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 4007
diff changeset
  1547
2098
37ea7570cd6b code cleanup & refactoring
Claus Gittinger <cg@exept.de>
parents: 2084
diff changeset
  1548
!ToolApplicationModel::HistoryEntryForFile class methodsFor:'instance creation'!
37ea7570cd6b code cleanup & refactoring
Claus Gittinger <cg@exept.de>
parents: 2084
diff changeset
  1549
37ea7570cd6b code cleanup & refactoring
Claus Gittinger <cg@exept.de>
parents: 2084
diff changeset
  1550
filename:arg
37ea7570cd6b code cleanup & refactoring
Claus Gittinger <cg@exept.de>
parents: 2084
diff changeset
  1551
    ^ self new filename:arg
37ea7570cd6b code cleanup & refactoring
Claus Gittinger <cg@exept.de>
parents: 2084
diff changeset
  1552
! !
37ea7570cd6b code cleanup & refactoring
Claus Gittinger <cg@exept.de>
parents: 2084
diff changeset
  1553
37ea7570cd6b code cleanup & refactoring
Claus Gittinger <cg@exept.de>
parents: 2084
diff changeset
  1554
!ToolApplicationModel::HistoryEntryForFile methodsFor:'accessing'!
37ea7570cd6b code cleanup & refactoring
Claus Gittinger <cg@exept.de>
parents: 2084
diff changeset
  1555
37ea7570cd6b code cleanup & refactoring
Claus Gittinger <cg@exept.de>
parents: 2084
diff changeset
  1556
filename
37ea7570cd6b code cleanup & refactoring
Claus Gittinger <cg@exept.de>
parents: 2084
diff changeset
  1557
    ^ filename
37ea7570cd6b code cleanup & refactoring
Claus Gittinger <cg@exept.de>
parents: 2084
diff changeset
  1558
!
37ea7570cd6b code cleanup & refactoring
Claus Gittinger <cg@exept.de>
parents: 2084
diff changeset
  1559
37ea7570cd6b code cleanup & refactoring
Claus Gittinger <cg@exept.de>
parents: 2084
diff changeset
  1560
filename:something
37ea7570cd6b code cleanup & refactoring
Claus Gittinger <cg@exept.de>
parents: 2084
diff changeset
  1561
    filename := something.
37ea7570cd6b code cleanup & refactoring
Claus Gittinger <cg@exept.de>
parents: 2084
diff changeset
  1562
! !
37ea7570cd6b code cleanup & refactoring
Claus Gittinger <cg@exept.de>
parents: 2084
diff changeset
  1563
37ea7570cd6b code cleanup & refactoring
Claus Gittinger <cg@exept.de>
parents: 2084
diff changeset
  1564
!ToolApplicationModel::HistoryEntryForFile methodsFor:'comparing'!
37ea7570cd6b code cleanup & refactoring
Claus Gittinger <cg@exept.de>
parents: 2084
diff changeset
  1565
37ea7570cd6b code cleanup & refactoring
Claus Gittinger <cg@exept.de>
parents: 2084
diff changeset
  1566
= aHistoryEntry
37ea7570cd6b code cleanup & refactoring
Claus Gittinger <cg@exept.de>
parents: 2084
diff changeset
  1567
    ^ aHistoryEntry sameAsHistoryEntryForFile:self
37ea7570cd6b code cleanup & refactoring
Claus Gittinger <cg@exept.de>
parents: 2084
diff changeset
  1568
!
37ea7570cd6b code cleanup & refactoring
Claus Gittinger <cg@exept.de>
parents: 2084
diff changeset
  1569
37ea7570cd6b code cleanup & refactoring
Claus Gittinger <cg@exept.de>
parents: 2084
diff changeset
  1570
sameAsHistoryEntryForFile:aHistoryEntryForFile
37ea7570cd6b code cleanup & refactoring
Claus Gittinger <cg@exept.de>
parents: 2084
diff changeset
  1571
    ^ aHistoryEntryForFile filename = filename
37ea7570cd6b code cleanup & refactoring
Claus Gittinger <cg@exept.de>
parents: 2084
diff changeset
  1572
! !
37ea7570cd6b code cleanup & refactoring
Claus Gittinger <cg@exept.de>
parents: 2084
diff changeset
  1573
37ea7570cd6b code cleanup & refactoring
Claus Gittinger <cg@exept.de>
parents: 2084
diff changeset
  1574
!ToolApplicationModel::HistoryEntryForFile methodsFor:'loading'!
37ea7570cd6b code cleanup & refactoring
Claus Gittinger <cg@exept.de>
parents: 2084
diff changeset
  1575
37ea7570cd6b code cleanup & refactoring
Claus Gittinger <cg@exept.de>
parents: 2084
diff changeset
  1576
forceLoadIn:anEditor
37ea7570cd6b code cleanup & refactoring
Claus Gittinger <cg@exept.de>
parents: 2084
diff changeset
  1577
    anEditor loadFromFile:filename
37ea7570cd6b code cleanup & refactoring
Claus Gittinger <cg@exept.de>
parents: 2084
diff changeset
  1578
! !
37ea7570cd6b code cleanup & refactoring
Claus Gittinger <cg@exept.de>
parents: 2084
diff changeset
  1579
37ea7570cd6b code cleanup & refactoring
Claus Gittinger <cg@exept.de>
parents: 2084
diff changeset
  1580
!ToolApplicationModel::HistoryEntryForFile methodsFor:'printing'!
37ea7570cd6b code cleanup & refactoring
Claus Gittinger <cg@exept.de>
parents: 2084
diff changeset
  1581
37ea7570cd6b code cleanup & refactoring
Claus Gittinger <cg@exept.de>
parents: 2084
diff changeset
  1582
printStringInMenu
37ea7570cd6b code cleanup & refactoring
Claus Gittinger <cg@exept.de>
parents: 2084
diff changeset
  1583
    ^ filename
37ea7570cd6b code cleanup & refactoring
Claus Gittinger <cg@exept.de>
parents: 2084
diff changeset
  1584
! !
37ea7570cd6b code cleanup & refactoring
Claus Gittinger <cg@exept.de>
parents: 2084
diff changeset
  1585
4008
f7f1b89886ef #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 4007
diff changeset
  1586
!ToolApplicationModel::HistoryEntryForFile methodsFor:'queries'!
f7f1b89886ef #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 4007
diff changeset
  1587
f7f1b89886ef #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 4007
diff changeset
  1588
isValid
f7f1b89886ef #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 4007
diff changeset
  1589
    "redefined to return false if the file no longer exists"
f7f1b89886ef #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 4007
diff changeset
  1590
f7f1b89886ef #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 4007
diff changeset
  1591
    ^ filename notNil and:[ filename asFilename exists ]
f7f1b89886ef #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 4007
diff changeset
  1592
f7f1b89886ef #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 4007
diff changeset
  1593
    "Created: / 01-09-2017 / 10:13:08 / cg"
f7f1b89886ef #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 4007
diff changeset
  1594
! !
f7f1b89886ef #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 4007
diff changeset
  1595
2098
37ea7570cd6b code cleanup & refactoring
Claus Gittinger <cg@exept.de>
parents: 2084
diff changeset
  1596
!ToolApplicationModel::HistoryEntryForMethod class methodsFor:'instance creation'!
37ea7570cd6b code cleanup & refactoring
Claus Gittinger <cg@exept.de>
parents: 2084
diff changeset
  1597
37ea7570cd6b code cleanup & refactoring
Claus Gittinger <cg@exept.de>
parents: 2084
diff changeset
  1598
class:classToAdd selector:selectorToAdd
37ea7570cd6b code cleanup & refactoring
Claus Gittinger <cg@exept.de>
parents: 2084
diff changeset
  1599
    ^ self new class:classToAdd selector:selectorToAdd
37ea7570cd6b code cleanup & refactoring
Claus Gittinger <cg@exept.de>
parents: 2084
diff changeset
  1600
! !
37ea7570cd6b code cleanup & refactoring
Claus Gittinger <cg@exept.de>
parents: 2084
diff changeset
  1601
37ea7570cd6b code cleanup & refactoring
Claus Gittinger <cg@exept.de>
parents: 2084
diff changeset
  1602
!ToolApplicationModel::HistoryEntryForMethod methodsFor:'accessing'!
37ea7570cd6b code cleanup & refactoring
Claus Gittinger <cg@exept.de>
parents: 2084
diff changeset
  1603
37ea7570cd6b code cleanup & refactoring
Claus Gittinger <cg@exept.de>
parents: 2084
diff changeset
  1604
class:aClass selector:aSelector
37ea7570cd6b code cleanup & refactoring
Claus Gittinger <cg@exept.de>
parents: 2084
diff changeset
  1605
    methodClass := aClass.
37ea7570cd6b code cleanup & refactoring
Claus Gittinger <cg@exept.de>
parents: 2084
diff changeset
  1606
    methodSelector := aSelector
37ea7570cd6b code cleanup & refactoring
Claus Gittinger <cg@exept.de>
parents: 2084
diff changeset
  1607
!
37ea7570cd6b code cleanup & refactoring
Claus Gittinger <cg@exept.de>
parents: 2084
diff changeset
  1608
37ea7570cd6b code cleanup & refactoring
Claus Gittinger <cg@exept.de>
parents: 2084
diff changeset
  1609
methodClass
37ea7570cd6b code cleanup & refactoring
Claus Gittinger <cg@exept.de>
parents: 2084
diff changeset
  1610
    ^ methodClass
37ea7570cd6b code cleanup & refactoring
Claus Gittinger <cg@exept.de>
parents: 2084
diff changeset
  1611
!
37ea7570cd6b code cleanup & refactoring
Claus Gittinger <cg@exept.de>
parents: 2084
diff changeset
  1612
37ea7570cd6b code cleanup & refactoring
Claus Gittinger <cg@exept.de>
parents: 2084
diff changeset
  1613
methodSelector
37ea7570cd6b code cleanup & refactoring
Claus Gittinger <cg@exept.de>
parents: 2084
diff changeset
  1614
    ^ methodSelector
37ea7570cd6b code cleanup & refactoring
Claus Gittinger <cg@exept.de>
parents: 2084
diff changeset
  1615
! !
37ea7570cd6b code cleanup & refactoring
Claus Gittinger <cg@exept.de>
parents: 2084
diff changeset
  1616
37ea7570cd6b code cleanup & refactoring
Claus Gittinger <cg@exept.de>
parents: 2084
diff changeset
  1617
!ToolApplicationModel::HistoryEntryForMethod methodsFor:'comparing'!
37ea7570cd6b code cleanup & refactoring
Claus Gittinger <cg@exept.de>
parents: 2084
diff changeset
  1618
37ea7570cd6b code cleanup & refactoring
Claus Gittinger <cg@exept.de>
parents: 2084
diff changeset
  1619
= aHistoryEntry
37ea7570cd6b code cleanup & refactoring
Claus Gittinger <cg@exept.de>
parents: 2084
diff changeset
  1620
    ^ aHistoryEntry sameAsHistoryEntryForMethod:self
37ea7570cd6b code cleanup & refactoring
Claus Gittinger <cg@exept.de>
parents: 2084
diff changeset
  1621
!
37ea7570cd6b code cleanup & refactoring
Claus Gittinger <cg@exept.de>
parents: 2084
diff changeset
  1622
37ea7570cd6b code cleanup & refactoring
Claus Gittinger <cg@exept.de>
parents: 2084
diff changeset
  1623
sameAsHistoryEntryForMethod:aHistoryEntryForMethod
37ea7570cd6b code cleanup & refactoring
Claus Gittinger <cg@exept.de>
parents: 2084
diff changeset
  1624
    ^ aHistoryEntryForMethod methodClass = methodClass
37ea7570cd6b code cleanup & refactoring
Claus Gittinger <cg@exept.de>
parents: 2084
diff changeset
  1625
    and:[ aHistoryEntryForMethod methodSelector = methodSelector ]
37ea7570cd6b code cleanup & refactoring
Claus Gittinger <cg@exept.de>
parents: 2084
diff changeset
  1626
! !
37ea7570cd6b code cleanup & refactoring
Claus Gittinger <cg@exept.de>
parents: 2084
diff changeset
  1627
37ea7570cd6b code cleanup & refactoring
Claus Gittinger <cg@exept.de>
parents: 2084
diff changeset
  1628
!ToolApplicationModel::HistoryEntryForMethod methodsFor:'loading'!
37ea7570cd6b code cleanup & refactoring
Claus Gittinger <cg@exept.de>
parents: 2084
diff changeset
  1629
37ea7570cd6b code cleanup & refactoring
Claus Gittinger <cg@exept.de>
parents: 2084
diff changeset
  1630
forceLoadIn:anEditor
37ea7570cd6b code cleanup & refactoring
Claus Gittinger <cg@exept.de>
parents: 2084
diff changeset
  1631
    anEditor loadFromClass:methodClass andSelector:methodSelector
37ea7570cd6b code cleanup & refactoring
Claus Gittinger <cg@exept.de>
parents: 2084
diff changeset
  1632
! !
37ea7570cd6b code cleanup & refactoring
Claus Gittinger <cg@exept.de>
parents: 2084
diff changeset
  1633
37ea7570cd6b code cleanup & refactoring
Claus Gittinger <cg@exept.de>
parents: 2084
diff changeset
  1634
!ToolApplicationModel::HistoryEntryForMethod methodsFor:'printing'!
37ea7570cd6b code cleanup & refactoring
Claus Gittinger <cg@exept.de>
parents: 2084
diff changeset
  1635
37ea7570cd6b code cleanup & refactoring
Claus Gittinger <cg@exept.de>
parents: 2084
diff changeset
  1636
printStringInMenu
4263
d349fa8d2945 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 4253
diff changeset
  1637
    ^ methodClass name , ' » ' , (methodSelector?'?')
2140
f6da72fe0e4b *** empty log message ***
fm
parents: 2121
diff changeset
  1638
f6da72fe0e4b *** empty log message ***
fm
parents: 2121
diff changeset
  1639
    "Modified: / 11-07-2006 / 13:53:40 / fm"
2098
37ea7570cd6b code cleanup & refactoring
Claus Gittinger <cg@exept.de>
parents: 2084
diff changeset
  1640
! !
37ea7570cd6b code cleanup & refactoring
Claus Gittinger <cg@exept.de>
parents: 2084
diff changeset
  1641
753
9c837d99f109 intitial checkin
tz
parents:
diff changeset
  1642
!ToolApplicationModel class methodsFor:'documentation'!
9c837d99f109 intitial checkin
tz
parents:
diff changeset
  1643
4008
f7f1b89886ef #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 4007
diff changeset
  1644
version
f7f1b89886ef #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 4007
diff changeset
  1645
    ^ '$Header$'
f7f1b89886ef #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 4007
diff changeset
  1646
!
f7f1b89886ef #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 4007
diff changeset
  1647
2771
9c8ce6487992 changed: #aboutImage
Claus Gittinger <cg@exept.de>
parents: 2587
diff changeset
  1648
version_CVS
3508
ba75f68aaa04 #UI_ENHANCEMENT
Claus Gittinger <cg@exept.de>
parents: 3354
diff changeset
  1649
    ^ '$Header$'
753
9c837d99f109 intitial checkin
tz
parents:
diff changeset
  1650
! !
3107
6343bde3fc47 tooltips
Claus Gittinger <cg@exept.de>
parents: 3024
diff changeset
  1651