422
|
1 |
"
|
|
2 |
COPYRIGHT (c) 1995 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 |
|
|
14 |
|
412
|
15 |
MenuPanel subclass:#ColorMenu
|
664
|
16 |
instanceVariableNames:'model enabledChannel labelsAreColored'
|
666
|
17 |
classVariableNames:''
|
412
|
18 |
poolDictionaries:''
|
|
19 |
category:'Interface-UIPainter'
|
|
20 |
!
|
|
21 |
|
1057
|
22 |
SimpleDialog subclass:#DefineColor
|
|
23 |
instanceVariableNames:'red green blue'
|
|
24 |
classVariableNames:''
|
|
25 |
poolDictionaries:''
|
|
26 |
privateIn:ColorMenu
|
|
27 |
!
|
|
28 |
|
412
|
29 |
!ColorMenu class methodsFor:'documentation'!
|
|
30 |
|
422
|
31 |
copyright
|
|
32 |
"
|
|
33 |
COPYRIGHT (c) 1995 by eXept Software AG
|
|
34 |
All Rights Reserved
|
|
35 |
|
|
36 |
This software is furnished under a license and may be used
|
|
37 |
only in accordance with the terms of that license and with the
|
|
38 |
inclusion of the above copyright notice. This software may not
|
|
39 |
be provided or otherwise made available to, or used by, any
|
|
40 |
other person. No title to or ownership of the software is
|
|
41 |
hereby transferred.
|
|
42 |
"
|
|
43 |
|
|
44 |
|
|
45 |
!
|
|
46 |
|
412
|
47 |
documentation
|
|
48 |
"
|
|
49 |
ColorMenu used by UIPainter
|
|
50 |
|
|
51 |
[see also:]
|
|
52 |
UIPainter
|
|
53 |
ColorMenuSpec
|
422
|
54 |
|
|
55 |
[author:]
|
|
56 |
Claus Atzkern
|
412
|
57 |
"
|
|
58 |
|
|
59 |
!
|
|
60 |
|
|
61 |
examples
|
|
62 |
"
|
|
63 |
simple example
|
|
64 |
[exBegin]
|
|
65 |
|tool top channel|
|
|
66 |
|
|
67 |
top := StandardSystemView new.
|
|
68 |
top extent:250@30.
|
|
69 |
channel := (Color red) asValue.
|
|
70 |
tool := self origin:0.0@0.0 corner:1.0@1.0 in:top.
|
|
71 |
tool model:channel.
|
|
72 |
top open.
|
|
73 |
[exEnd]
|
|
74 |
"
|
|
75 |
|
|
76 |
! !
|
|
77 |
|
|
78 |
!ColorMenu class methodsFor:'menu spec'!
|
|
79 |
|
666
|
80 |
colorDefinition
|
|
81 |
"color definitions used to build a color menu
|
412
|
82 |
"
|
583
|
83 |
|
666
|
84 |
^ #(
|
668
|
85 |
#( gray
|
666
|
86 |
gray:
|
|
87 |
#( white
|
|
88 |
veryLightGray
|
|
89 |
lightGray
|
|
90 |
gray
|
|
91 |
darkGray
|
|
92 |
veryDarkGray
|
|
93 |
black
|
|
94 |
)
|
412
|
95 |
)
|
666
|
96 |
|
668
|
97 |
#( red
|
666
|
98 |
red:
|
854
|
99 |
#( lightened 100 87 67 50 33)
|
666
|
100 |
)
|
|
101 |
|
668
|
102 |
#( green
|
666
|
103 |
green:
|
854
|
104 |
#( lightened 100 87 67 50 33)
|
666
|
105 |
)
|
|
106 |
|
668
|
107 |
#( blue
|
666
|
108 |
blue:
|
854
|
109 |
#( lightened 100 87 67 50 33)
|
666
|
110 |
)
|
|
111 |
|
668
|
112 |
#( cyan
|
854
|
113 |
cyan:
|
|
114 |
#( lightened 100 87 67 50 33)
|
664
|
115 |
)
|
666
|
116 |
|
668
|
117 |
#( magenta
|
854
|
118 |
magenta:
|
|
119 |
#( lightened 100 87 67 50 33)
|
412
|
120 |
)
|
666
|
121 |
|
668
|
122 |
#( yellow
|
854
|
123 |
yellow:
|
|
124 |
#( lightened 100 87 67 50 33)
|
412
|
125 |
)
|
806
|
126 |
|
412
|
127 |
)
|
666
|
128 |
!
|
|
129 |
|
|
130 |
colorMenu:labelAreColored value:aValue
|
|
131 |
"returns a color menu
|
|
132 |
"
|
|
133 |
|menu fgOrBg mainCol style|
|
|
134 |
|
|
135 |
menu := Menu new.
|
|
136 |
style := labelAreColored == false ifTrue:[#backgroundColor] ifFalse:[#color].
|
|
137 |
|
|
138 |
self colorDefinition do:[:aSlice|
|
|
139 |
|size colOp color item smenu|
|
|
140 |
|
668
|
141 |
mainCol := Color perform:(aSlice at:1).
|
|
142 |
item := MenuItem labeled:(Text string:' ' emphasis:(#backgroundColor->mainCol)).
|
666
|
143 |
smenu := Menu new.
|
668
|
144 |
colOp := aSlice at:2.
|
412
|
145 |
|
668
|
146 |
(aSlice at:3) do:[:el||sitem label|
|
666
|
147 |
el isSymbol ifTrue:[
|
|
148 |
color := el == #lightened ifTrue:[mainCol perform:el] ifFalse:[Color perform:el].
|
854
|
149 |
self colorDefinition first ~~ aSlice
|
|
150 |
ifTrue: [label := (colOp upTo: $:), ' ', el]
|
|
151 |
ifFalse:[label := el].
|
666
|
152 |
] ifFalse:[
|
|
153 |
el isNumber ifTrue:[
|
|
154 |
color := Color perform:colOp with:el.
|
|
155 |
label := colOp, ' ', el printString.
|
|
156 |
] ifFalse:[
|
|
157 |
color := Color perform:colOp with:(el at:1) with:(el at:2) with:(el at:3).
|
|
158 |
label := ''.
|
|
159 |
colOp keywords keysAndValuesDo:[:i :c| label := label, ' ', c, ' ' , (el at:i) printString ].
|
|
160 |
]
|
|
161 |
].
|
|
162 |
sitem := MenuItem labeled:(Text string:('Color ', label) emphasis:(style->color)).
|
|
163 |
sitem argument:color.
|
|
164 |
sitem value:aValue.
|
|
165 |
smenu addItem:sitem.
|
|
166 |
].
|
|
167 |
item submenu:smenu.
|
|
168 |
item value:nil.
|
|
169 |
menu addItem:item
|
|
170 |
].
|
|
171 |
^ menu
|
|
172 |
"
|
|
173 |
(ColorMenu colorMenu:true value:nil) startUp
|
|
174 |
(ColorMenu colorMenu:false value:#aSelector:) startUp
|
|
175 |
"
|
592
|
176 |
! !
|
|
177 |
|
412
|
178 |
!ColorMenu methodsFor:'accept'!
|
|
179 |
|
|
180 |
accept:anItem
|
664
|
181 |
"accept current selected item"
|
|
182 |
|
412
|
183 |
|item holder color|
|
|
184 |
|
1057
|
185 |
((item := super accept:anItem) notNil and: [item label ~= '?'])
|
664
|
186 |
ifTrue:
|
|
187 |
[
|
|
188 |
(holder := self colorHolder) == item ifTrue:
|
|
189 |
[
|
412
|
190 |
enabledChannel value ifTrue:[color := self color]
|
664
|
191 |
]
|
|
192 |
ifFalse:
|
1057
|
193 |
[
|
666
|
194 |
color := item argument.
|
692
|
195 |
holder label:(Text string:' ' emphasis:(#backgroundColor->color)).
|
412
|
196 |
].
|
|
197 |
model notNil ifTrue:[model value:color]
|
|
198 |
]
|
|
199 |
! !
|
|
200 |
|
|
201 |
!ColorMenu methodsFor:'accessing'!
|
|
202 |
|
|
203 |
color
|
664
|
204 |
"get current color"
|
|
205 |
|
|
206 |
|firstEmphasis|
|
|
207 |
(firstEmphasis := (self colorHolder label emphasis at:1)) isAssociation ifTrue: [^firstEmphasis value].
|
|
208 |
^(firstEmphasis at: 1) value
|
412
|
209 |
!
|
|
210 |
|
|
211 |
color:aColor
|
664
|
212 |
"set current color"
|
|
213 |
|
412
|
214 |
|holder label|
|
|
215 |
|
664
|
216 |
aColor isColor
|
|
217 |
ifFalse:
|
|
218 |
[
|
412
|
219 |
enabledChannel value:false
|
664
|
220 |
]
|
|
221 |
ifTrue:
|
|
222 |
[
|
|
223 |
self disabledRedrawDo:
|
1057
|
224 |
[
|
664
|
225 |
holder := self colorHolder.
|
|
226 |
label := Text string: ' ' emphasis:(#backgroundColor->aColor).
|
412
|
227 |
enabledChannel value:true.
|
1057
|
228 |
holder label:label.
|
|
229 |
model value: aColor
|
412
|
230 |
]
|
|
231 |
]
|
664
|
232 |
!
|
|
233 |
|
|
234 |
labelsAreColored: aBoolean
|
|
235 |
"sets whether labels or their backgrounds will be colored"
|
|
236 |
|
|
237 |
labelsAreColored := aBoolean ? false.
|
|
238 |
self setupMenu
|
|
239 |
|
412
|
240 |
! !
|
|
241 |
|
|
242 |
!ColorMenu methodsFor:'accessing channels'!
|
|
243 |
|
|
244 |
model
|
664
|
245 |
"get my color channel"
|
|
246 |
|
|
247 |
^model
|
412
|
248 |
|
|
249 |
|
|
250 |
|
|
251 |
!
|
|
252 |
|
|
253 |
model:aValueHolder
|
664
|
254 |
"set my color channel"
|
|
255 |
|
|
256 |
model notNil ifTrue:[model removeDependent:self].
|
412
|
257 |
|
664
|
258 |
(model := aValueHolder) notNil
|
|
259 |
ifTrue:
|
|
260 |
[
|
412
|
261 |
model addDependent:self.
|
664
|
262 |
self color: model value
|
|
263 |
]
|
412
|
264 |
|
|
265 |
|
|
266 |
|
|
267 |
! !
|
|
268 |
|
|
269 |
!ColorMenu methodsFor:'accessing look'!
|
|
270 |
|
|
271 |
showSeparatingLines
|
664
|
272 |
"no drawing of separating lines here"
|
|
273 |
|
|
274 |
^true
|
|
275 |
|
412
|
276 |
! !
|
|
277 |
|
|
278 |
!ColorMenu methodsFor:'change & update'!
|
|
279 |
|
|
280 |
update:something with:aParameter from:changedObject
|
664
|
281 |
"one of my models changed its value"
|
|
282 |
|
|
283 |
changedObject == model ifTrue:[^self color: model value].
|
412
|
284 |
super update:something with:aParameter from:changedObject
|
|
285 |
|
|
286 |
|
|
287 |
|
|
288 |
|
|
289 |
! !
|
|
290 |
|
|
291 |
!ColorMenu methodsFor:'initialization'!
|
|
292 |
|
|
293 |
destroy
|
664
|
294 |
"release color channel dependency"
|
|
295 |
|
412
|
296 |
self model:nil.
|
664
|
297 |
super destroy
|
412
|
298 |
|
|
299 |
!
|
|
300 |
|
|
301 |
initialize
|
664
|
302 |
"setup menu"
|
|
303 |
|
412
|
304 |
super initialize.
|
664
|
305 |
labelsAreColored := false.
|
412
|
306 |
self verticalLayout:false.
|
|
307 |
self fitFirstPanel:false.
|
895
|
308 |
enabledChannel := ValueHolder with:false.
|
412
|
309 |
self setupMenu.
|
895
|
310 |
|
|
311 |
"Modified: / 21.5.1998 / 03:07:26 / cg"
|
412
|
312 |
!
|
|
313 |
|
|
314 |
setupMenu
|
664
|
315 |
"setup menu"
|
666
|
316 |
|menu item|
|
412
|
317 |
|
666
|
318 |
menu := self class colorMenu:labelsAreColored value:nil.
|
|
319 |
menu itemsDo:[:el| el isButton:true].
|
1057
|
320 |
menu addItem:((MenuItem labeled:'?') value:
|
|
321 |
[
|
|
322 |
|defineColor|
|
|
323 |
defineColor := DefineColor new color: self color.
|
|
324 |
defineColor open.
|
|
325 |
defineColor accept value ifTrue: [self color: defineColor color]
|
|
326 |
|
|
327 |
]; isButton: true) beforeIndex:8.
|
|
328 |
menu addItem:(MenuItem labeled:'') beforeIndex:8.
|
806
|
329 |
menu addItem:(MenuItem labeled:' ') beforeIndex:5.
|
|
330 |
menu addItem:(MenuItem labeled:' ') beforeIndex:2.
|
|
331 |
menu addItem:(MenuItem labeled:' ') beforeIndex:1.
|
|
332 |
|
666
|
333 |
item := MenuItem labeled:(Text string:' ' emphasis:(#backgroundColor->DefaultViewBackgroundColor)).
|
|
334 |
item value:#selection.
|
|
335 |
menu addItem:item beforeIndex:1.
|
806
|
336 |
|
|
337 |
|
412
|
338 |
self menu:menu.
|
|
339 |
|
666
|
340 |
self do:[:anItem|
|
|
341 |
(anItem submenu) notNil ifTrue:[
|
412
|
342 |
anItem enabled:enabledChannel.
|
666
|
343 |
] ifFalse:[
|
|
344 |
anItem value == #selection ifTrue:[anItem indication:enabledChannel]
|
1057
|
345 |
ifFalse:[anItem enabled:false].
|
|
346 |
anItem label = '?' ifTrue:[anItem enabled:enabledChannel]
|
412
|
347 |
]
|
664
|
348 |
]
|
412
|
349 |
! !
|
|
350 |
|
|
351 |
!ColorMenu methodsFor:'private'!
|
|
352 |
|
|
353 |
colorHolder
|
|
354 |
"returns the item which keeps the selected color in its label
|
|
355 |
"
|
|
356 |
^ self itemAt:#selection
|
|
357 |
! !
|
|
358 |
|
1057
|
359 |
!ColorMenu::DefineColor class methodsFor:'interface specs'!
|
|
360 |
|
|
361 |
windowSpec
|
|
362 |
"This resource specification was automatically generated
|
|
363 |
by the UIPainter of ST/X."
|
|
364 |
|
|
365 |
"Do not manually edit this!! If it is corrupted,
|
|
366 |
the UIPainter may not be able to read the specification."
|
|
367 |
|
|
368 |
"
|
|
369 |
UIPainter new openOnClass:ColorMenu::DefineColor andSelector:#windowSpec
|
|
370 |
ColorMenu::DefineColor new openInterface:#windowSpec
|
|
371 |
ColorMenu::DefineColor open
|
|
372 |
"
|
|
373 |
|
|
374 |
<resource: #canvas>
|
|
375 |
|
|
376 |
^
|
|
377 |
|
|
378 |
#(#FullSpec
|
|
379 |
#window:
|
|
380 |
#(#WindowSpec
|
|
381 |
#name: 'Define Color'
|
|
382 |
#layout: #(#LayoutFrame 154 0 369 0 493 0 488 0)
|
|
383 |
#label: 'Define Color'
|
|
384 |
#min: #(#Point 340 110)
|
|
385 |
#max: #(#Point 1152 900)
|
|
386 |
#bounds: #(#Rectangle 154 369 494 489)
|
|
387 |
#usePreferredExtent: false
|
|
388 |
)
|
|
389 |
#component:
|
|
390 |
#(#SpecCollection
|
|
391 |
#collection:
|
|
392 |
#(
|
|
393 |
#(#VerticalPanelViewSpec
|
|
394 |
#name: 'VerticalPanel1'
|
|
395 |
#layout: #(#LayoutFrame 0 0.0 0 0.0 60 0 -32 1.0)
|
|
396 |
#component:
|
|
397 |
#(#SpecCollection
|
|
398 |
#collection:
|
|
399 |
#(
|
|
400 |
#(#LabelSpec
|
|
401 |
#name: 'RedLabel'
|
|
402 |
#label: 'Red:'
|
|
403 |
#translateLabel: true
|
|
404 |
#adjust: #right
|
|
405 |
#extent: #(#Point 60 27)
|
|
406 |
)
|
|
407 |
#(#LabelSpec
|
|
408 |
#name: 'GreenLabel'
|
|
409 |
#label: 'Green:'
|
|
410 |
#translateLabel: true
|
|
411 |
#adjust: #right
|
|
412 |
#extent: #(#Point 60 28)
|
|
413 |
)
|
|
414 |
#(#LabelSpec
|
|
415 |
#name: 'BlueLabel'
|
|
416 |
#label: 'Blue:'
|
|
417 |
#translateLabel: true
|
|
418 |
#adjust: #right
|
|
419 |
#extent: #(#Point 60 27)
|
|
420 |
)
|
|
421 |
)
|
|
422 |
)
|
|
423 |
#horizontalLayout: #fit
|
|
424 |
#verticalLayout: #fit
|
|
425 |
#horizontalSpace: 3
|
|
426 |
#verticalSpace: 3
|
|
427 |
)
|
|
428 |
#(#VerticalPanelViewSpec
|
|
429 |
#name: 'VerticalPanel2'
|
|
430 |
#layout: #(#LayoutFrame 60 0 0 0.0 -160 1.0 -32 1.0)
|
|
431 |
#component:
|
|
432 |
#(#SpecCollection
|
|
433 |
#collection:
|
|
434 |
#(
|
|
435 |
#(#SliderSpec
|
|
436 |
#name: 'RedSlider'
|
|
437 |
#model: #red
|
|
438 |
#orientation: #horizontal
|
|
439 |
#stop: 255
|
|
440 |
#step: 1
|
|
441 |
#backgroundColor: #(#Color 100.0 0.0 0.0)
|
|
442 |
#extent: #(#Point 120 27)
|
|
443 |
)
|
|
444 |
#(#SliderSpec
|
|
445 |
#name: 'GreenSlider'
|
|
446 |
#model: #green
|
|
447 |
#orientation: #horizontal
|
|
448 |
#stop: 255
|
|
449 |
#step: 1
|
|
450 |
#backgroundColor: #(#Color 0.0 100.0 0.0)
|
|
451 |
#extent: #(#Point 120 28)
|
|
452 |
)
|
|
453 |
#(#SliderSpec
|
|
454 |
#name: 'BlueSlider'
|
|
455 |
#model: #blue
|
|
456 |
#orientation: #horizontal
|
|
457 |
#stop: 255
|
|
458 |
#step: 1
|
|
459 |
#backgroundColor: #(#Color 0.0 0.0 100.0)
|
|
460 |
#extent: #(#Point 120 27)
|
|
461 |
)
|
|
462 |
)
|
|
463 |
)
|
|
464 |
#horizontalLayout: #fit
|
|
465 |
#verticalLayout: #fit
|
|
466 |
#horizontalSpace: 3
|
|
467 |
#verticalSpace: 3
|
|
468 |
)
|
|
469 |
#(#VerticalPanelViewSpec
|
|
470 |
#name: 'VerticalPanel3'
|
|
471 |
#layout: #(#LayoutFrame -160 1 0 0.0 -120 1 -32 1.0)
|
|
472 |
#component:
|
|
473 |
#(#SpecCollection
|
|
474 |
#collection:
|
|
475 |
#(
|
|
476 |
#(#InputFieldSpec
|
|
477 |
#name: 'RedField'
|
|
478 |
#model: #red
|
|
479 |
#type: #numberInRange
|
|
480 |
#numChars: 3
|
|
481 |
#minValue: 0
|
|
482 |
#maxValue: 255
|
|
483 |
#extent: #(#Point 40 27)
|
|
484 |
)
|
|
485 |
#(#InputFieldSpec
|
|
486 |
#name: 'GreenField'
|
|
487 |
#model: #green
|
|
488 |
#type: #numberInRange
|
|
489 |
#numChars: 3
|
|
490 |
#minValue: 0
|
|
491 |
#maxValue: 255
|
|
492 |
#extent: #(#Point 40 28)
|
|
493 |
)
|
|
494 |
#(#InputFieldSpec
|
|
495 |
#name: 'BlueField'
|
|
496 |
#model: #blue
|
|
497 |
#type: #numberInRange
|
|
498 |
#numChars: 3
|
|
499 |
#minValue: 0
|
|
500 |
#maxValue: 255
|
|
501 |
#extent: #(#Point 40 27)
|
|
502 |
)
|
|
503 |
)
|
|
504 |
)
|
|
505 |
#horizontalLayout: #fit
|
|
506 |
#verticalLayout: #fit
|
|
507 |
#horizontalSpace: 3
|
|
508 |
#verticalSpace: 3
|
|
509 |
)
|
|
510 |
#(#LabelSpec
|
|
511 |
#name: 'PreviewBox'
|
|
512 |
#layout: #(#LayoutFrame -118 1 0 0.0 -2 1.0 -32 1.0)
|
|
513 |
#label: 'Preview'
|
|
514 |
#translateLabel: true
|
|
515 |
#level: -1
|
|
516 |
)
|
|
517 |
#(#HorizontalPanelViewSpec
|
|
518 |
#name: 'HorizontalPanel1'
|
|
519 |
#layout: #(#LayoutFrame 0 0.0 -32 1 0 1.0 0 1.0)
|
|
520 |
#component:
|
|
521 |
#(#SpecCollection
|
|
522 |
#collection:
|
|
523 |
#(
|
|
524 |
#(#ActionButtonSpec
|
|
525 |
#name: 'CancelButton'
|
|
526 |
#label: 'Cancel'
|
|
527 |
#translateLabel: true
|
|
528 |
#model: #cancel
|
|
529 |
#extent: #(#Point 165 26)
|
|
530 |
)
|
|
531 |
#(#ActionButtonSpec
|
|
532 |
#name: 'OKButton'
|
|
533 |
#label: 'OK'
|
|
534 |
#translateLabel: true
|
|
535 |
#model: #accept
|
|
536 |
#extent: #(#Point 166 26)
|
|
537 |
)
|
|
538 |
)
|
|
539 |
)
|
|
540 |
#horizontalLayout: #fitSpace
|
|
541 |
#verticalLayout: #fitSpace
|
|
542 |
#horizontalSpace: 3
|
|
543 |
#verticalSpace: 3
|
|
544 |
)
|
|
545 |
)
|
|
546 |
)
|
|
547 |
)
|
|
548 |
! !
|
|
549 |
|
|
550 |
!ColorMenu::DefineColor methodsFor:'accessing'!
|
|
551 |
|
|
552 |
color
|
|
553 |
|
|
554 |
^Color redByte: red value greenByte: green value blueByte: blue value
|
|
555 |
|
|
556 |
!
|
|
557 |
|
|
558 |
color: aColor
|
|
559 |
|
|
560 |
aColor notNil
|
|
561 |
ifTrue:
|
|
562 |
[
|
|
563 |
self red value: aColor redByte.
|
|
564 |
self green value: aColor greenByte.
|
|
565 |
self blue value: aColor blueByte.
|
|
566 |
]
|
|
567 |
|
|
568 |
! !
|
|
569 |
|
|
570 |
!ColorMenu::DefineColor methodsFor:'aspects'!
|
|
571 |
|
|
572 |
blue
|
|
573 |
|
|
574 |
blue isNil ifTrue:[
|
|
575 |
blue := 0 asValue
|
|
576 |
].
|
|
577 |
^blue
|
|
578 |
!
|
|
579 |
|
|
580 |
green
|
|
581 |
|
|
582 |
green isNil ifTrue:[
|
|
583 |
green := 0 asValue
|
|
584 |
].
|
|
585 |
^green
|
|
586 |
!
|
|
587 |
|
|
588 |
red
|
|
589 |
|
|
590 |
red isNil ifTrue:[
|
|
591 |
red := 0 asValue
|
|
592 |
].
|
|
593 |
^red
|
|
594 |
! !
|
|
595 |
|
|
596 |
!ColorMenu::DefineColor methodsFor:'startup / release'!
|
|
597 |
|
|
598 |
postBuildWith:aBuilder
|
|
599 |
|
|
600 |
|updateBlock|
|
|
601 |
|
|
602 |
super postBuildWith:aBuilder.
|
|
603 |
|
|
604 |
updateBlock := [(builder componentAt: #PreviewBox) backgroundColor: self color].
|
|
605 |
|
|
606 |
red onChangeSend: #value to: updateBlock.
|
|
607 |
green onChangeSend: #value to: updateBlock.
|
|
608 |
blue onChangeSend: #value to: updateBlock.
|
|
609 |
|
|
610 |
updateBlock value
|
|
611 |
|
|
612 |
|
|
613 |
! !
|
|
614 |
|
412
|
615 |
!ColorMenu class methodsFor:'documentation'!
|
|
616 |
|
|
617 |
version
|
1057
|
618 |
^ '$Header: /cvs/stx/stx/libwidg2/ColorMenu.st,v 1.15 1998-08-06 14:20:51 tz Exp $'
|
412
|
619 |
! !
|