BorderedMorph subclass: #Arrow
	uses: TAbleToRotate
	instanceVariableNames: 'startarrow drow'
	classVariableNames: ''
	poolDictionaries: ''
	category: 'Esse'!

!Arrow methodsFor: 't-rotating'!
forwardDirection
	^ self
		valueOfProperty: #forwardDirection
		ifAbsent: [0.0]! !

!Arrow methodsFor: 't-rotating'!
forwardDirection: t1 
	self setProperty: #forwardDirection toValue: t1! !

!Arrow methodsFor: 't-rotating'!
heading
	^ self owner
		ifNil: [self forwardDirection]
		ifNotNil: [self forwardDirection + self owner degreesOfFlex]! !

!Arrow methodsFor: 't-rotating'!
prepareForRotating
	^ self addFlexShell! !

!Arrow methodsFor: 't-rotating'!
rotationDegrees
	^ 0.0! !

!Arrow methodsFor: 't-rotating'!
rotationDegrees: t1 
	^ self! !

!Arrow methodsFor: 't-rotating'!
setDirectionFrom: t1 
	| t2 t3 |
	t2 := (self transformFromWorld globalPointToLocal: t1)
				- self referencePosition.
	t3 := t2 degrees + 90.0.
	self forwardDirection: (t3 \\ 360) rounded! !


!Arrow methodsFor: 'as yet unclassified'!
ArrowEndSize: t1 position: t2 
	| t3 |
	t3 := ArrowEnd new color: self color.
	t3 Size: t1.
	t3 position: self position + t2.
	t3 openInWorld.
	startarrow addMorph: t3! !

!Arrow methodsFor: 'as yet unclassified'!
Start
	startarrow := ArrowEnd new color: self color.
	startarrow Size: 0 @ 0.
	startarrow position: self position.
	startarrow openInWorld.
	self addMorph: startarrow! !


!Arrow methodsFor: 'accessing'!
borderWidth: t1 
	| t2 |
	t2 := self center.
	super borderWidth: t1.
	super extent: self defaultExtent.
	self center: t2! !

!Arrow methodsFor: 'accessing'!
drow
	^ drow! !


!Arrow methodsFor: 'defaults'!
defaultBorderWidth
	^ 1! !

!Arrow methodsFor: 'defaults'!
defaultColor
	^ Color black! !


!Arrow methodsFor: 'events-processing'!
handleKeystroke: t1 
	| t2 |
	t2 := t1 keyValue.
	t2 = 30
		ifTrue: [self position: self position - (0 @ 1 * Stage Speed).
			startarrow position: startarrow position + (0 @ 1 * Stage Speed).
			drow
				ifTrue: [self ArrowEndSize: 30 @ 30 position: 10 @ 10 + (0 @ 1 * Stage Speed)].
			Stage DontMoov: 0 @ -1 * Stage Speed].
	t2 = 28
		ifTrue: [self position: self position - (Stage Speed * 1 @ 0).
			startarrow position: startarrow position + (Stage Speed * 1 @ 0).
			drow
				ifTrue: [self ArrowEndSize: 30 @ 30 position: 10 @ 10 + (Stage Speed * 1 @ 0)].
			Stage DontMoov: Stage Speed * -1 @ 0].
	t2 = 31
		ifTrue: [self position: self position + (0 @ 1 * Stage Speed).
			startarrow position: startarrow position - (0 @ 1 * Stage Speed).
			drow
				ifTrue: [self ArrowEndSize: 30 @ 30 position: 10 @ 10 - (0 @ 1 * Stage Speed)].
			Stage DontMoov: 0 @ 1 * Stage Speed].
	t2 = 29
		ifTrue: [self position: self position + (Stage Speed * 1 @ 0).
			startarrow position: startarrow position - (Stage Speed * 1 @ 0).
			drow
				ifTrue: [self ArrowEndSize: 30 @ 30 position: 10 @ 10 - (Stage Speed * 1 @ 0)].
			Stage DontMoov: Stage Speed * 1 @ 0].
	t2 = $a asciiValue
		ifTrue: [drow
				ifTrue: [drow := false]
				ifFalse: [drow := true]]! !


!Arrow methodsFor: 'initialization'!
initialize
	super initialize.
	color := Color red.
	self Start.
	drow := false.
	bounds := 0 @ 0 extent: 50 @ 50! !


!Arrow methodsFor: 'stepping and presenter'!
step
	self changed! !


!Arrow methodsFor: 'testing'!
stepTime
	^ 0! !

"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- "!

Arrow class
	uses: TAbleToRotate classTrait
	instanceVariableNames: ''!


RectangleMorph subclass: #EsseStartButton
	instanceVariableNames: 'buttonTitle'
	classVariableNames: ''
	poolDictionaries: ''
	category: 'Esse'!

!EsseStartButton methodsFor: 'as yet unclassified' stamp: 'kuzovkinP 6/16/2012 10:57'!
handlesMouseDown: evt

	^ true! !

!EsseStartButton methodsFor: 'as yet unclassified' stamp: 'kuzovkinP 7/20/2012 20:36'!
initialize
	super initialize.
	color := Color brown alpha: 0.5.
	bounds := 0 @ 0 extent: 80 @ 40.
	buttonTitle:=TextMorph new.
	self addMorph: buttonTitle.
	buttonTitle position: self position + ((self width /15)@(self height /3)).
	buttonTitle contents: 'Start/Stop'.
	buttonTitle lock  ! !

!EsseStartButton methodsFor: 'as yet unclassified' stamp: 'kuzovkinP 8/2/2012 22:01'!
mouseDown: evt
	EsseProject projectE myScene startStopAction ! !


Morph subclass: #DroppedMorph
	instanceVariableNames: ''
	classVariableNames: ''
	poolDictionaries: ''
	category: 'Esse'!

!DroppedMorph methodsFor: 'as yet unclassified'!
initialize
	super initialize.
	color := Color blue.
	self position: 250 @ 100! !

!DroppedMorph methodsFor: 'as yet unclassified'!
rejectDropMorphEvent: t1 
	| t2 |
	t2 := t1 hand.
	WorldState
		addDeferredUIMessage: [t2 grabMorph: self].
	t1 wasHandled: true! !

!DroppedMorph methodsFor: 'as yet unclassified'!
viewBox
	^ self pasteUpMorph viewBox! !


RectangleMorph subclass: #EsseZoomButton
	instanceVariableNames: 'buttonTitle'
	classVariableNames: ''
	poolDictionaries: ''
	category: 'Esse'!

!EsseZoomButton methodsFor: 'as yet unclassified' stamp: 'kuzovkinP 8/1/2012 15:10'!
handlesMouseDown: t1 
	^ true! !

!EsseZoomButton methodsFor: 'as yet unclassified' stamp: 'kuzovkinP 8/6/2012 09:07'!
initialize
	super initialize.
	color := Color brown alpha: 0.5.
	bounds := 0 @ 0 extent: 75 @ 40.
	buttonTitle:=TextMorph new.
	self addMorph: buttonTitle.
	buttonTitle position: self position + ((self width /4)@(self height /3)).
	buttonTitle contents: 'Home'.
	buttonTitle lock  ! !

!EsseZoomButton methodsFor: 'as yet unclassified' stamp: 'kuzovkinP 8/1/2012 15:44'!
mouseDown: t1 
	EsseProject  projectE stopStepping .
	EsseProject  projectE magnification: 1! !


RectangleMorph subclass: #PreviousButtonInPart
	instanceVariableNames: 'buttonTitle'
	classVariableNames: ''
	poolDictionaries: ''
	category: 'Esse'!

!PreviousButtonInPart methodsFor: 'as yet unclassified' stamp: 'kuzovkinP 7/20/2012 15:03'!
handlesMouseDown: evt

	^ true! !

!PreviousButtonInPart methodsFor: 'as yet unclassified' stamp: 'kuzovkinP 7/20/2012 20:38'!
initialize
	super initialize.
	color := Color brown alpha: 0.5.
	bounds := 0 @ 0 extent: 75 @ 50.
	buttonTitle:=TextMorph new.
	self addMorph: buttonTitle.
	buttonTitle position: self position + ((self width /15)@(self height /3)).
	buttonTitle contents: 'Previous'.
	buttonTitle lock  ! !

!PreviousButtonInPart methodsFor: 'as yet unclassified' stamp: 'kuzovkinP 7/23/2012 14:45'!
mouseDown: evt
	(EsseProject projectE myScene countInPart > 1
		and:
			EsseProject projectE myScene countInPart
				<= (EsseProject projectE myScene partscollection at: EsseProject projectE myScene countParts) focusMorphsInPart size)
		ifTrue: [ self moveToPreviousInPart ].
	EsseProject projectE class startStOut = true
		ifFalse: [ EsseProject projectE class startStOut: true ]! !

!PreviousButtonInPart methodsFor: 'as yet unclassified' stamp: 'kuzovkinP 7/23/2012 14:45'!
moveToPreviousInPart
	EsseProject projectE myScene countInPart: EsseProject projectE myScene countInPart - 1.
	EsseProject projectE myScene
		countMorphs:
			((EsseProject projectE myScene partscollection at: EsseProject projectE myScene countParts) focusMorphsInPart
				at: EsseProject projectE myScene countInPart) indexInCol! !


Morph subclass: #EsseAddMenu
	instanceVariableNames: 'poligonbutton cameramovingmorphbutton circlebutton rectanglebutton stringbutton ellipseButton poligonButton cameraMovingMorphButton circleButton rectangleButton stringButton lineButton'
	classVariableNames: ''
	poolDictionaries: ''
	category: 'Esse'!

