author | Jan Vrany <jan.vrany@fit.cvut.cz> |
Mon, 30 Jan 2012 17:49:41 +0000 | |
branch | jv |
changeset 12128 | a7ff7d66ee85 |
parent 12123 | 4bde08cebd48 |
child 12431 | 9f0c59c742d5 |
permissions | -rw-r--r-- |
9965 | 1 |
" |
10043 | 2 |
Copyright (c) 2007-2010 Jan Vrany, SWING Research Group, Czech Technical University in Prague |
3 |
Copyright (c) 2009-2010 eXept Software AG |
|
9965 | 4 |
|
10043 | 5 |
Permission is hereby granted, free of charge, to any person |
6 |
obtaining a copy of this software and associated documentation |
|
7 |
files (the 'Software'), to deal in the Software without |
|
8 |
restriction, including without limitation the rights to use, |
|
9 |
copy, modify, merge, publish, distribute, sublicense, and/or sell |
|
10 |
copies of the Software, and to permit persons to whom the |
|
11 |
Software is furnished to do so, subject to the following |
|
12 |
conditions: |
|
13 |
||
14 |
The above copyright notice and this permission notice shall be |
|
15 |
included in all copies or substantial portions of the Software. |
|
16 |
||
17 |
THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, |
|
18 |
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES |
|
19 |
OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND |
|
20 |
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT |
|
21 |
HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, |
|
22 |
WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING |
|
23 |
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR |
|
24 |
OTHER DEALINGS IN THE SOFTWARE. |
|
9965 | 25 |
" |
26 |
"{ Package: 'stx:libtool' }" |
|
27 |
||
28 |
"{ NameSpace: Tools }" |
|
29 |
||
30 |
ApplicationModel subclass:#BrowsletCanvas |
|
31 |
instanceVariableNames:'browsletHolder' |
|
32 |
classVariableNames:'' |
|
33 |
poolDictionaries:'' |
|
34 |
category:'Interface-Browsers-Browslets' |
|
35 |
! |
|
36 |
||
37 |
!BrowsletCanvas class methodsFor:'documentation'! |
|
38 |
||
39 |
copyright |
|
40 |
" |
|
10043 | 41 |
Copyright (c) 2007-2010 Jan Vrany, SWING Research Group, Czech Technical University in Prague |
42 |
Copyright (c) 2009-2010 eXept Software AG |
|
43 |
||
44 |
Permission is hereby granted, free of charge, to any person |
|
45 |
obtaining a copy of this software and associated documentation |
|
46 |
files (the 'Software'), to deal in the Software without |
|
47 |
restriction, including without limitation the rights to use, |
|
48 |
copy, modify, merge, publish, distribute, sublicense, and/or sell |
|
49 |
copies of the Software, and to permit persons to whom the |
|
50 |
Software is furnished to do so, subject to the following |
|
51 |
conditions: |
|
9965 | 52 |
|
10043 | 53 |
The above copyright notice and this permission notice shall be |
54 |
included in all copies or substantial portions of the Software. |
|
55 |
||
56 |
THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, |
|
57 |
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES |
|
58 |
OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND |
|
59 |
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT |
|
60 |
HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, |
|
61 |
WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING |
|
62 |
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR |
|
63 |
OTHER DEALINGS IN THE SOFTWARE. |
|
9965 | 64 |
" |
65 |
! ! |
|
66 |
||
67 |
!BrowsletCanvas class methodsFor:'image specs'! |
|
68 |
||
69 |
closeBrowsletIcon |
|
70 |
"This resource specification was automatically generated |
|
71 |
by the ImageEditor of ST/X." |
|
72 |
||
73 |
"Do not manually edit this!! If it is corrupted, |
|
74 |
the ImageEditor may not be able to read the specification." |
|
75 |
||
76 |
" |
|
77 |
self closeBrowsletIcon inspect |
|
78 |
ImageEditor openOnClass:self andSelector:#closeBrowsletIcon |
|
79 |
Icon flushCachedIcons |
|
80 |
" |
|
81 |
||
82 |
<resource: #image> |
|
83 |
||
84 |
^Icon |
|
85 |
constantNamed:'Tools::NewSystemBrowser class closeBrowsletIcon' |
|
86 |
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:' |
|
87 |
O?1@A,@C @FLLX91!!>FC0XOA!!>FN\X01 @G@@6@FO?0@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ |
|
88 |
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ |
|
89 |
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@a') ; yourself); yourself] |
|
90 |
! |
|
91 |
||
92 |
hideBrowsletIcon |
|
93 |
"This resource specification was automatically generated |
|
94 |
by the ImageEditor of ST/X." |
|
95 |
||
96 |
"Do not manually edit this!! If it is corrupted, |
|
97 |
the ImageEditor may not be able to read the specification." |
|
98 |
||
99 |
" |
|
100 |
self hideBrowsletIcon inspect |
|
101 |
ImageEditor openOnClass:self andSelector:#hideBrowsletIcon |
|
102 |
Icon flushCachedIcons |
|
103 |
" |
|
104 |
||
105 |
<resource: #image> |
|
106 |
||
107 |
^Icon |
|
108 |
constantNamed:'Tools::NewSystemBrowser class hideBrowsletIcon' |
|
109 |
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:' |
|
110 |
O?1@A,@C @FL@X<A#<FO<X?1#<FO@X0A @G@@6@FO?0@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ |
|
111 |
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ |
|
112 |
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@a') ; yourself); yourself] |
|
113 |
! |
|
114 |
||
115 |
popupBrowsletIcon |
|
116 |
"This resource specification was automatically generated |
|
117 |
by the ImageEditor of ST/X." |
|
118 |
||
119 |
"Do not manually edit this!! If it is corrupted, |
|
120 |
the ImageEditor may not be able to read the specification." |
|
121 |
||
122 |
" |
|
123 |
self popupBrowsletIcon inspect |
|
124 |
ImageEditor openOnClass:self andSelector:#popupBrowsletIcon |
|
125 |
Icon flushCachedIcons |
|
126 |
" |
|
127 |
||
128 |
<resource: #image> |
|
129 |
||
130 |
^Icon |
|
131 |
constantNamed:'BrowsletCanvas class popupBrowsletIcon' |
|
132 |
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:' |
|
133 |
O?1@A,@C @F@@X?1#?FG8X_!! <FC0XFA XG@@6@FO?0@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ |
|
134 |
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ |
|
135 |
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@a') ; yourself); yourself] |
|
136 |
! |
|
137 |
||
138 |
showBrowsletIcon |
|
139 |
"This resource specification was automatically generated |
|
140 |
by the ImageEditor of ST/X." |
|
141 |
||
142 |
"Do not manually edit this!! If it is corrupted, |
|
143 |
the ImageEditor may not be able to read the specification." |
|
144 |
||
145 |
" |
|
146 |
self showBrowsletIcon inspect |
|
147 |
ImageEditor openOnClass:self andSelector:#showBrowsletIcon |
|
148 |
Icon flushCachedIcons |
|
149 |
" |
|
150 |
||
151 |
<resource: #image> |
|
152 |
||
153 |
^Icon |
|
154 |
constantNamed:'Tools::NewSystemBrowser class showBrowsletIcon' |
|
155 |
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:' |
|
156 |
O?1@A,@C @F@LXC1 ?FO<X?1 ?F@<X@1 @G@@6@FO?0@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ |
|
157 |
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ |
|
158 |
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@a') ; yourself); yourself] |
|
159 |
! ! |
|
160 |
||
161 |
!BrowsletCanvas class methodsFor:'interface specs'! |
|
162 |
||
163 |
windowSpec |
|
164 |
"This resource specification was automatically generated |
|
165 |
by the UIPainter of ST/X." |
|
166 |
||
167 |
"Do not manually edit this!! If it is corrupted, |
|
168 |
the UIPainter may not be able to read the specification." |
|
169 |
||
170 |
" |
|
171 |
UIPainter new openOnClass:BrowsletCanvas andSelector:#windowSpec |
|
172 |
BrowsletCanvas new openInterface:#windowSpec |
|
173 |
BrowsletCanvas open |
|
174 |
" |
|
175 |
||
176 |
<resource: #canvas> |
|
177 |
||
178 |
^ |
|
179 |
#(FullSpec |
|
180 |
name: windowSpec |
|
181 |
window: |
|
182 |
(WindowSpec |
|
183 |
label: 'Browslet Canvas' |
|
184 |
name: 'Browslet Canvas' |
|
185 |
bounds: (Rectangle 0 0 300 300) |
|
186 |
) |
|
187 |
component: |
|
188 |
(SpecCollection |
|
189 |
collection: ( |
|
190 |
(TransparentBoxSpec |
|
191 |
name: 'Box' |
|
192 |
layout: (LayoutFrame 0 0 0 0 0 1 20 0) |
|
193 |
component: |
|
194 |
(SpecCollection |
|
195 |
collection: ( |
|
196 |
(ActionButtonSpec |
|
197 |
label: 'popupBrowsletIcon' |
|
198 |
name: 'Button1' |
|
199 |
layout: (LayoutFrame 0 0 0 0 20 0 0 1) |
|
200 |
level: 0 |
|
201 |
hasCharacterOrientedLabel: false |
|
202 |
translateLabel: true |
|
203 |
model: popupAction |
|
204 |
) |
|
205 |
(ActionButtonSpec |
|
206 |
label: 'closeBrowsletIcon' |
|
207 |
name: 'CloseButton' |
|
208 |
layout: (LayoutFrame -20 1 0 0 0 1 0 1) |
|
209 |
level: 0 |
|
210 |
hasCharacterOrientedLabel: false |
|
211 |
translateLabel: true |
|
212 |
model: closeAction |
|
213 |
) |
|
214 |
(LinkButtonSpec |
|
215 |
label: '...' |
|
216 |
name: 'Browslet' |
|
217 |
layout: (LayoutFrame 25 0 0 0 -25 1 0 1) |
|
218 |
translateLabel: true |
|
219 |
adjust: left |
|
220 |
model: popupAction |
|
221 |
) |
|
222 |
) |
|
223 |
||
224 |
) |
|
225 |
) |
|
226 |
(SubCanvasSpec |
|
227 |
name: 'Browslet' |
|
228 |
layout: (LayoutFrame 0 0 20 0 0 1 0 1) |
|
229 |
hasHorizontalScrollBar: false |
|
230 |
hasVerticalScrollBar: false |
|
231 |
clientHolder: browsletHolder |
|
232 |
createNewBuilder: false |
|
233 |
) |
|
234 |
) |
|
235 |
||
236 |
) |
|
237 |
) |
|
238 |
||
239 |
"Modified: / 04-10-2010 / 23:36:18 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
240 |
! ! |
|
241 |
||
242 |
!BrowsletCanvas methodsFor:'actions'! |
|
243 |
||
244 |
closeAction |
|
245 |
<resource: #uiCallback> |
|
246 |
||
247 |
| topApp | |
|
248 |
topApp := self masterApplication. |
|
249 |
topApp |
|
250 |
ifNil:[self closeRequest] |
|
251 |
ifNotNil:[topApp showPlugin: false] |
|
252 |
||
253 |
"Modified: / 04-10-2010 / 18:39:03 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
254 |
! |
|
255 |
||
256 |
popupAction |
|
257 |
<resource: #uiCallback> |
|
258 |
||
259 |
| menu | |
|
260 |
menu := Menu new. |
|
261 |
(Browslet all asSortedCollection:[:a :b|a label < b label]) do: |
|
262 |
[ :browslet | | item | |
|
263 |
menu addItem: |
|
264 |
(MenuItem |
|
265 |
label: browslet label |
|
266 |
value: [ self show: browslet ])]. |
|
267 |
menu showAtPointer. |
|
268 |
||
269 |
"Modified: / 04-10-2010 / 23:02:58 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
270 |
! ! |
|
271 |
||
272 |
!BrowsletCanvas methodsFor:'aspects'! |
|
273 |
||
274 |
browsletHolder |
|
275 |
"return/create the 'browsletHolder' value holder (automatically generated)" |
|
276 |
||
277 |
browsletHolder isNil ifTrue:[ |
|
278 |
browsletHolder := ValueHolder new. |
|
279 |
]. |
|
280 |
^ browsletHolder |
|
281 |
! ! |
|
282 |
||
283 |
!BrowsletCanvas methodsFor:'private'! |
|
284 |
||
285 |
show: browsletClass |
|
286 |
||
287 |
self browsletHolder value: browsletClass new |
|
288 |
||
289 |
"Created: / 04-10-2010 / 23:03:58 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
290 |
! ! |
|
291 |
||
292 |
!BrowsletCanvas class methodsFor:'documentation'! |
|
293 |
||
294 |
version_CVS |
|
12123
4bde08cebd48
trunk branched into /branches/jv
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
10043
diff
changeset
|
295 |
^ '§Header: /cvs/stx/stx/libtool/Tools__BrowsletCanvas.st,v 1.2 2011/07/03 13:40:28 cg Exp §' |
9965 | 296 |
! |
297 |
||
298 |
version_SVN |
|
12128
a7ff7d66ee85
Improvements in LintHighlighter, few fixes
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
12123
diff
changeset
|
299 |
^ '$Id: Tools__BrowsletCanvas.st 7854 2012-01-30 17:49:41Z vranyj1 $' |
12123
4bde08cebd48
trunk branched into /branches/jv
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
10043
diff
changeset
|
300 |
! ! |