9965
|
1 |
"
|
|
2 |
COPYRIGHT (c) 2006 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 |
"{ Package: 'stx:libtool' }"
|
|
13 |
|
|
14 |
"{ NameSpace: Tools }"
|
|
15 |
|
|
16 |
ApplicationModel subclass:#BrowsletCanvas
|
|
17 |
instanceVariableNames:'browsletHolder'
|
|
18 |
classVariableNames:''
|
|
19 |
poolDictionaries:''
|
|
20 |
category:'Interface-Browsers-Browslets'
|
|
21 |
!
|
|
22 |
|
|
23 |
!BrowsletCanvas class methodsFor:'documentation'!
|
|
24 |
|
|
25 |
copyright
|
|
26 |
"
|
|
27 |
COPYRIGHT (c) 2006 by eXept Software AG
|
|
28 |
All Rights Reserved
|
|
29 |
|
|
30 |
This software is furnished under a license and may be used
|
|
31 |
only in accordance with the terms of that license and with the
|
|
32 |
inclusion of the above copyright notice. This software may not
|
|
33 |
be provided or otherwise made available to, or used by, any
|
|
34 |
other person. No title to or ownership of the software is
|
|
35 |
hereby transferred.
|
|
36 |
"
|
|
37 |
! !
|
|
38 |
|
|
39 |
!BrowsletCanvas class methodsFor:'image specs'!
|
|
40 |
|
|
41 |
closeBrowsletIcon
|
|
42 |
"This resource specification was automatically generated
|
|
43 |
by the ImageEditor of ST/X."
|
|
44 |
|
|
45 |
"Do not manually edit this!! If it is corrupted,
|
|
46 |
the ImageEditor may not be able to read the specification."
|
|
47 |
|
|
48 |
"
|
|
49 |
self closeBrowsletIcon inspect
|
|
50 |
ImageEditor openOnClass:self andSelector:#closeBrowsletIcon
|
|
51 |
Icon flushCachedIcons
|
|
52 |
"
|
|
53 |
|
|
54 |
<resource: #image>
|
|
55 |
|
|
56 |
^Icon
|
|
57 |
constantNamed:'Tools::NewSystemBrowser class closeBrowsletIcon'
|
|
58 |
ifAbsentPut:[(Depth1Image new) width: 16; height: 16; photometric:(#palette); bitsPerSample:(#[1]); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@b') ; colorMapFromArray:#[0 0 0]; mask:((Depth1Image new) width: 16; height: 16; photometric:(#blackIs0); bitsPerSample:(#[1]); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'
|
|
59 |
O?1@A,@C @FLLX91!!>FC0XOA!!>FN\X01 @G@@6@FO?0@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
|
|
60 |
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
|
|
61 |
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@a') ; yourself); yourself]
|
|
62 |
!
|
|
63 |
|
|
64 |
hideBrowsletIcon
|
|
65 |
"This resource specification was automatically generated
|
|
66 |
by the ImageEditor of ST/X."
|
|
67 |
|
|
68 |
"Do not manually edit this!! If it is corrupted,
|
|
69 |
the ImageEditor may not be able to read the specification."
|
|
70 |
|
|
71 |
"
|
|
72 |
self hideBrowsletIcon inspect
|
|
73 |
ImageEditor openOnClass:self andSelector:#hideBrowsletIcon
|
|
74 |
Icon flushCachedIcons
|
|
75 |
"
|
|
76 |
|
|
77 |
<resource: #image>
|
|
78 |
|
|
79 |
^Icon
|
|
80 |
constantNamed:'Tools::NewSystemBrowser class hideBrowsletIcon'
|
|
81 |
ifAbsentPut:[(Depth1Image new) width: 16; height: 16; photometric:(#palette); bitsPerSample:(#[1]); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@b') ; colorMapFromArray:#[0 0 0]; mask:((Depth1Image new) width: 16; height: 16; photometric:(#blackIs0); bitsPerSample:(#[1]); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'
|
|
82 |
O?1@A,@C @FL@X<A#<FO<X?1#<FO@X0A @G@@6@FO?0@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
|
|
83 |
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
|
|
84 |
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@a') ; yourself); yourself]
|
|
85 |
!
|
|
86 |
|
|
87 |
popupBrowsletIcon
|
|
88 |
"This resource specification was automatically generated
|
|
89 |
by the ImageEditor of ST/X."
|
|
90 |
|
|
91 |
"Do not manually edit this!! If it is corrupted,
|
|
92 |
the ImageEditor may not be able to read the specification."
|
|
93 |
|
|
94 |
"
|
|
95 |
self popupBrowsletIcon inspect
|
|
96 |
ImageEditor openOnClass:self andSelector:#popupBrowsletIcon
|
|
97 |
Icon flushCachedIcons
|
|
98 |
"
|
|
99 |
|
|
100 |
<resource: #image>
|
|
101 |
|
|
102 |
^Icon
|
|
103 |
constantNamed:'BrowsletCanvas class popupBrowsletIcon'
|
|
104 |
ifAbsentPut:[(Depth1Image new) width: 16; height: 16; photometric:(#palette); bitsPerSample:(#[1]); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@b') ; colorMapFromArray:#[0 0 0]; mask:((Depth1Image new) width: 16; height: 16; photometric:(#blackIs0); bitsPerSample:(#[1]); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'
|
|
105 |
O?1@A,@C @F@@X?1#?FG8X_!! <FC0XFA XG@@6@FO?0@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
|
|
106 |
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
|
|
107 |
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@a') ; yourself); yourself]
|
|
108 |
!
|
|
109 |
|
|
110 |
showBrowsletIcon
|
|
111 |
"This resource specification was automatically generated
|
|
112 |
by the ImageEditor of ST/X."
|
|
113 |
|
|
114 |
"Do not manually edit this!! If it is corrupted,
|
|
115 |
the ImageEditor may not be able to read the specification."
|
|
116 |
|
|
117 |
"
|
|
118 |
self showBrowsletIcon inspect
|
|
119 |
ImageEditor openOnClass:self andSelector:#showBrowsletIcon
|
|
120 |
Icon flushCachedIcons
|
|
121 |
"
|
|
122 |
|
|
123 |
<resource: #image>
|
|
124 |
|
|
125 |
^Icon
|
|
126 |
constantNamed:'Tools::NewSystemBrowser class showBrowsletIcon'
|
|
127 |
ifAbsentPut:[(Depth1Image new) width: 16; height: 16; photometric:(#palette); bitsPerSample:(#[1]); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@b') ; colorMapFromArray:#[0 0 0]; mask:((Depth1Image new) width: 16; height: 16; photometric:(#blackIs0); bitsPerSample:(#[1]); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'
|
|
128 |
O?1@A,@C @F@LXC1 ?FO<X?1 ?F@<X@1 @G@@6@FO?0@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
|
|
129 |
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
|
|
130 |
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@a') ; yourself); yourself]
|
|
131 |
! !
|
|
132 |
|
|
133 |
!BrowsletCanvas class methodsFor:'interface specs'!
|
|
134 |
|
|
135 |
windowSpec
|
|
136 |
"This resource specification was automatically generated
|
|
137 |
by the UIPainter of ST/X."
|
|
138 |
|
|
139 |
"Do not manually edit this!! If it is corrupted,
|
|
140 |
the UIPainter may not be able to read the specification."
|
|
141 |
|
|
142 |
"
|
|
143 |
UIPainter new openOnClass:BrowsletCanvas andSelector:#windowSpec
|
|
144 |
BrowsletCanvas new openInterface:#windowSpec
|
|
145 |
BrowsletCanvas open
|
|
146 |
"
|
|
147 |
|
|
148 |
<resource: #canvas>
|
|
149 |
|
|
150 |
^
|
|
151 |
#(FullSpec
|
|
152 |
name: windowSpec
|
|
153 |
window:
|
|
154 |
(WindowSpec
|
|
155 |
label: 'Browslet Canvas'
|
|
156 |
name: 'Browslet Canvas'
|
|
157 |
bounds: (Rectangle 0 0 300 300)
|
|
158 |
)
|
|
159 |
component:
|
|
160 |
(SpecCollection
|
|
161 |
collection: (
|
|
162 |
(TransparentBoxSpec
|
|
163 |
name: 'Box'
|
|
164 |
layout: (LayoutFrame 0 0 0 0 0 1 20 0)
|
|
165 |
component:
|
|
166 |
(SpecCollection
|
|
167 |
collection: (
|
|
168 |
(ActionButtonSpec
|
|
169 |
label: 'popupBrowsletIcon'
|
|
170 |
name: 'Button1'
|
|
171 |
layout: (LayoutFrame 0 0 0 0 20 0 0 1)
|
|
172 |
level: 0
|
|
173 |
hasCharacterOrientedLabel: false
|
|
174 |
translateLabel: true
|
|
175 |
model: popupAction
|
|
176 |
)
|
|
177 |
(ActionButtonSpec
|
|
178 |
label: 'closeBrowsletIcon'
|
|
179 |
name: 'CloseButton'
|
|
180 |
layout: (LayoutFrame -20 1 0 0 0 1 0 1)
|
|
181 |
level: 0
|
|
182 |
hasCharacterOrientedLabel: false
|
|
183 |
translateLabel: true
|
|
184 |
model: closeAction
|
|
185 |
)
|
|
186 |
(LinkButtonSpec
|
|
187 |
label: '...'
|
|
188 |
name: 'Browslet'
|
|
189 |
layout: (LayoutFrame 25 0 0 0 -25 1 0 1)
|
|
190 |
translateLabel: true
|
|
191 |
adjust: left
|
|
192 |
model: popupAction
|
|
193 |
)
|
|
194 |
)
|
|
195 |
|
|
196 |
)
|
|
197 |
)
|
|
198 |
(SubCanvasSpec
|
|
199 |
name: 'Browslet'
|
|
200 |
layout: (LayoutFrame 0 0 20 0 0 1 0 1)
|
|
201 |
hasHorizontalScrollBar: false
|
|
202 |
hasVerticalScrollBar: false
|
|
203 |
clientHolder: browsletHolder
|
|
204 |
createNewBuilder: false
|
|
205 |
)
|
|
206 |
)
|
|
207 |
|
|
208 |
)
|
|
209 |
)
|
|
210 |
|
|
211 |
"Modified: / 04-10-2010 / 23:36:18 / Jan Vrany <jan.vrany@fit.cvut.cz>"
|
|
212 |
! !
|
|
213 |
|
|
214 |
!BrowsletCanvas methodsFor:'actions'!
|
|
215 |
|
|
216 |
closeAction
|
|
217 |
<resource: #uiCallback>
|
|
218 |
|
|
219 |
| topApp |
|
|
220 |
topApp := self masterApplication.
|
|
221 |
topApp
|
|
222 |
ifNil:[self closeRequest]
|
|
223 |
ifNotNil:[topApp showPlugin: false]
|
|
224 |
|
|
225 |
"Modified: / 04-10-2010 / 18:39:03 / Jan Vrany <jan.vrany@fit.cvut.cz>"
|
|
226 |
!
|
|
227 |
|
|
228 |
popupAction
|
|
229 |
<resource: #uiCallback>
|
|
230 |
|
|
231 |
| menu |
|
|
232 |
menu := Menu new.
|
|
233 |
(Browslet all asSortedCollection:[:a :b|a label < b label]) do:
|
|
234 |
[ :browslet | | item |
|
|
235 |
menu addItem:
|
|
236 |
(MenuItem
|
|
237 |
label: browslet label
|
|
238 |
value: [ self show: browslet ])].
|
|
239 |
menu showAtPointer.
|
|
240 |
|
|
241 |
"Modified: / 04-10-2010 / 23:02:58 / Jan Vrany <jan.vrany@fit.cvut.cz>"
|
|
242 |
! !
|
|
243 |
|
|
244 |
!BrowsletCanvas methodsFor:'aspects'!
|
|
245 |
|
|
246 |
browsletHolder
|
|
247 |
"return/create the 'browsletHolder' value holder (automatically generated)"
|
|
248 |
|
|
249 |
browsletHolder isNil ifTrue:[
|
|
250 |
browsletHolder := ValueHolder new.
|
|
251 |
].
|
|
252 |
^ browsletHolder
|
|
253 |
! !
|
|
254 |
|
|
255 |
!BrowsletCanvas methodsFor:'private'!
|
|
256 |
|
|
257 |
show: browsletClass
|
|
258 |
|
|
259 |
self browsletHolder value: browsletClass new
|
|
260 |
|
|
261 |
"Created: / 04-10-2010 / 23:03:58 / Jan Vrany <jan.vrany@fit.cvut.cz>"
|
|
262 |
! !
|
|
263 |
|
|
264 |
!BrowsletCanvas class methodsFor:'documentation'!
|
|
265 |
|
|
266 |
version_CVS
|
|
267 |
^ '$Header: /cvs/stx/stx/libtool/Tools__BrowsletCanvas.st,v 1.1 2011-07-01 13:11:27 cg Exp $'
|
|
268 |
!
|
|
269 |
|
|
270 |
version_SVN
|
|
271 |
^ '§Id: Tools__BrowsletCanvas.st 7637 2010-10-04 21:44:44Z vranyj1 §'
|
|
272 |
! !
|