.
"
COPYRIGHT (c) 1995 by Claus Gittinger
All Rights Reserved
This software is furnished under a license and may be used
only in accordance with the terms of that license and with the
inclusion of the above copyright notice. This software may not
be provided or otherwise made available to, or used by, any
other person. No title to or ownership of the software is
hereby transferred.
"
Object subclass:#WindowBuilder
instanceVariableNames:'topView application bindings aspects focusSequence'
classVariableNames:''
poolDictionaries:''
category:'Interface-Support-UI'
!
!WindowBuilder class methodsFor:'documentation'!
copyright
"
COPYRIGHT (c) 1995 by Claus Gittinger
All Rights Reserved
This software is furnished under a license and may be used
only in accordance with the terms of that license and with the
inclusion of the above copyright notice. This software may not
be provided or otherwise made available to, or used by, any
other person. No title to or ownership of the software is
hereby transferred.
"
!
version
"
$Header: /cvs/stx/stx/libview2/Attic/WinBuilder.st,v 1.7 1995-08-30 17:54:30 claus Exp $
"
!
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
^ bindings
!
bindings:aDictionary
bindings := 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
!
namedComponents
^ bindings
!
componentAt:name
bindings isNil ifTrue:[^ nil].
^ bindings at:name ifAbsent:nil
!
componentAt:name put:aComponent
bindings isNil ifTrue:[
bindings := IdentityDictionary new.
].
bindings at:name put:aComponent
!
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
"open my topView, as previously created"
self openWithExtent:nil andType:#normal
!
openWithExtent:aPoint
"open my topView, as previously created, but override
the extent."
self openWithExtent:aPoint andType:#normal
!
openDialog
"open my topView, as previously created as a modal view,
blocking interaction to the currently active view."
self openWithExtent:nil andType:#dialog
!
openDialogWithExtent:ext
"open my topView, as previously created as a modal view,
blocking interaction to the currently active view."
self openWithExtent:ext andType:#dialog
!
openWithExtent:ext andType:type
"open my topView, as previously created. The type argument
may be #dialog or #normal, and specifies if the view should
be opened as a modal view, blocking interaction to the currently
active view, or as a normal view."
ext notNil ifTrue:[
topView extent:ext
].
type == #dialog ifTrue:[
topView openModal.
^ self
].
type == #normal ifTrue:[
topView open.
^ self
].
"
if ST-80 supports more types - these may be added later
"
self halt:'unimplemented'
!
closeRequest
topView destroy
! !