WAScreenshot


Seaside-Components-Tools-Squeak

Comment:



Hierarchy:

ProtoObject
Object
WAPresenter
WAComponent
WAScreenshot

Summary:

instance variables:

button text zoom

methods:

instance class
as yet unclassified as yet unclassified

Detail:

instance variables:

button
text
zoom

instance methods:

as yet unclassified
buttonCode

	^ button = #red ifTrue: [4] ifFalse: [button = #blue ifTrue: [2] ifFalse: [1]]
click: aPoint

	|evt|
	evt _ Sensor createMouseEvent.
	evt at: 3 put: aPoint x.
	evt at: 4 put: aPoint y.
	evt at: 5 put: self buttonCode.
	Sensor processEvent: evt.	
	evt at: 5 put: 0.
	Sensor processEvent: evt.
	button _ #red.
form

	^ zoom ifFalse: [Display copy] ifTrue: [self topWindow imageForm]
initialize

	button _ #red.
	zoom _ false
offset

	^ zoom ifTrue: [self topWindow position] ifFalse: [0@0]
renderContentOn: html

	| group |
	html table: [
		html tableRow: [
		html tableData: [
	html form: [
		html table: [
			html tableRow: [
				html tableData: 'Button: '.
	
				group _ html radioGroup.
				#(red yellow blue) do:
					[:ea |
					html attributes at: 'bgcolor' put: ea.
					html tableData: [
						html radioButtonInGroup: group selected: (button = ea) callback: [button _ ea].
					]].
				html tableData: [html submitButtonWithText: 'Set']
			]
		]
	].
	].
	html tableData: [
	html anchorWithAction: [self toggleZoom] text: self toggleZoomText.	
	].
	html tableData: [
	html anchorWithAction: [self toggleUIProcess] text: self toggleUIText.
	]]].
	html imageMapWithAction: [:pt | self click: pt + self offset] form: self form.
	html horizontalRule.
	
toggleUIProcess

	Project uiProcess isSuspended
		ifTrue: [Project uiProcess resume]
		ifFalse: [Project uiProcess suspend]
toggleUIText

	^ Project uiProcess isSuspended
		ifFalse: ['Suspend UI Process']
		ifTrue: ['Resume UI Process']
toggleZoom

	zoom _ zoom not
toggleZoomText

	^ zoom ifTrue: ['Zoom out'] ifFalse: ['Zoom in']
topWindow

	^ SystemWindow classPool at: #TopWindow

class methods:

as yet unclassified
canBeRoot

	^ true

^top


- made by Dandelion -