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