!EsseAddMenu methodsFor: 'as yet unclassified' stamp: 'kuzovkinP 8/19/2012 21:54'!
initialize
	super initialize.
	color := Color brown alpha: 0.1.
	bounds := 0 @ 0 extent: 75 @ 320.
	poligonButton := EssePolygonButton new.
	self addMorph: poligonButton.
	poligonButton position: self position + (5 @ 50).
	cameraMovingMorphButton := EsseCameraMovingMorphButton new.
	self addMorph: cameraMovingMorphButton.
	cameraMovingMorphButton position: self position + (5 @ 275).
	circleButton := EsseCircleButton new.
	self addMorph: circleButton.
	circleButton position: self position + (5 @ 140).
	lineButton := EsseLineButton new.
	self addMorph: lineButton.
	lineButton position: self position + (5 @ 230).
	rectangleButton := EsseRectangleButton new.
	self addMorph: rectangleButton.
	rectangleButton position: self position + (5 @ 185).
	stringButton := EsseStringButton new.
	self addMorph: stringButton.
	stringButton position: self position + (5 @ 5).
	ellipseButton := EsseEllipseButton new.
	self addMorph: ellipseButton.
	ellipseButton position: self position + (5 @ 95).! !


RectangleMorph subclass: #Part
	instanceVariableNames: 'partNum partTitle isButtonVisible nextButtonInPart previousButtonInPart focusMorphsInPart partNumText'
	classVariableNames: ''
	poolDictionaries: ''
	category: 'Esse'!

!Part methodsFor: 'as yet unclassified' stamp: 'kuzovkinP 7/20/2012 20:07'!
addInPart: aMorph

self focusMorphsInPart add: aMorph! !

!Part methodsFor: 'as yet unclassified' stamp: 'kuzovkinP 7/20/2012 16:14'!
buttonInitialize
nextButtonInPart := NextButtonInPart new.
			self addMorph: nextButtonInPart.
			nextButtonInPart position: self position + (self width @ 0) - (nextButtonInPart width @ 0).
			previousButtonInPart := PreviousButtonInPart new.
			self addMorph: previousButtonInPart.
			previousButtonInPart position: self position ! !

!Part methodsFor: 'as yet unclassified' stamp: 'kuzovkinP 7/23/2012 14:42'!
delete
super delete.
EsseProject projectE myScene partscollection removeAt: self partNum.
	1 to: EsseProject projectE myScene partscollection  size do: [ :index | 
		(EsseProject projectE myScene partscollection  at: index) partNum: index.].
self updatePartNumbers.! !

!Part methodsFor: 'as yet unclassified' stamp: 'kuzovkinP 7/20/2012 16:37'!
deleteButtons
	
			self isButtonVisible: false.
			nextButtonInPart delete.
			previousButtonInPart delete ! !

!Part methodsFor: 'as yet unclassified' stamp: 'kuzovkinP 7/23/2012 14:43'!
deleteButtonsBesideMe
1 to: EsseProject projectE myScene partscollection size do:
		[:i|
		(EsseProject projectE myScene partscollection at: i)=self ifFalse:[(EsseProject projectE myScene partscollection at: i) isButtonVisible ifTrue:
			[(EsseProject projectE myScene partscollection at: i) deleteButtons ]. ]]! !

!Part methodsFor: 'as yet unclassified' stamp: 'kuzovkinP 7/20/2012 13:20'!
focusMorphsInPart 
	^ focusMorphsInPart 
		ifNil: [focusMorphsInPart := OrderedCollection new]! !

!Part methodsFor: 'as yet unclassified' stamp: 'kuzovkinP 7/19/2012 19:41'!
handlesMouseDown: evt

	^ true! !

!Part methodsFor: 'as yet unclassified' stamp: 'kuzovkinP 7/23/2012 14:43'!
initialize
	super initialize.
	color := Color brown alpha: 0.5.
	bounds := 0 @ 0 extent: 150 @ 100.
	partNum := EsseProject projectE myScene partscollection size + 1.
	self initializeTextMorphs! !

!Part methodsFor: 'as yet unclassified' stamp: 'kuzovkinP 7/22/2012 14:47'!
initializeTextMorphs
	partTitle := TextMorph new.
	self addMorph: partTitle.
	partTitle position: self position + ((self width / 10) @ (self height / 1.5)).
	partTitle contents: '. Enter part title'.
	isButtonVisible := false.
	partNumText := partNum asTextMorph.
	self addMorph: partNumText.
	partNumText position: partTitle position - (7 @ 0).
	partNumText lock! !

!Part methodsFor: 'as yet unclassified' stamp: 'kuzovkinP 7/20/2012 10:40'!
isButtonVisible
^isButtonVisible! !

!Part methodsFor: 'as yet unclassified' stamp: 'kuzovkinP 7/20/2012 10:41'!
isButtonVisible:aBool
isButtonVisible:=aBool! !

!Part methodsFor: 'as yet unclassified' stamp: 'kuzovkinP 7/23/2012 14:44'!
mouseDown: evt
	EsseProject projectE myScene countParts: self partNum.
	EsseProject projectE myScene countInPart: 1.
	self  focusMorphsInPart isEmpty
		ifFalse: [ 
			EsseProject projectE myScene countMorphs: (self focusMorphsInPart at: EsseProject projectE myScene countInPart) indexInCol  ].
	isButtonVisible
		ifFalse: [ 
			self isButtonVisible: true.
			self buttonInitialize ].
		self deleteButtonsBesideMe! !

!Part methodsFor: 'as yet unclassified' stamp: 'kuzovkinP 7/17/2012 11:24'!
partNum
^partNum! !

!Part methodsFor: 'as yet unclassified' stamp: 'kuzovkinP 7/17/2012 11:26'!
partNum:aNumber
partNum:=aNumber! !

!Part methodsFor: 'as yet unclassified' stamp: 'kuzovkinP 7/22/2012 13:16'!
partNumText
^partNumText! !

!Part methodsFor: 'as yet unclassified' stamp: 'kuzovkinP 7/22/2012 13:15'!
partNumText:aText
partNumText:=aText! !

!Part methodsFor: 'as yet unclassified' stamp: 'kuzovkinP 7/17/2012 11:25'!
partTitle
^partTitle! !

!Part methodsFor: 'as yet unclassified' stamp: 'kuzovkinP 7/17/2012 11:25'!
partTitle:aTitle
partTitle:=aTitle! !

!Part methodsFor: 'as yet unclassified' stamp: 'kuzovkinP 7/23/2012 14:44'!
updatePartNumbers
	1 to: EsseProject projectE myScene partscollection size do: [ :index | 
		(EsseProject projectE myScene partscollection at: index) partNumText
			contents: (EsseProject projectE myScene partscollection at: index) partNum asString ]! !


Morph subclass: #Rect
	instanceVariableNames: ''
	classVariableNames: ''
	poolDictionaries: ''
	category: 'Esse'!

!Rect methodsFor: 'as yet unclassified'!
handleKeystroke: t1 
	| t2 |
	t2 := t1 keyValue.
	t2 = 30
		ifTrue: [self position: self position - (0 @ 1 * Stage Speed).
			Stage DontMoov: 0 @ -1 * Stage Speed].
	t2 = 28
		ifTrue: [self position: self position - (Stage Speed * 1 @ 0).
			Stage DontMoov: Stage Speed * -1 @ 0].
	t2 = 31
		ifTrue: [self position: self position + (0 @ 1 * Stage Speed).
			Stage DontMoov: 0 @ 1 * Stage Speed].
	t2 = 29
		ifTrue: [self position: self position + (Stage Speed * 1 @ 0).
			Stage DontMoov: Stage Speed * 1 @ 0]! !

!Rect methodsFor: 'as yet unclassified'!
initialize
	super initialize.
	color := Color red.
	bounds := 50 @ 50 extent: 150 @ 150! !

!Rect methodsFor: 'as yet unclassified'!
step
	self changed! !

!Rect methodsFor: 'as yet unclassified'!
stepTime
	^ 0! !


RectangleMorph subclass: #EssePolygonButton
	instanceVariableNames: 'xPos yPos buttonTitle'
	classVariableNames: ''
	poolDictionaries: ''
	category: 'Esse'!

!EssePolygonButton methodsFor: 'as yet unclassified' stamp: 'kuzovkinP 7/31/2012 17:22'!
handlesMouseDown: t1 
	^ true! !

!EssePolygonButton methodsFor: 'as yet unclassified' stamp: 'kuzovkinP 8/6/2012 12:10'!
initialize
	super initialize.
	color := Color brown alpha: 0.5.
	bounds := 0 @ 0 extent: 75 @ 40.
	buttonTitle:=TextMorph new.
	self addMorph: buttonTitle.
	buttonTitle position: self position + ((self width /7)@(self height /3)).
	buttonTitle contents: 'Polygon'.
	buttonTitle lock  ! !

!EssePolygonButton methodsFor: 'as yet unclassified' stamp: 'kuzovkinP 8/6/2012 10:04'!
mouseDown: t1 
	| t2 |
		t2:= PolygonMorph new.
	xPos:=EsseProject projectE pointFromScrollbarValueX.
		yPos:=EsseProject projectE pointFromScrollbarValueY . 
	EsseProject projectE myAddMorph: t2 position: (xPos@yPos).! !


RectangleMorph subclass: #EsseStringButton
	instanceVariableNames: 'xPos yPos buttonTitle'
	classVariableNames: ''
	poolDictionaries: ''
	category: 'Esse'!

!EsseStringButton methodsFor: 'as yet unclassified' stamp: 'kuzovkinP 7/31/2012 17:29'!
handlesMouseDown: t1 
	^ true! !

!EsseStringButton methodsFor: 'as yet unclassified' stamp: 'kuzovkinP 8/6/2012 12:10'!
initialize
	super initialize.
	color := Color brown alpha: 0.5.
	bounds := 0 @ 0 extent: 75 @ 40.
	buttonTitle:=TextMorph new.
	self addMorph: buttonTitle.
	buttonTitle position: self position + ((self width /4)@(self height /3)).
	buttonTitle contents: 'Text'.
	buttonTitle lock  ! !

!EsseStringButton methodsFor: 'as yet unclassified' stamp: 'kuzovkinP 8/6/2012 10:05'!
mouseDown: t1 
	| t2 |
		t2:= StringMorph  new.
	xPos:=EsseProject projectE pointFromScrollbarValueX.
		yPos:=EsseProject projectE pointFromScrollbarValueY . 
	EsseProject projectE myAddMorph: t2 position: (xPos@yPos).! !


RectangleMorph subclass: #EsseEllipseButton
	instanceVariableNames: 'xPos yPos buttonTitle'
	classVariableNames: ''
	poolDictionaries: ''
	category: 'Esse'!

