author | Claus Gittinger <cg@exept.de> |
Fri, 14 Aug 1998 17:38:01 +0200 | |
changeset 1043 | 32cd5ccbd94f |
parent 1040 | 4a395c06a985 |
child 1051 | 65dfbf6481b5 |
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:'' |
|
834 | 19 |
category:'Interface-Framework' |
753 | 20 |
! |
21 |
||
1018
7222534cb3dc
part of the activeHelp framework moved to ApplicationModel.
Claus Gittinger <cg@exept.de>
parents:
1016
diff
changeset
|
22 |
ToolApplicationModel class instanceVariableNames:'history clipboard settings showingHelp' |
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 |
" |
|
869 | 53 |
Framework class for tool applications. |
54 |
Provides hooks for history management, |
|
782 | 55 |
showing help texts, about menu, help menu etc. |
753 | 56 |
|
57 |
[author:] |
|
876 | 58 |
Thomas Zwick, eXept Software AG |
753 | 59 |
" |
60 |
! ! |
|
61 |
||
62 |
!ToolApplicationModel class methodsFor:'accessing'! |
|
63 |
||
800 | 64 |
authorLinesForAboutBox |
907 | 65 |
"extracts the author(s) from the documentation method." |
800 | 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 |
|
1018
7222534cb3dc
part of the activeHelp framework moved to ApplicationModel.
Claus Gittinger <cg@exept.de>
parents:
1016
diff
changeset
|
99 |
"returns the label for the tool instances of this class; |
907 | 100 |
extracted from the class name; |
101 |
can be redefined in subclasses" |
|
753 | 102 |
|
103 |
|label| |
|
104 |
label := ''. |
|
105 |
self name do: |
|
106 |
[:c| |
|
107 |
c isUppercase ifTrue: [label := label, $ ]. |
|
108 |
label := label, c |
|
109 |
]. |
|
110 |
^label trimBlanks |
|
1018
7222534cb3dc
part of the activeHelp framework moved to ApplicationModel.
Claus Gittinger <cg@exept.de>
parents:
1016
diff
changeset
|
111 |
|
7222534cb3dc
part of the activeHelp framework moved to ApplicationModel.
Claus Gittinger <cg@exept.de>
parents:
1016
diff
changeset
|
112 |
"Modified: / 31.7.1998 / 18:04:18 / cg" |
782 | 113 |
! |
114 |
||
850 | 115 |
settings |
907 | 116 |
"returns the settings dictionary" |
850 | 117 |
|
872 | 118 |
settings isNil ifTrue: [settings := IdentityDictionary new]. |
119 |
^settings |
|
850 | 120 |
! |
121 |
||
1018
7222534cb3dc
part of the activeHelp framework moved to ApplicationModel.
Claus Gittinger <cg@exept.de>
parents:
1016
diff
changeset
|
122 |
showingHelp |
7222534cb3dc
part of the activeHelp framework moved to ApplicationModel.
Claus Gittinger <cg@exept.de>
parents:
1016
diff
changeset
|
123 |
"returns true if active help is turned on for instances of this class" |
782 | 124 |
|
1018
7222534cb3dc
part of the activeHelp framework moved to ApplicationModel.
Claus Gittinger <cg@exept.de>
parents:
1016
diff
changeset
|
125 |
showingHelp isNil ifTrue: [showingHelp := true]. |
7222534cb3dc
part of the activeHelp framework moved to ApplicationModel.
Claus Gittinger <cg@exept.de>
parents:
1016
diff
changeset
|
126 |
^showingHelp |
7222534cb3dc
part of the activeHelp framework moved to ApplicationModel.
Claus Gittinger <cg@exept.de>
parents:
1016
diff
changeset
|
127 |
|
7222534cb3dc
part of the activeHelp framework moved to ApplicationModel.
Claus Gittinger <cg@exept.de>
parents:
1016
diff
changeset
|
128 |
"Created: / 31.7.1998 / 18:03:38 / cg" |
7222534cb3dc
part of the activeHelp framework moved to ApplicationModel.
Claus Gittinger <cg@exept.de>
parents:
1016
diff
changeset
|
129 |
"Modified: / 31.7.1998 / 18:16:55 / cg" |
782 | 130 |
! |
131 |
||
1018
7222534cb3dc
part of the activeHelp framework moved to ApplicationModel.
Claus Gittinger <cg@exept.de>
parents:
1016
diff
changeset
|
132 |
showingHelp: aBoolean |
7222534cb3dc
part of the activeHelp framework moved to ApplicationModel.
Claus Gittinger <cg@exept.de>
parents:
1016
diff
changeset
|
133 |
"enable/disable active help for instances of this class" |
782 | 134 |
|
1018
7222534cb3dc
part of the activeHelp framework moved to ApplicationModel.
Claus Gittinger <cg@exept.de>
parents:
1016
diff
changeset
|
135 |
^ showingHelp := aBoolean |
7222534cb3dc
part of the activeHelp framework moved to ApplicationModel.
Claus Gittinger <cg@exept.de>
parents:
1016
diff
changeset
|
136 |
|
7222534cb3dc
part of the activeHelp framework moved to ApplicationModel.
Claus Gittinger <cg@exept.de>
parents:
1016
diff
changeset
|
137 |
"Modified: / 31.7.1998 / 18:17:14 / cg" |
753 | 138 |
! ! |
139 |
||
756 | 140 |
!ToolApplicationModel class methodsFor:'clipboard'! |
141 |
||
142 |
clipboard |
|
907 | 143 |
"returns the clipboard of this tool class" |
756 | 144 |
|
145 |
^clipboard |
|
146 |
! |
|
147 |
||
148 |
clipboard: anEditObject |
|
907 | 149 |
"sets the clipboard for this tool class" |
756 | 150 |
|
151 |
clipboard := anEditObject |
|
152 |
! ! |
|
153 |
||
1043
32cd5ccbd94f
made openAboutSTX a class method for sharability.
Claus Gittinger <cg@exept.de>
parents:
1040
diff
changeset
|
154 |
!ToolApplicationModel class methodsFor:'help'! |
32cd5ccbd94f
made openAboutSTX a class method for sharability.
Claus Gittinger <cg@exept.de>
parents:
1040
diff
changeset
|
155 |
|
32cd5ccbd94f
made openAboutSTX a class method for sharability.
Claus Gittinger <cg@exept.de>
parents:
1040
diff
changeset
|
156 |
openAboutSTX |
32cd5ccbd94f
made openAboutSTX a class method for sharability.
Claus Gittinger <cg@exept.de>
parents:
1040
diff
changeset
|
157 |
"opens an about box (on ST/X)" |
32cd5ccbd94f
made openAboutSTX a class method for sharability.
Claus Gittinger <cg@exept.de>
parents:
1040
diff
changeset
|
158 |
|
32cd5ccbd94f
made openAboutSTX a class method for sharability.
Claus Gittinger <cg@exept.de>
parents:
1040
diff
changeset
|
159 |
|box| |
32cd5ccbd94f
made openAboutSTX a class method for sharability.
Claus Gittinger <cg@exept.de>
parents:
1040
diff
changeset
|
160 |
|
32cd5ccbd94f
made openAboutSTX a class method for sharability.
Claus Gittinger <cg@exept.de>
parents:
1040
diff
changeset
|
161 |
AboutBox isNil ifTrue:[ |
32cd5ccbd94f
made openAboutSTX a class method for sharability.
Claus Gittinger <cg@exept.de>
parents:
1040
diff
changeset
|
162 |
"/ this handles bad installations of ST/X, |
32cd5ccbd94f
made openAboutSTX a class method for sharability.
Claus Gittinger <cg@exept.de>
parents:
1040
diff
changeset
|
163 |
"/ where the AboutBox is missing. |
32cd5ccbd94f
made openAboutSTX a class method for sharability.
Claus Gittinger <cg@exept.de>
parents:
1040
diff
changeset
|
164 |
"/ (May vanish in the future) |
32cd5ccbd94f
made openAboutSTX a class method for sharability.
Claus Gittinger <cg@exept.de>
parents:
1040
diff
changeset
|
165 |
^ self information:('Smalltalk/X rev.' , Smalltalk versionString) |
32cd5ccbd94f
made openAboutSTX a class method for sharability.
Claus Gittinger <cg@exept.de>
parents:
1040
diff
changeset
|
166 |
]. |
32cd5ccbd94f
made openAboutSTX a class method for sharability.
Claus Gittinger <cg@exept.de>
parents:
1040
diff
changeset
|
167 |
|
32cd5ccbd94f
made openAboutSTX a class method for sharability.
Claus Gittinger <cg@exept.de>
parents:
1040
diff
changeset
|
168 |
box := AboutBox new. |
32cd5ccbd94f
made openAboutSTX a class method for sharability.
Claus Gittinger <cg@exept.de>
parents:
1040
diff
changeset
|
169 |
box autoHideAfter:10 with:[]. |
32cd5ccbd94f
made openAboutSTX a class method for sharability.
Claus Gittinger <cg@exept.de>
parents:
1040
diff
changeset
|
170 |
box showAtPointer |
32cd5ccbd94f
made openAboutSTX a class method for sharability.
Claus Gittinger <cg@exept.de>
parents:
1040
diff
changeset
|
171 |
|
32cd5ccbd94f
made openAboutSTX a class method for sharability.
Claus Gittinger <cg@exept.de>
parents:
1040
diff
changeset
|
172 |
"Modified: / 14.8.1998 / 13:03:58 / cg" |
32cd5ccbd94f
made openAboutSTX a class method for sharability.
Claus Gittinger <cg@exept.de>
parents:
1040
diff
changeset
|
173 |
"Created: / 14.8.1998 / 13:17:43 / cg" |
32cd5ccbd94f
made openAboutSTX a class method for sharability.
Claus Gittinger <cg@exept.de>
parents:
1040
diff
changeset
|
174 |
! ! |
32cd5ccbd94f
made openAboutSTX a class method for sharability.
Claus Gittinger <cg@exept.de>
parents:
1040
diff
changeset
|
175 |
|
762 | 176 |
!ToolApplicationModel class methodsFor:'help specs'! |
177 |
||
178 |
helpSpec |
|
869 | 179 |
"This resource specification was automatically generated |
180 |
by the UIHelpTool of ST/X." |
|
181 |
||
182 |
"Do not manually edit this!! If it is corrupted, |
|
183 |
the UIHelpTool may not be able to read the specification." |
|
762 | 184 |
|
185 |
" |
|
869 | 186 |
UIHelpTool openOnClass:ToolApplicationModel |
762 | 187 |
" |
188 |
||
869 | 189 |
<resource: #help> |
190 |
||
191 |
^super helpSpec addPairsFrom:#( |
|
762 | 192 |
|
823 | 193 |
#about |
834 | 194 |
'About functions.' |
823 | 195 |
|
762 | 196 |
#aboutSTX |
910 | 197 |
'Open an InfoBox showing details of the running ST/X.' |
762 | 198 |
|
199 |
#aboutThisAppliaction |
|
910 | 200 |
'Open an InfoBox about that applications release and its author.' |
762 | 201 |
|
823 | 202 |
#add |
834 | 203 |
'Add functions.' |
823 | 204 |
|
205 |
#commitCancel |
|
910 | 206 |
'Cancels changes.' |
823 | 207 |
|
208 |
#commitOK |
|
910 | 209 |
'Commit changes.' |
823 | 210 |
|
211 |
#edit |
|
834 | 212 |
'Edit functions.' |
823 | 213 |
|
214 |
#editCopy |
|
910 | 215 |
'Copy the selected item(s) to the clipboard.' |
762 | 216 |
|
782 | 217 |
#editCut |
910 | 218 |
'Move the selected item(s) to the clipboard.' |
853 | 219 |
|
220 |
#editDelete |
|
910 | 221 |
'Delete the selected item(s).' |
782 | 222 |
|
823 | 223 |
#editMoveDown |
910 | 224 |
'Moves the selected item one step down in the order list.' |
823 | 225 |
|
226 |
#editMoveIn |
|
834 | 227 |
'Moves the selected item into next item as child item.' |
823 | 228 |
|
229 |
#editMoveOut |
|
910 | 230 |
'Moves the selected item out of its parent item.' |
823 | 231 |
|
232 |
#editMoveUp |
|
910 | 233 |
'Moves the selected item one step up in the order list.' |
782 | 234 |
|
235 |
#editPaste |
|
910 | 236 |
'Paste from the clipboard.' |
782 | 237 |
|
238 |
#editUndo |
|
910 | 239 |
'Undo the last action.' |
782 | 240 |
|
823 | 241 |
#file |
834 | 242 |
'File functions.' |
805 | 243 |
|
823 | 244 |
#fileBrowseClass |
1018
7222534cb3dc
part of the activeHelp framework moved to ApplicationModel.
Claus Gittinger <cg@exept.de>
parents:
1016
diff
changeset
|
245 |
'Open a System Browser on the current class.' |
805 | 246 |
|
823 | 247 |
#fileDefineClass |
910 | 248 |
'Open a dialog to define the current class.' |
805 | 249 |
|
250 |
#fileDefineClassAndSelector |
|
910 | 251 |
'Open a dialog to define the current class and selector.' |
805 | 252 |
|
823 | 253 |
#fileExit |
910 | 254 |
'Exit this application.' |
823 | 255 |
|
922 | 256 |
#generate |
257 |
'Code generation.' |
|
258 |
||
823 | 259 |
#help |
834 | 260 |
'Help functions.' |
823 | 261 |
|
876 | 262 |
#helpHelpTool |
1018
7222534cb3dc
part of the activeHelp framework moved to ApplicationModel.
Claus Gittinger <cg@exept.de>
parents:
1016
diff
changeset
|
263 |
'Show the Help Tools documentation.' |
876 | 264 |
|
823 | 265 |
#helpShowHelp |
910 | 266 |
'Toggle display of help texts.' |
823 | 267 |
|
268 |
#helpTutorial |
|
1018
7222534cb3dc
part of the activeHelp framework moved to ApplicationModel.
Claus Gittinger <cg@exept.de>
parents:
1016
diff
changeset
|
269 |
'Show this applications documentation.' |
823 | 270 |
|
271 |
#history |
|
834 | 272 |
'History functions.' |
803 | 273 |
|
274 |
#historyEmptyMenu |
|
1016 | 275 |
'Clear the history.' |
803 | 276 |
|
823 | 277 |
#historyMenuItem |
1016 | 278 |
'Switch to that item.' |
762 | 279 |
|
893 | 280 |
#settings |
281 |
'Settings functions.' |
|
282 |
||
823 | 283 |
#test |
834 | 284 |
'Test functions.' |
762 | 285 |
|
286 |
) |
|
1015 | 287 |
|
1018
7222534cb3dc
part of the activeHelp framework moved to ApplicationModel.
Claus Gittinger <cg@exept.de>
parents:
1016
diff
changeset
|
288 |
"Modified: / 31.7.1998 / 19:28:14 / cg" |
762 | 289 |
! ! |
290 |
||
753 | 291 |
!ToolApplicationModel class methodsFor:'history'! |
292 |
||
293 |
getHistory |
|
907 | 294 |
"returns the history for this tool class" |
753 | 295 |
|
761
cc0404f8aec6
#getHistory changed because here #? doesn't work correctly
tz
parents:
760
diff
changeset
|
296 |
history isNil ifTrue: [history := OrderedCollection new]. |
cc0404f8aec6
#getHistory changed because here #? doesn't work correctly
tz
parents:
760
diff
changeset
|
297 |
^history |
753 | 298 |
|
299 |
! |
|
300 |
||
301 |
historyMaxSize |
|
907 | 302 |
"returns the maximum size for the history of this tool class" |
753 | 303 |
|
304 |
^10 |
|
305 |
||
306 |
! ! |
|
307 |
||
869 | 308 |
!ToolApplicationModel class methodsFor:'image specs'! |
309 |
||
310 |
desktopIcon |
|
907 | 311 |
"returns the icon used for the desktop" |
869 | 312 |
|
313 |
^Icon |
|
314 |
constantNamed:#'ToolApplicationModel desktopIcon' |
|
315 |
ifAbsentPut: |
|
316 |
[ |
|
317 |
|desktopIcon| |
|
990 | 318 |
desktopIcon := Icon stxIcon. |
869 | 319 |
desktopIcon magnifiedBy: Display preferredIconSize/desktopIcon extent |
320 |
] |
|
321 |
||
322 |
||
323 |
||
324 |
||
325 |
! |
|
326 |
||
327 |
menuIcon |
|
907 | 328 |
"returns the icon used for the menu bar" |
869 | 329 |
|
330 |
^Icon |
|
331 |
constantNamed:#'ToolApplicationModel menuIcon' |
|
332 |
ifAbsentPut: |
|
333 |
[ |
|
334 |
|menuIcon| |
|
990 | 335 |
menuIcon := Icon stxIcon. |
869 | 336 |
menuIcon magnifiedBy: MenuPanel defaultFont height/menuIcon height |
337 |
] |
|
987 | 338 |
! ! |
869 | 339 |
|
753 | 340 |
!ToolApplicationModel class methodsFor:'interface specs'! |
341 |
||
797 | 342 |
windowSpecForCommit |
869 | 343 |
"This resource specification was automatically generated |
344 |
by the UIPainter of ST/X." |
|
345 |
||
346 |
"Do not manually edit this!! If it is corrupted, |
|
347 |
the UIPainter may not be able to read the specification." |
|
348 |
||
349 |
" |
|
350 |
UIPainter new openOnClass:ToolApplicationModel andSelector:#windowSpecForCommit |
|
351 |
ToolApplicationModel new openInterface:#windowSpecForCommit |
|
352 |
" |
|
797 | 353 |
|
354 |
<resource: #canvas> |
|
355 |
||
356 |
^ |
|
859 | 357 |
|
797 | 358 |
#(#FullSpec |
859 | 359 |
#window: |
797 | 360 |
#(#WindowSpec |
859 | 361 |
#name: 'Commit Buttons' |
869 | 362 |
#layout: #(#LayoutFrame 344 0 371 0 643 0 430 0) |
859 | 363 |
#label: 'Commit Buttons' |
364 |
#min: #(#Point 100 22) |
|
365 |
#max: #(#Point 1152 900) |
|
869 | 366 |
#bounds: #(#Rectangle 344 371 644 431) |
859 | 367 |
#usePreferredExtent: false |
797 | 368 |
) |
859 | 369 |
#component: |
797 | 370 |
#(#SpecCollection |
859 | 371 |
#collection: |
797 | 372 |
#( |
373 |
#(#ActionButtonSpec |
|
859 | 374 |
#name: 'cancelButton' |
375 |
#layout: #(#LayoutFrame 5 0 0 0 -2 0.5 0 1) |
|
376 |
#activeHelpKey: #commitCancel |
|
377 |
#label: 'Cancel' |
|
927 | 378 |
#translateLabel: true |
859 | 379 |
#tabable: true |
380 |
#model: #cancel |
|
381 |
#enableChannel: #valueOfEnablingCommitButtons |
|
797 | 382 |
) |
383 |
#(#ActionButtonSpec |
|
859 | 384 |
#name: 'okButton' |
385 |
#layout: #(#LayoutFrame 2 0.5 0 0.0 -5 1 0 1.0) |
|
386 |
#activeHelpKey: #commitOK |
|
387 |
#label: 'OK' |
|
927 | 388 |
#translateLabel: true |
859 | 389 |
#tabable: true |
390 |
#model: #accept |
|
391 |
#enableChannel: #valueOfEnablingCommitButtons |
|
797 | 392 |
) |
393 |
) |
|
394 |
) |
|
395 |
) |
|
927 | 396 |
|
397 |
"Modified: / 20.5.1998 / 03:31:54 / cg" |
|
797 | 398 |
! |
399 |
||
400 |
windowSpecForCommitWithoutChannels |
|
869 | 401 |
"This resource specification was automatically generated |
402 |
by the UIPainter of ST/X." |
|
403 |
||
404 |
"Do not manually edit this!! If it is corrupted, |
|
405 |
the UIPainter may not be able to read the specification." |
|
406 |
||
407 |
" |
|
408 |
UIPainter new openOnClass:ToolApplicationModel andSelector:#windowSpecForCommitWithoutChannels |
|
409 |
ToolApplicationModel new openInterface:#windowSpecForCommitWithoutChannels |
|
410 |
" |
|
797 | 411 |
|
412 |
<resource: #canvas> |
|
413 |
||
414 |
^ |
|
859 | 415 |
|
797 | 416 |
#(#FullSpec |
859 | 417 |
#window: |
797 | 418 |
#(#WindowSpec |
859 | 419 |
#name: 'Commit Buttons Without Channels' |
869 | 420 |
#layout: #(#LayoutFrame 500 0 326 0 799 0 385 0) |
859 | 421 |
#label: 'Commit Buttons Without Channels' |
422 |
#min: #(#Point 100 22) |
|
423 |
#max: #(#Point 1152 900) |
|
869 | 424 |
#bounds: #(#Rectangle 500 326 800 386) |
859 | 425 |
#usePreferredExtent: false |
797 | 426 |
) |
859 | 427 |
#component: |
797 | 428 |
#(#SpecCollection |
859 | 429 |
#collection: |
797 | 430 |
#( |
431 |
#(#ActionButtonSpec |
|
859 | 432 |
#name: 'cancelButton' |
433 |
#layout: #(#LayoutFrame 5 0 0 0 -2 0.5 0 1) |
|
434 |
#activeHelpKey: #commitCancel |
|
435 |
#label: 'Cancel' |
|
927 | 436 |
#translateLabel: true |
859 | 437 |
#tabable: true |
438 |
#model: #cancel |
|
797 | 439 |
) |
440 |
#(#ActionButtonSpec |
|
859 | 441 |
#name: 'okButton' |
442 |
#layout: #(#LayoutFrame 2 0.5 0 0.0 -5 1 0 1.0) |
|
443 |
#activeHelpKey: #commitOK |
|
444 |
#label: 'OK' |
|
927 | 445 |
#translateLabel: true |
859 | 446 |
#tabable: true |
447 |
#model: #accept |
|
797 | 448 |
) |
449 |
) |
|
450 |
) |
|
451 |
) |
|
927 | 452 |
|
453 |
"Modified: / 20.5.1998 / 03:30:09 / cg" |
|
797 | 454 |
! |
455 |
||
456 |
windowSpecForInfoBar |
|
869 | 457 |
"This resource specification was automatically generated |
458 |
by the UIPainter of ST/X." |
|
459 |
||
460 |
"Do not manually edit this!! If it is corrupted, |
|
461 |
the UIPainter may not be able to read the specification." |
|
462 |
||
463 |
" |
|
464 |
UIPainter new openOnClass:ToolApplicationModel andSelector:#windowSpecForInfoBar |
|
465 |
ToolApplicationModel new openInterface:#windowSpecForInfoBar |
|
466 |
" |
|
797 | 467 |
|
468 |
<resource: #canvas> |
|
469 |
||
470 |
^ |
|
859 | 471 |
|
797 | 472 |
#(#FullSpec |
859 | 473 |
#window: |
797 | 474 |
#(#WindowSpec |
859 | 475 |
#name: 'Info Bar' |
869 | 476 |
#layout: #(#LayoutFrame 233 0 218 0 732 0 563 0) |
859 | 477 |
#label: 'Info Bar' |
478 |
#min: #(#Point 400 320) |
|
479 |
#max: #(#Point 1152 900) |
|
869 | 480 |
#bounds: #(#Rectangle 233 218 733 564) |
859 | 481 |
#menu: #menu |
482 |
#usePreferredExtent: false |
|
797 | 483 |
) |
859 | 484 |
#component: |
797 | 485 |
#(#SpecCollection |
859 | 486 |
#collection: |
797 | 487 |
#( |
820 | 488 |
#(#ViewSpec |
859 | 489 |
#name: 'view' |
490 |
#layout: #(#LayoutFrame 0 0.0 0 0.0 0 1.0 0 1.0) |
|
491 |
#component: |
|
820 | 492 |
#(#SpecCollection |
859 | 493 |
#collection: |
820 | 494 |
#( |
495 |
#(#LabelSpec |
|
859 | 496 |
#name: 'infoLabel' |
497 |
#layout: #(#LayoutFrame 2 0.0 1 0.0 -1 1.0 -1 1.0) |
|
498 |
#labelChannel: #valueOfInfoLabel |
|
499 |
#level: -1 |
|
500 |
#adjust: #left |
|
869 | 501 |
#resizeForLabel: false |
820 | 502 |
) |
503 |
) |
|
504 |
) |
|
797 | 505 |
) |
506 |
) |
|
507 |
) |
|
508 |
) |
|
509 |
! |
|
510 |
||
511 |
windowSpecForInfoBarWithClock |
|
869 | 512 |
"This resource specification was automatically generated |
513 |
by the UIPainter of ST/X." |
|
514 |
||
515 |
"Do not manually edit this!! If it is corrupted, |
|
516 |
the UIPainter may not be able to read the specification." |
|
517 |
||
518 |
" |
|
519 |
UIPainter new openOnClass:ToolApplicationModel andSelector:#windowSpecForInfoBarWithClock |
|
520 |
ToolApplicationModel new openInterface:#windowSpecForInfoBarWithClock |
|
521 |
" |
|
797 | 522 |
|
523 |
<resource: #canvas> |
|
524 |
||
525 |
^ |
|
859 | 526 |
|
797 | 527 |
#(#FullSpec |
859 | 528 |
#window: |
797 | 529 |
#(#WindowSpec |
859 | 530 |
#name: 'Info Bar' |
872 | 531 |
#layout: #(#LayoutFrame 160 0 423 0 659 0 453 0) |
859 | 532 |
#label: 'Info Bar' |
533 |
#min: #(#Point 400 320) |
|
534 |
#max: #(#Point 1152 900) |
|
872 | 535 |
#bounds: #(#Rectangle 160 423 660 454) |
859 | 536 |
#menu: #menu |
537 |
#usePreferredExtent: false |
|
797 | 538 |
) |
859 | 539 |
#component: |
797 | 540 |
#(#SpecCollection |
859 | 541 |
#collection: |
797 | 542 |
#( |
820 | 543 |
#(#ViewSpec |
859 | 544 |
#name: 'view' |
545 |
#layout: #(#LayoutFrame 0 0.0 0 0.0 0 1.0 0 1.0) |
|
546 |
#component: |
|
820 | 547 |
#(#SpecCollection |
859 | 548 |
#collection: |
820 | 549 |
#( |
550 |
#(#LabelSpec |
|
859 | 551 |
#name: 'infoLabel' |
552 |
#layout: #(#LayoutFrame 2 0 1 0.0 -81 1 -1 1.0) |
|
553 |
#labelChannel: #valueOfInfoLabel |
|
554 |
#level: -1 |
|
555 |
#adjust: #left |
|
872 | 556 |
#resizeForLabel: false |
820 | 557 |
) |
558 |
#(#LabelSpec |
|
859 | 559 |
#name: 'timeLabel' |
560 |
#layout: #(#LayoutFrame -79 1 1 0.0 -1 1.0 -1 1.0) |
|
561 |
#labelChannel: #valueOfTimeLabel |
|
562 |
#level: -1 |
|
563 |
#adjust: #right |
|
872 | 564 |
#resizeForLabel: false |
820 | 565 |
) |
566 |
) |
|
567 |
) |
|
797 | 568 |
) |
569 |
) |
|
570 |
) |
|
571 |
) |
|
572 |
! ! |
|
573 |
||
574 |
!ToolApplicationModel class methodsFor:'menu specs'! |
|
575 |
||
753 | 576 |
menuAbout |
869 | 577 |
"This resource specification was automatically generated |
578 |
by the MenuEditor of ST/X." |
|
579 |
||
580 |
"Do not manually edit this!! If it is corrupted, |
|
581 |
the MenuEditor may not be able to read the specification." |
|
582 |
||
583 |
" |
|
584 |
MenuEditor new openOnClass:ToolApplicationModel andSelector:#menuAbout |
|
585 |
(Menu new fromLiteralArrayEncoding:(ToolApplicationModel menuAbout)) startUp |
|
586 |
" |
|
753 | 587 |
|
588 |
<resource: #menu> |
|
589 |
||
590 |
^ |
|
859 | 591 |
|
753 | 592 |
#(#Menu |
593 |
||
594 |
#( |
|
595 |
#(#MenuItem |
|
859 | 596 |
#label: 'About Smalltalk/X...' |
597 |
#translateLabel: true |
|
598 |
#value: #openAbout |
|
599 |
#activeHelpKey: #aboutSTX |
|
753 | 600 |
) |
601 |
#(#MenuItem |
|
859 | 602 |
#label: '-' |
753 | 603 |
) |
604 |
#(#MenuItem |
|
922 | 605 |
#label: 'About this Application...' |
859 | 606 |
#translateLabel: true |
607 |
#value: #openAboutThisApplication |
|
608 |
#activeHelpKey: #aboutThisAppliaction |
|
753 | 609 |
) |
610 |
) nil |
|
611 |
nil |
|
612 |
) |
|
922 | 613 |
|
614 |
"Modified: / 19.5.1998 / 21:44:09 / cg" |
|
753 | 615 |
! |
616 |
||
869 | 617 |
menuFont |
618 |
"This resource specification was automatically generated |
|
619 |
by the MenuEditor of ST/X." |
|
620 |
||
621 |
"Do not manually edit this!! If it is corrupted, |
|
622 |
the MenuEditor may not be able to read the specification." |
|
623 |
||
624 |
" |
|
625 |
MenuEditor new openOnClass:ToolApplicationModel andSelector:#menuFont |
|
626 |
(Menu new fromLiteralArrayEncoding:(ToolApplicationModel menuFont)) startUp |
|
627 |
" |
|
628 |
||
629 |
<resource: #menu> |
|
630 |
||
631 |
^ |
|
632 |
||
633 |
#(#Menu |
|
634 |
||
635 |
#( |
|
636 |
#(#MenuItem |
|
872 | 637 |
#label: 'Label...' |
1018
7222534cb3dc
part of the activeHelp framework moved to ApplicationModel.
Claus Gittinger <cg@exept.de>
parents:
1016
diff
changeset
|
638 |
#translateLabel: true |
869 | 639 |
#value: #chooseFont: |
640 |
#argument: 'Label Font' |
|
641 |
) |
|
642 |
#(#MenuItem |
|
872 | 643 |
#label: 'Button...' |
1018
7222534cb3dc
part of the activeHelp framework moved to ApplicationModel.
Claus Gittinger <cg@exept.de>
parents:
1016
diff
changeset
|
644 |
#translateLabel: true |
869 | 645 |
#value: #chooseFont: |
646 |
#argument: 'Button Font' |
|
647 |
) |
|
648 |
#(#MenuItem |
|
872 | 649 |
#label: 'Edit...' |
1018
7222534cb3dc
part of the activeHelp framework moved to ApplicationModel.
Claus Gittinger <cg@exept.de>
parents:
1016
diff
changeset
|
650 |
#translateLabel: true |
869 | 651 |
#value: #chooseFont: |
652 |
#argument: 'Edit Font' |
|
653 |
) |
|
654 |
#(#MenuItem |
|
872 | 655 |
#label: 'List...' |
1018
7222534cb3dc
part of the activeHelp framework moved to ApplicationModel.
Claus Gittinger <cg@exept.de>
parents:
1016
diff
changeset
|
656 |
#translateLabel: true |
869 | 657 |
#value: #chooseFont: |
658 |
#argument: 'List Font' |
|
659 |
) |
|
660 |
#(#MenuItem |
|
872 | 661 |
#label: 'Tree List...' |
1018
7222534cb3dc
part of the activeHelp framework moved to ApplicationModel.
Claus Gittinger <cg@exept.de>
parents:
1016
diff
changeset
|
662 |
#translateLabel: true |
869 | 663 |
#value: #chooseFont: |
664 |
#argument: 'Tree List Font' |
|
665 |
) |
|
666 |
#(#MenuItem |
|
872 | 667 |
#label: 'Note Book...' |
1018
7222534cb3dc
part of the activeHelp framework moved to ApplicationModel.
Claus Gittinger <cg@exept.de>
parents:
1016
diff
changeset
|
668 |
#translateLabel: true |
872 | 669 |
#value: #chooseFont: |
670 |
#argument: 'Note Book Font' |
|
671 |
) |
|
672 |
#(#MenuItem |
|
673 |
#label: 'Framed Box...' |
|
1018
7222534cb3dc
part of the activeHelp framework moved to ApplicationModel.
Claus Gittinger <cg@exept.de>
parents:
1016
diff
changeset
|
674 |
#translateLabel: true |
872 | 675 |
#value: #chooseFont: |
676 |
#argument: 'Framed Box Font' |
|
677 |
) |
|
678 |
#(#MenuItem |
|
869 | 679 |
#label: '-' |
680 |
) |
|
681 |
#(#MenuItem |
|
872 | 682 |
#label: 'Reset' |
1018
7222534cb3dc
part of the activeHelp framework moved to ApplicationModel.
Claus Gittinger <cg@exept.de>
parents:
1016
diff
changeset
|
683 |
#translateLabel: true |
869 | 684 |
#value: #resetFonts |
685 |
) |
|
686 |
) nil |
|
687 |
nil |
|
688 |
) |
|
1018
7222534cb3dc
part of the activeHelp framework moved to ApplicationModel.
Claus Gittinger <cg@exept.de>
parents:
1016
diff
changeset
|
689 |
|
7222534cb3dc
part of the activeHelp framework moved to ApplicationModel.
Claus Gittinger <cg@exept.de>
parents:
1016
diff
changeset
|
690 |
"Modified: / 31.7.1998 / 18:55:34 / cg" |
869 | 691 |
! |
692 |
||
753 | 693 |
menuHelp |
869 | 694 |
"This resource specification was automatically generated |
695 |
by the MenuEditor of ST/X." |
|
696 |
||
697 |
"Do not manually edit this!! If it is corrupted, |
|
698 |
the MenuEditor may not be able to read the specification." |
|
699 |
||
700 |
" |
|
701 |
MenuEditor new openOnClass:ToolApplicationModel andSelector:#menuHelp |
|
702 |
(Menu new fromLiteralArrayEncoding:(ToolApplicationModel menuHelp)) startUp |
|
703 |
" |
|
753 | 704 |
|
705 |
<resource: #menu> |
|
706 |
||
707 |
^ |
|
859 | 708 |
|
753 | 709 |
#(#Menu |
710 |
||
711 |
#( |
|
712 |
#(#MenuItem |
|
876 | 713 |
#label: 'Documentation' |
859 | 714 |
#translateLabel: true |
715 |
#value: #openDocumentation |
|
716 |
#activeHelpKey: #helpTutorial |
|
907 | 717 |
#enabled: #valueOfHavingDocumentation |
753 | 718 |
) |
719 |
#(#MenuItem |
|
859 | 720 |
#label: '-' |
753 | 721 |
) |
722 |
#(#MenuItem |
|
859 | 723 |
#label: 'Show Help Texts' |
724 |
#translateLabel: true |
|
725 |
#activeHelpKey: #helpShowHelp |
|
1018
7222534cb3dc
part of the activeHelp framework moved to ApplicationModel.
Claus Gittinger <cg@exept.de>
parents:
1016
diff
changeset
|
726 |
#indication: #showingHelp: |
753 | 727 |
) |
728 |
) nil |
|
729 |
nil |
|
730 |
) |
|
1018
7222534cb3dc
part of the activeHelp framework moved to ApplicationModel.
Claus Gittinger <cg@exept.de>
parents:
1016
diff
changeset
|
731 |
|
7222534cb3dc
part of the activeHelp framework moved to ApplicationModel.
Claus Gittinger <cg@exept.de>
parents:
1016
diff
changeset
|
732 |
"Modified: / 31.7.1998 / 18:19:42 / cg" |
753 | 733 |
! ! |
734 |
||
907 | 735 |
!ToolApplicationModel class methodsFor:'queries'! |
736 |
||
987 | 737 |
getAllImageSelectorsFrom: aClass |
738 |
"returns all image selectors implementing an image spec in class aClass" |
|
739 |
||
740 |
|iconClass| |
|
741 |
||
742 |
aClass isSymbol |
|
743 |
ifTrue: [iconClass := Smalltalk at: aClass] |
|
744 |
ifFalse: [iconClass := aClass]. |
|
745 |
||
746 |
^((iconClass class methodDictionary values select: [:m| m category = 'image specs']) |
|
747 |
collect: [:m| m selector]) asSortedCollection asOrderedCollection |
|
748 |
||
749 |
! |
|
750 |
||
907 | 751 |
isVisualStartable |
752 |
"returns whether this application class can be started via #open" |
|
753 |
||
754 |
self == ToolApplicationModel ifTrue:[^false]. |
|
755 |
^super isVisualStartable |
|
756 |
||
757 |
! ! |
|
758 |
||
782 | 759 |
!ToolApplicationModel class methodsFor:'startup / release'! |
753 | 760 |
|
782 | 761 |
preSnapshot |
907 | 762 |
"removes the clipboard before snap shoting" |
753 | 763 |
|
782 | 764 |
clipboard := nil |
753 | 765 |
! |
766 |
||
782 | 767 |
uninitialize |
907 | 768 |
"resets the class instance variables" |
760 | 769 |
|
1018
7222534cb3dc
part of the activeHelp framework moved to ApplicationModel.
Claus Gittinger <cg@exept.de>
parents:
1016
diff
changeset
|
770 |
settings := showingHelp := history := clipboard := nil |
7222534cb3dc
part of the activeHelp framework moved to ApplicationModel.
Claus Gittinger <cg@exept.de>
parents:
1016
diff
changeset
|
771 |
|
7222534cb3dc
part of the activeHelp framework moved to ApplicationModel.
Claus Gittinger <cg@exept.de>
parents:
1016
diff
changeset
|
772 |
"Modified: / 31.7.1998 / 18:19:37 / cg" |
753 | 773 |
! ! |
774 |
||
782 | 775 |
!ToolApplicationModel methodsFor:'aspects'! |
776 |
||
822 | 777 |
valueOfCanCopy |
907 | 778 |
"returns whether can copy as value holder" |
822 | 779 |
|
936 | 780 |
^ builder booleanValueAspectFor:#valueOfCanCopy |
822 | 781 |
|
936 | 782 |
"Modified: / 21.5.1998 / 03:39:05 / cg" |
822 | 783 |
! |
784 |
||
785 |
valueOfCanCut |
|
907 | 786 |
"returns whether can paste as value holder" |
822 | 787 |
|
936 | 788 |
^ builder booleanValueAspectFor:#valueOfCanCut |
822 | 789 |
|
936 | 790 |
"Modified: / 21.5.1998 / 03:39:13 / cg" |
822 | 791 |
! |
792 |
||
793 |
valueOfCanPaste |
|
907 | 794 |
"returns whether can paste as value holder" |
822 | 795 |
|
936 | 796 |
^ builder booleanValueAspectFor:#valueOfCanPaste |
822 | 797 |
|
936 | 798 |
"Modified: / 21.5.1998 / 03:39:22 / cg" |
822 | 799 |
! |
800 |
||
801 |
valueOfCanUndo |
|
907 | 802 |
"returns whether can undo as value holder" |
822 | 803 |
|
936 | 804 |
^ builder booleanValueAspectFor:#valueOfCanUndo |
822 | 805 |
|
936 | 806 |
"Modified: / 21.5.1998 / 03:39:31 / cg" |
822 | 807 |
! |
808 |
||
782 | 809 |
valueOfEnablingCommitButtons |
907 | 810 |
"returns the enabling of the commit of this tool as value holder" |
753 | 811 |
|
936 | 812 |
^ builder booleanValueAspectFor:#valueOfEnablingCommitButtons |
753 | 813 |
|
936 | 814 |
"Modified: / 21.5.1998 / 03:39:49 / cg" |
782 | 815 |
! |
816 |
||
858 | 817 |
valueOfHavingDocumentation |
1004 | 818 |
"returns the enabling of having documentation for this tool as value holder" |
803 | 819 |
|
1004 | 820 |
^ (builder booleanValueAspectFor:#valueOfEnablingCommitButtons) value: (self class implements: #openDocumentation) |
803 | 821 |
! |
822 |
||
782 | 823 |
valueOfInfoLabel |
907 | 824 |
"returns the info label as value holder" |
782 | 825 |
|
936 | 826 |
^ builder nilValueAspectFor:#valueOfInfoLabel |
753 | 827 |
|
936 | 828 |
"Modified: / 21.5.1998 / 03:40:34 / cg" |
782 | 829 |
! |
830 |
||
831 |
valueOfTimeLabel |
|
907 | 832 |
"returns the time label as value holder" |
753 | 833 |
|
936 | 834 |
^ builder nilValueAspectFor:#valueOfTimeLabel |
753 | 835 |
|
936 | 836 |
"Modified: / 21.5.1998 / 03:40:42 / cg" |
753 | 837 |
! ! |
838 |
||
782 | 839 |
!ToolApplicationModel methodsFor:'clipboard'! |
753 | 840 |
|
838 | 841 |
clipboard |
907 | 842 |
"returns the clipboard" |
838 | 843 |
|
844 |
^self class clipboard |
|
845 |
! |
|
846 |
||
782 | 847 |
clipboard: anEditObject |
907 | 848 |
"sets the clipboard and the value holder for can pasting" |
753 | 849 |
|
782 | 850 |
self class clipboard: anEditObject. |
753 | 851 |
|
869 | 852 |
self valueOfCanPaste value: anEditObject notNil |
782 | 853 |
! ! |
854 |
||
1006
786de97d72f9
allow redefinition of the about-boxes image.
Claus Gittinger <cg@exept.de>
parents:
1004
diff
changeset
|
855 |
!ToolApplicationModel methodsFor:'defaults'! |
786de97d72f9
allow redefinition of the about-boxes image.
Claus Gittinger <cg@exept.de>
parents:
1004
diff
changeset
|
856 |
|
786de97d72f9
allow redefinition of the about-boxes image.
Claus Gittinger <cg@exept.de>
parents:
1004
diff
changeset
|
857 |
aboutImage |
786de97d72f9
allow redefinition of the about-boxes image.
Claus Gittinger <cg@exept.de>
parents:
1004
diff
changeset
|
858 |
"the image to be displayed in my about-box; |
786de97d72f9
allow redefinition of the about-boxes image.
Claus Gittinger <cg@exept.de>
parents:
1004
diff
changeset
|
859 |
If nil is returned, thhe ST/X default image is used." |
786de97d72f9
allow redefinition of the about-boxes image.
Claus Gittinger <cg@exept.de>
parents:
1004
diff
changeset
|
860 |
|
786de97d72f9
allow redefinition of the about-boxes image.
Claus Gittinger <cg@exept.de>
parents:
1004
diff
changeset
|
861 |
^ nil |
786de97d72f9
allow redefinition of the about-boxes image.
Claus Gittinger <cg@exept.de>
parents:
1004
diff
changeset
|
862 |
|
786de97d72f9
allow redefinition of the about-boxes image.
Claus Gittinger <cg@exept.de>
parents:
1004
diff
changeset
|
863 |
"Created: / 25.7.1998 / 20:33:50 / cg" |
786de97d72f9
allow redefinition of the about-boxes image.
Claus Gittinger <cg@exept.de>
parents:
1004
diff
changeset
|
864 |
! ! |
786de97d72f9
allow redefinition of the about-boxes image.
Claus Gittinger <cg@exept.de>
parents:
1004
diff
changeset
|
865 |
|
782 | 866 |
!ToolApplicationModel methodsFor:'help'! |
753 | 867 |
|
762 | 868 |
defaultInfoLabel |
907 | 869 |
"returns the default info label; here an empty string" |
762 | 870 |
|
1018
7222534cb3dc
part of the activeHelp framework moved to ApplicationModel.
Claus Gittinger <cg@exept.de>
parents:
1016
diff
changeset
|
871 |
^ '' |
984 | 872 |
|
1018
7222534cb3dc
part of the activeHelp framework moved to ApplicationModel.
Claus Gittinger <cg@exept.de>
parents:
1016
diff
changeset
|
873 |
"Modified: / 31.7.1998 / 18:44:55 / cg" |
984 | 874 |
! |
875 |
||
753 | 876 |
openAbout |
1018
7222534cb3dc
part of the activeHelp framework moved to ApplicationModel.
Claus Gittinger <cg@exept.de>
parents:
1016
diff
changeset
|
877 |
"opens an about box (on ST/X)" |
753 | 878 |
|
1043
32cd5ccbd94f
made openAboutSTX a class method for sharability.
Claus Gittinger <cg@exept.de>
parents:
1040
diff
changeset
|
879 |
self class openAboutSTX |
753 | 880 |
|
1043
32cd5ccbd94f
made openAboutSTX a class method for sharability.
Claus Gittinger <cg@exept.de>
parents:
1040
diff
changeset
|
881 |
"Modified: / 14.8.1998 / 13:17:57 / cg" |
753 | 882 |
! |
883 |
||
884 |
openAboutThisApplication |
|
1018
7222534cb3dc
part of the activeHelp framework moved to ApplicationModel.
Claus Gittinger <cg@exept.de>
parents:
1016
diff
changeset
|
885 |
"opens an about box for this application. |
7222534cb3dc
part of the activeHelp framework moved to ApplicationModel.
Claus Gittinger <cg@exept.de>
parents:
1016
diff
changeset
|
886 |
Extracts some common info (i.e. class revision, author etc. from |
7222534cb3dc
part of the activeHelp framework moved to ApplicationModel.
Claus Gittinger <cg@exept.de>
parents:
1016
diff
changeset
|
887 |
the classes documentation." |
753 | 888 |
|
1040 | 889 |
|rev box myClass clsRev image msg| |
936 | 890 |
|
753 | 891 |
rev := ''. |
936 | 892 |
myClass := self class. |
893 |
||
894 |
(clsRev := myClass revision) notNil ifTrue: [rev := ' (rev: ', clsRev printString, ')']. |
|
1040 | 895 |
|
896 |
msg := '\The application\\' withCRs |
|
936 | 897 |
, myClass name asBoldText, rev |
850 | 898 |
, '\\has been designed and implemented by: \' withCRs |
899 |
, ((self class authorLinesForAboutBox collect:[:l | '- ' , l]) asStringWith:$\) withCRs |
|
800 | 900 |
, '\\' withCRs. |
753 | 901 |
|
1040 | 902 |
AboutBox isNil ifTrue:[ |
903 |
"/ this handles bad installations of ST/X, |
|
904 |
"/ where the AboutBox is missing. |
|
905 |
"/ (May vanish in the future) |
|
906 |
^ self information:msg |
|
907 |
]. |
|
908 |
||
909 |
box := AboutBox title:msg. |
|
910 |
||
1006
786de97d72f9
allow redefinition of the about-boxes image.
Claus Gittinger <cg@exept.de>
parents:
1004
diff
changeset
|
911 |
image := self aboutImage. |
786de97d72f9
allow redefinition of the about-boxes image.
Claus Gittinger <cg@exept.de>
parents:
1004
diff
changeset
|
912 |
image notNil ifTrue:[ |
786de97d72f9
allow redefinition of the about-boxes image.
Claus Gittinger <cg@exept.de>
parents:
1004
diff
changeset
|
913 |
box image:image |
786de97d72f9
allow redefinition of the about-boxes image.
Claus Gittinger <cg@exept.de>
parents:
1004
diff
changeset
|
914 |
]. |
786de97d72f9
allow redefinition of the about-boxes image.
Claus Gittinger <cg@exept.de>
parents:
1004
diff
changeset
|
915 |
box label:'About This Application'. |
786de97d72f9
allow redefinition of the about-boxes image.
Claus Gittinger <cg@exept.de>
parents:
1004
diff
changeset
|
916 |
box autoHideAfter:10 with:[]. |
1034
59abcada672e
show about boxes under the mouse pointer.
Claus Gittinger <cg@exept.de>
parents:
1025
diff
changeset
|
917 |
box showAtPointer. |
936 | 918 |
|
1040 | 919 |
"Modified: / 14.8.1998 / 13:04:03 / cg" |
753 | 920 |
! |
921 |
||
858 | 922 |
openHTMLDocument: aHTMLFilename |
907 | 923 |
"opens a HTML browser on aHTMLFilename" |
858 | 924 |
|
925 |
HTMLDocumentView openFullOnDocumentationFile: aHTMLFilename |
|
926 |
! |
|
927 |
||
1018
7222534cb3dc
part of the activeHelp framework moved to ApplicationModel.
Claus Gittinger <cg@exept.de>
parents:
1016
diff
changeset
|
928 |
showHelp:aHelpText for:view |
7222534cb3dc
part of the activeHelp framework moved to ApplicationModel.
Claus Gittinger <cg@exept.de>
parents:
1016
diff
changeset
|
929 |
"displays aHelpText in the info label" |
7222534cb3dc
part of the activeHelp framework moved to ApplicationModel.
Claus Gittinger <cg@exept.de>
parents:
1016
diff
changeset
|
930 |
|
7222534cb3dc
part of the activeHelp framework moved to ApplicationModel.
Claus Gittinger <cg@exept.de>
parents:
1016
diff
changeset
|
931 |
aHelpText isNil |
7222534cb3dc
part of the activeHelp framework moved to ApplicationModel.
Claus Gittinger <cg@exept.de>
parents:
1016
diff
changeset
|
932 |
ifTrue: [self updateInfoLabel] |
7222534cb3dc
part of the activeHelp framework moved to ApplicationModel.
Claus Gittinger <cg@exept.de>
parents:
1016
diff
changeset
|
933 |
ifFalse: [self valueOfInfoLabel value: (aHelpText asString printString readStream through: $.)]. |
7222534cb3dc
part of the activeHelp framework moved to ApplicationModel.
Claus Gittinger <cg@exept.de>
parents:
1016
diff
changeset
|
934 |
|
7222534cb3dc
part of the activeHelp framework moved to ApplicationModel.
Claus Gittinger <cg@exept.de>
parents:
1016
diff
changeset
|
935 |
"Created: / 20.6.1998 / 16:37:23 / cg" |
7222534cb3dc
part of the activeHelp framework moved to ApplicationModel.
Claus Gittinger <cg@exept.de>
parents:
1016
diff
changeset
|
936 |
"Modified: / 31.7.1998 / 18:40:19 / cg" |
7222534cb3dc
part of the activeHelp framework moved to ApplicationModel.
Claus Gittinger <cg@exept.de>
parents:
1016
diff
changeset
|
937 |
! |
7222534cb3dc
part of the activeHelp framework moved to ApplicationModel.
Claus Gittinger <cg@exept.de>
parents:
1016
diff
changeset
|
938 |
|
7222534cb3dc
part of the activeHelp framework moved to ApplicationModel.
Claus Gittinger <cg@exept.de>
parents:
1016
diff
changeset
|
939 |
showingHelp |
7222534cb3dc
part of the activeHelp framework moved to ApplicationModel.
Claus Gittinger <cg@exept.de>
parents:
1016
diff
changeset
|
940 |
"returns true, if automatic display of help is enabled for this |
7222534cb3dc
part of the activeHelp framework moved to ApplicationModel.
Claus Gittinger <cg@exept.de>
parents:
1016
diff
changeset
|
941 |
application; false otherwise" |
782 | 942 |
|
783 | 943 |
|currentActiveHelp| |
858 | 944 |
|
783 | 945 |
currentActiveHelp := ActiveHelp currentHelpListener. |
946 |
||
1018
7222534cb3dc
part of the activeHelp framework moved to ApplicationModel.
Claus Gittinger <cg@exept.de>
parents:
1016
diff
changeset
|
947 |
^ self class showingHelp |
7222534cb3dc
part of the activeHelp framework moved to ApplicationModel.
Claus Gittinger <cg@exept.de>
parents:
1016
diff
changeset
|
948 |
and: [currentActiveHelp notNil and: [masterApplication notNil |
858 | 949 |
ifFalse: [currentActiveHelp interestedIn: self window] |
950 |
ifTrue: [currentActiveHelp interestedIn: masterApplication window]]] |
|
782 | 951 |
|
1018
7222534cb3dc
part of the activeHelp framework moved to ApplicationModel.
Claus Gittinger <cg@exept.de>
parents:
1016
diff
changeset
|
952 |
"Created: / 31.7.1998 / 17:57:03 / cg" |
782 | 953 |
! |
954 |
||
1018
7222534cb3dc
part of the activeHelp framework moved to ApplicationModel.
Claus Gittinger <cg@exept.de>
parents:
1016
diff
changeset
|
955 |
showingHelp: aValue |
7222534cb3dc
part of the activeHelp framework moved to ApplicationModel.
Claus Gittinger <cg@exept.de>
parents:
1016
diff
changeset
|
956 |
"toggles showing help for this application" |
984 | 957 |
|
1018
7222534cb3dc
part of the activeHelp framework moved to ApplicationModel.
Claus Gittinger <cg@exept.de>
parents:
1016
diff
changeset
|
958 |
(self class showingHelp: aValue) |
7222534cb3dc
part of the activeHelp framework moved to ApplicationModel.
Claus Gittinger <cg@exept.de>
parents:
1016
diff
changeset
|
959 |
ifTrue: [ActiveHelp startFor:self] |
7222534cb3dc
part of the activeHelp framework moved to ApplicationModel.
Claus Gittinger <cg@exept.de>
parents:
1016
diff
changeset
|
960 |
ifFalse: [ActiveHelp stopFor:self. self updateInfoLabel] |
984 | 961 |
|
1018
7222534cb3dc
part of the activeHelp framework moved to ApplicationModel.
Claus Gittinger <cg@exept.de>
parents:
1016
diff
changeset
|
962 |
"Created: / 31.7.1998 / 18:20:44 / cg" |
7222534cb3dc
part of the activeHelp framework moved to ApplicationModel.
Claus Gittinger <cg@exept.de>
parents:
1016
diff
changeset
|
963 |
"Modified: / 31.7.1998 / 18:44:39 / cg" |
822 | 964 |
! |
965 |
||
966 |
updateInfoLabel |
|
1018
7222534cb3dc
part of the activeHelp framework moved to ApplicationModel.
Claus Gittinger <cg@exept.de>
parents:
1016
diff
changeset
|
967 |
"updates the info label at the bottom of this application" |
822 | 968 |
|
969 |
self valueOfInfoLabel value: self defaultInfoLabel |
|
1018
7222534cb3dc
part of the activeHelp framework moved to ApplicationModel.
Claus Gittinger <cg@exept.de>
parents:
1016
diff
changeset
|
970 |
|
7222534cb3dc
part of the activeHelp framework moved to ApplicationModel.
Claus Gittinger <cg@exept.de>
parents:
1016
diff
changeset
|
971 |
"Modified: / 31.7.1998 / 18:44:46 / cg" |
762 | 972 |
! ! |
973 |
||
753 | 974 |
!ToolApplicationModel methodsFor:'history'! |
975 |
||
976 |
addToHistory: aHistoryEntry |
|
907 | 977 |
"adds aHistoryEntry (format: loadMessage -> evalString) at the top of the history, |
978 |
and checks for maximum size of the history" |
|
753 | 979 |
|
782 | 980 |
aHistoryEntry key size = 0 ifTrue: [^nil]. |
753 | 981 |
self history remove: (self history detect: [:histEntry| histEntry key = aHistoryEntry key] ifNone: nil) ifAbsent: nil. |
982 |
self history addFirst: aHistoryEntry. |
|
983 |
[self history size > self class historyMaxSize] whileTrue: [self history removeLast] |
|
984 |
! |
|
985 |
||
986 |
emptyHistory |
|
907 | 987 |
"removes all history entries" |
753 | 988 |
|
989 |
^self history removeAll |
|
990 |
! |
|
991 |
||
992 |
history |
|
907 | 993 |
"returns the history from tool class" |
753 | 994 |
|
995 |
^self class getHistory |
|
996 |
! |
|
997 |
||
844 | 998 |
historyEntries |
907 | 999 |
"returns the history entries, i.e. the evaluatable values containing the information" |
844 | 1000 |
|
1001 |
^self history collect: [:asso| asso key] |
|
1002 |
! |
|
1003 |
||
753 | 1004 |
menuHistory |
907 | 1005 |
"returns a history submenu" |
753 | 1006 |
|
893 | 1007 |
|menu| |
920
6b72e4ce4406
must find gui resources (xlations in in history menu)
Claus Gittinger <cg@exept.de>
parents:
910
diff
changeset
|
1008 |
|
753 | 1009 |
menu := Menu new receiver: self. |
1010 |
(self history collect: [:histEntry| histEntry value]) asSet asOrderedCollection do: |
|
1011 |
[:historyEntryType| |
|
1013 | 1012 |
menu addItemGroup: |
1013 |
((self history |
|
1014 |
select: [:histEntry| |
|
1015 |
histEntry value = historyEntryType]) |
|
1016 |
collect: [:histEntry| |
|
1017 |
MenuItem new |
|
1018 |
label: histEntry key printString; |
|
1019 |
value: histEntry value; |
|
1020 |
argument: histEntry key; |
|
1021 |
activeHelpKey: #historyMenuItem]). |
|
753 | 1022 |
]. |
1023 |
||
920
6b72e4ce4406
must find gui resources (xlations in in history menu)
Claus Gittinger <cg@exept.de>
parents:
910
diff
changeset
|
1024 |
menu addItem: (MenuItem new |
6b72e4ce4406
must find gui resources (xlations in in history menu)
Claus Gittinger <cg@exept.de>
parents:
910
diff
changeset
|
1025 |
label: 'Empty History'; |
6b72e4ce4406
must find gui resources (xlations in in history menu)
Claus Gittinger <cg@exept.de>
parents:
910
diff
changeset
|
1026 |
value: #emptyHistory; |
6b72e4ce4406
must find gui resources (xlations in in history menu)
Claus Gittinger <cg@exept.de>
parents:
910
diff
changeset
|
1027 |
activeHelpKey: #historyEmptyMenu; |
6b72e4ce4406
must find gui resources (xlations in in history menu)
Claus Gittinger <cg@exept.de>
parents:
910
diff
changeset
|
1028 |
translateLabel:true). |
6b72e4ce4406
must find gui resources (xlations in in history menu)
Claus Gittinger <cg@exept.de>
parents:
910
diff
changeset
|
1029 |
|
6b72e4ce4406
must find gui resources (xlations in in history menu)
Claus Gittinger <cg@exept.de>
parents:
910
diff
changeset
|
1030 |
menu findGuiResourcesIn:self. |
753 | 1031 |
^menu |
920
6b72e4ce4406
must find gui resources (xlations in in history menu)
Claus Gittinger <cg@exept.de>
parents:
910
diff
changeset
|
1032 |
|
1013 | 1033 |
"Modified: / 29.7.1998 / 11:40:11 / cg" |
753 | 1034 |
! |
1035 |
||
1036 |
removeFromHistory: aHistoryEntry |
|
907 | 1037 |
"removes aHistoryEntry from the history" |
753 | 1038 |
|
1039 |
self history remove: (self history detect: [:histEntry| histEntry key = aHistoryEntry key] ifNone: nil) ifAbsent: nil. |
|
1040 |
[self history size > self class historyMaxSize] whileTrue: [self history removeLast] |
|
1041 |
! ! |
|
1042 |
||
982
807f440e0df7
bw. compatibility - needs builder early.
Claus Gittinger <cg@exept.de>
parents:
971
diff
changeset
|
1043 |
!ToolApplicationModel methodsFor:'initialization'! |
807f440e0df7
bw. compatibility - needs builder early.
Claus Gittinger <cg@exept.de>
parents:
971
diff
changeset
|
1044 |
|
807f440e0df7
bw. compatibility - needs builder early.
Claus Gittinger <cg@exept.de>
parents:
971
diff
changeset
|
1045 |
initialize |
807f440e0df7
bw. compatibility - needs builder early.
Claus Gittinger <cg@exept.de>
parents:
971
diff
changeset
|
1046 |
super initialize. |
807f440e0df7
bw. compatibility - needs builder early.
Claus Gittinger <cg@exept.de>
parents:
971
diff
changeset
|
1047 |
self createBuilder |
807f440e0df7
bw. compatibility - needs builder early.
Claus Gittinger <cg@exept.de>
parents:
971
diff
changeset
|
1048 |
|
807f440e0df7
bw. compatibility - needs builder early.
Claus Gittinger <cg@exept.de>
parents:
971
diff
changeset
|
1049 |
"Created: / 20.6.1998 / 14:51:29 / cg" |
807f440e0df7
bw. compatibility - needs builder early.
Claus Gittinger <cg@exept.de>
parents:
971
diff
changeset
|
1050 |
! ! |
807f440e0df7
bw. compatibility - needs builder early.
Claus Gittinger <cg@exept.de>
parents:
971
diff
changeset
|
1051 |
|
782 | 1052 |
!ToolApplicationModel methodsFor:'queries'! |
1053 |
||
876 | 1054 |
allToolInstances |
907 | 1055 |
"returns all instances of this tool class" |
876 | 1056 |
|
1057 |
^self class settings at: #Instances ifAbsent: [^#()] |
|
1058 |
! |
|
1059 |
||
782 | 1060 |
preferredExtent |
1061 |
"preferred extent of my window; top/main menu and top toolbar (named by 'menuToolbarView') |
|
1062 |
will be considered" |
|
1063 |
||
1064 |
|window menu menuToolbarView preferredExtentOfWindow| |
|
1065 |
||
1066 |
window := self builder window. |
|
1067 |
menu := window subViews first. |
|
1068 |
menuToolbarView := builder componentAt: #menuToolbarView. |
|
1069 |
||
1070 |
preferredExtentOfWindow := window extent. |
|
1071 |
menu class = MenuPanel ifTrue: [preferredExtentOfWindow := preferredExtentOfWindow max: menu preferredExtent]. |
|
1072 |
menuToolbarView notNil ifTrue: [preferredExtentOfWindow := preferredExtentOfWindow max: menuToolbarView preferredExtent]. |
|
1073 |
||
1074 |
^window minExtent max: (preferredExtentOfWindow min: window maxExtent) |
|
1075 |
! ! |
|
1076 |
||
869 | 1077 |
!ToolApplicationModel methodsFor:'settings'! |
1078 |
||
872 | 1079 |
allFontViewsDo: aBlock |
892 | 1080 |
"evaluates aBlock for all views with fonts" |
872 | 1081 |
|
1082 |
|fontViews| |
|
1083 |
||
1084 |
fontViews := OrderedCollection new. |
|
1085 |
||
1086 |
self builder windowGroup views do: [:v| v class = MenuPanel ifTrue: [fontViews add: v]]. |
|
1087 |
||
1088 |
builder namedComponents do: |
|
1089 |
[:aView| |
|
1090 |
aView allSubViewsDo: |
|
1091 |
[:v| |
|
1092 |
v font notNil ifTrue: [fontViews add: v] |
|
1093 |
] |
|
1094 |
]. |
|
1095 |
fontViews do: aBlock |
|
1096 |
! |
|
1097 |
||
869 | 1098 |
chooseFont: viewFont |
892 | 1099 |
"chooses a font for viewFont and puts it into the settings dictionary; |
869 | 1100 |
finally update all my views" |
1101 |
||
1102 |
|defaultFont font| |
|
1103 |
||
872 | 1104 |
viewFont = 'Label Font' ifTrue: [defaultFont := Label defaultFont]. |
1105 |
viewFont = 'Button Font' ifTrue: [defaultFont := Button defaultFont]. |
|
1106 |
viewFont = 'Edit Font' ifTrue: [defaultFont := TextView defaultFont]. |
|
1107 |
viewFont = 'List Font' ifTrue: [defaultFont := ListView defaultFont]. |
|
1108 |
viewFont = 'Tree List Font' ifTrue: [defaultFont := SelectionInTreeView defaultFont]. |
|
892 | 1109 |
viewFont = 'Note Book Font' ifTrue: [defaultFont := NoteBookView defaultFont]. |
872 | 1110 |
viewFont = 'Framed Box Font' ifTrue: [defaultFont := FramedBox defaultFont]. |
869 | 1111 |
|
1112 |
(font := FontPanel |
|
1113 |
fontFromUserInitial: (self class settings at: viewFont asSymbol ifAbsent: nil) ? defaultFont |
|
1114 |
title: 'Choose ', viewFont) notNil |
|
1115 |
ifTrue: |
|
872 | 1116 |
[ |
869 | 1117 |
self class settings at: viewFont asSymbol put: (font on: device). |
1118 |
self updateFonts |
|
1119 |
]. |
|
1120 |
^font |
|
1121 |
! |
|
1122 |
||
1123 |
resetFonts |
|
892 | 1124 |
"sets the fonts in the settings to nil and resets the views to its default font" |
869 | 1125 |
|
872 | 1126 |
(self class settings) |
892 | 1127 |
at: #'Label Font' put: Label defaultFont; |
1128 |
at: #'Button Font' put: Button defaultFont; |
|
1129 |
at: #'Edit Font' put: TextView defaultFont; |
|
1130 |
at: #'List Font' put: ListView defaultFont; |
|
1131 |
at: #'Tree List Font' put: SelectionInTreeView defaultFont; |
|
1132 |
at: #'Note Book Font' put: NoteBookView defaultFont; |
|
1133 |
at: #'Framed Box Font' put: FramedBox defaultFont. |
|
1134 |
||
1135 |
self updateFonts. |
|
1136 |
||
1137 |
(self class settings) |
|
872 | 1138 |
removeKey: #'Label Font' ifAbsent: nil; |
1139 |
removeKey: #'Button Font' ifAbsent: nil; |
|
1140 |
removeKey: #'Edit Font' ifAbsent: nil; |
|
1141 |
removeKey: #'List Font' ifAbsent: nil; |
|
1142 |
removeKey: #'Tree List Font' ifAbsent: nil; |
|
1143 |
removeKey: #'Note Book Font' ifAbsent: nil; |
|
1144 |
removeKey: #'Framed Box Font' ifAbsent: nil. |
|
869 | 1145 |
|
1146 |
! |
|
1147 |
||
1148 |
updateFonts |
|
892 | 1149 |
"takes defined fonts from the settings and set them to the corresponding views" |
869 | 1150 |
|
892 | 1151 |
|settings labelFont buttonFont editFont listFont treeListFont noteBookFont framedBoxFont updateFontsBlock| |
871 | 1152 |
|
1153 |
settings := self class settings. |
|
869 | 1154 |
|
872 | 1155 |
labelFont := settings at: #'Label Font' ifAbsent: nil. |
1156 |
buttonFont := settings at: #'Button Font' ifAbsent: nil. |
|
1157 |
editFont := settings at: #'Edit Font' ifAbsent: nil. |
|
1158 |
listFont := settings at: #'List Font' ifAbsent: nil. |
|
1159 |
treeListFont := settings at: #'Tree List Font' ifAbsent: nil. |
|
1160 |
noteBookFont := settings at: #'Note Book Font' ifAbsent: nil. |
|
1161 |
framedBoxFont := settings at: #'Framed Box Font' ifAbsent: nil. |
|
869 | 1162 |
|
872 | 1163 |
updateFontsBlock := |
1164 |
[:v| |
|
1165 |
(labelFont notNil and: [v font ~= labelFont and: [(v class == Label) or: [v isKindOf: Toggle]]]) |
|
1166 |
ifTrue: [v font: labelFont; fixSize; sizeChanged:nil; invalidate]. |
|
1167 |
(buttonFont notNil and: [v font ~= buttonFont and: [v class == Button or: [v class == PopUpList]]]) |
|
876 | 1168 |
ifTrue: [v label isString ifTrue: [|e|e := v extent. v font: buttonFont; extent: e; invalidate]]. |
872 | 1169 |
(editFont notNil and: [v font ~= editFont and: [v isKindOf: TextView]]) |
1170 |
ifTrue: [v font: editFont; invalidate]. |
|
1171 |
(listFont notNil and: [v font ~= listFont and: [v class = SelectionInListView or: [v class = DataSetView]]]) |
|
1172 |
ifTrue: [v font: listFont. v invalidate]. |
|
1173 |
(treeListFont notNil and: [v font ~= treeListFont and: [v isKindOf: SelectionInTreeView]]) |
|
1174 |
ifTrue: [v font: treeListFont; invalidate]. |
|
1175 |
(noteBookFont notNil and: [v font ~= noteBookFont and: [v class == NoteBookView]]) |
|
1176 |
ifTrue: [v font: noteBookFont; invalidate]. |
|
1177 |
(framedBoxFont notNil and: [v font ~= framedBoxFont and: [v class == FramedBox]]) |
|
1178 |
ifTrue: [v font: framedBoxFont; invalidate] |
|
1179 |
]. |
|
1180 |
||
1181 |
self allFontViewsDo: [:v| updateFontsBlock value: v] |
|
1182 |
||
869 | 1183 |
! ! |
1184 |
||
753 | 1185 |
!ToolApplicationModel methodsFor:'startup / release'! |
1186 |
||
1187 |
close |
|
907 | 1188 |
"uninitializes and closes this tool" |
753 | 1189 |
|
756 | 1190 |
self uninitialize. |
1191 |
||
753 | 1192 |
super close |
1193 |
! |
|
1194 |
||
1195 |
closeRequest |
|
907 | 1196 |
"uninitializes this tool before requesting close" |
753 | 1197 |
|
756 | 1198 |
self uninitialize. |
1199 |
||
753 | 1200 |
super closeRequest |
1201 |
! |
|
1202 |
||
936 | 1203 |
postBuildWith:aBuilder |
1204 |
"sets the preferred extent and the label of the tool window before opening that" |
|
1205 |
||
971
a9d2fc9ebec9
handle the case of being postOpened as a subCanvas
Claus Gittinger <cg@exept.de>
parents:
936
diff
changeset
|
1206 |
|win| |
a9d2fc9ebec9
handle the case of being postOpened as a subCanvas
Claus Gittinger <cg@exept.de>
parents:
936
diff
changeset
|
1207 |
|
936 | 1208 |
super postBuildWith:aBuilder. |
1209 |
||
971
a9d2fc9ebec9
handle the case of being postOpened as a subCanvas
Claus Gittinger <cg@exept.de>
parents:
936
diff
changeset
|
1210 |
(win := aBuilder window) isTopView ifTrue:[ |
a9d2fc9ebec9
handle the case of being postOpened as a subCanvas
Claus Gittinger <cg@exept.de>
parents:
936
diff
changeset
|
1211 |
win |
a9d2fc9ebec9
handle the case of being postOpened as a subCanvas
Claus Gittinger <cg@exept.de>
parents:
936
diff
changeset
|
1212 |
extent: self preferredExtent; |
a9d2fc9ebec9
handle the case of being postOpened as a subCanvas
Claus Gittinger <cg@exept.de>
parents:
936
diff
changeset
|
1213 |
label: self class label. |
a9d2fc9ebec9
handle the case of being postOpened as a subCanvas
Claus Gittinger <cg@exept.de>
parents:
936
diff
changeset
|
1214 |
]. |
936 | 1215 |
|
1216 |
"Created: / 21.5.1998 / 02:49:09 / cg" |
|
971
a9d2fc9ebec9
handle the case of being postOpened as a subCanvas
Claus Gittinger <cg@exept.de>
parents:
936
diff
changeset
|
1217 |
"Modified: / 18.6.1998 / 20:16:25 / cg" |
936 | 1218 |
! |
1219 |
||
790 | 1220 |
postOpenWith:aBuilder |
907 | 1221 |
"starts the active help for this tool (if turned on in the settings) |
1222 |
and updates the info label and the fonts (from the settings)" |
|
790 | 1223 |
|
1224 |
super postOpenWith:aBuilder. |
|
1225 |
||
822 | 1226 |
self updateInfoLabel. |
876 | 1227 |
self updateFonts. |
1228 |
||
1018
7222534cb3dc
part of the activeHelp framework moved to ApplicationModel.
Claus Gittinger <cg@exept.de>
parents:
1016
diff
changeset
|
1229 |
"Modified: / 31.7.1998 / 18:17:34 / cg" |
790 | 1230 |
! |
1231 |
||
853 | 1232 |
startClockOnTimedBlock: aBlock |
1018
7222534cb3dc
part of the activeHelp framework moved to ApplicationModel.
Claus Gittinger <cg@exept.de>
parents:
1016
diff
changeset
|
1233 |
"sets and starts the (optional) time block" |
853 | 1234 |
|
1235 |
timeBlock := aBlock. |
|
1236 |
aBlock value. |
|
1237 |
||
1018
7222534cb3dc
part of the activeHelp framework moved to ApplicationModel.
Claus Gittinger <cg@exept.de>
parents:
1016
diff
changeset
|
1238 |
"Modified: / 31.7.1998 / 18:46:28 / cg" |
853 | 1239 |
! |
1240 |
||
756 | 1241 |
uninitialize |
1018
7222534cb3dc
part of the activeHelp framework moved to ApplicationModel.
Claus Gittinger <cg@exept.de>
parents:
1016
diff
changeset
|
1242 |
"stops active help for this tool and (if defined) removes the time block" |
756 | 1243 |
|
1018
7222534cb3dc
part of the activeHelp framework moved to ApplicationModel.
Claus Gittinger <cg@exept.de>
parents:
1016
diff
changeset
|
1244 |
self showingHelp ifTrue: [ActiveHelp stopFor: self]. |
876 | 1245 |
timeBlock notNil ifTrue: [Processor removeTimedBlock:timeBlock. timeBlock := nil]. |
1246 |
||
1018
7222534cb3dc
part of the activeHelp framework moved to ApplicationModel.
Claus Gittinger <cg@exept.de>
parents:
1016
diff
changeset
|
1247 |
"Modified: / 31.7.1998 / 18:46:21 / cg" |
753 | 1248 |
! ! |
1249 |
||
1250 |
!ToolApplicationModel class methodsFor:'documentation'! |
|
1251 |
||
1252 |
version |
|
1043
32cd5ccbd94f
made openAboutSTX a class method for sharability.
Claus Gittinger <cg@exept.de>
parents:
1040
diff
changeset
|
1253 |
^ '$Header: /cvs/stx/stx/libview2/ToolApplicationModel.st,v 1.73 1998-08-14 15:38:01 cg Exp $' |
753 | 1254 |
! ! |