WAHalo


Seaside-Components-Tools

Comment:



Hierarchy:

ProtoObject
Object
WAPresenter
WAComponent
WAHalo

Summary:

instance variables:

mode target

class variables:

Halos

methods:

instance class
*SeasideTesting-override as yet unclassified as yet unclassified

Detail:

instance variables:

mode
target

class variables:

Halos
InitialValue:
a WeakIdentityKeyDictionary()
inferredType:
WeakIdentityKeyDictionary

instance methods:

*SeasideTesting-override
renderContentOn: html
 
	| haloHtml |
	haloHtml := self rendererClass context: html context callbacks: html callbacks.
	haloHtml
		divClass: 'halo'
		with: [haloHtml
				divClass: 'halo-header'
				with: [haloHtml
						divClass: 'halo-icons'
						with: [haloHtml
								divClass: 'halo-mode'
								with: [haloHtml text: '['.
									haloHtml
										anchorWithAction: [self renderMode]
										text: 'R'.
									haloHtml text: ' | '.
									haloHtml
										anchorWithAction: [self sourceMode]
										text: 'S'.
									haloHtml text: ']'].
							haloHtml text: self target class name.
							haloHtml space.
							self
								renderHalo: 'Halo-Debug'
								withWindow: [WABrowser fullOnClass: self target class]
								titled: 'System Browser'
								on: haloHtml.
							self
								renderHalo: 'Halo-View'
								withWindow: [WAInspector on: self target]
								titled: 'Inspector'
								on: haloHtml.
							self
								renderHalo: 'Halo-Paint'
								withWindow: [WAViewer on: self target]
								titled: 'Style Editor'
								on: haloHtml.
							target class hasTestSuite
								ifTrue: [self
										renderHalo: 'Halo-Tile'
										withWindow: [SCTestRunner forCase: target class suite]
										titled: 'Test Runner'
										on: haloHtml]]].
			haloHtml
				divClass: 'halo-contents'
				with: [self perform: mode contents with: html]].
	haloHtml close.
	html close

as yet unclassified
findStyles

	| context |
	context _ WARenderingContext new
				document: WAStyleCollector new;
				actionUrl: WAUrl new;
				request: self session currentRequest.
	self target renderWithContext: context.
	^ String streamContents:
		[:s |
		context document styles do: [:ea | s nextPutAll: ea; space]]
initialize

	mode _ WAStateHolder new contents: #render:
render: html

	self target renderContentOn: html
renderHalo: iconKey withAction: aBlock on: html

	html
		anchorWithAction: aBlock
		text:  [html imageWithForm: (ScriptingSystem formAtKey: iconKey)].
renderHalo: iconKey withWindow: componentBlock titled: aString on: html

	self
		renderHalo: iconKey
		withAction: [WARenderLoop new call: (componentBlock value
												addDecoration: (WAWindowDecoration new title: aString);
												yourself)]
		on: html
renderMode

	mode contents: #render:
source: html

	| context haloHtml | 
	haloHtml := self rendererClass
					context: html context
					callbacks: html callbacks. 
	context := haloHtml context copy.	
	context clearMode.
	context document: (WAPrettyPrintedDocument renderer: haloHtml).
	haloHtml divClass: 'halo-source' with: [self target renderWithContext: context]. 
	haloHtml close. 
sourceMode

	mode contents: #source:
target

	^ target
target: aComponent

	target _ aComponent

class methods:

as yet unclassified
for: aComponent

	^ Halos at: aComponent ifAbsentPut: [self new target: aComponent]
initialize

	Halos _ SeasidePlatformSupport weakDictionaryOfSize: 20.

^top


- made by Dandelion -