!EsseEllipseButton methodsFor: 'as yet unclassified' stamp: 'kuzovkinP 8/6/2012 12:03'!
handlesMouseDown: t1 
	^ true! !

!EsseEllipseButton methodsFor: 'as yet unclassified' stamp: 'kuzovkinP 8/6/2012 12:10'!
initialize
	super initialize.
	color := Color brown alpha: 0.5.
	bounds := 0 @ 0 extent: 75 @ 40.
	buttonTitle:=TextMorph new.
	self addMorph: buttonTitle.
	buttonTitle position: self position + ((self width /7)@(self height /3)).
	buttonTitle contents: 'Ellipse'.
	buttonTitle lock  ! !

!EsseEllipseButton methodsFor: 'as yet unclassified' stamp: 'kuzovkinP 8/19/2012 21:50'!
mouseDown: t1 
	| t2 |
		t2:= EllipseMorph new.
		xPos:=EsseProject projectE pointFromScrollbarValueX.
		yPos:=EsseProject projectE pointFromScrollbarValueY . 
	EsseProject projectE myAddMorph: t2 position: (xPos@yPos).! !


RectangleMorph subclass: #NextButtonInPart
	instanceVariableNames: 'buttonTitle'
	classVariableNames: ''
	poolDictionaries: ''
	category: 'Esse'!

!NextButtonInPart methodsFor: 'as yet unclassified' stamp: 'kuzovkinP 7/20/2012 12:29'!
handlesMouseDown: evt

	^ true! !

!NextButtonInPart methodsFor: 'as yet unclassified' stamp: 'kuzovkinP 7/20/2012 20:38'!
initialize
	super initialize.
	color := Color brown alpha: 0.5.
	bounds := 0 @ 0 extent: 75 @ 50.
	buttonTitle:=TextMorph new.
	self addMorph: buttonTitle.
	buttonTitle position: self position + ((self width /4)@(self height /3)).
	buttonTitle contents: 'Next'.
	buttonTitle lock  ! !

!NextButtonInPart methodsFor: 'as yet unclassified' stamp: 'kuzovkinP 7/23/2012 14:42'!
mouseDown: evt
	(EsseProject projectE myScene countInPart  >= 1
		and: EsseProject projectE myScene countInPart  < (EsseProject projectE myScene partscollection at: EsseProject projectE myScene countParts) focusMorphsInPart size)
		ifTrue: [ 
			self moveToNextInPart ].
	EsseProject projectE class startStOut = true
		ifFalse: [ EsseProject projectE class startStOut: true ]! !

!NextButtonInPart methodsFor: 'as yet unclassified' stamp: 'kuzovkinP 7/23/2012 14:42'!
moveToNextInPart
	EsseProject projectE myScene countInPart: EsseProject projectE myScene countInPart + 1.
	EsseProject projectE myScene
		countMorphs:
			((EsseProject projectE myScene partscollection at: EsseProject projectE myScene countParts) focusMorphsInPart
				at: EsseProject projectE myScene countInPart) indexInCol! !


BorderedMorph subclass: #ArrowEnd
	instanceVariableNames: ''
	classVariableNames: ''
	poolDictionaries: ''
	category: 'Esse'!

!ArrowEnd methodsFor: 'as yet unclassified'!
Size: t1 
	bounds := 0 @ 0 extent: t1! !

!ArrowEnd methodsFor: 'as yet unclassified'!
borderWidth: t1 
	| t2 |
	t2 := self center.
	super borderWidth: t1.
	super extent: self defaultExtent.
	self center: t2! !

!ArrowEnd methodsFor: 'as yet unclassified'!
defaultBorderWidth
	^ 1! !

!ArrowEnd methodsFor: 'as yet unclassified'!
defaultColor
	^ Color black! !

!ArrowEnd methodsFor: 'as yet unclassified'!
initialize
	super initialize.
	color := Color red.
	bounds := 0 @ 0 extent: 50 @ 50! !


Morph subclass: #ReceiverMorph
	instanceVariableNames: ''
	classVariableNames: ''
	poolDictionaries: ''
	category: 'Esse'!

!ReceiverMorph methodsFor: 'as yet unclassified'!
initialize
	super initialize.
	color := Color red.
	bounds := 0 @ 0 extent: 100 @ 100! !

!ReceiverMorph methodsFor: 'as yet unclassified'!
repelsMorph: t1 event: t2 
	^ (self wantsDroppedMorph: t1 event: t2) not! !

!ReceiverMorph methodsFor: 'as yet unclassified'!
wantsDroppedMorph: t1 event: t2 
	^ t1 color = Color blue! !


RectangleMorph subclass: #EsseLineButton
	instanceVariableNames: 'xPos yPos buttonTitle'
	classVariableNames: ''
	poolDictionaries: ''
	category: 'Esse'!

!EsseLineButton methodsFor: 'as yet unclassified' stamp: 'kuzovkinP 8/19/2012 21:48'!
handlesMouseDown: t1 
	^ true! !

!EsseLineButton methodsFor: 'as yet unclassified' stamp: 'kuzovkinP 8/19/2012 21:54'!
initialize
	super initialize.
	color := Color brown alpha: 0.5.
	bounds := 0 @ 0 extent: 75 @ 40.
	buttonTitle:=TextMorph new.
	self addMorph: buttonTitle.
	buttonTitle position: self position + ((self width /4)@(self height /3)).
	buttonTitle contents: 'Line'.
	buttonTitle lock ! !

!EsseLineButton methodsFor: 'as yet unclassified' stamp: 'kuzovkinP 8/19/2012 21:50'!
mouseDown: t1 
	| t2 |
		t2:= LineMorph new.
		xPos:=EsseProject projectE pointFromScrollbarValueX.
		yPos:=EsseProject projectE pointFromScrollbarValueY . 
	EsseProject projectE myAddMorph: t2 position: (xPos@yPos).! !


RectangleMorph subclass: #EsseRectangleButton
	instanceVariableNames: 'xPos yPos buttonTitle'
	classVariableNames: ''
	poolDictionaries: ''
	category: 'Esse'!

!EsseRectangleButton methodsFor: 'as yet unclassified' stamp: 'kuzovkinP 7/31/2012 17:34'!
handlesMouseDown: t1 
	^ true! !

!EsseRectangleButton methodsFor: 'as yet unclassified' stamp: 'kuzovkinP 8/6/2012 12:01'!
initialize
	super initialize.
	color := Color brown alpha: 0.5.
	bounds := 0 @ 0 extent: 75 @ 40.
	buttonTitle:=TextMorph new.
	self addMorph: buttonTitle.
	buttonTitle position: self position + ((self width /15)@(self height /3)).
	buttonTitle contents: 'Rectangle'.
	buttonTitle lock  ! !

!EsseRectangleButton methodsFor: 'as yet unclassified' stamp: 'kuzovkinP 8/6/2012 10:05'!
mouseDown: t1 
	| t2 |
		t2:=RectangleMorph   new.
	xPos:=EsseProject projectE pointFromScrollbarValueX.
		yPos:=EsseProject projectE pointFromScrollbarValueY . 
	EsseProject projectE myAddMorph: t2 position: (xPos@yPos).! !


Morph subclass: #MoveMorph
	instanceVariableNames: 'startPoint finishPoint countPoint pointCollection'
	classVariableNames: ''
	poolDictionaries: ''
	category: 'Esse'!

!MoveMorph methodsFor: 'as yet unclassified'!
countPoint
	^ countPoint
		ifNil: [countPoint := 2]! !

!MoveMorph methodsFor: 'as yet unclassified'!
countPoint: t1 
	countPoint := t1! !

!MoveMorph methodsFor: 'as yet unclassified'!
finishPoint
	^ finishPoint! !

!MoveMorph methodsFor: 'as yet unclassified'!
finishPoint: t1 
	finishPoint := t1! !

!MoveMorph methodsFor: 'as yet unclassified'!
initialize
	super initialize.
	color := Color red.
	self startPoint: 0 @ 0.
	self finishPoint: 0 @ 0.
	bounds := 0 @ 0 extent: 50 @ 50! !

!MoveMorph methodsFor: 'as yet unclassified' stamp: 'kuzovkinP 7/23/2012 14:53'!
pointcollection
	^ pointCollection
		ifNil: [pointCollection := OrderedCollection new]! !

!MoveMorph methodsFor: 'as yet unclassified'!
startPoint
	^ startPoint! !

!MoveMorph methodsFor: 'as yet unclassified'!
startPoint: t1 
	startPoint := t1! !

!MoveMorph methodsFor: 'as yet unclassified' stamp: 'kuzovkinP 7/23/2012 14:53'!
step
	((self position x - self finishPoint x) abs > 2 or: (self position y - self finishPoint y) abs > 2)
		ifTrue: [self position: self position - (self startPoint x - self finishPoint x / 300 @ 0).
			self position: self position - (0 @ (self startPoint y - self finishPoint y / 300))]
		ifFalse: [self startPoint: self finishPoint.
			self
				finishPoint: (pointCollection at: self countPoint).
			self countPoint + 1 > self pointcollection size
				ifTrue: [self stopStepping]
				ifFalse: [self countPoint: self countPoint + 1]]! !

!MoveMorph methodsFor: 'as yet unclassified'!
stepTime
	^ 10! !


RectangleMorph subclass: #EsseNewPartButton
	instanceVariableNames: 'buttonTitle'
	classVariableNames: ''
	poolDictionaries: ''
	category: 'Esse'!

!EsseNewPartButton methodsFor: 'as yet unclassified' stamp: 'kuzovkinP 7/19/2012 21:52'!
handlesMouseDown: evt

	^ true! !

!EsseNewPartButton methodsFor: 'as yet unclassified' stamp: 'kuzovkinP 7/20/2012 17:56'!
initialize
	super initialize.
	color := Color brown alpha: 0.5.
	bounds := 0 @ 0 extent: 120 @ 50.
	buttonTitle:=TextMorph new.
	self addMorph: buttonTitle.
	buttonTitle position: self position + ((self width /15)@(self height /3)).
	buttonTitle contents: 'Create new part'.
	buttonTitle lock  ! !

