author | Claus Gittinger <cg@exept.de> |
Fri, 30 May 2008 11:05:30 +0200 | |
changeset 8156 | 5c6d59ee93d2 |
parent 7738 | c731a6d74f04 |
child 9704 | 0754368e0592 |
permissions | -rw-r--r-- |
2236
257f587ad7dc
migrate instvars 'inspectedObject' to 'object'
Claus Gittinger <cg@exept.de>
parents:
165
diff
changeset
|
1 |
" |
257f587ad7dc
migrate instvars 'inspectedObject' to 'object'
Claus Gittinger <cg@exept.de>
parents:
165
diff
changeset
|
2 |
COPYRIGHT (c) 1994 by Claus Gittinger |
257f587ad7dc
migrate instvars 'inspectedObject' to 'object'
Claus Gittinger <cg@exept.de>
parents:
165
diff
changeset
|
3 |
All Rights Reserved |
257f587ad7dc
migrate instvars 'inspectedObject' to 'object'
Claus Gittinger <cg@exept.de>
parents:
165
diff
changeset
|
4 |
|
257f587ad7dc
migrate instvars 'inspectedObject' to 'object'
Claus Gittinger <cg@exept.de>
parents:
165
diff
changeset
|
5 |
This software is furnished under a license and may be used |
257f587ad7dc
migrate instvars 'inspectedObject' to 'object'
Claus Gittinger <cg@exept.de>
parents:
165
diff
changeset
|
6 |
only in accordance with the terms of that license and with the |
257f587ad7dc
migrate instvars 'inspectedObject' to 'object'
Claus Gittinger <cg@exept.de>
parents:
165
diff
changeset
|
7 |
inclusion of the above copyright notice. This software may not |
257f587ad7dc
migrate instvars 'inspectedObject' to 'object'
Claus Gittinger <cg@exept.de>
parents:
165
diff
changeset
|
8 |
be provided or otherwise made available to, or used by, any |
257f587ad7dc
migrate instvars 'inspectedObject' to 'object'
Claus Gittinger <cg@exept.de>
parents:
165
diff
changeset
|
9 |
other person. No title to or ownership of the software is |
257f587ad7dc
migrate instvars 'inspectedObject' to 'object'
Claus Gittinger <cg@exept.de>
parents:
165
diff
changeset
|
10 |
hereby transferred. |
257f587ad7dc
migrate instvars 'inspectedObject' to 'object'
Claus Gittinger <cg@exept.de>
parents:
165
diff
changeset
|
11 |
" |
3199 | 12 |
"{ Package: 'stx:libtool' }" |
13 |
||
44 | 14 |
InspectorView subclass:#ColorInspectorView |
2236
257f587ad7dc
migrate instvars 'inspectedObject' to 'object'
Claus Gittinger <cg@exept.de>
parents:
165
diff
changeset
|
15 |
instanceVariableNames:'colorView' |
257f587ad7dc
migrate instvars 'inspectedObject' to 'object'
Claus Gittinger <cg@exept.de>
parents:
165
diff
changeset
|
16 |
classVariableNames:'' |
257f587ad7dc
migrate instvars 'inspectedObject' to 'object'
Claus Gittinger <cg@exept.de>
parents:
165
diff
changeset
|
17 |
poolDictionaries:'' |
257f587ad7dc
migrate instvars 'inspectedObject' to 'object'
Claus Gittinger <cg@exept.de>
parents:
165
diff
changeset
|
18 |
category:'Interface-Inspector' |
44 | 19 |
! |
20 |
||
87 | 21 |
!ColorInspectorView class methodsFor:'documentation'! |
22 |
||
23 |
copyright |
|
24 |
" |
|
25 |
COPYRIGHT (c) 1994 by Claus Gittinger |
|
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 |
||
8156 | 37 |
!ColorInspectorView class methodsFor:'menu specs'! |
38 |
||
39 |
colorMenu |
|
40 |
"This resource specification was automatically generated |
|
41 |
by the MenuEditor of ST/X." |
|
42 |
||
43 |
"Do not manually edit this!! If it is corrupted, |
|
44 |
the MenuEditor may not be able to read the specification." |
|
45 |
||
46 |
" |
|
47 |
MenuEditor new openOnClass:ColorInspectorView andSelector:#colorMenu |
|
48 |
(Menu new fromLiteralArrayEncoding:(ColorInspectorView colorMenu)) startUp |
|
49 |
" |
|
50 |
||
51 |
<resource: #menu> |
|
52 |
||
53 |
^ |
|
54 |
#(Menu |
|
55 |
( |
|
56 |
(MenuItem |
|
57 |
label: 'Edit' |
|
58 |
itemValue: openColorEditor |
|
59 |
translateLabel: true |
|
60 |
) |
|
61 |
) |
|
62 |
nil |
|
63 |
nil |
|
64 |
) |
|
65 |
! ! |
|
66 |
||
44 | 67 |
!ColorInspectorView methodsFor:'accessing'! |
68 |
||
69 |
inspect:anObject |
|
70 |
super inspect:anObject. |
|
71 |
realized ifFalse:[^ self]. |
|
2271
0cf238543cb1
fixed and improved fieldNameList generation & use.
Claus Gittinger <cg@exept.de>
parents:
2236
diff
changeset
|
72 |
|
44 | 73 |
colorView viewBackground:anObject. |
74 |
colorView clear |
|
75 |
! ! |
|
76 |
||
77 |
!ColorInspectorView methodsFor:'initialization'! |
|
78 |
||
79 |
initialize |
|
80 |
|newPanel sub| |
|
81 |
||
82 |
super initialize. |
|
83 |
||
84 |
newPanel := VariableVerticalPanel in:self. |
|
85 |
newPanel origin:0.0 @ 0.0 corner:1.0 @ 1.0. |
|
86 |
||
87 |
sub := subViews first. |
|
88 |
self removeSubView:sub. |
|
89 |
sub origin:0.0@0.0 corner:1.0@0.8. |
|
90 |
newPanel addSubView:sub. |
|
91 |
||
92 |
colorView := View in:newPanel. |
|
93 |
colorView origin:(0.0 @ 0.8) corner:(1.0 @ 1.0). |
|
8156 | 94 |
colorView |
95 |
menuHolder:(self class colorMenu); |
|
96 |
menuPerformer:self |
|
44 | 97 |
|
98 |
" |
|
99 |
ColorInspectorView inspect:(Color yellow) |
|
100 |
ColorInspectorView inspect:(Color name:'brown') lightened) |
|
101 |
" |
|
102 |
! ! |
|
2236
257f587ad7dc
migrate instvars 'inspectedObject' to 'object'
Claus Gittinger <cg@exept.de>
parents:
165
diff
changeset
|
103 |
|
8156 | 104 |
!ColorInspectorView methodsFor:'user actions'! |
105 |
||
106 |
openColorEditor |
|
107 |
ColorEditDialog openOn:inspectedObject |
|
108 |
! ! |
|
109 |
||
2236
257f587ad7dc
migrate instvars 'inspectedObject' to 'object'
Claus Gittinger <cg@exept.de>
parents:
165
diff
changeset
|
110 |
!ColorInspectorView class methodsFor:'documentation'! |
257f587ad7dc
migrate instvars 'inspectedObject' to 'object'
Claus Gittinger <cg@exept.de>
parents:
165
diff
changeset
|
111 |
|
257f587ad7dc
migrate instvars 'inspectedObject' to 'object'
Claus Gittinger <cg@exept.de>
parents:
165
diff
changeset
|
112 |
version |
8156 | 113 |
^ '$Header: /cvs/stx/stx/libtool/ColorInspectorView.st,v 1.12 2008-05-30 09:05:30 cg Exp $' |
2236
257f587ad7dc
migrate instvars 'inspectedObject' to 'object'
Claus Gittinger <cg@exept.de>
parents:
165
diff
changeset
|
114 |
! ! |