cg@809: " cg@809: COPYRIGHT (c) 1997 by eXept Software AG cg@2621: All Rights Reserved cg@809: cg@809: This software is furnished under a license and may be used cg@809: only in accordance with the terms of that license and with the cg@809: inclusion of the above copyright notice. This software may not cg@809: be provided or otherwise made available to, or used by, any cg@809: other person. No title to or ownership of the software is cg@809: hereby transferred. cg@809: " cg@2298: "{ Package: 'stx:libtool2' }" cg@809: cg@2621: "{ NameSpace: Tools }" ca@32: cg@1213: VariableVerticalPanel subclass:#NewInspectorView ca@32: instanceVariableNames:'inspectorView userSpace workSpace inspectedObject' ca@32: classVariableNames:'' ca@32: poolDictionaries:'' cg@1213: category:'Interface-NewInspector' ca@32: ! ca@32: cg@1213: !NewInspectorView class methodsFor:'documentation'! ca@32: cg@809: copyright cg@809: " cg@809: COPYRIGHT (c) 1997 by eXept Software AG cg@2621: All Rights Reserved cg@809: cg@809: This software is furnished under a license and may be used cg@809: only in accordance with the terms of that license and with the cg@809: inclusion of the above copyright notice. This software may not cg@809: be provided or otherwise made available to, or used by, any cg@809: other person. No title to or ownership of the software is cg@809: hereby transferred. cg@809: " cg@809: cg@809: cg@809: ! cg@809: cg@809: documentation cg@809: " cg@809: a new (multipane) inspector; cg@809: open with: cg@2621: Tools::NewInspectorView inspect:Object cg@809: cg@809: install as standard inspector: cg@2621: Smalltalk at:#Inspector put:(Tools::NewInspectorView) cg@809: cg@809: [open with:] cg@2621: Tools::NewInspectorView cg@2621: inspect:(Array with:#hello with:'hello' with:#(1 2 3) asSortedCollection with:Display) cg@809: cg@809: [author:] cg@2621: Claus Atzkern cg@809: " cg@809: ! cg@809: ca@32: examples ca@32: ca@32: " ca@39: open an inspector on an array cg@2621: [exBegin] ca@39: |array| ca@39: ca@39: array := Array new:5. ca@39: array at:1 put:(Array new:400). cg@2621: Tools::NewInspectorView inspect:array cg@2621: [exEnd] ca@32: " ca@32: ! ! ca@32: cg@1213: !NewInspectorView class methodsFor:'instance creation'! ca@32: cg@811: inspect:anObject ca@32: "start inspector on an instance ca@32: " cg@811: ^ self openOn:anObject cg@811: ! cg@811: cg@811: openOn:anObject cg@811: "start an inspector on some object cg@811: " cg@811: ca@32: |top isp| ca@32: ca@32: top := StandardSystemView new extent:600@400. cg@1213: isp := NewInspectorView origin:0.0@0.0 corner:1.0@1.0 in:top. cg@811: isp inspect:anObject. ca@32: top open. ca@32: cg@811: ^ isp. ca@32: ! ! ca@32: cg@1213: !NewInspectorView methodsFor:'accessing'! ca@32: ca@32: inspect:anInstance ca@32: ca@32: inspectedObject := anInstance. ca@32: self topView label:(inspectedObject class name asString). ca@32: inspectorView inspect:anInstance. ca@32: self updateWorkSpace. ca@32: ca@32: ! ! ca@32: cg@1213: !NewInspectorView methodsFor:'initialization'! ca@32: ca@32: initialize cg@88: |view wsHeight| ca@32: ca@32: super initialize. ca@32: ca@32: view := SimpleView origin:0.0 @ 0.0 corner:1.0 @ 0.5 in:self. ca@32: cg@1213: inspectorView := NewInspectorPanelView origin:0.0 @ 0.0 corner:1.0 @ 1.0 in:view. ca@32: workSpace := Workspace origin:0.0 @ 1.0 corner:1.0 @ 1.0 in:view. ca@32: userSpace := Workspace origin:0.0 @ 0.5 corner:1.0 @ 1.0 in:self. ca@32: cg@88: wsHeight := (workSpace preferredExtentForLines:1 cols:10) y. cg@88: workSpace topInset:wsHeight negated. cg@88: inspectorView bottomInset:wsHeight. ca@32: ca@32: userSpace acceptAction:[:theText|inspectorView accept:theText notifying:workSpace]. ca@32: workSpace acceptAction:[:theText|inspectorView accept:theText notifying:workSpace]. ca@32: ca@32: userSpace doItAction:[:theCode|inspectorView doIt:theCode notifying:workSpace]. ca@32: workSpace doItAction:[:theCode|inspectorView doIt:theCode notifying:workSpace]. ca@32: ca@32: inspectorView action:[:el|self updateWorkSpace]. ca@32: ca@32: inspectorView valueChangedAction:[:el||lbl| cg@2621: workSpace list:(Array with:(el displayString)). ca@32: ]. cg@88: cg@88: "Modified: 18.3.1997 / 10:57:34 / cg" ca@32: ! ! ca@32: cg@1213: !NewInspectorView methodsFor:'update'! ca@32: ca@32: updateWorkSpace ca@32: "update the workSpace ca@32: " ca@32: workSpace list:(Array with:(inspectorView selectedInstanceVar displayString)). ca@32: ! ! ca@32: cg@1213: !NewInspectorView class methodsFor:'documentation'! ca@32: ca@32: version ca@32: ^ '$Header$' ca@32: ! !