author | alkurz |
Tue, 02 Jul 2019 14:10:25 +0200 | |
changeset 4287 | 9e5dc8a88380 |
parent 4264 | 783af7121fea |
child 4390 | 8d9b8e2add26 |
permissions | -rw-r--r-- |
4151 | 1 |
"{ Encoding: utf8 }" |
2 |
||
1353 | 3 |
" |
4 |
COPYRIGHT (c) 1999 eXept Software AG |
|
5 |
All Rights Reserved |
|
6 |
||
7 |
This software is furnished under a license and may be used |
|
8 |
only in accordance with the terms of that license and with the |
|
9 |
inclusion of the above copyright notice. This software may not |
|
10 |
be provided or otherwise made available to, or used by, any |
|
11 |
other person. No title to or ownership of the software is |
|
12 |
hereby transferred. |
|
13 |
" |
|
1433 | 14 |
"{ Package: 'stx:libview2' }" |
15 |
||
4151 | 16 |
"{ NameSpace: Smalltalk }" |
17 |
||
1287 | 18 |
View subclass:#ApplicationSubView |
2105
e68fca357a3a
can now control if specs menu is wanted or not
Claus Gittinger <cg@exept.de>
parents:
2066
diff
changeset
|
19 |
instanceVariableNames:'application buildMenu' |
1287 | 20 |
classVariableNames:'' |
21 |
poolDictionaries:'' |
|
22 |
category:'Views-Basic' |
|
23 |
! |
|
24 |
||
25 |
!ApplicationSubView class methodsFor:'documentation'! |
|
26 |
||
1353 | 27 |
copyright |
28 |
" |
|
29 |
COPYRIGHT (c) 1999 eXept Software AG |
|
30 |
All Rights Reserved |
|
31 |
||
32 |
This software is furnished under a license and may be used |
|
33 |
only in accordance with the terms of that license and with the |
|
34 |
inclusion of the above copyright notice. This software may not |
|
35 |
be provided or otherwise made available to, or used by, any |
|
36 |
other person. No title to or ownership of the software is |
|
37 |
hereby transferred. |
|
38 |
" |
|
39 |
||
40 |
! |
|
41 |
||
1287 | 42 |
documentation |
43 |
" |
|
44 |
needed sometimes, when a full application is embeded into an ExtendedComboBox |
|
45 |
or subcanvas AND you want to avoid, that this application accesses the outer |
|
4264 | 46 |
application's aspects (by returning a private application instance). |
1288 | 47 |
|
4264 | 48 |
Notice: you may have to manually set this view's application to be the embedded app |
1288 | 49 |
(i.e. via #application:) unless it is set by #client:.... |
1287 | 50 |
|
51 |
see self-embedding example in CodingExamples_GUI::GUIDemoExtendedComboBox |
|
52 |
" |
|
53 |
! |
|
54 |
||
55 |
examples |
|
56 |
" |
|
1715 | 57 |
see self-embedding example in CodingExamples_GUI::GUIDemoExtendedComboBox. |
2066 | 58 |
[exBegin] |
1715 | 59 |
|top sub app| |
60 |
||
61 |
top := StandardSystemView new. |
|
62 |
sub := ApplicationSubView new. |
|
63 |
||
64 |
app := FileBrowserV2 new. |
|
65 |
app createBuilder. |
|
66 |
app window:sub. |
|
67 |
sub client:app. |
|
68 |
||
69 |
top addSubView:sub. |
|
2066 | 70 |
sub origin:(0.1@0.1) corner:(0.9@0.9). |
1715 | 71 |
top open. |
2066 | 72 |
[exEnd] |
73 |
[exBegin] |
|
74 |
|top sub app| |
|
75 |
||
76 |
top := StandardSystemView new. |
|
77 |
sub := ApplicationSubView new. |
|
78 |
||
79 |
app := Tools::NewSystemBrowser new. |
|
80 |
app createBuilder. |
|
81 |
app window:sub. |
|
82 |
sub client:app. |
|
83 |
||
84 |
top addSubView:sub. |
|
85 |
sub origin:(0.1@0.1) corner:(0.9@0.9). |
|
86 |
top open. |
|
87 |
[exEnd] |
|
1287 | 88 |
" |
89 |
! ! |
|
90 |
||
91 |
!ApplicationSubView methodsFor:'accessing'! |
|
92 |
||
93 |
application |
|
94 |
"return the value of the instance variable 'application' (automatically generated)" |
|
95 |
||
1433 | 96 |
^ application |
97 |
! |
|
1287 | 98 |
|
99 |
application:something |
|
100 |
"set the value of the instance variable 'application' (automatically generated)" |
|
101 |
||
1433 | 102 |
application := something. |
103 |
! |
|
1288 | 104 |
|
2105
e68fca357a3a
can now control if specs menu is wanted or not
Claus Gittinger <cg@exept.de>
parents:
2066
diff
changeset
|
105 |
buildMenu:aBoolean |
e68fca357a3a
can now control if specs menu is wanted or not
Claus Gittinger <cg@exept.de>
parents:
2066
diff
changeset
|
106 |
"if true, the main menu is also built. Default is false" |
e68fca357a3a
can now control if specs menu is wanted or not
Claus Gittinger <cg@exept.de>
parents:
2066
diff
changeset
|
107 |
|
e68fca357a3a
can now control if specs menu is wanted or not
Claus Gittinger <cg@exept.de>
parents:
2066
diff
changeset
|
108 |
buildMenu := aBoolean. |
e68fca357a3a
can now control if specs menu is wanted or not
Claus Gittinger <cg@exept.de>
parents:
2066
diff
changeset
|
109 |
! |
e68fca357a3a
can now control if specs menu is wanted or not
Claus Gittinger <cg@exept.de>
parents:
2066
diff
changeset
|
110 |
|
1288 | 111 |
client:anApplication spec:aWindowSpecOrSpecSymbol builder:aBuilder |
2105
e68fca357a3a
can now control if specs menu is wanted or not
Claus Gittinger <cg@exept.de>
parents:
2066
diff
changeset
|
112 |
self |
e68fca357a3a
can now control if specs menu is wanted or not
Claus Gittinger <cg@exept.de>
parents:
2066
diff
changeset
|
113 |
client:anApplication |
e68fca357a3a
can now control if specs menu is wanted or not
Claus Gittinger <cg@exept.de>
parents:
2066
diff
changeset
|
114 |
spec:aWindowSpecOrSpecSymbol |
e68fca357a3a
can now control if specs menu is wanted or not
Claus Gittinger <cg@exept.de>
parents:
2066
diff
changeset
|
115 |
builder:aBuilder |
e68fca357a3a
can now control if specs menu is wanted or not
Claus Gittinger <cg@exept.de>
parents:
2066
diff
changeset
|
116 |
withMenu:(buildMenu ? false). |
e68fca357a3a
can now control if specs menu is wanted or not
Claus Gittinger <cg@exept.de>
parents:
2066
diff
changeset
|
117 |
! |
e68fca357a3a
can now control if specs menu is wanted or not
Claus Gittinger <cg@exept.de>
parents:
2066
diff
changeset
|
118 |
|
e68fca357a3a
can now control if specs menu is wanted or not
Claus Gittinger <cg@exept.de>
parents:
2066
diff
changeset
|
119 |
client:anApplication spec:aWindowSpecOrSpecSymbol builder:aBuilder withMenu:withMenu |
1288 | 120 |
self application:anApplication. |
2934 | 121 |
super client:anApplication spec:aWindowSpecOrSpecSymbol builder:aBuilder withMenu:withMenu. |
122 |
||
2935
c23f73a4b72e
changed: #client:spec:builder:withMenu:
Claus Gittinger <cg@exept.de>
parents:
2934
diff
changeset
|
123 |
"Modified: / 25-07-2011 / 17:51:22 / cg" |
1288 | 124 |
! ! |
1287 | 125 |
|
1433 | 126 |
!ApplicationSubView methodsFor:'events'! |
127 |
||
1460 | 128 |
destroy |
129 |
|app| |
|
130 |
||
131 |
(app := self application) notNil ifTrue:[ |
|
132 |
app ~~ self topView application ifTrue:[ |
|
133 |
app release |
|
134 |
] |
|
135 |
]. |
|
136 |
super destroy. |
|
137 |
||
138 |
! |
|
139 |
||
3298 | 140 |
preRealize |
141 |
|app| |
|
142 |
||
143 |
super preRealize. |
|
144 |
(app := self application) notNil ifTrue:[ |
|
145 |
app preOpenAsSubcanvasWith:app builder |
|
146 |
] |
|
147 |
||
148 |
"Created: / 05-03-2014 / 18:46:06 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
149 |
! |
|
150 |
||
1433 | 151 |
realize |
4151 | 152 |
|app window| |
1433 | 153 |
|
154 |
super realize. |
|
155 |
(app := self application) notNil ifTrue:[ |
|
4151 | 156 |
(window := app window) notNil ifTrue:[ |
157 |
window windowGroup isNil ifTrue:[ |
|
158 |
window windowGroup:self windowGroup. |
|
159 |
]. |
|
160 |
]. |
|
1433 | 161 |
app postOpenAsSubcanvasWith:app builder |
162 |
] |
|
4151 | 163 |
|
164 |
"Modified: / 29-07-2018 / 14:24:42 / Claus Gittinger" |
|
1433 | 165 |
! ! |
166 |
||
3007
3df2fbda9d7e
added: #isApplicationSubView
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2935
diff
changeset
|
167 |
!ApplicationSubView methodsFor:'testing'! |
3df2fbda9d7e
added: #isApplicationSubView
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2935
diff
changeset
|
168 |
|
3df2fbda9d7e
added: #isApplicationSubView
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2935
diff
changeset
|
169 |
isApplicationSubView |
3df2fbda9d7e
added: #isApplicationSubView
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2935
diff
changeset
|
170 |
^ true |
3df2fbda9d7e
added: #isApplicationSubView
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2935
diff
changeset
|
171 |
! ! |
3df2fbda9d7e
added: #isApplicationSubView
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2935
diff
changeset
|
172 |
|
1287 | 173 |
!ApplicationSubView class methodsFor:'documentation'! |
174 |
||
175 |
version |
|
4151 | 176 |
^ '$Header$' |
2935
c23f73a4b72e
changed: #client:spec:builder:withMenu:
Claus Gittinger <cg@exept.de>
parents:
2934
diff
changeset
|
177 |
! |
c23f73a4b72e
changed: #client:spec:builder:withMenu:
Claus Gittinger <cg@exept.de>
parents:
2934
diff
changeset
|
178 |
|
c23f73a4b72e
changed: #client:spec:builder:withMenu:
Claus Gittinger <cg@exept.de>
parents:
2934
diff
changeset
|
179 |
version_CVS |
4151 | 180 |
^ '$Header$' |
1287 | 181 |
! ! |
3298 | 182 |