!EsseNewPartButton methodsFor: 'as yet unclassified' stamp: 'kuzovkinP 7/23/2012 14:40'!
mouseDown: evt
EsseProject projectE myScene createPresentationPart! !


PasteUpMorph subclass: #Scene
	instanceVariableNames: 'sizeOfScene countMorphs countAfterStart countParts countInPart cameraMovingMorphsCollection partsCollection'
	classVariableNames: ''
	poolDictionaries: ''
	category: 'Esse'!

!Scene methodsFor: 'initialization' stamp: 'kuzovkinP 7/23/2012 13:46'!
initialize
	super initialize.
	bounds := 0 @ 0 extent: self sizeOfScene @ self sizeOfScene! !

!Scene methodsFor: 'initialization' stamp: 'kuzovkinP 7/23/2012 13:52'!
sizeOfScene
	^ sizeOfScene := 25000! !


!Scene methodsFor: 't-rotating'!
forwardDirection
	^ self
		valueOfProperty: #forwardDirection
		ifAbsent: [0.0]! !

!Scene methodsFor: 't-rotating'!
forwardDirection: t1 
	self setProperty: #forwardDirection toValue: t1! !

!Scene methodsFor: 't-rotating'!
heading
	^ self owner
		ifNil: [self forwardDirection]
		ifNotNil: [self forwardDirection + self owner degreesOfFlex]! !

!Scene methodsFor: 't-rotating'!
prepareForRotating
	^ self addFlexShell! !

!Scene methodsFor: 't-rotating'!
rotationDegrees
	^ 0.0! !

!Scene methodsFor: 't-rotating'!
rotationDegrees: t1 
	^ self! !

!Scene methodsFor: 't-rotating'!
setDirectionFrom: t1 
	| t2 t3 |
	t2 := (self transformFromWorld globalPointToLocal: t1)
				- self referencePosition.
	t3 := t2 degrees + 90.0.
	self forwardDirection: (t3 \\ 360) rounded! !


!Scene methodsFor: 'camera moving' stamp: 'kuzovkinP 7/22/2012 14:55'!
addInPart: aNumber1 focusMorph: aNumber2
	| k |
	k := (self partscollection at: aNumber1) focusMorphsInPart indexOf: (self cameramovingmorphscollection at: aNumber2).
	k = 0
		ifTrue: [ (self partscollection at: aNumber1) addInPart: (self cameramovingmorphscollection at: aNumber2) ]! !

!Scene methodsFor: 'camera moving' stamp: 'kuzovkinP 7/23/2012 14:57'!
cameramovingmorphscollection
	^ cameraMovingMorphsCollection
		ifNil: [cameraMovingMorphsCollection := OrderedCollection new]! !

!Scene methodsFor: 'camera moving' stamp: 'kuzovkinP 7/20/2012 12:38'!
countInPart
^countInPart! !

!Scene methodsFor: 'camera moving' stamp: 'kuzovkinP 7/20/2012 12:38'!
countInPart:aNumber
countInPart:=aNumber! !

!Scene methodsFor: 'camera moving'!
countMorphs
	^ countMorphs
		ifNil: [self countMorphs: 1]! !

!Scene methodsFor: 'camera moving'!
countMorphs: aNumber 
	countMorphs := aNumber! !

!Scene methodsFor: 'camera moving' stamp: 'kuzovkinP 7/17/2012 11:12'!
countParts
^countParts! !

!Scene methodsFor: 'camera moving' stamp: 'kuzovkinP 7/17/2012 11:12'!
countParts: aNumber
countParts:=aNumber! !

!Scene methodsFor: 'camera moving' stamp: 'kuzovkinP 8/6/2012 10:06'!
createCameraMovingMorph
	| a b |
	a := CameraMovingMorph new.
	self addMorph: a.
	a textI contents: (self cameramovingmorphscollection size + 1) asString.
	a indexInCol: (self cameramovingmorphscollection size + 1).
	self cameramovingmorphscollection add: a.
	^a

! !

!Scene methodsFor: 'camera moving' stamp: 'kuzovkinP 8/6/2012 10:13'!
createCameraMovingMorphOnPosition
	| a xPos yPos|
	a :=self createCameraMovingMorph.
	xPos:=EsseProject projectE pointFromScrollbarValueX.
		yPos:=EsseProject projectE pointFromScrollbarValueY . 
	EsseProject projectE myAddMorph: a position: (xPos@yPos). 
	
! !

!Scene methodsFor: 'camera moving' stamp: 'kuzovkinP 7/19/2012 21:14'!
createPresentationPart
	
	| a |
	a := Part new.
	self partscollection add: a.
PartMenu updatePartMenu.
! !

!Scene methodsFor: 'camera moving' stamp: 'kuzovkinP 7/18/2012 22:44'!
deletePart: aNumber
! !

!Scene methodsFor: 'camera moving' stamp: 'kuzovkinP 7/23/2012 14:57'!
partscollection
	^ partsCollection
		ifNil: [partsCollection := OrderedCollection new]! !


!Scene methodsFor: 'as yet unclassified' stamp: 'kuzovkinP 8/2/2012 22:00'!
startStopAction
	EsseProject projectE class  startStOut = true
		ifTrue: [ EsseProject projectE class startStOut: false ]
		ifFalse: [self countMorphs=0 ifTrue:[EsseProject projectE class startStOut: false ] ifFalse:  [EsseProject  projectE class startStOut: true. EsseProject projectE moveTo: (self cameramovingmorphscollection at: (self  countMorphs))] ]! !


RectangleMorph subclass: #EsseCircleButton
	instanceVariableNames: 'xPos yPos buttonTitle'
	classVariableNames: ''
	poolDictionaries: ''
	category: 'Esse'!

!EsseCircleButton methodsFor: 'as yet unclassified' stamp: 'kuzovkinP 7/26/2012 18:41'!
handlesMouseDown: t1 
	^ true! !

!EsseCircleButton methodsFor: 'as yet unclassified' stamp: 'kuzovkinP 8/6/2012 12:10'!
initialize
	super initialize.
	color := Color brown alpha: 0.5.
	bounds := 0 @ 0 extent: 75 @ 40.
	buttonTitle:=TextMorph new.
	self addMorph: buttonTitle.
	buttonTitle position: self position + ((self width /5)@(self height /3)).
	buttonTitle contents: 'Circle'.
	buttonTitle lock  ! !

!EsseCircleButton methodsFor: 'as yet unclassified' stamp: 'kuzovkinP 8/6/2012 09:42'!
mouseDown: t1 
	| t2 |
		t2:= CircleMorph new.
		xPos:=EsseProject projectE pointFromScrollbarValueX.
		yPos:=EsseProject projectE pointFromScrollbarValueY . 
	EsseProject projectE myAddMorph: t2 position: (xPos@yPos).! !


Morph subclass: #ProjectScrollWindow
	instanceVariableNames: 'scroller hScrollbar vScrollbar look magnification toPoint zoom countStepH countStepV zoomingStep zoomingStepX zoomingStepY countMorph startSt toPointScrollbarY toPointScrollbarX distanceBeetwenPositionsY distanceBeetwenPositionsX myScene toMorph'
	classVariableNames: 'startStOut'
	poolDictionaries: ''
	category: 'Esse'!

!ProjectScrollWindow methodsFor: 'accessing' stamp: 'kuzovkinP 7/4/2012 11:35'!
distanceBeetwenPositionsX
	^ distanceBeetwenPositionsX := self hScrollbar value - self toPointScrollbarX
				! !

!ProjectScrollWindow methodsFor: 'accessing' stamp: 'kuzovkinP 7/4/2012 11:35'!
distanceBeetwenPositionsY
	^ distanceBeetwenPositionsY := self vScrollbar value - self toPointScrollbarY
				! !

!ProjectScrollWindow methodsFor: 'accessing'!
hScrollbar
	^ hScrollbar! !

!ProjectScrollWindow methodsFor: 'accessing'!
hScrollbar: t1 
	hScrollbar := t1! !

!ProjectScrollWindow methodsFor: 'accessing'!
scroller
	^ scroller! !

!ProjectScrollWindow methodsFor: 'accessing'!
scroller: t1 
	scroller := t1! !

!ProjectScrollWindow methodsFor: 'accessing' stamp: 'kuzovkinP 8/6/2012 23:20'!
startAnimation
1 to: self myScene submorphs size do:[:i|(((self myScene submorphs at: i) bounds origin >= toMorph bounds origin) and:((self myScene submorphs at: i) bounds origin <= toMorph bounds corner )) ifTrue:  [(self myScene submorphs at: i) startStepping] ]! !

!ProjectScrollWindow methodsFor: 'accessing' stamp: 'kuzovkinP 8/6/2012 23:21'!
stopAnimation
1 to: self myScene submorphs size do:[:i|  (self myScene submorphs at: i) stopStepping ]! !

!ProjectScrollWindow methodsFor: 'accessing'!
toPoint
	^ toPoint! !

!ProjectScrollWindow methodsFor: 'accessing'!
toPoint: aPoint 
	toPoint := aPoint! !

!ProjectScrollWindow methodsFor: 'accessing' stamp: 'kuzovkinP 7/23/2012 14:48'!
toPointScrollbarX
	^ toPointScrollbarX := self magnification
		*
			((toPoint x / self  myScene bounds corner x * (self bounds corner x - self bounds origin x) + toPoint x)
				/ self  myScene bounds corner x)
				! !

!ProjectScrollWindow methodsFor: 'accessing' stamp: 'kuzovkinP 7/23/2012 14:49'!
toPointScrollbarY
	^ toPointScrollbarY  := self magnification
		*
			((toPoint y / self  myScene bounds corner y * (self bounds corner y - self bounds origin y) + toPoint y)
				/ self  myScene bounds corner y)
				! !

!ProjectScrollWindow methodsFor: 'accessing'!
vScrollbar
	^ vScrollbar! !

!ProjectScrollWindow methodsFor: 'accessing'!
vScrollbar: t1 
	vScrollbar := t1! !


!ProjectScrollWindow methodsFor: 'as yet unclassified'!
adoptPaneColor: t1 
	super adoptPaneColor: t1.
	self hScrollbar adoptPaneColor: t1.
	self vScrollbar adoptPaneColor: t1.
	t1
		ifNil: [^ self].
	self
		color: (self scrollTarget isNil
				ifTrue: [self paneColor]
				ifFalse: [self scrollTarget color])! !

