.
Object subclass:#WindowBuilder
instanceVariableNames:'topView application bindings aspects focusSequence'
classVariableNames:''
poolDictionaries:''
category:'Interface-Support'
!
!WindowBuilder class methodsFor:'documentation'!
documentation
"
a no-op class, for systems which do not use the UIBuilder.
Concrete subclasses know how to create a view (with components) from
some interface spec. Currently, an experimantal version of UIBuilder exists,
and more may be added in the future (for example, to parse different UI
specs - thinking of motifs UIL specs etc).
"
! !
!WindowBuilder methodsFor:'accessing'!
bindings
^ aspects
!
bindings:aDictionary
aspects := aDictionary
!
focusSequence
^ focusSequence
!
aspectAt:aSymbol
aspects isNil ifTrue:[^ nil].
^ aspects at:aSymbol ifAbsent:nil
!
aspectAt:aSymbol put:aModel
aspects isNil ifTrue:[
aspects := IdentityDictionary new
].
^ aspects at:aSymbol put:aModel
!
componentAt:name
^ bindings at:name ifAbsent:nil
!
window:aView
topView := aView
!
window
^ topView
!
windowGroup
^ topView windowGroup
!
application
^ application
!
application:anApplicationModel
application := anApplicationModel
!
source:anApplicationModel
application := anApplicationModel
! !
!WindowBuilder methodsFor:'operation'!
buildFromSpec:aSpec
self subclassResponsibility
!
open
self openWithExtent:nil andType:#normal
!
openDialog
self openWithExtent:nil andType:#dialog
!
openWithExtent:ext andType:type
ext notNil ifTrue:[
topView extent:ext
].
type == #dialog ifTrue:[
topView openModal.
^ self
].
type == #normal ifTrue:[
topView open.
^ self
].
self halt:'unimplemented'
!
openWithExtent:aPoint
self openWithExtent:aPoint andType:#normal
!
closeRequest
topView destroy
! !