196 |
196 |
197 "Do not manually edit this!! If it is corrupted, |
197 "Do not manually edit this!! If it is corrupted, |
198 the UIPainter may not be able to read the specification." |
198 the UIPainter may not be able to read the specification." |
199 |
199 |
200 " |
200 " |
201 UIPainter new openOnClass:Tools::ViewTreeApplication andSelector:#windowSpec |
201 UIPainter new openOnClass:Tools::ViewTreeInspectorApplication andSelector:#windowSpec |
202 Tools::ViewTreeApplication new openInterface:#windowSpec |
202 Tools::ViewTreeInspectorApplication new openInterface:#windowSpec |
203 Tools::ViewTreeApplication open |
203 Tools::ViewTreeInspectorApplication open |
204 " |
204 " |
205 |
205 |
206 <resource: #canvas> |
206 <resource: #canvas> |
207 |
207 |
208 ^ |
208 ^ |
209 #(FullSpec |
209 #(FullSpec |
210 name: windowSpec |
210 name: windowSpec |
211 window: |
211 window: |
212 (WindowSpec |
212 (WindowSpec |
213 label: 'View Tree Inspector' |
213 label: 'View Tree Inspector' |
214 name: 'ViewTreeInspector' |
214 name: 'View Tree Inspector' |
215 min: (Point 10 10) |
215 min: (Point 10 10) |
216 max: (Point 1024 9999) |
216 max: (Point 1024 9999) |
217 bounds: (Rectangle 0 0 381 654) |
217 bounds: (Rectangle 0 0 381 654) |
218 menu: menu |
218 menu: menu |
219 ) |
219 ) |
220 component: |
220 component: |
221 (SpecCollection |
221 (SpecCollection |
222 collection: ( |
222 collection: ( |
223 (MenuPanelSpec |
223 (MenuPanelSpec |
224 name: 'toolbarMenu' |
224 name: 'toolbarMenu' |
225 layout: (LayoutFrame 0 0.0 0 0 0 1.0 32 0) |
225 layout: (LayoutFrame 0 0.0 0 0 0 1.0 40 0) |
226 menu: toolbarMenu |
226 menu: toolbarMenu |
227 textDefault: true |
227 textDefault: true |
228 ) |
228 ) |
229 (HierarchicalListViewSpec |
229 (HierarchicalListViewSpec |
230 name: 'List' |
230 name: 'List' |
231 layout: (LayoutFrame 0 0.0 32 0.0 0 1.0 0 1.0) |
231 layout: (LayoutFrame 0 0.0 40 0.0 0 1.0 0 1.0) |
232 level: 1 |
232 level: 1 |
233 model: model |
233 model: model |
234 menu: middleButtonMenu |
234 menu: middleButtonMenu |
235 hasHorizontalScrollBar: true |
235 hasHorizontalScrollBar: true |
236 hasVerticalScrollBar: true |
236 hasVerticalScrollBar: true |
611 |
611 |
612 "Do not manually edit this!! If it is corrupted, |
612 "Do not manually edit this!! If it is corrupted, |
613 the MenuEditor may not be able to read the specification." |
613 the MenuEditor may not be able to read the specification." |
614 |
614 |
615 " |
615 " |
616 MenuEditor new openOnClass:Tools::ViewTreeApplication andSelector:#toolbarMenu |
616 MenuEditor new openOnClass:Tools::ViewTreeInspectorApplication andSelector:#toolbarMenu |
617 (Menu new fromLiteralArrayEncoding:(Tools::ViewTreeApplication toolbarMenu)) startUp |
617 (Menu new fromLiteralArrayEncoding:(Tools::ViewTreeInspectorApplication toolbarMenu)) startUp |
618 " |
618 " |
619 |
619 |
620 <resource: #menu> |
620 <resource: #menu> |
621 |
621 |
622 ^ |
622 ^ |
627 itemValue: doPickViews |
627 itemValue: doPickViews |
628 translateLabel: false |
628 translateLabel: false |
629 isButton: true |
629 isButton: true |
630 hideMenuOnActivated: false |
630 hideMenuOnActivated: false |
631 labelImage: (ResourceRetriever #'Tools::ViewTreeInspectorApplication' pickWindowIcon) |
631 labelImage: (ResourceRetriever #'Tools::ViewTreeInspectorApplication' pickWindowIcon) |
|
632 ) |
|
633 (MenuItem |
|
634 enabled: hasTargetWidgetChannel |
|
635 label: 'Release Picked View' |
|
636 isButton: true |
|
637 itemValue: doUnpick |
|
638 translateLabel: true |
|
639 labelImage: (ResourceRetriever ToolbarIconLibrary undoIcon) |
|
640 ) |
|
641 (MenuItem |
|
642 label: '-' |
632 ) |
643 ) |
633 (MenuItem |
644 (MenuItem |
634 enabled: hasSingleSelectionHolder |
645 enabled: hasSingleSelectionHolder |
635 label: 'Browse Application' |
646 label: 'Browse Application' |
636 itemValue: doBrowse: |
647 itemValue: doBrowse: |
2935 |
2946 |
2936 !ViewTreeInspectorApplication::ViewTreeModel methodsFor:'event processing'! |
2947 !ViewTreeInspectorApplication::ViewTreeModel methodsFor:'event processing'! |
2937 |
2948 |
2938 processEvent:anEvent |
2949 processEvent:anEvent |
2939 "catch and process all WindowEvents for the rootComponent and its contained |
2950 "catch and process all WindowEvents for the rootComponent and its contained |
2940 widgets; redraw selection in case of damage .... |
2951 widgets; redraw selection in case of damage... |
2941 " |
2952 return true, if the event was eaten" |
|
2953 |
2942 |evView item rootView testMode| |
2954 |evView item rootView testMode| |
2943 |
2955 |
2944 evView := anEvent view. |
2956 evView := anEvent view. |
2945 evView isNil ifTrue:[ |
2957 evView isNil ifTrue:[ |
2946 (anEvent isMessageSendEvent and:[anEvent receiver == self]) ifFalse:[ |
2958 (anEvent isMessageSendEvent not or:[anEvent receiver ~~ self]) ifTrue:[ |
2947 ^ false |
2959 ^ false |
2948 ]. |
2960 ]. |
2949 anEvent value. |
2961 anEvent value. |
2950 ^ true. |
2962 ^ true. |
2951 ]. |
2963 ]. |