!ProjectScrollWindow methodsFor: 'as yet unclassified' stamp: 'kuzovkinP 7/23/2012 14:45'!
afterStart
	1
		to: self myScene cameramovingmorphscollection size
		do: [:i | self
				startColor: (self myScene cameramovingmorphscollection at: i)]! !

!ProjectScrollWindow methodsFor: 'as yet unclassified' stamp: 'kuzovkinP 7/4/2012 12:30'!
cameraMovingX: aValueX
self hScrollbar value > aValueX
								ifTrue: [ self hScrollbar setValue: self hScrollbar value - self countStepH ]
								ifFalse: [ self hScrollbar setValue: self hScrollbar value + self countStepH ] ! !

!ProjectScrollWindow methodsFor: 'as yet unclassified' stamp: 'kuzovkinP 7/4/2012 12:26'!
cameraMovingY: aValueY
self vScrollbar value > aValueY
								ifTrue: [ self vScrollbar setValue: self vScrollbar value - self countStepV ]
								ifFalse: [ self vScrollbar setValue: self vScrollbar value + self countStepV ] ! !

!ProjectScrollWindow methodsFor: 'as yet unclassified'!
changeScrollerTableLayout
	self scroller changeTableLayout! !

!ProjectScrollWindow methodsFor: 'as yet unclassified' stamp: 'kuzovkinP 7/23/2012 16:08'!
countStepH
	^ countStepH! !

!ProjectScrollWindow methodsFor: 'as yet unclassified' stamp: 'kuzovkinP 7/23/2012 16:12'!
countStepH: aNumber 
	(aNumber<0.00001) ifTrue: 
	[countStepH := 0.00001]
ifFalse: [countStepH:=aNumber]! !

!ProjectScrollWindow methodsFor: 'as yet unclassified' stamp: 'kuzovkinP 7/23/2012 16:08'!
countStepV
	^ countStepV ! !

!ProjectScrollWindow methodsFor: 'as yet unclassified' stamp: 'kuzovkinP 7/23/2012 16:10'!
countStepV: aNumber 
	(aNumber<0.00001) ifTrue: 
	[countStepV := 0.00001]
ifFalse: [countStepV:=aNumber]! !

!ProjectScrollWindow methodsFor: 'as yet unclassified'!
defaultColor
	^ Color transparent! !

!ProjectScrollWindow methodsFor: 'as yet unclassified' stamp: 'kuzovkinP 7/23/2012 14:50'!
defaultScrollTarget
	| t1 |
	t1 := Scene new.
	self myScene: t1.
	^ myScene! !

!ProjectScrollWindow methodsFor: 'as yet unclassified'!
doLayoutIn: t1 
	| t2 |
	super doLayoutIn: t1.
	t2 := (self vScrollbarShowing = self vScrollbarNeeded) not.
	t2 := t2
				or: [(self hScrollbarShowing = self hScrollbarNeeded) not].
	self updateScrollbars.
	t2
		ifFalse: [self resizeScroller].
	super doLayoutIn: t1! !

!ProjectScrollWindow methodsFor: 'as yet unclassified'!
extent: t1 
	| t2 |
	bounds extent = t1
		ifTrue: [^ self].
	super extent: t1.
	t2 := (self vScrollbarShowing = self vScrollbarNeeded) not.
	t2 := t2
				or: [(self hScrollbarShowing = self hScrollbarNeeded) not].
	self updateScrollbars.
	t2
		ifFalse: [self resizeScroller]! !

!ProjectScrollWindow methodsFor: 'as yet unclassified'!
fitScrollTarget
	| t1 |
	t1 := 0.
	self scroller width > self scrollTarget width
		ifTrue: [self scrollTarget width: self scroller width]
		ifFalse: [t1 := self scrollBarThickness].
	self scroller height - t1 > self scrollTarget height
		ifTrue: [self scrollTarget height: self scroller height + t1]! !

!ProjectScrollWindow methodsFor: 'as yet unclassified'!
hHideScrollbar
	self hScrollbarShowing
		ifFalse: [^ self].
	self removeMorph: self hScrollbar.
	self vResizeScrollbar.
	self resizeScroller! !

!ProjectScrollWindow methodsFor: 'as yet unclassified'!
hPageDelta
	| t1 t2 t3 |
	t2 := self scrollTarget width.
	t3 := self scrollBounds width.
	t1 := t2 - t3 max: 0.
	t1 = 0
		ifFalse: [t1 := t3 / t1].
	^ t1! !

!ProjectScrollWindow methodsFor: 'as yet unclassified'!
hResizeScrollbar
	| t1 |
	t1 := self innerBounds.
	t1 := t1 top: t1 bottom - self scrollBarThickness.
	self vScrollbarShowing
		ifTrue: [t1 := t1 right: t1 right - self scrollBarThickness].
	self hScrollbar bounds: t1! !

!ProjectScrollWindow methodsFor: 'as yet unclassified'!
hScrollbarInterval
	^ self scrollBounds width asFloat / self scrollTarget width min: 1.0! !

!ProjectScrollWindow methodsFor: 'as yet unclassified'!
hScrollbarNeeded
	^ self scrollTarget width
		+ (self scrollTarget height > self innerBounds height
				ifTrue: [self scrollBarThickness]
				ifFalse: [0]) > self innerBounds width! !

!ProjectScrollWindow methodsFor: 'as yet unclassified'!
hScrollbarShowing
	^ self hScrollbar owner notNil! !

!ProjectScrollWindow methodsFor: 'as yet unclassified'!
hScrollbarValue
	| t1 t2 t3 |
	t1 := self scrollTarget width.
	t2 := self scrollBounds width.
	t3 := t1 - t2 max: 0.
	t3 = 0
		ifFalse: [t3 := self scroller offset x asFloat / t3 min: 1.0].
	^ t3! !

!ProjectScrollWindow methodsFor: 'as yet unclassified'!
hScrollbarValue: t1 
	| t2 |
	t2 := self scrollTarget width - self scrollBounds width max: 0.
	self scroller offset: (t2 * t1) rounded @ self scroller offset y! !

!ProjectScrollWindow methodsFor: 'as yet unclassified'!
hSetScrollDelta
	| t1 |
	t1 := self hPageDelta.
	self hScrollbar scrollDelta: t1 / 10 pageDelta: t1;
		 interval: self hScrollbarInterval;
		 setValue: self hScrollbarValue! !

!ProjectScrollWindow methodsFor: 'as yet unclassified'!
hShowScrollbar
	self hResizeScrollbar.
	self hScrollbarShowing
		ifTrue: [^ self].
	self privateAddMorph: self hScrollbar atIndex: 1.
	self vResizeScrollbar.
	self resizeScroller! !

!ProjectScrollWindow methodsFor: 'as yet unclassified'!
hUpdateScrollbar
	self hScrollbarNeeded
		ifTrue: [self hShowScrollbar; hResizeScrollbar]
		ifFalse: [self hHideScrollbar]! !

!ProjectScrollWindow methodsFor: 'as yet unclassified' stamp: 'kuzovkinP 7/23/2012 14:46'!
handleKeystroke: t1 
	| t2 |
	t2 := t1 keyValue.
	t2 = $- asciiValue
		ifTrue: [self magnification: self magnification - 0.01].
	t2 = $= asciiValue
		ifTrue: [self magnification: self magnification + 0.01].
	t2 = 29
		ifTrue: [(self myScene countMorphs >= 1 and: self  myScene countMorphs < self myScene cameramovingmorphscollection size)
				ifTrue: [self myScene countMorphs: self myScene countMorphs + 1.
					self
						moveTo: (self myScene cameramovingmorphscollection at: self myScene countMorphs)]].
	t2 = 28
		ifTrue: [(self myScene countMorphs > 1 and: self myScene countMorphs <= self myScene cameramovingmorphscollection size)
				ifTrue: [self  myScene countMorphs: self  myScene countMorphs - 1.
					self
						moveTo: (self  myScene cameramovingmorphscollection at: self  myScene countMorphs)]].
	t2 = 32
		ifTrue: [self stopStepping].
	t2 = $4 asciiValue
		ifTrue: [self afterStart].
	t2 = $5 asciiValue
		ifTrue: [self owner
				bounds: (World bounds origin extent: World bounds corner)]! !

!ProjectScrollWindow methodsFor: 'as yet unclassified'!
handlesKeyboard: t1 
	^ true! !

!ProjectScrollWindow methodsFor: 'as yet unclassified'!
handlesMouseWheel: t1 
	^ true! !

!ProjectScrollWindow methodsFor: 'as yet unclassified' stamp: 'kuzovkinP 7/23/2012 14:47'!
initialize
	super initialize.
	self scroller: self newScroller;
		 hScrollbar: self newHScrollbar;
		 vScrollbar: self newVScrollbar;
		 scrollTarget: self defaultScrollTarget.
	self addMorph: self scroller;
		 resizeScroller.
	magnification := 1.
	look := 100 @ 100.
	bounds := 0 @ 0 extent: 700@ 500.
	startStOut:=false.
	self  myScene countMorphs:0.
	toPoint:=(1@1).
self myScene  countInPart:1.
self countStepH:1.
self countStepV: 1.! !

!ProjectScrollWindow methodsFor: 'as yet unclassified' stamp: 'kuzovkinP 8/6/2012 23:46'!
isNext
	(self myScene cameramovingmorphscollection at: self myScene countMorphs) metka
		ifTrue: [(self myScene countMorphs >= 1 and: self myScene countMorphs < self  myScene cameramovingmorphscollection size)
				ifTrue: [self  myScene countMorphs: self myScene countMorphs + 1.
				]]! !

!ProjectScrollWindow methodsFor: 'as yet unclassified'!
keyStroke: t1 
	(self scrollByKeyboard: t1)
		ifTrue: [^ self].
	self scrollTarget keyStroke: t1! !

!ProjectScrollWindow methodsFor: 'as yet unclassified'!
look
	^ look! !

!ProjectScrollWindow methodsFor: 'as yet unclassified'!
look: t1 
	look := t1! !

