author | tz |
Tue, 03 Feb 1998 22:11:19 +0100 | |
changeset 820 | d01d777e2bb3 |
parent 805 | d4c4ee3bb474 |
child 821 | a7dba33b613f |
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' |
|
820 | 331 |
#'layout:' #(#LayoutFrame 366 0 355 0 865 0 700 0) |
797 | 332 |
#'label:' 'Image Editor' |
333 |
#'min:' #(#Point 400 320) |
|
334 |
#'max:' #(#Point 1152 900) |
|
820 | 335 |
#'bounds:' #(#Rectangle 366 355 866 701) |
797 | 336 |
#'menu:' #menu |
337 |
#'usePreferredExtent:' false |
|
338 |
) |
|
339 |
#'component:' |
|
340 |
#(#SpecCollection |
|
341 |
#'collection:' |
|
342 |
#( |
|
820 | 343 |
#(#ViewSpec |
344 |
#'name:' 'view' |
|
797 | 345 |
#'layout:' #(#LayoutFrame 0 0.0 0 0.0 0 1.0 0 1.0) |
820 | 346 |
#'component:' |
347 |
#(#SpecCollection |
|
348 |
#'collection:' |
|
349 |
#( |
|
350 |
#(#LabelSpec |
|
351 |
#'name:' 'infoLabel' |
|
352 |
#'layout:' #(#LayoutFrame 2 0.0 1 0.0 -1 1.0 -1 1.0) |
|
353 |
#'labelChannel:' #valueOfInfoLabel |
|
354 |
#'level:' -1 |
|
355 |
#'adjust:' #left |
|
356 |
) |
|
357 |
) |
|
358 |
) |
|
797 | 359 |
) |
360 |
) |
|
361 |
) |
|
362 |
) |
|
363 |
! |
|
364 |
||
365 |
windowSpecForInfoBarWithClock |
|
366 |
"this window spec was automatically generated by the ST/X UIPainter" |
|
367 |
||
368 |
"do not manually edit this - the painter/builder may not be able to |
|
369 |
handle the specification if its corrupted." |
|
370 |
||
371 |
" |
|
820 | 372 |
UIPainter new openOnClass:ToolApplicationModel andSelector:#windowSpecForInfoBarWithClock |
373 |
ToolApplicationModel new openInterface:#windowSpecForInfoBarWithClock |
|
797 | 374 |
" |
375 |
||
376 |
<resource: #canvas> |
|
377 |
||
378 |
^ |
|
379 |
||
380 |
#(#FullSpec |
|
381 |
#'window:' |
|
382 |
#(#WindowSpec |
|
383 |
#'name:' 'Image Editor' |
|
820 | 384 |
#'layout:' #(#LayoutFrame 349 0 227 0 848 0 572 0) |
797 | 385 |
#'label:' 'Image Editor' |
386 |
#'min:' #(#Point 400 320) |
|
387 |
#'max:' #(#Point 1152 900) |
|
820 | 388 |
#'bounds:' #(#Rectangle 349 227 849 573) |
797 | 389 |
#'menu:' #menu |
390 |
#'usePreferredExtent:' false |
|
391 |
) |
|
392 |
#'component:' |
|
393 |
#(#SpecCollection |
|
394 |
#'collection:' |
|
395 |
#( |
|
820 | 396 |
#(#ViewSpec |
397 |
#'name:' 'view' |
|
398 |
#'layout:' #(#LayoutFrame 0 0.0 0 0.0 0 1.0 0 1.0) |
|
399 |
#'component:' |
|
400 |
#(#SpecCollection |
|
401 |
#'collection:' |
|
402 |
#( |
|
403 |
#(#LabelSpec |
|
404 |
#'name:' 'infoLabel' |
|
405 |
#'layout:' #(#LayoutFrame 2 0 1 0.0 -81 1 -1 1.0) |
|
406 |
#'labelChannel:' #valueOfInfoLabel |
|
407 |
#'level:' -1 |
|
408 |
#'adjust:' #left |
|
409 |
) |
|
410 |
#(#LabelSpec |
|
411 |
#'name:' 'timeLabel' |
|
412 |
#'layout:' #(#LayoutFrame -79 1 1 0.0 -1 1.0 -1 1.0) |
|
413 |
#'labelChannel:' #valueOfTimeLabel |
|
414 |
#'level:' -1 |
|
415 |
#'adjust:' #right |
|
416 |
) |
|
417 |
) |
|
418 |
) |
|
797 | 419 |
) |
420 |
) |
|
421 |
) |
|
422 |
) |
|
423 |
! ! |
|
424 |
||
425 |
!ToolApplicationModel class methodsFor:'menu specs'! |
|
426 |
||
753 | 427 |
menuAbout |
428 |
"this window spec was automatically generated by the ST/X MenuEditor" |
|
429 |
||
430 |
"do not manually edit this - the builder may not be able to |
|
431 |
handle the specification if its corrupted." |
|
432 |
||
433 |
" |
|
434 |
MenuEditor new openOnClass:ToolApplicationModel andSelector:#menuAbout |
|
435 |
(Menu new fromLiteralArrayEncoding:(ToolApplicationModel menuAbout)) startUp |
|
436 |
" |
|
437 |
||
438 |
<resource: #menu> |
|
439 |
||
440 |
^ |
|
441 |
||
442 |
#(#Menu |
|
443 |
||
444 |
#( |
|
445 |
#(#MenuItem |
|
446 |
#'label:' 'About Smalltalk/X...' |
|
792
b48118707d7b
all labels must be translated
Claus Gittinger <cg@exept.de>
parents:
791
diff
changeset
|
447 |
#'translateLabel:' true |
753 | 448 |
#'value:' #openAbout |
762 | 449 |
#'activeHelpKey:' #aboutSTX |
753 | 450 |
) |
451 |
#(#MenuItem |
|
452 |
#'label:' '-' |
|
453 |
) |
|
454 |
#(#MenuItem |
|
455 |
#'label:' 'About This Application...' |
|
792
b48118707d7b
all labels must be translated
Claus Gittinger <cg@exept.de>
parents:
791
diff
changeset
|
456 |
#'translateLabel:' true |
753 | 457 |
#'value:' #openAboutThisApplication |
762 | 458 |
#'activeHelpKey:' #aboutThisAppliaction |
753 | 459 |
) |
460 |
) nil |
|
461 |
nil |
|
462 |
) |
|
792
b48118707d7b
all labels must be translated
Claus Gittinger <cg@exept.de>
parents:
791
diff
changeset
|
463 |
|
b48118707d7b
all labels must be translated
Claus Gittinger <cg@exept.de>
parents:
791
diff
changeset
|
464 |
"Modified: / 30.1.1998 / 00:03:11 / cg" |
753 | 465 |
! |
466 |
||
467 |
menuHelp |
|
468 |
"this window spec was automatically generated by the ST/X MenuEditor" |
|
469 |
||
470 |
"do not manually edit this - the builder may not be able to |
|
471 |
handle the specification if its corrupted." |
|
472 |
||
473 |
" |
|
474 |
MenuEditor new openOnClass:ToolApplicationModel andSelector:#menuHelp |
|
475 |
(Menu new fromLiteralArrayEncoding:(ToolApplicationModel menuHelp)) startUp |
|
476 |
" |
|
477 |
||
478 |
<resource: #menu> |
|
479 |
||
480 |
^ |
|
481 |
||
482 |
#(#Menu |
|
483 |
||
484 |
#( |
|
485 |
#(#MenuItem |
|
486 |
#'label:' 'Tutorial' |
|
792
b48118707d7b
all labels must be translated
Claus Gittinger <cg@exept.de>
parents:
791
diff
changeset
|
487 |
#'translateLabel:' true |
753 | 488 |
#'value:' #openTutorial |
762 | 489 |
#'activeHelpKey:' #helpTutorial |
803 | 490 |
#'enabled:' #valueOfHavingTutorial |
753 | 491 |
) |
492 |
#(#MenuItem |
|
493 |
#'label:' '-' |
|
494 |
) |
|
495 |
#(#MenuItem |
|
762 | 496 |
#'label:' 'Show Help' |
792
b48118707d7b
all labels must be translated
Claus Gittinger <cg@exept.de>
parents:
791
diff
changeset
|
497 |
#'translateLabel:' true |
762 | 498 |
#'activeHelpKey:' #helpShowHelp |
820 | 499 |
#'indication:' #'showHelp:' |
753 | 500 |
) |
501 |
) nil |
|
502 |
nil |
|
503 |
) |
|
504 |
! |
|
505 |
||
506 |
menuSettings |
|
507 |
"this window spec was automatically generated by the ST/X MenuEditor" |
|
508 |
||
509 |
"do not manually edit this - the builder may not be able to |
|
510 |
handle the specification if its corrupted." |
|
511 |
||
512 |
" |
|
513 |
MenuEditor new openOnClass:ToolApplicationModel andSelector:#menuSettings |
|
514 |
(Menu new fromLiteralArrayEncoding:(ToolApplicationModel menuSettings)) startUp |
|
515 |
" |
|
516 |
||
517 |
<resource: #menu> |
|
518 |
||
519 |
^ |
|
520 |
||
521 |
#(#Menu |
|
522 |
||
523 |
#( |
|
524 |
#(#MenuItem |
|
792
b48118707d7b
all labels must be translated
Claus Gittinger <cg@exept.de>
parents:
791
diff
changeset
|
525 |
#'label:' 'Language...' |
b48118707d7b
all labels must be translated
Claus Gittinger <cg@exept.de>
parents:
791
diff
changeset
|
526 |
#'translateLabel:' true |
753 | 527 |
#'value:' #languageSetting |
528 |
) |
|
529 |
) nil |
|
530 |
nil |
|
531 |
) |
|
792
b48118707d7b
all labels must be translated
Claus Gittinger <cg@exept.de>
parents:
791
diff
changeset
|
532 |
|
b48118707d7b
all labels must be translated
Claus Gittinger <cg@exept.de>
parents:
791
diff
changeset
|
533 |
"Modified: / 30.1.1998 / 00:04:14 / cg" |
753 | 534 |
! ! |
535 |
||
536 |
!ToolApplicationModel class methodsFor:'resources'! |
|
537 |
||
803 | 538 |
desktopIcon |
539 |
||
540 |
|desktopIcon| |
|
541 |
desktopIcon := self stxIcon. |
|
804 | 542 |
^desktopIcon magnifiedBy: Display preferredIconSize/desktopIcon extent |
803 | 543 |
|
544 |
||
545 |
||
546 |
! |
|
547 |
||
753 | 548 |
downIcon |
778 | 549 |
"Generated by the Image Editor" |
550 |
" |
|
551 |
ImageEditor openOnClass:self andSelector:#downIcon |
|
552 |
" |
|
753 | 553 |
|
554 |
<resource: #image> |
|
778 | 555 |
|
556 |
^Icon |
|
557 |
constantNamed:#'ToolApplicationModel downIcon' |
|
558 |
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 | 559 |
|
560 |
downLeftIcon |
|
778 | 561 |
"Generated by the Image Editor" |
562 |
" |
|
563 |
ImageEditor openOnClass:self andSelector:#downLeftIcon |
|
564 |
" |
|
753 | 565 |
|
566 |
<resource: #image> |
|
778 | 567 |
|
568 |
^Icon |
|
569 |
constantNamed:#'ToolApplicationModel downLeftIcon' |
|
570 |
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 | 571 |
|
572 |
downRightIcon |
|
778 | 573 |
"Generated by the Image Editor" |
574 |
" |
|
575 |
ImageEditor openOnClass:self andSelector:#downRightIcon |
|
576 |
" |
|
753 | 577 |
|
578 |
<resource: #image> |
|
778 | 579 |
|
580 |
^Icon |
|
581 |
constantNamed:#'ToolApplicationModel downRightIcon' |
|
582 |
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 | 583 |
|
584 |
fileOutIcon |
|
778 | 585 |
"Generated by the Image Editor" |
586 |
" |
|
587 |
ImageEditor openOnClass:self andSelector:#fileOutIcon |
|
588 |
" |
|
753 | 589 |
|
590 |
<resource: #image> |
|
591 |
||
778 | 592 |
^Icon |
593 |
constantNamed:#'ToolApplicationModel fileOutIcon' |
|
594 |
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 | 595 |
|
596 |
leftDownIcon |
|
778 | 597 |
"Generated by the Image Editor" |
598 |
" |
|
599 |
ImageEditor openOnClass:self andSelector:#leftDownIcon |
|
600 |
" |
|
753 | 601 |
|
602 |
<resource: #image> |
|
778 | 603 |
|
604 |
^Icon |
|
605 |
constantNamed:#'ToolApplicationModel leftDownIcon' |
|
606 |
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 | 607 |
|
778 | 608 |
leftIcon |
609 |
"Generated by the Image Editor" |
|
610 |
" |
|
611 |
ImageEditor openOnClass:self andSelector:#leftIcon |
|
612 |
" |
|
753 | 613 |
|
614 |
<resource: #image> |
|
615 |
||
778 | 616 |
^Icon |
617 |
constantNamed:#'ToolApplicationModel leftIcon' |
|
618 |
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 | 619 |
|
778 | 620 |
leftUpIcon |
621 |
"Generated by the Image Editor" |
|
622 |
" |
|
623 |
ImageEditor openOnClass:self andSelector:#leftUpIcon |
|
624 |
" |
|
753 | 625 |
|
626 |
<resource: #image> |
|
772 | 627 |
|
778 | 628 |
^Icon |
629 |
constantNamed:#'ToolApplicationModel leftUpIcon' |
|
630 |
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 | 631 |
|
778 | 632 |
loadIcon |
633 |
"Generated by the Image Editor" |
|
634 |
" |
|
635 |
ImageEditor openOnClass:self andSelector:#loadIcon |
|
636 |
" |
|
753 | 637 |
|
638 |
<resource: #image> |
|
778 | 639 |
|
640 |
^Icon |
|
641 |
constantNamed:#'ToolApplicationModel loadIcon' |
|
642 |
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 | 643 |
|
803 | 644 |
menuIcon |
645 |
||
646 |
|menuIcon| |
|
647 |
menuIcon := self stxIcon. |
|
804 | 648 |
^menuIcon magnifiedBy: MenuPanel defaultFont height/menuIcon height |
803 | 649 |
! |
650 |
||
778 | 651 |
newIcon |
652 |
"Generated by the Image Editor" |
|
653 |
" |
|
654 |
ImageEditor openOnClass:self andSelector:#newIcon |
|
655 |
" |
|
756 | 656 |
|
657 |
<resource: #image> |
|
778 | 658 |
|
659 |
^Icon |
|
660 |
constantNamed:#'ToolApplicationModel newIcon' |
|
661 |
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 | 662 |
|
778 | 663 |
removeIcon |
664 |
"Generated by the Image Editor" |
|
665 |
" |
|
666 |
ImageEditor openOnClass:self andSelector:#removeIcon |
|
667 |
" |
|
753 | 668 |
|
669 |
<resource: #image> |
|
772 | 670 |
|
778 | 671 |
^Icon |
672 |
constantNamed:#'ToolApplicationModel removeIcon' |
|
673 |
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 | 674 |
|
778 | 675 |
rightIcon |
676 |
"Generated by the Image Editor" |
|
677 |
" |
|
678 |
ImageEditor openOnClass:self andSelector:#rightIcon |
|
679 |
" |
|
753 | 680 |
|
681 |
<resource: #image> |
|
778 | 682 |
|
683 |
^Icon |
|
684 |
constantNamed:#'ToolApplicationModel rightIcon' |
|
685 |
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 | 686 |
|
778 | 687 |
saveIcon |
688 |
"Generated by the Image Editor" |
|
689 |
" |
|
690 |
ImageEditor openOnClass:self andSelector:#saveIcon |
|
691 |
" |
|
753 | 692 |
|
693 |
<resource: #image> |
|
778 | 694 |
|
695 |
^Icon |
|
696 |
constantNamed:#'ToolApplicationModel saveIcon' |
|
779 | 697 |
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 | 698 |
! |
753 | 699 |
|
778 | 700 |
searchIcon |
701 |
"Generated by the Image Editor" |
|
702 |
" |
|
703 |
ImageEditor openOnClass:self andSelector:#searchIcon |
|
704 |
" |
|
753 | 705 |
|
706 |
<resource: #image> |
|
762 | 707 |
|
778 | 708 |
^Icon |
709 |
constantNamed:#'ToolApplicationModel searchIcon' |
|
710 |
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 | 711 |
|
782 | 712 |
startIcon |
713 |
"Generated by the Image Editor" |
|
714 |
" |
|
715 |
ImageEditor openOnClass:self andSelector:#startIcon |
|
716 |
" |
|
717 |
||
718 |
<resource: #image> |
|
719 |
||
720 |
^Icon |
|
721 |
constantNamed:#'ToolApplicationModel startIcon' |
|
722 |
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] |
|
723 |
! |
|
724 |
||
778 | 725 |
stxIcon |
726 |
"Generated by the Image Editor" |
|
727 |
" |
|
728 |
ImageEditor openOnClass:self andSelector:#stxIcon |
|
729 |
" |
|
772 | 730 |
|
731 |
<resource: #image> |
|
753 | 732 |
|
778 | 733 |
^Icon |
734 |
constantNamed:#'ToolApplicationModel stxIcon' |
|
803 | 735 |
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] |
736 |
! |
|
753 | 737 |
|
738 |
upIcon |
|
778 | 739 |
"Generated by the Image Editor" |
740 |
" |
|
741 |
ImageEditor openOnClass:self andSelector:#upIcon |
|
742 |
" |
|
753 | 743 |
|
744 |
<resource: #image> |
|
778 | 745 |
|
746 |
^Icon |
|
747 |
constantNamed:#'ToolApplicationModel upIcon' |
|
748 |
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 | 749 |
|
750 |
upRightIcon |
|
778 | 751 |
"Generated by the Image Editor" |
752 |
" |
|
753 |
ImageEditor openOnClass:self andSelector:#upRightIcon |
|
754 |
" |
|
753 | 755 |
|
756 |
<resource: #image> |
|
778 | 757 |
|
758 |
^Icon |
|
759 |
constantNamed:#'ToolApplicationModel upRightIcon' |
|
760 |
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 | 761 |
|
782 | 762 |
!ToolApplicationModel class methodsFor:'startup / release'! |
753 | 763 |
|
782 | 764 |
preSnapshot |
753 | 765 |
|
782 | 766 |
clipboard := nil |
767 |
||
753 | 768 |
! |
769 |
||
782 | 770 |
uninitialize |
760 | 771 |
|
782 | 772 |
showHelp := history := clipboard := nil |
753 | 773 |
! ! |
774 |
||
782 | 775 |
!ToolApplicationModel methodsFor:'aspects'! |
776 |
||
777 |
valueOfEnablingCommitButtons |
|
753 | 778 |
|
782 | 779 |
|holder| |
780 |
(holder := builder bindingAt:#valueOfEnablingCommitButtons) isNil ifTrue:[ |
|
781 |
builder aspectAt:#valueOfEnablingCommitButtons put:(holder := false asValue). |
|
782 |
]. |
|
783 |
^ holder |
|
753 | 784 |
|
782 | 785 |
! |
786 |
||
787 |
valueOfHavingClipboard |
|
753 | 788 |
|
782 | 789 |
|holder| |
790 |
(holder := builder bindingAt:#valueOfHavingClipboard) isNil ifTrue:[ |
|
791 |
builder aspectAt:#valueOfHavingClipboard put:(holder := self class clipboard notNil asValue). |
|
792 |
]. |
|
793 |
^ holder |
|
753 | 794 |
|
782 | 795 |
! |
796 |
||
803 | 797 |
valueOfHavingTutorial |
798 |
||
799 |
|holder| |
|
800 |
(holder := builder bindingAt:#valueOfHavingTutorial) isNil ifTrue:[ |
|
820 | 801 |
builder aspectAt:#valueOfHavingTutorial put:(holder := (self class implements: #openTutorial) asValue). |
803 | 802 |
]. |
803 |
^ holder |
|
804 |
||
805 |
! |
|
806 |
||
782 | 807 |
valueOfInfoLabel |
808 |
||
809 |
|holder| |
|
810 |
(holder := builder bindingAt:#valueOfInfoLabel) isNil ifTrue:[ |
|
811 |
builder aspectAt:#valueOfInfoLabel put:(holder := ValueHolder new). |
|
812 |
]. |
|
813 |
^ holder |
|
753 | 814 |
|
782 | 815 |
! |
816 |
||
817 |
valueOfTimeLabel |
|
753 | 818 |
|
782 | 819 |
|holder| |
820 |
(holder := builder bindingAt:#valueOfTimeLabel) isNil ifTrue:[ |
|
821 |
builder aspectAt:#valueOfTimeLabel put:(holder := ValueHolder new). |
|
822 |
]. |
|
823 |
^ holder |
|
753 | 824 |
|
825 |
! ! |
|
826 |
||
782 | 827 |
!ToolApplicationModel methodsFor:'clipboard'! |
753 | 828 |
|
782 | 829 |
clipboard: anEditObject |
753 | 830 |
|
782 | 831 |
self class clipboard: anEditObject. |
753 | 832 |
|
782 | 833 |
self valueOfHavingClipboard value: anEditObject notNil |
834 |
! ! |
|
835 |
||
836 |
!ToolApplicationModel methodsFor:'help'! |
|
753 | 837 |
|
762 | 838 |
defaultInfoLabel |
839 |
||
840 |
^'' |
|
841 |
! |
|
842 |
||
753 | 843 |
openAbout |
844 |
"show an about box" |
|
845 |
||
846 |
|box| |
|
847 |
||
848 |
box := AboutBox new. |
|
849 |
box autoHideAfter:10 with:[]. |
|
850 |
box showAtCenter |
|
851 |
||
852 |
! |
|
853 |
||
854 |
openAboutThisApplication |
|
855 |
"show an about this application box" |
|
856 |
||
857 |
|rev box| |
|
858 |
rev := ''. |
|
859 |
self class revision notNil ifTrue: [rev := ' (rev: ', self class revision printString, ')']. |
|
860 |
box := AboutBox title: |
|
800 | 861 |
'\The application\\' withCRs |
862 |
, (Text string: self class name emphasis: #bold), rev |
|
863 |
, '\\has been designed and implemented by \' withCRs |
|
864 |
, ((self class authorLinesForAboutBox collect:[:l | ' ' , l]) asStringWith:$\) withCRs |
|
865 |
, '\\' withCRs. |
|
753 | 866 |
|
867 |
box label:'About This Application'. |
|
868 |
box autoHideAfter:10 with:[]. |
|
869 |
box showAtCenter. |
|
800 | 870 |
|
871 |
"Modified: / 1.2.1998 / 15:59:58 / cg" |
|
753 | 872 |
! |
873 |
||
803 | 874 |
openTutorial |
875 |
||
876 |
self openTutorial: 'doc/online/english/getstart/tutorial.html' |
|
877 |
! |
|
878 |
||
879 |
openTutorial: aHTMLFilename |
|
753 | 880 |
|
881 |
|dir| |
|
803 | 882 |
((dir := Smalltalk getSystemFileName: aHTMLFilename) asFilename exists) |
753 | 883 |
ifTrue: |
884 |
[ |
|
885 |
^HTMLDocumentView openFullOnFile: dir |
|
886 |
] |
|
762 | 887 |
! |
888 |
||
782 | 889 |
showHelp |
890 |
"Answer whether showing help is turned on/off" |
|
891 |
||
783 | 892 |
|currentActiveHelp| |
893 |
currentActiveHelp := ActiveHelp currentHelpListener. |
|
894 |
||
895 |
^self class showHelp |
|
896 |
and: [currentActiveHelp notNil and: [currentActiveHelp interestedIn: self builder window]] |
|
782 | 897 |
! |
898 |
||
899 |
showHelp: aValue |
|
900 |
"toggle showing help" |
|
901 |
||
902 |
(self class showHelp: aValue) |
|
903 |
ifTrue: [ActiveHelp startFor: self] |
|
904 |
ifFalse: [ActiveHelp stopFor: self. self valueOfInfoLabel value: self defaultInfoLabel] |
|
905 |
! |
|
906 |
||
762 | 907 |
showHelp:aHelpText for:view |
908 |
"display aHelpText in the info label or if present detour to masterApplication." |
|
909 |
||
782 | 910 |
self showHelp ifFalse: [^true]. |
762 | 911 |
self masterApplication notNil |
912 |
ifTrue: |
|
913 |
[ |
|
914 |
^masterApplication showHelp: aHelpText for:view |
|
915 |
] |
|
916 |
ifFalse: |
|
917 |
[ |
|
918 |
aHelpText isNil |
|
919 |
ifTrue: [self valueOfInfoLabel value: self defaultInfoLabel] |
|
920 |
ifFalse: [self valueOfInfoLabel value: (aHelpText asString printString upTo: Character cr)]. |
|
921 |
||
922 |
^true |
|
923 |
] |
|
924 |
! ! |
|
925 |
||
753 | 926 |
!ToolApplicationModel methodsFor:'history'! |
927 |
||
928 |
addToHistory: aHistoryEntry |
|
929 |
||
782 | 930 |
aHistoryEntry key size = 0 ifTrue: [^nil]. |
753 | 931 |
self history remove: (self history detect: [:histEntry| histEntry key = aHistoryEntry key] ifNone: nil) ifAbsent: nil. |
932 |
self history addFirst: aHistoryEntry. |
|
933 |
[self history size > self class historyMaxSize] whileTrue: [self history removeLast] |
|
934 |
! |
|
935 |
||
936 |
emptyHistory |
|
937 |
||
938 |
^self history removeAll |
|
939 |
! |
|
940 |
||
941 |
history |
|
942 |
||
943 |
^self class getHistory |
|
944 |
! |
|
945 |
||
946 |
menuHistory |
|
947 |
||
948 |
|menu a| |
|
949 |
menu := Menu new receiver: self. |
|
950 |
(self history collect: [:histEntry| histEntry value]) asSet asOrderedCollection do: |
|
951 |
[:historyEntryType| |
|
803 | 952 |
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 | 953 |
]. |
803 | 954 |
menu addItem: (MenuItem new label: 'Empty History'; value: #emptyHistory; activeHelpKey: #historyEmptyMenu). |
753 | 955 |
|
956 |
^menu |
|
957 |
! |
|
958 |
||
959 |
removeFromHistory: aHistoryEntry |
|
960 |
||
961 |
self history remove: (self history detect: [:histEntry| histEntry key = aHistoryEntry key] ifNone: nil) ifAbsent: nil. |
|
962 |
[self history size > self class historyMaxSize] whileTrue: [self history removeLast] |
|
963 |
! ! |
|
964 |
||
782 | 965 |
!ToolApplicationModel methodsFor:'queries'! |
966 |
||
967 |
preferredExtent |
|
968 |
"preferred extent of my window; top/main menu and top toolbar (named by 'menuToolbarView') |
|
969 |
will be considered" |
|
970 |
||
971 |
|window menu menuToolbarView preferredExtentOfWindow| |
|
972 |
||
973 |
window := self builder window. |
|
974 |
menu := window subViews first. |
|
975 |
menuToolbarView := builder componentAt: #menuToolbarView. |
|
976 |
||
977 |
preferredExtentOfWindow := window extent. |
|
978 |
menu class = MenuPanel ifTrue: [preferredExtentOfWindow := preferredExtentOfWindow max: menu preferredExtent]. |
|
979 |
menuToolbarView notNil ifTrue: [preferredExtentOfWindow := preferredExtentOfWindow max: menuToolbarView preferredExtent]. |
|
980 |
||
981 |
^window minExtent max: (preferredExtentOfWindow min: window maxExtent) |
|
982 |
! ! |
|
983 |
||
753 | 984 |
!ToolApplicationModel methodsFor:'startup / release'! |
985 |
||
986 |
close |
|
987 |
||
756 | 988 |
self uninitialize. |
989 |
||
753 | 990 |
super close |
991 |
! |
|
992 |
||
993 |
closeRequest |
|
994 |
||
756 | 995 |
self uninitialize. |
996 |
||
753 | 997 |
super closeRequest |
998 |
! |
|
999 |
||
791 | 1000 |
openInterface:aSymbol |
753 | 1001 |
|
791 | 1002 |
self allButOpenInterface:aSymbol. |
802 | 1003 |
|
1004 |
builder window extent: self preferredExtent. |
|
1005 |
builder window label: self class label. |
|
791 | 1006 |
self openWindow. |
802 | 1007 |
|
791 | 1008 |
^builder |
753 | 1009 |
! |
1010 |
||
790 | 1011 |
postOpenWith:aBuilder |
1012 |
||
1013 |
super postOpenWith:aBuilder. |
|
1014 |
||
1015 |
timeBlock := [self showTime]. |
|
791 | 1016 |
self showTime. |
1017 |
self class showHelp ifTrue: [ActiveHelp startFor: self]. |
|
1018 |
self valueOfInfoLabel value: self defaultInfoLabel. |
|
790 | 1019 |
! |
1020 |
||
753 | 1021 |
reOpen |
1022 |
||
1023 |
self close. |
|
1024 |
||
1025 |
self class open |
|
1026 |
! |
|
1027 |
||
760 | 1028 |
removeAllTemporalViews |
1029 |
||
1030 |
self builder namedComponents keys copy do: |
|
1031 |
[:comp| |
|
1032 |
(comp includesString: '_Temporal') ifTrue: [self builder namedComponents removeKey: comp] |
|
1033 |
] |
|
1034 |
! |
|
1035 |
||
756 | 1036 |
uninitialize |
1037 |
||
782 | 1038 |
self showHelp ifTrue: [ActiveHelp stopFor: self]. |
756 | 1039 |
Processor removeTimedBlock:timeBlock. |
1040 |
timeBlock := nil. |
|
753 | 1041 |
! ! |
1042 |
||
1043 |
!ToolApplicationModel methodsFor:'window events'! |
|
1044 |
||
1045 |
showTime |
|
1046 |
||
1047 |
|hours minutes suffix| |
|
1048 |
suffix := ' am '. |
|
1049 |
(hours := Time now hours) > 12 ifTrue: [hours := hours - 12]. |
|
1050 |
Time now hours >= 12 ifTrue: [suffix := ' pm ']. |
|
1051 |
(minutes := Time now minutes printString) size = 1 ifTrue: [minutes := '0', minutes printString]. |
|
1052 |
self valueOfTimeLabel value: hours printString, ':', minutes, suffix. |
|
790 | 1053 |
Processor removeTimedBlock: timeBlock. |
753 | 1054 |
Processor addTimedBlock: timeBlock afterSeconds: 1 |
1055 |
||
1056 |
! ! |
|
1057 |
||
1058 |
!ToolApplicationModel class methodsFor:'documentation'! |
|
1059 |
||
1060 |
version |
|
820 | 1061 |
^ '$Header: /cvs/stx/stx/libview2/ToolApplicationModel.st,v 1.32 1998-02-03 21:11:19 tz Exp $' |
753 | 1062 |
! ! |