author | Claus Gittinger <cg@exept.de> |
Tue, 10 Oct 2006 22:11:19 +0200 | |
changeset 2244 | 99a72edca7ee |
parent 2105 | e68fca357a3a |
child 2934 | 67900dc06f4a |
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 |
" |
|
12 |
||
13 |
||
1433 | 14 |
"{ Package: 'stx:libview2' }" |
15 |
||
1287 | 16 |
View subclass:#ApplicationSubView |
2105
e68fca357a3a
can now control if specs menu is wanted or not
Claus Gittinger <cg@exept.de>
parents:
2066
diff
changeset
|
17 |
instanceVariableNames:'application buildMenu' |
1287 | 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 |
|
2105
e68fca357a3a
can now control if specs menu is wanted or not
Claus Gittinger <cg@exept.de>
parents:
2066
diff
changeset
|
103 |
buildMenu:aBoolean |
e68fca357a3a
can now control if specs menu is wanted or not
Claus Gittinger <cg@exept.de>
parents:
2066
diff
changeset
|
104 |
"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
|
105 |
|
e68fca357a3a
can now control if specs menu is wanted or not
Claus Gittinger <cg@exept.de>
parents:
2066
diff
changeset
|
106 |
buildMenu := aBoolean. |
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 |
|
1288 | 109 |
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
|
110 |
self |
e68fca357a3a
can now control if specs menu is wanted or not
Claus Gittinger <cg@exept.de>
parents:
2066
diff
changeset
|
111 |
client:anApplication |
e68fca357a3a
can now control if specs menu is wanted or not
Claus Gittinger <cg@exept.de>
parents:
2066
diff
changeset
|
112 |
spec:aWindowSpecOrSpecSymbol |
e68fca357a3a
can now control if specs menu is wanted or not
Claus Gittinger <cg@exept.de>
parents:
2066
diff
changeset
|
113 |
builder:aBuilder |
e68fca357a3a
can now control if specs menu is wanted or not
Claus Gittinger <cg@exept.de>
parents:
2066
diff
changeset
|
114 |
withMenu:(buildMenu ? false). |
e68fca357a3a
can now control if specs menu is wanted or not
Claus Gittinger <cg@exept.de>
parents:
2066
diff
changeset
|
115 |
! |
e68fca357a3a
can now control if specs menu is wanted or not
Claus Gittinger <cg@exept.de>
parents:
2066
diff
changeset
|
116 |
|
e68fca357a3a
can now control if specs menu is wanted or not
Claus Gittinger <cg@exept.de>
parents:
2066
diff
changeset
|
117 |
client:anApplication spec:aWindowSpecOrSpecSymbol builder:aBuilder withMenu:withMenu |
1288 | 118 |
self application:anApplication. |
2105
e68fca357a3a
can now control if specs menu is wanted or not
Claus Gittinger <cg@exept.de>
parents:
2066
diff
changeset
|
119 |
^ super client:anApplication spec:aWindowSpecOrSpecSymbol builder:aBuilder withMenu:withMenu |
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 |
||
1433 | 136 |
realize |
137 |
|app| |
|
138 |
||
139 |
super realize. |
|
140 |
(app := self application) notNil ifTrue:[ |
|
141 |
app postOpenAsSubcanvasWith:app builder |
|
142 |
] |
|
143 |
! ! |
|
144 |
||
1287 | 145 |
!ApplicationSubView class methodsFor:'documentation'! |
146 |
||
147 |
version |
|
2105
e68fca357a3a
can now control if specs menu is wanted or not
Claus Gittinger <cg@exept.de>
parents:
2066
diff
changeset
|
148 |
^ '$Header: /cvs/stx/stx/libview2/ApplicationSubView.st,v 1.8 2006-02-15 21:01:33 cg Exp $' |
1287 | 149 |
! ! |