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