author | Jan Vrany <jan.vrany@fit.cvut.cz> |
Thu, 07 Feb 2019 12:16:15 +0000 | |
branch | jv |
changeset 6065 | e880a0b1320b |
parent 4770 | 6634b540fea2 |
permissions | -rw-r--r-- |
789
c2401c3c9e29
added copyright & documentation
Claus Gittinger <cg@exept.de>
parents:
753
diff
changeset
|
1 |
" |
c2401c3c9e29
added copyright & documentation
Claus Gittinger <cg@exept.de>
parents:
753
diff
changeset
|
2 |
COPYRIGHT (c) 1998 by eXept Software AG |
3150 | 3 |
All Rights Reserved |
789
c2401c3c9e29
added copyright & documentation
Claus Gittinger <cg@exept.de>
parents:
753
diff
changeset
|
4 |
|
c2401c3c9e29
added copyright & documentation
Claus Gittinger <cg@exept.de>
parents:
753
diff
changeset
|
5 |
This software is furnished under a license and may be used |
c2401c3c9e29
added copyright & documentation
Claus Gittinger <cg@exept.de>
parents:
753
diff
changeset
|
6 |
only in accordance with the terms of that license and with the |
c2401c3c9e29
added copyright & documentation
Claus Gittinger <cg@exept.de>
parents:
753
diff
changeset
|
7 |
inclusion of the above copyright notice. This software may not |
c2401c3c9e29
added copyright & documentation
Claus Gittinger <cg@exept.de>
parents:
753
diff
changeset
|
8 |
be provided or otherwise made available to, or used by, any |
c2401c3c9e29
added copyright & documentation
Claus Gittinger <cg@exept.de>
parents:
753
diff
changeset
|
9 |
other person. No title to or ownership of the software is |
c2401c3c9e29
added copyright & documentation
Claus Gittinger <cg@exept.de>
parents:
753
diff
changeset
|
10 |
hereby transferred. |
c2401c3c9e29
added copyright & documentation
Claus Gittinger <cg@exept.de>
parents:
753
diff
changeset
|
11 |
" |
3150 | 12 |
"{ Package: 'stx:libwidg2' }" |
789
c2401c3c9e29
added copyright & documentation
Claus Gittinger <cg@exept.de>
parents:
753
diff
changeset
|
13 |
|
4770
6634b540fea2
Added PluggableHierarchicalList to define ad-hoc tree models.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3307
diff
changeset
|
14 |
"{ NameSpace: Smalltalk }" |
6634b540fea2
Added PluggableHierarchicalList to define ad-hoc tree models.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3307
diff
changeset
|
15 |
|
740 | 16 |
GraphColumnViewSpec subclass:#GraphColumnView2DSpec |
17 |
instanceVariableNames:'gridX gridY actionBlock doubleClickBlock buttonReleaseBlock |
|
18 |
menuAccessBlock' |
|
19 |
classVariableNames:'' |
|
20 |
poolDictionaries:'' |
|
21 |
category:'Interface-Support-UI-Specs' |
|
22 |
! |
|
23 |
||
789
c2401c3c9e29
added copyright & documentation
Claus Gittinger <cg@exept.de>
parents:
753
diff
changeset
|
24 |
!GraphColumnView2DSpec class methodsFor:'documentation'! |
c2401c3c9e29
added copyright & documentation
Claus Gittinger <cg@exept.de>
parents:
753
diff
changeset
|
25 |
|
c2401c3c9e29
added copyright & documentation
Claus Gittinger <cg@exept.de>
parents:
753
diff
changeset
|
26 |
copyright |
c2401c3c9e29
added copyright & documentation
Claus Gittinger <cg@exept.de>
parents:
753
diff
changeset
|
27 |
" |
c2401c3c9e29
added copyright & documentation
Claus Gittinger <cg@exept.de>
parents:
753
diff
changeset
|
28 |
COPYRIGHT (c) 1998 by eXept Software AG |
3150 | 29 |
All Rights Reserved |
789
c2401c3c9e29
added copyright & documentation
Claus Gittinger <cg@exept.de>
parents:
753
diff
changeset
|
30 |
|
c2401c3c9e29
added copyright & documentation
Claus Gittinger <cg@exept.de>
parents:
753
diff
changeset
|
31 |
This software is furnished under a license and may be used |
c2401c3c9e29
added copyright & documentation
Claus Gittinger <cg@exept.de>
parents:
753
diff
changeset
|
32 |
only in accordance with the terms of that license and with the |
c2401c3c9e29
added copyright & documentation
Claus Gittinger <cg@exept.de>
parents:
753
diff
changeset
|
33 |
inclusion of the above copyright notice. This software may not |
c2401c3c9e29
added copyright & documentation
Claus Gittinger <cg@exept.de>
parents:
753
diff
changeset
|
34 |
be provided or otherwise made available to, or used by, any |
c2401c3c9e29
added copyright & documentation
Claus Gittinger <cg@exept.de>
parents:
753
diff
changeset
|
35 |
other person. No title to or ownership of the software is |
c2401c3c9e29
added copyright & documentation
Claus Gittinger <cg@exept.de>
parents:
753
diff
changeset
|
36 |
hereby transferred. |
c2401c3c9e29
added copyright & documentation
Claus Gittinger <cg@exept.de>
parents:
753
diff
changeset
|
37 |
" |
c2401c3c9e29
added copyright & documentation
Claus Gittinger <cg@exept.de>
parents:
753
diff
changeset
|
38 |
|
c2401c3c9e29
added copyright & documentation
Claus Gittinger <cg@exept.de>
parents:
753
diff
changeset
|
39 |
! |
c2401c3c9e29
added copyright & documentation
Claus Gittinger <cg@exept.de>
parents:
753
diff
changeset
|
40 |
|
c2401c3c9e29
added copyright & documentation
Claus Gittinger <cg@exept.de>
parents:
753
diff
changeset
|
41 |
documentation |
c2401c3c9e29
added copyright & documentation
Claus Gittinger <cg@exept.de>
parents:
753
diff
changeset
|
42 |
" |
c2401c3c9e29
added copyright & documentation
Claus Gittinger <cg@exept.de>
parents:
753
diff
changeset
|
43 |
Not normally used by applications. |
c2401c3c9e29
added copyright & documentation
Claus Gittinger <cg@exept.de>
parents:
753
diff
changeset
|
44 |
|
c2401c3c9e29
added copyright & documentation
Claus Gittinger <cg@exept.de>
parents:
753
diff
changeset
|
45 |
[author:] |
3150 | 46 |
Claus Atzkern |
789
c2401c3c9e29
added copyright & documentation
Claus Gittinger <cg@exept.de>
parents:
753
diff
changeset
|
47 |
|
c2401c3c9e29
added copyright & documentation
Claus Gittinger <cg@exept.de>
parents:
753
diff
changeset
|
48 |
[see also:] |
3150 | 49 |
UIBuilder |
50 |
UIPainter |
|
789
c2401c3c9e29
added copyright & documentation
Claus Gittinger <cg@exept.de>
parents:
753
diff
changeset
|
51 |
" |
c2401c3c9e29
added copyright & documentation
Claus Gittinger <cg@exept.de>
parents:
753
diff
changeset
|
52 |
! ! |
740 | 53 |
|
54 |
!GraphColumnView2DSpec class methodsFor:'interface - painter'! |
|
55 |
||
3150 | 56 |
addBindingsTo:env for:inst channel:aChannel |
740 | 57 |
|
58 |
super addBindingsTo:env for:inst channel:aChannel. |
|
59 |
||
3150 | 60 |
self |
61 |
adaptApects: |
|
62 |
#( |
|
63 |
actionBlock |
|
64 |
doubleClickBlock |
|
65 |
buttonReleaseBlock |
|
66 |
menuAccessBlock |
|
67 |
) |
|
68 |
to:env |
|
69 |
for:inst |
|
70 |
channel:aChannel |
|
71 |
converter:#symbolOrNil. |
|
740 | 72 |
|
3150 | 73 |
self |
74 |
adaptApects: |
|
75 |
#( |
|
76 |
gridX |
|
77 |
gridY |
|
78 |
) |
|
79 |
to:env |
|
80 |
for:inst |
|
81 |
channel:aChannel |
|
82 |
converter:#numberOrNil. |
|
740 | 83 |
|
84 |
! |
|
85 |
||
86 |
slices |
|
87 |
^ #( |
|
3150 | 88 |
(Basics basicsEditSpec) |
89 |
(Details detailsEditSpec) |
|
90 |
(Misc basicsMiscSpec) |
|
740 | 91 |
) |
92 |
||
93 |
! ! |
|
94 |
||
95 |
!GraphColumnView2DSpec class methodsFor:'interface specs'! |
|
96 |
||
751 | 97 |
basicsMiscSpec |
1656 | 98 |
"This resource specification was automatically generated |
99 |
by the UIPainter of ST/X." |
|
751 | 100 |
|
1656 | 101 |
"Do not manually edit this!! If it is corrupted, |
102 |
the UIPainter may not be able to read the specification." |
|
751 | 103 |
|
104 |
" |
|
1656 | 105 |
UIPainter new openOnClass:GraphColumnView2DSpec andSelector:#basicsMiscSpec |
751 | 106 |
" |
107 |
||
108 |
<resource: #canvas> |
|
109 |
||
3150 | 110 |
^ |
1656 | 111 |
#(#FullSpec |
3150 | 112 |
#name: #basicsMiscSpec |
113 |
#window: |
|
1656 | 114 |
#(#WindowSpec |
3150 | 115 |
#label: 'Graph 2D Misc' |
116 |
#name: 'Graph 2D Misc' |
|
117 |
#min: #(#Point 10 10) |
|
118 |
#max: #(#Point 1160 870) |
|
119 |
#bounds: #(#Rectangle 886 214 1227 439) |
|
120 |
) |
|
121 |
#component: |
|
1656 | 122 |
#(#SpecCollection |
3150 | 123 |
#collection: #( |
124 |
#(#LabelSpec |
|
125 |
#label: 'Button Event Callbacks:' |
|
126 |
#name: 'buttonCallbacks' |
|
127 |
#layout: #(#LayoutOrigin 20 0 29 0) |
|
128 |
#resizeForLabel: true |
|
129 |
#adjust: #left |
|
130 |
) |
|
131 |
#(#LabelSpec |
|
132 |
#label: 'Single Click:' |
|
133 |
#name: 'singleClickLabel' |
|
134 |
#layout: #(#AlignmentOrigin 135 0 67 0 1 0.5) |
|
135 |
#resizeForLabel: true |
|
136 |
#adjust: #right |
|
137 |
) |
|
138 |
#(#InputFieldSpec |
|
139 |
#attributes: |
|
140 |
#(#singleClickField |
|
141 |
nil #tabable |
|
142 |
true |
|
143 |
) |
|
144 |
#name: 'singleClickField' |
|
145 |
#layout: #(#LayoutFrame 139 0 55 0 -2 1 80 0) |
|
146 |
#tabable: true |
|
147 |
#model: #actionBlock |
|
148 |
#acceptChannel: #acceptChannel |
|
149 |
#modifiedChannel: #modifiedChannel |
|
150 |
#acceptOnPointerLeave: false |
|
151 |
) |
|
152 |
#(#LabelSpec |
|
153 |
#label: 'Double Click:' |
|
154 |
#name: 'doubleClickLabel' |
|
155 |
#layout: #(#AlignmentOrigin 135 0 95 0 1 0.5) |
|
156 |
#resizeForLabel: true |
|
157 |
#adjust: #right |
|
158 |
) |
|
159 |
#(#InputFieldSpec |
|
160 |
#attributes: |
|
161 |
#(#doubleClickField |
|
162 |
nil #tabable |
|
163 |
true |
|
164 |
) |
|
165 |
#name: 'doubleClickField' |
|
166 |
#layout: #(#LayoutFrame 139 0 83 0 -2 1 108 0) |
|
167 |
#tabable: true |
|
168 |
#model: #doubleClickBlock |
|
169 |
#acceptChannel: #acceptChannel |
|
170 |
#modifiedChannel: #modifiedChannel |
|
171 |
#acceptOnPointerLeave: false |
|
172 |
) |
|
173 |
#(#LabelSpec |
|
174 |
#label: 'Release Button:' |
|
175 |
#name: 'releaseButtonLabel' |
|
176 |
#layout: #(#AlignmentOrigin 135 0 124 0 1 0.5) |
|
177 |
#resizeForLabel: true |
|
178 |
#adjust: #right |
|
179 |
) |
|
180 |
#(#InputFieldSpec |
|
181 |
#attributes: |
|
182 |
#(#tabable |
|
183 |
true #releaseButtonField |
|
184 |
nil |
|
185 |
) |
|
186 |
#name: 'releaseButtonField' |
|
187 |
#layout: #(#LayoutFrame 139 0 112 0 -2 1 137 0) |
|
188 |
#tabable: true |
|
189 |
#model: #buttonReleaseBlock |
|
190 |
#acceptChannel: #acceptChannel |
|
191 |
#modifiedChannel: #modifiedChannel |
|
192 |
#acceptOnPointerLeave: false |
|
193 |
) |
|
194 |
#(#LabelSpec |
|
195 |
#label: 'Menu Access:' |
|
196 |
#name: 'menuAccessLabel' |
|
197 |
#layout: #(#AlignmentOrigin 135 0 202 0 1 0.5) |
|
198 |
#resizeForLabel: true |
|
199 |
#adjust: #right |
|
200 |
) |
|
201 |
#(#InputFieldSpec |
|
202 |
#attributes: |
|
203 |
#(#tabable |
|
204 |
true #menuAccessField |
|
205 |
nil |
|
206 |
) |
|
207 |
#name: 'menuAccessField' |
|
208 |
#layout: #(#LayoutFrame 139 0 190 0 -2 1 215 0) |
|
209 |
#tabable: true |
|
210 |
#model: #menuAccessBlock |
|
211 |
#acceptChannel: #acceptChannel |
|
212 |
#modifiedChannel: #modifiedChannel |
|
213 |
#acceptOnPointerLeave: false |
|
214 |
) |
|
215 |
#(#LabelSpec |
|
216 |
#label: 'Menu Callbacks:' |
|
217 |
#name: 'menuCallbacks' |
|
218 |
#layout: #(#LayoutOrigin 20 0 165 0) |
|
219 |
#resizeForLabel: true |
|
220 |
#adjust: #left |
|
221 |
) |
|
222 |
) |
|
223 |
||
224 |
) |
|
751 | 225 |
) |
226 |
! |
|
227 |
||
228 |
detailsEditSpec |
|
904 | 229 |
"This resource specification was automatically generated |
230 |
by the UIPainter of ST/X." |
|
751 | 231 |
|
904 | 232 |
"Do not manually edit this!! If it is corrupted, |
233 |
the UIPainter may not be able to read the specification." |
|
751 | 234 |
|
235 |
" |
|
236 |
UIPainter new openOnClass:GraphColumnView2DSpec andSelector:#detailsEditSpec |
|
237 |
" |
|
238 |
||
239 |
<resource: #canvas> |
|
240 |
||
3150 | 241 |
^ |
1656 | 242 |
#(#FullSpec |
3150 | 243 |
#name: #detailsEditSpec |
244 |
#window: |
|
1656 | 245 |
#(#WindowSpec |
3150 | 246 |
#label: 'Graph 2D Detail' |
247 |
#name: 'Graph 2D Detail' |
|
248 |
#min: #(#Point 10 10) |
|
249 |
#max: #(#Point 1160 870) |
|
250 |
#bounds: #(#Rectangle 886 214 1260 487) |
|
251 |
) |
|
252 |
#component: |
|
1656 | 253 |
#(#SpecCollection |
3150 | 254 |
#collection: #( |
255 |
#(#UISubSpecification |
|
256 |
#name: 'subDetailsSpec' |
|
257 |
#layout: #(#LayoutFrame 0 0.0 0 0 0 1.0 186 0) |
|
258 |
#majorKey: #GraphColumnViewSpec |
|
259 |
#minorKey: #subDetailsEditSpec |
|
260 |
) |
|
261 |
#(#LabelSpec |
|
262 |
#label: 'Grid Extent X:' |
|
263 |
#name: 'extentXlabel' |
|
264 |
#layout: #(#AlignmentOrigin 157 0 207 0 1 0.5) |
|
265 |
#resizeForLabel: true |
|
266 |
#adjust: #left |
|
267 |
) |
|
268 |
#(#InputFieldSpec |
|
269 |
#attributes: |
|
270 |
#(#extentXfield |
|
271 |
nil #tabable |
|
272 |
true |
|
273 |
) |
|
274 |
#name: 'extentXfield' |
|
275 |
#layout: #(#LayoutFrame 161 0 197 0 190 0 219 0) |
|
276 |
#tabable: true |
|
277 |
#model: #gridX |
|
278 |
#acceptChannel: #acceptChannel |
|
279 |
#modifiedChannel: #modifiedChannel |
|
280 |
#acceptOnPointerLeave: false |
|
281 |
) |
|
282 |
#(#LabelSpec |
|
283 |
#label: 'Y:' |
|
284 |
#name: 'extentYlabel' |
|
285 |
#layout: #(#AlignmentOrigin 214 0 207 0 1 0.5) |
|
286 |
#resizeForLabel: true |
|
287 |
#adjust: #left |
|
288 |
) |
|
289 |
#(#InputFieldSpec |
|
290 |
#attributes: |
|
291 |
#(#tabable |
|
292 |
true #extentYfield |
|
293 |
nil |
|
294 |
) |
|
295 |
#name: 'extentYfield' |
|
296 |
#layout: #(#LayoutFrame 217 0 197 0 246 0 219 0) |
|
297 |
#tabable: true |
|
298 |
#model: #gridY |
|
299 |
#acceptChannel: #acceptChannel |
|
300 |
#modifiedChannel: #modifiedChannel |
|
301 |
#acceptOnPointerLeave: false |
|
302 |
) |
|
303 |
#(#CheckBoxSpec |
|
304 |
#attributes: |
|
305 |
#(#tabable |
|
306 |
true |
|
307 |
) |
|
308 |
#label: 'Show Grid' |
|
309 |
#name: 'showGrid' |
|
310 |
#layout: #(#Point 27 235) |
|
311 |
#tabable: true |
|
312 |
#model: #showGrid |
|
313 |
) |
|
314 |
) |
|
315 |
||
316 |
) |
|
751 | 317 |
) |
740 | 318 |
! ! |
319 |
||
320 |
!GraphColumnView2DSpec methodsFor:'accessing'! |
|
321 |
||
322 |
actionBlock |
|
323 |
"return the value of the instance variable 'actionBlock' (automatically generated)" |
|
324 |
||
3305
4fa0a476b474
defineCallBackActionFor -> callBackActionFor;
Claus Gittinger <cg@exept.de>
parents:
3150
diff
changeset
|
325 |
^ actionBlock |
4fa0a476b474
defineCallBackActionFor -> callBackActionFor;
Claus Gittinger <cg@exept.de>
parents:
3150
diff
changeset
|
326 |
! |
740 | 327 |
|
328 |
actionBlock:something |
|
329 |
"set the value of the instance variable 'actionBlock' (automatically generated)" |
|
330 |
||
3305
4fa0a476b474
defineCallBackActionFor -> callBackActionFor;
Claus Gittinger <cg@exept.de>
parents:
3150
diff
changeset
|
331 |
actionBlock := something. |
4fa0a476b474
defineCallBackActionFor -> callBackActionFor;
Claus Gittinger <cg@exept.de>
parents:
3150
diff
changeset
|
332 |
! |
740 | 333 |
|
334 |
buttonReleaseBlock |
|
335 |
"return the value of the instance variable 'buttonReleaseBlock' (automatically generated)" |
|
336 |
||
3305
4fa0a476b474
defineCallBackActionFor -> callBackActionFor;
Claus Gittinger <cg@exept.de>
parents:
3150
diff
changeset
|
337 |
^ buttonReleaseBlock |
4fa0a476b474
defineCallBackActionFor -> callBackActionFor;
Claus Gittinger <cg@exept.de>
parents:
3150
diff
changeset
|
338 |
! |
740 | 339 |
|
340 |
buttonReleaseBlock:something |
|
341 |
"set the value of the instance variable 'buttonReleaseBlock' (automatically generated)" |
|
342 |
||
3305
4fa0a476b474
defineCallBackActionFor -> callBackActionFor;
Claus Gittinger <cg@exept.de>
parents:
3150
diff
changeset
|
343 |
buttonReleaseBlock := something. |
4fa0a476b474
defineCallBackActionFor -> callBackActionFor;
Claus Gittinger <cg@exept.de>
parents:
3150
diff
changeset
|
344 |
! |
740 | 345 |
|
346 |
doubleClickBlock |
|
347 |
"return the value of the instance variable 'doubleClickBlock' (automatically generated)" |
|
348 |
||
3305
4fa0a476b474
defineCallBackActionFor -> callBackActionFor;
Claus Gittinger <cg@exept.de>
parents:
3150
diff
changeset
|
349 |
^ doubleClickBlock |
4fa0a476b474
defineCallBackActionFor -> callBackActionFor;
Claus Gittinger <cg@exept.de>
parents:
3150
diff
changeset
|
350 |
! |
740 | 351 |
|
352 |
doubleClickBlock:something |
|
353 |
"set the value of the instance variable 'doubleClickBlock' (automatically generated)" |
|
354 |
||
3305
4fa0a476b474
defineCallBackActionFor -> callBackActionFor;
Claus Gittinger <cg@exept.de>
parents:
3150
diff
changeset
|
355 |
doubleClickBlock := something. |
4fa0a476b474
defineCallBackActionFor -> callBackActionFor;
Claus Gittinger <cg@exept.de>
parents:
3150
diff
changeset
|
356 |
! |
740 | 357 |
|
358 |
gridX |
|
359 |
"return the value of the instance variable 'gridX' (automatically generated)" |
|
360 |
||
361 |
^ gridX ? 0 |
|
362 |
! |
|
363 |
||
364 |
gridX:something |
|
365 |
"set the value of the instance variable 'gridX' (automatically generated)" |
|
366 |
||
3305
4fa0a476b474
defineCallBackActionFor -> callBackActionFor;
Claus Gittinger <cg@exept.de>
parents:
3150
diff
changeset
|
367 |
gridX := something. |
4fa0a476b474
defineCallBackActionFor -> callBackActionFor;
Claus Gittinger <cg@exept.de>
parents:
3150
diff
changeset
|
368 |
! |
740 | 369 |
|
370 |
gridY |
|
371 |
"return the value of the instance variable 'gridY' (automatically generated)" |
|
372 |
||
373 |
^ gridY ? 0 |
|
374 |
! |
|
375 |
||
376 |
gridY:something |
|
377 |
"set the value of the instance variable 'gridY' (automatically generated)" |
|
378 |
||
3305
4fa0a476b474
defineCallBackActionFor -> callBackActionFor;
Claus Gittinger <cg@exept.de>
parents:
3150
diff
changeset
|
379 |
gridY := something. |
4fa0a476b474
defineCallBackActionFor -> callBackActionFor;
Claus Gittinger <cg@exept.de>
parents:
3150
diff
changeset
|
380 |
! |
740 | 381 |
|
382 |
menuAccessBlock |
|
383 |
"return the value of the instance variable 'menuAccessBlock' (automatically generated)" |
|
384 |
||
3305
4fa0a476b474
defineCallBackActionFor -> callBackActionFor;
Claus Gittinger <cg@exept.de>
parents:
3150
diff
changeset
|
385 |
^ menuAccessBlock |
4fa0a476b474
defineCallBackActionFor -> callBackActionFor;
Claus Gittinger <cg@exept.de>
parents:
3150
diff
changeset
|
386 |
! |
740 | 387 |
|
388 |
menuAccessBlock:something |
|
389 |
"set the value of the instance variable 'menuAccessBlock' (automatically generated)" |
|
390 |
||
3305
4fa0a476b474
defineCallBackActionFor -> callBackActionFor;
Claus Gittinger <cg@exept.de>
parents:
3150
diff
changeset
|
391 |
menuAccessBlock := something. |
4fa0a476b474
defineCallBackActionFor -> callBackActionFor;
Claus Gittinger <cg@exept.de>
parents:
3150
diff
changeset
|
392 |
! ! |
740 | 393 |
|
394 |
!GraphColumnView2DSpec methodsFor:'building'! |
|
395 |
||
396 |
actionSelectors |
|
3307
15f429081b7c
ca's english language and wierd indentation code cleanup
Claus Gittinger <cg@exept.de>
parents:
3305
diff
changeset
|
397 |
"add more action selectors (these generate callBack stub methods in the definer)" |
15f429081b7c
ca's english language and wierd indentation code cleanup
Claus Gittinger <cg@exept.de>
parents:
3305
diff
changeset
|
398 |
|
740 | 399 |
|more| |
400 |
||
401 |
more := super actionSelectors. |
|
402 |
||
403 |
actionBlock notNil ifTrue:[more add:actionBlock]. |
|
404 |
doubleClickBlock notNil ifTrue:[more add:doubleClickBlock]. |
|
405 |
buttonReleaseBlock notNil ifTrue:[more add:buttonReleaseBlock]. |
|
406 |
menuAccessBlock notNil ifTrue:[more add:menuAccessBlock]. |
|
407 |
||
3307
15f429081b7c
ca's english language and wierd indentation code cleanup
Claus Gittinger <cg@exept.de>
parents:
3305
diff
changeset
|
408 |
^ more |
740 | 409 |
! |
410 |
||
411 |
defineCallBackActionFor:aSelector with:aBuilder |
|
412 |
||
413 |
|appl args| |
|
414 |
||
415 |
( aSelector isNil |
|
416 |
or:[aBuilder isEditing |
|
417 |
or:[(appl := aBuilder application) isNil]] |
|
418 |
) ifTrue:[ |
|
3150 | 419 |
^ nil |
740 | 420 |
]. |
421 |
||
422 |
args := aSelector numArgs. |
|
423 |
||
424 |
args == 0 ifTrue:[ ^ [ appl perform:aSelector] ]. |
|
425 |
args == 1 ifTrue:[ ^ [:a1| appl perform:aSelector with:a1] ]. |
|
426 |
args == 2 ifTrue:[ ^ [:a1 :a2| appl perform:aSelector with:a1 with:a2] ]. |
|
427 |
args == 3 ifTrue:[ ^ [:a1 :a2 :a3| appl perform:aSelector with:a1 with:a2 with:a3] ]. |
|
428 |
args == 4 ifTrue:[ ^ [:a1 :a2 :a3 :a4| appl perform:aSelector with:a1 with:a2 with:a3 with:a4] ]. |
|
429 |
||
430 |
^ nil |
|
431 |
! |
|
432 |
||
433 |
setAttributesIn:aView with:aBuilder |
|
434 |
||
435 |
super setAttributesIn:aView with:aBuilder. |
|
436 |
||
753 | 437 |
aBuilder isEditing ifFalse:[ |
3305
4fa0a476b474
defineCallBackActionFor -> callBackActionFor;
Claus Gittinger <cg@exept.de>
parents:
3150
diff
changeset
|
438 |
aView gridExtent:(self gridX @ self gridY). |
4fa0a476b474
defineCallBackActionFor -> callBackActionFor;
Claus Gittinger <cg@exept.de>
parents:
3150
diff
changeset
|
439 |
actionBlock notNil ifTrue:[ |
4fa0a476b474
defineCallBackActionFor -> callBackActionFor;
Claus Gittinger <cg@exept.de>
parents:
3150
diff
changeset
|
440 |
aView action:(self callBackActionFor:actionBlock with:aBuilder). |
4fa0a476b474
defineCallBackActionFor -> callBackActionFor;
Claus Gittinger <cg@exept.de>
parents:
3150
diff
changeset
|
441 |
]. |
4fa0a476b474
defineCallBackActionFor -> callBackActionFor;
Claus Gittinger <cg@exept.de>
parents:
3150
diff
changeset
|
442 |
doubleClickBlock notNil ifTrue:[ |
4fa0a476b474
defineCallBackActionFor -> callBackActionFor;
Claus Gittinger <cg@exept.de>
parents:
3150
diff
changeset
|
443 |
aView doubleClickAction:(self callBackActionFor:doubleClickBlock with:aBuilder). |
4fa0a476b474
defineCallBackActionFor -> callBackActionFor;
Claus Gittinger <cg@exept.de>
parents:
3150
diff
changeset
|
444 |
]. |
4fa0a476b474
defineCallBackActionFor -> callBackActionFor;
Claus Gittinger <cg@exept.de>
parents:
3150
diff
changeset
|
445 |
buttonReleaseBlock notNil ifTrue:[ |
4fa0a476b474
defineCallBackActionFor -> callBackActionFor;
Claus Gittinger <cg@exept.de>
parents:
3150
diff
changeset
|
446 |
aView buttonReleaseBlock:(self callBackActionFor:buttonReleaseBlock with:aBuilder). |
4fa0a476b474
defineCallBackActionFor -> callBackActionFor;
Claus Gittinger <cg@exept.de>
parents:
3150
diff
changeset
|
447 |
]. |
4fa0a476b474
defineCallBackActionFor -> callBackActionFor;
Claus Gittinger <cg@exept.de>
parents:
3150
diff
changeset
|
448 |
menuAccessBlock notNil ifTrue:[ |
4fa0a476b474
defineCallBackActionFor -> callBackActionFor;
Claus Gittinger <cg@exept.de>
parents:
3150
diff
changeset
|
449 |
aView menuAccessBlock:(self callBackActionFor:menuAccessBlock with:aBuilder). |
4fa0a476b474
defineCallBackActionFor -> callBackActionFor;
Claus Gittinger <cg@exept.de>
parents:
3150
diff
changeset
|
450 |
] |
740 | 451 |
] |
452 |
! ! |
|
453 |
||
454 |
!GraphColumnView2DSpec methodsFor:'converting'! |
|
455 |
||
456 |
skippedInLiteralEncoding |
|
457 |
"define the inst-slots which are skiped when generating a literalArrayEncoding" |
|
458 |
||
459 |
|l| |
|
460 |
||
461 |
l := super skippedInLiteralEncoding asOrderedCollection. |
|
462 |
||
742 | 463 |
actionBlock isNil ifTrue:[l add:#actionBlock]. |
464 |
doubleClickBlock isNil ifTrue:[l add:#doubleClickBlock]. |
|
465 |
buttonReleaseBlock isNil ifTrue:[l add:#buttonReleaseBlock]. |
|
466 |
menuAccessBlock isNil ifTrue:[l add:#menuAccessBlock]. |
|
740 | 467 |
|
468 |
^ l |
|
469 |
||
470 |
||
471 |
||
472 |
||
473 |
! ! |
|
474 |
||
475 |
!GraphColumnView2DSpec methodsFor:'parsing a view'! |
|
476 |
||
477 |
fromView:aView callBack:aBlock |
|
478 |
||
479 |
gridX := aView gridX. |
|
480 |
gridY := aView gridY. |
|
481 |
||
482 |
super fromView:aView callBack:aBlock |
|
483 |
||
484 |
||
485 |
! ! |
|
486 |
||
487 |
!GraphColumnView2DSpec class methodsFor:'documentation'! |
|
488 |
||
489 |
version |
|
3307
15f429081b7c
ca's english language and wierd indentation code cleanup
Claus Gittinger <cg@exept.de>
parents:
3305
diff
changeset
|
490 |
^ '$Header: /cvs/stx/stx/libwidg2/GraphColumnView2DSpec.st,v 1.11 2008-01-10 13:00:51 cg Exp $' |
740 | 491 |
! ! |
4770
6634b540fea2
Added PluggableHierarchicalList to define ad-hoc tree models.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3307
diff
changeset
|
492 |