Squeak
  links to this page:    
View this PageEdit this PageUploads to this PageHistory of this PageTop of the SwikiRecent ChangesSearch the SwikiHelp Guide
Construct the Workspace window
Last updated at 10:24 pm UTC on 9 December 2017
 ToolBuilder open: Workspace


 ToolBuilder class>>open:
 open: aClass
	^self default open: aClass


 MorphicToolBuilder>>open:
 open: anObject
	"Build and open the object. Answer the widget opened."
	
	^ (self build: anObject) openAsTool


 MorphicToolBuilder(ToolBuilder)>>build:
 build: anObject
	"Build the given object using this tool builder"
	^anObject buildWith: self


 Workspace class(Model class)>>buildWith:
 buildWith: toolBuilder
	^self new buildWith: toolBuilder


 Workspace(StringHolder)>>buildWith:
 buildWith: builder
	| windowSpec |
	windowSpec := 	self buildWindowWith: builder specs: {
		(0@0corner: 1@1) -> [self buildCodePaneWith: builder].
	}.
	^builder build: windowSpec


 Workspace>>buildCodePaneWith:
 buildCodePaneWith: builder
	| textSpec |
	textSpec := builder pluggableCodePaneSpec new.
	textSpec 
		model: self;
		getText: #contents; 
		setText: #contents:notifying:; 
		selection: #contentsSelection; 
		menu: #codePaneMenu:shifted:.
	^textSpec