1353
|
1 |
"
|
|
2 |
COPYRIGHT (c) 1999 eXept Software AG
|
|
3 |
All Rights Reserved
|
|
4 |
|
|
5 |
This software is furnished under a license and may be used
|
|
6 |
only in accordance with the terms of that license and with the
|
|
7 |
inclusion of the above copyright notice. This software may not
|
|
8 |
be provided or otherwise made available to, or used by, any
|
|
9 |
other person. No title to or ownership of the software is
|
|
10 |
hereby transferred.
|
|
11 |
"
|
|
12 |
|
|
13 |
|
1433
|
14 |
"{ Package: 'stx:libview2' }"
|
|
15 |
|
1287
|
16 |
View subclass:#ApplicationSubView
|
|
17 |
instanceVariableNames:'application'
|
|
18 |
classVariableNames:''
|
|
19 |
poolDictionaries:''
|
|
20 |
category:'Views-Basic'
|
|
21 |
!
|
|
22 |
|
|
23 |
!ApplicationSubView class methodsFor:'documentation'!
|
|
24 |
|
1353
|
25 |
copyright
|
|
26 |
"
|
|
27 |
COPYRIGHT (c) 1999 eXept Software AG
|
|
28 |
All Rights Reserved
|
|
29 |
|
|
30 |
This software is furnished under a license and may be used
|
|
31 |
only in accordance with the terms of that license and with the
|
|
32 |
inclusion of the above copyright notice. This software may not
|
|
33 |
be provided or otherwise made available to, or used by, any
|
|
34 |
other person. No title to or ownership of the software is
|
|
35 |
hereby transferred.
|
|
36 |
"
|
|
37 |
|
|
38 |
!
|
|
39 |
|
1287
|
40 |
documentation
|
|
41 |
"
|
|
42 |
needed sometimes, when a full application is embeded into an ExtendedComboBox
|
|
43 |
or subcanvas AND you want to avoid, that this application accesses the outer
|
|
44 |
applications aspects (by returning a private application instance).
|
1288
|
45 |
|
|
46 |
Notice: you may have to manually set this views application to be the embedded app
|
|
47 |
(i.e. via #application:) unless it is set by #client:....
|
1287
|
48 |
|
|
49 |
see self-embedding example in CodingExamples_GUI::GUIDemoExtendedComboBox
|
|
50 |
"
|
|
51 |
!
|
|
52 |
|
|
53 |
examples
|
|
54 |
"
|
1715
|
55 |
see self-embedding example in CodingExamples_GUI::GUIDemoExtendedComboBox.
|
2066
|
56 |
[exBegin]
|
1715
|
57 |
|top sub app|
|
|
58 |
|
|
59 |
top := StandardSystemView new.
|
|
60 |
sub := ApplicationSubView new.
|
|
61 |
|
|
62 |
app := FileBrowserV2 new.
|
|
63 |
app createBuilder.
|
|
64 |
app window:sub.
|
|
65 |
sub client:app.
|
|
66 |
|
|
67 |
top addSubView:sub.
|
2066
|
68 |
sub origin:(0.1@0.1) corner:(0.9@0.9).
|
1715
|
69 |
top open.
|
2066
|
70 |
[exEnd]
|
|
71 |
[exBegin]
|
|
72 |
|top sub app|
|
|
73 |
|
|
74 |
top := StandardSystemView new.
|
|
75 |
sub := ApplicationSubView new.
|
|
76 |
|
|
77 |
app := Tools::NewSystemBrowser new.
|
|
78 |
app createBuilder.
|
|
79 |
app window:sub.
|
|
80 |
sub client:app.
|
|
81 |
|
|
82 |
top addSubView:sub.
|
|
83 |
sub origin:(0.1@0.1) corner:(0.9@0.9).
|
|
84 |
top open.
|
|
85 |
[exEnd]
|
1287
|
86 |
"
|
|
87 |
! !
|
|
88 |
|
|
89 |
!ApplicationSubView methodsFor:'accessing'!
|
|
90 |
|
|
91 |
application
|
|
92 |
"return the value of the instance variable 'application' (automatically generated)"
|
|
93 |
|
1433
|
94 |
^ application
|
|
95 |
!
|
1287
|
96 |
|
|
97 |
application:something
|
|
98 |
"set the value of the instance variable 'application' (automatically generated)"
|
|
99 |
|
1433
|
100 |
application := something.
|
|
101 |
!
|
1288
|
102 |
|
|
103 |
client:anApplication spec:aWindowSpecOrSpecSymbol builder:aBuilder
|
|
104 |
self application:anApplication.
|
|
105 |
^ super client:anApplication spec:aWindowSpecOrSpecSymbol builder:aBuilder
|
|
106 |
|
|
107 |
|
|
108 |
! !
|
1287
|
109 |
|
1433
|
110 |
!ApplicationSubView methodsFor:'events'!
|
|
111 |
|
1460
|
112 |
destroy
|
|
113 |
|app|
|
|
114 |
|
|
115 |
(app := self application) notNil ifTrue:[
|
|
116 |
app ~~ self topView application ifTrue:[
|
|
117 |
app release
|
|
118 |
]
|
|
119 |
].
|
|
120 |
super destroy.
|
|
121 |
|
|
122 |
!
|
|
123 |
|
1433
|
124 |
realize
|
|
125 |
|app|
|
|
126 |
|
|
127 |
super realize.
|
|
128 |
(app := self application) notNil ifTrue:[
|
|
129 |
app postOpenAsSubcanvasWith:app builder
|
|
130 |
]
|
|
131 |
! !
|
|
132 |
|
1287
|
133 |
!ApplicationSubView class methodsFor:'documentation'!
|
|
134 |
|
|
135 |
version
|
2066
|
136 |
^ '$Header: /cvs/stx/stx/libview2/ApplicationSubView.st,v 1.7 2005-10-13 23:14:47 cg Exp $'
|
1287
|
137 |
! !
|