!ProjectScrollWindow methodsFor: 'as yet unclassified'!
magnification
	^ magnification! !

!ProjectScrollWindow methodsFor: 'as yet unclassified' stamp: 'kuzovkinP 7/23/2012 14:48'!
magnification: aScale 
	| oldscale |
	oldscale := self magnification.
	aScale > 0.3
		ifTrue: [magnification := aScale.
			self myScene owner scale: aScale.
			self hScrollbar setValue: self magnification * (self hScrollbar value / oldscale).
				self vScrollbar setValue: self magnification * (self vScrollbar value / oldscale).
			aScale >= 1
				ifTrue: [self myScene width: self myScene sizeOfScene * self myScene owner scale.
					self myScene height: self myScene sizeOfScene * self myScene owner scale]]! !

!ProjectScrollWindow methodsFor: 'as yet unclassified'!
mouseWheel: t1 
	(self scrollTarget handlesMouseWheel: t1)
		ifTrue: [^ self scrollTarget mouseWheel: t1].
	t1 direction = #up
		ifTrue: [vScrollbar scrollUp: 3].
	t1 direction = #down
		ifTrue: [vScrollbar scrollDown: 3]! !

!ProjectScrollWindow methodsFor: 'as yet unclassified' stamp: 'kuzovkinP 8/6/2012 23:15'!
moveTo: aMorph 
	toMorph:=aMorph.
	toPoint := aMorph bounds origin.
	self countStepV: (self distanceBeetwenPositionsY ) abs / 25.
	self countStepH: (self distanceBeetwenPositionsX ) abs / 25.
	self zoom: aMorph size.
	self startStepping! !

!ProjectScrollWindow methodsFor: 'as yet unclassified' stamp: 'kuzovkinP 7/23/2012 14:34'!
myAddMorph: t1 
	myScene addMorph: t1! !

!ProjectScrollWindow methodsFor: 'as yet unclassified' stamp: 'kuzovkinP 7/23/2012 14:34'!
myAddMorph: t1 position: t2 
	myScene addMorph: t1.
	t1 position: myScene position + t2! !

!ProjectScrollWindow methodsFor: 'as yet unclassified' stamp: 'kuzovkinP 7/23/2012 14:36'!
myScene
	^ myScene! !

!ProjectScrollWindow methodsFor: 'as yet unclassified' stamp: 'kuzovkinP 7/23/2012 14:37'!
myScene: t1 
	myScene := t1! !

!ProjectScrollWindow methodsFor: 'as yet unclassified'!
newHScrollbar
	^ GeneralScrollBar new model: self;
		 setValueSelector: #hScrollbarValue:! !

!ProjectScrollWindow methodsFor: 'as yet unclassified'!
newScroller
	^ TransformWithLayoutMorph new color: Color transparent! !

!ProjectScrollWindow methodsFor: 'as yet unclassified'!
newVScrollbar
	^ GeneralScrollBar new model: self;
		 setValueSelector: #vScrollbarValue:! !

!ProjectScrollWindow methodsFor: 'as yet unclassified' stamp: 'kuzovkinP 8/6/2012 09:44'!
pointFromScrollbarValueX
|point|
^point:=(((self hScrollbar value*self  myScene bounds corner x)/self magnification)/(1+(1 / self  myScene bounds corner x * (self bounds corner x - self bounds origin x))))


 ! !

!ProjectScrollWindow methodsFor: 'as yet unclassified' stamp: 'kuzovkinP 8/6/2012 09:44'!
pointFromScrollbarValueY
|point|
^point:=(((self vScrollbar value*self  myScene bounds corner y)/self magnification)/(1+(1 / self  myScene bounds corner y * (self bounds corner y - self bounds origin y))))


 ! !

!ProjectScrollWindow methodsFor: 'as yet unclassified'!
resizeScroller
	self scroller bounds: self scrollBounds! !

!ProjectScrollWindow methodsFor: 'as yet unclassified'!
scrollBarThickness
	^ self theme scrollbarThickness! !

!ProjectScrollWindow methodsFor: 'as yet unclassified'!
scrollBounds
	| t1 |
	t1 := self innerBounds.
	self vScrollbarNeeded
		ifTrue: [t1 := t1 right: t1 right - self scrollBarThickness].
	self hScrollbarNeeded
		ifTrue: [t1 := t1 bottom: t1 bottom - self scrollBarThickness].
	^ t1! !

!ProjectScrollWindow methodsFor: 'as yet unclassified'!
scrollByKeyboard: t1 
	| t2 |
	t2 := t1 commandKeyPressed
				ifTrue: [self hScrollbar]
				ifFalse: [self vScrollbar].
	(t1 keyValue = 30
			or: [t1 keyValue = 11])
		ifTrue: [t2 scrollUp: 3.
			^ true].
	(t1 keyValue = 31
			or: [t1 keyValue = 12])
		ifTrue: [t2 scrollDown: 3.
			^ true].
	^ false! !

!ProjectScrollWindow methodsFor: 'as yet unclassified'!
scrollTarget
	^ self scroller submorphs first! !

!ProjectScrollWindow methodsFor: 'as yet unclassified'!
scrollTarget: t1 
	self scroller removeAllMorphs; addMorph: t1.
	self updateScrollbars! !

!ProjectScrollWindow methodsFor: 'as yet unclassified'!
scrollToShow: t1 
	| t2 |
	t2 := self scroller offset.
	(t1 top - t2 y >= 0
			and: [t1 bottom - t2 y <= self innerBounds height])
		ifFalse: [t2 := t2 x
						@ (t1 top min: self scrollTarget height - self innerBounds height)].
	(t1 left - t2 x >= 0
			and: [t1 right - t2 x <= self innerBounds width])
		ifFalse: [t2 := (t1 left min: self scrollTarget width - self innerBounds width)
						@ t2 y].
	t2 = self scroller offset
		ifFalse: [self scroller offset: t2.
			self setScrollDeltas]! !

!ProjectScrollWindow methodsFor: 'as yet unclassified'!
scrollbarThickness
	^ self theme scrollbarThickness! !

!ProjectScrollWindow methodsFor: 'as yet unclassified'!
setScrollDeltas
	self hSetScrollDelta; vSetScrollDelta! !

!ProjectScrollWindow methodsFor: 'as yet unclassified' stamp: 'kuzovkinP 6/23/2012 21:12'!
startColor: t1 
	t1
		color: (Color blue alpha: 0.009)! !

!ProjectScrollWindow methodsFor: 'as yet unclassified' stamp: 'kuzovkinP 6/16/2012 11:23'!
startSt
^startSt! !

!ProjectScrollWindow methodsFor: 'as yet unclassified' stamp: 'kuzovkinP 6/16/2012 11:24'!
startSt: bool
startSt:=bool! !

!ProjectScrollWindow methodsFor: 'as yet unclassified' stamp: 'kuzovkinP 8/15/2012 14:44'!
step
	| X Y |
	Y := self toPointScrollbarY.
	X := self toPointScrollbarX.
	startStOut = true 
	          ifTrue: [ self isStepping  ifFalse: [ self startStepping ].	
			      self myScene cameramovingmorphscollection
				    ifNotEmpty: [ 
						self distanceBeetwenPositionsY abs > ( 2*self countStepV)
							ifTrue: [ self cameraMovingY: Y ].
						self distanceBeetwenPositionsX abs > ( 2*self countStepH)
							ifTrue: [ self cameraMovingX: X ].
						self moveTo: (self myScene cameramovingmorphscollection at: self myScene countMorphs).
						(self distanceBeetwenPositionsX abs < self countStepH and: self distanceBeetwenPositionsY abs < self countStepV)
							ifTrue: [self isNext. self startAnimation  ]
							ifFalse: [ self stopAnimation   ].
						((self zoom x - self magnification) abs > self zoomingStepX
						and: (self zoom y - self magnification) abs > self zoomingStepY)
						ifTrue: [ self zooming ] ] ]	! !

!ProjectScrollWindow methodsFor: 'as yet unclassified'!
stepTime
	^ 0! !

!ProjectScrollWindow methodsFor: 'as yet unclassified'!
updateScrollbars
	self vUpdateScrollbar; hUpdateScrollbar; setScrollDeltas! !

!ProjectScrollWindow methodsFor: 'as yet unclassified'!
vHideScrollbar
	self vScrollbarShowing
		ifFalse: [^ self].
	self removeMorph: self vScrollbar.
	self hResizeScrollbar.
	self resizeScroller! !

!ProjectScrollWindow methodsFor: 'as yet unclassified'!
vLeftoverScrollRange
	^ self scrollTarget height - self scrollBounds height max: 0! !

!ProjectScrollWindow methodsFor: 'as yet unclassified'!
vPageDelta
	| t1 t2 t3 |
	t2 := self scrollTarget height.
	t3 := self scrollBounds height.
	t1 := t2 - t3 max: 0.
	t1 = 0
		ifFalse: [t1 := t3 / t1].
	^ t1! !

!ProjectScrollWindow methodsFor: 'as yet unclassified'!
vResizeScrollbar
	| t1 |
	t1 := self innerBounds.
	t1 := t1 left: t1 right - self scrollBarThickness.
	self hScrollbarShowing
		ifTrue: [t1 := t1 bottom: t1 bottom - self scrollBarThickness].
	self vScrollbar bounds: t1! !

!ProjectScrollWindow methodsFor: 'as yet unclassified'!
vScrollbarInterval
	^ self scrollBounds height asFloat / self scrollTarget height min: 1.0! !

!ProjectScrollWindow methodsFor: 'as yet unclassified'!
vScrollbarNeeded
	^ self scrollTarget height
		+ (self scrollTarget width > self innerBounds width
				ifTrue: [self scrollBarThickness]
				ifFalse: [0]) > self innerBounds height! !

!ProjectScrollWindow methodsFor: 'as yet unclassified'!
vScrollbarShowing
	^ self vScrollbar owner notNil! !

!ProjectScrollWindow methodsFor: 'as yet unclassified'!
vScrollbarValue
	| t1 t2 t3 |
	t1 := self scrollTarget height.
	t2 := self scrollBounds height.
	t3 := t1 - t2 max: 0.
	t3 = 0
		ifFalse: [t3 := self scroller offset y asFloat / t3 min: 1.0].
	^ t3! !

