1319
|
1 |
"
|
|
2 |
COPYRIGHT (c) 2000 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 |
|
|
13 |
|
1318
|
14 |
PopUpView subclass:#PopUpBanner
|
|
15 |
instanceVariableNames:''
|
|
16 |
classVariableNames:''
|
|
17 |
poolDictionaries:''
|
|
18 |
category:'Views-Basic'
|
|
19 |
!
|
|
20 |
|
1319
|
21 |
!PopUpBanner class methodsFor:'documentation'!
|
|
22 |
|
|
23 |
copyright
|
|
24 |
"
|
|
25 |
COPYRIGHT (c) 2000 by eXept Software AG
|
|
26 |
All Rights Reserved
|
|
27 |
|
|
28 |
This software is furnished under a license and may be used
|
|
29 |
only in accordance with the terms of that license and with the
|
|
30 |
inclusion of the above copyright notice. This software may not
|
|
31 |
be provided or otherwise made available to, or used by, any
|
|
32 |
other person. No title to or ownership of the software is
|
|
33 |
hereby transferred.
|
|
34 |
"
|
|
35 |
|
|
36 |
!
|
|
37 |
|
|
38 |
documentation
|
|
39 |
"
|
1338
|
40 |
Shows a banner popUp (splash window);
|
1319
|
41 |
can be used at startup to make wait-time a bit more interesting.
|
|
42 |
See use in smalltalk.rc / showBanner.rc / hideBanner.rc.
|
|
43 |
|
|
44 |
[author:]
|
|
45 |
Claus Gittinger
|
|
46 |
"
|
|
47 |
|
1338
|
48 |
!
|
|
49 |
|
|
50 |
examples
|
|
51 |
"
|
|
52 |
[exBegin]
|
|
53 |
|img bannerView|
|
|
54 |
|
|
55 |
img := Image fromFile:'banner1.xpm'.
|
|
56 |
bannerView := PopUpBanner forImage:img.
|
|
57 |
bannerView showCentered.
|
|
58 |
|
|
59 |
Delay waitForSeconds:2.
|
|
60 |
bannerView destroy
|
|
61 |
[exEnd]
|
|
62 |
"
|
|
63 |
|
1319
|
64 |
! !
|
1318
|
65 |
|
|
66 |
!PopUpBanner class methodsFor:'instance creation'!
|
|
67 |
|
|
68 |
forImage:anImage
|
|
69 |
|v|
|
|
70 |
|
|
71 |
v := self new.
|
|
72 |
v viewBackground:anImage.
|
1338
|
73 |
v cursor:Cursor wait.
|
1318
|
74 |
^ v
|
|
75 |
! !
|
|
76 |
|
|
77 |
!PopUpBanner methodsFor:'activation'!
|
|
78 |
|
|
79 |
open
|
|
80 |
"default for popUpBanners is to come up modeless"
|
|
81 |
|
1339
|
82 |
|center r1 r2|
|
|
83 |
|
|
84 |
center := self center.
|
|
85 |
r1 := (center corner:center) insetBy:-5.
|
|
86 |
r2 := self origin corner:self corner.
|
|
87 |
self device zoom:r1 to:r2 duration:300.
|
|
88 |
|
1320
|
89 |
self realize
|
1318
|
90 |
|
|
91 |
!
|
|
92 |
|
|
93 |
showCentered
|
|
94 |
self extent:viewBackground extent.
|
|
95 |
self showAt:((self device extent // 2) - (viewBackground extent // 2))
|
|
96 |
|
|
97 |
|
|
98 |
! !
|
|
99 |
|
1339
|
100 |
!PopUpBanner methodsFor:'deactivation'!
|
|
101 |
|
|
102 |
destroy
|
|
103 |
|screen center r1 r2|
|
|
104 |
|
|
105 |
screen := self device.
|
|
106 |
center := self center.
|
|
107 |
r1 := (center corner:center) insetBy:-5.
|
|
108 |
r2 := self origin corner:self corner.
|
|
109 |
super destroy.
|
|
110 |
|
|
111 |
self device zoom:r2 to:r1 duration:300.
|
|
112 |
|
|
113 |
! !
|
|
114 |
|
1318
|
115 |
!PopUpBanner methodsFor:'queries'!
|
|
116 |
|
|
117 |
grabWhenMapped
|
|
118 |
^ false
|
|
119 |
! !
|
|
120 |
|
|
121 |
!PopUpBanner class methodsFor:'documentation'!
|
|
122 |
|
|
123 |
version
|
1339
|
124 |
^ '$Header: /cvs/stx/stx/libview2/PopUpBanner.st,v 1.5 2000-02-07 16:15:43 cg Exp $'
|
1318
|
125 |
! !
|