author | Claus Gittinger <cg@exept.de> |
Mon, 11 Sep 2017 09:07:18 +0200 | |
changeset 17684 | ad637949d97a |
parent 10163 | c04382abfc8d |
child 12123 | 4bde08cebd48 |
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. |
|
2271
0cf238543cb1
fixed and improved fieldNameList generation & use.
Claus Gittinger <cg@exept.de>
parents:
2236
diff
changeset
|
73 |
|
44 | 74 |
colorView viewBackground:anObject. |
10163 | 75 |
realized ifFalse:[^ self]. |
44 | 76 |
colorView clear |
10163 | 77 |
|
78 |
"Modified: / 05-07-2011 / 14:03:48 / cg" |
|
44 | 79 |
! ! |
80 |
||
81 |
!ColorInspectorView methodsFor:'initialization'! |
|
82 |
||
83 |
initialize |
|
84 |
|newPanel sub| |
|
85 |
||
86 |
super initialize. |
|
87 |
||
88 |
newPanel := VariableVerticalPanel in:self. |
|
89 |
newPanel origin:0.0 @ 0.0 corner:1.0 @ 1.0. |
|
90 |
||
91 |
sub := subViews first. |
|
92 |
self removeSubView:sub. |
|
93 |
sub origin:0.0@0.0 corner:1.0@0.8. |
|
94 |
newPanel addSubView:sub. |
|
95 |
||
96 |
colorView := View in:newPanel. |
|
97 |
colorView origin:(0.0 @ 0.8) corner:(1.0 @ 1.0). |
|
8156 | 98 |
colorView |
99 |
menuHolder:(self class colorMenu); |
|
100 |
menuPerformer:self |
|
44 | 101 |
|
102 |
" |
|
103 |
ColorInspectorView inspect:(Color yellow) |
|
104 |
ColorInspectorView inspect:(Color name:'brown') lightened) |
|
105 |
" |
|
106 |
! ! |
|
2236
257f587ad7dc
migrate instvars 'inspectedObject' to 'object'
Claus Gittinger <cg@exept.de>
parents:
165
diff
changeset
|
107 |
|
9704 | 108 |
!ColorInspectorView methodsFor:'menu'! |
109 |
||
110 |
optionalToolItems |
|
111 |
"inserted after inspect/browse" |
|
112 |
||
113 |
^ #( |
|
114 |
('Color Editor' #openColorEditor) |
|
115 |
). |
|
116 |
||
117 |
"Modified: / 27-01-2011 / 11:51:53 / cg" |
|
118 |
! ! |
|
119 |
||
8156 | 120 |
!ColorInspectorView methodsFor:'user actions'! |
121 |
||
122 |
openColorEditor |
|
123 |
ColorEditDialog openOn:inspectedObject |
|
124 |
! ! |
|
125 |
||
2236
257f587ad7dc
migrate instvars 'inspectedObject' to 'object'
Claus Gittinger <cg@exept.de>
parents:
165
diff
changeset
|
126 |
!ColorInspectorView class methodsFor:'documentation'! |
257f587ad7dc
migrate instvars 'inspectedObject' to 'object'
Claus Gittinger <cg@exept.de>
parents:
165
diff
changeset
|
127 |
|
9704 | 128 |
version_CVS |
10163 | 129 |
^ '$Header: /cvs/stx/stx/libtool/ColorInspectorView.st,v 1.14 2011-07-05 12:04:32 cg Exp $' |
2236
257f587ad7dc
migrate instvars 'inspectedObject' to 'object'
Claus Gittinger <cg@exept.de>
parents:
165
diff
changeset
|
130 |
! ! |