author | Claus Gittinger <cg@exept.de> |
Mon, 06 Mar 2006 09:52:32 +0100 | |
changeset 2121 | aaa63f6a0025 |
parent 2108 | 91ddaeea8b13 |
child 2140 | f6da72fe0e4b |
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 |
2121 | 128 |
instances notNil ifTrue:[ |
129 |
instances remove:anInstance ifAbsent:[]. |
|
130 |
instances isEmpty ifTrue:[instances := nil]. |
|
131 |
]. |
|
1089
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 |
"Modified: / 4.2.1999 / 15:38:49 / cg" |
49b05d386ccc
removed Thomas's memory leak
Claus Gittinger <cg@exept.de>
parents:
1084
diff
changeset
|
134 |
! |
49b05d386ccc
removed Thomas's memory leak
Claus Gittinger <cg@exept.de>
parents:
1084
diff
changeset
|
135 |
|
753 | 136 |
label |
1018
7222534cb3dc
part of the activeHelp framework moved to ApplicationModel.
Claus Gittinger <cg@exept.de>
parents:
1016
diff
changeset
|
137 |
"returns the label for the tool instances of this class; |
907 | 138 |
extracted from the class name; |
139 |
can be redefined in subclasses" |
|
753 | 140 |
|
141 |
|label| |
|
142 |
label := ''. |
|
143 |
self name do: |
|
144 |
[:c| |
|
145 |
c isUppercase ifTrue: [label := label, $ ]. |
|
146 |
label := label, c |
|
147 |
]. |
|
148 |
^label trimBlanks |
|
1018
7222534cb3dc
part of the activeHelp framework moved to ApplicationModel.
Claus Gittinger <cg@exept.de>
parents:
1016
diff
changeset
|
149 |
|
7222534cb3dc
part of the activeHelp framework moved to ApplicationModel.
Claus Gittinger <cg@exept.de>
parents:
1016
diff
changeset
|
150 |
"Modified: / 31.7.1998 / 18:04:18 / cg" |
782 | 151 |
! |
152 |
||
1089
49b05d386ccc
removed Thomas's memory leak
Claus Gittinger <cg@exept.de>
parents:
1084
diff
changeset
|
153 |
rememberInstance:anInstance |
49b05d386ccc
removed Thomas's memory leak
Claus Gittinger <cg@exept.de>
parents:
1084
diff
changeset
|
154 |
instances isNil ifTrue:[ |
49b05d386ccc
removed Thomas's memory leak
Claus Gittinger <cg@exept.de>
parents:
1084
diff
changeset
|
155 |
instances := WeakIdentitySet new |
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 |
instances add:anInstance |
49b05d386ccc
removed Thomas's memory leak
Claus Gittinger <cg@exept.de>
parents:
1084
diff
changeset
|
158 |
|
49b05d386ccc
removed Thomas's memory leak
Claus Gittinger <cg@exept.de>
parents:
1084
diff
changeset
|
159 |
"Created: / 4.2.1999 / 15:33:43 / cg" |
49b05d386ccc
removed Thomas's memory leak
Claus Gittinger <cg@exept.de>
parents:
1084
diff
changeset
|
160 |
"Modified: / 4.2.1999 / 15:34:14 / cg" |
49b05d386ccc
removed Thomas's memory leak
Claus Gittinger <cg@exept.de>
parents:
1084
diff
changeset
|
161 |
! |
49b05d386ccc
removed Thomas's memory leak
Claus Gittinger <cg@exept.de>
parents:
1084
diff
changeset
|
162 |
|
850 | 163 |
settings |
907 | 164 |
"returns the settings dictionary" |
850 | 165 |
|
872 | 166 |
settings isNil ifTrue: [settings := IdentityDictionary new]. |
167 |
^settings |
|
850 | 168 |
! |
169 |
||
1018
7222534cb3dc
part of the activeHelp framework moved to ApplicationModel.
Claus Gittinger <cg@exept.de>
parents:
1016
diff
changeset
|
170 |
showingHelp |
7222534cb3dc
part of the activeHelp framework moved to ApplicationModel.
Claus Gittinger <cg@exept.de>
parents:
1016
diff
changeset
|
171 |
"returns true if active help is turned on for instances of this class" |
782 | 172 |
|
1018
7222534cb3dc
part of the activeHelp framework moved to ApplicationModel.
Claus Gittinger <cg@exept.de>
parents:
1016
diff
changeset
|
173 |
showingHelp isNil ifTrue: [showingHelp := true]. |
7222534cb3dc
part of the activeHelp framework moved to ApplicationModel.
Claus Gittinger <cg@exept.de>
parents:
1016
diff
changeset
|
174 |
^showingHelp |
7222534cb3dc
part of the activeHelp framework moved to ApplicationModel.
Claus Gittinger <cg@exept.de>
parents:
1016
diff
changeset
|
175 |
|
7222534cb3dc
part of the activeHelp framework moved to ApplicationModel.
Claus Gittinger <cg@exept.de>
parents:
1016
diff
changeset
|
176 |
"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
|
177 |
"Modified: / 31.7.1998 / 18:16:55 / cg" |
782 | 178 |
! |
179 |
||
1018
7222534cb3dc
part of the activeHelp framework moved to ApplicationModel.
Claus Gittinger <cg@exept.de>
parents:
1016
diff
changeset
|
180 |
showingHelp: aBoolean |
7222534cb3dc
part of the activeHelp framework moved to ApplicationModel.
Claus Gittinger <cg@exept.de>
parents:
1016
diff
changeset
|
181 |
"enable/disable active help for instances of this class" |
782 | 182 |
|
1018
7222534cb3dc
part of the activeHelp framework moved to ApplicationModel.
Claus Gittinger <cg@exept.de>
parents:
1016
diff
changeset
|
183 |
^ showingHelp := aBoolean |
7222534cb3dc
part of the activeHelp framework moved to ApplicationModel.
Claus Gittinger <cg@exept.de>
parents:
1016
diff
changeset
|
184 |
|
7222534cb3dc
part of the activeHelp framework moved to ApplicationModel.
Claus Gittinger <cg@exept.de>
parents:
1016
diff
changeset
|
185 |
"Modified: / 31.7.1998 / 18:17:14 / cg" |
753 | 186 |
! ! |
187 |
||
756 | 188 |
!ToolApplicationModel class methodsFor:'clipboard'! |
189 |
||
190 |
clipboard |
|
907 | 191 |
"returns the clipboard of this tool class" |
756 | 192 |
|
193 |
^clipboard |
|
194 |
! |
|
195 |
||
196 |
clipboard: anEditObject |
|
907 | 197 |
"sets the clipboard for this tool class" |
756 | 198 |
|
199 |
clipboard := anEditObject |
|
200 |
! ! |
|
201 |
||
1043
32cd5ccbd94f
made openAboutSTX a class method for sharability.
Claus Gittinger <cg@exept.de>
parents:
1040
diff
changeset
|
202 |
!ToolApplicationModel class methodsFor:'help'! |
32cd5ccbd94f
made openAboutSTX a class method for sharability.
Claus Gittinger <cg@exept.de>
parents:
1040
diff
changeset
|
203 |
|
32cd5ccbd94f
made openAboutSTX a class method for sharability.
Claus Gittinger <cg@exept.de>
parents:
1040
diff
changeset
|
204 |
openAboutSTX |
32cd5ccbd94f
made openAboutSTX a class method for sharability.
Claus Gittinger <cg@exept.de>
parents:
1040
diff
changeset
|
205 |
"opens an about box (on ST/X)" |
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 |
|box| |
32cd5ccbd94f
made openAboutSTX a class method for sharability.
Claus Gittinger <cg@exept.de>
parents:
1040
diff
changeset
|
208 |
|
32cd5ccbd94f
made openAboutSTX a class method for sharability.
Claus Gittinger <cg@exept.de>
parents:
1040
diff
changeset
|
209 |
AboutBox isNil ifTrue:[ |
32cd5ccbd94f
made openAboutSTX a class method for sharability.
Claus Gittinger <cg@exept.de>
parents:
1040
diff
changeset
|
210 |
"/ this handles bad installations of ST/X, |
32cd5ccbd94f
made openAboutSTX a class method for sharability.
Claus Gittinger <cg@exept.de>
parents:
1040
diff
changeset
|
211 |
"/ where the AboutBox is missing. |
32cd5ccbd94f
made openAboutSTX a class method for sharability.
Claus Gittinger <cg@exept.de>
parents:
1040
diff
changeset
|
212 |
"/ (May vanish in the future) |
32cd5ccbd94f
made openAboutSTX a class method for sharability.
Claus Gittinger <cg@exept.de>
parents:
1040
diff
changeset
|
213 |
^ self information:('Smalltalk/X rev.' , Smalltalk versionString) |
32cd5ccbd94f
made openAboutSTX a class method for sharability.
Claus Gittinger <cg@exept.de>
parents:
1040
diff
changeset
|
214 |
]. |
32cd5ccbd94f
made openAboutSTX a class method for sharability.
Claus Gittinger <cg@exept.de>
parents:
1040
diff
changeset
|
215 |
|
32cd5ccbd94f
made openAboutSTX a class method for sharability.
Claus Gittinger <cg@exept.de>
parents:
1040
diff
changeset
|
216 |
box := AboutBox new. |
32cd5ccbd94f
made openAboutSTX a class method for sharability.
Claus Gittinger <cg@exept.de>
parents:
1040
diff
changeset
|
217 |
box autoHideAfter:10 with:[]. |
1091 | 218 |
box showAtCenter |
219 |
"/ box showAtPointer |
|
1043
32cd5ccbd94f
made openAboutSTX a class method for sharability.
Claus Gittinger <cg@exept.de>
parents:
1040
diff
changeset
|
220 |
|
32cd5ccbd94f
made openAboutSTX a class method for sharability.
Claus Gittinger <cg@exept.de>
parents:
1040
diff
changeset
|
221 |
"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
|
222 |
"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
|
223 |
! ! |
32cd5ccbd94f
made openAboutSTX a class method for sharability.
Claus Gittinger <cg@exept.de>
parents:
1040
diff
changeset
|
224 |
|
762 | 225 |
!ToolApplicationModel class methodsFor:'help specs'! |
226 |
||
1538 | 227 |
flyByHelpSpec |
228 |
<resource: #help> |
|
229 |
||
1544 | 230 |
^super flyByHelpSpec addPairsFrom:#( |
231 |
||
232 |
"/#commitCancel |
|
233 |
"/'Cancels' |
|
234 |
"/ |
|
235 |
"/#commitOK |
|
236 |
"/'Commit' |
|
237 |
||
238 |
#editCopy |
|
1644 | 239 |
"/ 'Copy to clipboard' |
240 |
'Copy' |
|
1544 | 241 |
|
242 |
#editCut |
|
1644 | 243 |
"/ 'Move to clipboard' |
244 |
'Cut' |
|
1544 | 245 |
|
246 |
#editDelete |
|
247 |
'Delete' |
|
248 |
||
249 |
#editMoveDown |
|
1644 | 250 |
'Move Down' |
1544 | 251 |
|
252 |
#editMoveIn |
|
1644 | 253 |
'Move Into Next' |
1544 | 254 |
|
255 |
#editMoveInAbove |
|
1644 | 256 |
'Move Into Previous' |
1538 | 257 |
|
1544 | 258 |
#editMoveOut |
1644 | 259 |
'Move Out' |
1544 | 260 |
|
261 |
#editMoveUp |
|
1644 | 262 |
'Move Up' |
1544 | 263 |
|
264 |
#editPaste |
|
265 |
'Paste' |
|
266 |
||
267 |
#editUndo |
|
268 |
'Undo' |
|
269 |
||
270 |
#fileBrowseClass |
|
271 |
'Browse class' |
|
272 |
||
273 |
#fileDefineClass |
|
274 |
'Define class' |
|
275 |
||
276 |
#fileDefineClassAndSelector |
|
277 |
'Define class & selector' |
|
278 |
||
279 |
#fileExit |
|
280 |
'Exit' |
|
281 |
||
282 |
#helpShowHelp |
|
283 |
'Toggle help' |
|
1538 | 284 |
) |
285 |
! |
|
286 |
||
762 | 287 |
helpSpec |
869 | 288 |
"This resource specification was automatically generated |
289 |
by the UIHelpTool of ST/X." |
|
290 |
||
291 |
"Do not manually edit this!! If it is corrupted, |
|
292 |
the UIHelpTool may not be able to read the specification." |
|
762 | 293 |
|
294 |
" |
|
869 | 295 |
UIHelpTool openOnClass:ToolApplicationModel |
762 | 296 |
" |
297 |
||
869 | 298 |
<resource: #help> |
299 |
||
300 |
^super helpSpec addPairsFrom:#( |
|
762 | 301 |
|
823 | 302 |
#about |
1284 | 303 |
'Info functions.' |
823 | 304 |
|
762 | 305 |
#aboutSTX |
1283 | 306 |
'Info about the running ST/X.' |
762 | 307 |
|
308 |
#aboutThisAppliaction |
|
1283 | 309 |
'Info about that applications release and author.' |
762 | 310 |
|
823 | 311 |
#add |
834 | 312 |
'Add functions.' |
823 | 313 |
|
314 |
#commitCancel |
|
1719 | 315 |
'Cancel changes.' |
823 | 316 |
|
317 |
#commitOK |
|
910 | 318 |
'Commit changes.' |
823 | 319 |
|
320 |
#edit |
|
834 | 321 |
'Edit functions.' |
823 | 322 |
|
323 |
#editCopy |
|
910 | 324 |
'Copy the selected item(s) to the clipboard.' |
762 | 325 |
|
782 | 326 |
#editCut |
910 | 327 |
'Move the selected item(s) to the clipboard.' |
853 | 328 |
|
329 |
#editDelete |
|
910 | 330 |
'Delete the selected item(s).' |
782 | 331 |
|
823 | 332 |
#editMoveDown |
1471 | 333 |
'Move the selected item one step down (in the order list).' |
823 | 334 |
|
335 |
#editMoveIn |
|
1471 | 336 |
'Move the selected item into the next item (as child item).' |
337 |
||
338 |
#editMoveInAbove |
|
339 |
'Move the selected item into the previous item (as child item).' |
|
823 | 340 |
|
341 |
#editMoveOut |
|
1471 | 342 |
'Move the selected item out of its parent item.' |
823 | 343 |
|
344 |
#editMoveUp |
|
1471 | 345 |
'Move the selected item one step up (in the order list).' |
782 | 346 |
|
347 |
#editPaste |
|
910 | 348 |
'Paste from the clipboard.' |
782 | 349 |
|
350 |
#editUndo |
|
910 | 351 |
'Undo the last action.' |
782 | 352 |
|
823 | 353 |
#file |
834 | 354 |
'File functions.' |
805 | 355 |
|
823 | 356 |
#fileBrowseClass |
1018
7222534cb3dc
part of the activeHelp framework moved to ApplicationModel.
Claus Gittinger <cg@exept.de>
parents:
1016
diff
changeset
|
357 |
'Open a System Browser on the current class.' |
805 | 358 |
|
823 | 359 |
#fileDefineClass |
910 | 360 |
'Open a dialog to define the current class.' |
805 | 361 |
|
362 |
#fileDefineClassAndSelector |
|
910 | 363 |
'Open a dialog to define the current class and selector.' |
805 | 364 |
|
823 | 365 |
#fileExit |
910 | 366 |
'Exit this application.' |
823 | 367 |
|
922 | 368 |
#generate |
369 |
'Code generation.' |
|
370 |
||
823 | 371 |
#help |
834 | 372 |
'Help functions.' |
823 | 373 |
|
876 | 374 |
#helpHelpTool |
1018
7222534cb3dc
part of the activeHelp framework moved to ApplicationModel.
Claus Gittinger <cg@exept.de>
parents:
1016
diff
changeset
|
375 |
'Show the Help Tools documentation.' |
876 | 376 |
|
823 | 377 |
#helpShowHelp |
910 | 378 |
'Toggle display of help texts.' |
823 | 379 |
|
380 |
#helpTutorial |
|
1018
7222534cb3dc
part of the activeHelp framework moved to ApplicationModel.
Claus Gittinger <cg@exept.de>
parents:
1016
diff
changeset
|
381 |
'Show this applications documentation.' |
823 | 382 |
|
383 |
#history |
|
834 | 384 |
'History functions.' |
803 | 385 |
|
386 |
#historyEmptyMenu |
|
1016 | 387 |
'Clear the history.' |
803 | 388 |
|
823 | 389 |
#historyMenuItem |
1016 | 390 |
'Switch to that item.' |
762 | 391 |
|
893 | 392 |
#settings |
393 |
'Settings functions.' |
|
394 |
||
823 | 395 |
#test |
834 | 396 |
'Test functions.' |
762 | 397 |
|
398 |
) |
|
399 |
! ! |
|
400 |
||
753 | 401 |
!ToolApplicationModel class methodsFor:'history'! |
402 |
||
1969 | 403 |
getFileHistory |
404 |
"returns the file-history for this tool class" |
|
405 |
||
406 |
fileHistory isNil ifTrue: [fileHistory := OrderedCollection new]. |
|
407 |
^ fileHistory |
|
408 |
! |
|
409 |
||
753 | 410 |
getHistory |
907 | 411 |
"returns the history for this tool class" |
753 | 412 |
|
761
cc0404f8aec6
#getHistory changed because here #? doesn't work correctly
tz
parents:
760
diff
changeset
|
413 |
history isNil ifTrue: [history := OrderedCollection new]. |
cc0404f8aec6
#getHistory changed because here #? doesn't work correctly
tz
parents:
760
diff
changeset
|
414 |
^history |
753 | 415 |
|
416 |
! |
|
417 |
||
418 |
historyMaxSize |
|
907 | 419 |
"returns the maximum size for the history of this tool class" |
753 | 420 |
|
421 |
^10 |
|
422 |
||
423 |
! ! |
|
424 |
||
869 | 425 |
!ToolApplicationModel class methodsFor:'image specs'! |
426 |
||
427 |
desktopIcon |
|
907 | 428 |
"returns the icon used for the desktop" |
869 | 429 |
|
1054
ab639131be1f
find all icons in getAllImageSelectorsFrom:(walk class hierarchy);
Claus Gittinger <cg@exept.de>
parents:
1051
diff
changeset
|
430 |
<resource: #programImage> |
ab639131be1f
find all icons in getAllImageSelectorsFrom:(walk class hierarchy);
Claus Gittinger <cg@exept.de>
parents:
1051
diff
changeset
|
431 |
|
869 | 432 |
^Icon |
433 |
constantNamed:#'ToolApplicationModel desktopIcon' |
|
434 |
ifAbsentPut: |
|
435 |
[ |
|
436 |
|desktopIcon| |
|
990 | 437 |
desktopIcon := Icon stxIcon. |
869 | 438 |
desktopIcon magnifiedBy: Display preferredIconSize/desktopIcon extent |
439 |
] |
|
440 |
||
1054
ab639131be1f
find all icons in getAllImageSelectorsFrom:(walk class hierarchy);
Claus Gittinger <cg@exept.de>
parents:
1051
diff
changeset
|
441 |
"Modified: / 24.8.1998 / 21:34:38 / cg" |
869 | 442 |
! |
443 |
||
444 |
menuIcon |
|
907 | 445 |
"returns the icon used for the menu bar" |
869 | 446 |
|
1054
ab639131be1f
find all icons in getAllImageSelectorsFrom:(walk class hierarchy);
Claus Gittinger <cg@exept.de>
parents:
1051
diff
changeset
|
447 |
<resource: #programImage> |
ab639131be1f
find all icons in getAllImageSelectorsFrom:(walk class hierarchy);
Claus Gittinger <cg@exept.de>
parents:
1051
diff
changeset
|
448 |
|
869 | 449 |
^Icon |
450 |
constantNamed:#'ToolApplicationModel menuIcon' |
|
451 |
ifAbsentPut: |
|
452 |
[ |
|
1165
70fd3edc13b4
care for device-less menuFont
Claus Gittinger <cg@exept.de>
parents:
1157
diff
changeset
|
453 |
|menuIcon myDevice| |
990 | 454 |
menuIcon := Icon stxIcon. |
1165
70fd3edc13b4
care for device-less menuFont
Claus Gittinger <cg@exept.de>
parents:
1157
diff
changeset
|
455 |
myDevice := Screen current. |
70fd3edc13b4
care for device-less menuFont
Claus Gittinger <cg@exept.de>
parents:
1157
diff
changeset
|
456 |
menuIcon magnifiedBy: (MenuPanel defaultFont heightOn:myDevice)/menuIcon height |
869 | 457 |
] |
1054
ab639131be1f
find all icons in getAllImageSelectorsFrom:(walk class hierarchy);
Claus Gittinger <cg@exept.de>
parents:
1051
diff
changeset
|
458 |
|
ab639131be1f
find all icons in getAllImageSelectorsFrom:(walk class hierarchy);
Claus Gittinger <cg@exept.de>
parents:
1051
diff
changeset
|
459 |
"Modified: / 24.8.1998 / 21:34:33 / cg" |
987 | 460 |
! ! |
869 | 461 |
|
753 | 462 |
!ToolApplicationModel class methodsFor:'interface specs'! |
463 |
||
797 | 464 |
windowSpecForCommit |
869 | 465 |
"This resource specification was automatically generated |
466 |
by the UIPainter of ST/X." |
|
467 |
||
468 |
"Do not manually edit this!! If it is corrupted, |
|
469 |
the UIPainter may not be able to read the specification." |
|
470 |
||
471 |
" |
|
472 |
UIPainter new openOnClass:ToolApplicationModel andSelector:#windowSpecForCommit |
|
473 |
ToolApplicationModel new openInterface:#windowSpecForCommit |
|
474 |
" |
|
797 | 475 |
|
476 |
<resource: #canvas> |
|
477 |
||
1259
394ab30e07e0
OK/Cancel button spec (reverse if OK atLeft)
Claus Gittinger <cg@exept.de>
parents:
1200
diff
changeset
|
478 |
^ |
394ab30e07e0
OK/Cancel button spec (reverse if OK atLeft)
Claus Gittinger <cg@exept.de>
parents:
1200
diff
changeset
|
479 |
#(#FullSpec |
394ab30e07e0
OK/Cancel button spec (reverse if OK atLeft)
Claus Gittinger <cg@exept.de>
parents:
1200
diff
changeset
|
480 |
#name: #windowSpecForCommit |
394ab30e07e0
OK/Cancel button spec (reverse if OK atLeft)
Claus Gittinger <cg@exept.de>
parents:
1200
diff
changeset
|
481 |
#window: |
394ab30e07e0
OK/Cancel button spec (reverse if OK atLeft)
Claus Gittinger <cg@exept.de>
parents:
1200
diff
changeset
|
482 |
#(#WindowSpec |
394ab30e07e0
OK/Cancel button spec (reverse if OK atLeft)
Claus Gittinger <cg@exept.de>
parents:
1200
diff
changeset
|
483 |
#label: 'Commit Buttons' |
394ab30e07e0
OK/Cancel button spec (reverse if OK atLeft)
Claus Gittinger <cg@exept.de>
parents:
1200
diff
changeset
|
484 |
#name: 'Commit Buttons' |
394ab30e07e0
OK/Cancel button spec (reverse if OK atLeft)
Claus Gittinger <cg@exept.de>
parents:
1200
diff
changeset
|
485 |
#min: #(#Point 100 22) |
394ab30e07e0
OK/Cancel button spec (reverse if OK atLeft)
Claus Gittinger <cg@exept.de>
parents:
1200
diff
changeset
|
486 |
#max: #(#Point 1152 900) |
394ab30e07e0
OK/Cancel button spec (reverse if OK atLeft)
Claus Gittinger <cg@exept.de>
parents:
1200
diff
changeset
|
487 |
#bounds: #(#Rectangle 18 51 318 111) |
394ab30e07e0
OK/Cancel button spec (reverse if OK atLeft)
Claus Gittinger <cg@exept.de>
parents:
1200
diff
changeset
|
488 |
) |
394ab30e07e0
OK/Cancel button spec (reverse if OK atLeft)
Claus Gittinger <cg@exept.de>
parents:
1200
diff
changeset
|
489 |
#component: |
394ab30e07e0
OK/Cancel button spec (reverse if OK atLeft)
Claus Gittinger <cg@exept.de>
parents:
1200
diff
changeset
|
490 |
#(#SpecCollection |
394ab30e07e0
OK/Cancel button spec (reverse if OK atLeft)
Claus Gittinger <cg@exept.de>
parents:
1200
diff
changeset
|
491 |
#collection: #( |
394ab30e07e0
OK/Cancel button spec (reverse if OK atLeft)
Claus Gittinger <cg@exept.de>
parents:
1200
diff
changeset
|
492 |
#(#HorizontalPanelViewSpec |
394ab30e07e0
OK/Cancel button spec (reverse if OK atLeft)
Claus Gittinger <cg@exept.de>
parents:
1200
diff
changeset
|
493 |
#name: 'HorizontalPanel1' |
394ab30e07e0
OK/Cancel button spec (reverse if OK atLeft)
Claus Gittinger <cg@exept.de>
parents:
1200
diff
changeset
|
494 |
#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
|
495 |
#horizontalLayout: #fitSpace |
394ab30e07e0
OK/Cancel button spec (reverse if OK atLeft)
Claus Gittinger <cg@exept.de>
parents:
1200
diff
changeset
|
496 |
#verticalLayout: #centerMax |
394ab30e07e0
OK/Cancel button spec (reverse if OK atLeft)
Claus Gittinger <cg@exept.de>
parents:
1200
diff
changeset
|
497 |
#horizontalSpace: 3 |
394ab30e07e0
OK/Cancel button spec (reverse if OK atLeft)
Claus Gittinger <cg@exept.de>
parents:
1200
diff
changeset
|
498 |
#verticalSpace: 3 |
394ab30e07e0
OK/Cancel button spec (reverse if OK atLeft)
Claus Gittinger <cg@exept.de>
parents:
1200
diff
changeset
|
499 |
#reverseOrderIfOKAtLeft: true |
394ab30e07e0
OK/Cancel button spec (reverse if OK atLeft)
Claus Gittinger <cg@exept.de>
parents:
1200
diff
changeset
|
500 |
#component: |
394ab30e07e0
OK/Cancel button spec (reverse if OK atLeft)
Claus Gittinger <cg@exept.de>
parents:
1200
diff
changeset
|
501 |
#(#SpecCollection |
394ab30e07e0
OK/Cancel button spec (reverse if OK atLeft)
Claus Gittinger <cg@exept.de>
parents:
1200
diff
changeset
|
502 |
#collection: #( |
797 | 503 |
#(#ActionButtonSpec |
1259
394ab30e07e0
OK/Cancel button spec (reverse if OK atLeft)
Claus Gittinger <cg@exept.de>
parents:
1200
diff
changeset
|
504 |
#label: 'Cancel' |
859 | 505 |
#name: 'cancelButton' |
506 |
#activeHelpKey: #commitCancel |
|
927 | 507 |
#translateLabel: true |
1752
4f7f144157b2
do not resize button labels for label-text
Claus Gittinger <cg@exept.de>
parents:
1751
diff
changeset
|
508 |
"/ #resizeForLabel: true |
859 | 509 |
#tabable: true |
510 |
#model: #cancel |
|
2104 | 511 |
#enableChannel: #enablingCommitButtonsHolder |
1259
394ab30e07e0
OK/Cancel button spec (reverse if OK atLeft)
Claus Gittinger <cg@exept.de>
parents:
1200
diff
changeset
|
512 |
#useDefaultExtent: true |
394ab30e07e0
OK/Cancel button spec (reverse if OK atLeft)
Claus Gittinger <cg@exept.de>
parents:
1200
diff
changeset
|
513 |
) |
797 | 514 |
#(#ActionButtonSpec |
1259
394ab30e07e0
OK/Cancel button spec (reverse if OK atLeft)
Claus Gittinger <cg@exept.de>
parents:
1200
diff
changeset
|
515 |
#label: 'OK' |
859 | 516 |
#name: 'okButton' |
517 |
#activeHelpKey: #commitOK |
|
927 | 518 |
#translateLabel: true |
1752
4f7f144157b2
do not resize button labels for label-text
Claus Gittinger <cg@exept.de>
parents:
1751
diff
changeset
|
519 |
"/ #resizeForLabel: true |
859 | 520 |
#tabable: true |
521 |
#model: #accept |
|
2104 | 522 |
#enableChannel: #enablingCommitButtonsHolder |
1259
394ab30e07e0
OK/Cancel button spec (reverse if OK atLeft)
Claus Gittinger <cg@exept.de>
parents:
1200
diff
changeset
|
523 |
#useDefaultExtent: true |
394ab30e07e0
OK/Cancel button spec (reverse if OK atLeft)
Claus Gittinger <cg@exept.de>
parents:
1200
diff
changeset
|
524 |
) |
394ab30e07e0
OK/Cancel button spec (reverse if OK atLeft)
Claus Gittinger <cg@exept.de>
parents:
1200
diff
changeset
|
525 |
) |
394ab30e07e0
OK/Cancel button spec (reverse if OK atLeft)
Claus Gittinger <cg@exept.de>
parents:
1200
diff
changeset
|
526 |
|
797 | 527 |
) |
1259
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 |
) |
394ab30e07e0
OK/Cancel button spec (reverse if OK atLeft)
Claus Gittinger <cg@exept.de>
parents:
1200
diff
changeset
|
530 |
|
394ab30e07e0
OK/Cancel button spec (reverse if OK atLeft)
Claus Gittinger <cg@exept.de>
parents:
1200
diff
changeset
|
531 |
) |
797 | 532 |
) |
533 |
! |
|
534 |
||
535 |
windowSpecForCommitWithoutChannels |
|
869 | 536 |
"This resource specification was automatically generated |
537 |
by the UIPainter of ST/X." |
|
538 |
||
539 |
"Do not manually edit this!! If it is corrupted, |
|
540 |
the UIPainter may not be able to read the specification." |
|
541 |
||
542 |
" |
|
543 |
UIPainter new openOnClass:ToolApplicationModel andSelector:#windowSpecForCommitWithoutChannels |
|
544 |
ToolApplicationModel new openInterface:#windowSpecForCommitWithoutChannels |
|
545 |
" |
|
797 | 546 |
|
547 |
<resource: #canvas> |
|
548 |
||
1259
394ab30e07e0
OK/Cancel button spec (reverse if OK atLeft)
Claus Gittinger <cg@exept.de>
parents:
1200
diff
changeset
|
549 |
^ |
1989 | 550 |
#(FullSpec |
551 |
name: windowSpecForCommitWithoutChannels |
|
552 |
window: |
|
553 |
(WindowSpec |
|
554 |
label: 'Commit Buttons Without Channels' |
|
555 |
name: 'Commit Buttons Without Channels' |
|
556 |
min: (Point 100 22) |
|
557 |
max: (Point 1152 900) |
|
558 |
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
|
559 |
) |
1989 | 560 |
component: |
561 |
(SpecCollection |
|
562 |
collection: ( |
|
563 |
(HorizontalPanelViewSpec |
|
564 |
name: 'HorizontalPanel1' |
|
565 |
layout: (LayoutFrame 0 0.0 0 0.0 0 1.0 0 1.0) |
|
566 |
horizontalLayout: fitSpace |
|
567 |
verticalLayout: centerMax |
|
568 |
horizontalSpace: 3 |
|
569 |
verticalSpace: 3 |
|
570 |
reverseOrderIfOKAtLeft: true |
|
571 |
component: |
|
572 |
(SpecCollection |
|
573 |
collection: ( |
|
574 |
(ActionButtonSpec |
|
575 |
label: 'Cancel' |
|
576 |
name: 'cancelButton' |
|
577 |
activeHelpKey: commitCancel |
|
578 |
translateLabel: true |
|
579 |
tabable: true |
|
580 |
model: cancel |
|
581 |
useDefaultExtent: true |
|
1259
394ab30e07e0
OK/Cancel button spec (reverse if OK atLeft)
Claus Gittinger <cg@exept.de>
parents:
1200
diff
changeset
|
582 |
) |
1989 | 583 |
(ActionButtonSpec |
584 |
label: 'OK' |
|
585 |
name: 'okButton' |
|
586 |
activeHelpKey: commitOK |
|
587 |
translateLabel: true |
|
588 |
tabable: true |
|
589 |
model: accept |
|
590 |
isDefault: true |
|
591 |
useDefaultExtent: true |
|
1259
394ab30e07e0
OK/Cancel button spec (reverse if OK atLeft)
Claus Gittinger <cg@exept.de>
parents:
1200
diff
changeset
|
592 |
) |
394ab30e07e0
OK/Cancel button spec (reverse if OK atLeft)
Claus Gittinger <cg@exept.de>
parents:
1200
diff
changeset
|
593 |
) |
394ab30e07e0
OK/Cancel button spec (reverse if OK atLeft)
Claus Gittinger <cg@exept.de>
parents:
1200
diff
changeset
|
594 |
|
797 | 595 |
) |
1259
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 |
) |
394ab30e07e0
OK/Cancel button spec (reverse if OK atLeft)
Claus Gittinger <cg@exept.de>
parents:
1200
diff
changeset
|
598 |
|
394ab30e07e0
OK/Cancel button spec (reverse if OK atLeft)
Claus Gittinger <cg@exept.de>
parents:
1200
diff
changeset
|
599 |
) |
797 | 600 |
) |
601 |
! |
|
602 |
||
603 |
windowSpecForInfoBar |
|
869 | 604 |
"This resource specification was automatically generated |
605 |
by the UIPainter of ST/X." |
|
606 |
||
607 |
"Do not manually edit this!! If it is corrupted, |
|
608 |
the UIPainter may not be able to read the specification." |
|
609 |
||
610 |
" |
|
611 |
UIPainter new openOnClass:ToolApplicationModel andSelector:#windowSpecForInfoBar |
|
612 |
ToolApplicationModel new openInterface:#windowSpecForInfoBar |
|
613 |
" |
|
797 | 614 |
|
615 |
<resource: #canvas> |
|
616 |
||
1530 | 617 |
^ |
618 |
#(#FullSpec |
|
619 |
#name: #windowSpecForInfoBar |
|
620 |
#window: |
|
621 |
#(#WindowSpec |
|
622 |
#label: 'Info Bar' |
|
623 |
#name: 'Info Bar' |
|
624 |
#min: #(#Point 400 320) |
|
625 |
#max: #(#Point 1152 900) |
|
626 |
#bounds: #(#Rectangle 13 23 513 369) |
|
627 |
) |
|
628 |
#component: |
|
629 |
#(#SpecCollection |
|
630 |
#collection: #( |
|
631 |
#(#ViewSpec |
|
2108 | 632 |
#name: 'infoView' |
1545 | 633 |
#layout: #(#LayoutFrame 0 0.0 0 0.0 0 1.0 0 1.0) |
1530 | 634 |
#component: |
635 |
#(#SpecCollection |
|
636 |
#collection: #( |
|
637 |
#(#LabelSpec |
|
638 |
#name: 'infoLabel' |
|
1545 | 639 |
#layout: #(#LayoutFrame 0 0.0 0 0.0 0 1.0 0 1.0) |
1530 | 640 |
#level: -1 |
2104 | 641 |
#labelChannel: #infoLabelHolder |
1530 | 642 |
#resizeForLabel: false |
643 |
#adjust: #left |
|
644 |
) |
|
645 |
) |
|
646 |
||
797 | 647 |
) |
1530 | 648 |
) |
649 |
) |
|
650 |
||
651 |
) |
|
797 | 652 |
) |
653 |
! |
|
654 |
||
655 |
windowSpecForInfoBarWithClock |
|
869 | 656 |
"This resource specification was automatically generated |
657 |
by the UIPainter of ST/X." |
|
658 |
||
659 |
"Do not manually edit this!! If it is corrupted, |
|
660 |
the UIPainter may not be able to read the specification." |
|
661 |
||
662 |
" |
|
663 |
UIPainter new openOnClass:ToolApplicationModel andSelector:#windowSpecForInfoBarWithClock |
|
664 |
ToolApplicationModel new openInterface:#windowSpecForInfoBarWithClock |
|
665 |
" |
|
797 | 666 |
|
667 |
<resource: #canvas> |
|
668 |
||
1331 | 669 |
^ |
670 |
#(#FullSpec |
|
671 |
#name: #windowSpecForInfoBarWithClock |
|
672 |
#window: |
|
673 |
#(#WindowSpec |
|
674 |
#label: 'Info Bar' |
|
675 |
#name: 'Info Bar' |
|
676 |
#min: #(#Point 400 320) |
|
677 |
#max: #(#Point 1152 900) |
|
1530 | 678 |
#bounds: #(#Rectangle 13 23 513 343) |
1331 | 679 |
) |
680 |
#component: |
|
681 |
#(#SpecCollection |
|
682 |
#collection: #( |
|
683 |
#(#VariableHorizontalPanelSpec |
|
2108 | 684 |
#name: 'infoView' |
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 |
||
2108 | 974 |
infoLabelHolder:aValueHolder |
975 |
builder aspectAt:#useAlienInfoLabelHolder put:true. |
|
976 |
builder aspectAt:#valueOfInfoLabel put:aValueHolder. |
|
977 |
! |
|
978 |
||
1147 | 979 |
modifiedChannel |
980 |
"returns a valueHolder which is set to true, whenever any of |
|
981 |
my editfields is modified - this is hooked to |
|
2104 | 982 |
the enablingCommitButtonsHolder channel" |
1147 | 983 |
|
984 |
|holder| |
|
985 |
||
986 |
(holder := builder bindingAt:#modifiedChannel) isNil ifTrue:[ |
|
1157 | 987 |
builder aspectAt:#modifiedChannel put:(holder := ValueHolder with:false). |
1147 | 988 |
holder |
1331 | 989 |
onChangeEvaluate:[ |
1148 | 990 |
holder value ifTrue:[ |
2104 | 991 |
self enablingCommitButtonsHolder value:true. |
1147 | 992 |
] |
993 |
] |
|
994 |
]. |
|
995 |
^ holder |
|
996 |
||
997 |
"Modified: / 21.5.1998 / 03:39:49 / cg" |
|
998 |
! |
|
999 |
||
2104 | 1000 |
timeLabelHolder |
1001 |
"returns the time label as value holder" |
|
1002 |
||
1003 |
^ builder nilValueAspectFor:#valueOfTimeLabel |
|
1004 |
! |
|
1005 |
||
822 | 1006 |
valueOfCanCopy |
907 | 1007 |
"returns whether can copy as value holder" |
822 | 1008 |
|
2104 | 1009 |
self obsoleteMethodWarning:'stupid name - use #canCopyHolder'. |
1010 |
^ self canCopyHolder |
|
822 | 1011 |
! |
1012 |
||
1013 |
valueOfCanCut |
|
907 | 1014 |
"returns whether can paste as value holder" |
822 | 1015 |
|
2104 | 1016 |
self obsoleteMethodWarning:'stupid name - use #canCutHolder'. |
1017 |
^ self canCutHolder |
|
822 | 1018 |
|
936 | 1019 |
"Modified: / 21.5.1998 / 03:39:13 / cg" |
822 | 1020 |
! |
1021 |
||
1022 |
valueOfCanPaste |
|
907 | 1023 |
"returns whether can paste as value holder" |
822 | 1024 |
|
2104 | 1025 |
self obsoleteMethodWarning:'stupid name - use #canPasteHolder'. |
1026 |
^ self canPasteHolder |
|
822 | 1027 |
! |
1028 |
||
1029 |
valueOfCanUndo |
|
907 | 1030 |
"returns whether can undo as value holder" |
822 | 1031 |
|
2104 | 1032 |
self obsoleteMethodWarning:'stupid name - use #canUndoHolder'. |
1033 |
^ self canUndoHolder |
|
822 | 1034 |
|
936 | 1035 |
"Modified: / 21.5.1998 / 03:39:31 / cg" |
822 | 1036 |
! |
1037 |
||
782 | 1038 |
valueOfEnablingCommitButtons |
907 | 1039 |
"returns the enabling of the commit of this tool as value holder" |
753 | 1040 |
|
2104 | 1041 |
self obsoleteMethodWarning:'stupid name - use #enablingCommitButtonsHolder'. |
1042 |
^ self enablingCommitButtonsHolder |
|
753 | 1043 |
|
936 | 1044 |
"Modified: / 21.5.1998 / 03:39:49 / cg" |
782 | 1045 |
! |
1046 |
||
858 | 1047 |
valueOfHavingDocumentation |
1004 | 1048 |
"returns the enabling of having documentation for this tool as value holder" |
803 | 1049 |
|
2104 | 1050 |
self obsoleteMethodWarning:'stupid name - use havingDocumentationHolder'. |
1051 |
^ self havingDocumentationHolder |
|
803 | 1052 |
! |
1053 |
||
782 | 1054 |
valueOfInfoLabel |
907 | 1055 |
"returns the info label as value holder" |
782 | 1056 |
|
2104 | 1057 |
self obsoleteMethodWarning:'stupid name - use infoLabelHolder'. |
1058 |
^ self infoLabelHolder |
|
753 | 1059 |
|
936 | 1060 |
"Modified: / 21.5.1998 / 03:40:34 / cg" |
782 | 1061 |
! |
1062 |
||
1063 |
valueOfTimeLabel |
|
907 | 1064 |
"returns the time label as value holder" |
753 | 1065 |
|
2104 | 1066 |
self obsoleteMethodWarning:'stupid name - use timeLabelHolder'. |
1067 |
^ self timeLabelHolder |
|
753 | 1068 |
|
936 | 1069 |
"Modified: / 21.5.1998 / 03:40:42 / cg" |
753 | 1070 |
! ! |
1071 |
||
782 | 1072 |
!ToolApplicationModel methodsFor:'clipboard'! |
753 | 1073 |
|
838 | 1074 |
clipboard |
907 | 1075 |
"returns the clipboard" |
838 | 1076 |
|
1077 |
^self class clipboard |
|
1078 |
! |
|
1079 |
||
2104 | 1080 |
clipboard:anEditObject |
907 | 1081 |
"sets the clipboard and the value holder for can pasting" |
753 | 1082 |
|
782 | 1083 |
self class clipboard: anEditObject. |
753 | 1084 |
|
2104 | 1085 |
self canPasteHolder value: anEditObject notNil |
782 | 1086 |
! ! |
1087 |
||
1195
3e136baa74f9
moved all clock-handling code to one place
Claus Gittinger <cg@exept.de>
parents:
1165
diff
changeset
|
1088 |
!ToolApplicationModel methodsFor:'clock handling'! |
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 |
startClock |
3e136baa74f9
moved all clock-handling code to one place
Claus Gittinger <cg@exept.de>
parents:
1165
diff
changeset
|
1091 |
"/ start the time-block |
3e136baa74f9
moved all clock-handling code to one place
Claus Gittinger <cg@exept.de>
parents:
1165
diff
changeset
|
1092 |
self startClockOnTimedBlock:[self updateTime]. |
3e136baa74f9
moved all clock-handling code to one place
Claus Gittinger <cg@exept.de>
parents:
1165
diff
changeset
|
1093 |
! |
3e136baa74f9
moved all clock-handling code to one place
Claus Gittinger <cg@exept.de>
parents:
1165
diff
changeset
|
1094 |
|
3e136baa74f9
moved all clock-handling code to one place
Claus Gittinger <cg@exept.de>
parents:
1165
diff
changeset
|
1095 |
startClockOnTimedBlock: aBlock |
3e136baa74f9
moved all clock-handling code to one place
Claus Gittinger <cg@exept.de>
parents:
1165
diff
changeset
|
1096 |
"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
|
1097 |
|
3e136baa74f9
moved all clock-handling code to one place
Claus Gittinger <cg@exept.de>
parents:
1165
diff
changeset
|
1098 |
timeBlock := aBlock. |
3e136baa74f9
moved all clock-handling code to one place
Claus Gittinger <cg@exept.de>
parents:
1165
diff
changeset
|
1099 |
aBlock value. |
3e136baa74f9
moved all clock-handling code to one place
Claus Gittinger <cg@exept.de>
parents:
1165
diff
changeset
|
1100 |
|
3e136baa74f9
moved all clock-handling code to one place
Claus Gittinger <cg@exept.de>
parents:
1165
diff
changeset
|
1101 |
"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
|
1102 |
! |
3e136baa74f9
moved all clock-handling code to one place
Claus Gittinger <cg@exept.de>
parents:
1165
diff
changeset
|
1103 |
|
3e136baa74f9
moved all clock-handling code to one place
Claus Gittinger <cg@exept.de>
parents:
1165
diff
changeset
|
1104 |
stopClock |
3e136baa74f9
moved all clock-handling code to one place
Claus Gittinger <cg@exept.de>
parents:
1165
diff
changeset
|
1105 |
"/ stop the time-block |
3e136baa74f9
moved all clock-handling code to one place
Claus Gittinger <cg@exept.de>
parents:
1165
diff
changeset
|
1106 |
|
3e136baa74f9
moved all clock-handling code to one place
Claus Gittinger <cg@exept.de>
parents:
1165
diff
changeset
|
1107 |
timeBlock notNil ifTrue:[ |
3e136baa74f9
moved all clock-handling code to one place
Claus Gittinger <cg@exept.de>
parents:
1165
diff
changeset
|
1108 |
Processor removeTimedBlock:timeBlock. |
3e136baa74f9
moved all clock-handling code to one place
Claus Gittinger <cg@exept.de>
parents:
1165
diff
changeset
|
1109 |
timeBlock := nil. |
3e136baa74f9
moved all clock-handling code to one place
Claus Gittinger <cg@exept.de>
parents:
1165
diff
changeset
|
1110 |
]. |
2104 | 1111 |
self timeLabelHolder value:'' |
1195
3e136baa74f9
moved all clock-handling code to one place
Claus Gittinger <cg@exept.de>
parents:
1165
diff
changeset
|
1112 |
! |
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 |
updateTime |
3e136baa74f9
moved all clock-handling code to one place
Claus Gittinger <cg@exept.de>
parents:
1165
diff
changeset
|
1115 |
"update my time-field" |
3e136baa74f9
moved all clock-handling code to one place
Claus Gittinger <cg@exept.de>
parents:
1165
diff
changeset
|
1116 |
|
3e136baa74f9
moved all clock-handling code to one place
Claus Gittinger <cg@exept.de>
parents:
1165
diff
changeset
|
1117 |
|now hours minutes suffix| |
3e136baa74f9
moved all clock-handling code to one place
Claus Gittinger <cg@exept.de>
parents:
1165
diff
changeset
|
1118 |
|
3e136baa74f9
moved all clock-handling code to one place
Claus Gittinger <cg@exept.de>
parents:
1165
diff
changeset
|
1119 |
now := Time now. |
3e136baa74f9
moved all clock-handling code to one place
Claus Gittinger <cg@exept.de>
parents:
1165
diff
changeset
|
1120 |
|
3e136baa74f9
moved all clock-handling code to one place
Claus Gittinger <cg@exept.de>
parents:
1165
diff
changeset
|
1121 |
hours := now hours. |
3e136baa74f9
moved all clock-handling code to one place
Claus Gittinger <cg@exept.de>
parents:
1165
diff
changeset
|
1122 |
minutes := now minutes printString. |
3e136baa74f9
moved all clock-handling code to one place
Claus Gittinger <cg@exept.de>
parents:
1165
diff
changeset
|
1123 |
suffix := ' '. |
3e136baa74f9
moved all clock-handling code to one place
Claus Gittinger <cg@exept.de>
parents:
1165
diff
changeset
|
1124 |
|
2121 | 1125 |
(resources string:'TIME_FORMAT' default:12) == 12 ifTrue:[ |
1195
3e136baa74f9
moved all clock-handling code to one place
Claus Gittinger <cg@exept.de>
parents:
1165
diff
changeset
|
1126 |
suffix := ' am '. |
3e136baa74f9
moved all clock-handling code to one place
Claus Gittinger <cg@exept.de>
parents:
1165
diff
changeset
|
1127 |
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
|
1128 |
]. |
3e136baa74f9
moved all clock-handling code to one place
Claus Gittinger <cg@exept.de>
parents:
1165
diff
changeset
|
1129 |
|
3e136baa74f9
moved all clock-handling code to one place
Claus Gittinger <cg@exept.de>
parents:
1165
diff
changeset
|
1130 |
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
|
1131 |
|
2104 | 1132 |
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
|
1133 |
|
3e136baa74f9
moved all clock-handling code to one place
Claus Gittinger <cg@exept.de>
parents:
1165
diff
changeset
|
1134 |
timeBlock notNil ifTrue:[ |
3e136baa74f9
moved all clock-handling code to one place
Claus Gittinger <cg@exept.de>
parents:
1165
diff
changeset
|
1135 |
Processor removeTimedBlock:timeBlock. |
3e136baa74f9
moved all clock-handling code to one place
Claus Gittinger <cg@exept.de>
parents:
1165
diff
changeset
|
1136 |
Processor addTimedBlock:timeBlock afterSeconds:5 |
3e136baa74f9
moved all clock-handling code to one place
Claus Gittinger <cg@exept.de>
parents:
1165
diff
changeset
|
1137 |
] |
3e136baa74f9
moved all clock-handling code to one place
Claus Gittinger <cg@exept.de>
parents:
1165
diff
changeset
|
1138 |
! ! |
3e136baa74f9
moved all clock-handling code to one place
Claus Gittinger <cg@exept.de>
parents:
1165
diff
changeset
|
1139 |
|
1006
786de97d72f9
allow redefinition of the about-boxes image.
Claus Gittinger <cg@exept.de>
parents:
1004
diff
changeset
|
1140 |
!ToolApplicationModel methodsFor:'defaults'! |
786de97d72f9
allow redefinition of the about-boxes image.
Claus Gittinger <cg@exept.de>
parents:
1004
diff
changeset
|
1141 |
|
786de97d72f9
allow redefinition of the about-boxes image.
Claus Gittinger <cg@exept.de>
parents:
1004
diff
changeset
|
1142 |
aboutImage |
786de97d72f9
allow redefinition of the about-boxes image.
Claus Gittinger <cg@exept.de>
parents:
1004
diff
changeset
|
1143 |
"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
|
1144 |
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
|
1145 |
|
786de97d72f9
allow redefinition of the about-boxes image.
Claus Gittinger <cg@exept.de>
parents:
1004
diff
changeset
|
1146 |
^ nil |
786de97d72f9
allow redefinition of the about-boxes image.
Claus Gittinger <cg@exept.de>
parents:
1004
diff
changeset
|
1147 |
|
786de97d72f9
allow redefinition of the about-boxes image.
Claus Gittinger <cg@exept.de>
parents:
1004
diff
changeset
|
1148 |
"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
|
1149 |
! ! |
786de97d72f9
allow redefinition of the about-boxes image.
Claus Gittinger <cg@exept.de>
parents:
1004
diff
changeset
|
1150 |
|
782 | 1151 |
!ToolApplicationModel methodsFor:'help'! |
753 | 1152 |
|
1526
02941e80a146
refactored aboutBox setup for easier subclassing
Claus Gittinger <cg@exept.de>
parents:
1516
diff
changeset
|
1153 |
aboutThisApplicationText |
02941e80a146
refactored aboutBox setup for easier subclassing
Claus Gittinger <cg@exept.de>
parents:
1516
diff
changeset
|
1154 |
"text for an about box for this application. |
02941e80a146
refactored aboutBox setup for easier subclassing
Claus Gittinger <cg@exept.de>
parents:
1516
diff
changeset
|
1155 |
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
|
1156 |
the classes documentation." |
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 |
|rev myClass clsRev msg| |
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 |
rev := ''. |
02941e80a146
refactored aboutBox setup for easier subclassing
Claus Gittinger <cg@exept.de>
parents:
1516
diff
changeset
|
1161 |
myClass := self class. |
02941e80a146
refactored aboutBox setup for easier subclassing
Claus Gittinger <cg@exept.de>
parents:
1516
diff
changeset
|
1162 |
|
02941e80a146
refactored aboutBox setup for easier subclassing
Claus Gittinger <cg@exept.de>
parents:
1516
diff
changeset
|
1163 |
(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
|
1164 |
|
02941e80a146
refactored aboutBox setup for easier subclassing
Claus Gittinger <cg@exept.de>
parents:
1516
diff
changeset
|
1165 |
msg := '\The application\\' withCRs |
02941e80a146
refactored aboutBox setup for easier subclassing
Claus Gittinger <cg@exept.de>
parents:
1516
diff
changeset
|
1166 |
, myClass name asBoldText, rev |
02941e80a146
refactored aboutBox setup for easier subclassing
Claus Gittinger <cg@exept.de>
parents:
1516
diff
changeset
|
1167 |
, '\\has been designed and implemented by: \' withCRs |
02941e80a146
refactored aboutBox setup for easier subclassing
Claus Gittinger <cg@exept.de>
parents:
1516
diff
changeset
|
1168 |
, ((self class authorLinesForAboutBox collect:[:l | '- ' , l]) asStringWith:$\) withCRs |
02941e80a146
refactored aboutBox setup for easier subclassing
Claus Gittinger <cg@exept.de>
parents:
1516
diff
changeset
|
1169 |
, '\\' withCRs. |
02941e80a146
refactored aboutBox setup for easier subclassing
Claus Gittinger <cg@exept.de>
parents:
1516
diff
changeset
|
1170 |
msg := msg withTabsExpanded. |
02941e80a146
refactored aboutBox setup for easier subclassing
Claus Gittinger <cg@exept.de>
parents:
1516
diff
changeset
|
1171 |
^msg |
02941e80a146
refactored aboutBox setup for easier subclassing
Claus Gittinger <cg@exept.de>
parents:
1516
diff
changeset
|
1172 |
|
02941e80a146
refactored aboutBox setup for easier subclassing
Claus Gittinger <cg@exept.de>
parents:
1516
diff
changeset
|
1173 |
"Modified: / 12.3.1999 / 00:12:13 / cg" |
02941e80a146
refactored aboutBox setup for easier subclassing
Claus Gittinger <cg@exept.de>
parents:
1516
diff
changeset
|
1174 |
"Created: / 13.11.2001 / 12:34:19 / cg" |
02941e80a146
refactored aboutBox setup for easier subclassing
Claus Gittinger <cg@exept.de>
parents:
1516
diff
changeset
|
1175 |
! |
02941e80a146
refactored aboutBox setup for easier subclassing
Claus Gittinger <cg@exept.de>
parents:
1516
diff
changeset
|
1176 |
|
762 | 1177 |
defaultInfoLabel |
907 | 1178 |
"returns the default info label; here an empty string" |
762 | 1179 |
|
1018
7222534cb3dc
part of the activeHelp framework moved to ApplicationModel.
Claus Gittinger <cg@exept.de>
parents:
1016
diff
changeset
|
1180 |
^ '' |
984 | 1181 |
|
1018
7222534cb3dc
part of the activeHelp framework moved to ApplicationModel.
Claus Gittinger <cg@exept.de>
parents:
1016
diff
changeset
|
1182 |
"Modified: / 31.7.1998 / 18:44:55 / cg" |
984 | 1183 |
! |
1184 |
||
753 | 1185 |
openAbout |
1018
7222534cb3dc
part of the activeHelp framework moved to ApplicationModel.
Claus Gittinger <cg@exept.de>
parents:
1016
diff
changeset
|
1186 |
"opens an about box (on ST/X)" |
753 | 1187 |
|
1043
32cd5ccbd94f
made openAboutSTX a class method for sharability.
Claus Gittinger <cg@exept.de>
parents:
1040
diff
changeset
|
1188 |
self class openAboutSTX |
753 | 1189 |
|
1043
32cd5ccbd94f
made openAboutSTX a class method for sharability.
Claus Gittinger <cg@exept.de>
parents:
1040
diff
changeset
|
1190 |
"Modified: / 14.8.1998 / 13:17:57 / cg" |
753 | 1191 |
! |
1192 |
||
858 | 1193 |
openHTMLDocument: aHTMLFilename |
907 | 1194 |
"opens a HTML browser on aHTMLFilename" |
858 | 1195 |
|
1196 |
HTMLDocumentView openFullOnDocumentationFile: aHTMLFilename |
|
1197 |
! |
|
1198 |
||
1018
7222534cb3dc
part of the activeHelp framework moved to ApplicationModel.
Claus Gittinger <cg@exept.de>
parents:
1016
diff
changeset
|
1199 |
showHelp:aHelpText for:view |
1631 | 1200 |
"displays aHelpText in the info label. |
1201 |
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
|
1202 |
|
1343 | 1203 |
"/ masterApplication notNil ifTrue:[ |
1204 |
"/ ^ masterApplication showHelp:aHelpText for:view |
|
1205 |
"/ ]. |
|
1206 |
"/ |
|
1018
7222534cb3dc
part of the activeHelp framework moved to ApplicationModel.
Claus Gittinger <cg@exept.de>
parents:
1016
diff
changeset
|
1207 |
aHelpText isNil |
7222534cb3dc
part of the activeHelp framework moved to ApplicationModel.
Claus Gittinger <cg@exept.de>
parents:
1016
diff
changeset
|
1208 |
ifTrue: [self updateInfoLabel] |
2104 | 1209 |
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
|
1210 |
! |
7222534cb3dc
part of the activeHelp framework moved to ApplicationModel.
Claus Gittinger <cg@exept.de>
parents:
1016
diff
changeset
|
1211 |
|
7222534cb3dc
part of the activeHelp framework moved to ApplicationModel.
Claus Gittinger <cg@exept.de>
parents:
1016
diff
changeset
|
1212 |
showingHelp |
7222534cb3dc
part of the activeHelp framework moved to ApplicationModel.
Claus Gittinger <cg@exept.de>
parents:
1016
diff
changeset
|
1213 |
"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
|
1214 |
application; false otherwise" |
782 | 1215 |
|
783 | 1216 |
|currentActiveHelp| |
858 | 1217 |
|
783 | 1218 |
currentActiveHelp := ActiveHelp currentHelpListener. |
1219 |
||
1018
7222534cb3dc
part of the activeHelp framework moved to ApplicationModel.
Claus Gittinger <cg@exept.de>
parents:
1016
diff
changeset
|
1220 |
^ self class showingHelp |
1051
65dfbf6481b5
showingHelp fixed (tree-item editor)
Claus Gittinger <cg@exept.de>
parents:
1043
diff
changeset
|
1221 |
and: [currentActiveHelp notNil and: [ |
65dfbf6481b5
showingHelp fixed (tree-item editor)
Claus Gittinger <cg@exept.de>
parents:
1043
diff
changeset
|
1222 |
currentActiveHelp interestedIn: self window]] |
65dfbf6481b5
showingHelp fixed (tree-item editor)
Claus Gittinger <cg@exept.de>
parents:
1043
diff
changeset
|
1223 |
|
65dfbf6481b5
showingHelp fixed (tree-item editor)
Claus Gittinger <cg@exept.de>
parents:
1043
diff
changeset
|
1224 |
"/ ^ self class showingHelp |
65dfbf6481b5
showingHelp fixed (tree-item editor)
Claus Gittinger <cg@exept.de>
parents:
1043
diff
changeset
|
1225 |
"/ and: [currentActiveHelp notNil and: [masterApplication notNil |
65dfbf6481b5
showingHelp fixed (tree-item editor)
Claus Gittinger <cg@exept.de>
parents:
1043
diff
changeset
|
1226 |
"/ ifFalse: [currentActiveHelp interestedIn: self window] |
65dfbf6481b5
showingHelp fixed (tree-item editor)
Claus Gittinger <cg@exept.de>
parents:
1043
diff
changeset
|
1227 |
"/ ifTrue: [currentActiveHelp interestedIn: masterApplication window]]] |
782 | 1228 |
|
1018
7222534cb3dc
part of the activeHelp framework moved to ApplicationModel.
Claus Gittinger <cg@exept.de>
parents:
1016
diff
changeset
|
1229 |
"Created: / 31.7.1998 / 17:57:03 / cg" |
1051
65dfbf6481b5
showingHelp fixed (tree-item editor)
Claus Gittinger <cg@exept.de>
parents:
1043
diff
changeset
|
1230 |
"Modified: / 22.8.1998 / 00:06:38 / cg" |
782 | 1231 |
! |
1232 |
||
1018
7222534cb3dc
part of the activeHelp framework moved to ApplicationModel.
Claus Gittinger <cg@exept.de>
parents:
1016
diff
changeset
|
1233 |
showingHelp: aValue |
7222534cb3dc
part of the activeHelp framework moved to ApplicationModel.
Claus Gittinger <cg@exept.de>
parents:
1016
diff
changeset
|
1234 |
"toggles showing help for this application" |
984 | 1235 |
|
1018
7222534cb3dc
part of the activeHelp framework moved to ApplicationModel.
Claus Gittinger <cg@exept.de>
parents:
1016
diff
changeset
|
1236 |
(self class showingHelp: aValue) |
7222534cb3dc
part of the activeHelp framework moved to ApplicationModel.
Claus Gittinger <cg@exept.de>
parents:
1016
diff
changeset
|
1237 |
ifTrue: [ActiveHelp startFor:self] |
7222534cb3dc
part of the activeHelp framework moved to ApplicationModel.
Claus Gittinger <cg@exept.de>
parents:
1016
diff
changeset
|
1238 |
ifFalse: [ActiveHelp stopFor:self. self updateInfoLabel] |
984 | 1239 |
|
1018
7222534cb3dc
part of the activeHelp framework moved to ApplicationModel.
Claus Gittinger <cg@exept.de>
parents:
1016
diff
changeset
|
1240 |
"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
|
1241 |
"Modified: / 31.7.1998 / 18:44:39 / cg" |
822 | 1242 |
! |
1243 |
||
1244 |
updateInfoLabel |
|
1018
7222534cb3dc
part of the activeHelp framework moved to ApplicationModel.
Claus Gittinger <cg@exept.de>
parents:
1016
diff
changeset
|
1245 |
"updates the info label at the bottom of this application" |
822 | 1246 |
|
2104 | 1247 |
self infoLabelHolder value: self defaultInfoLabel |
1018
7222534cb3dc
part of the activeHelp framework moved to ApplicationModel.
Claus Gittinger <cg@exept.de>
parents:
1016
diff
changeset
|
1248 |
|
7222534cb3dc
part of the activeHelp framework moved to ApplicationModel.
Claus Gittinger <cg@exept.de>
parents:
1016
diff
changeset
|
1249 |
"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
|
1250 |
! |
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 |
xxopenAboutThisApplication |
02941e80a146
refactored aboutBox setup for easier subclassing
Claus Gittinger <cg@exept.de>
parents:
1516
diff
changeset
|
1253 |
"opens an about box for this application. |
02941e80a146
refactored aboutBox setup for easier subclassing
Claus Gittinger <cg@exept.de>
parents:
1516
diff
changeset
|
1254 |
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
|
1255 |
the classes documentation." |
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 |
|rev box myClass clsRev image msg| |
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 |
rev := ''. |
02941e80a146
refactored aboutBox setup for easier subclassing
Claus Gittinger <cg@exept.de>
parents:
1516
diff
changeset
|
1260 |
myClass := self class. |
02941e80a146
refactored aboutBox setup for easier subclassing
Claus Gittinger <cg@exept.de>
parents:
1516
diff
changeset
|
1261 |
|
02941e80a146
refactored aboutBox setup for easier subclassing
Claus Gittinger <cg@exept.de>
parents:
1516
diff
changeset
|
1262 |
(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
|
1263 |
|
02941e80a146
refactored aboutBox setup for easier subclassing
Claus Gittinger <cg@exept.de>
parents:
1516
diff
changeset
|
1264 |
msg := '\The application\\' withCRs |
02941e80a146
refactored aboutBox setup for easier subclassing
Claus Gittinger <cg@exept.de>
parents:
1516
diff
changeset
|
1265 |
, myClass name asBoldText, rev |
02941e80a146
refactored aboutBox setup for easier subclassing
Claus Gittinger <cg@exept.de>
parents:
1516
diff
changeset
|
1266 |
, '\\has been designed and implemented by: \' withCRs |
02941e80a146
refactored aboutBox setup for easier subclassing
Claus Gittinger <cg@exept.de>
parents:
1516
diff
changeset
|
1267 |
, ((self class authorLinesForAboutBox collect:[:l | '- ' , l]) asStringWith:$\) withCRs |
02941e80a146
refactored aboutBox setup for easier subclassing
Claus Gittinger <cg@exept.de>
parents:
1516
diff
changeset
|
1268 |
, '\\' withCRs. |
02941e80a146
refactored aboutBox setup for easier subclassing
Claus Gittinger <cg@exept.de>
parents:
1516
diff
changeset
|
1269 |
msg := msg withTabsExpanded. |
02941e80a146
refactored aboutBox setup for easier subclassing
Claus Gittinger <cg@exept.de>
parents:
1516
diff
changeset
|
1270 |
|
02941e80a146
refactored aboutBox setup for easier subclassing
Claus Gittinger <cg@exept.de>
parents:
1516
diff
changeset
|
1271 |
AboutBox isNil ifTrue:[ |
02941e80a146
refactored aboutBox setup for easier subclassing
Claus Gittinger <cg@exept.de>
parents:
1516
diff
changeset
|
1272 |
"/ this handles bad installations of ST/X, |
02941e80a146
refactored aboutBox setup for easier subclassing
Claus Gittinger <cg@exept.de>
parents:
1516
diff
changeset
|
1273 |
"/ where the AboutBox is missing. |
02941e80a146
refactored aboutBox setup for easier subclassing
Claus Gittinger <cg@exept.de>
parents:
1516
diff
changeset
|
1274 |
"/ (May vanish in the future) |
02941e80a146
refactored aboutBox setup for easier subclassing
Claus Gittinger <cg@exept.de>
parents:
1516
diff
changeset
|
1275 |
^ self information:msg |
02941e80a146
refactored aboutBox setup for easier subclassing
Claus Gittinger <cg@exept.de>
parents:
1516
diff
changeset
|
1276 |
]. |
02941e80a146
refactored aboutBox setup for easier subclassing
Claus Gittinger <cg@exept.de>
parents:
1516
diff
changeset
|
1277 |
|
02941e80a146
refactored aboutBox setup for easier subclassing
Claus Gittinger <cg@exept.de>
parents:
1516
diff
changeset
|
1278 |
box := AboutBox title:msg. |
02941e80a146
refactored aboutBox setup for easier subclassing
Claus Gittinger <cg@exept.de>
parents:
1516
diff
changeset
|
1279 |
|
02941e80a146
refactored aboutBox setup for easier subclassing
Claus Gittinger <cg@exept.de>
parents:
1516
diff
changeset
|
1280 |
image := self aboutImage. |
02941e80a146
refactored aboutBox setup for easier subclassing
Claus Gittinger <cg@exept.de>
parents:
1516
diff
changeset
|
1281 |
image notNil ifTrue:[ |
02941e80a146
refactored aboutBox setup for easier subclassing
Claus Gittinger <cg@exept.de>
parents:
1516
diff
changeset
|
1282 |
box image:image |
02941e80a146
refactored aboutBox setup for easier subclassing
Claus Gittinger <cg@exept.de>
parents:
1516
diff
changeset
|
1283 |
]. |
02941e80a146
refactored aboutBox setup for easier subclassing
Claus Gittinger <cg@exept.de>
parents:
1516
diff
changeset
|
1284 |
box label:(resources string:self aboutThisApplicationLabel). |
02941e80a146
refactored aboutBox setup for easier subclassing
Claus Gittinger <cg@exept.de>
parents:
1516
diff
changeset
|
1285 |
box autoHideAfter:10 with:[]. |
02941e80a146
refactored aboutBox setup for easier subclassing
Claus Gittinger <cg@exept.de>
parents:
1516
diff
changeset
|
1286 |
box showAtPointer. |
02941e80a146
refactored aboutBox setup for easier subclassing
Claus Gittinger <cg@exept.de>
parents:
1516
diff
changeset
|
1287 |
|
02941e80a146
refactored aboutBox setup for easier subclassing
Claus Gittinger <cg@exept.de>
parents:
1516
diff
changeset
|
1288 |
"Modified: / 13.11.2001 / 12:31:28 / cg" |
02941e80a146
refactored aboutBox setup for easier subclassing
Claus Gittinger <cg@exept.de>
parents:
1516
diff
changeset
|
1289 |
"Created: / 13.11.2001 / 12:34:27 / cg" |
762 | 1290 |
! ! |
1291 |
||
753 | 1292 |
!ToolApplicationModel methodsFor:'history'! |
1293 |
||
2098 | 1294 |
add:aHistoryEntry toHistory:aHistory |
1969 | 1295 |
"adds aHistoryEntry (format: loadMessage -> evalString) at the top of aHistory, |
1296 |
and checks for maximum size of the history" |
|
1297 |
||
2098 | 1298 |
aHistory remove:aHistoryEntry ifAbsent:nil. |
1969 | 1299 |
aHistory addFirst: aHistoryEntry. |
1300 |
[aHistory size > self class historyMaxSize] whileTrue: [aHistory removeLast] |
|
1301 |
! |
|
1302 |
||
2098 | 1303 |
addHistoryEntryForClass:classToAdd selector:selectorToAdd |
1304 |
"adds aHistoryEntry (format: loadMessage -> evalString) at the top of the history, |
|
1305 |
and checks for maximum size of the history" |
|
1306 |
||
1307 |
|entry| |
|
1308 |
||
1309 |
self assert:(classToAdd isBehavior). |
|
1310 |
entry := HistoryEntryForMethod class:classToAdd selector:selectorToAdd. |
|
1311 |
self addToHistory:entry |
|
1312 |
! |
|
1313 |
||
1314 |
addHistoryEntryForFile:fileName |
|
1315 |
|entry| |
|
1316 |
||
1317 |
entry := HistoryEntryForFile filename:fileName. |
|
1318 |
self addToHistory:entry |
|
1319 |
! |
|
1320 |
||
1969 | 1321 |
addToFileHistory: aHistoryEntry |
1322 |
"adds aHistoryEntry (format: loadMessage -> evalString) at the top of the file-history, |
|
1323 |
and checks for maximum size of the history" |
|
1324 |
||
2098 | 1325 |
self add:aHistoryEntry toHistory:self fileHistory |
1969 | 1326 |
! |
1327 |
||
753 | 1328 |
addToHistory: aHistoryEntry |
907 | 1329 |
"adds aHistoryEntry (format: loadMessage -> evalString) at the top of the history, |
1330 |
and checks for maximum size of the history" |
|
753 | 1331 |
|
2098 | 1332 |
self add:aHistoryEntry toHistory:self history |
1969 | 1333 |
! |
1334 |
||
1335 |
emptyFileHistory |
|
1336 |
"removes all history entries" |
|
1337 |
||
1338 |
^ self fileHistory removeAll |
|
753 | 1339 |
! |
1340 |
||
1341 |
emptyHistory |
|
907 | 1342 |
"removes all history entries" |
753 | 1343 |
|
1344 |
^self history removeAll |
|
1345 |
! |
|
1346 |
||
1969 | 1347 |
fileHistory |
1348 |
"returns the file-history from tool class" |
|
1349 |
||
1350 |
^ self class getFileHistory |
|
1351 |
! |
|
1352 |
||
1353 |
fileHistoryEntries |
|
1354 |
"returns the file history entries, i.e. the evaluatable values containing the information" |
|
1355 |
||
1356 |
^self fileHistory collect: [:asso| asso key] |
|
1357 |
! |
|
1358 |
||
753 | 1359 |
history |
907 | 1360 |
"returns the history from tool class" |
753 | 1361 |
|
1969 | 1362 |
^ self class getHistory |
753 | 1363 |
! |
1364 |
||
844 | 1365 |
historyEntries |
907 | 1366 |
"returns the history entries, i.e. the evaluatable values containing the information" |
844 | 1367 |
|
1368 |
^self history collect: [:asso| asso key] |
|
1369 |
! |
|
1370 |
||
753 | 1371 |
menuHistory |
1809 | 1372 |
"returns a dynamic history submenu" |
753 | 1373 |
|
1660 | 1374 |
<resource: #programMenu > |
1375 |
||
1809 | 1376 |
|menu anyItem clearItem| |
920
6b72e4ce4406
must find gui resources (xlations in in history menu)
Claus Gittinger <cg@exept.de>
parents:
910
diff
changeset
|
1377 |
|
753 | 1378 |
menu := Menu new receiver: self. |
1809 | 1379 |
anyItem := false. |
753 | 1380 |
|
2098 | 1381 |
((self history |
1382 |
collect: [:histEntry| histEntry class]) |
|
1383 |
asSet asSortedCollection:[:a :b | a name < b name]) |
|
1384 |
do: |
|
1385 |
[:historyEntryType| |
|
1386 |
menu addItemGroup: |
|
1387 |
(self history |
|
1388 |
select: [:histEntry| |
|
1389 |
histEntry class = historyEntryType] |
|
1390 |
thenCollect: [:histEntry| |
|
1391 |
anyItem := true. |
|
1392 |
MenuItem new |
|
1393 |
label: histEntry printStringInMenu; |
|
1394 |
value: #loadFromHistoryEntry: ; |
|
1395 |
argument: histEntry; |
|
1396 |
activeHelpKey: #historyMenuItem]). |
|
1397 |
]. |
|
1809 | 1398 |
|
1399 |
clearItem := MenuItem new |
|
1624 | 1400 |
label: 'Clear History'; |
920
6b72e4ce4406
must find gui resources (xlations in in history menu)
Claus Gittinger <cg@exept.de>
parents:
910
diff
changeset
|
1401 |
value: #emptyHistory; |
6b72e4ce4406
must find gui resources (xlations in in history menu)
Claus Gittinger <cg@exept.de>
parents:
910
diff
changeset
|
1402 |
activeHelpKey: #historyEmptyMenu; |
1809 | 1403 |
translateLabel:true. |
1404 |
clearItem enabled:anyItem. |
|
1405 |
menu addItem: clearItem. |
|
920
6b72e4ce4406
must find gui resources (xlations in in history menu)
Claus Gittinger <cg@exept.de>
parents:
910
diff
changeset
|
1406 |
|
6b72e4ce4406
must find gui resources (xlations in in history menu)
Claus Gittinger <cg@exept.de>
parents:
910
diff
changeset
|
1407 |
menu findGuiResourcesIn:self. |
753 | 1408 |
^menu |
920
6b72e4ce4406
must find gui resources (xlations in in history menu)
Claus Gittinger <cg@exept.de>
parents:
910
diff
changeset
|
1409 |
|
1013 | 1410 |
"Modified: / 29.7.1998 / 11:40:11 / cg" |
753 | 1411 |
! |
1412 |
||
1969 | 1413 |
remove:aHistoryEntry fromHistory: aHistory |
1414 |
"removes aHistoryEntry from the history" |
|
1415 |
||
1416 |
aHistory remove: (aHistory detect: [:histEntry| histEntry key = aHistoryEntry key] ifNone: nil) ifAbsent: nil. |
|
1417 |
[aHistory size > self class historyMaxSize] whileTrue: [aHistory removeLast] |
|
1418 |
! |
|
1419 |
||
2098 | 1420 |
removeFromHistory:aHistoryEntry |
907 | 1421 |
"removes aHistoryEntry from the history" |
753 | 1422 |
|
1969 | 1423 |
self remove:aHistoryEntry fromHistory: self history. |
753 | 1424 |
! ! |
1425 |
||
982
807f440e0df7
bw. compatibility - needs builder early.
Claus Gittinger <cg@exept.de>
parents:
971
diff
changeset
|
1426 |
!ToolApplicationModel methodsFor:'initialization'! |
807f440e0df7
bw. compatibility - needs builder early.
Claus Gittinger <cg@exept.de>
parents:
971
diff
changeset
|
1427 |
|
807f440e0df7
bw. compatibility - needs builder early.
Claus Gittinger <cg@exept.de>
parents:
971
diff
changeset
|
1428 |
initialize |
807f440e0df7
bw. compatibility - needs builder early.
Claus Gittinger <cg@exept.de>
parents:
971
diff
changeset
|
1429 |
super initialize. |
807f440e0df7
bw. compatibility - needs builder early.
Claus Gittinger <cg@exept.de>
parents:
971
diff
changeset
|
1430 |
self createBuilder |
807f440e0df7
bw. compatibility - needs builder early.
Claus Gittinger <cg@exept.de>
parents:
971
diff
changeset
|
1431 |
|
807f440e0df7
bw. compatibility - needs builder early.
Claus Gittinger <cg@exept.de>
parents:
971
diff
changeset
|
1432 |
"Created: / 20.6.1998 / 14:51:29 / cg" |
807f440e0df7
bw. compatibility - needs builder early.
Claus Gittinger <cg@exept.de>
parents:
971
diff
changeset
|
1433 |
! ! |
807f440e0df7
bw. compatibility - needs builder early.
Claus Gittinger <cg@exept.de>
parents:
971
diff
changeset
|
1434 |
|
1200 | 1435 |
!ToolApplicationModel methodsFor:'misc'! |
1436 |
||
1437 |
clearModifiedFlag |
|
1438 |
"clear the modifiedChannel. |
|
1439 |
That one is hooked to components in the right noteBook, |
|
1440 |
and will be set, when any value is modified. |
|
1441 |
(to enable OK and cancel buttons)" |
|
1442 |
||
1443 |
self modifiedChannel value:false |
|
1444 |
! ! |
|
1445 |
||
782 | 1446 |
!ToolApplicationModel methodsFor:'queries'! |
1447 |
||
876 | 1448 |
allToolInstances |
907 | 1449 |
"returns all instances of this tool class" |
876 | 1450 |
|
1150
5211197a2671
NEVER - redefine allInstances
Claus Gittinger <cg@exept.de>
parents:
1148
diff
changeset
|
1451 |
^ self class allToolInstances |
1089
49b05d386ccc
removed Thomas's memory leak
Claus Gittinger <cg@exept.de>
parents:
1084
diff
changeset
|
1452 |
|
49b05d386ccc
removed Thomas's memory leak
Claus Gittinger <cg@exept.de>
parents:
1084
diff
changeset
|
1453 |
"Modified: / 4.2.1999 / 15:34:58 / cg" |
876 | 1454 |
! |
1455 |
||
782 | 1456 |
preferredExtent |
1457 |
"preferred extent of my window; top/main menu and top toolbar (named by 'menuToolbarView') |
|
1458 |
will be considered" |
|
1459 |
||
1998
f1ebf439582d
Do not set maxExtent (to the Screen size) in StandartSystemView.
Stefan Vogel <sv@exept.de>
parents:
1989
diff
changeset
|
1460 |
|window menu menuToolbarView preferredExtentOfWindow maxExtent| |
782 | 1461 |
|
1462 |
window := self builder window. |
|
1463 |
menu := window subViews first. |
|
1464 |
menuToolbarView := builder componentAt: #menuToolbarView. |
|
1465 |
||
1998
f1ebf439582d
Do not set maxExtent (to the Screen size) in StandartSystemView.
Stefan Vogel <sv@exept.de>
parents:
1989
diff
changeset
|
1466 |
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
|
1467 |
menu class == MenuPanel ifTrue:[ |
f1ebf439582d
Do not set maxExtent (to the Screen size) in StandartSystemView.
Stefan Vogel <sv@exept.de>
parents:
1989
diff
changeset
|
1468 |
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
|
1469 |
]. |
f1ebf439582d
Do not set maxExtent (to the Screen size) in StandartSystemView.
Stefan Vogel <sv@exept.de>
parents:
1989
diff
changeset
|
1470 |
menuToolbarView 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 max:menuToolbarView preferredExtent |
f1ebf439582d
Do not set maxExtent (to the Screen size) in StandartSystemView.
Stefan Vogel <sv@exept.de>
parents:
1989
diff
changeset
|
1472 |
]. |
782 | 1473 |
|
1998
f1ebf439582d
Do not set maxExtent (to the Screen size) in StandartSystemView.
Stefan Vogel <sv@exept.de>
parents:
1989
diff
changeset
|
1474 |
maxExtent := window maxExtent. |
f1ebf439582d
Do not set maxExtent (to the Screen size) in StandartSystemView.
Stefan Vogel <sv@exept.de>
parents:
1989
diff
changeset
|
1475 |
maxExtent notNil ifTrue:[ |
f1ebf439582d
Do not set maxExtent (to the Screen size) in StandartSystemView.
Stefan Vogel <sv@exept.de>
parents:
1989
diff
changeset
|
1476 |
preferredExtentOfWindow := preferredExtentOfWindow min:maxExtent. |
f1ebf439582d
Do not set maxExtent (to the Screen size) in StandartSystemView.
Stefan Vogel <sv@exept.de>
parents:
1989
diff
changeset
|
1477 |
]. |
f1ebf439582d
Do not set maxExtent (to the Screen size) in StandartSystemView.
Stefan Vogel <sv@exept.de>
parents:
1989
diff
changeset
|
1478 |
|
f1ebf439582d
Do not set maxExtent (to the Screen size) in StandartSystemView.
Stefan Vogel <sv@exept.de>
parents:
1989
diff
changeset
|
1479 |
^ preferredExtentOfWindow. |
782 | 1480 |
! ! |
1481 |
||
1767 | 1482 |
!ToolApplicationModel methodsFor:'startup & release'! |
753 | 1483 |
|
1107 | 1484 |
closeDownViews |
907 | 1485 |
"uninitializes and closes this tool" |
753 | 1486 |
|
756 | 1487 |
self uninitialize. |
1107 | 1488 |
super closeDownViews |
1108 | 1489 |
! |
936 | 1490 |
|
2098 | 1491 |
loadFromHistoryEntry:aHistoryEntry |
1492 |
aHistoryEntry forceLoadIn:self |
|
1493 |
! |
|
1494 |
||
790 | 1495 |
postOpenWith:aBuilder |
907 | 1496 |
"starts the active help for this tool (if turned on in the settings) |
1497 |
and updates the info label and the fonts (from the settings)" |
|
790 | 1498 |
|
1499 |
super postOpenWith:aBuilder. |
|
1500 |
||
822 | 1501 |
self updateInfoLabel. |
1104
a2f59712ce7b
removed the (stupid) fontSettings menu support.
Claus Gittinger <cg@exept.de>
parents:
1091
diff
changeset
|
1502 |
"/ self updateFonts. |
a2f59712ce7b
removed the (stupid) fontSettings menu support.
Claus Gittinger <cg@exept.de>
parents:
1091
diff
changeset
|
1503 |
self showingHelp:true |
876 | 1504 |
|
1018
7222534cb3dc
part of the activeHelp framework moved to ApplicationModel.
Claus Gittinger <cg@exept.de>
parents:
1016
diff
changeset
|
1505 |
"Modified: / 31.7.1998 / 18:17:34 / cg" |
790 | 1506 |
! |
1507 |
||
1323
045c3a6e4a88
after restart from image, restart also the timed block if defined
ca
parents:
1284
diff
changeset
|
1508 |
restarted |
045c3a6e4a88
after restart from image, restart also the timed block if defined
ca
parents:
1284
diff
changeset
|
1509 |
"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
|
1510 |
restart timed block if defined. |
045c3a6e4a88
after restart from image, restart also the timed block if defined
ca
parents:
1284
diff
changeset
|
1511 |
" |
045c3a6e4a88
after restart from image, restart also the timed block if defined
ca
parents:
1284
diff
changeset
|
1512 |
timeBlock notNil ifTrue:[ |
045c3a6e4a88
after restart from image, restart also the timed block if defined
ca
parents:
1284
diff
changeset
|
1513 |
Processor removeTimedBlock:timeBlock. |
045c3a6e4a88
after restart from image, restart also the timed block if defined
ca
parents:
1284
diff
changeset
|
1514 |
self startClockOnTimedBlock:timeBlock. |
045c3a6e4a88
after restart from image, restart also the timed block if defined
ca
parents:
1284
diff
changeset
|
1515 |
]. |
045c3a6e4a88
after restart from image, restart also the timed block if defined
ca
parents:
1284
diff
changeset
|
1516 |
super restarted. |
045c3a6e4a88
after restart from image, restart also the timed block if defined
ca
parents:
1284
diff
changeset
|
1517 |
! |
045c3a6e4a88
after restart from image, restart also the timed block if defined
ca
parents:
1284
diff
changeset
|
1518 |
|
756 | 1519 |
uninitialize |
1018
7222534cb3dc
part of the activeHelp framework moved to ApplicationModel.
Claus Gittinger <cg@exept.de>
parents:
1016
diff
changeset
|
1520 |
"stops active help for this tool and (if defined) removes the time block" |
756 | 1521 |
|
1018
7222534cb3dc
part of the activeHelp framework moved to ApplicationModel.
Claus Gittinger <cg@exept.de>
parents:
1016
diff
changeset
|
1522 |
self showingHelp ifTrue: [ActiveHelp stopFor: self]. |
876 | 1523 |
timeBlock notNil ifTrue: [Processor removeTimedBlock:timeBlock. timeBlock := nil]. |
1524 |
||
1018
7222534cb3dc
part of the activeHelp framework moved to ApplicationModel.
Claus Gittinger <cg@exept.de>
parents:
1016
diff
changeset
|
1525 |
"Modified: / 31.7.1998 / 18:46:21 / cg" |
753 | 1526 |
! ! |
1527 |
||
2098 | 1528 |
!ToolApplicationModel::HistoryEntry methodsFor:'comparing'! |
1529 |
||
1530 |
sameAsHistoryEntryForFile:aHistoryEntryForFile |
|
1531 |
^ false |
|
1532 |
! |
|
1533 |
||
1534 |
sameAsHistoryEntryForMethod:aHistoryEntryForMethod |
|
1535 |
^ false |
|
1536 |
! ! |
|
1537 |
||
1538 |
!ToolApplicationModel::HistoryEntryForFile class methodsFor:'instance creation'! |
|
1539 |
||
1540 |
filename:arg |
|
1541 |
^ self new filename:arg |
|
1542 |
! ! |
|
1543 |
||
1544 |
!ToolApplicationModel::HistoryEntryForFile methodsFor:'accessing'! |
|
1545 |
||
1546 |
filename |
|
1547 |
^ filename |
|
1548 |
! |
|
1549 |
||
1550 |
filename:something |
|
1551 |
filename := something. |
|
1552 |
! ! |
|
1553 |
||
1554 |
!ToolApplicationModel::HistoryEntryForFile methodsFor:'comparing'! |
|
1555 |
||
1556 |
= aHistoryEntry |
|
1557 |
^ aHistoryEntry sameAsHistoryEntryForFile:self |
|
1558 |
! |
|
1559 |
||
1560 |
sameAsHistoryEntryForFile:aHistoryEntryForFile |
|
1561 |
^ aHistoryEntryForFile filename = filename |
|
1562 |
! ! |
|
1563 |
||
1564 |
!ToolApplicationModel::HistoryEntryForFile methodsFor:'loading'! |
|
1565 |
||
1566 |
forceLoadIn:anEditor |
|
1567 |
anEditor loadFromFile:filename |
|
1568 |
! ! |
|
1569 |
||
1570 |
!ToolApplicationModel::HistoryEntryForFile methodsFor:'printing'! |
|
1571 |
||
1572 |
printStringInMenu |
|
1573 |
^ filename |
|
1574 |
! ! |
|
1575 |
||
1576 |
!ToolApplicationModel::HistoryEntryForMethod class methodsFor:'instance creation'! |
|
1577 |
||
1578 |
class:classToAdd selector:selectorToAdd |
|
1579 |
^ self new class:classToAdd selector:selectorToAdd |
|
1580 |
! ! |
|
1581 |
||
1582 |
!ToolApplicationModel::HistoryEntryForMethod methodsFor:'accessing'! |
|
1583 |
||
1584 |
class:aClass selector:aSelector |
|
1585 |
methodClass := aClass. |
|
1586 |
methodSelector := aSelector |
|
1587 |
! |
|
1588 |
||
1589 |
methodClass |
|
1590 |
^ methodClass |
|
1591 |
! |
|
1592 |
||
1593 |
methodSelector |
|
1594 |
^ methodSelector |
|
1595 |
! ! |
|
1596 |
||
1597 |
!ToolApplicationModel::HistoryEntryForMethod methodsFor:'comparing'! |
|
1598 |
||
1599 |
= aHistoryEntry |
|
1600 |
^ aHistoryEntry sameAsHistoryEntryForMethod:self |
|
1601 |
! |
|
1602 |
||
1603 |
sameAsHistoryEntryForMethod:aHistoryEntryForMethod |
|
1604 |
^ aHistoryEntryForMethod methodClass = methodClass |
|
1605 |
and:[ aHistoryEntryForMethod methodSelector = methodSelector ] |
|
1606 |
! ! |
|
1607 |
||
1608 |
!ToolApplicationModel::HistoryEntryForMethod methodsFor:'loading'! |
|
1609 |
||
1610 |
forceLoadIn:anEditor |
|
1611 |
anEditor loadFromClass:methodClass andSelector:methodSelector |
|
1612 |
! ! |
|
1613 |
||
1614 |
!ToolApplicationModel::HistoryEntryForMethod methodsFor:'printing'! |
|
1615 |
||
1616 |
printStringInMenu |
|
1617 |
^ methodClass name , ' >> ' , methodSelector |
|
1618 |
! ! |
|
1619 |
||
753 | 1620 |
!ToolApplicationModel class methodsFor:'documentation'! |
1621 |
||
1622 |
version |
|
2121 | 1623 |
^ '$Header: /cvs/stx/stx/libview2/ToolApplicationModel.st,v 1.127 2006-03-06 08:52:32 cg Exp $' |
753 | 1624 |
! ! |