author | Claus Gittinger <cg@exept.de> |
Tue, 03 Feb 1998 19:11:12 +0100 | |
changeset 818 | cd88643119dc |
parent 805 | d4c4ee3bb474 |
child 820 | d01d777e2bb3 |
permissions | -rw-r--r-- |
756 | 1 |
" |
784 | 2 |
COPYRIGHT (c) 1997 by eXept Software AG |
756 | 3 |
All Rights Reserved |
4 |
||
5 |
This software is furnished under a license and may be used |
|
6 |
only in accordance with the terms of that license and with the |
|
7 |
inclusion of the above copyright notice. This software may not |
|
8 |
be provided or otherwise made available to, or used by, any |
|
9 |
other person. No title to or ownership of the software is |
|
10 |
hereby transferred. |
|
11 |
" |
|
12 |
||
13 |
||
14 |
||
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 |
" |
|
784 | 37 |
COPYRIGHT (c) 1997 by eXept Software AG |
756 | 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 |
" |
|
60 |
! ! |
|
61 |
||
62 |
!ToolApplicationModel class methodsFor:'accessing'! |
|
63 |
||
800 | 64 |
authorLinesForAboutBox |
65 |
"extract the author(s) from the documentation method." |
|
66 |
||
67 |
|firstClassWithDocumentation src s line lines| |
|
753 | 68 |
|
800 | 69 |
firstClassWithDocumentation := self class withAllSuperclasses detect:[:metacls| metacls implements:#documentation]. |
70 |
firstClassWithDocumentation notNil ifTrue:[ |
|
71 |
(firstClassWithDocumentation inheritsFrom:ToolApplicationModel class) ifTrue:[ |
|
72 |
src := (firstClassWithDocumentation compiledMethodAt:#documentation) source. |
|
73 |
src notNil ifTrue:[ |
|
74 |
s := src readStream. |
|
75 |
s upToAll:'[author:]'. |
|
76 |
s nextLine. "/ skip to end |
|
77 |
line := s nextLine. "/ line after [author:] |
|
78 |
lines := OrderedCollection new. |
|
79 |
[line notNil and:[line notEmpty]] whileTrue:[ |
|
80 |
line := line trimBlanks. |
|
81 |
line size > 1 ifTrue:[ |
|
82 |
lines add:line trimBlanks. |
|
83 |
line := s nextLine. |
|
84 |
] ifFalse:[ |
|
85 |
line := nil |
|
86 |
] |
|
87 |
]. |
|
88 |
^ lines. |
|
89 |
] |
|
90 |
] |
|
91 |
]. |
|
92 |
^ #('unnown') |
|
93 |
||
94 |
"Created: / 1.2.1998 / 15:41:43 / cg" |
|
95 |
"Modified: / 1.2.1998 / 15:59:10 / cg" |
|
753 | 96 |
! |
97 |
||
98 |
label |
|
99 |
||
100 |
|label| |
|
101 |
label := ''. |
|
102 |
self name do: |
|
103 |
[:c| |
|
104 |
c isUppercase ifTrue: [label := label, $ ]. |
|
105 |
label := label, c |
|
106 |
]. |
|
107 |
^label trimBlanks |
|
782 | 108 |
! |
109 |
||
110 |
showHelp |
|
111 |
||
112 |
^showHelp ? (showHelp := true) |
|
113 |
! |
|
114 |
||
115 |
showHelp: aBoolean |
|
116 |
||
117 |
^showHelp := aBoolean |
|
753 | 118 |
! ! |
119 |
||
756 | 120 |
!ToolApplicationModel class methodsFor:'clipboard'! |
121 |
||
122 |
clipboard |
|
123 |
||
124 |
^clipboard |
|
125 |
! |
|
126 |
||
127 |
clipboard: anEditObject |
|
128 |
||
129 |
clipboard := anEditObject |
|
130 |
! ! |
|
131 |
||
762 | 132 |
!ToolApplicationModel class methodsFor:'help specs'! |
133 |
||
134 |
helpSpec |
|
135 |
"return a dictionary filled with helpKey -> helptext associations. |
|
136 |
These are used by the activeHelp tool." |
|
137 |
||
138 |
" |
|
139 |
UIHelpTool openOnClass:ToolApplicationModel |
|
140 |
" |
|
141 |
||
142 |
^ super helpSpec addPairsFrom:#( |
|
143 |
||
144 |
#aboutSTX |
|
763 | 145 |
'Opens an InfoBox about running ST/X.' |
762 | 146 |
|
147 |
#aboutThisAppliaction |
|
763 | 148 |
'Opens an InfoBox about release and author of current application.' |
762 | 149 |
|
150 |
#fileExit |
|
763 | 151 |
'Exits current application.' |
762 | 152 |
|
782 | 153 |
#editCut |
154 |
'Cuts selected item and place it to the clipboard.' |
|
155 |
||
156 |
#editCopy |
|
157 |
'Copies selected item to the clipboard.' |
|
158 |
||
159 |
#editPaste |
|
160 |
'Pastes contents of the clipboard.' |
|
161 |
||
162 |
#editUndo |
|
163 |
'Reverses the last action.' |
|
164 |
||
805 | 165 |
#editMoveDown |
166 |
'Moves selected item one step down.' |
|
167 |
||
168 |
#editMoveUp |
|
169 |
'Moves selected item one step up.' |
|
170 |
||
171 |
#editMoveIn |
|
172 |
'Moves selected item into next item as child.' |
|
173 |
||
174 |
#editMoveOut |
|
175 |
'Moves selected item out of parent item.' |
|
176 |
||
177 |
#fileDefineClassAndSelector |
|
178 |
'Opens a dialog to define current class and selector.' |
|
179 |
||
803 | 180 |
#historyMenuItem |
181 |
'Evaluates the text of the menu item for loading.' |
|
182 |
||
183 |
#historyEmptyMenu |
|
184 |
'Deletes all items of the history.' |
|
185 |
||
762 | 186 |
#helpShowHelp |
763 | 187 |
'Toggles on/off displaying help texts.' |
762 | 188 |
|
189 |
#helpTutorial |
|
763 | 190 |
'Opens a HTML-browser with a tutorial for beginners.' |
762 | 191 |
|
192 |
) |
|
193 |
! ! |
|
194 |
||
753 | 195 |
!ToolApplicationModel class methodsFor:'history'! |
196 |
||
197 |
getHistory |
|
198 |
||
761
cc0404f8aec6
#getHistory changed because here #? doesn't work correctly
tz
parents:
760
diff
changeset
|
199 |
history isNil ifTrue: [history := OrderedCollection new]. |
cc0404f8aec6
#getHistory changed because here #? doesn't work correctly
tz
parents:
760
diff
changeset
|
200 |
^history |
753 | 201 |
|
202 |
! |
|
203 |
||
204 |
historyMaxSize |
|
205 |
||
206 |
^10 |
|
207 |
||
208 |
! ! |
|
209 |
||
210 |
!ToolApplicationModel class methodsFor:'interface specs'! |
|
211 |
||
797 | 212 |
windowSpecForCommit |
213 |
"this window spec was automatically generated by the ST/X UIPainter" |
|
214 |
||
215 |
"do not manually edit this - the painter/builder may not be able to |
|
216 |
handle the specification if its corrupted." |
|
217 |
||
218 |
" |
|
219 |
UIPainter new openOnClass:ToolApplicationModel andSelector:#windowSpecForCommit |
|
220 |
ToolApplicationModel new openInterface:#windowSpecForCommit |
|
221 |
" |
|
222 |
||
223 |
<resource: #canvas> |
|
224 |
||
225 |
^ |
|
226 |
||
227 |
#(#FullSpec |
|
228 |
#'window:' |
|
229 |
#(#WindowSpec |
|
230 |
#'name:' 'unnamed canvas' |
|
231 |
#'layout:' #(#LayoutFrame 325 0 361 0 624 0 420 0) |
|
232 |
#'label:' 'unnamed canvas' |
|
233 |
#'min:' #(#Point 100 22) |
|
234 |
#'max:' #(#Point 1152 900) |
|
235 |
#'bounds:' #(#Rectangle 325 361 625 421) |
|
236 |
#'usePreferredExtent:' false |
|
237 |
) |
|
238 |
#'component:' |
|
239 |
#(#SpecCollection |
|
240 |
#'collection:' |
|
241 |
#( |
|
242 |
#(#ActionButtonSpec |
|
243 |
#'name:' 'cancelButton' |
|
244 |
#'layout:' #(#LayoutFrame 5 0 0 0 -2 0.5 0 1) |
|
245 |
#'label:' 'Cancel' |
|
246 |
#'tabable:' true |
|
247 |
#'model:' #cancel |
|
248 |
#'enableChannel:' #valueOfEnablingCommitButtons |
|
249 |
) |
|
250 |
#(#ActionButtonSpec |
|
251 |
#'name:' 'okButton' |
|
252 |
#'layout:' #(#LayoutFrame 2 0.5 0 0.0 -5 1 0 1.0) |
|
253 |
#'label:' 'OK' |
|
254 |
#'tabable:' true |
|
255 |
#'model:' #accept |
|
256 |
#'enableChannel:' #valueOfEnablingCommitButtons |
|
257 |
) |
|
258 |
) |
|
259 |
) |
|
260 |
) |
|
261 |
! |
|
262 |
||
263 |
windowSpecForCommitWithoutChannels |
|
264 |
"this window spec was automatically generated by the ST/X UIPainter" |
|
265 |
||
266 |
"do not manually edit this - the painter/builder may not be able to |
|
267 |
handle the specification if its corrupted." |
|
268 |
||
269 |
" |
|
270 |
UIPainter new openOnClass:ToolApplicationModel andSelector:#windowSpecForCommitWithoutChannels |
|
271 |
ToolApplicationModel new openInterface:#windowSpecForCommitWithoutChannels |
|
272 |
" |
|
273 |
||
274 |
<resource: #canvas> |
|
275 |
||
276 |
^ |
|
277 |
||
278 |
#(#FullSpec |
|
279 |
#'window:' |
|
280 |
#(#WindowSpec |
|
281 |
#'name:' 'unnamed canvas' |
|
282 |
#'layout:' #(#LayoutFrame 418 0 386 0 717 0 445 0) |
|
283 |
#'label:' 'unnamed canvas' |
|
284 |
#'min:' #(#Point 100 22) |
|
285 |
#'max:' #(#Point 1152 900) |
|
286 |
#'bounds:' #(#Rectangle 418 386 718 446) |
|
287 |
#'usePreferredExtent:' false |
|
288 |
) |
|
289 |
#'component:' |
|
290 |
#(#SpecCollection |
|
291 |
#'collection:' |
|
292 |
#( |
|
293 |
#(#ActionButtonSpec |
|
294 |
#'name:' 'cancelButton' |
|
295 |
#'layout:' #(#LayoutFrame 5 0 0 0 -2 0.5 0 1) |
|
296 |
#'label:' 'Cancel' |
|
297 |
#'tabable:' true |
|
298 |
#'model:' #cancel |
|
299 |
) |
|
300 |
#(#ActionButtonSpec |
|
301 |
#'name:' 'okButton' |
|
302 |
#'layout:' #(#LayoutFrame 2 0.5 0 0.0 -5 1 0 1.0) |
|
303 |
#'label:' 'OK' |
|
304 |
#'tabable:' true |
|
305 |
#'model:' #accept |
|
306 |
) |
|
307 |
) |
|
308 |
) |
|
309 |
) |
|
310 |
! |
|
311 |
||
312 |
windowSpecForInfoBar |
|
313 |
"this window spec was automatically generated by the ST/X UIPainter" |
|
314 |
||
315 |
"do not manually edit this - the painter/builder may not be able to |
|
316 |
handle the specification if its corrupted." |
|
317 |
||
318 |
" |
|
319 |
UIPainter new openOnClass:ToolApplicationModel andSelector:#windowSpecForInfoBar |
|
320 |
ToolApplicationModel new openInterface:#windowSpecForInfoBar |
|
321 |
" |
|
322 |
||
323 |
<resource: #canvas> |
|
324 |
||
325 |
^ |
|
326 |
||
327 |
#(#FullSpec |
|
328 |
#'window:' |
|
329 |
#(#WindowSpec |
|
330 |
#'name:' 'Image Editor' |
|
331 |
#'layout:' #(#LayoutFrame 260 0 429 0 759 0 774 0) |
|
332 |
#'label:' 'Image Editor' |
|
333 |
#'min:' #(#Point 400 320) |
|
334 |
#'max:' #(#Point 1152 900) |
|
335 |
#'bounds:' #(#Rectangle 260 429 760 775) |
|
336 |
#'menu:' #menu |
|
337 |
#'usePreferredExtent:' false |
|
338 |
) |
|
339 |
#'component:' |
|
340 |
#(#SpecCollection |
|
341 |
#'collection:' |
|
342 |
#( |
|
343 |
#(#LabelSpec |
|
344 |
#'name:' 'infoLabel' |
|
345 |
#'layout:' #(#LayoutFrame 0 0.0 0 0.0 0 1.0 0 1.0) |
|
346 |
#'labelChannel:' #valueOfInfoLabel |
|
347 |
#'level:' 1 |
|
348 |
#'adjust:' #left |
|
349 |
) |
|
350 |
) |
|
351 |
) |
|
352 |
) |
|
353 |
! |
|
354 |
||
355 |
windowSpecForInfoBarWithClock |
|
356 |
"this window spec was automatically generated by the ST/X UIPainter" |
|
357 |
||
358 |
"do not manually edit this - the painter/builder may not be able to |
|
359 |
handle the specification if its corrupted." |
|
360 |
||
361 |
" |
|
362 |
UIPainter new openOnClass:ToolApplicationModel andSelector:#windowSpecForInfoBar |
|
363 |
ToolApplicationModel new openInterface:#windowSpecForInfoBar |
|
364 |
" |
|
365 |
||
366 |
<resource: #canvas> |
|
367 |
||
368 |
^ |
|
369 |
||
370 |
#(#FullSpec |
|
371 |
#'window:' |
|
372 |
#(#WindowSpec |
|
373 |
#'name:' 'Image Editor' |
|
374 |
#'layout:' #(#LayoutFrame 173 0 418 0 672 0 763 0) |
|
375 |
#'label:' 'Image Editor' |
|
376 |
#'min:' #(#Point 400 320) |
|
377 |
#'max:' #(#Point 1152 900) |
|
378 |
#'bounds:' #(#Rectangle 173 418 673 764) |
|
379 |
#'menu:' #menu |
|
380 |
#'usePreferredExtent:' false |
|
381 |
) |
|
382 |
#'component:' |
|
383 |
#(#SpecCollection |
|
384 |
#'collection:' |
|
385 |
#( |
|
386 |
#(#LabelSpec |
|
387 |
#'name:' 'infoLabel' |
|
388 |
#'layout:' #(#LayoutFrame 0 0 0 0.0 -80 1 0 1.0) |
|
389 |
#'labelChannel:' #valueOfInfoLabel |
|
390 |
#'level:' 1 |
|
391 |
#'adjust:' #left |
|
392 |
) |
|
393 |
#(#LabelSpec |
|
394 |
#'name:' 'timeLabel' |
|
395 |
#'layout:' #(#LayoutFrame -80 1 0 0.0 0 1.0 0 1.0) |
|
396 |
#'labelChannel:' #valueOfTimeLabel |
|
397 |
#'level:' 1 |
|
398 |
#'adjust:' #right |
|
399 |
) |
|
400 |
) |
|
401 |
) |
|
402 |
) |
|
403 |
! ! |
|
404 |
||
405 |
!ToolApplicationModel class methodsFor:'menu specs'! |
|
406 |
||
753 | 407 |
menuAbout |
408 |
"this window spec was automatically generated by the ST/X MenuEditor" |
|
409 |
||
410 |
"do not manually edit this - the builder may not be able to |
|
411 |
handle the specification if its corrupted." |
|
412 |
||
413 |
" |
|
414 |
MenuEditor new openOnClass:ToolApplicationModel andSelector:#menuAbout |
|
415 |
(Menu new fromLiteralArrayEncoding:(ToolApplicationModel menuAbout)) startUp |
|
416 |
" |
|
417 |
||
418 |
<resource: #menu> |
|
419 |
||
420 |
^ |
|
421 |
||
422 |
#(#Menu |
|
423 |
||
424 |
#( |
|
425 |
#(#MenuItem |
|
426 |
#'label:' 'About Smalltalk/X...' |
|
792
b48118707d7b
all labels must be translated
Claus Gittinger <cg@exept.de>
parents:
791
diff
changeset
|
427 |
#'translateLabel:' true |
753 | 428 |
#'value:' #openAbout |
762 | 429 |
#'activeHelpKey:' #aboutSTX |
753 | 430 |
) |
431 |
#(#MenuItem |
|
432 |
#'label:' '-' |
|
433 |
) |
|
434 |
#(#MenuItem |
|
435 |
#'label:' 'About This Application...' |
|
792
b48118707d7b
all labels must be translated
Claus Gittinger <cg@exept.de>
parents:
791
diff
changeset
|
436 |
#'translateLabel:' true |
753 | 437 |
#'value:' #openAboutThisApplication |
762 | 438 |
#'activeHelpKey:' #aboutThisAppliaction |
753 | 439 |
) |
440 |
) nil |
|
441 |
nil |
|
442 |
) |
|
792
b48118707d7b
all labels must be translated
Claus Gittinger <cg@exept.de>
parents:
791
diff
changeset
|
443 |
|
b48118707d7b
all labels must be translated
Claus Gittinger <cg@exept.de>
parents:
791
diff
changeset
|
444 |
"Modified: / 30.1.1998 / 00:03:11 / cg" |
753 | 445 |
! |
446 |
||
447 |
menuHelp |
|
448 |
"this window spec was automatically generated by the ST/X MenuEditor" |
|
449 |
||
450 |
"do not manually edit this - the builder may not be able to |
|
451 |
handle the specification if its corrupted." |
|
452 |
||
453 |
" |
|
454 |
MenuEditor new openOnClass:ToolApplicationModel andSelector:#menuHelp |
|
455 |
(Menu new fromLiteralArrayEncoding:(ToolApplicationModel menuHelp)) startUp |
|
456 |
" |
|
457 |
||
458 |
<resource: #menu> |
|
459 |
||
460 |
^ |
|
461 |
||
462 |
#(#Menu |
|
463 |
||
464 |
#( |
|
465 |
#(#MenuItem |
|
466 |
#'label:' 'Tutorial' |
|
792
b48118707d7b
all labels must be translated
Claus Gittinger <cg@exept.de>
parents:
791
diff
changeset
|
467 |
#'translateLabel:' true |
753 | 468 |
#'value:' #openTutorial |
762 | 469 |
#'activeHelpKey:' #helpTutorial |
803 | 470 |
#'enabled:' #valueOfHavingTutorial |
753 | 471 |
) |
472 |
#(#MenuItem |
|
473 |
#'label:' '-' |
|
474 |
) |
|
475 |
#(#MenuItem |
|
762 | 476 |
#'label:' 'Show Help' |
792
b48118707d7b
all labels must be translated
Claus Gittinger <cg@exept.de>
parents:
791
diff
changeset
|
477 |
#'translateLabel:' true |
782 | 478 |
#'value:' #'showHelp:' |
762 | 479 |
#'activeHelpKey:' #helpShowHelp |
782 | 480 |
#'indication:' #showHelp |
753 | 481 |
) |
482 |
) nil |
|
483 |
nil |
|
484 |
) |
|
485 |
! |
|
486 |
||
487 |
menuSettings |
|
488 |
"this window spec was automatically generated by the ST/X MenuEditor" |
|
489 |
||
490 |
"do not manually edit this - the builder may not be able to |
|
491 |
handle the specification if its corrupted." |
|
492 |
||
493 |
" |
|
494 |
MenuEditor new openOnClass:ToolApplicationModel andSelector:#menuSettings |
|
495 |
(Menu new fromLiteralArrayEncoding:(ToolApplicationModel menuSettings)) startUp |
|
496 |
" |
|
497 |
||
498 |
<resource: #menu> |
|
499 |
||
500 |
^ |
|
501 |
||
502 |
#(#Menu |
|
503 |
||
504 |
#( |
|
505 |
#(#MenuItem |
|
792
b48118707d7b
all labels must be translated
Claus Gittinger <cg@exept.de>
parents:
791
diff
changeset
|
506 |
#'label:' 'Language...' |
b48118707d7b
all labels must be translated
Claus Gittinger <cg@exept.de>
parents:
791
diff
changeset
|
507 |
#'translateLabel:' true |
753 | 508 |
#'value:' #languageSetting |
509 |
) |
|
510 |
) nil |
|
511 |
nil |
|
512 |
) |
|
792
b48118707d7b
all labels must be translated
Claus Gittinger <cg@exept.de>
parents:
791
diff
changeset
|
513 |
|
b48118707d7b
all labels must be translated
Claus Gittinger <cg@exept.de>
parents:
791
diff
changeset
|
514 |
"Modified: / 30.1.1998 / 00:04:14 / cg" |
753 | 515 |
! ! |
516 |
||
517 |
!ToolApplicationModel class methodsFor:'resources'! |
|
518 |
||
803 | 519 |
desktopIcon |
520 |
||
521 |
|desktopIcon| |
|
522 |
desktopIcon := self stxIcon. |
|
804 | 523 |
^desktopIcon magnifiedBy: Display preferredIconSize/desktopIcon extent |
803 | 524 |
|
525 |
||
526 |
||
527 |
! |
|
528 |
||
753 | 529 |
downIcon |
778 | 530 |
"Generated by the Image Editor" |
531 |
" |
|
532 |
ImageEditor openOnClass:self andSelector:#downIcon |
|
533 |
" |
|
753 | 534 |
|
535 |
<resource: #image> |
|
778 | 536 |
|
537 |
^Icon |
|
538 |
constantNamed:#'ToolApplicationModel downIcon' |
|
539 |
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 | 540 |
|
541 |
downLeftIcon |
|
778 | 542 |
"Generated by the Image Editor" |
543 |
" |
|
544 |
ImageEditor openOnClass:self andSelector:#downLeftIcon |
|
545 |
" |
|
753 | 546 |
|
547 |
<resource: #image> |
|
778 | 548 |
|
549 |
^Icon |
|
550 |
constantNamed:#'ToolApplicationModel downLeftIcon' |
|
551 |
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 | 552 |
|
553 |
downRightIcon |
|
778 | 554 |
"Generated by the Image Editor" |
555 |
" |
|
556 |
ImageEditor openOnClass:self andSelector:#downRightIcon |
|
557 |
" |
|
753 | 558 |
|
559 |
<resource: #image> |
|
778 | 560 |
|
561 |
^Icon |
|
562 |
constantNamed:#'ToolApplicationModel downRightIcon' |
|
563 |
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 | 564 |
|
565 |
fileOutIcon |
|
778 | 566 |
"Generated by the Image Editor" |
567 |
" |
|
568 |
ImageEditor openOnClass:self andSelector:#fileOutIcon |
|
569 |
" |
|
753 | 570 |
|
571 |
<resource: #image> |
|
572 |
||
778 | 573 |
^Icon |
574 |
constantNamed:#'ToolApplicationModel fileOutIcon' |
|
575 |
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 | 576 |
|
577 |
leftDownIcon |
|
778 | 578 |
"Generated by the Image Editor" |
579 |
" |
|
580 |
ImageEditor openOnClass:self andSelector:#leftDownIcon |
|
581 |
" |
|
753 | 582 |
|
583 |
<resource: #image> |
|
778 | 584 |
|
585 |
^Icon |
|
586 |
constantNamed:#'ToolApplicationModel leftDownIcon' |
|
587 |
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 | 588 |
|
778 | 589 |
leftIcon |
590 |
"Generated by the Image Editor" |
|
591 |
" |
|
592 |
ImageEditor openOnClass:self andSelector:#leftIcon |
|
593 |
" |
|
753 | 594 |
|
595 |
<resource: #image> |
|
596 |
||
778 | 597 |
^Icon |
598 |
constantNamed:#'ToolApplicationModel leftIcon' |
|
599 |
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 | 600 |
|
778 | 601 |
leftUpIcon |
602 |
"Generated by the Image Editor" |
|
603 |
" |
|
604 |
ImageEditor openOnClass:self andSelector:#leftUpIcon |
|
605 |
" |
|
753 | 606 |
|
607 |
<resource: #image> |
|
772 | 608 |
|
778 | 609 |
^Icon |
610 |
constantNamed:#'ToolApplicationModel leftUpIcon' |
|
611 |
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 | 612 |
|
778 | 613 |
loadIcon |
614 |
"Generated by the Image Editor" |
|
615 |
" |
|
616 |
ImageEditor openOnClass:self andSelector:#loadIcon |
|
617 |
" |
|
753 | 618 |
|
619 |
<resource: #image> |
|
778 | 620 |
|
621 |
^Icon |
|
622 |
constantNamed:#'ToolApplicationModel loadIcon' |
|
623 |
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 | 624 |
|
803 | 625 |
menuIcon |
626 |
||
627 |
|menuIcon| |
|
628 |
menuIcon := self stxIcon. |
|
804 | 629 |
^menuIcon magnifiedBy: MenuPanel defaultFont height/menuIcon height |
803 | 630 |
! |
631 |
||
778 | 632 |
newIcon |
633 |
"Generated by the Image Editor" |
|
634 |
" |
|
635 |
ImageEditor openOnClass:self andSelector:#newIcon |
|
636 |
" |
|
756 | 637 |
|
638 |
<resource: #image> |
|
778 | 639 |
|
640 |
^Icon |
|
641 |
constantNamed:#'ToolApplicationModel newIcon' |
|
642 |
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 | 643 |
|
778 | 644 |
removeIcon |
645 |
"Generated by the Image Editor" |
|
646 |
" |
|
647 |
ImageEditor openOnClass:self andSelector:#removeIcon |
|
648 |
" |
|
753 | 649 |
|
650 |
<resource: #image> |
|
772 | 651 |
|
778 | 652 |
^Icon |
653 |
constantNamed:#'ToolApplicationModel removeIcon' |
|
654 |
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 | 655 |
|
778 | 656 |
rightIcon |
657 |
"Generated by the Image Editor" |
|
658 |
" |
|
659 |
ImageEditor openOnClass:self andSelector:#rightIcon |
|
660 |
" |
|
753 | 661 |
|
662 |
<resource: #image> |
|
778 | 663 |
|
664 |
^Icon |
|
665 |
constantNamed:#'ToolApplicationModel rightIcon' |
|
666 |
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 | 667 |
|
778 | 668 |
saveIcon |
669 |
"Generated by the Image Editor" |
|
670 |
" |
|
671 |
ImageEditor openOnClass:self andSelector:#saveIcon |
|
672 |
" |
|
753 | 673 |
|
674 |
<resource: #image> |
|
778 | 675 |
|
676 |
^Icon |
|
677 |
constantNamed:#'ToolApplicationModel saveIcon' |
|
779 | 678 |
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 | 679 |
! |
753 | 680 |
|
778 | 681 |
searchIcon |
682 |
"Generated by the Image Editor" |
|
683 |
" |
|
684 |
ImageEditor openOnClass:self andSelector:#searchIcon |
|
685 |
" |
|
753 | 686 |
|
687 |
<resource: #image> |
|
762 | 688 |
|
778 | 689 |
^Icon |
690 |
constantNamed:#'ToolApplicationModel searchIcon' |
|
691 |
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 | 692 |
|
782 | 693 |
startIcon |
694 |
"Generated by the Image Editor" |
|
695 |
" |
|
696 |
ImageEditor openOnClass:self andSelector:#startIcon |
|
697 |
" |
|
698 |
||
699 |
<resource: #image> |
|
700 |
||
701 |
^Icon |
|
702 |
constantNamed:#'ToolApplicationModel startIcon' |
|
703 |
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] |
|
704 |
! |
|
705 |
||
778 | 706 |
stxIcon |
707 |
"Generated by the Image Editor" |
|
708 |
" |
|
709 |
ImageEditor openOnClass:self andSelector:#stxIcon |
|
710 |
" |
|
772 | 711 |
|
712 |
<resource: #image> |
|
753 | 713 |
|
778 | 714 |
^Icon |
715 |
constantNamed:#'ToolApplicationModel stxIcon' |
|
803 | 716 |
ifAbsentPut:[(Depth2Image new) width: 48; height: 48; photometric:(#palette); bitsPerSample:(#(2 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@U@@@@@@@AP@@@@@AUP@@@@@@E@@@@@@AUP@@@@@@T@@@@@@AUP@@@@@EP@@@@@@AUP@@@@@DP@@@@@@AUD@@@@AU@@@@@@@@UT@@@@@T@@@@@@@@UT@@@@QP@@@@@@@@EU@@@@U@@@@@@@@@AU@@@AD@@@@@@@@@ATP@@UP@@@@@@@@@AUP@@Q@@@@@@@@@@@UT@AD@@@@@@@@@@@AQ@DP@@@@@@@@@@@EU@Q@@@@@@@@@@@@ATQT@@@@@@@@@@@@AUTP@@@@@@@@@@@@@EPP@@@@@@@@@@@@@QU@@@@@@@@@@@@@@EU@@@@@@@@@@@@@@UT@@@@@@@@@@@@@AUE@@@@@@@@@@@@@EUU@@@@@@@@@@@@@UPEP@@@@@@@@@@@AUPAT@@@@@@@@@@@EE@AU@@@@@@@@@@AET@@E@@@@@@@@@@AUP@@EP@@@@@@@@@UU@@@AP@@@@@@@@AUP@@@AT@@@@@@@@EUP@@@@T@@@@@@@AUU@@@@@E@@@@@@@EUT@@@@@DP@@@@@@UUP@@@@@AP@@@@@@UUP@@@@@@T@@@@@@UU@@@@@@@E@@@@@@ET@@@@@@@A@@@@@@@@@@@@@@@@P@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@'); colorMap:((OrderedCollection new add:(Color grey:9.99924); add:(Color red:0.0 green:80.0 blue:20.0); add:(Color black); add:(Color white); yourself)); yourself] |
717 |
! |
|
753 | 718 |
|
719 |
upIcon |
|
778 | 720 |
"Generated by the Image Editor" |
721 |
" |
|
722 |
ImageEditor openOnClass:self andSelector:#upIcon |
|
723 |
" |
|
753 | 724 |
|
725 |
<resource: #image> |
|
778 | 726 |
|
727 |
^Icon |
|
728 |
constantNamed:#'ToolApplicationModel upIcon' |
|
729 |
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 | 730 |
|
731 |
upRightIcon |
|
778 | 732 |
"Generated by the Image Editor" |
733 |
" |
|
734 |
ImageEditor openOnClass:self andSelector:#upRightIcon |
|
735 |
" |
|
753 | 736 |
|
737 |
<resource: #image> |
|
778 | 738 |
|
739 |
^Icon |
|
740 |
constantNamed:#'ToolApplicationModel upRightIcon' |
|
741 |
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 | 742 |
|
782 | 743 |
!ToolApplicationModel class methodsFor:'startup / release'! |
753 | 744 |
|
782 | 745 |
preSnapshot |
753 | 746 |
|
782 | 747 |
clipboard := nil |
748 |
||
753 | 749 |
! |
750 |
||
782 | 751 |
uninitialize |
760 | 752 |
|
782 | 753 |
showHelp := history := clipboard := nil |
753 | 754 |
! ! |
755 |
||
782 | 756 |
!ToolApplicationModel methodsFor:'aspects'! |
757 |
||
758 |
valueOfEnablingCommitButtons |
|
753 | 759 |
|
782 | 760 |
|holder| |
761 |
(holder := builder bindingAt:#valueOfEnablingCommitButtons) isNil ifTrue:[ |
|
762 |
builder aspectAt:#valueOfEnablingCommitButtons put:(holder := false asValue). |
|
763 |
]. |
|
764 |
^ holder |
|
753 | 765 |
|
782 | 766 |
! |
767 |
||
768 |
valueOfHavingClipboard |
|
753 | 769 |
|
782 | 770 |
|holder| |
771 |
(holder := builder bindingAt:#valueOfHavingClipboard) isNil ifTrue:[ |
|
772 |
builder aspectAt:#valueOfHavingClipboard put:(holder := self class clipboard notNil asValue). |
|
773 |
]. |
|
774 |
^ holder |
|
753 | 775 |
|
782 | 776 |
! |
777 |
||
803 | 778 |
valueOfHavingTutorial |
779 |
||
780 |
|holder| |
|
781 |
(holder := builder bindingAt:#valueOfHavingTutorial) isNil ifTrue:[ |
|
782 |
builder aspectAt:#valueOfHavingTutorial put:(holder := false asValue). |
|
783 |
]. |
|
784 |
^ holder |
|
785 |
||
786 |
! |
|
787 |
||
782 | 788 |
valueOfInfoLabel |
789 |
||
790 |
|holder| |
|
791 |
(holder := builder bindingAt:#valueOfInfoLabel) isNil ifTrue:[ |
|
792 |
builder aspectAt:#valueOfInfoLabel put:(holder := ValueHolder new). |
|
793 |
]. |
|
794 |
^ holder |
|
753 | 795 |
|
782 | 796 |
! |
797 |
||
798 |
valueOfTimeLabel |
|
753 | 799 |
|
782 | 800 |
|holder| |
801 |
(holder := builder bindingAt:#valueOfTimeLabel) isNil ifTrue:[ |
|
802 |
builder aspectAt:#valueOfTimeLabel put:(holder := ValueHolder new). |
|
803 |
]. |
|
804 |
^ holder |
|
753 | 805 |
|
806 |
! ! |
|
807 |
||
782 | 808 |
!ToolApplicationModel methodsFor:'clipboard'! |
753 | 809 |
|
782 | 810 |
clipboard: anEditObject |
753 | 811 |
|
782 | 812 |
self class clipboard: anEditObject. |
753 | 813 |
|
782 | 814 |
self valueOfHavingClipboard value: anEditObject notNil |
815 |
! ! |
|
816 |
||
817 |
!ToolApplicationModel methodsFor:'help'! |
|
753 | 818 |
|
762 | 819 |
defaultInfoLabel |
820 |
||
821 |
^'' |
|
822 |
! |
|
823 |
||
753 | 824 |
openAbout |
825 |
"show an about box" |
|
826 |
||
827 |
|box| |
|
828 |
||
829 |
box := AboutBox new. |
|
830 |
box autoHideAfter:10 with:[]. |
|
831 |
box showAtCenter |
|
832 |
||
833 |
! |
|
834 |
||
835 |
openAboutThisApplication |
|
836 |
"show an about this application box" |
|
837 |
||
838 |
|rev box| |
|
839 |
rev := ''. |
|
840 |
self class revision notNil ifTrue: [rev := ' (rev: ', self class revision printString, ')']. |
|
841 |
box := AboutBox title: |
|
800 | 842 |
'\The application\\' withCRs |
843 |
, (Text string: self class name emphasis: #bold), rev |
|
844 |
, '\\has been designed and implemented by \' withCRs |
|
845 |
, ((self class authorLinesForAboutBox collect:[:l | ' ' , l]) asStringWith:$\) withCRs |
|
846 |
, '\\' withCRs. |
|
753 | 847 |
|
848 |
box label:'About This Application'. |
|
849 |
box autoHideAfter:10 with:[]. |
|
850 |
box showAtCenter. |
|
800 | 851 |
|
852 |
"Modified: / 1.2.1998 / 15:59:58 / cg" |
|
753 | 853 |
! |
854 |
||
855 |
openClassDocumentation |
|
856 |
||
857 |
Autoload autoloadFailedSignal handle:[:ex | |
|
858 |
self warn:'autoload failed. |
|
859 |
||
860 |
Check your source directory and/or |
|
861 |
the abbreviation file for the classes (correct) shortened name.'. |
|
862 |
ex return. |
|
863 |
] do:[ |
|
864 |
|text v| |
|
865 |
||
866 |
text := self class htmlDocumentation. |
|
867 |
text notNil ifTrue:[ |
|
868 |
v := HTMLDocumentView |
|
869 |
openFullOnText:text |
|
870 |
inDirectory:(Smalltalk getSystemFileName:'doc/online/english/classDoc'). |
|
871 |
v nameSpaceForExecution: self class nameSpace. |
|
872 |
] |
|
873 |
] |
|
874 |
||
875 |
||
876 |
! |
|
877 |
||
803 | 878 |
openTutorial |
879 |
||
880 |
self openTutorial: 'doc/online/english/getstart/tutorial.html' |
|
881 |
! |
|
882 |
||
883 |
openTutorial: aHTMLFilename |
|
753 | 884 |
|
885 |
|dir| |
|
803 | 886 |
((dir := Smalltalk getSystemFileName: aHTMLFilename) asFilename exists) |
753 | 887 |
ifTrue: |
888 |
[ |
|
889 |
^HTMLDocumentView openFullOnFile: dir |
|
890 |
] |
|
762 | 891 |
! |
892 |
||
782 | 893 |
showHelp |
894 |
"Answer whether showing help is turned on/off" |
|
895 |
||
783 | 896 |
|currentActiveHelp| |
897 |
currentActiveHelp := ActiveHelp currentHelpListener. |
|
898 |
||
899 |
^self class showHelp |
|
900 |
and: [currentActiveHelp notNil and: [currentActiveHelp interestedIn: self builder window]] |
|
782 | 901 |
! |
902 |
||
903 |
showHelp: aValue |
|
904 |
"toggle showing help" |
|
905 |
||
906 |
(self class showHelp: aValue) |
|
907 |
ifTrue: [ActiveHelp startFor: self] |
|
908 |
ifFalse: [ActiveHelp stopFor: self. self valueOfInfoLabel value: self defaultInfoLabel] |
|
909 |
! |
|
910 |
||
762 | 911 |
showHelp:aHelpText for:view |
912 |
"display aHelpText in the info label or if present detour to masterApplication." |
|
913 |
||
782 | 914 |
self showHelp ifFalse: [^true]. |
762 | 915 |
self masterApplication notNil |
916 |
ifTrue: |
|
917 |
[ |
|
918 |
^masterApplication showHelp: aHelpText for:view |
|
919 |
] |
|
920 |
ifFalse: |
|
921 |
[ |
|
922 |
aHelpText isNil |
|
923 |
ifTrue: [self valueOfInfoLabel value: self defaultInfoLabel] |
|
924 |
ifFalse: [self valueOfInfoLabel value: (aHelpText asString printString upTo: Character cr)]. |
|
925 |
||
926 |
^true |
|
927 |
] |
|
928 |
! ! |
|
929 |
||
753 | 930 |
!ToolApplicationModel methodsFor:'history'! |
931 |
||
932 |
addToHistory: aHistoryEntry |
|
933 |
||
782 | 934 |
aHistoryEntry key size = 0 ifTrue: [^nil]. |
753 | 935 |
self history remove: (self history detect: [:histEntry| histEntry key = aHistoryEntry key] ifNone: nil) ifAbsent: nil. |
936 |
self history addFirst: aHistoryEntry. |
|
937 |
[self history size > self class historyMaxSize] whileTrue: [self history removeLast] |
|
938 |
! |
|
939 |
||
940 |
emptyHistory |
|
941 |
||
942 |
^self history removeAll |
|
943 |
! |
|
944 |
||
945 |
history |
|
946 |
||
947 |
^self class getHistory |
|
948 |
! |
|
949 |
||
950 |
menuHistory |
|
951 |
||
952 |
|menu a| |
|
953 |
menu := Menu new receiver: self. |
|
954 |
(self history collect: [:histEntry| histEntry value]) asSet asOrderedCollection do: |
|
955 |
[:historyEntryType| |
|
803 | 956 |
menu addItemGroup: ((a := self history select: [:histEntry| histEntry value = historyEntryType]) collect: [:histEntry| MenuItem new label: histEntry key printString; value: histEntry value; argument: histEntry key; activeHelpKey: #historyMenuItem]). |
753 | 957 |
]. |
803 | 958 |
menu addItem: (MenuItem new label: 'Empty History'; value: #emptyHistory; activeHelpKey: #historyEmptyMenu). |
753 | 959 |
|
960 |
^menu |
|
961 |
! |
|
962 |
||
963 |
removeFromHistory: aHistoryEntry |
|
964 |
||
965 |
self history remove: (self history detect: [:histEntry| histEntry key = aHistoryEntry key] ifNone: nil) ifAbsent: nil. |
|
966 |
[self history size > self class historyMaxSize] whileTrue: [self history removeLast] |
|
967 |
! ! |
|
968 |
||
782 | 969 |
!ToolApplicationModel methodsFor:'queries'! |
970 |
||
971 |
preferredExtent |
|
972 |
"preferred extent of my window; top/main menu and top toolbar (named by 'menuToolbarView') |
|
973 |
will be considered" |
|
974 |
||
975 |
|window menu menuToolbarView preferredExtentOfWindow| |
|
976 |
||
977 |
window := self builder window. |
|
978 |
menu := window subViews first. |
|
979 |
menuToolbarView := builder componentAt: #menuToolbarView. |
|
980 |
||
981 |
preferredExtentOfWindow := window extent. |
|
982 |
menu class = MenuPanel ifTrue: [preferredExtentOfWindow := preferredExtentOfWindow max: menu preferredExtent]. |
|
983 |
menuToolbarView notNil ifTrue: [preferredExtentOfWindow := preferredExtentOfWindow max: menuToolbarView preferredExtent]. |
|
984 |
||
985 |
^window minExtent max: (preferredExtentOfWindow min: window maxExtent) |
|
986 |
! ! |
|
987 |
||
753 | 988 |
!ToolApplicationModel methodsFor:'startup / release'! |
989 |
||
990 |
close |
|
991 |
||
756 | 992 |
self uninitialize. |
993 |
||
753 | 994 |
super close |
995 |
! |
|
996 |
||
997 |
closeRequest |
|
998 |
||
756 | 999 |
self uninitialize. |
1000 |
||
753 | 1001 |
super closeRequest |
1002 |
! |
|
1003 |
||
791 | 1004 |
openInterface:aSymbol |
753 | 1005 |
|
791 | 1006 |
self allButOpenInterface:aSymbol. |
802 | 1007 |
|
1008 |
builder window extent: self preferredExtent. |
|
1009 |
builder window label: self class label. |
|
791 | 1010 |
self openWindow. |
802 | 1011 |
|
791 | 1012 |
^builder |
753 | 1013 |
! |
1014 |
||
790 | 1015 |
postOpenWith:aBuilder |
1016 |
||
1017 |
super postOpenWith:aBuilder. |
|
1018 |
||
1019 |
timeBlock := [self showTime]. |
|
791 | 1020 |
self showTime. |
1021 |
self class showHelp ifTrue: [ActiveHelp startFor: self]. |
|
1022 |
self valueOfInfoLabel value: self defaultInfoLabel. |
|
790 | 1023 |
! |
1024 |
||
753 | 1025 |
reOpen |
1026 |
||
1027 |
self close. |
|
1028 |
||
1029 |
self class open |
|
1030 |
! |
|
1031 |
||
760 | 1032 |
removeAllTemporalViews |
1033 |
||
1034 |
self builder namedComponents keys copy do: |
|
1035 |
[:comp| |
|
1036 |
(comp includesString: '_Temporal') ifTrue: [self builder namedComponents removeKey: comp] |
|
1037 |
] |
|
1038 |
! |
|
1039 |
||
756 | 1040 |
uninitialize |
1041 |
||
782 | 1042 |
self showHelp ifTrue: [ActiveHelp stopFor: self]. |
756 | 1043 |
Processor removeTimedBlock:timeBlock. |
1044 |
timeBlock := nil. |
|
753 | 1045 |
! ! |
1046 |
||
1047 |
!ToolApplicationModel methodsFor:'window events'! |
|
1048 |
||
1049 |
showTime |
|
1050 |
||
1051 |
|hours minutes suffix| |
|
1052 |
suffix := ' am '. |
|
1053 |
(hours := Time now hours) > 12 ifTrue: [hours := hours - 12]. |
|
1054 |
Time now hours >= 12 ifTrue: [suffix := ' pm ']. |
|
1055 |
(minutes := Time now minutes printString) size = 1 ifTrue: [minutes := '0', minutes printString]. |
|
1056 |
self valueOfTimeLabel value: hours printString, ':', minutes, suffix. |
|
790 | 1057 |
Processor removeTimedBlock: timeBlock. |
753 | 1058 |
Processor addTimedBlock: timeBlock afterSeconds: 1 |
1059 |
||
1060 |
! ! |
|
1061 |
||
1062 |
!ToolApplicationModel class methodsFor:'documentation'! |
|
1063 |
||
1064 |
version |
|
805 | 1065 |
^ '$Header: /cvs/stx/stx/libview2/ToolApplicationModel.st,v 1.31 1998-02-02 22:19:47 tz Exp $' |
753 | 1066 |
! ! |