author | Claus Gittinger <cg@exept.de> |
Thu, 18 Jan 2018 17:03:09 +0100 | |
changeset 3525 | 5df4da794cd2 |
parent 3524 | 366f04fbfb23 |
child 3532 | 12b7b904b5e1 |
permissions | -rw-r--r-- |
2748 | 1 |
" |
2 |
COPYRIGHT (c) 2007 by eXept Software AG |
|
3524 | 3 |
All Rights Reserved |
2748 | 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 |
" |
|
2177 | 12 |
"{ Package: 'stx:libtool2' }" |
13 |
||
14 |
"{ NameSpace: Tools }" |
|
15 |
||
2744 | 16 |
ToolApplicationModel subclass:#ViewTreeInspectorApplication |
2177 | 17 |
instanceVariableNames:'model treeView hasSingleSelectionHolder clickedItem clickedPoint |
2770 | 18 |
motionAction process followFocusChannel showNamesHolder |
3124
1973e28a2c75
class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents:
3123
diff
changeset
|
19 |
inspectorView inspectorModeIndexHolder path |
3302 | 20 |
isCatchingEventsChannel browser' |
2177 | 21 |
classVariableNames:'' |
22 |
poolDictionaries:'' |
|
2744 | 23 |
category:'Interface-Smalltalk' |
2177 | 24 |
! |
25 |
||
26 |
Object subclass:#MenuDesc |
|
27 |
instanceVariableNames:'title value action' |
|
28 |
classVariableNames:'' |
|
29 |
poolDictionaries:'' |
|
2744 | 30 |
privateIn:ViewTreeInspectorApplication |
31 |
! |
|
32 |
||
33 |
HierarchicalItem subclass:#ViewTreeItem |
|
3456 | 34 |
instanceVariableNames:'widget menuItem isDrawnShown exists xOffsetAdditionalName' |
2744 | 35 |
classVariableNames:'HandleExtent' |
36 |
poolDictionaries:'' |
|
37 |
privateIn:ViewTreeInspectorApplication |
|
2177 | 38 |
! |
39 |
||
2744 | 40 |
ValueModel subclass:#ViewTreeModel |
41 |
instanceVariableNames:'lockSema selectedSuperItems selection hiddenLevel listOfItems |
|
42 |
inputEventAction mappedViewAction beforeSelectionChangedAction |
|
43 |
icons timedUpdateTask selectOnClickHolder testModeChannel |
|
2978
a952dfdb1b6a
class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents:
2888
diff
changeset
|
44 |
hasTargetWidgetChannel catchEvents' |
2744 | 45 |
classVariableNames:'' |
46 |
poolDictionaries:'' |
|
47 |
privateIn:ViewTreeInspectorApplication |
|
48 |
! |
|
49 |
||
50 |
HierarchicalList subclass:#ItemList |
|
51 |
instanceVariableNames:'treeModel eventHook eventHookInitialized showWidgetNames' |
|
52 |
classVariableNames:'' |
|
53 |
poolDictionaries:'' |
|
54 |
privateIn:ViewTreeInspectorApplication::ViewTreeModel |
|
55 |
! |
|
56 |
||
57 |
!ViewTreeInspectorApplication class methodsFor:'documentation'! |
|
2177 | 58 |
|
2748 | 59 |
copyright |
60 |
" |
|
61 |
COPYRIGHT (c) 2007 by eXept Software AG |
|
3524 | 62 |
All Rights Reserved |
2748 | 63 |
|
64 |
This software is furnished under a license and may be used |
|
65 |
only in accordance with the terms of that license and with the |
|
66 |
inclusion of the above copyright notice. This software may not |
|
67 |
be provided or otherwise made available to, or used by, any |
|
68 |
other person. No title to or ownership of the software is |
|
69 |
hereby transferred. |
|
70 |
" |
|
71 |
! |
|
72 |
||
2177 | 73 |
documentation |
74 |
" |
|
75 |
Small application showing a ViewTreeModel use. |
|
76 |
||
77 |
It displays a hierarchical list of a selected TopView and |
|
78 |
all its contained subViews. |
|
79 |
Useful to have a look at subcomponents - to see how views |
|
80 |
are structured. |
|
81 |
||
82 |
||
83 |
[Instance variables:] |
|
3524 | 84 |
model <ViewTreeModel> the used ViewTreeModel |
85 |
clickedItem <ViewTreeItem> item under the clickedPoint (motion action) |
|
86 |
clickedPoint <Point> point where the motion action started from. |
|
87 |
motionAction <Action> (oneArg-) action called durring buttonMotion. |
|
2177 | 88 |
|
89 |
||
90 |
[author:] |
|
3524 | 91 |
Claus Atzkern |
2177 | 92 |
|
93 |
[see also:] |
|
3524 | 94 |
ViewTreeModel |
95 |
ViewTreeItem |
|
2177 | 96 |
" |
97 |
! ! |
|
98 |
||
2744 | 99 |
!ViewTreeInspectorApplication class methodsFor:'initialization'! |
2177 | 100 |
|
101 |
initialize |
|
102 |
"add myself to the launcher menu |
|
103 |
" |
|
104 |
self installInLauncher. |
|
105 |
! |
|
106 |
||
107 |
installInLauncher |
|
2744 | 108 |
"add myself to the launcher menu" |
109 |
||
2177 | 110 |
|menuItem icon| |
111 |
||
112 |
NewLauncher isNil ifTrue:[^ self]. |
|
2744 | 113 |
"/ cg - disabled. the icon is too ugly. |
114 |
^ self. |
|
2177 | 115 |
|
3341 | 116 |
"/ icon := ToolbarIconLibrary inspectLocals20x20Icon magnifiedTo:28@28. |
117 |
"/ |
|
3524 | 118 |
"/ menuItem := MenuItem new |
3341 | 119 |
"/ label: 'View Tree Inspector'; |
120 |
"/ value: [ ViewTreeInspectorApplication open]; |
|
121 |
"/ isButton: true; |
|
122 |
"/ icon: icon; |
|
123 |
"/ nameKey: #viewInspect. |
|
124 |
"/ |
|
125 |
"/ menuItem startGroup:#right. |
|
126 |
"/ NewLauncher addMenuItem:menuItem in:'toolbar' |
|
127 |
"/ position:#( #before #help) |
|
128 |
"/ space:false. |
|
129 |
||
130 |
" |
|
131 |
self installInLauncher |
|
132 |
self removeFromLauncher |
|
133 |
" |
|
2177 | 134 |
! |
135 |
||
136 |
postAutoload |
|
137 |
"add myself to the launcher menu |
|
138 |
" |
|
139 |
self installInLauncher. |
|
140 |
" |
|
141 |
self installInLauncher |
|
142 |
self removeFromLauncher |
|
143 |
" |
|
144 |
! |
|
145 |
||
146 |
removeFromLauncher |
|
147 |
"remove myself from the launcher menu |
|
148 |
" |
|
149 |
NewLauncher isNil ifTrue:[^ self]. |
|
150 |
NewLauncher removeUserTool:#viewInspect |
|
151 |
||
152 |
" |
|
153 |
self installInLauncher |
|
154 |
self removeFromLauncher |
|
155 |
" |
|
156 |
! |
|
157 |
||
158 |
unload |
|
159 |
"class is about to be unloaded - remove myself from the launcher menu |
|
160 |
" |
|
161 |
self removeFromLauncher. |
|
162 |
super unload. |
|
163 |
! ! |
|
164 |
||
3070
648aad0e3777
class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents:
3049
diff
changeset
|
165 |
!ViewTreeInspectorApplication class methodsFor:'help specs'! |
648aad0e3777
class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents:
3049
diff
changeset
|
166 |
|
3524 | 167 |
helpSpec |
3070
648aad0e3777
class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents:
3049
diff
changeset
|
168 |
<resource: #help> |
648aad0e3777
class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents:
3049
diff
changeset
|
169 |
|
3524 | 170 |
^super helpSpec addPairsFrom:#( |
3070
648aad0e3777
class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents:
3049
diff
changeset
|
171 |
|
3186
80a20e5881a5
class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents:
3185
diff
changeset
|
172 |
#doRedraw |
80a20e5881a5
class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents:
3185
diff
changeset
|
173 |
'Force the application to redraw its windows' |
80a20e5881a5
class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents:
3185
diff
changeset
|
174 |
|
3070
648aad0e3777
class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents:
3049
diff
changeset
|
175 |
#doUncatchEvents |
3524 | 176 |
'Release picked view and uncatch events\(currently locked for widget selection)' |
3070
648aad0e3777
class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents:
3049
diff
changeset
|
177 |
|
648aad0e3777
class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents:
3049
diff
changeset
|
178 |
#doCatchEvents |
3524 | 179 |
'Lock view and catch events for widget selection\(currently unlocked)' |
3070
648aad0e3777
class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents:
3049
diff
changeset
|
180 |
|
3186
80a20e5881a5
class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents:
3185
diff
changeset
|
181 |
#doInspectApplication |
3524 | 182 |
'Inspect the selected view''s application' |
3186
80a20e5881a5
class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents:
3185
diff
changeset
|
183 |
|
80a20e5881a5
class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents:
3185
diff
changeset
|
184 |
#doBrowseApplication |
3524 | 185 |
'Browse the selected view''s application' |
3186
80a20e5881a5
class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents:
3185
diff
changeset
|
186 |
|
80a20e5881a5
class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents:
3185
diff
changeset
|
187 |
#doPickView |
3524 | 188 |
'Pick a widget with the mouse and inspect its view hierarchy' |
3186
80a20e5881a5
class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents:
3185
diff
changeset
|
189 |
|
3070
648aad0e3777
class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents:
3049
diff
changeset
|
190 |
) |
648aad0e3777
class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents:
3049
diff
changeset
|
191 |
! ! |
648aad0e3777
class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents:
3049
diff
changeset
|
192 |
|
2744 | 193 |
!ViewTreeInspectorApplication class methodsFor:'image specs'! |
194 |
||
2759 | 195 |
crossHairIcon |
3185
3592ea3afb9e
class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents:
3184
diff
changeset
|
196 |
^ ToolbarIconLibrary bigCrossHairIcon |
2759 | 197 |
! |
198 |
||
3070
648aad0e3777
class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents:
3049
diff
changeset
|
199 |
lockViewIcon |
648aad0e3777
class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents:
3049
diff
changeset
|
200 |
"This resource specification was automatically generated |
648aad0e3777
class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents:
3049
diff
changeset
|
201 |
by the ImageEditor of ST/X." |
648aad0e3777
class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents:
3049
diff
changeset
|
202 |
|
648aad0e3777
class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents:
3049
diff
changeset
|
203 |
"Do not manually edit this!! If it is corrupted, |
648aad0e3777
class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents:
3049
diff
changeset
|
204 |
the ImageEditor may not be able to read the specification." |
648aad0e3777
class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents:
3049
diff
changeset
|
205 |
|
648aad0e3777
class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents:
3049
diff
changeset
|
206 |
" |
648aad0e3777
class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents:
3049
diff
changeset
|
207 |
self lockViewIcon inspect |
648aad0e3777
class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents:
3049
diff
changeset
|
208 |
ImageEditor openOnClass:self andSelector:#lockViewIcon |
648aad0e3777
class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents:
3049
diff
changeset
|
209 |
Icon flushCachedIcons |
648aad0e3777
class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents:
3049
diff
changeset
|
210 |
" |
648aad0e3777
class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents:
3049
diff
changeset
|
211 |
|
648aad0e3777
class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents:
3049
diff
changeset
|
212 |
<resource: #image> |
648aad0e3777
class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents:
3049
diff
changeset
|
213 |
|
648aad0e3777
class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents:
3049
diff
changeset
|
214 |
^Icon |
3524 | 215 |
constantNamed:'Tools::ViewTreeInspectorApplication lockViewIcon' |
216 |
ifAbsentPut:[(Depth8Image new) width: 24; height: 24; photometric:(#palette); bitsPerSample:(#[8]); samplesPerPixel:(1); bits:(ByteArray fromPackedString:' |
|
3070
648aad0e3777
class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents:
3049
diff
changeset
|
217 |
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ |
648aad0e3777
class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents:
3049
diff
changeset
|
218 |
@@@@@@@@@@@@@@A8^G!!7O3ACP5*P@@A8^G @@@@@@@@@@@A8^@@@OE0/!!P0S#0@@^G @@@@@@@@@@@B (@D''D#48"1.CX5H@(J@@@@@@@@@@@@B (B(>SAT" |
648aad0e3777
class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents:
3049
diff
changeset
|
219 |
''%!!/P7,@(J@@@@@@@@@@@@@%IB0#M"H%IRTQV5P@IRT@@@@@@@@@@@ANSX:U]PANS$8:T80@S$8@@@@@@@@@@@AN&UYWK(EYQ@\FUPQHXT8@@@@@@@@@@@AN |
648aad0e3777
class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents:
3049
diff
changeset
|
220 |
HC2!!TVY:Y#-%I*IKMD8@@@@@@@@@@@A$\@83XBEG%).GGX _!!&P@@@@@@@@@@@AO[P5+ &(WPYN@["!!E\$<@@@@@@@@@@@B_F''FQPAXX_!!&TGH4HB9<@@@@@ |
648aad0e3777
class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents:
3049
diff
changeset
|
221 |
@@@@@@B_%3HCJ7=BKPU,Q)01B9<@@@@@@@@@@@@PBP8T_F!!''JPI)_Y"D&!!@@@@@@@@@@@@@$B)I9TGXO''WQIWQ93W0@@@@@@@@@@@@@$"U=JR$)JR$)JR$)_ |
648aad0e3777
class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents:
3049
diff
changeset
|
222 |
"P@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ |
648aad0e3777
class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents:
3049
diff
changeset
|
223 |
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@') ; colorMapFromArray:#[132 141 152 147 150 154 250 223 1 246 214 0 205 172 133 238 195 0 213 180 146 217 186 150 188 136 0 206 151 0 183 125 9 208 208 202 196 204 214 255 255 210 255 255 219 210 178 65 242 242 235 106 112 117 96 107 126 250 255 255 255 241 0 154 154 151 255 227 0 67 35 0 52 17 0 253 211 0 208 159 0 167 178 193 222 168 0 248 231 45 208 174 26 199 152 26 225 184 36 255 249 75 220 220 215 77 88 108 241 241 235 245 245 239 255 250 109 242 249 255 255 255 142 255 237 1 142 148 162 242 212 1 143 154 176 174 133 0 222 189 144 169 179 192 177 184 193 184 129 0 255 255 194 253 241 60 210 210 205 214 214 209 77 83 92 230 230 225 98 106 114 243 243 238 117 117 114 255 252 115 255 255 255 115 123 147 130 140 156 152 156 159 241 210 0 53 18 0 151 116 0 162 170 184 218 187 150 193 143 4 220 165 0 206 188 46 181 130 21 204 173 44 206 206 201 208 167 44 72 84 108 240 240 234 244 244 238 243 243 237 212 182 79 255 255 126 131 135 141 119 133 159 132 141 163 195 162 126 219 188 133 218 185 135 180 180 176 221 190 150 175 181 191 176 183 196 181 189 201 202 170 38 209 209 204 207 207 202 251 241 74 229 229 224 238 238 233 226 234 245 244 244 237 255 251 113 255 255 124 255 241 2 255 234 3 249 219 0 255 249 29 252 243 30 227 181 0 212 165 5 222 170 0 173 179 194 216 171 19 255 255 198 208 208 203 156 90 7 206 175 50 91 91 95 211 180 71 242 242 237 246 246 241 212 182 80 255 255 123 129 137 152 255 239 8 251 223 0 59 25 0 251 215 0 228 183 0 222 191 149 249 238 43 177 186 197 187 129 0 186 194 206 209 209 203 249 238 67 255 255 211 226 226 221 235 235 229 100 103 111 76 93 127 255 255 112 88 104 139 130 135 148 149 155 158 247 218 0 224 194 126 255 217 0 228 184 0 13 30 68 161 138 32 204 152 0 255 255 53 206 155 18 207 207 201 255 250 72 255 255 82 209 176 59 232 232 227 243 243 236 245 245 240 255 255 115 255 255 251]; mask:((Depth1Image new) width: 24; height: 24; photometric:(#blackIs0); bitsPerSample:(#[1]); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@@@@@@@@@@@@@@@@G8@@O<@@_>@@^^@@\N@@\N@@?? @?? @?? @?? @?? @?? @?? @?? @_?@@@@@@@@@@@@@@@@@@@@@') ; yourself); yourself] |
648aad0e3777
class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents:
3049
diff
changeset
|
224 |
! |
648aad0e3777
class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents:
3049
diff
changeset
|
225 |
|
3000
7b530cc76688
class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents:
2978
diff
changeset
|
226 |
releaseViewIcon |
7b530cc76688
class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents:
2978
diff
changeset
|
227 |
"This resource specification was automatically generated |
7b530cc76688
class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents:
2978
diff
changeset
|
228 |
by the ImageEditor of ST/X." |
7b530cc76688
class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents:
2978
diff
changeset
|
229 |
|
7b530cc76688
class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents:
2978
diff
changeset
|
230 |
"Do not manually edit this!! If it is corrupted, |
7b530cc76688
class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents:
2978
diff
changeset
|
231 |
the ImageEditor may not be able to read the specification." |
7b530cc76688
class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents:
2978
diff
changeset
|
232 |
|
7b530cc76688
class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents:
2978
diff
changeset
|
233 |
" |
7b530cc76688
class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents:
2978
diff
changeset
|
234 |
self releaseViewIcon inspect |
7b530cc76688
class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents:
2978
diff
changeset
|
235 |
ImageEditor openOnClass:self andSelector:#releaseViewIcon |
7b530cc76688
class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents:
2978
diff
changeset
|
236 |
Icon flushCachedIcons |
7b530cc76688
class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents:
2978
diff
changeset
|
237 |
" |
7b530cc76688
class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents:
2978
diff
changeset
|
238 |
<resource: #image> |
7b530cc76688
class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents:
2978
diff
changeset
|
239 |
|
7b530cc76688
class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents:
2978
diff
changeset
|
240 |
^Icon |
3524 | 241 |
constantNamed:'Tools::ViewTreeInspectorApplication releaseViewIcon' |
242 |
ifAbsentPut:[(Depth8Image new) width: 24; height: 24; photometric:(#palette); bitsPerSample:(#[8]); samplesPerPixel:(1); bits:(ByteArray fromPackedString:' |
|
3000
7b530cc76688
class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents:
2978
diff
changeset
|
243 |
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ |
7b530cc76688
class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents:
2978
diff
changeset
|
244 |
@@@@@@@@@@@@@@A8^G!!7O3ACP5*P@@A8^G @@@@@@@@@@@A8^@@@OE0/!!P0S#0@@^G @@@@@@@@@@@B (@@''D#48"1.CX5H@(J@@@@@@@@@@@@B (@@@@@@" |
7b530cc76688
class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents:
2978
diff
changeset
|
245 |
''%!!/P7,@(J@@@@@@@@@@@@@%I@@@@BH%IRTQV5P@IRT@@@@@@@@@@@ANSP@@@@ANS$8:T80@S$8@@@@@@@@@@@AN&UYWK(EYQ@\FUPQHXT8@@@@@@@@@@@AN |
7b530cc76688
class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents:
2978
diff
changeset
|
246 |
HC2!!TVY:Y#-%I*IKMD8@@@@@@@@@@@A$\@83XBEG%).GGX _!!&P@@@@@@@@@@@AO[P5+ &(WPYN@["!!E\$<@@@@@@@@@@@B_F''FQPAXX_!!&TGH4HB9<@@@@@ |
7b530cc76688
class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents:
2978
diff
changeset
|
247 |
@@@@@@B_%3HCJ7=BKPU,Q)01B9<@@@@@@@@@@@@PBP8T_F!!''JPI)_Y"D&!!@@@@@@@@@@@@@$B)I9TGXO''WQIWQ93W0@@@@@@@@@@@@@$"U=JR$)JR$)JR$)_ |
7b530cc76688
class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents:
2978
diff
changeset
|
248 |
"P@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ |
7b530cc76688
class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents:
2978
diff
changeset
|
249 |
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@') ; colorMapFromArray:#[132 141 152 147 150 154 250 223 1 246 214 0 205 172 133 238 195 0 213 180 146 217 186 150 188 136 0 206 151 0 183 125 9 208 208 202 196 204 214 255 255 210 255 255 219 210 178 65 242 242 235 106 112 117 96 107 126 250 255 255 255 241 0 154 154 151 255 227 0 67 35 0 52 17 0 253 211 0 208 159 0 167 178 193 222 168 0 248 231 45 208 174 26 199 152 26 225 184 36 255 249 75 220 220 215 77 88 108 241 241 235 245 245 239 255 250 109 242 249 255 255 255 142 255 237 1 142 148 162 242 212 1 143 154 176 174 133 0 222 189 144 169 179 192 177 184 193 184 129 0 255 255 194 253 241 60 210 210 205 214 214 209 77 83 92 230 230 225 98 106 114 243 243 238 117 117 114 255 252 115 255 255 255 115 123 147 130 140 156 152 156 159 241 210 0 53 18 0 151 116 0 162 170 184 218 187 150 193 143 4 220 165 0 206 188 46 181 130 21 204 173 44 206 206 201 208 167 44 72 84 108 240 240 234 244 244 238 243 243 237 212 182 79 255 255 126 131 135 141 119 133 159 132 141 163 195 162 126 219 188 133 218 185 135 180 180 176 221 190 150 175 181 191 176 183 196 181 189 201 202 170 38 209 209 204 207 207 202 251 241 74 229 229 224 238 238 233 226 234 245 244 244 237 255 251 113 255 255 124 255 241 2 255 234 3 249 219 0 255 249 29 252 243 30 227 181 0 212 165 5 222 170 0 173 179 194 216 171 19 255 255 198 208 208 203 156 90 7 206 175 50 91 91 95 211 180 71 242 242 237 246 246 241 212 182 80 255 255 123 129 137 152 255 239 8 251 223 0 59 25 0 251 215 0 228 183 0 222 191 149 249 238 43 177 186 197 187 129 0 186 194 206 209 209 203 249 238 67 255 255 211 226 226 221 235 235 229 100 103 111 76 93 127 255 255 112 88 104 139 130 135 148 149 155 158 247 218 0 224 194 126 255 217 0 228 184 0 13 30 68 161 138 32 204 152 0 255 255 53 206 155 18 207 207 201 255 250 72 255 255 82 209 176 59 232 232 227 243 243 236 245 245 240 255 255 115 255 255 251]; mask:((Depth1Image new) width: 24; height: 24; photometric:(#blackIs0); bitsPerSample:(#[1]); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@@@@@@@@@@@@@@@@G8@@O<@@O>@@@^@@@N@@@N@@?? @?? @?? @?? @?? @?? @?? @?? @_?@@@@@@@@@@@@@@@@@@@@@') ; yourself); yourself] |
2744 | 250 |
! ! |
251 |
||
252 |
!ViewTreeInspectorApplication class methodsFor:'interface specs'! |
|
2177 | 253 |
|
254 |
windowSpec |
|
255 |
"This resource specification was automatically generated |
|
256 |
by the UIPainter of ST/X." |
|
257 |
||
258 |
"Do not manually edit this!! If it is corrupted, |
|
259 |
the UIPainter may not be able to read the specification." |
|
260 |
||
261 |
" |
|
2757 | 262 |
UIPainter new openOnClass:Tools::ViewTreeInspectorApplication andSelector:#windowSpec |
263 |
Tools::ViewTreeInspectorApplication new openInterface:#windowSpec |
|
264 |
Tools::ViewTreeInspectorApplication open |
|
2177 | 265 |
" |
266 |
||
267 |
<resource: #canvas> |
|
268 |
||
3524 | 269 |
^ |
3037
876c28de42da
class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents:
3034
diff
changeset
|
270 |
#(FullSpec |
876c28de42da
class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents:
3034
diff
changeset
|
271 |
name: windowSpec |
3524 | 272 |
window: |
3037
876c28de42da
class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents:
3034
diff
changeset
|
273 |
(WindowSpec |
3524 | 274 |
label: 'View Tree Inspector' |
275 |
name: 'View Tree Inspector' |
|
276 |
min: (Point 10 10) |
|
277 |
max: (Point 1024 9999) |
|
278 |
bounds: (Rectangle 0 0 693 643) |
|
279 |
menu: menu |
|
3037
876c28de42da
class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents:
3034
diff
changeset
|
280 |
) |
3524 | 281 |
component: |
3037
876c28de42da
class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents:
3034
diff
changeset
|
282 |
(SpecCollection |
3524 | 283 |
collection: ( |
284 |
(MenuPanelSpec |
|
285 |
name: 'toolbarMenu' |
|
286 |
layout: (LayoutFrame 0 0.0 0 0 0 1.0 40 0) |
|
287 |
menu: toolbarMenu |
|
288 |
textDefault: true |
|
289 |
) |
|
290 |
(VariableVerticalPanelSpec |
|
291 |
name: 'VariableVerticalPanel1' |
|
292 |
layout: (LayoutFrame 0 0.0 40 0.0 0 1.0 0 1.0) |
|
293 |
component: |
|
294 |
(SpecCollection |
|
295 |
collection: ( |
|
296 |
(ViewSpec |
|
297 |
name: 'PathAndListPane' |
|
298 |
component: |
|
299 |
(SpecCollection |
|
300 |
collection: ( |
|
301 |
(ViewSpec |
|
302 |
name: 'PathPane' |
|
303 |
layout: (LayoutFrame 0 0 0 0 0 1 25 0) |
|
304 |
component: |
|
305 |
(SpecCollection |
|
306 |
collection: ( |
|
307 |
(InputFieldSpec |
|
308 |
name: 'Path' |
|
309 |
layout: (LayoutFrame 0 0 0 0 0 1 0 1) |
|
310 |
model: path |
|
311 |
acceptOnReturn: true |
|
312 |
acceptOnTab: true |
|
313 |
acceptOnPointerLeave: true |
|
314 |
emptyFieldReplacementText: 'No View Selected' |
|
315 |
) |
|
316 |
) |
|
317 |
||
318 |
) |
|
319 |
) |
|
320 |
(HierarchicalListViewSpec |
|
321 |
name: 'List' |
|
322 |
layout: (LayoutFrame 0 0 25 0 0 1 0 1) |
|
323 |
level: 1 |
|
324 |
model: model |
|
325 |
menu: middleButtonMenu |
|
326 |
hasHorizontalScrollBar: true |
|
327 |
hasVerticalScrollBar: true |
|
328 |
miniScrollerHorizontal: true |
|
329 |
miniScrollerVertical: false |
|
330 |
listModel: listOfItems |
|
331 |
multipleSelectOk: true |
|
332 |
useIndex: false |
|
333 |
highlightMode: label |
|
334 |
showLeftIndicators: false |
|
335 |
indicatorSelector: indicatorClicked: |
|
336 |
useDefaultIcons: false |
|
337 |
postBuildCallback: postBuildTree: |
|
338 |
) |
|
339 |
) |
|
340 |
||
341 |
) |
|
342 |
) |
|
343 |
(ViewSpec |
|
344 |
name: 'Box2' |
|
345 |
component: |
|
346 |
(SpecCollection |
|
347 |
collection: ( |
|
348 |
(TabViewSpec |
|
349 |
name: 'TabHeader1' |
|
350 |
layout: (LayoutFrame 0 0.0 0 0 0 1.0 25 0) |
|
351 |
model: inspectorModeIndexHolder |
|
352 |
menu: inspectorModes |
|
353 |
useIndex: true |
|
354 |
translateLabel: true |
|
355 |
) |
|
356 |
(SubCanvasSpec |
|
357 |
name: 'Browser' |
|
358 |
layout: (LayoutFrame 0 0 26 0 0 1 0 1) |
|
359 |
visibilityChannel: browserVisibleHolder |
|
360 |
hasHorizontalScrollBar: true |
|
361 |
hasVerticalScrollBar: true |
|
362 |
majorKey: #'Tools::NewSystemBrowser' |
|
363 |
minorKey: singleClassWithoutVariableListBrowserSpec |
|
364 |
createNewApplication: true |
|
365 |
createNewBuilder: true |
|
366 |
postBuildCallback: postBuildBrowserCanvas: |
|
367 |
) |
|
368 |
(ViewSpec |
|
369 |
name: 'Inspector' |
|
370 |
layout: (LayoutFrame 0 0 26 0 0 1 0 1) |
|
371 |
visibilityChannel: inspectorVisibleHolder |
|
372 |
postBuildCallback: postBuildInspectorView: |
|
373 |
viewClassName: 'InspectorView' |
|
374 |
) |
|
375 |
) |
|
376 |
||
377 |
) |
|
378 |
) |
|
379 |
) |
|
380 |
||
381 |
) |
|
382 |
handles: (Any 0.5 1.0) |
|
383 |
) |
|
384 |
) |
|
385 |
||
3037
876c28de42da
class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents:
3034
diff
changeset
|
386 |
) |
876c28de42da
class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents:
3034
diff
changeset
|
387 |
) |
2177 | 388 |
! ! |
389 |
||
2744 | 390 |
!ViewTreeInspectorApplication class methodsFor:'menu specs'! |
2177 | 391 |
|
392 |
menu |
|
393 |
"This resource specification was automatically generated |
|
394 |
by the MenuEditor of ST/X." |
|
395 |
||
396 |
"Do not manually edit this!! If it is corrupted, |
|
3524 | 397 |
the MenuEditor may not be able to read the specification." |
2177 | 398 |
|
2978
a952dfdb1b6a
class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents:
2888
diff
changeset
|
399 |
|
2177 | 400 |
" |
2978
a952dfdb1b6a
class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents:
2888
diff
changeset
|
401 |
MenuEditor new openOnClass:Tools::ViewTreeInspectorApplication andSelector:#menu |
a952dfdb1b6a
class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents:
2888
diff
changeset
|
402 |
(Menu new fromLiteralArrayEncoding:(Tools::ViewTreeInspectorApplication menu)) startUp |
2177 | 403 |
" |
404 |
||
405 |
<resource: #menu> |
|
406 |
||
3524 | 407 |
^ |
2177 | 408 |
#(Menu |
3524 | 409 |
( |
410 |
(MenuItem |
|
411 |
label: 'File' |
|
412 |
submenu: |
|
413 |
(Menu |
|
414 |
( |
|
415 |
(MenuItem |
|
416 |
label: 'Pick a View' |
|
417 |
itemValue: doPickView |
|
418 |
) |
|
419 |
(MenuItem |
|
420 |
enabled: hasTargetWidgetChannel |
|
421 |
label: 'Release Picked View' |
|
422 |
itemValue: doUnpick |
|
423 |
) |
|
424 |
(MenuItem |
|
425 |
label: '-' |
|
426 |
) |
|
427 |
(MenuItem |
|
428 |
label: 'Settings' |
|
429 |
submenu: |
|
430 |
(Menu |
|
431 |
( |
|
432 |
(MenuItem |
|
433 |
label: 'Test Mode' |
|
434 |
hideMenuOnActivated: false |
|
435 |
indication: testModeChannel |
|
436 |
) |
|
437 |
(MenuItem |
|
438 |
enabled: testModeChannel |
|
439 |
label: 'Follow Focus' |
|
440 |
hideMenuOnActivated: false |
|
441 |
indication: followFocusChannel |
|
442 |
) |
|
443 |
(MenuItem |
|
444 |
label: '-' |
|
445 |
) |
|
446 |
(MenuItem |
|
447 |
label: 'Select on Click' |
|
448 |
hideMenuOnActivated: false |
|
449 |
indication: selectOnClickHolder |
|
450 |
) |
|
451 |
(MenuItem |
|
452 |
label: '-' |
|
453 |
) |
|
454 |
(MenuItem |
|
455 |
label: 'Show Name of Widgets' |
|
456 |
hideMenuOnActivated: false |
|
457 |
indication: showNamesHolder |
|
458 |
) |
|
459 |
) |
|
460 |
nil |
|
461 |
nil |
|
462 |
) |
|
463 |
) |
|
464 |
(MenuItem |
|
465 |
label: '-' |
|
466 |
) |
|
467 |
(MenuItem |
|
468 |
label: 'Exit' |
|
469 |
itemValue: closeRequest |
|
470 |
) |
|
471 |
) |
|
472 |
nil |
|
473 |
nil |
|
474 |
) |
|
475 |
) |
|
476 |
(MenuItem |
|
477 |
enabled: hasSingleSelectionHolder |
|
478 |
label: 'Selection' |
|
479 |
submenuChannel: middleButtonMenu |
|
480 |
) |
|
481 |
(MenuItem |
|
482 |
label: 'Widget' |
|
483 |
submenu: |
|
484 |
(Menu |
|
485 |
( |
|
486 |
(MenuItem |
|
487 |
enabled: hasSingleSelectionHolder |
|
488 |
label: 'Browse' |
|
489 |
itemValue: doBrowse: |
|
490 |
argument: view |
|
491 |
) |
|
492 |
(MenuItem |
|
493 |
enabled: hasSingleSelectionHolder |
|
494 |
label: 'Inspect' |
|
495 |
itemValue: doInspect: |
|
496 |
argument: view |
|
497 |
) |
|
498 |
(MenuItem |
|
499 |
label: '-' |
|
500 |
) |
|
501 |
(MenuItem |
|
502 |
enabled: hasTargetWidgetChannel |
|
503 |
label: 'All Components' |
|
504 |
startGroup: right |
|
505 |
submenuChannel: submenuComponents: |
|
506 |
) |
|
507 |
) |
|
508 |
nil |
|
509 |
nil |
|
510 |
) |
|
511 |
) |
|
512 |
(MenuItem |
|
513 |
label: 'Application' |
|
514 |
submenu: |
|
515 |
(Menu |
|
516 |
( |
|
517 |
(MenuItem |
|
518 |
label: 'Redraw' |
|
519 |
itemValue: doRedraw |
|
520 |
) |
|
521 |
(MenuItem |
|
522 |
label: '-' |
|
523 |
) |
|
524 |
(MenuItem |
|
525 |
enabled: hasSingleSelectionHolder |
|
526 |
label: 'Browse' |
|
527 |
itemValue: doBrowse: |
|
528 |
argument: application |
|
529 |
) |
|
530 |
(MenuItem |
|
531 |
enabled: hasSingleSelectionHolder |
|
532 |
label: 'Inspect' |
|
533 |
itemValue: doInspect: |
|
534 |
argument: application |
|
535 |
) |
|
536 |
(MenuItem |
|
537 |
label: '-' |
|
538 |
) |
|
539 |
(MenuItem |
|
540 |
enabled: canBrowseWindowSpecMethod |
|
541 |
label: 'Browse Window Spec Method' |
|
542 |
itemValue: doBrowseWindowSpecMethod |
|
543 |
) |
|
544 |
(MenuItem |
|
545 |
enabled: canEditWindowSpec |
|
546 |
label: 'Edit Window Spec' |
|
547 |
itemValue: doEditWindowSpec |
|
548 |
) |
|
549 |
(MenuItem |
|
550 |
label: '-' |
|
551 |
) |
|
552 |
(MenuItem |
|
553 |
enabled: hasTargetWidgetChannel |
|
554 |
label: 'All Applications' |
|
555 |
submenuChannel: submenuApplications: |
|
556 |
) |
|
557 |
) |
|
558 |
nil |
|
559 |
nil |
|
560 |
) |
|
561 |
) |
|
562 |
(MenuItem |
|
563 |
label: 'Process' |
|
564 |
submenu: |
|
565 |
(Menu |
|
566 |
( |
|
567 |
(MenuItem |
|
568 |
enabled: hasSingleSelectionHolder |
|
569 |
label: 'Debug' |
|
570 |
itemValue: doDebugProcess |
|
571 |
) |
|
572 |
(MenuItem |
|
573 |
enabled: hasSingleSelectionHolder |
|
574 |
label: 'Inspect' |
|
575 |
itemValue: doInspect: |
|
576 |
argument: process |
|
577 |
) |
|
578 |
(MenuItem |
|
579 |
label: '-' |
|
580 |
) |
|
581 |
(MenuItem |
|
582 |
label: 'Open Process Monitor' |
|
583 |
itemValue: doOpenProcessMonitor |
|
584 |
) |
|
585 |
) |
|
586 |
nil |
|
587 |
nil |
|
588 |
) |
|
589 |
) |
|
590 |
(MenuItem |
|
591 |
label: 'Help' |
|
592 |
startGroup: conditionalRight |
|
593 |
submenu: |
|
594 |
(Menu |
|
595 |
( |
|
596 |
(MenuItem |
|
597 |
label: 'Documentation' |
|
598 |
itemValue: openDocumentation |
|
599 |
) |
|
600 |
(MenuItem |
|
601 |
label: '-' |
|
602 |
) |
|
603 |
(MenuItem |
|
604 |
label: 'About this Application...' |
|
605 |
itemValue: openAboutThisApplication |
|
606 |
) |
|
607 |
) |
|
608 |
nil |
|
609 |
nil |
|
610 |
) |
|
611 |
) |
|
612 |
) |
|
613 |
nil |
|
614 |
nil |
|
2177 | 615 |
) |
616 |
! |
|
617 |
||
618 |
middleButtonMenu |
|
619 |
"This resource specification was automatically generated |
|
620 |
by the MenuEditor of ST/X." |
|
621 |
||
622 |
"Do not manually edit this!! If it is corrupted, |
|
623 |
the MenuEditor may not be able to read the specification." |
|
624 |
||
3213
33e1f779fa15
class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents:
3210
diff
changeset
|
625 |
|
2177 | 626 |
" |
3213
33e1f779fa15
class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents:
3210
diff
changeset
|
627 |
MenuEditor new openOnClass:Tools::ViewTreeInspectorApplication andSelector:#middleButtonMenu |
33e1f779fa15
class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents:
3210
diff
changeset
|
628 |
(Menu new fromLiteralArrayEncoding:(Tools::ViewTreeInspectorApplication middleButtonMenu)) startUp |
2177 | 629 |
" |
630 |
||
631 |
<resource: #menu> |
|
632 |
||
3524 | 633 |
^ |
2177 | 634 |
#(Menu |
3524 | 635 |
( |
636 |
(MenuItem |
|
637 |
label: 'Browse View Class' |
|
638 |
itemValue: doBrowse: |
|
639 |
argument: view |
|
640 |
) |
|
641 |
(MenuItem |
|
642 |
label: 'Browse Model Class' |
|
643 |
itemValue: doBrowse: |
|
644 |
isVisible: hasModel |
|
645 |
argument: model |
|
646 |
) |
|
647 |
(MenuItem |
|
648 |
label: 'Browse Application Class' |
|
649 |
itemValue: doBrowse: |
|
650 |
isVisible: hasApplication |
|
651 |
argument: application |
|
652 |
) |
|
653 |
(MenuItem |
|
654 |
label: 'Browse Controller Class' |
|
655 |
itemValue: doBrowse: |
|
656 |
isVisible: hasController |
|
657 |
argument: controller |
|
658 |
) |
|
659 |
(MenuItem |
|
660 |
label: '-' |
|
661 |
) |
|
662 |
(MenuItem |
|
663 |
label: 'Inspect View' |
|
664 |
itemValue: doInspect: |
|
665 |
argument: view |
|
666 |
) |
|
667 |
(MenuItem |
|
668 |
label: 'Inspect Window Group' |
|
669 |
itemValue: doInspect: |
|
670 |
argument: group |
|
671 |
) |
|
672 |
(MenuItem |
|
673 |
label: 'Inspect Model' |
|
674 |
itemValue: doInspect: |
|
675 |
isVisible: hasModel |
|
676 |
argument: model |
|
677 |
) |
|
678 |
(MenuItem |
|
679 |
label: 'Inspect Application' |
|
680 |
itemValue: doInspect: |
|
681 |
isVisible: hasApplication |
|
682 |
argument: application |
|
683 |
) |
|
684 |
(MenuItem |
|
685 |
label: 'Inspect Controller' |
|
686 |
itemValue: doInspect: |
|
687 |
isVisible: hasController |
|
688 |
argument: controller |
|
689 |
) |
|
690 |
(MenuItem |
|
691 |
label: '-' |
|
692 |
) |
|
693 |
(MenuItem |
|
694 |
label: 'Flash' |
|
695 |
itemValue: doFlash |
|
696 |
) |
|
697 |
(MenuItem |
|
698 |
label: '-' |
|
699 |
) |
|
700 |
(MenuItem |
|
701 |
label: 'Destroy' |
|
702 |
itemValue: doDestroy |
|
703 |
labelImage: (ResourceRetriever ToolbarIconLibrary erase16x16Icon 'Destroy') |
|
704 |
) |
|
705 |
(MenuItem |
|
706 |
label: '-' |
|
707 |
) |
|
708 |
(MenuItem |
|
709 |
label: 'Geometry' |
|
710 |
submenuChannel: submenuGeometry: |
|
711 |
keepLinkedMenu: true |
|
712 |
) |
|
713 |
(MenuItem |
|
714 |
label: 'Interface' |
|
715 |
submenuChannel: submenuInterface: |
|
716 |
keepLinkedMenu: true |
|
717 |
) |
|
718 |
(MenuItem |
|
719 |
label: 'Visibility' |
|
720 |
submenuChannel: submenuVisibility: |
|
721 |
keepLinkedMenu: true |
|
722 |
) |
|
723 |
(MenuItem |
|
724 |
label: 'Instance Variables' |
|
725 |
submenuChannel: submenuInspector: |
|
726 |
keepLinkedMenu: true |
|
727 |
) |
|
728 |
(MenuItem |
|
729 |
label: '=' |
|
730 |
) |
|
731 |
(MenuItem |
|
732 |
label: '' |
|
733 |
) |
|
734 |
(MenuItem |
|
735 |
enabled: selectedComponentHasChildren |
|
736 |
label: 'Applications' |
|
737 |
nameKey: single |
|
738 |
submenuChannel: submenuApplications: |
|
739 |
keepLinkedMenu: true |
|
740 |
) |
|
741 |
(MenuItem |
|
742 |
enabled: selectedComponentHasChildren |
|
743 |
label: 'Components' |
|
744 |
nameKey: single |
|
745 |
submenuChannel: submenuComponents: |
|
746 |
keepLinkedMenu: true |
|
747 |
) |
|
748 |
) |
|
749 |
nil |
|
750 |
nil |
|
2177 | 751 |
) |
752 |
! |
|
753 |
||
3456 | 754 |
middleButtonMenuForMenuItems |
755 |
"This resource specification was automatically generated |
|
756 |
by the MenuEditor of ST/X." |
|
757 |
||
758 |
"Do not manually edit this!! If it is corrupted, |
|
759 |
the MenuEditor may not be able to read the specification." |
|
760 |
||
761 |
||
762 |
" |
|
763 |
MenuEditor new openOnClass:Tools::ViewTreeInspectorApplication andSelector:#middleButtonMenu |
|
764 |
(Menu new fromLiteralArrayEncoding:(Tools::ViewTreeInspectorApplication middleButtonMenu)) startUp |
|
765 |
" |
|
766 |
||
767 |
<resource: #menu> |
|
768 |
||
3524 | 769 |
^ |
3456 | 770 |
#(Menu |
3524 | 771 |
( |
772 |
(MenuItem |
|
773 |
label: 'Browse Menu Item''s Class' |
|
774 |
itemValue: doBrowse: |
|
775 |
argument: menuItem |
|
776 |
) |
|
777 |
(MenuItem |
|
778 |
label: '-' |
|
779 |
) |
|
780 |
(MenuItem |
|
781 |
label: 'Inspect Menu Item' |
|
782 |
itemValue: doInspect: |
|
783 |
argument: menuItem |
|
784 |
) |
|
785 |
(MenuItem |
|
786 |
label: '-' |
|
787 |
) |
|
788 |
(MenuItem |
|
789 |
label: 'Interface' |
|
790 |
submenuChannel: submenuMenuItemInterface: |
|
791 |
keepLinkedMenu: true |
|
792 |
) |
|
793 |
) |
|
794 |
nil |
|
795 |
nil |
|
3456 | 796 |
) |
797 |
||
798 |
"Created: / 16-08-2017 / 13:48:49 / cg" |
|
799 |
! |
|
800 |
||
2177 | 801 |
toolbarMenu |
802 |
"This resource specification was automatically generated |
|
803 |
by the MenuEditor of ST/X." |
|
804 |
||
805 |
"Do not manually edit this!! If it is corrupted, |
|
806 |
the MenuEditor may not be able to read the specification." |
|
807 |
||
2978
a952dfdb1b6a
class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents:
2888
diff
changeset
|
808 |
|
2177 | 809 |
" |
2757 | 810 |
MenuEditor new openOnClass:Tools::ViewTreeInspectorApplication andSelector:#toolbarMenu |
811 |
(Menu new fromLiteralArrayEncoding:(Tools::ViewTreeInspectorApplication toolbarMenu)) startUp |
|
2177 | 812 |
" |
813 |
||
814 |
<resource: #menu> |
|
815 |
||
3524 | 816 |
^ |
2177 | 817 |
#(Menu |
3524 | 818 |
( |
819 |
(MenuItem |
|
820 |
enabled: hasTargetWidgetChannel |
|
821 |
label: 'Redraw' |
|
822 |
itemValue: doRedraw |
|
823 |
isButton: true |
|
824 |
labelImage: (ResourceRetriever ToolbarIconLibrary reloadIcon) |
|
825 |
) |
|
826 |
(MenuItem |
|
827 |
label: '-' |
|
828 |
) |
|
829 |
(MenuItem |
|
830 |
label: 'Pick a View and Catch Events' |
|
831 |
itemValue: doPickView |
|
832 |
translateLabel: false |
|
833 |
isButton: true |
|
834 |
hideMenuOnActivated: false |
|
835 |
labelImage: (ResourceRetriever ToolbarIconLibrary pickWindowIcon) |
|
836 |
) |
|
837 |
(MenuItem |
|
838 |
enabled: hasTargetWidgetChannel |
|
839 |
isVisible: isNotCatchingEventsChannel |
|
840 |
label: 'Catch Events of Picked View' |
|
841 |
activeHelpKey: doCatchEvents |
|
842 |
itemValue: doCatchEvents |
|
843 |
nameKey: doCatchEvents |
|
844 |
isButton: true |
|
845 |
labelImage: (ResourceRetriever nil releaseViewIcon) |
|
846 |
) |
|
847 |
(MenuItem |
|
848 |
enabled: hasTargetWidgetChannel |
|
849 |
isVisible: isCatchingEventsChannel |
|
850 |
label: 'Release Picked View and Uncatch Events' |
|
851 |
activeHelpKey: doUncatchEvents |
|
852 |
itemValue: doUncatchEvents |
|
853 |
nameKey: doUncatchEvents |
|
854 |
isButton: true |
|
855 |
labelImage: (ResourceRetriever nil lockViewIcon) |
|
856 |
) |
|
857 |
(MenuItem |
|
858 |
label: '-' |
|
859 |
) |
|
860 |
(MenuItem |
|
861 |
activeHelpKey: doBrowseApplication |
|
862 |
enabled: hasSingleSelectionHolder |
|
863 |
label: 'Browse Application' |
|
864 |
itemValue: doBrowse: |
|
865 |
translateLabel: false |
|
866 |
isButton: true |
|
867 |
hideMenuOnActivated: false |
|
868 |
labelImage: (ResourceRetriever ToolbarIconLibrary systemBrowser24x24Icon2) |
|
869 |
argument: application |
|
870 |
) |
|
871 |
(MenuItem |
|
872 |
activeHelpKey: doInspectApplication |
|
873 |
enabled: hasSingleSelectionHolder |
|
874 |
label: 'Inspect Application' |
|
875 |
itemValue: doInspect: |
|
876 |
translateLabel: false |
|
877 |
isButton: true |
|
878 |
hideMenuOnActivated: false |
|
879 |
labelImage: (ResourceRetriever ToolbarIconLibrary inspect22x24Icon) |
|
880 |
argument: application |
|
881 |
) |
|
882 |
) |
|
883 |
nil |
|
884 |
nil |
|
2177 | 885 |
) |
886 |
! ! |
|
887 |
||
2747 | 888 |
!ViewTreeInspectorApplication class methodsFor:'startup'! |
889 |
||
890 |
openInPickMode |
|
891 |
|app| |
|
892 |
||
893 |
app := self new. |
|
894 |
app open. |
|
2762 | 895 |
app doPickView. |
3124
1973e28a2c75
class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents:
3123
diff
changeset
|
896 |
^ app |
1973e28a2c75
class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents:
3123
diff
changeset
|
897 |
! |
1973e28a2c75
class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents:
3123
diff
changeset
|
898 |
|
1973e28a2c75
class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents:
3123
diff
changeset
|
899 |
openInPickModeAndRelease |
1973e28a2c75
class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents:
3123
diff
changeset
|
900 |
"release the pick-lock after picking" |
1973e28a2c75
class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents:
3123
diff
changeset
|
901 |
|
1973e28a2c75
class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents:
3123
diff
changeset
|
902 |
|app| |
1973e28a2c75
class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents:
3123
diff
changeset
|
903 |
|
1973e28a2c75
class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents:
3123
diff
changeset
|
904 |
app := self openInPickMode. |
1973e28a2c75
class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents:
3123
diff
changeset
|
905 |
app doUncatchEvents. |
1973e28a2c75
class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents:
3123
diff
changeset
|
906 |
^ app |
3014
05208490cea6
class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents:
3000
diff
changeset
|
907 |
! |
05208490cea6
class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents:
3000
diff
changeset
|
908 |
|
05208490cea6
class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents:
3000
diff
changeset
|
909 |
openOn:aView |
05208490cea6
class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents:
3000
diff
changeset
|
910 |
"show a particular window's topView hierarchy, |
05208490cea6
class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents:
3000
diff
changeset
|
911 |
select the given view" |
05208490cea6
class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents:
3000
diff
changeset
|
912 |
|
05208490cea6
class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents:
3000
diff
changeset
|
913 |
|app| |
05208490cea6
class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents:
3000
diff
changeset
|
914 |
|
05208490cea6
class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents:
3000
diff
changeset
|
915 |
app := self new. |
05208490cea6
class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents:
3000
diff
changeset
|
916 |
app open. |
05208490cea6
class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents:
3000
diff
changeset
|
917 |
app showWindow:aView. |
3124
1973e28a2c75
class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents:
3123
diff
changeset
|
918 |
^ app |
2747 | 919 |
! ! |
920 |
||
2744 | 921 |
!ViewTreeInspectorApplication methodsFor:'actions'! |
2177 | 922 |
|
923 |
indicatorClicked:anIndex |
|
924 |
|item sensor| |
|
925 |
||
926 |
item := model listOfItems at:anIndex ifAbsent:nil. |
|
927 |
||
928 |
item notNil ifTrue:[ |
|
3524 | 929 |
( (sensor := self window sensor) notNil |
930 |
and:[(sensor ctrlDown or:[sensor shiftDown])] |
|
931 |
) ifTrue:[ |
|
932 |
item recursiveToggleExpand |
|
933 |
] ifFalse:[ |
|
934 |
item toggleExpand |
|
935 |
] |
|
2177 | 936 |
]. |
937 |
! ! |
|
938 |
||
2744 | 939 |
!ViewTreeInspectorApplication methodsFor:'aspects'! |
2177 | 940 |
|
3302 | 941 |
browserVisibleHolder |
942 |
"what is shown in the inspector: |
|
943 |
1->Widget |
|
944 |
2->Application |
|
945 |
3->WindowGroup |
|
946 |
4->Sensor |
|
3524 | 947 |
5->Model |
948 |
6->Widget Class |
|
949 |
7->Application Class |
|
3302 | 950 |
" |
951 |
||
952 |
^ BlockValue |
|
3524 | 953 |
with:[:v | self inspectorMode == #widgetClass or:[self inspectorMode == #applicationClass] ] |
954 |
argument:self inspectorModeIndexHolder |
|
3302 | 955 |
! |
956 |
||
3174
cd45c49a0d63
class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents:
3171
diff
changeset
|
957 |
canBrowseWindowSpecMethod |
cd45c49a0d63
class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents:
3171
diff
changeset
|
958 |
^ self hasSingleSelectionHolder value and:[ self windowSpecMethodOfSelection notNil ] |
cd45c49a0d63
class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents:
3171
diff
changeset
|
959 |
! |
cd45c49a0d63
class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents:
3171
diff
changeset
|
960 |
|
cd45c49a0d63
class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents:
3171
diff
changeset
|
961 |
canEditWindowSpec |
cd45c49a0d63
class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents:
3171
diff
changeset
|
962 |
^ self hasSingleSelectionHolder value and:[ self windowSpecMethodOfSelection notNil ] |
cd45c49a0d63
class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents:
3171
diff
changeset
|
963 |
! |
cd45c49a0d63
class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents:
3171
diff
changeset
|
964 |
|
2177 | 965 |
followFocusChannel |
2455 | 966 |
"boolean holder, which indicates whether selection changed dependend on the focus view" |
967 |
||
2177 | 968 |
^ followFocusChannel |
969 |
! |
|
970 |
||
971 |
hasSingleSelectionHolder |
|
2455 | 972 |
"boolean holder, true if one item is selected" |
973 |
||
2177 | 974 |
^ hasSingleSelectionHolder |
975 |
! |
|
976 |
||
2455 | 977 |
hasTargetWidgetChannel |
978 |
"answer the channel which is set to true if a target widget exists" |
|
979 |
||
980 |
^ model hasTargetWidgetChannel |
|
981 |
! |
|
982 |
||
3037
876c28de42da
class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents:
3034
diff
changeset
|
983 |
inspectorMode |
3049
292d06e8b7ae
class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents:
3040
diff
changeset
|
984 |
"what is shown in the inspector: |
3037
876c28de42da
class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents:
3034
diff
changeset
|
985 |
1->widget |
3049
292d06e8b7ae
class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents:
3040
diff
changeset
|
986 |
2->application |
292d06e8b7ae
class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents:
3040
diff
changeset
|
987 |
3->WindowGroup |
292d06e8b7ae
class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents:
3040
diff
changeset
|
988 |
4->Sensor |
3524 | 989 |
5->Model |
990 |
6->Widget Class |
|
991 |
7->Application Class |
|
3049
292d06e8b7ae
class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents:
3040
diff
changeset
|
992 |
" |
292d06e8b7ae
class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents:
3040
diff
changeset
|
993 |
|
3302 | 994 |
|mode| |
995 |
mode := inspectorModeIndexHolder value. |
|
996 |
^ #( widget application group sensor model widgetClass applicationClass) at:mode ifAbsent:#widget |
|
3037
876c28de42da
class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents:
3034
diff
changeset
|
997 |
|
876c28de42da
class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents:
3034
diff
changeset
|
998 |
"Created: / 30-07-2013 / 07:44:59 / cg" |
876c28de42da
class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents:
3034
diff
changeset
|
999 |
! |
876c28de42da
class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents:
3034
diff
changeset
|
1000 |
|
876c28de42da
class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents:
3034
diff
changeset
|
1001 |
inspectorModeIndexHolder |
3049
292d06e8b7ae
class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents:
3040
diff
changeset
|
1002 |
"what is shown in the inspector: |
292d06e8b7ae
class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents:
3040
diff
changeset
|
1003 |
1->Widget |
292d06e8b7ae
class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents:
3040
diff
changeset
|
1004 |
2->Application |
292d06e8b7ae
class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents:
3040
diff
changeset
|
1005 |
3->WindowGroup |
292d06e8b7ae
class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents:
3040
diff
changeset
|
1006 |
4->Sensor |
3524 | 1007 |
5->Model |
1008 |
6->Widget Class |
|
1009 |
7->Application Class |
|
3049
292d06e8b7ae
class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents:
3040
diff
changeset
|
1010 |
" |
3037
876c28de42da
class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents:
3034
diff
changeset
|
1011 |
|
876c28de42da
class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents:
3034
diff
changeset
|
1012 |
^ inspectorModeIndexHolder |
876c28de42da
class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents:
3034
diff
changeset
|
1013 |
|
876c28de42da
class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents:
3034
diff
changeset
|
1014 |
"Created: / 30-07-2013 / 07:44:07 / cg" |
876c28de42da
class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents:
3034
diff
changeset
|
1015 |
! |
876c28de42da
class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents:
3034
diff
changeset
|
1016 |
|
876c28de42da
class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents:
3034
diff
changeset
|
1017 |
inspectorModes |
3302 | 1018 |
"/ labels of tabs |
1019 |
^ #('Widget' 'Application' 'WindowGroup' 'Sensor' 'Model' 'Widget Class' 'App Class') |
|
3037
876c28de42da
class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents:
3034
diff
changeset
|
1020 |
|
876c28de42da
class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents:
3034
diff
changeset
|
1021 |
"Created: / 30-07-2013 / 09:42:16 / cg" |
876c28de42da
class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents:
3034
diff
changeset
|
1022 |
! |
876c28de42da
class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents:
3034
diff
changeset
|
1023 |
|
3302 | 1024 |
inspectorVisibleHolder |
1025 |
"what is shown in the inspector: |
|
1026 |
1->Widget |
|
1027 |
2->Application |
|
1028 |
3->WindowGroup |
|
1029 |
4->Sensor |
|
3524 | 1030 |
5->Model |
1031 |
6->Widget Class |
|
1032 |
7->Application Class |
|
3302 | 1033 |
" |
1034 |
||
1035 |
^ BlockValue |
|
3524 | 1036 |
with:[:v | v not ] |
1037 |
argument:self browserVisibleHolder |
|
3302 | 1038 |
! |
1039 |
||
3124
1973e28a2c75
class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents:
3123
diff
changeset
|
1040 |
isCatchingEventsChannel |
1973e28a2c75
class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents:
3123
diff
changeset
|
1041 |
^ isCatchingEventsChannel |
1973e28a2c75
class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents:
3123
diff
changeset
|
1042 |
! |
1973e28a2c75
class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents:
3123
diff
changeset
|
1043 |
|
1973e28a2c75
class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents:
3123
diff
changeset
|
1044 |
isNotCatchingEventsChannel |
1973e28a2c75
class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents:
3123
diff
changeset
|
1045 |
^ BlockValue forLogicalNot:self isCatchingEventsChannel |
1973e28a2c75
class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents:
3123
diff
changeset
|
1046 |
! |
1973e28a2c75
class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents:
3123
diff
changeset
|
1047 |
|
2177 | 1048 |
listOfItems |
2455 | 1049 |
"returns the hierarchical list of items" |
1050 |
||
2177 | 1051 |
^ model listOfItems |
1052 |
! |
|
1053 |
||
1054 |
model |
|
2455 | 1055 |
"returns my selection model, a ViewTreeModel" |
1056 |
||
2177 | 1057 |
^ model |
1058 |
! |
|
1059 |
||
3112
80453ab62df9
Added field that shows XPath like path to selected widged.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3105
diff
changeset
|
1060 |
path |
80453ab62df9
Added field that shows XPath like path to selected widged.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3105
diff
changeset
|
1061 |
<resource: #uiAspect> |
80453ab62df9
Added field that shows XPath like path to selected widged.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3105
diff
changeset
|
1062 |
|
80453ab62df9
Added field that shows XPath like path to selected widged.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3105
diff
changeset
|
1063 |
path isNil ifTrue:[ |
3524 | 1064 |
path := PluggableAdaptor |
1065 |
on: self model |
|
1066 |
getter:[ :model | model path ] |
|
1067 |
setter:[ :model :newValue | ] |
|
3112
80453ab62df9
Added field that shows XPath like path to selected widged.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3105
diff
changeset
|
1068 |
]. |
80453ab62df9
Added field that shows XPath like path to selected widged.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3105
diff
changeset
|
1069 |
^ path. |
80453ab62df9
Added field that shows XPath like path to selected widged.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3105
diff
changeset
|
1070 |
|
80453ab62df9
Added field that shows XPath like path to selected widged.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3105
diff
changeset
|
1071 |
"Modified: / 19-05-2014 / 18:40:51 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
80453ab62df9
Added field that shows XPath like path to selected widged.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3105
diff
changeset
|
1072 |
! |
80453ab62df9
Added field that shows XPath like path to selected widged.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3105
diff
changeset
|
1073 |
|
2177 | 1074 |
selectOnClickHolder |
2455 | 1075 |
"boolean holder, which indicates whether the selection will change on click" |
1076 |
||
2177 | 1077 |
^ model selectOnClickHolder |
1078 |
! |
|
1079 |
||
2451 | 1080 |
showNamesHolder |
1081 |
"boolean holder, which indicates whether application names or widget names |
|
2455 | 1082 |
as additional text are shown for the items" |
1083 |
||
2451 | 1084 |
^ showNamesHolder |
1085 |
! |
|
1086 |
||
2177 | 1087 |
testModeChannel |
2455 | 1088 |
"answer a boolean channel which describes the behaviour how to process |
1089 |
events on the target view. |
|
1090 |
||
1091 |
false: all input events are eaten and the selection is shown on the target view. |
|
1092 |
true: no input events are eaten and no selection is shown on the target view." |
|
1093 |
||
1094 |
^ model testModeChannel |
|
3174
cd45c49a0d63
class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents:
3171
diff
changeset
|
1095 |
! |
cd45c49a0d63
class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents:
3171
diff
changeset
|
1096 |
|
cd45c49a0d63
class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents:
3171
diff
changeset
|
1097 |
windowSpecMethodOfSelection |
3302 | 1098 |
|item view app nonMeta meta masterApp |
1099 |
spec builder specSelector implementors| |
|
3174
cd45c49a0d63
class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents:
3171
diff
changeset
|
1100 |
|
cd45c49a0d63
class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents:
3171
diff
changeset
|
1101 |
item := model selectedItem. |
3524 | 1102 |
item isNil ifTrue:[^ nil]. |
3174
cd45c49a0d63
class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents:
3171
diff
changeset
|
1103 |
|
cd45c49a0d63
class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents:
3171
diff
changeset
|
1104 |
view := item widget. |
3524 | 1105 |
view isNil ifTrue:[^ nil]. |
3174
cd45c49a0d63
class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents:
3171
diff
changeset
|
1106 |
|
cd45c49a0d63
class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents:
3171
diff
changeset
|
1107 |
app := view application. |
3524 | 1108 |
app isNil ifTrue:[^ nil]. |
1109 |
||
3174
cd45c49a0d63
class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents:
3171
diff
changeset
|
1110 |
builder := app builder. |
3524 | 1111 |
builder isNil ifTrue:[^ nil]. |
3174
cd45c49a0d63
class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents:
3171
diff
changeset
|
1112 |
|
cd45c49a0d63
class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents:
3171
diff
changeset
|
1113 |
spec := builder spec. |
cd45c49a0d63
class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents:
3171
diff
changeset
|
1114 |
spec isNil ifTrue:[^ nil]. |
cd45c49a0d63
class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents:
3171
diff
changeset
|
1115 |
|
cd45c49a0d63
class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents:
3171
diff
changeset
|
1116 |
specSelector := spec name. |
cd45c49a0d63
class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents:
3171
diff
changeset
|
1117 |
specSelector isNil ifTrue:[^ nil]. |
cd45c49a0d63
class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents:
3171
diff
changeset
|
1118 |
|
3302 | 1119 |
((nonMeta := app class theNonMetaclass) canUnderstand:specSelector) ifTrue:[ |
3524 | 1120 |
^ nonMeta lookupMethodFor:specSelector. |
3174
cd45c49a0d63
class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents:
3171
diff
changeset
|
1121 |
]. |
3302 | 1122 |
((meta := app class theMetaclass) canUnderstand:specSelector) ifTrue:[ |
3524 | 1123 |
^ meta lookupMethodFor:specSelector. |
3174
cd45c49a0d63
class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents:
3171
diff
changeset
|
1124 |
]. |
cd45c49a0d63
class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents:
3171
diff
changeset
|
1125 |
|
cd45c49a0d63
class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents:
3171
diff
changeset
|
1126 |
"/ maybe a simple dialog given a spec |
3302 | 1127 |
(masterApp := app masterApplication) notNil ifTrue:[ |
3524 | 1128 |
((nonMeta := masterApp class theNonMetaclass) canUnderstand:specSelector) ifTrue:[ |
1129 |
^ nonMeta lookupMethodFor:specSelector. |
|
1130 |
]. |
|
1131 |
((meta := masterApp class theMetaclass) canUnderstand:specSelector) ifTrue:[ |
|
1132 |
^ meta lookupMethodFor:specSelector. |
|
1133 |
]. |
|
3174
cd45c49a0d63
class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents:
3171
diff
changeset
|
1134 |
]. |
cd45c49a0d63
class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents:
3171
diff
changeset
|
1135 |
|
cd45c49a0d63
class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents:
3171
diff
changeset
|
1136 |
implementors := Smalltalk allImplementorsOf: specSelector. |
cd45c49a0d63
class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents:
3171
diff
changeset
|
1137 |
implementors size == 1 ifTrue:[ |
3524 | 1138 |
^ implementors first compiledMethodAt:specSelector. |
3174
cd45c49a0d63
class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents:
3171
diff
changeset
|
1139 |
]. |
cd45c49a0d63
class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents:
3171
diff
changeset
|
1140 |
|
cd45c49a0d63
class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents:
3171
diff
changeset
|
1141 |
^ nil |
2177 | 1142 |
! ! |
1143 |
||
2744 | 1144 |
!ViewTreeInspectorApplication methodsFor:'change & update'! |
2177 | 1145 |
|
3037
876c28de42da
class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents:
3034
diff
changeset
|
1146 |
inspectorModeIndexHolderChanged |
876c28de42da
class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents:
3034
diff
changeset
|
1147 |
self updateInspector |
876c28de42da
class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents:
3034
diff
changeset
|
1148 |
|
876c28de42da
class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents:
3034
diff
changeset
|
1149 |
"Created: / 30-07-2013 / 09:21:51 / cg" |
876c28de42da
class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents:
3034
diff
changeset
|
1150 |
! |
876c28de42da
class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents:
3034
diff
changeset
|
1151 |
|
2177 | 1152 |
selectionChanged |
1153 |
|info view item| |
|
1154 |
||
1155 |
item := model selectedItem. |
|
3524 | 1156 |
item notNil ifTrue:[ |
1157 |
|state| |
|
1158 |
||
1159 |
view := item widget. |
|
1160 |
view isNil ifTrue:[ |
|
1161 |
info := '%1 [%2]' bindWith:(item menuItem label asString) |
|
1162 |
with:(item menuItem value asString). |
|
1163 |
] ifFalse:[ |
|
1164 |
view id isNil ifTrue:[ |
|
1165 |
state := 'no ID'. |
|
1166 |
] ifFalse:[ |
|
1167 |
view shown ifTrue:[ |
|
1168 |
state := 'visible'. |
|
1169 |
] ifFalse:[ |
|
1170 |
state := 'invisible' |
|
1171 |
]. |
|
1172 |
]. |
|
1173 |
info := '%1 [%2] - %3' bindWith:(view class name) |
|
1174 |
with:(view name ? '') with:state allBold. |
|
1175 |
] |
|
2177 | 1176 |
] ifFalse:[ |
3524 | 1177 |
info := '' |
2177 | 1178 |
]. |
1179 |
hasSingleSelectionHolder value:(view notNil). |
|
3037
876c28de42da
class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents:
3034
diff
changeset
|
1180 |
self updateInspector |
876c28de42da
class: Tools::ViewTreeInspectorApplication
Claus Gittinger <cg@exept.de>
parents:
3034
diff
changeset
|
1181 |
|
3456 | 1182 |
"Modified: / 16-08-2017 / 13:44:59 / cg" |
2177 | 1183 |
! |
1184 |
||
1185 |
update:something with:someArgument from:aModel |
|
2454 | 1186 |
|oldSelection| |
1187 |
||
2451 | 1188 |
aModel == showNamesHolder ifTrue:[ |
3524 | 1189 |
oldSelection := model selectedItem. |
1190 |
model selectedItem:nil. |
|
1191 |
self listOfItems showWidgetNames:(aModel value). |
|
1192 |
model selectedItem:oldSelection. |
|
1193 |
^ self |
|
2451 | 1194 |
]. |
2458 | 1195 |
|
1196 |
aModel == model ifTrue:[ |
|
3524 | 1197 |
self selectionChanged. |
1198 |
^ self |
|
2458 | 1199 |
]. |
1200 |
||
2177 | 1201 |
super update:something with:someArgument from:aModel. |
3037 |