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