!ProjectScrollWindow methodsFor: 'as yet unclassified'!
vScrollbarValue: t1 
	| t2 |
	t2 := self scrollTarget height - self scrollBounds height max: 0.
	self scroller offset: self scroller offset x @ (t2 * t1) rounded! !

!ProjectScrollWindow methodsFor: 'as yet unclassified'!
vSetScrollDelta
	| t1 |
	t1 := self vPageDelta.
	self vScrollbar scrollDelta: t1 / 10 pageDelta: t1;
		 interval: self vScrollbarInterval;
		 setValue: self vScrollbarValue! !

!ProjectScrollWindow methodsFor: 'as yet unclassified'!
vShowScrollbar
	self vResizeScrollbar.
	self vScrollbarShowing
		ifTrue: [^ self].
	self privateAddMorph: self vScrollbar atIndex: 1.
	self hResizeScrollbar.
	self resizeScroller! !

!ProjectScrollWindow methodsFor: 'as yet unclassified'!
vUpdateScrollbar
	self vScrollbarNeeded
		ifTrue: [self vShowScrollbar; vResizeScrollbar]
		ifFalse: [self vHideScrollbar]! !

!ProjectScrollWindow methodsFor: 'as yet unclassified'!
zoom
	^ zoom! !

!ProjectScrollWindow methodsFor: 'as yet unclassified' stamp: 'kuzovkinP 7/23/2012 16:25'!
zoom: aSize 
	| a |
	zoom := self bounds corner - self bounds origin / aSize.
	a := (self magnification - zoom) abs.
	self zoomingStepX: a x / 25.
	self zoomingStepY: a y / 25! !

!ProjectScrollWindow methodsFor: 'as yet unclassified' stamp: 'kuzovkinP 7/4/2012 15:34'!
zooming
	self zoom x < self zoom y
		ifTrue: [(self zoom x - self magnification) abs > self zoomingStepX
				ifTrue: [self zoomingAction ]]
		ifFalse: [(self zoom y - self magnification) abs > self zoomingStepY
				ifTrue: [self zoomingAction ]]! !

!ProjectScrollWindow methodsFor: 'as yet unclassified' stamp: 'kuzovkinP 7/4/2012 15:32'!
zoomingAction
	self zoom x < self zoom y
						ifTrue: [self zoom x > self magnification
								ifTrue: [self magnification: self magnification + self zoomingStepX].
							self zoom x < self magnification
								ifTrue: [self magnification: self magnification - self zoomingStepX]]
						ifFalse: [self zoom y > self magnification
								ifTrue: [self magnification: self magnification + self zoomingStepY].
							self zoom y < self magnification
								ifTrue: [self magnification: self magnification - self zoomingStepY]]! !

!ProjectScrollWindow methodsFor: 'as yet unclassified'!
zoomingStepX
	^ zoomingStepX! !

!ProjectScrollWindow methodsFor: 'as yet unclassified'!
zoomingStepX: aZoom 
	zoomingStepX := aZoom! !

!ProjectScrollWindow methodsFor: 'as yet unclassified'!
zoomingStepY
	^ zoomingStepY! !

!ProjectScrollWindow methodsFor: 'as yet unclassified'!
zoomingStepY: aZoom 
	zoomingStepY := aZoom! !

"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- "!

ProjectScrollWindow class
	instanceVariableNames: 'toPoint'!

!ProjectScrollWindow class methodsFor: 'as yet unclassified' stamp: 'Anonymous 6/18/2012 12:29'!
startStOut

^startStOut! !

!ProjectScrollWindow class methodsFor: 'as yet unclassified' stamp: 'Anonymous 6/18/2012 12:29'!
startStOut: bool
startStOut:= bool! !


Object subclass: #EsseProject
	instanceVariableNames: 'controlPanel partMenu addMenu'
	classVariableNames: 'projectE'
	poolDictionaries: ''
	category: 'Esse'!

!EsseProject methodsFor: 'as yet unclassified' stamp: 'kuzovkinP 8/1/2012 15:22'!
initialize
	projectE:= ProjectScrollWindow new.
	projectE openInWindow.
	controlPanel:=EsseControlPanel new.
	controlPanel openInWindow.
	partMenu:= PartMenu createPartMenu.
	addMenu:=EsseAddMenu new.
	addMenu openInWindow.! !

"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- "!

EsseProject class
	instanceVariableNames: ''!

!EsseProject class methodsFor: 'as yet unclassified' stamp: 'kuzovkinP 6/19/2012 14:27'!
projectE
^projectE! !

!EsseProject class methodsFor: 'as yet unclassified' stamp: 'kuzovkinP 6/19/2012 14:27'!
projectE: aObject
projectE:=aObject! !


RectangleMorph subclass: #EsseNextButton
	instanceVariableNames: 'buttonTitle'
	classVariableNames: ''
	poolDictionaries: ''
	category: 'Esse'!

!EsseNextButton methodsFor: 'as yet unclassified' stamp: 'kuzovkinP 6/18/2012 13:33'!
handlesMouseDown: evt

	^ true! !

!EsseNextButton methodsFor: 'as yet unclassified' stamp: 'kuzovkinP 7/20/2012 20:37'!
initialize
	super initialize.
	color := Color brown alpha: 0.5.
	bounds := 0 @ 0 extent: 75 @ 40.
	buttonTitle:=TextMorph new.
	self addMorph: buttonTitle.
	buttonTitle position: self position + ((self width /4)@(self height /3)).
	buttonTitle contents: 'Next'.
	buttonTitle lock  ! !

!EsseNextButton methodsFor: 'as yet unclassified' stamp: 'kuzovkinP 7/23/2012 14:40'!
mouseDown: evt
	(EsseProject projectE myScene countMorphs >= 1
		and: EsseProject projectE myScene countMorphs < EsseProject projectE myScene cameramovingmorphscollection size)
		ifTrue: [ 
			EsseProject projectE myScene countMorphs: EsseProject projectE myScene countMorphs + 1.
			EsseProject projectE
				moveTo:
					(EsseProject projectE myScene cameramovingmorphscollection at: EsseProject projectE myScene countMorphs) ].
	EsseProject projectE class startStOut = true
		ifFalse: [ EsseProject projectE class startStOut: true ].
		PartMenu updatePartMenu. ! !


RectangleMorph subclass: #PartMenu
	instanceVariableNames: 'newPartButton'
	classVariableNames: 'pm'
	poolDictionaries: ''
	category: 'Esse'!

!PartMenu methodsFor: 'as yet unclassified' stamp: 'kuzovkinP 7/23/2012 14:54'!
initialize
super initialize.
	color := Color blue.
	bounds := 300 @ 300 extent: 500 @ 500.
	newPartButton:=EsseNewPartButton  new.
	self addMorph: newPartButton.
	newPartButton position: (self position ).! !

"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- "!

PartMenu class
	instanceVariableNames: ''!

!PartMenu class methodsFor: 'as yet unclassified' stamp: 'kuzovkinP 7/19/2012 18:18'!
createPartMenu
pm:=PartMenu new.
^pm openInWindow .! !

!PartMenu class methodsFor: 'as yet unclassified' stamp: 'kuzovkinP 7/19/2012 12:31'!
getPartMenu
^pm! !

!PartMenu class methodsFor: 'as yet unclassified' stamp: 'kuzovkinP 7/23/2012 14:44'!
updatePartMenu
	1 to: EsseProject projectE myScene partscollection size do: [ :i | 
		pm addMorph: (EsseProject projectE myScene partscollection at: i).
		i \\ 2 = 1
			ifTrue: [ 
				(EsseProject projectE myScene partscollection at: i)
					position: (pm position x + 150) @ (pm position y + (i * 50) + ((i + 1) * 10)) ].
		i \\ 2 = 0
			ifTrue: [ 
				(EsseProject projectE myScene partscollection at: i)
					position: (pm position x + (2 * 150) + (1 * 10)) @ (pm position y + ((i - 1) * 50) + (i * 10)) ].
		(EsseProject projectE myScene partscollection at: i) isButtonVisible
			ifTrue: [ 
				(EsseProject projectE myScene partscollection at: i) deleteButtons.
				(EsseProject projectE myScene partscollection at: i) updatePartNumbers ] ]! !


RectangleMorph subclass: #CameraMovingMorph
	instanceVariableNames: 'metka textI indexInCol partT'
	classVariableNames: ''
	poolDictionaries: ''
	category: 'Esse'!

!CameraMovingMorph methodsFor: 'as yet unclassified' stamp: 'kuzovkinP 7/22/2012 13:41'!
addCustomMenuItems: aCustomMenu hand: aHandMorph

	super addCustomMenuItems: aCustomMenu hand: aHandMorph.
	aCustomMenu add: 'Add in part' translated action: #addInPartMenuAction.
	aCustomMenu add: 'Delete from part' translated action: #deleteMenuAction .! !

!CameraMovingMorph methodsFor: 'as yet unclassified' stamp: 'kuzovkinP 7/23/2012 14:37'!
addInPartMenuAction

	| reply |
	reply := UIManager default 
				chooseFrom: (EsseProject projectE myScene partscollection collect: [:t | t partNum ]) 
				values: self partChoises.
	reply ifNotNil:[
		EsseProject projectE myScene addInPart: reply focusMorph: self indexInCol  .
	].
! !

!CameraMovingMorph methodsFor: 'as yet unclassified'!
afterStart
	self
		color: (Color red alpha: 0.3)! !

!CameraMovingMorph methodsFor: 'as yet unclassified' stamp: 'kuzovkinP 7/23/2012 14:37'!
delete
	super delete.
	self updateCountMorphs.
	EsseProject projectE myScene cameramovingmorphscollection removeAt: self indexInCol.
	self deleteFromAllParts.
	self updatePartIndexes! !

!CameraMovingMorph methodsFor: 'as yet unclassified' stamp: 'kuzovkinP 7/23/2012 14:38'!
deleteFromAllParts
|k|
1 to: EsseProject projectE myScene partscollection size do: [:i | k:=(((EsseProject projectE myScene partscollection at: i) focusMorphsInPart) indexOf: self). k =0 ifFalse:[((EsseProject projectE myScene partscollection at: i) focusMorphsInPart) removeAt: k ]].! !

