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