66
|
1 |
Object subclass:#WindowBuilder
|
75
|
2 |
instanceVariableNames:'topView application bindings aspects focusSequence'
|
66
|
3 |
classVariableNames:''
|
|
4 |
poolDictionaries:''
|
|
5 |
category:'Interface-Support'
|
|
6 |
!
|
|
7 |
|
|
8 |
!WindowBuilder class methodsFor:'documentation'!
|
|
9 |
|
|
10 |
documentation
|
|
11 |
"
|
69
|
12 |
a no-op class, for systems which do not use the UIBuilder.
|
66
|
13 |
Concrete subclasses know how to create a view (with components) from
|
|
14 |
some interface spec. Currently, an experimantal version of UIBuilder exists,
|
|
15 |
and more may be added in the future (for example, to parse different UI
|
|
16 |
specs - thinking of motifs UIL specs etc).
|
|
17 |
"
|
|
18 |
! !
|
|
19 |
|
|
20 |
!WindowBuilder methodsFor:'accessing'!
|
|
21 |
|
|
22 |
bindings
|
|
23 |
^ aspects
|
|
24 |
!
|
|
25 |
|
|
26 |
bindings:aDictionary
|
|
27 |
aspects := aDictionary
|
|
28 |
!
|
|
29 |
|
|
30 |
focusSequence
|
|
31 |
^ focusSequence
|
|
32 |
!
|
|
33 |
|
|
34 |
aspectAt:aSymbol
|
|
35 |
aspects isNil ifTrue:[^ nil].
|
|
36 |
^ aspects at:aSymbol ifAbsent:nil
|
|
37 |
!
|
|
38 |
|
|
39 |
aspectAt:aSymbol put:aModel
|
|
40 |
aspects isNil ifTrue:[
|
|
41 |
aspects := IdentityDictionary new
|
|
42 |
].
|
|
43 |
^ aspects at:aSymbol put:aModel
|
|
44 |
!
|
|
45 |
|
|
46 |
componentAt:name
|
75
|
47 |
^ bindings at:name ifAbsent:nil
|
66
|
48 |
!
|
|
49 |
|
69
|
50 |
window:aView
|
|
51 |
topView := aView
|
|
52 |
!
|
|
53 |
|
66
|
54 |
window
|
|
55 |
^ topView
|
|
56 |
!
|
|
57 |
|
|
58 |
windowGroup
|
|
59 |
^ topView windowGroup
|
|
60 |
!
|
|
61 |
|
|
62 |
application
|
|
63 |
^ application
|
|
64 |
!
|
|
65 |
|
|
66 |
application:anApplicationModel
|
|
67 |
application := anApplicationModel
|
|
68 |
!
|
|
69 |
|
|
70 |
source:anApplicationModel
|
|
71 |
application := anApplicationModel
|
|
72 |
! !
|
|
73 |
|
|
74 |
!WindowBuilder methodsFor:'operation'!
|
|
75 |
|
|
76 |
buildFromSpec:aSpec
|
|
77 |
self subclassResponsibility
|
|
78 |
!
|
|
79 |
|
|
80 |
open
|
|
81 |
self openWithExtent:nil andType:#normal
|
|
82 |
!
|
|
83 |
|
|
84 |
openDialog
|
|
85 |
self openWithExtent:nil andType:#dialog
|
|
86 |
!
|
|
87 |
|
|
88 |
openWithExtent:ext andType:type
|
|
89 |
ext notNil ifTrue:[
|
|
90 |
topView extent:ext
|
|
91 |
].
|
|
92 |
type == #dialog ifTrue:[
|
|
93 |
topView openModal.
|
|
94 |
^ self
|
|
95 |
].
|
|
96 |
|
|
97 |
type == #normal ifTrue:[
|
|
98 |
topView open.
|
|
99 |
^ self
|
|
100 |
].
|
|
101 |
self halt:'unimplemented'
|
|
102 |
!
|
|
103 |
|
|
104 |
openWithExtent:aPoint
|
|
105 |
self openWithExtent:aPoint andType:#normal
|
|
106 |
!
|
|
107 |
|
|
108 |
closeRequest
|
|
109 |
topView destroy
|
|
110 |
! !
|