435 menu |
435 menu |
436 "This resource specification was automatically generated |
436 "This resource specification was automatically generated |
437 by the MenuEditor of ST/X." |
437 by the MenuEditor of ST/X." |
438 |
438 |
439 "Do not manually edit this!! If it is corrupted, |
439 "Do not manually edit this!! If it is corrupted, |
440 the MenuEditor may not be able to read the specification." |
440 the MenuEditor may not be able to read the specification." |
441 |
441 |
442 |
442 |
443 " |
443 " |
444 MenuEditor new openOnClass:Tools::ViewTreeInspectorApplication andSelector:#menu |
444 MenuEditor new openOnClass:Tools::ViewTreeInspectorApplication andSelector:#menu |
445 (Menu new fromLiteralArrayEncoding:(Tools::ViewTreeInspectorApplication menu)) startUp |
445 (Menu new fromLiteralArrayEncoding:(Tools::ViewTreeInspectorApplication menu)) startUp |
573 (MenuItem |
573 (MenuItem |
574 enabled: hasSingleSelectionHolder |
574 enabled: hasSingleSelectionHolder |
575 label: 'Inspect' |
575 label: 'Inspect' |
576 itemValue: doInspect: |
576 itemValue: doInspect: |
577 argument: application |
577 argument: application |
|
578 ) |
|
579 (MenuItem |
|
580 label: '-' |
|
581 ) |
|
582 (MenuItem |
|
583 enabled: canBrowseWindowSpecMethod |
|
584 label: 'Browse Window Spec Method' |
|
585 itemValue: doBrowseWindowSpecMethod |
|
586 ) |
|
587 (MenuItem |
|
588 enabled: canEditWindowSpec |
|
589 label: 'Edit Window Spec' |
|
590 itemValue: doEditWindowSpec |
578 ) |
591 ) |
579 (MenuItem |
592 (MenuItem |
580 label: '-' |
593 label: '-' |
581 ) |
594 ) |
582 (MenuItem |
595 (MenuItem |
1047 |
1068 |
1048 false: all input events are eaten and the selection is shown on the target view. |
1069 false: all input events are eaten and the selection is shown on the target view. |
1049 true: no input events are eaten and no selection is shown on the target view." |
1070 true: no input events are eaten and no selection is shown on the target view." |
1050 |
1071 |
1051 ^ model testModeChannel |
1072 ^ model testModeChannel |
|
1073 ! |
|
1074 |
|
1075 windowSpecMethodOfSelection |
|
1076 |item view app spec builder specSelector implementors| |
|
1077 |
|
1078 item := model selectedItem. |
|
1079 item isNil ifTrue:[^ nil]. |
|
1080 |
|
1081 view := item widget. |
|
1082 view isNil ifTrue:[^ nil]. |
|
1083 |
|
1084 app := view application. |
|
1085 app isNil ifTrue:[^ nil]. |
|
1086 |
|
1087 builder := app builder. |
|
1088 builder isNil ifTrue:[^ nil]. |
|
1089 |
|
1090 spec := builder spec. |
|
1091 spec isNil ifTrue:[^ nil]. |
|
1092 |
|
1093 specSelector := spec name. |
|
1094 specSelector isNil ifTrue:[^ nil]. |
|
1095 |
|
1096 (app class theNonMetaclass canUnderstand:specSelector) ifTrue:[ |
|
1097 ^ app class theNonMetaclass lookupMethodFor:specSelector. |
|
1098 ]. |
|
1099 (app class theMetaclass canUnderstand:specSelector) ifTrue:[ |
|
1100 ^ app class theMetaclass lookupMethodFor:specSelector. |
|
1101 ]. |
|
1102 |
|
1103 "/ maybe a simple dialog given a spec |
|
1104 app masterApplication notNil ifTrue:[ |
|
1105 (app masterApplication class theNonMetaclass canUnderstand:specSelector) ifTrue:[ |
|
1106 ^ app masterApplication class theNonMetaclass lookupMethodFor:specSelector. |
|
1107 ]. |
|
1108 (app masterApplication class theMetaclass canUnderstand:specSelector) ifTrue:[ |
|
1109 ^ app masterApplication class theMetaclass lookupMethodFor:specSelector. |
|
1110 ]. |
|
1111 ]. |
|
1112 |
|
1113 implementors := Smalltalk allImplementorsOf: specSelector. |
|
1114 implementors size == 1 ifTrue:[ |
|
1115 ^ implementors first compiledMethodAt:specSelector. |
|
1116 ]. |
|
1117 |
|
1118 ^ nil |
1052 ! ! |
1119 ! ! |
1053 |
1120 |
1054 !ViewTreeInspectorApplication methodsFor:'change & update'! |
1121 !ViewTreeInspectorApplication methodsFor:'change & update'! |
1055 |
1122 |
1056 inspectorModeIndexHolderChanged |
1123 inspectorModeIndexHolderChanged |
1076 state := 'invisible' |
1144 state := 'invisible' |
1077 ]. |
1145 ]. |
1078 ]. |
1146 ]. |
1079 info := '%1 [%2] - %3' bindWith:(view class name) |
1147 info := '%1 [%2] - %3' bindWith:(view class name) |
1080 with:(view name ? '') with:state allBold. |
1148 with:(view name ? '') with:state allBold. |
1081 |
|
1082 ] ifFalse:[ |
1149 ] ifFalse:[ |
1083 info := '' |
1150 info := '' |
1084 ]. |
1151 ]. |
1085 hasSingleSelectionHolder value:(view notNil). |
1152 hasSingleSelectionHolder value:(view notNil). |
1086 self updateInspector |
1153 self updateInspector |
1938 inst class browserClass openInClass:(inst class) selector:nil |
2005 inst class browserClass openInClass:(inst class) selector:nil |
1939 |
2006 |
1940 "Modified: / 28-08-2013 / 23:57:42 / cg" |
2007 "Modified: / 28-08-2013 / 23:57:42 / cg" |
1941 ! |
2008 ! |
1942 |
2009 |
|
2010 doBrowseWindowSpecMethod |
|
2011 |mthd| |
|
2012 |
|
2013 mthd := self windowSpecMethodOfSelection. |
|
2014 NewSystemBrowser openInClass:mthd mclass selector:mthd selector |
|
2015 ! |
|
2016 |
1943 doCatchEvents |
2017 doCatchEvents |
1944 model catchEvents:true. |
2018 model catchEvents:true. |
1945 isCatchingEventsChannel value:true. |
2019 isCatchingEventsChannel value:true. |
1946 "/ ((builder componentAt:'toolbarMenu') itemAt:#doUncatchEvents) |
2020 "/ ((builder componentAt:'toolbarMenu') itemAt:#doUncatchEvents) |
1947 "/ enabled:true; |
2021 "/ enabled:true; |