author | tz |
Wed, 28 Jan 1998 14:56:34 +0100 | |
changeset 782 | 5b8c4cf62cb5 |
parent 779 | fef14d43d5e1 |
child 783 | 4e1545900244 |
permissions | -rw-r--r-- |
756 | 1 |
" |
2 |
COPYRIGHT (c) 1997 by eXept Software AG / Thomas Zwick |
|
3 |
All Rights Reserved |
|
4 |
||
5 |
This software is furnished under a license and may be used |
|
6 |
only in accordance with the terms of that license and with the |
|
7 |
inclusion of the above copyright notice. This software may not |
|
8 |
be provided or otherwise made available to, or used by, any |
|
9 |
other person. No title to or ownership of the software is |
|
10 |
hereby transferred. |
|
11 |
" |
|
12 |
||
13 |
||
14 |
||
753 | 15 |
ApplicationModel subclass:#ToolApplicationModel |
782 | 16 |
instanceVariableNames:'timeBlock' |
753 | 17 |
classVariableNames:'' |
18 |
poolDictionaries:'' |
|
19 |
category:'Interface-Advanced-Tools' |
|
20 |
! |
|
21 |
||
782 | 22 |
ToolApplicationModel class instanceVariableNames:'history clipboard showHelp' |
753 | 23 |
|
24 |
" |
|
25 |
The following class instance variables are inherited by this class: |
|
26 |
||
27 |
ApplicationModel - ClassResources |
|
28 |
Model - |
|
29 |
Object - |
|
30 |
" |
|
31 |
! |
|
32 |
||
33 |
!ToolApplicationModel class methodsFor:'documentation'! |
|
34 |
||
756 | 35 |
copyright |
36 |
" |
|
37 |
COPYRIGHT (c) 1997 by eXept Software AG / Thomas Zwick |
|
38 |
All Rights Reserved |
|
39 |
||
40 |
This software is furnished under a license and may be used |
|
41 |
only in accordance with the terms of that license and with the |
|
42 |
inclusion of the above copyright notice. This software may not |
|
43 |
be provided or otherwise made available to, or used by, any |
|
44 |
other person. No title to or ownership of the software is |
|
45 |
hereby transferred. |
|
46 |
" |
|
47 |
||
48 |
||
49 |
! |
|
50 |
||
753 | 51 |
documentation |
52 |
" |
|
53 |
Standard framework for tools; provides hooks for history management, |
|
782 | 54 |
showing help texts, about menu, help menu etc. |
753 | 55 |
See concrete subclasses for examples. |
56 |
||
57 |
[author:] |
|
58 |
Thomas Zwick |
|
59 |
" |
|
756 | 60 |
! |
61 |
||
62 |
history |
|
63 |
"Created: / 10.1.1998 / 11:01:21 / tz" |
|
753 | 64 |
! ! |
65 |
||
66 |
!ToolApplicationModel class methodsFor:'accessing'! |
|
67 |
||
68 |
author |
|
69 |
||
70 |
^((((self class withAllSuperclasses detect: [:metacls| metacls implements:#documentation])) |
|
71 |
compiledMethodAt: #documentation) source readStream upToAll: '[author:]'; nextLine; nextLine) trimBlanks |
|
72 |
||
73 |
! |
|
74 |
||
75 |
label |
|
76 |
||
77 |
|label| |
|
78 |
label := ''. |
|
79 |
self name do: |
|
80 |
[:c| |
|
81 |
c isUppercase ifTrue: [label := label, $ ]. |
|
82 |
label := label, c |
|
83 |
]. |
|
84 |
^label trimBlanks |
|
782 | 85 |
! |
86 |
||
87 |
showHelp |
|
88 |
||
89 |
^showHelp ? (showHelp := true) |
|
90 |
! |
|
91 |
||
92 |
showHelp: aBoolean |
|
93 |
||
94 |
^showHelp := aBoolean |
|
753 | 95 |
! ! |
96 |
||
756 | 97 |
!ToolApplicationModel class methodsFor:'clipboard'! |
98 |
||
99 |
clipboard |
|
100 |
||
101 |
^clipboard |
|
102 |
! |
|
103 |
||
104 |
clipboard: anEditObject |
|
105 |
||
106 |
clipboard := anEditObject |
|
107 |
! ! |
|
108 |
||
762 | 109 |
!ToolApplicationModel class methodsFor:'help specs'! |
110 |
||
111 |
helpSpec |
|
112 |
"return a dictionary filled with helpKey -> helptext associations. |
|
113 |
These are used by the activeHelp tool." |
|
114 |
||
115 |
" |
|
116 |
UIHelpTool openOnClass:ToolApplicationModel |
|
117 |
" |
|
118 |
||
119 |
^ super helpSpec addPairsFrom:#( |
|
120 |
||
121 |
#aboutSTX |
|
763 | 122 |
'Opens an InfoBox about running ST/X.' |
762 | 123 |
|
124 |
#aboutThisAppliaction |
|
763 | 125 |
'Opens an InfoBox about release and author of current application.' |
762 | 126 |
|
127 |
#fileExit |
|
763 | 128 |
'Exits current application.' |
762 | 129 |
|
782 | 130 |
#editCut |
131 |
'Cuts selected item and place it to the clipboard.' |
|
132 |
||
133 |
#editCopy |
|
134 |
'Copies selected item to the clipboard.' |
|
135 |
||
136 |
#editPaste |
|
137 |
'Pastes contents of the clipboard.' |
|
138 |
||
139 |
#editUndo |
|
140 |
'Reverses the last action.' |
|
141 |
||
762 | 142 |
#helpClassDocumentation |
763 | 143 |
'Opens a HTML-browser with a class documentation for current application.' |
762 | 144 |
|
145 |
#helpProgrammersGuide |
|
763 | 146 |
'Opens a HTML-browser with a programmers guide.' |
762 | 147 |
|
148 |
#helpShowHelp |
|
763 | 149 |
'Toggles on/off displaying help texts.' |
762 | 150 |
|
151 |
#helpTutorial |
|
763 | 152 |
'Opens a HTML-browser with a tutorial for beginners.' |
762 | 153 |
|
154 |
) |
|
155 |
! ! |
|
156 |
||
753 | 157 |
!ToolApplicationModel class methodsFor:'history'! |
158 |
||
159 |
getHistory |
|
160 |
||
761
cc0404f8aec6
#getHistory changed because here #? doesn't work correctly
tz
parents:
760
diff
changeset
|
161 |
history isNil ifTrue: [history := OrderedCollection new]. |
cc0404f8aec6
#getHistory changed because here #? doesn't work correctly
tz
parents:
760
diff
changeset
|
162 |
^history |
753 | 163 |
|
164 |
! |
|
165 |
||
166 |
historyMaxSize |
|
167 |
||
168 |
^10 |
|
169 |
||
170 |
! ! |
|
171 |
||
172 |
!ToolApplicationModel class methodsFor:'interface specs'! |
|
173 |
||
174 |
menuAbout |
|
175 |
"this window spec was automatically generated by the ST/X MenuEditor" |
|
176 |
||
177 |
"do not manually edit this - the builder may not be able to |
|
178 |
handle the specification if its corrupted." |
|
179 |
||
180 |
" |
|
181 |
MenuEditor new openOnClass:ToolApplicationModel andSelector:#menuAbout |
|
182 |
(Menu new fromLiteralArrayEncoding:(ToolApplicationModel menuAbout)) startUp |
|
183 |
" |
|
184 |
||
185 |
<resource: #menu> |
|
186 |
||
187 |
^ |
|
188 |
||
189 |
#(#Menu |
|
190 |
||
191 |
#( |
|
192 |
#(#MenuItem |
|
193 |
#'label:' 'About Smalltalk/X...' |
|
194 |
#'value:' #openAbout |
|
762 | 195 |
#'activeHelpKey:' #aboutSTX |
753 | 196 |
) |
197 |
#(#MenuItem |
|
198 |
#'label:' '-' |
|
199 |
) |
|
200 |
#(#MenuItem |
|
201 |
#'label:' 'About This Application...' |
|
202 |
#'value:' #openAboutThisApplication |
|
762 | 203 |
#'activeHelpKey:' #aboutThisAppliaction |
753 | 204 |
) |
205 |
) nil |
|
206 |
nil |
|
207 |
) |
|
208 |
! |
|
209 |
||
210 |
menuHelp |
|
211 |
"this window spec was automatically generated by the ST/X MenuEditor" |
|
212 |
||
213 |
"do not manually edit this - the builder may not be able to |
|
214 |
handle the specification if its corrupted." |
|
215 |
||
216 |
" |
|
217 |
MenuEditor new openOnClass:ToolApplicationModel andSelector:#menuHelp |
|
218 |
(Menu new fromLiteralArrayEncoding:(ToolApplicationModel menuHelp)) startUp |
|
219 |
" |
|
220 |
||
221 |
<resource: #menu> |
|
222 |
||
223 |
^ |
|
224 |
||
225 |
#(#Menu |
|
226 |
||
227 |
#( |
|
228 |
#(#MenuItem |
|
229 |
#'label:' 'Tutorial' |
|
230 |
#'value:' #openTutorial |
|
762 | 231 |
#'activeHelpKey:' #helpTutorial |
753 | 232 |
) |
233 |
#(#MenuItem |
|
234 |
#'label:' 'Programmer''s Guide' |
|
235 |
#'value:' #openProgrammersGuide |
|
762 | 236 |
#'activeHelpKey:' #helpProgrammersGuide |
753 | 237 |
) |
238 |
#(#MenuItem |
|
239 |
#'label:' '-' |
|
240 |
) |
|
241 |
#(#MenuItem |
|
242 |
#'label:' 'Class Documentation' |
|
243 |
#'value:' #openClassDocumentation |
|
762 | 244 |
#'activeHelpKey:' #helpClassDocumentation |
753 | 245 |
) |
246 |
#(#MenuItem |
|
247 |
#'label:' '-' |
|
248 |
) |
|
249 |
#(#MenuItem |
|
762 | 250 |
#'label:' 'Show Help' |
782 | 251 |
#'value:' #'showHelp:' |
762 | 252 |
#'activeHelpKey:' #helpShowHelp |
782 | 253 |
#'indication:' #showHelp |
753 | 254 |
) |
255 |
) nil |
|
256 |
nil |
|
257 |
) |
|
258 |
! |
|
259 |
||
260 |
menuSettings |
|
261 |
"this window spec was automatically generated by the ST/X MenuEditor" |
|
262 |
||
263 |
"do not manually edit this - the builder may not be able to |
|
264 |
handle the specification if its corrupted." |
|
265 |
||
266 |
" |
|
267 |
MenuEditor new openOnClass:ToolApplicationModel andSelector:#menuSettings |
|
268 |
(Menu new fromLiteralArrayEncoding:(ToolApplicationModel menuSettings)) startUp |
|
269 |
" |
|
270 |
||
271 |
<resource: #menu> |
|
272 |
||
273 |
^ |
|
274 |
||
275 |
#(#Menu |
|
276 |
||
277 |
#( |
|
278 |
#(#MenuItem |
|
279 |
#'label:' 'Language' |
|
280 |
#'value:' #languageSetting |
|
281 |
) |
|
282 |
) nil |
|
283 |
nil |
|
284 |
) |
|
758 | 285 |
! |
286 |
||
287 |
windowSpecForCommit |
|
288 |
"this window spec was automatically generated by the ST/X UIPainter" |
|
289 |
||
290 |
"do not manually edit this - the painter/builder may not be able to |
|
291 |
handle the specification if its corrupted." |
|
292 |
||
293 |
" |
|
294 |
UIPainter new openOnClass:ToolApplicationModel andSelector:#windowSpecForCommit |
|
295 |
ToolApplicationModel new openInterface:#windowSpecForCommit |
|
296 |
" |
|
297 |
||
298 |
<resource: #canvas> |
|
299 |
||
300 |
^ |
|
301 |
||
302 |
#(#FullSpec |
|
303 |
#'window:' |
|
304 |
#(#WindowSpec |
|
305 |
#'name:' 'unnamed canvas' |
|
769 | 306 |
#'layout:' #(#LayoutFrame 325 0 361 0 624 0 420 0) |
758 | 307 |
#'label:' 'unnamed canvas' |
308 |
#'min:' #(#Point 100 22) |
|
309 |
#'max:' #(#Point 1152 900) |
|
769 | 310 |
#'bounds:' #(#Rectangle 325 361 625 421) |
758 | 311 |
#'usePreferredExtent:' false |
312 |
) |
|
313 |
#'component:' |
|
314 |
#(#SpecCollection |
|
315 |
#'collection:' |
|
316 |
#( |
|
317 |
#(#ActionButtonSpec |
|
318 |
#'name:' 'cancelButton' |
|
319 |
#'layout:' #(#LayoutFrame 5 0 0 0 -2 0.5 0 1) |
|
320 |
#'label:' 'Cancel' |
|
769 | 321 |
#'tabable:' true |
758 | 322 |
#'model:' #cancel |
323 |
#'enableChannel:' #valueOfEnablingCommitButtons |
|
324 |
) |
|
325 |
#(#ActionButtonSpec |
|
326 |
#'name:' 'okButton' |
|
327 |
#'layout:' #(#LayoutFrame 2 0.5 0 0.0 -5 1 0 1.0) |
|
328 |
#'label:' 'OK' |
|
769 | 329 |
#'tabable:' true |
758 | 330 |
#'model:' #accept |
331 |
#'enableChannel:' #valueOfEnablingCommitButtons |
|
332 |
) |
|
333 |
) |
|
334 |
) |
|
335 |
) |
|
760 | 336 |
! |
337 |
||
338 |
windowSpecForCommitWithoutChannels |
|
339 |
"this window spec was automatically generated by the ST/X UIPainter" |
|
340 |
||
341 |
"do not manually edit this - the painter/builder may not be able to |
|
342 |
handle the specification if its corrupted." |
|
343 |
||
344 |
" |
|
345 |
UIPainter new openOnClass:ToolApplicationModel andSelector:#windowSpecForCommitWithoutChannels |
|
346 |
ToolApplicationModel new openInterface:#windowSpecForCommitWithoutChannels |
|
347 |
" |
|
348 |
||
349 |
<resource: #canvas> |
|
350 |
||
351 |
^ |
|
352 |
||
353 |
#(#FullSpec |
|
354 |
#'window:' |
|
355 |
#(#WindowSpec |
|
356 |
#'name:' 'unnamed canvas' |
|
769 | 357 |
#'layout:' #(#LayoutFrame 418 0 386 0 717 0 445 0) |
760 | 358 |
#'label:' 'unnamed canvas' |
359 |
#'min:' #(#Point 100 22) |
|
360 |
#'max:' #(#Point 1152 900) |
|
769 | 361 |
#'bounds:' #(#Rectangle 418 386 718 446) |
760 | 362 |
#'usePreferredExtent:' false |
363 |
) |
|
364 |
#'component:' |
|
365 |
#(#SpecCollection |
|
366 |
#'collection:' |
|
367 |
#( |
|
368 |
#(#ActionButtonSpec |
|
369 |
#'name:' 'cancelButton' |
|
370 |
#'layout:' #(#LayoutFrame 5 0 0 0 -2 0.5 0 1) |
|
371 |
#'label:' 'Cancel' |
|
769 | 372 |
#'tabable:' true |
760 | 373 |
#'model:' #cancel |
374 |
) |
|
375 |
#(#ActionButtonSpec |
|
376 |
#'name:' 'okButton' |
|
377 |
#'layout:' #(#LayoutFrame 2 0.5 0 0.0 -5 1 0 1.0) |
|
378 |
#'label:' 'OK' |
|
769 | 379 |
#'tabable:' true |
760 | 380 |
#'model:' #accept |
381 |
) |
|
382 |
) |
|
383 |
) |
|
384 |
) |
|
776 | 385 |
! |
386 |
||
387 |
windowSpecForInfoBar |
|
388 |
"this window spec was automatically generated by the ST/X UIPainter" |
|
389 |
||
390 |
"do not manually edit this - the painter/builder may not be able to |
|
391 |
handle the specification if its corrupted." |
|
392 |
||
393 |
" |
|
394 |
UIPainter new openOnClass:ToolApplicationModel andSelector:#windowSpecForInfoBar |
|
395 |
ToolApplicationModel new openInterface:#windowSpecForInfoBar |
|
396 |
" |
|
397 |
||
398 |
<resource: #canvas> |
|
399 |
||
400 |
^ |
|
401 |
||
402 |
#(#FullSpec |
|
403 |
#'window:' |
|
404 |
#(#WindowSpec |
|
405 |
#'name:' 'Image Editor' |
|
406 |
#'layout:' #(#LayoutFrame 173 0 418 0 672 0 763 0) |
|
407 |
#'label:' 'Image Editor' |
|
408 |
#'min:' #(#Point 400 320) |
|
409 |
#'max:' #(#Point 1152 900) |
|
410 |
#'bounds:' #(#Rectangle 173 418 673 764) |
|
411 |
#'menu:' #menu |
|
412 |
#'usePreferredExtent:' false |
|
413 |
) |
|
414 |
#'component:' |
|
415 |
#(#SpecCollection |
|
416 |
#'collection:' |
|
417 |
#( |
|
418 |
#(#LabelSpec |
|
419 |
#'name:' 'infoLabel' |
|
420 |
#'layout:' #(#LayoutFrame 0 0 0 0.0 -80 1 0 1.0) |
|
421 |
#'labelChannel:' #valueOfInfoLabel |
|
422 |
#'level:' 1 |
|
423 |
#'adjust:' #left |
|
424 |
) |
|
425 |
#(#LabelSpec |
|
426 |
#'name:' 'timeLabel' |
|
427 |
#'layout:' #(#LayoutFrame -80 1 0 0.0 0 1.0 0 1.0) |
|
428 |
#'labelChannel:' #valueOfTimeLabel |
|
429 |
#'level:' 1 |
|
430 |
#'adjust:' #right |
|
431 |
) |
|
432 |
) |
|
433 |
) |
|
434 |
) |
|
753 | 435 |
! ! |
436 |
||
437 |
!ToolApplicationModel class methodsFor:'resources'! |
|
438 |
||
439 |
downIcon |
|
778 | 440 |
"Generated by the Image Editor" |
441 |
" |
|
442 |
ImageEditor openOnClass:self andSelector:#downIcon |
|
443 |
" |
|
753 | 444 |
|
445 |
<resource: #image> |
|
778 | 446 |
|
447 |
^Icon |
|
448 |
constantNamed:#'ToolApplicationModel downIcon' |
|
449 |
ifAbsentPut:[(Depth2Image new) width: 22; height: 22; photometric:(#palette); bitsPerSample:(#(2 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'UUT@AUUPUUT*%UUPUUT*%UUPUUT*%UUPUUT*%UUPUUT*%UUPUUT*%UUPUUT*%UUPUUT*%UUPUUT*%UUPUUT*%UUPUUT*%UUPUUT*%UUPUUT*%UUPUUT*%UUPUT@*$AUPUT***%UPUU***UUPUUZ*)UUPUUV*%UUPUUU*UUUPUUUYUUUP'); colorMap:((OrderedCollection new add:(Color white); add:(Color black); add:(Color red:0.0 green:49.9962 blue:0.0); add:(Color red:100.0 green:0.0 blue:0.0); yourself)); mask:((Depth1Image new) width: 22; height: 22; photometric:(#blackIs0); bitsPerSample:(#(1 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@O0@@O0@@O0@@O0@@O0@@O0@@O0@@O0@@O0@@O0@@O0@@O0@@O0@@O0@@O0@A?>@A?>@@?<@@_8@@O0@@G @@C@@'); yourself); yourself]! |
|
753 | 450 |
|
451 |
downLeftIcon |
|
778 | 452 |
"Generated by the Image Editor" |
453 |
" |
|
454 |
ImageEditor openOnClass:self andSelector:#downLeftIcon |
|
455 |
" |
|
753 | 456 |
|
457 |
<resource: #image> |
|
778 | 458 |
|
459 |
^Icon |
|
460 |
constantNamed:#'ToolApplicationModel downLeftIcon' |
|
461 |
ifAbsentPut:[(Depth2Image new) width: 22; height: 22; photometric:(#palette); bitsPerSample:(#(2 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'UUUUUUUPUUUUU@@PUUUUUJ)PUUUUUJ)PUUUUUJ)PUUUUUJ)PUUUUUJ)PUUUUUJ)PUUUUUJ)PUUUUUJ)PUUAUUJ)PUT%UUJ)PUR%UUJ)PUJ$@@J)PT*****)PR*****)PV*****)PU*****)PUZ%UUUUPUV%UUUUPUU%UUUUPUUUUUUUP'); colorMap:((OrderedCollection new add:(Color white); add:(Color black); add:(Color red:0.0 green:49.9962 blue:0.0); add:(Color red:100.0 green:0.0 blue:0.0); yourself)); mask:((Depth1Image new) width: 22; height: 22; photometric:(#blackIs0); bitsPerSample:(#(1 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@@@@@G8@@G8@@G8@@G8@@G8@@G8@@G8@@G8@@G8@0G8A0G8C0G8G??8O??8_??8_??8O??8G??8C0@@A0@@@0@@'); yourself); yourself]! |
|
753 | 462 |
|
463 |
downRightIcon |
|
778 | 464 |
"Generated by the Image Editor" |
465 |
" |
|
466 |
ImageEditor openOnClass:self andSelector:#downRightIcon |
|
467 |
" |
|
753 | 468 |
|
469 |
<resource: #image> |
|
778 | 470 |
|
471 |
^Icon |
|
472 |
constantNamed:#'ToolApplicationModel downRightIcon' |
|
473 |
ifAbsentPut:[(Depth2Image new) width: 22; height: 22; photometric:(#palette); bitsPerSample:(#(2 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'UUUUUUUPP@EUUUUPR*UUUUUPR*UUUUUPR*UUUUUPR*UUUUUPR*UUUUUPR*UUUUUPR*UUUUUPR*UUUUUPR*UUTEUPR*UUT!!UPR*UUT(UPR*P@@*EPR*****!!PR*****(PR*****)PR*****%PQUUUU*UPUUUUT)UPUUUUT%UPUUUUTUUP'); colorMap:((OrderedCollection new add:(Color white); add:(Color black); add:(Color red:0.0 green:49.9962 blue:0.0); add:(Color red:100.0 green:0.0 blue:0.0); yourself)); mask:((Depth1Image new) width: 22; height: 22; photometric:(#blackIs0); bitsPerSample:(#(1 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@@@_ @@_ @@_ @@_ @@_ @@_ @@_ @@_ @@_ @@_ L@_ N@_ O@_?? _??0_??8_??8_??0_?? @@O@@@N@@@L@'); yourself); yourself]! |
|
753 | 474 |
|
475 |
fileOutIcon |
|
778 | 476 |
"Generated by the Image Editor" |
477 |
" |
|
478 |
ImageEditor openOnClass:self andSelector:#fileOutIcon |
|
479 |
" |
|
753 | 480 |
|
481 |
<resource: #image> |
|
482 |
||
778 | 483 |
^Icon |
484 |
constantNamed:#'ToolApplicationModel fileOutIcon' |
|
485 |
ifAbsentPut:[(Depth2Image new) width: 24; height: 24; photometric:(#palette); bitsPerSample:(#(2 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@B@@@@@@@B @@@@@@*(@@@@@BB @@@@@BB@@@@@@B@@@@@@@B@@@@@@@B@@@@@@@B@@@@@@@B@@@@@@@@@@@@@@@@@@@@@@@@@@@@D@@AQDEADQAAADDADQA@AD@ADQAAQDEADQAAADDADQAAA@@@PAAAAEE@@DA'); colorMap:((OrderedCollection new add:(Color black); add:(Color white); add:(Color red:0.0 green:49.9962 blue:0.0); add:(Color red:100.0 green:0.0 blue:0.0); yourself)); mask:((Depth1Image new) width: 24; height: 24; photometric:(#blackIs0); bitsPerSample:(#(1 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@@@@@@@@@@@@@@@A@A.A%BDG2ADI%@$I@SDH@@@H@@@H@@@H@@@H@@@@@@@@@@@Z&KW_7_;[6_;[6_;_7_;[6_;[6L+I[@Q'); yourself); yourself]! |
|
753 | 486 |
|
487 |
icon |
|
488 |
||
772 | 489 |
^self stxIcon |
753 | 490 |
! |
491 |
||
492 |
leftDownIcon |
|
778 | 493 |
"Generated by the Image Editor" |
494 |
" |
|
495 |
ImageEditor openOnClass:self andSelector:#leftDownIcon |
|
496 |
" |
|
753 | 497 |
|
498 |
<resource: #image> |
|
778 | 499 |
|
500 |
^Icon |
|
501 |
constantNamed:#'ToolApplicationModel leftDownIcon' |
|
502 |
ifAbsentPut:[(Depth2Image new) width: 22; height: 22; photometric:(#palette); bitsPerSample:(#(2 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'UUUUUUUPU@@@@@@PUJ****)PUJ****)PUJ****)PUJ****)PUJ)UUUUPUJ)UUUUPUJ)UUUUPUJ)UUUUPUJ)UUUUPUJ)UUUUPUJ)UUUUPUJ)UUUUP@J*@UUUPJ**)UUUPR**%UUUPT**UUUUPUJ)UUUUPUR%UUUUPUTUUUUUPUUUUUUUP'); colorMap:((OrderedCollection new add:(Color white); add:(Color black); add:(Color red:0.0 green:49.9962 blue:0.0); add:(Color red:100.0 green:0.0 blue:0.0); yourself)); mask:((Depth1Image new) width: 22; height: 22; photometric:(#blackIs0); bitsPerSample:(#(1 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@@@G??8G??8G??8G??8G??8G??8G8@@G8@@G8@@G8@@G8@@G8@@G8@@??@@??@@_>@@O<@@G8@@C0@@A @@@@@@'); yourself); yourself]! |
|
753 | 503 |
|
778 | 504 |
leftIcon |
505 |
"Generated by the Image Editor" |
|
506 |
" |
|
507 |
ImageEditor openOnClass:self andSelector:#leftIcon |
|
508 |
" |
|
753 | 509 |
|
510 |
<resource: #image> |
|
511 |
||
778 | 512 |
^Icon |
513 |
constantNamed:#'ToolApplicationModel leftIcon' |
|
514 |
ifAbsentPut:[(Depth2Image new) width: 22; height: 22; photometric:(#palette); bitsPerSample:(#(2 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'UUUUUUUPUUUUUUUPUUUUUUUPUUUUUUUPUUUUUUUPUTUUUUUPURUUUUUPUJUUUUUPT*P@@@@PR******PJ******PZ******PV******PU*UUUUUPUZUUUUUPUVUUUUUPUUUUUUUPUUUUUUUPUUUUUUUPUUUUUUUPUUUUUUUPUUUUUUUP'); colorMap:((OrderedCollection new add:(Color white); add:(Color black); add:(Color red:0.0 green:49.9962 blue:0.0); add:(Color red:100.0 green:0.0 blue:0.0); yourself)); mask:((Depth1Image new) width: 22; height: 22; photometric:(#blackIs0); bitsPerSample:(#(1 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@@@@@@@@@@@@@@@@@@@A @@C @@G @@O??<_??<???<???<_??<O??<G @@C @@A @@@@@@@@@@@@@@@@@@@@@@'); yourself); yourself]! |
|
753 | 515 |
|
778 | 516 |
leftUpIcon |
517 |
"Generated by the Image Editor" |
|
518 |
" |
|
519 |
ImageEditor openOnClass:self andSelector:#leftUpIcon |
|
520 |
" |
|
753 | 521 |
|
522 |
<resource: #image> |
|
772 | 523 |
|
778 | 524 |
^Icon |
525 |
constantNamed:#'ToolApplicationModel leftUpIcon' |
|
526 |
ifAbsentPut:[(Depth2Image new) width: 22; height: 22; photometric:(#palette); bitsPerSample:(#(2 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'UUUUUUUPUTUUUUUPUR%UUUUPUJ)UUUUPT**UUUUPR**%UUUPJ**)UUUP%Z)UUUUPUJ)UUUUPUJ)UUUUPUJ)UUUUPUJ)UUUUPUJ)UUUUPUJ)UUUUPUJ)UUUUPUJ)@@@@PUJ****)PUJ****)PUJ****)PUJ****)PUEUUUUUPUUUUUUUP'); colorMap:((OrderedCollection new add:(Color white); add:(Color black); add:(Color red:0.0 green:49.9962 blue:0.0); add:(Color red:100.0 green:0.0 blue:0.0); yourself)); mask:((Depth1Image new) width: 22; height: 22; photometric:(#blackIs0); bitsPerSample:(#(1 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@@@A @@C0@@G8@@O<@@_>@@??@@??@@G8@@G8@@G8@@G8@@G8@@G8@@G8@@G??8G??8G??8G??8G??8G??8@@@@'); yourself); yourself]! |
|
772 | 527 |
|
778 | 528 |
loadIcon |
529 |
"Generated by the Image Editor" |
|
530 |
" |
|
531 |
ImageEditor openOnClass:self andSelector:#loadIcon |
|
532 |
" |
|
753 | 533 |
|
534 |
<resource: #image> |
|
778 | 535 |
|
536 |
^Icon |
|
537 |
constantNamed:#'ToolApplicationModel loadIcon' |
|
538 |
ifAbsentPut:[(Depth2Image new) width: 22; height: 22; photometric:(#palette); bitsPerSample:(#(2 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'UUUUUUUPUUUUU?UPUUUUW*5PU???>*/PU:****)PUUUUUUZPP@@@@@EPS?????&PS?????%PS?????&PS?????%PT?????9PT?????9PT?????9PT?????9PT?????9PT?????9PUO????>PUO????>PUO????>PU:*****PUUUUUUUP'); colorMap:(((Array new:4) at:1 put:((Color white)); at:2 put:((Color black)); at:3 put:((Color grey:49.9962)); at:4 put:((Color grey:66.9978)); yourself)); mask:((Depth1Image new) width: 22; height: 22; photometric:(#blackIs0); bitsPerSample:(#(1 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@G@@@O G??8O??<O??<_??<???<???<???<???<???<_??<_??<_??<_??<_??<_??<O??<O??<O??<O??<O??<'); yourself); yourself]! |
|
753 | 539 |
|
778 | 540 |
newIcon |
541 |
"Generated by the Image Editor" |
|
542 |
" |
|
543 |
ImageEditor openOnClass:self andSelector:#newIcon |
|
544 |
" |
|
756 | 545 |
|
546 |
<resource: #image> |
|
778 | 547 |
|
548 |
^Icon |
|
549 |
constantNamed:#'ToolApplicationModel newIcon' |
|
550 |
ifAbsentPut:[(Depth2Image new) width: 22; height: 22; photometric:(#palette); bitsPerSample:(#(2 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@@@@@@@AUUUUP@@A????2@@A????2 @A????0@@A?????8@A?????8@A?????8@A?????8@A?????8@A?????8@A?????8@A?????8@A?????8@A?????8@A?????8@A?????8@A?????8@A?????8@A?????8@C*****(@@@@@@@@@'); colorMap:(((Array new:4) at:1 put:((Color black)); at:2 put:((Color white)); at:3 put:((Color grey:49.9962)); at:4 put:((Color grey:66.9978)); yourself)); mask:((Depth1Image new) width: 22; height: 22; photometric:(#blackIs0); bitsPerSample:(#(1 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'_?>@_??@_?? _??0_??8_??8_??8_??8_??8_??8_??8_??8_??8_??8_??8_??8_??8_??8_??8_??8_??8_??8'); yourself); yourself]! |
|
756 | 551 |
|
778 | 552 |
removeIcon |
553 |
"Generated by the Image Editor" |
|
554 |
" |
|
555 |
ImageEditor openOnClass:self andSelector:#removeIcon |
|
556 |
" |
|
753 | 557 |
|
558 |
<resource: #image> |
|
772 | 559 |
|
778 | 560 |
^Icon |
561 |
constantNamed:#'ToolApplicationModel removeIcon' |
|
562 |
ifAbsentPut:[(Depth2Image new) width: 22; height: 22; photometric:(#palette); bitsPerSample:(#(2 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@@@@@@@BUUUUP@@B/???2@@B+???2 @A*???0@@A:/??*8@A>+?>+8@A?*?:/8@A?:/*?8@A?>*+?8@A??*/?8@A??*/?8@A?>*+?8@A?:/*?8@A?*?:/8@A>+?>+8@A:/??*8@A*???:(@B+???>(@B/????(@B*****(@@@@@@@@@'); colorMap:(((Array new:4) at:1 put:((Color black)); at:2 put:((Color white)); at:3 put:((Color grey:49.9962)); at:4 put:((Color grey:66.9978)); yourself)); mask:((Depth1Image new) width: 22; height: 22; photometric:(#blackIs0); bitsPerSample:(#(1 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'_?>@_??@_?? _??0_??8_??8_??8_??8_??8_??8_??8_??8_??8_??8_??8_??8_??8_??8_??8_??8_??8_??8'); yourself); yourself]! |
|
772 | 563 |
|
778 | 564 |
reviseAllButtonIcon |
565 |
"Generated by the Image Editor" |
|
566 |
" |
|
567 |
ImageEditor openOnClass:self andSelector:#reviseAllButtonIcon |
|
568 |
" |
|
753 | 569 |
|
570 |
<resource: #image> |
|
571 |
||
778 | 572 |
^Icon |
573 |
constantNamed:#'ToolApplicationModel reviseAllButtonIcon' |
|
574 |
ifAbsentPut:[(Depth2Image new) width: 22; height: 22; photometric:(#palette); bitsPerSample:(#(2 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'EUUU@@@@UVUY@@@@UY?6@@@@UW0=@@@@UWO=AUUPUWO-@@@@UW>=AUUPEY?6A@@P@BUXUUTP@A @P@DP@IPEUUDP@F@D@ADP@%@DEADP@X@DPQDPBT@DPADPA @DDADPEP@DAADPFP@D@QEPAP@DPQD@@P@DEAT@@@@D@A@@@@@EUU@@'); colorMap:(((Array new:4) at:1 put:((Color white)); at:2 put:((Color black)); at:3 put:((Color grey:49.9962)); at:4 put:((Color grey:66.9978)); yourself)); mask:((Depth1Image new) width: 22; height: 22; photometric:(#blackIs0); bitsPerSample:(#(1 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@@@A>@@C?@@C?@@C?@@C?@@C?O<C?O<A>?<A ?<CC?<CC?<FC?<FC?<LC?<LC?<XC?<HC?<@C?0@C?0@C?@@C?@'); yourself); yourself]! |
|
762 | 575 |
|
778 | 576 |
rightIcon |
577 |
"Generated by the Image Editor" |
|
578 |
" |
|
579 |
ImageEditor openOnClass:self andSelector:#rightIcon |
|
580 |
" |
|
753 | 581 |
|
582 |
<resource: #image> |
|
778 | 583 |
|
584 |
^Icon |
|
585 |
constantNamed:#'ToolApplicationModel rightIcon' |
|
586 |
ifAbsentPut:[(Depth2Image new) width: 22; height: 22; photometric:(#palette); bitsPerSample:(#(2 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'UUUUUUUPUUUUUUUPUUUUUUUPUUUUUUUPUUUUUUUPUUUUUEUPUUUUUIUPUUUUUJUP@@@@@J%PJ*****)PJ******PJ******PJ*****)PEUUUUZ%PUUUUUJUPUUUUUIUPUUUUUEUPUUUUUUUPUUUUUUUPUUUUUUUPUUUUUUUPUUUUUUUP'); colorMap:((OrderedCollection new add:(Color white); add:(Color black); add:(Color red:0.0 green:49.9962 blue:0.0); add:(Color red:100.0 green:0.0 blue:0.0); yourself)); mask:((Depth1Image new) width: 22; height: 22; photometric:(#blackIs0); bitsPerSample:(#(1 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@@@@@@@@@@@@@@@@@@@@@F@@@G@@@G ???0???8???<???<???8???0@@G @@G@@@F@@@@@@@@@@@@@@@@@@@@@'); yourself); yourself]! |
|
753 | 587 |
|
778 | 588 |
saveIcon |
589 |
"Generated by the Image Editor" |
|
590 |
" |
|
591 |
ImageEditor openOnClass:self andSelector:#saveIcon |
|
592 |
" |
|
753 | 593 |
|
594 |
<resource: #image> |
|
778 | 595 |
|
596 |
^Icon |
|
597 |
constantNamed:#'ToolApplicationModel saveIcon' |
|
779 | 598 |
ifAbsentPut:[(Depth2Image new) width: 22; height: 22; photometric:(#palette); bitsPerSample:(#(2 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'AL3L3L@PM3L3L0?PML3L3L=PM3L3L0=PML3L3L?PM3L3L0?PML3L3L?PM3L3L0?PML3L3L?PM3L3L0?PML3L3L?PM@@@@@?PO??????PO??????PO??????PO=UUUU?PO=???[?PO=5O?Z?PO=6O?Z?PO=6O?Z?PO=0O?Z?P5U***U5P'); colorMap:(((Array new:4) at:1 put:((Color white)); at:2 put:((Color black)); at:3 put:((Color grey:49.9962)); at:4 put:((Color grey:66.9978)); yourself)); mask:((Depth1Image new) width: 22; height: 22; photometric:(#blackIs0); bitsPerSample:(#(1 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'???<???<???<???<???<???<???<???<???<???<???<???<???<???<???<???<???<???<???<???<???<???8'); yourself); yourself] |
778 | 599 |
! |
753 | 600 |
|
778 | 601 |
searchIcon |
602 |
"Generated by the Image Editor" |
|
603 |
" |
|
604 |
ImageEditor openOnClass:self andSelector:#searchIcon |
|
605 |
" |
|
753 | 606 |
|
607 |
<resource: #image> |
|
762 | 608 |
|
778 | 609 |
^Icon |
610 |
constantNamed:#'ToolApplicationModel searchIcon' |
|
611 |
ifAbsentPut:[(Depth2Image new) width: 22; height: 22; photometric:(#palette); bitsPerSample:(#(2 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@@@@@@@@@@@@@@@CV*@MZ(@@@@@@@@@CV*@MZ(@CV*@MZ(@CV*@MZ(@CV*@MZ(@CV*@MZ(@CV*@MZ(@CV*JMZ(@CV(@AZ(@CV(6!!Z(@CV(@AZ(@CV*@MZ(@@@@@@@@@@MZ 5Z@@@@@@@@@@@A(@A(@@@@@@@@@@@M*@M*@@@@@@@@@@'); colorMap:((OrderedCollection new add:(Color black); add:(Color grey:74.5083); add:(Color grey:49.9962); add:(Color white); yourself)); mask:((Depth1Image new) width: 22; height: 22; photometric:(#blackIs0); bitsPerSample:(#(1 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@@@_<?8_<?8_<?8_<?8_<?8_<?8_<?8_<?8_??8_??8_??8_??8_??8_??8_??8G?? G?? C8_@C8_@G<? G<? '); yourself); yourself]! |
|
762 | 612 |
|
782 | 613 |
startIcon |
614 |
"Generated by the Image Editor" |
|
615 |
" |
|
616 |
ImageEditor openOnClass:self andSelector:#startIcon |
|
617 |
" |
|
618 |
||
619 |
<resource: #image> |
|
620 |
||
621 |
^Icon |
|
622 |
constantNamed:#'ToolApplicationModel startIcon' |
|
623 |
ifAbsentPut:[(Depth4Image new) width: 22; height: 22; photometric:(#palette); bitsPerSample:(#(4 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@@@@@@@@@@@@@@@@N8@@@@@@@@@@@@N<^@@@@@@@@@@@@;.;.;.;.@@@@@@C/G @@@@8^@@@@@N<^@@@@@A@@@@@@;18@@@@@D@@@@@C.;.;.; @P@@@@@N<^@@@@@@@@@@@@;18@@@C!!G.@@@@C/G @@@@G>@@@@@N;.;.; @_8@@@@@;18@@@@A? @@@@C/G @@@@G>@@@@@N<^@@@@@_8@@@@@;.;.;.@A? @@@@C/G @@@@G>@@@@@N<^@@@@@_8@@@@@;18@@@@@@@@@@@C.; @@@@DQ@@@@C ; 8@@@A&X@@@C 8@8N@@@"H"@@@b'); colorMap:((OrderedCollection new add:(Color black); add:(Color white); add:(Color red:100.0 green:0.0 blue:0.0); add:(Color red:0.0 green:100.0 blue:0.0); add:(Color red:0.0 green:0.0 blue:100.0); add:(Color red:0.0 green:100.0 blue:100.0); add:(Color red:100.0 green:100.0 blue:0.0); add:(Color red:100.0 green:0.0 blue:100.0); add:(Color red:49.9962 green:0.0 blue:0.0); add:(Color red:0.0 green:49.9962 blue:0.0); add:(Color red:0.0 green:0.0 blue:49.9962); add:(Color red:0.0 green:49.9962 blue:49.9962); add:(Color red:49.9962 green:49.9962 blue:0.0); add:(Color red:49.9962 green:0.0 blue:49.9962); add:(Color grey:49.9962); add:(Color grey:66.9978); yourself)); mask:((Depth1Image new) width: 22; height: 22; photometric:(#blackIs0); bitsPerSample:(#(1 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@@@C@D@G D@G?<@G N@G N@G N@G?.@G N@G _@G _@G?_@G _@G _@G _@G?_@G ? G!!?0G!!?0G!!.PKQNPT(_@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@a'); yourself); yourself] |
|
624 |
! |
|
625 |
||
778 | 626 |
stxIcon |
627 |
"Generated by the Image Editor" |
|
628 |
" |
|
629 |
ImageEditor openOnClass:self andSelector:#stxIcon |
|
630 |
" |
|
772 | 631 |
|
632 |
<resource: #image> |
|
753 | 633 |
|
778 | 634 |
^Icon |
635 |
constantNamed:#'ToolApplicationModel stxIcon' |
|
636 |
ifAbsentPut:[(Depth2Image new) width: 19; height: 19; photometric:(#palette); bitsPerSample:(#(2 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@@@@@L@@@@@@@@@@@@@@@T@@D@@AP@APP@AP@@@@@E@E@@@@EA@@@@@TT@C@@@U@@@@@AP@@@@@U@@@@@EA@@L@APA@@@@T@D@@@U@@@@@AT@@D@0@@@@@A@@@@@@@b'); colorMap:((OrderedCollection new add:(Color grey:9.41024); add:(Color red:0.0 green:80.7828 blue:18.8205); add:(Color black); add:(Color white); yourself)); yourself]! |
|
753 | 637 |
|
638 |
upIcon |
|
778 | 639 |
"Generated by the Image Editor" |
640 |
" |
|
641 |
ImageEditor openOnClass:self andSelector:#upIcon |
|
642 |
" |
|
753 | 643 |
|
644 |
<resource: #image> |
|
778 | 645 |
|
646 |
^Icon |
|
647 |
constantNamed:#'ToolApplicationModel upIcon' |
|
648 |
ifAbsentPut:[(Depth2Image new) width: 22; height: 22; photometric:(#palette); bitsPerSample:(#(2 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'UUUQUUUPUUUJUUUPUUT*%UUPUUR*)UUPUUJ**UUPUT***%UPUTV*%UUPUUT*%UUPUUT*%UUPUUT*%UUPUUT*%UUPUUT*%UUPUUT*%UUPUUT*%UUPUUT*%UUPUUT*%UUPUUT*%UUPUUT*%UUPUUT*%UUPUUT*%UUPUUT*%UUPUUTUUUUP'); colorMap:((OrderedCollection new add:(Color white); add:(Color black); add:(Color red:0.0 green:49.9962 blue:0.0); add:(Color red:100.0 green:0.0 blue:0.0); yourself)); mask:((Depth1Image new) width: 22; height: 22; photometric:(#blackIs0); bitsPerSample:(#(1 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@C@@@G @@O0@@_8@@?<@A?>@A?>@@O0@@O0@@O0@@O0@@O0@@O0@@O0@@O0@@O0@@O0@@O0@@O0@@O0@@O0@@O0@'); yourself); yourself]! |
|
753 | 649 |
|
650 |
upRightIcon |
|
778 | 651 |
"Generated by the Image Editor" |
652 |
" |
|
653 |
ImageEditor openOnClass:self andSelector:#upRightIcon |
|
654 |
" |
|
753 | 655 |
|
656 |
<resource: #image> |
|
778 | 657 |
|
658 |
^Icon |
|
659 |
constantNamed:#'ToolApplicationModel upRightIcon' |
|
660 |
ifAbsentPut:[(Depth2Image new) width: 22; height: 22; photometric:(#palette); bitsPerSample:(#(2 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'UUUUTUUPUUUUT%UPUUUUT)UPP@@@@*UPR*****%PR*****)PR*****)PR*****%PR*UUU*UPR*UUT)UPR*UUT%UPR*UUTUUPR*UUUUUPR*UUUUUPR*UUUUUPR*UUUUUPR*UUUUUPR*UUUUUPR*UUUUUPR*UUUUUPQUUUUUUPUUUUUUUP'); colorMap:((OrderedCollection new add:(Color white); add:(Color black); add:(Color red:0.0 green:49.9962 blue:0.0); add:(Color red:100.0 green:0.0 blue:0.0); yourself)); mask:((Depth1Image new) width: 22; height: 22; photometric:(#blackIs0); bitsPerSample:(#(1 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@L@@@N@@@O@_?? _??0_??8_??8_??0_?? _ O@_ N@_ L@_ @@_ @@_ @@_ @@_ @@_ @@_ @@_ @@_ @@@@@@'); yourself); yourself]! ! |
|
753 | 661 |
|
782 | 662 |
!ToolApplicationModel class methodsFor:'startup / release'! |
753 | 663 |
|
782 | 664 |
preSnapshot |
753 | 665 |
|
782 | 666 |
clipboard := nil |
667 |
||
753 | 668 |
! |
669 |
||
782 | 670 |
uninitialize |
760 | 671 |
|
782 | 672 |
showHelp := history := clipboard := nil |
753 | 673 |
! ! |
674 |
||
782 | 675 |
!ToolApplicationModel methodsFor:'aspects'! |
676 |
||
677 |
valueOfEnablingCommitButtons |
|
753 | 678 |
|
782 | 679 |
|holder| |
680 |
(holder := builder bindingAt:#valueOfEnablingCommitButtons) isNil ifTrue:[ |
|
681 |
builder aspectAt:#valueOfEnablingCommitButtons put:(holder := false asValue). |
|
682 |
]. |
|
683 |
^ holder |
|
753 | 684 |
|
782 | 685 |
! |
686 |
||
687 |
valueOfHavingClipboard |
|
753 | 688 |
|
782 | 689 |
|holder| |
690 |
(holder := builder bindingAt:#valueOfHavingClipboard) isNil ifTrue:[ |
|
691 |
builder aspectAt:#valueOfHavingClipboard put:(holder := self class clipboard notNil asValue). |
|
692 |
]. |
|
693 |
^ holder |
|
753 | 694 |
|
782 | 695 |
! |
696 |
||
697 |
valueOfInfoLabel |
|
698 |
||
699 |
|holder| |
|
700 |
(holder := builder bindingAt:#valueOfInfoLabel) isNil ifTrue:[ |
|
701 |
builder aspectAt:#valueOfInfoLabel put:(holder := ValueHolder new). |
|
702 |
]. |
|
703 |
^ holder |
|
753 | 704 |
|
782 | 705 |
! |
706 |
||
707 |
valueOfTimeLabel |
|
753 | 708 |
|
782 | 709 |
|holder| |
710 |
(holder := builder bindingAt:#valueOfTimeLabel) isNil ifTrue:[ |
|
711 |
builder aspectAt:#valueOfTimeLabel put:(holder := ValueHolder new). |
|
712 |
]. |
|
713 |
^ holder |
|
753 | 714 |
|
715 |
! ! |
|
716 |
||
782 | 717 |
!ToolApplicationModel methodsFor:'clipboard'! |
753 | 718 |
|
782 | 719 |
clipboard: anEditObject |
753 | 720 |
|
782 | 721 |
self class clipboard: anEditObject. |
753 | 722 |
|
782 | 723 |
self valueOfHavingClipboard value: anEditObject notNil |
724 |
! ! |
|
725 |
||
726 |
!ToolApplicationModel methodsFor:'help'! |
|
753 | 727 |
|
762 | 728 |
defaultInfoLabel |
729 |
||
730 |
^'' |
|
731 |
! |
|
732 |
||
753 | 733 |
openAbout |
734 |
"show an about box" |
|
735 |
||
736 |
|box| |
|
737 |
||
738 |
box := AboutBox new. |
|
739 |
box autoHideAfter:10 with:[]. |
|
740 |
box showAtCenter |
|
741 |
||
742 |
! |
|
743 |
||
744 |
openAboutThisApplication |
|
745 |
"show an about this application box" |
|
746 |
||
747 |
|rev box| |
|
748 |
rev := ''. |
|
749 |
self class revision notNil ifTrue: [rev := ' (rev: ', self class revision printString, ')']. |
|
750 |
box := AboutBox title: |
|
751 |
'\The application\\' withCRs, |
|
752 |
(Text string: self class label emphasis: #bold), rev, |
|
753 |
'\\has been designed and implemented by \' withCRs,self class author,', eXept Software AG, Germany. \\' withCRs. |
|
754 |
||
755 |
box label:'About This Application'. |
|
756 |
box autoHideAfter:10 with:[]. |
|
757 |
box showAtCenter. |
|
758 |
! |
|
759 |
||
760 |
openClassDocumentation |
|
761 |
||
762 |
Autoload autoloadFailedSignal handle:[:ex | |
|
763 |
self warn:'autoload failed. |
|
764 |
||
765 |
Check your source directory and/or |
|
766 |
the abbreviation file for the classes (correct) shortened name.'. |
|
767 |
ex return. |
|
768 |
] do:[ |
|
769 |
|text v| |
|
770 |
||
771 |
text := self class htmlDocumentation. |
|
772 |
text notNil ifTrue:[ |
|
773 |
v := HTMLDocumentView |
|
774 |
openFullOnText:text |
|
775 |
inDirectory:(Smalltalk getSystemFileName:'doc/online/english/classDoc'). |
|
776 |
v nameSpaceForExecution: self class nameSpace. |
|
777 |
] |
|
778 |
] |
|
779 |
||
780 |
||
781 |
! |
|
782 |
||
783 |
openProgrammersGuide |
|
784 |
||
785 |
|dir| |
|
786 |
((dir := Smalltalk getSystemFileName: 'doc/online/english/programming/TOP.html') asFilename exists) |
|
787 |
ifTrue: |
|
788 |
[ |
|
789 |
^HTMLDocumentView openFullOnFile: dir |
|
790 |
] |
|
791 |
! |
|
792 |
||
793 |
openTutorial |
|
794 |
||
795 |
|dir| |
|
796 |
((dir := Smalltalk getSystemFileName: 'doc/online/english/getstart/tutorial.html') asFilename exists) |
|
797 |
ifTrue: |
|
798 |
[ |
|
799 |
^HTMLDocumentView openFullOnFile: dir |
|
800 |
] |
|
762 | 801 |
! |
802 |
||
782 | 803 |
showHelp |
804 |
"Answer whether showing help is turned on/off" |
|
805 |
||
806 |
^self class showHelp |
|
807 |
! |
|
808 |
||
809 |
showHelp: aValue |
|
810 |
"toggle showing help" |
|
811 |
||
812 |
(self class showHelp: aValue) |
|
813 |
ifTrue: [ActiveHelp startFor: self] |
|
814 |
ifFalse: [ActiveHelp stopFor: self. self valueOfInfoLabel value: self defaultInfoLabel] |
|
815 |
! |
|
816 |
||
762 | 817 |
showHelp:aHelpText for:view |
818 |
"display aHelpText in the info label or if present detour to masterApplication." |
|
819 |
||
782 | 820 |
self showHelp ifFalse: [^true]. |
762 | 821 |
self masterApplication notNil |
822 |
ifTrue: |
|
823 |
[ |
|
824 |
^masterApplication showHelp: aHelpText for:view |
|
825 |
] |
|
826 |
ifFalse: |
|
827 |
[ |
|
828 |
aHelpText isNil |
|
829 |
ifTrue: [self valueOfInfoLabel value: self defaultInfoLabel] |
|
830 |
ifFalse: [self valueOfInfoLabel value: (aHelpText asString printString upTo: Character cr)]. |
|
831 |
||
832 |
^true |
|
833 |
] |
|
834 |
! ! |
|
835 |
||
753 | 836 |
!ToolApplicationModel methodsFor:'history'! |
837 |
||
838 |
addToHistory: aHistoryEntry |
|
839 |
||
782 | 840 |
aHistoryEntry key size = 0 ifTrue: [^nil]. |
753 | 841 |
self history remove: (self history detect: [:histEntry| histEntry key = aHistoryEntry key] ifNone: nil) ifAbsent: nil. |
842 |
self history addFirst: aHistoryEntry. |
|
843 |
[self history size > self class historyMaxSize] whileTrue: [self history removeLast] |
|
844 |
! |
|
845 |
||
846 |
emptyHistory |
|
847 |
||
848 |
^self history removeAll |
|
849 |
! |
|
850 |
||
851 |
history |
|
852 |
||
853 |
^self class getHistory |
|
854 |
! |
|
855 |
||
856 |
menuHistory |
|
857 |
||
858 |
|menu a| |
|
859 |
menu := Menu new receiver: self. |
|
860 |
(self history collect: [:histEntry| histEntry value]) asSet asOrderedCollection do: |
|
861 |
[:historyEntryType| |
|
862 |
menu addItemGroup: ((a := self history select: [:histEntry| histEntry value = historyEntryType]) collect: [:histEntry| MenuItem new label: histEntry key printString; value: histEntry value; argument: histEntry key]). |
|
863 |
]. |
|
864 |
menu addItem: (MenuItem new label: 'Empty History'; value: #emptyHistory). |
|
865 |
||
866 |
^menu |
|
867 |
! |
|
868 |
||
869 |
removeFromHistory: aHistoryEntry |
|
870 |
||
871 |
self history remove: (self history detect: [:histEntry| histEntry key = aHistoryEntry key] ifNone: nil) ifAbsent: nil. |
|
872 |
[self history size > self class historyMaxSize] whileTrue: [self history removeLast] |
|
873 |
! ! |
|
874 |
||
782 | 875 |
!ToolApplicationModel methodsFor:'queries'! |
876 |
||
877 |
preferredExtent |
|
878 |
"preferred extent of my window; top/main menu and top toolbar (named by 'menuToolbarView') |
|
879 |
will be considered" |
|
880 |
||
881 |
|window menu menuToolbarView preferredExtentOfWindow| |
|
882 |
||
883 |
window := self builder window. |
|
884 |
menu := window subViews first. |
|
885 |
menuToolbarView := builder componentAt: #menuToolbarView. |
|
886 |
||
887 |
preferredExtentOfWindow := window extent. |
|
888 |
menu class = MenuPanel ifTrue: [preferredExtentOfWindow := preferredExtentOfWindow max: menu preferredExtent]. |
|
889 |
menuToolbarView notNil ifTrue: [preferredExtentOfWindow := preferredExtentOfWindow max: menuToolbarView preferredExtent]. |
|
890 |
||
891 |
^window minExtent max: (preferredExtentOfWindow min: window maxExtent) |
|
892 |
! ! |
|
893 |
||
753 | 894 |
!ToolApplicationModel methodsFor:'startup / release'! |
895 |
||
896 |
close |
|
897 |
||
756 | 898 |
self uninitialize. |
899 |
||
753 | 900 |
super close |
901 |
! |
|
902 |
||
903 |
closeRequest |
|
904 |
||
756 | 905 |
self uninitialize. |
906 |
||
753 | 907 |
super closeRequest |
908 |
! |
|
909 |
||
910 |
initialize |
|
911 |
||
782 | 912 |
super initialize. |
913 |
||
753 | 914 |
timeBlock := nil. |
915 |
timeBlock := [self showTime]. |
|
916 |
self showTime |
|
917 |
! |
|
918 |
||
919 |
open |
|
920 |
||
921 |
super open. |
|
756 | 922 |
|
923 |
self class allInstances size = 1 |
|
924 |
ifTrue: |
|
925 |
[ |
|
926 |
self class classResources: nil. |
|
927 |
self clipboard: nil |
|
928 |
]. |
|
753 | 929 |
builder window label: self class label |
930 |
||
931 |
! |
|
932 |
||
933 |
openInterface |
|
934 |
||
935 |
super openInterface. |
|
936 |
||
782 | 937 |
self showHelp: self showHelp. |
938 |
self valueOfInfoLabel value: self defaultInfoLabel. |
|
753 | 939 |
self builder window extent: self preferredExtent |
940 |
! |
|
941 |
||
942 |
reOpen |
|
943 |
||
944 |
self close. |
|
945 |
||
946 |
self class open |
|
947 |
! |
|
948 |
||
760 | 949 |
removeAllTemporalViews |
950 |
||
951 |
self builder namedComponents keys copy do: |
|
952 |
[:comp| |
|
953 |
(comp includesString: '_Temporal') ifTrue: [self builder namedComponents removeKey: comp] |
|
954 |
] |
|
955 |
! |
|
956 |
||
753 | 957 |
restarted |
958 |
||
959 |
self initialize |
|
756 | 960 |
! |
961 |
||
962 |
uninitialize |
|
963 |
||
782 | 964 |
self showHelp ifTrue: [ActiveHelp stopFor: self]. |
756 | 965 |
Processor removeTimedBlock:timeBlock. |
966 |
timeBlock := nil. |
|
753 | 967 |
! ! |
968 |
||
969 |
!ToolApplicationModel methodsFor:'window events'! |
|
970 |
||
971 |
showTime |
|
972 |
||
973 |
|hours minutes suffix| |
|
974 |
suffix := ' am '. |
|
975 |
(hours := Time now hours) > 12 ifTrue: [hours := hours - 12]. |
|
976 |
Time now hours >= 12 ifTrue: [suffix := ' pm ']. |
|
977 |
(minutes := Time now minutes printString) size = 1 ifTrue: [minutes := '0', minutes printString]. |
|
978 |
self valueOfTimeLabel value: hours printString, ':', minutes, suffix. |
|
979 |
Processor addTimedBlock: timeBlock afterSeconds: 1 |
|
980 |
||
981 |
! ! |
|
982 |
||
983 |
!ToolApplicationModel class methodsFor:'documentation'! |
|
984 |
||
985 |
version |
|
782 | 986 |
^ '$Header: /cvs/stx/stx/libview2/ToolApplicationModel.st,v 1.19 1998-01-28 13:56:34 tz Exp $' |
753 | 987 |
! ! |