author | Claus Gittinger <cg@exept.de> |
Mon, 25 Jul 2011 17:51:14 +0200 | |
changeset 2934 | 67900dc06f4a |
parent 2105 | e68fca357a3a |
child 2935 | c23f73a4b72e |
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 |
||
2934 | 87 |
!ApplicationSubView class methodsFor:'others'! |
88 |
||
89 |
version_CVS |
|
90 |
^ '$Header: /cvs/stx/stx/libview2/ApplicationSubView.st,v 1.9 2011-07-25 15:51:14 cg Exp $' |
|
91 |
! ! |
|
92 |
||
1287 | 93 |
!ApplicationSubView methodsFor:'accessing'! |
94 |
||
95 |
application |
|
96 |
"return the value of the instance variable 'application' (automatically generated)" |
|
97 |
||
1433 | 98 |
^ application |
99 |
! |
|
1287 | 100 |
|
101 |
application:something |
|
102 |
"set the value of the instance variable 'application' (automatically generated)" |
|
103 |
||
1433 | 104 |
application := something. |
105 |
! |
|
1288 | 106 |
|
2105
e68fca357a3a
can now control if specs menu is wanted or not
Claus Gittinger <cg@exept.de>
parents:
2066
diff
changeset
|
107 |
buildMenu:aBoolean |
e68fca357a3a
can now control if specs menu is wanted or not
Claus Gittinger <cg@exept.de>
parents:
2066
diff
changeset
|
108 |
"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
|
109 |
|
e68fca357a3a
can now control if specs menu is wanted or not
Claus Gittinger <cg@exept.de>
parents:
2066
diff
changeset
|
110 |
buildMenu := aBoolean. |
e68fca357a3a
can now control if specs menu is wanted or not
Claus Gittinger <cg@exept.de>
parents:
2066
diff
changeset
|
111 |
! |
e68fca357a3a
can now control if specs menu is wanted or not
Claus Gittinger <cg@exept.de>
parents:
2066
diff
changeset
|
112 |
|
1288 | 113 |
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
|
114 |
self |
e68fca357a3a
can now control if specs menu is wanted or not
Claus Gittinger <cg@exept.de>
parents:
2066
diff
changeset
|
115 |
client:anApplication |
e68fca357a3a
can now control if specs menu is wanted or not
Claus Gittinger <cg@exept.de>
parents:
2066
diff
changeset
|
116 |
spec:aWindowSpecOrSpecSymbol |
e68fca357a3a
can now control if specs menu is wanted or not
Claus Gittinger <cg@exept.de>
parents:
2066
diff
changeset
|
117 |
builder:aBuilder |
e68fca357a3a
can now control if specs menu is wanted or not
Claus Gittinger <cg@exept.de>
parents:
2066
diff
changeset
|
118 |
withMenu:(buildMenu ? false). |
e68fca357a3a
can now control if specs menu is wanted or not
Claus Gittinger <cg@exept.de>
parents:
2066
diff
changeset
|
119 |
! |
e68fca357a3a
can now control if specs menu is wanted or not
Claus Gittinger <cg@exept.de>
parents:
2066
diff
changeset
|
120 |
|
e68fca357a3a
can now control if specs menu is wanted or not
Claus Gittinger <cg@exept.de>
parents:
2066
diff
changeset
|
121 |
client:anApplication spec:aWindowSpecOrSpecSymbol builder:aBuilder withMenu:withMenu |
1288 | 122 |
self application:anApplication. |
2934 | 123 |
super client:anApplication spec:aWindowSpecOrSpecSymbol builder:aBuilder withMenu:withMenu. |
124 |
||
125 |
"/self halt. |
|
126 |
"/ aWindowSpecOrSpecSymbol class == FullSpec ifTrue:[ |
|
127 |
"/ "/ mhmh - should we take the attributes from the windowSpec or from my spec ???? |
|
128 |
"/ aWindowSpecOrSpecSymbol window setBackgroundColorAttributesIn:self with:aBuilder. |
|
129 |
"/ ]. |
|
130 |
anApplication postBuildWith:aBuilder. |
|
131 |
||
132 |
"Modified: / 25-07-2011 / 17:38:05 / cg" |
|
1288 | 133 |
! ! |
1287 | 134 |
|
1433 | 135 |
!ApplicationSubView methodsFor:'events'! |
136 |
||
1460 | 137 |
destroy |
138 |
|app| |
|
139 |
||
140 |
(app := self application) notNil ifTrue:[ |
|
141 |
app ~~ self topView application ifTrue:[ |
|
142 |
app release |
|
143 |
] |
|
144 |
]. |
|
145 |
super destroy. |
|
146 |
||
147 |
! |
|
148 |
||
1433 | 149 |
realize |
150 |
|app| |
|
151 |
||
152 |
super realize. |
|
153 |
(app := self application) notNil ifTrue:[ |
|
154 |
app postOpenAsSubcanvasWith:app builder |
|
155 |
] |
|
156 |
! ! |
|
157 |
||
1287 | 158 |
!ApplicationSubView class methodsFor:'documentation'! |
159 |
||
160 |
version |
|
2934 | 161 |
^ '$Header: /cvs/stx/stx/libview2/ApplicationSubView.st,v 1.9 2011-07-25 15:51:14 cg Exp $' |
1287 | 162 |
! ! |