!CameraMovingMorph methodsFor: 'as yet unclassified' stamp: 'kuzovkinP 7/23/2012 14:38'!
deleteFromPart: aNumber
	| r |
	r := (EsseProject projectE myScene partscollection at: aNumber) focusMorphsInPart indexOf: self.
	r = 0
		ifFalse: [ (EsseProject projectE myScene partscollection at: aNumber) focusMorphsInPart removeAt: r ].
	1 to: EsseProject projectE myScene partscollection size do: [ :i | 
		(EsseProject projectE myScene partscollection at: i) isButtonVisible
			ifTrue: [ 
				i = aNumber
					ifTrue: [ 
						EsseProject projectE myScene countInPart: 1.
						EsseProject projectE myScene countMorphs: ((EsseProject projectE myScene partscollection at: i) focusMorphsInPart at: (EsseProject projectE myScene countInPart)) indexInCol  ] ] ]! !

!CameraMovingMorph methodsFor: 'as yet unclassified' stamp: 'kuzovkinP 7/22/2012 14:36'!
deleteMenuAction

	| reply |
	reply := UIManager default 
				chooseFrom: (self deletePartChoises collect: [:t | t partNum ]) 
				values: self deletePartChoises .
	reply ifNotNil:[
		self deleteFromPart: reply partNum  .
	].
! !

!CameraMovingMorph methodsFor: 'as yet unclassified' stamp: 'kuzovkinP 7/23/2012 14:39'!
deletePartChoises
	| k r |
	k := OrderedCollection new.
	1 to: EsseProject projectE myScene partscollection size do: [ :i | 
		r := (EsseProject projectE myScene partscollection at: i) focusMorphsInPart indexOf: self.
		r = 0
			ifFalse: [ k add: (EsseProject projectE myScene partscollection at: i) ] ].
	^ k! !

!CameraMovingMorph methodsFor: 'as yet unclassified'!
handleKeystroke: t1 
	| t2 |
	t2 := t1 keyValue.
	t2 = $1 asciiValue
		ifTrue: [self metka: false.
			self
				color: (Color red alpha: 0.3)].
	t2 = $2 asciiValue
		ifTrue: [self metka: true.
			self
				color: (Color green alpha: 0.3)].
	t2 = $3 asciiValue
		ifTrue: [self
				color: (Color green alpha: 0.7)]! !

!CameraMovingMorph methodsFor: 'as yet unclassified' stamp: 'kuzovkinP 6/19/2012 10:57'!
indexInCol
^indexInCol! !

!CameraMovingMorph methodsFor: 'as yet unclassified' stamp: 'kuzovkinP 6/19/2012 10:56'!
indexInCol: aIndex
indexInCol:=aIndex! !

!CameraMovingMorph methodsFor: 'as yet unclassified' stamp: 'kuzovkinP 7/23/2012 14:39'!
initialize
	super initialize.
	metka := false.
	color := Color brown alpha: 0.1.
	bounds := 0 @ 0 extent: 100 @ 100.
	borderWidth := 0.
	textI := TextMorph new.
	self addMorph: textI.
	textI position: self position + (1 @ 1).
	EsseProject projectE myScene cameramovingmorphscollection isEmpty ifTrue:[EsseProject projectE myScene countMorphs:1 ]! !

!CameraMovingMorph methodsFor: 'as yet unclassified'!
metka
	^ metka! !

!CameraMovingMorph methodsFor: 'as yet unclassified'!
metka: t1 
	metka := t1! !

!CameraMovingMorph methodsFor: 'as yet unclassified' stamp: 'kuzovkinP 7/23/2012 14:39'!
partChoises
|r|
r:=OrderedCollection new.
1 to: EsseProject projectE  myScene partscollection size do:
[:i| r add:((EsseProject projectE  myScene partscollection at:i) partNum  )].
^r! !

!CameraMovingMorph methodsFor: 'as yet unclassified' stamp: 'kuzovkinP 7/17/2012 12:45'!
partT
^partT! !

!CameraMovingMorph methodsFor: 'as yet unclassified' stamp: 'kuzovkinP 7/17/2012 12:45'!
partT:aTitle
partT:=aTitle! !

!CameraMovingMorph methodsFor: 'as yet unclassified'!
size
	^ self bounds corner - self bounds origin! !

!CameraMovingMorph methodsFor: 'as yet unclassified' stamp: 'kuzovkinP 6/19/2012 10:14'!
textI
^textI! !

!CameraMovingMorph methodsFor: 'as yet unclassified' stamp: 'kuzovkinP 6/19/2012 10:15'!
textI: aIndex
textI:=aIndex! !

!CameraMovingMorph methodsFor: 'as yet unclassified' stamp: 'kuzovkinP 7/23/2012 14:39'!
updateCountMorphs
((self indexInCol = EsseProject projectE myScene cameramovingmorphscollection size
		and: self indexInCol = EsseProject projectE myScene countMorphs)
		or: (self indexInCol <= EsseProject projectE myScene countMorphs and: EsseProject projectE myScene countMorphs > 1))
		ifTrue: [ EsseProject projectE myScene countMorphs: EsseProject projectE myScene countMorphs - 1 ].! !

!CameraMovingMorph methodsFor: 'as yet unclassified' stamp: 'kuzovkinP 7/23/2012 14:40'!
updatePartIndexes
1 to: EsseProject projectE myScene cameramovingmorphscollection size do: [ :index | 
		(EsseProject projectE myScene cameramovingmorphscollection at: index) indexInCol: index.
		(EsseProject projectE myScene cameramovingmorphscollection at: index) textI contents: index asString ]! !


RectangleMorph subclass: #EsseCameraMovingMorphButton
	instanceVariableNames: 'buttonTitle'
	classVariableNames: ''
	poolDictionaries: ''
	category: 'Esse'!

!EsseCameraMovingMorphButton methodsFor: 'as yet unclassified' stamp: 'kuzovkinP 7/31/2012 17:27'!
handlesMouseDown: t1 
	^ true! !

!EsseCameraMovingMorphButton methodsFor: 'as yet unclassified' stamp: 'kuzovkinP 8/7/2012 18:08'!
initialize
	super initialize.
	color := Color brown alpha: 0.5.
	bounds := 0 @ 0 extent: 75 @ 40.
	buttonTitle:=TextMorph new.
	self addMorph: buttonTitle.
	buttonTitle position: self position + ((self width /5)@(self height /3)).
	buttonTitle contents: 'Focus'.
	buttonTitle lock  .! !

!EsseCameraMovingMorphButton methodsFor: 'as yet unclassified' stamp: 'kuzovkinP 8/6/2012 10:11'!
mouseDown: t1 
	
	EsseProject projectE myScene createCameraMovingMorphOnPosition ! !


RectangleMorph subclass: #EsseControlPanel
	instanceVariableNames: 'startButton nextButton previousButton zoomButton'
	classVariableNames: ''
	poolDictionaries: ''
	category: 'Esse'!

!EsseControlPanel methodsFor: 'as yet unclassified' stamp: 'kuzovkinP 8/1/2012 15:20'!
initialize
super initialize.
	color := Color brown alpha: 0.1.
	bounds := 0 @ 0 extent: 330@ 50.
startButton:= EsseStartButton new.
	self addMorph: startButton.
	startButton position: (self position +(85@5)).
	nextButton:= EsseNextButton new.
	self addMorph: nextButton.
	nextButton position: (self position +(170@5)).
	previousButton:= EssePreviousButton new.
	self addMorph: previousButton.
	previousButton position: (self position +(5@5)).
	zoomButton := EsseZoomButton new.
	self addMorph: zoomButton.
	zoomButton position: self position + (250 @ 5).! !


RectangleMorph subclass: #EssePreviousButton
	instanceVariableNames: 'buttonTitle'
	classVariableNames: ''
	poolDictionaries: ''
	category: 'Esse'!

!EssePreviousButton methodsFor: 'as yet unclassified' stamp: 'kuzovkinP 6/18/2012 13:33'!
handlesMouseDown: evt

	^ true! !

!EssePreviousButton methodsFor: 'as yet unclassified' stamp: 'kuzovkinP 7/20/2012 20:35'!
initialize
	super initialize.
	color := Color brown alpha: 0.5.
	bounds := 0 @ 0 extent: 75@ 40.
	buttonTitle:=TextMorph new.
	self addMorph: buttonTitle.
	buttonTitle position: self position + ((self width /15)@(self height /3)).
	buttonTitle contents: 'Previous'.
	buttonTitle lock  ! !

!EssePreviousButton methodsFor: 'as yet unclassified' stamp: 'kuzovkinP 7/23/2012 14:41'!
mouseDown: evt
	(EsseProject projectE  myScene countMorphs >1
		and: EsseProject projectE myScene countMorphs <= EsseProject projectE myScene cameramovingmorphscollection size)
		ifTrue: [ 
			EsseProject projectE myScene countMorphs: EsseProject projectE myScene countMorphs - 1.
			EsseProject projectE
				moveTo:
					(EsseProject projectE myScene cameramovingmorphscollection at: EsseProject projectE myScene countMorphs) ].
	EsseProject projectE class startStOut = true
		ifFalse: [ EsseProject projectE class startStOut: true ].
		PartMenu updatePartMenu. ! !


Morph subclass: #MyMorphs
	instanceVariableNames: ''
	classVariableNames: ''
	poolDictionaries: ''
	category: 'Esse'!

!MyMorphs methodsFor: 'as yet unclassified'!
handleKeystroke: t1 
	| t2 |
	t2 := t1 keyValue.
	t2 = $= asciiValue
		ifTrue: [self startStepping].
	t2 = $- asciiValue
		ifTrue: [self stopStepping]! !

!MyMorphs methodsFor: 'as yet unclassified'!
initialize
	super initialize.
	color := Color red.
	bounds := 0 @ 0 extent: 300 @ 100.
	self position: self position - (300 @ 0) + (0 @ 250)! !

!MyMorphs methodsFor: 'as yet unclassified'!
step
	self position: self position + (1 @ 0)! !

!MyMorphs methodsFor: 'as yet unclassified'!
stepTime
	^ 30! !
