author | Jan Vrany <jan.vrany@fit.cvut.cz> |
Wed, 19 Jul 2017 09:42:32 +0200 | |
branch | jv |
changeset 17619 | edb119820fcb |
parent 15950 | 23be8cf85415 |
child 18532 | cccb41254edf |
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 |
||
15950 | 14 |
"{ NameSpace: Smalltalk }" |
15 |
||
44 | 16 |
InspectorView subclass:#ColorInspectorView |
2236
257f587ad7dc
migrate instvars 'inspectedObject' to 'object'
Claus Gittinger <cg@exept.de>
parents:
165
diff
changeset
|
17 |
instanceVariableNames:'colorView' |
257f587ad7dc
migrate instvars 'inspectedObject' to 'object'
Claus Gittinger <cg@exept.de>
parents:
165
diff
changeset
|
18 |
classVariableNames:'' |
257f587ad7dc
migrate instvars 'inspectedObject' to 'object'
Claus Gittinger <cg@exept.de>
parents:
165
diff
changeset
|
19 |
poolDictionaries:'' |
257f587ad7dc
migrate instvars 'inspectedObject' to 'object'
Claus Gittinger <cg@exept.de>
parents:
165
diff
changeset
|
20 |
category:'Interface-Inspector' |
44 | 21 |
! |
22 |
||
87 | 23 |
!ColorInspectorView class methodsFor:'documentation'! |
24 |
||
25 |
copyright |
|
26 |
" |
|
27 |
COPYRIGHT (c) 1994 by Claus Gittinger |
|
28 |
All Rights Reserved |
|
29 |
||
30 |
This software is furnished under a license and may be used |
|
31 |
only in accordance with the terms of that license and with the |
|
32 |
inclusion of the above copyright notice. This software may not |
|
33 |
be provided or otherwise made available to, or used by, any |
|
34 |
other person. No title to or ownership of the software is |
|
35 |
hereby transferred. |
|
36 |
" |
|
37 |
! ! |
|
38 |
||
8156 | 39 |
!ColorInspectorView class methodsFor:'menu specs'! |
40 |
||
41 |
colorMenu |
|
42 |
"This resource specification was automatically generated |
|
43 |
by the MenuEditor of ST/X." |
|
44 |
||
45 |
"Do not manually edit this!! If it is corrupted, |
|
46 |
the MenuEditor may not be able to read the specification." |
|
47 |
||
48 |
" |
|
49 |
MenuEditor new openOnClass:ColorInspectorView andSelector:#colorMenu |
|
50 |
(Menu new fromLiteralArrayEncoding:(ColorInspectorView colorMenu)) startUp |
|
51 |
" |
|
52 |
||
53 |
<resource: #menu> |
|
54 |
||
55 |
^ |
|
56 |
#(Menu |
|
57 |
( |
|
58 |
(MenuItem |
|
9704 | 59 |
label: 'Color Editor' |
8156 | 60 |
itemValue: openColorEditor |
61 |
translateLabel: true |
|
62 |
) |
|
63 |
) |
|
64 |
nil |
|
65 |
nil |
|
66 |
) |
|
9704 | 67 |
|
68 |
"Modified: / 27-01-2011 / 11:49:22 / cg" |
|
8156 | 69 |
! ! |
70 |
||
44 | 71 |
!ColorInspectorView methodsFor:'accessing'! |
72 |
||
73 |
inspect:anObject |
|
74 |
super inspect:anObject. |
|
2271
0cf238543cb1
fixed and improved fieldNameList generation & use.
Claus Gittinger <cg@exept.de>
parents:
2236
diff
changeset
|
75 |
|
44 | 76 |
colorView viewBackground:anObject. |
10163 | 77 |
realized ifFalse:[^ self]. |
44 | 78 |
colorView clear |
10163 | 79 |
|
80 |
"Modified: / 05-07-2011 / 14:03:48 / cg" |
|
44 | 81 |
! ! |
82 |
||
83 |
!ColorInspectorView methodsFor:'initialization'! |
|
84 |
||
85 |
initialize |
|
86 |
|newPanel sub| |
|
87 |
||
88 |
super initialize. |
|
89 |
||
90 |
newPanel := VariableVerticalPanel in:self. |
|
91 |
newPanel origin:0.0 @ 0.0 corner:1.0 @ 1.0. |
|
92 |
||
93 |
sub := subViews first. |
|
94 |
self removeSubView:sub. |
|
95 |
sub origin:0.0@0.0 corner:1.0@0.8. |
|
96 |
newPanel addSubView:sub. |
|
97 |
||
98 |
colorView := View in:newPanel. |
|
99 |
colorView origin:(0.0 @ 0.8) corner:(1.0 @ 1.0). |
|
8156 | 100 |
colorView |
101 |
menuHolder:(self class colorMenu); |
|
102 |
menuPerformer:self |
|
44 | 103 |
|
104 |
" |
|
105 |
ColorInspectorView inspect:(Color yellow) |
|
106 |
ColorInspectorView inspect:(Color name:'brown') lightened) |
|
107 |
" |
|
108 |
! ! |
|
2236
257f587ad7dc
migrate instvars 'inspectedObject' to 'object'
Claus Gittinger <cg@exept.de>
parents:
165
diff
changeset
|
109 |
|
9704 | 110 |
!ColorInspectorView methodsFor:'menu'! |
111 |
||
112 |
optionalToolItems |
|
113 |
"inserted after inspect/browse" |
|
114 |
||
115 |
^ #( |
|
116 |
('Color Editor' #openColorEditor) |
|
117 |
). |
|
118 |
||
119 |
"Modified: / 27-01-2011 / 11:51:53 / cg" |
|
120 |
! ! |
|
121 |
||
8156 | 122 |
!ColorInspectorView methodsFor:'user actions'! |
123 |
||
124 |
openColorEditor |
|
125 |
ColorEditDialog openOn:inspectedObject |
|
126 |
! ! |
|
127 |
||
2236
257f587ad7dc
migrate instvars 'inspectedObject' to 'object'
Claus Gittinger <cg@exept.de>
parents:
165
diff
changeset
|
128 |
!ColorInspectorView class methodsFor:'documentation'! |
257f587ad7dc
migrate instvars 'inspectedObject' to 'object'
Claus Gittinger <cg@exept.de>
parents:
165
diff
changeset
|
129 |
|
9704 | 130 |
version_CVS |
12123
4bde08cebd48
trunk branched into /branches/jv
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
10163
diff
changeset
|
131 |
^ '§Header: /cvs/stx/stx/libtool/ColorInspectorView.st,v 1.14 2011/07/05 12:04:32 cg Exp §' |
12166 | 132 |
! |
133 |
||
12650
e0f607754b9a
Merged 18d06283743d and ff31bac2fd1b (branch default - CVS HEAD)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
12198
diff
changeset
|
134 |
version_HG |
e0f607754b9a
Merged 18d06283743d and ff31bac2fd1b (branch default - CVS HEAD)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
12198
diff
changeset
|
135 |
|
e0f607754b9a
Merged 18d06283743d and ff31bac2fd1b (branch default - CVS HEAD)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
12198
diff
changeset
|
136 |
^ '$Changeset: <not expanded> $' |
e0f607754b9a
Merged 18d06283743d and ff31bac2fd1b (branch default - CVS HEAD)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
12198
diff
changeset
|
137 |
! |
e0f607754b9a
Merged 18d06283743d and ff31bac2fd1b (branch default - CVS HEAD)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
12198
diff
changeset
|
138 |
|
12166 | 139 |
version_SVN |
12198
414e7b69ecda
Text/ChangeSet diff improved
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
12166
diff
changeset
|
140 |
^ '$Id: ColorInspectorView.st 7944 2012-03-19 15:32:45Z vranyj1 $' |
12166 | 141 |
! ! |
12650
e0f607754b9a
Merged 18d06283743d and ff31bac2fd1b (branch default - CVS HEAD)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
12198
diff
changeset
|
142 |