author | Claus Gittinger <cg@exept.de> |
Wed, 09 Feb 2011 14:03:29 +0100 | |
changeset 9750 | 1b2ef761d2d0 |
parent 9704 | 0754368e0592 |
child 10163 | c04382abfc8d |
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 |
|
9704 | 57 |
label: 'Color Editor' |
8156 | 58 |
itemValue: openColorEditor |
59 |
translateLabel: true |
|
60 |
) |
|
61 |
) |
|
62 |
nil |
|
63 |
nil |
|
64 |
) |
|
9704 | 65 |
|
66 |
"Modified: / 27-01-2011 / 11:49:22 / cg" |
|
8156 | 67 |
! ! |
68 |
||
44 | 69 |
!ColorInspectorView methodsFor:'accessing'! |
70 |
||
71 |
inspect:anObject |
|
72 |
super inspect:anObject. |
|
73 |
realized ifFalse:[^ self]. |
|
2271
0cf238543cb1
fixed and improved fieldNameList generation & use.
Claus Gittinger <cg@exept.de>
parents:
2236
diff
changeset
|
74 |
|
44 | 75 |
colorView viewBackground:anObject. |
76 |
colorView clear |
|
77 |
! ! |
|
78 |
||
79 |
!ColorInspectorView methodsFor:'initialization'! |
|
80 |
||
81 |
initialize |
|
82 |
|newPanel sub| |
|
83 |
||
84 |
super initialize. |
|
85 |
||
86 |
newPanel := VariableVerticalPanel in:self. |
|
87 |
newPanel origin:0.0 @ 0.0 corner:1.0 @ 1.0. |
|
88 |
||
89 |
sub := subViews first. |
|
90 |
self removeSubView:sub. |
|
91 |
sub origin:0.0@0.0 corner:1.0@0.8. |
|
92 |
newPanel addSubView:sub. |
|
93 |
||
94 |
colorView := View in:newPanel. |
|
95 |
colorView origin:(0.0 @ 0.8) corner:(1.0 @ 1.0). |
|
8156 | 96 |
colorView |
97 |
menuHolder:(self class colorMenu); |
|
98 |
menuPerformer:self |
|
44 | 99 |
|
100 |
" |
|
101 |
ColorInspectorView inspect:(Color yellow) |
|
102 |
ColorInspectorView inspect:(Color name:'brown') lightened) |
|
103 |
" |
|
104 |
! ! |
|
2236
257f587ad7dc
migrate instvars 'inspectedObject' to 'object'
Claus Gittinger <cg@exept.de>
parents:
165
diff
changeset
|
105 |
|
9704 | 106 |
!ColorInspectorView methodsFor:'menu'! |
107 |
||
108 |
optionalToolItems |
|
109 |
"inserted after inspect/browse" |
|
110 |
||
111 |
^ #( |
|
112 |
('Color Editor' #openColorEditor) |
|
113 |
). |
|
114 |
||
115 |
"Modified: / 27-01-2011 / 11:51:53 / cg" |
|
116 |
! ! |
|
117 |
||
8156 | 118 |
!ColorInspectorView methodsFor:'user actions'! |
119 |
||
120 |
openColorEditor |
|
121 |
ColorEditDialog openOn:inspectedObject |
|
122 |
! ! |
|
123 |
||
2236
257f587ad7dc
migrate instvars 'inspectedObject' to 'object'
Claus Gittinger <cg@exept.de>
parents:
165
diff
changeset
|
124 |
!ColorInspectorView class methodsFor:'documentation'! |
257f587ad7dc
migrate instvars 'inspectedObject' to 'object'
Claus Gittinger <cg@exept.de>
parents:
165
diff
changeset
|
125 |
|
257f587ad7dc
migrate instvars 'inspectedObject' to 'object'
Claus Gittinger <cg@exept.de>
parents:
165
diff
changeset
|
126 |
version |
9704 | 127 |
^ '$Header: /cvs/stx/stx/libtool/ColorInspectorView.st,v 1.13 2011-01-27 11:16:02 cg Exp $' |
128 |
! |
|
129 |
||
130 |
version_CVS |
|
131 |
^ '$Header: /cvs/stx/stx/libtool/ColorInspectorView.st,v 1.13 2011-01-27 11:16:02 cg Exp $' |
|
2236
257f587ad7dc
migrate instvars 'inspectedObject' to 'object'
Claus Gittinger <cg@exept.de>
parents:
165
diff
changeset
|
132 |
! ! |