'From Cuis 1.0 of 2 October 2009 [latest update: #316] on 7 October 2009 at 12:03:50 pm'!
!classDefinition: #TransformMorph category: #'Morphic-Basic'!
Morph subclass: #TransformMorph
	instanceVariableNames: 'transform smoothing localBounds '
	classVariableNames: ''
	poolDictionaries: ''
	category: 'Morphic-Basic'!

!Inspector class methodsFor: 'instance creation' stamp: 'jmv 10/7/2009 11:42'!
openAsMorphOn: anObject withLabel: aLabel
	"(Inspector openAsMorphOn: SystemOrganization) openInMVC"
	| window inspector |
	inspector _ self inspect: anObject.
	window _ (SystemWindow labelled: aLabel) model: inspector.
	window addMorph: (
		PluggableListMorph new
			doubleClickSelector: #inspectSelection;
			model: inspector 
			listGetter: #fieldList
			indexGetter: #selectionIndex
			indexSetter: #toggleIndex:
			menuGetter: ((inspector isMemberOf: DictionaryInspector)
					ifTrue: [#dictionaryMenu:]
					ifFalse: [#fieldListMenu:])
			keystrokeAction: #inspectorKey:from:)
		frame: (0@0 corner: self horizontalDividerProportion @ self verticalDividerProportion).
	window addMorph: (PluggableTextMorph
			model: inspector 
			editorClass: inspector editorClass 
			textGetter: #contents 
			textSetter: #accept:
			selectionGetter: #contentsSelection 
			menuGetter: #paneMenu:shifted:editorClass:)
		frame: (self horizontalDividerProportion @0 corner: 1@self verticalDividerProportion).
	window addMorph: ((PluggableTextMorph 
			model: inspector 
			editorClass: inspector editorClass
			textGetter: #trash 
			textSetter: #trash:
			selectionGetter: #contentsSelection 
			menuGetter: #paneMenu:shifted:editorClass:)
					askBeforeDiscardingEdits: false)
		frame: (0@self verticalDividerProportion corner: 1@1).
	window setUpdatablePanesFrom: #(fieldList).
	^ window! !


!SimpleHierarchicalListMorph methodsFor: 'drawing' stamp: 'jmv 10/7/2009 11:45'!
drawLinesOn: aCanvas
	| lColor |
	lColor _ self lineColor.
	aCanvas 
		transformBy: scroller transform
		clippingTo: scroller innerBounds
		during:[:clippedCanvas |
			scroller submorphs do: [ :submorph |
				( 
					(submorph isExpanded) or: [
					(clippedCanvas isVisible: submorph fullBounds) or: [
					(submorph nextSibling notNil and: [clippedCanvas isVisible: submorph nextSibling]) 				]]) ifTrue:[
					submorph drawLinesOn: clippedCanvas lineColor: lColor.
				]
			].
		]
		smoothing: 1.
! !


!TransformMorph methodsFor: 'drawing' stamp: 'jmv 10/7/2009 11:44'!
drawSubmorphsOn: aCanvas

	aCanvas transformBy: transform
		clippingTo: self innerBounds
		during: [:myCanvas |
				submorphs reverseDo:[:m | myCanvas fullDrawMorph: m] ]
		smoothing: 1! !

!TransformMorph methodsFor: 'initialization' stamp: 'jmv 10/7/2009 11:45'!
initialize
	"initialize the state of the receiver"
	super initialize.
	""
	
	transform _ MorphicTransform identity! !

TransformMorph removeSelector: #addCustomMenuItems:hand:!
TransformMorph removeSelector: #angle:!
TransformMorph removeSelector: #scale:!
TransformMorph removeSelector: #setOffset:angle:scale:!
TransformMorph removeSelector: #smoothing!
TransformMorph removeSelector: #smoothing:!
TransformMorph removeSelector: #smoothingOff!
TransformMorph removeSelector: #smoothingOn!
TransformMorph removeSelector: #submorphBounds!
TransformMorph removeSelector: #wantsHaloFromClick!
!classDefinition: #TransformMorph category: #'Morphic-Basic'!
Morph subclass: #TransformMorph
	instanceVariableNames: 'transform localBounds'
	classVariableNames: ''
	poolDictionaries: ''
	category: 'Morphic-Basic'!
TextMorph removeSelector: #fullPrintOn:!
MenuItemMorph removeSelector: #wantsHaloFromClick!
StringMorph removeSelector: #fullPrintOn:!
RaisedBorder removeSelector: #colorsAtCorners!
PreDebugWindow removeSelector: #adjustBookControls!
PreDebugWindow removeSelector: #extent:!
PreDebugWindow removeSelector: #initialize!
PasteUpMorph removeSelector: #wantsHaloFromClick!
BorderedMorph removeSelector: #fullPrintOn:!
Morph removeSelector: #copyWithoutSubmorph:!
Morph removeSelector: #fullPrintOn:!
Morph removeSelector: #printConstructorOn:indent:nodeDict:!
Morph removeSelector: #privateSubmorphs:!
InsetBorder removeSelector: #colorsAtCorners!
BorderStyle removeSelector: #colorsAtCorners!
BorderStyle removeSelector: #dotOfSize:forDirection:!
BorderStyle removeSelector: #frameOval:on:!
BorderStyle removeSelector: #framePolygon:on:!
BorderStyle removeSelector: #framePolyline:on:!
BorderStyle removeSelector: #isBorderStyle!
BorderStyle removeSelector: #widthForRounding!
BlockContext removeSelector: #fullPrintOn:!
Smalltalk removeClassNamed: #InspectorBrowser!
