author | Jan Vrany <jan.vrany@fit.cvut.cz> |
Thu, 31 May 2018 10:52:50 +0100 | |
branch | jv |
changeset 4330 | 998eb03f0736 |
parent 3011 | 1997ff6e7e55 |
permissions | -rw-r--r-- |
1445 | 1 |
" |
2 |
COPYRIGHT (c) 2003 by eXept Software AG |
|
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 |
||
1266 | 13 |
"{ Package: 'stx:libbasic3' }" |
14 |
||
15 |
"{ NameSpace: Packages }" |
|
16 |
||
17 |
PackageDetails subclass:#PackageProperties |
|
18 |
instanceVariableNames:'' |
|
19 |
classVariableNames:'' |
|
20 |
poolDictionaries:'' |
|
21 |
category:'Package-Application' |
|
22 |
! |
|
23 |
||
24 |
AbstractPackageDetails subclass:#General |
|
25 |
instanceVariableNames:'' |
|
26 |
classVariableNames:'' |
|
27 |
poolDictionaries:'' |
|
28 |
privateIn:PackageProperties |
|
29 |
! |
|
30 |
||
1445 | 31 |
!PackageProperties class methodsFor:'documentation'! |
32 |
||
33 |
copyright |
|
34 |
" |
|
35 |
COPYRIGHT (c) 2003 by eXept Software AG |
|
36 |
All Rights Reserved |
|
37 |
||
38 |
This software is furnished under a license and may be used |
|
39 |
only in accordance with the terms of that license and with the |
|
40 |
inclusion of the above copyright notice. This software may not |
|
41 |
be provided or otherwise made available to, or used by, any |
|
42 |
other person. No title to or ownership of the software is |
|
43 |
hereby transferred. |
|
44 |
" |
|
45 |
! ! |
|
1266 | 46 |
|
47 |
!PackageProperties class methodsFor:'interface specs'! |
|
48 |
||
49 |
windowSpec |
|
50 |
"This resource specification was automatically generated |
|
51 |
by the UIPainter of ST/X." |
|
52 |
||
53 |
"Do not manually edit this!! If it is corrupted, |
|
54 |
the UIPainter may not be able to read the specification." |
|
55 |
||
56 |
" |
|
57 |
UIPainter new openOnClass:Packages::PackageProperties andSelector:#windowSpec |
|
58 |
Packages::PackageProperties new openInterface:#windowSpec |
|
59 |
Packages::PackageProperties open |
|
60 |
" |
|
61 |
||
62 |
<resource: #canvas> |
|
63 |
||
64 |
^ |
|
65 |
#(#FullSpec |
|
66 |
#name: #windowSpec |
|
67 |
#window: |
|
68 |
#(#WindowSpec |
|
69 |
#label: '' |
|
70 |
#name: '' |
|
71 |
#labelChannel: #labelHolder |
|
72 |
#min: #(#Point 10 10) |
|
73 |
#max: #(#Point 1024 768) |
|
74 |
#bounds: #(#Rectangle 29 59 329 359) |
|
75 |
#menu: #mainMenu |
|
76 |
) |
|
77 |
#component: |
|
78 |
#(#SpecCollection |
|
79 |
#collection: #() |
|
80 |
) |
|
81 |
) |
|
82 |
! ! |
|
83 |
||
84 |
!PackageProperties class methodsFor:'menu specs'! |
|
85 |
||
86 |
mainMenu |
|
87 |
"This resource specification was automatically generated by the CodeGeneratorTool." |
|
88 |
||
89 |
"Do not manually edit this!! If it is corrupted, |
|
90 |
the MenuEditor may not be able to read the specification." |
|
91 |
||
92 |
" |
|
93 |
MenuEditor new openOnClass:Packages::PackageProperties andSelector:#mainMenu |
|
94 |
" |
|
95 |
||
96 |
<resource: #menu> |
|
97 |
||
98 |
^ #(#Menu |
|
99 |
#( |
|
100 |
#(#MenuItem |
|
101 |
#label: 'File' |
|
102 |
#translateLabel: true |
|
103 |
#submenu: |
|
104 |
#(#Menu |
|
105 |
#( |
|
106 |
#(#MenuItem |
|
107 |
#label: 'New' |
|
108 |
#translateLabel: true |
|
109 |
#value: #menuNew |
|
110 |
) |
|
111 |
#(#MenuItem |
|
112 |
#label: '-' |
|
113 |
) |
|
114 |
#(#MenuItem |
|
115 |
#label: 'Open...' |
|
116 |
#translateLabel: true |
|
117 |
#value: #menuOpen |
|
118 |
) |
|
119 |
#(#MenuItem |
|
120 |
#label: '-' |
|
121 |
) |
|
122 |
#(#MenuItem |
|
123 |
#label: 'Save' |
|
124 |
#translateLabel: true |
|
125 |
#value: #menuSave |
|
126 |
) |
|
127 |
#(#MenuItem |
|
128 |
#label: 'Save As...' |
|
129 |
#translateLabel: true |
|
130 |
#value: #menuSaveAs |
|
131 |
) |
|
132 |
#(#MenuItem |
|
133 |
#label: '-' |
|
134 |
) |
|
135 |
#(#MenuItem |
|
136 |
#label: 'Exit' |
|
137 |
#translateLabel: true |
|
138 |
#value: #closeRequest |
|
139 |
) |
|
140 |
) nil |
|
141 |
nil |
|
142 |
) |
|
143 |
) |
|
144 |
#(#MenuItem |
|
145 |
#label: 'Help' |
|
146 |
#translateLabel: true |
|
147 |
#startGroup: #right |
|
148 |
#submenu: |
|
149 |
#(#Menu |
|
150 |
#( |
|
151 |
#(#MenuItem |
|
152 |
#label: 'Documentation' |
|
153 |
#translateLabel: true |
|
154 |
#value: #openDocumentation |
|
155 |
) |
|
156 |
#(#MenuItem |
|
157 |
#label: '-' |
|
158 |
) |
|
159 |
#(#MenuItem |
|
160 |
#label: 'About this Application' |
|
161 |
#translateLabel: true |
|
162 |
#value: #openAboutThisApplication |
|
163 |
) |
|
164 |
) nil |
|
165 |
nil |
|
166 |
) |
|
167 |
) |
|
168 |
) nil |
|
169 |
nil |
|
170 |
) |
|
171 |
! ! |
|
172 |
||
173 |
!PackageProperties class methodsFor:'plugIn spec'! |
|
174 |
||
175 |
aspectSelectors |
|
176 |
"This resource specification was automatically generated |
|
177 |
by the UIPainter of ST/X." |
|
178 |
||
179 |
"Do not manually edit this. If it is corrupted, |
|
180 |
the UIPainter may not be able to read the specification." |
|
181 |
||
182 |
"Return a description of exported aspects; |
|
183 |
these can be connected to aspects of an embedding application |
|
184 |
(if this app is embedded in a subCanvas)." |
|
185 |
||
186 |
^ #( |
|
187 |
#list |
|
188 |
#selectionHolder |
|
189 |
). |
|
190 |
||
191 |
! ! |
|
192 |
||
193 |
!PackageProperties methodsFor:'accessing'! |
|
194 |
||
195 |
labelHolder |
|
196 |
"assuming that there is only one package selected!!" |
|
197 |
| selectedPackage packagesSelected | |
|
198 |
packagesSelected := self packagesSelected. |
|
199 |
selectedPackage := packagesSelected first. |
|
200 |
^ selectedPackage name asString, ' Properties' |
|
201 |
! ! |
|
202 |
||
203 |
!PackageProperties::General class methodsFor:'accessing'! |
|
204 |
||
205 |
applicationName |
|
206 |
^ 'General' |
|
207 |
! ! |
|
208 |
||
209 |
!PackageProperties::General class methodsFor:'interface specs'! |
|
210 |
||
211 |
windowSpec |
|
212 |
"This resource specification was automatically generated by the CodeGeneratorTool." |
|
213 |
||
214 |
"Do not manually edit this!! If it is corrupted, |
|
215 |
the UIPainter may not be able to read the specification." |
|
216 |
||
217 |
" |
|
218 |
UIPainter new openOnClass:Packages::PackageProperties::General andSelector:#windowSpec |
|
219 |
" |
|
220 |
||
221 |
<resource: #canvas> |
|
222 |
||
223 |
^ #(#FullSpec |
|
224 |
#window: |
|
225 |
#(#WindowSpec |
|
226 |
#name: 'Packages::PackageProperties::General' |
|
227 |
#layout: #(#LayoutFrame 204 0 162 0 503 0 461 0) |
|
228 |
#label: 'Packages::PackageProperties::General' |
|
229 |
#min: #(#Point 10 10) |
|
230 |
#max: #(#Point 1024 768) |
|
231 |
#bounds: #(#Rectangle 204 162 504 462) |
|
232 |
#menu: #mainMenu |
|
233 |
#usePreferredExtent: false |
|
234 |
) |
|
235 |
#component: |
|
236 |
#(#SpecCollection |
|
237 |
#collection: #() |
|
238 |
) |
|
239 |
) |
|
240 |
! ! |
|
241 |
||
242 |
!PackageProperties::General class methodsFor:'menu specs'! |
|
243 |
||
244 |
mainMenu |
|
245 |
"This resource specification was automatically generated by the CodeGeneratorTool." |
|
246 |
||
247 |
"Do not manually edit this!! If it is corrupted, |
|
248 |
the MenuEditor may not be able to read the specification." |
|
249 |
||
250 |
" |
|
251 |
MenuEditor new openOnClass:Packages::PackageProperties::General andSelector:#mainMenu |
|
252 |
" |
|
253 |
||
254 |
<resource: #menu> |
|
255 |
||
256 |
^ #(#Menu |
|
257 |
#( |
|
258 |
#(#MenuItem |
|
259 |
#label: 'File' |
|
260 |
#translateLabel: true |
|
261 |
#submenu: |
|
262 |
#(#Menu |
|
263 |
#( |
|
264 |
#(#MenuItem |
|
265 |
#label: 'New' |
|
266 |
#translateLabel: true |
|
267 |
#value: #menuNew |
|
268 |
) |
|
269 |
#(#MenuItem |
|
270 |
#label: '-' |
|
271 |
) |
|
272 |
#(#MenuItem |
|
273 |
#label: 'Open...' |
|
274 |
#translateLabel: true |
|
275 |
#value: #menuOpen |
|
276 |
) |
|
277 |
#(#MenuItem |
|
278 |
#label: '-' |
|
279 |
) |
|
280 |
#(#MenuItem |
|
281 |
#label: 'Save' |
|
282 |
#translateLabel: true |
|
283 |
#value: #menuSave |
|
284 |
) |
|
285 |
#(#MenuItem |
|
286 |
#label: 'Save As...' |
|
287 |
#translateLabel: true |
|
288 |
#value: #menuSaveAs |
|
289 |
) |
|
290 |
#(#MenuItem |
|
291 |
#label: '-' |
|
292 |
) |
|
293 |
#(#MenuItem |
|
294 |
#label: 'Exit' |
|
295 |
#translateLabel: true |
|
296 |
#value: #closeRequest |
|
297 |
) |
|
298 |
) nil |
|
299 |
nil |
|
300 |
) |
|
301 |
) |
|
302 |
#(#MenuItem |
|
303 |
#label: 'Help' |
|
304 |
#translateLabel: true |
|
305 |
#startGroup: #right |
|
306 |
#submenu: |
|
307 |
#(#Menu |
|
308 |
#( |
|
309 |
#(#MenuItem |
|
310 |
#label: 'Documentation' |
|
311 |
#translateLabel: true |
|
312 |
#value: #openDocumentation |
|
313 |
) |
|
314 |
#(#MenuItem |
|
315 |
#label: '-' |
|
316 |
) |
|
317 |
#(#MenuItem |
|
318 |
#label: 'About this Application' |
|
319 |
#translateLabel: true |
|
320 |
#value: #openAboutThisApplication |
|
321 |
) |
|
322 |
) nil |
|
323 |
nil |
|
324 |
) |
|
325 |
) |
|
326 |
) nil |
|
327 |
nil |
|
328 |
) |
|
329 |
! ! |
|
330 |
||
331 |
!PackageProperties::General methodsFor:'initialization & release'! |
|
332 |
||
333 |
closeDownViews |
|
334 |
"This is a hook method generated by the Browser. |
|
335 |
It will be invoked when your app/dialog-window is really closed. |
|
336 |
See also #closeDownViews, which is invoked before and may suppress the close |
|
337 |
or ask the user for confirmation." |
|
338 |
||
339 |
"/ change the code below as required ... |
|
340 |
"/ This should cleanup any leftover resources |
|
341 |
"/ (for example, temporary files) |
|
342 |
"/ super closeRequest will initiate the closeDown |
|
343 |
||
344 |
"/ add your code here |
|
345 |
||
346 |
"/ do not remove the one below ... |
|
347 |
^ super closeDownViews |
|
348 |
! |
|
349 |
||
350 |
closeRequest |
|
351 |
"This is a hook method generated by the Browser. |
|
352 |
It will be invoked when your app/dialog-window is about to be |
|
353 |
closed (this method has a chance to suppress the close). |
|
354 |
See also #closeDownViews, which is invoked when the close is really done." |
|
355 |
||
356 |
"/ change the code below as required ... |
|
357 |
"/ Closing can be suppressed, by simply returning. |
|
358 |
"/ The 'super closeRequest' at the end will initiate the real closeDown |
|
359 |
||
360 |
("self hasUnsavedChanges" true) ifTrue:[ |
|
361 |
(self confirm:(resources string:'Close without saving ?')) ifFalse:[ |
|
362 |
^ self |
|
363 |
] |
|
364 |
]. |
|
365 |
||
366 |
^ super closeRequest |
|
367 |
! |
|
368 |
||
369 |
postBuildWith:aBuilder |
|
370 |
"This is a hook method generated by the Browser. |
|
371 |
It will be invoked during the initialization of your app/dialog, |
|
372 |
after all of the visual components have been built, |
|
373 |
but BEFORE the top window is made visible. |
|
374 |
Add any app-specific actions here (reading files, setting up values etc.) |
|
375 |
See also #postOpenWith:, which is invoked after opening." |
|
376 |
||
377 |
"/ add any code here ... |
|
378 |
self inspect. |
|
379 |
^ super postBuildWith:aBuilder |
|
380 |
! |
|
381 |
||
382 |
postOpenWith:aBuilder |
|
383 |
"This is a hook method generated by the Browser. |
|
384 |
It will be invoked right after the applications window has been opened. |
|
385 |
Add any app-specific actions here (starting background processes etc.). |
|
386 |
See also #postBuildWith:, which is invoked before opening." |
|
387 |
||
388 |
"/ add any code here ... |
|
389 |
||
390 |
^ super postOpenWith:aBuilder |
|
391 |
! ! |
|
392 |
||
393 |
!PackageProperties::General methodsFor:'menu actions'! |
|
394 |
||
395 |
menuNew |
|
396 |
"This method was generated by the Browser. |
|
397 |
It will be invoked when the menu-item 'new' is selected." |
|
398 |
||
399 |
"/ change below and add any actions as required here ... |
|
400 |
self warn:'no action for ''new'' available.'. |
|
401 |
! |
|
402 |
||
403 |
menuOpen |
|
404 |
"This method was generated by the Browser. |
|
405 |
It will be invoked when the menu-item 'open' is selected." |
|
406 |
||
407 |
"/ change below and add any actions as required here ... |
|
408 |
self warn:'no action for ''open'' available.'. |
|
409 |
! |
|
410 |
||
411 |
menuSave |
|
412 |
"This method was generated by the Browser. |
|
413 |
It will be invoked when the menu-item 'save' is selected." |
|
414 |
||
415 |
"/ change below and add any actions as required here ... |
|
416 |
self warn:'no action for ''save'' available.'. |
|
417 |
! |
|
418 |
||
419 |
menuSaveAs |
|
420 |
"This method was generated by the Browser. |
|
421 |
It will be invoked when the menu-item 'saveAs' is selected." |
|
422 |
||
423 |
"/ change below and add any actions as required here ... |
|
424 |
self warn:'no action for ''saveAs'' available.'. |
|
425 |
! |
|
426 |
||
427 |
openAboutThisApplication |
|
428 |
"This method was generated by the Browser. |
|
429 |
It will be invoked when the menu-item 'help-about' is selected." |
|
430 |
||
431 |
"/ could open a customized aboutBox here ... |
|
432 |
super openAboutThisApplication |
|
433 |
! |
|
434 |
||
435 |
openDocumentation |
|
436 |
"This method was generated by the Browser. |
|
437 |
It will be invoked when the menu-item 'help-documentation' is selected." |
|
438 |
||
439 |
"/ change below as required ... |
|
440 |
||
441 |
"/ to open an HTML viewer on some document (under 'doc/online/<language>/' ): |
|
442 |
HTMLDocumentView openFullOnDocumentationFile:'TOP.html'. |
|
443 |
||
444 |
"/ add application-specific help files under the 'doc/online/<language>/help/appName' |
|
445 |
"/ directory, and open a viewer with: |
|
446 |
"/ HTMLDocumentView openFullOnDocumentationFile:'help/<MyApplication>/TOP.html'. |
|
447 |
! ! |
|
448 |
||
449 |
!PackageProperties class methodsFor:'documentation'! |
|
450 |
||
451 |
version |
|
3011
1997ff6e7e55
trunk branched into /branches/jv
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
1445
diff
changeset
|
452 |
^ '$Header: /var/local/cvs/stx/libbasic3/packages/PackageProperties.st,v 1.2 2006-01-10 09:31:58 cg Exp $' |
1266 | 453 |
! ! |