author | Claus Gittinger <cg@exept.de> |
Mon, 25 Oct 2004 15:08:47 +0200 | |
changeset 4320 | 9bc8c69c8d4e |
parent 4319 | 81b13632542f |
child 4321 | f65178d64901 |
permissions | -rw-r--r-- |
0 | 1 |
" |
6 | 2 |
COPYRIGHT (c) 1989 by Claus Gittinger |
72 | 3 |
All Rights Reserved |
0 | 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 |
||
3210 | 13 |
"{ Package: 'stx:libview' }" |
14 |
||
135 | 15 |
TopView subclass:#StandardSystemView |
1539 | 16 |
instanceVariableNames:'label icon iconView iconLabel minExtent maxExtent sizeFixed |
3408
42384f123133
Add labelChannel and visibilityChannel to WindowSpec/StandardSystemView
Stefan Vogel <sv@exept.de>
parents:
3393
diff
changeset
|
17 |
application windowEventsForApplication deviceIcon labelChannel' |
2326 | 18 |
classVariableNames:'DefaultIcon IncludeHostNameInLabel DefaultExtent |
2651
8f800d7bcee3
send minExtend/maxExtend changes down to the device.
Claus Gittinger <cg@exept.de>
parents:
2644
diff
changeset
|
19 |
WindowLabelFormat DefaultMinExtent' |
328 | 20 |
poolDictionaries:'' |
21 |
category:'Views-Basic' |
|
0 | 22 |
! |
23 |
||
46 | 24 |
!StandardSystemView class methodsFor:'documentation'! |
25 |
||
26 |
copyright |
|
27 |
" |
|
28 |
COPYRIGHT (c) 1989 by Claus Gittinger |
|
72 | 29 |
All Rights Reserved |
0 | 30 |
|
46 | 31 |
This software is furnished under a license and may be used |
32 |
only in accordance with the terms of that license and with the |
|
33 |
inclusion of the above copyright notice. This software may not |
|
34 |
be provided or otherwise made available to, or used by, any |
|
35 |
other person. No title to or ownership of the software is |
|
36 |
hereby transferred. |
|
37 |
" |
|
38 |
! |
|
0 | 39 |
|
46 | 40 |
documentation |
41 |
" |
|
625
4d8f6dc3af75
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
621
diff
changeset
|
42 |
I represent standard application topViews |
4d8f6dc3af75
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
621
diff
changeset
|
43 |
i.e. those views which have a title-label, an icon etc. |
4d8f6dc3af75
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
621
diff
changeset
|
44 |
|
4d8f6dc3af75
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
621
diff
changeset
|
45 |
The name `StandardSystemView' is probably misleading and |
4d8f6dc3af75
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
621
diff
changeset
|
46 |
results from ST-80 (rel2.x) compatibility reasons. |
857
df5125310d86
New method #setWindowClass:name:in: to give a hint to the window manager.
Stefan Vogel <sv@exept.de>
parents:
827
diff
changeset
|
47 |
Think of it as an ApplicationWindow. |
625
4d8f6dc3af75
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
621
diff
changeset
|
48 |
|
4d8f6dc3af75
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
621
diff
changeset
|
49 |
|
604
672ecb7ec347
fixed iconView handling (thought it was not realized); comments & docu
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
50 |
In ST/X, StandardSystemViews were subclassed for special views |
672ecb7ec347
fixed iconView handling (thought it was not realized); comments & docu
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
51 |
in the past (for example: FileBrowser, ChangesBrowser etc.). |
672ecb7ec347
fixed iconView handling (thought it was not realized); comments & docu
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
52 |
Although this worked, it may lead to the following |
672ecb7ec347
fixed iconView handling (thought it was not realized); comments & docu
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
53 |
problems and inconveniences: |
2303 | 54 |
- applications inherit a big number of methods through the |
55 |
SimpleView->View->TopView->StandardSystemView hierarchy. |
|
56 |
There is quite a danger that by accident, some method gets |
|
57 |
redefined which is required by one of those classes. |
|
58 |
(typical candidates are: terminate, destroy, open ...) |
|
59 |
This may lead to strange effects, which may not be obvious to |
|
60 |
non experts ... |
|
604
672ecb7ec347
fixed iconView handling (thought it was not realized); comments & docu
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
61 |
|
2303 | 62 |
- applications with multiple topViews are difficult to implement |
63 |
and manage. |
|
604
672ecb7ec347
fixed iconView handling (thought it was not realized); comments & docu
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
64 |
|
2303 | 65 |
- use of a windowBuilder is difficult. |
604
672ecb7ec347
fixed iconView handling (thought it was not realized); comments & docu
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
66 |
|
672ecb7ec347
fixed iconView handling (thought it was not realized); comments & docu
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
67 |
For all those reasons, we HIGHLY recommend to NOT define applications |
672ecb7ec347
fixed iconView handling (thought it was not realized); comments & docu
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
68 |
as subclasses of StandardSystemView, but instead base them on |
672ecb7ec347
fixed iconView handling (thought it was not realized); comments & docu
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
69 |
ApplicationModel, and reference the topView(s) as instance variables of |
672ecb7ec347
fixed iconView handling (thought it was not realized); comments & docu
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
70 |
if (if at all). |
672ecb7ec347
fixed iconView handling (thought it was not realized); comments & docu
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
71 |
|
672ecb7ec347
fixed iconView handling (thought it was not realized); comments & docu
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
72 |
[instance variables:] |
2303 | 73 |
label <String> the label in the windows title |
604
672ecb7ec347
fixed iconView handling (thought it was not realized); comments & docu
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
74 |
|
2303 | 75 |
icon <Form> the icon |
76 |
[ignored if the display does not |
|
77 |
support icons] |
|
604
672ecb7ec347
fixed iconView handling (thought it was not realized); comments & docu
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
78 |
|
2303 | 79 |
iconView <View> an optional icon-view (for animated icons) |
80 |
[ignored if the display does not |
|
81 |
supports this] |
|
604
672ecb7ec347
fixed iconView handling (thought it was not realized); comments & docu
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
82 |
|
2303 | 83 |
iconLabel <String> the label in the icon |
84 |
[ignored if the display does not |
|
85 |
support label-tabs with icons] |
|
604
672ecb7ec347
fixed iconView handling (thought it was not realized); comments & docu
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
86 |
|
2303 | 87 |
minExtent <Point> the minimum size |
88 |
No limit, if nil |
|
89 |
[the window manager may have its own |
|
90 |
limit; typically some small area] |
|
604
672ecb7ec347
fixed iconView handling (thought it was not realized); comments & docu
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
91 |
|
2303 | 92 |
maxExtent <Point> the maximum size |
93 |
No limit, if nil. |
|
94 |
[the window manager may have its own |
|
95 |
limit; typically the screen size] |
|
604
672ecb7ec347
fixed iconView handling (thought it was not realized); comments & docu
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
96 |
|
2303 | 97 |
sizeFixed <Boolean> prevents the view from resizing itself |
98 |
(especially to freeze a dialogs size) |
|
604
672ecb7ec347
fixed iconView handling (thought it was not realized); comments & docu
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
99 |
|
2303 | 100 |
application <AppModel> if nonNil, thats the application |
101 |
Many requests (such as open/close etc. |
|
102 |
are forwarded to it, if present. |
|
604
672ecb7ec347
fixed iconView handling (thought it was not realized); comments & docu
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
103 |
|
672ecb7ec347
fixed iconView handling (thought it was not realized); comments & docu
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
104 |
|
672ecb7ec347
fixed iconView handling (thought it was not realized); comments & docu
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
105 |
|
672ecb7ec347
fixed iconView handling (thought it was not realized); comments & docu
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
106 |
[class variables:] |
672ecb7ec347
fixed iconView handling (thought it was not realized); comments & docu
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
107 |
|
2303 | 108 |
DefaultIcon <Form> cached default icon |
1878
76e9bc8e1b9c
new hostName in label format
Claus Gittinger <cg@exept.de>
parents:
1865
diff
changeset
|
109 |
|
2303 | 110 |
TakeFocusWhenMapped <Boolean> if true, views grab the keyboard |
111 |
focus (convenient with some stupid |
|
112 |
windowManagers) |
|
604
672ecb7ec347
fixed iconView handling (thought it was not realized); comments & docu
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
113 |
|
2303 | 114 |
IncludeHostNameInLabel <Boolean> if true, the windows title shall |
115 |
include the hostname. |
|
116 |
(convenient if you have many remote |
|
117 |
views open simultaneously) |
|
604
672ecb7ec347
fixed iconView handling (thought it was not realized); comments & docu
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
118 |
|
2303 | 119 |
WindowLabelFormat <Boolean> specifies the format for windowLabels |
1880
2900f8770585
more flexible windowLabel formats.
Claus Gittinger <cg@exept.de>
parents:
1878
diff
changeset
|
120 |
|
616 | 121 |
|
122 |
[author:] |
|
2303 | 123 |
Claus Gittinger |
616 | 124 |
|
604
672ecb7ec347
fixed iconView handling (thought it was not realized); comments & docu
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
125 |
[see also:] |
2303 | 126 |
WindowGroup |
127 |
ApplicationModel |
|
604
672ecb7ec347
fixed iconView handling (thought it was not realized); comments & docu
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
128 |
" |
1880
2900f8770585
more flexible windowLabel formats.
Claus Gittinger <cg@exept.de>
parents:
1878
diff
changeset
|
129 |
|
604
672ecb7ec347
fixed iconView handling (thought it was not realized); comments & docu
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
130 |
! |
672ecb7ec347
fixed iconView handling (thought it was not realized); comments & docu
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
131 |
|
672ecb7ec347
fixed iconView handling (thought it was not realized); comments & docu
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
132 |
examples |
672ecb7ec347
fixed iconView handling (thought it was not realized); comments & docu
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
133 |
" |
672ecb7ec347
fixed iconView handling (thought it was not realized); comments & docu
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
134 |
simple, empty topView: |
1696
ba6085a629e0
replaced isPopUp flag in #createWindow by a more general #style symbol argument
Claus Gittinger <cg@exept.de>
parents:
1612
diff
changeset
|
135 |
[exBegin] |
ba6085a629e0
replaced isPopUp flag in #createWindow by a more general #style symbol argument
Claus Gittinger <cg@exept.de>
parents:
1612
diff
changeset
|
136 |
|topView| |
604
672ecb7ec347
fixed iconView handling (thought it was not realized); comments & docu
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
137 |
|
1696
ba6085a629e0
replaced isPopUp flag in #createWindow by a more general #style symbol argument
Claus Gittinger <cg@exept.de>
parents:
1612
diff
changeset
|
138 |
topView := StandardSystemView new. |
ba6085a629e0
replaced isPopUp flag in #createWindow by a more general #style symbol argument
Claus Gittinger <cg@exept.de>
parents:
1612
diff
changeset
|
139 |
topView label:'my first view'. |
ba6085a629e0
replaced isPopUp flag in #createWindow by a more general #style symbol argument
Claus Gittinger <cg@exept.de>
parents:
1612
diff
changeset
|
140 |
topView extent:200 @ 200. |
ba6085a629e0
replaced isPopUp flag in #createWindow by a more general #style symbol argument
Claus Gittinger <cg@exept.de>
parents:
1612
diff
changeset
|
141 |
topView open. |
ba6085a629e0
replaced isPopUp flag in #createWindow by a more general #style symbol argument
Claus Gittinger <cg@exept.de>
parents:
1612
diff
changeset
|
142 |
[exEnd] |
604
672ecb7ec347
fixed iconView handling (thought it was not realized); comments & docu
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
143 |
|
672ecb7ec347
fixed iconView handling (thought it was not realized); comments & docu
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
144 |
with an icon & iconLabel: |
1696
ba6085a629e0
replaced isPopUp flag in #createWindow by a more general #style symbol argument
Claus Gittinger <cg@exept.de>
parents:
1612
diff
changeset
|
145 |
[exBegin] |
ba6085a629e0
replaced isPopUp flag in #createWindow by a more general #style symbol argument
Claus Gittinger <cg@exept.de>
parents:
1612
diff
changeset
|
146 |
|topView| |
604
672ecb7ec347
fixed iconView handling (thought it was not realized); comments & docu
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
147 |
|
1696
ba6085a629e0
replaced isPopUp flag in #createWindow by a more general #style symbol argument
Claus Gittinger <cg@exept.de>
parents:
1612
diff
changeset
|
148 |
topView := StandardSystemView extent:200 @ 200. |
ba6085a629e0
replaced isPopUp flag in #createWindow by a more general #style symbol argument
Claus Gittinger <cg@exept.de>
parents:
1612
diff
changeset
|
149 |
topView label:'Hello world'. |
604
672ecb7ec347
fixed iconView handling (thought it was not realized); comments & docu
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
150 |
|
1696
ba6085a629e0
replaced isPopUp flag in #createWindow by a more general #style symbol argument
Claus Gittinger <cg@exept.de>
parents:
1612
diff
changeset
|
151 |
topView icon:(Image fromFile:'hello_world.icon'). |
ba6085a629e0
replaced isPopUp flag in #createWindow by a more general #style symbol argument
Claus Gittinger <cg@exept.de>
parents:
1612
diff
changeset
|
152 |
topView open. |
ba6085a629e0
replaced isPopUp flag in #createWindow by a more general #style symbol argument
Claus Gittinger <cg@exept.de>
parents:
1612
diff
changeset
|
153 |
[exEnd] |
604
672ecb7ec347
fixed iconView handling (thought it was not realized); comments & docu
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
154 |
|
672ecb7ec347
fixed iconView handling (thought it was not realized); comments & docu
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
155 |
|
672ecb7ec347
fixed iconView handling (thought it was not realized); comments & docu
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
156 |
with an animated iconView [not supported on all display devices]: |
1696
ba6085a629e0
replaced isPopUp flag in #createWindow by a more general #style symbol argument
Claus Gittinger <cg@exept.de>
parents:
1612
diff
changeset
|
157 |
[exBegin] |
ba6085a629e0
replaced isPopUp flag in #createWindow by a more general #style symbol argument
Claus Gittinger <cg@exept.de>
parents:
1612
diff
changeset
|
158 |
|iconView topView| |
604
672ecb7ec347
fixed iconView handling (thought it was not realized); comments & docu
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
159 |
|
1696
ba6085a629e0
replaced isPopUp flag in #createWindow by a more general #style symbol argument
Claus Gittinger <cg@exept.de>
parents:
1612
diff
changeset
|
160 |
iconView := ClockView new. |
604
672ecb7ec347
fixed iconView handling (thought it was not realized); comments & docu
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
161 |
|
1696
ba6085a629e0
replaced isPopUp flag in #createWindow by a more general #style symbol argument
Claus Gittinger <cg@exept.de>
parents:
1612
diff
changeset
|
162 |
topView := StandardSystemView extent:200 @ 200. |
ba6085a629e0
replaced isPopUp flag in #createWindow by a more general #style symbol argument
Claus Gittinger <cg@exept.de>
parents:
1612
diff
changeset
|
163 |
topView label:'Hello world'. |
604
672ecb7ec347
fixed iconView handling (thought it was not realized); comments & docu
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
164 |
|
1696
ba6085a629e0
replaced isPopUp flag in #createWindow by a more general #style symbol argument
Claus Gittinger <cg@exept.de>
parents:
1612
diff
changeset
|
165 |
topView iconView:iconView. |
ba6085a629e0
replaced isPopUp flag in #createWindow by a more general #style symbol argument
Claus Gittinger <cg@exept.de>
parents:
1612
diff
changeset
|
166 |
topView open. |
ba6085a629e0
replaced isPopUp flag in #createWindow by a more general #style symbol argument
Claus Gittinger <cg@exept.de>
parents:
1612
diff
changeset
|
167 |
[exEnd] |
604
672ecb7ec347
fixed iconView handling (thought it was not realized); comments & docu
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
168 |
|
672ecb7ec347
fixed iconView handling (thought it was not realized); comments & docu
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
169 |
|
672ecb7ec347
fixed iconView handling (thought it was not realized); comments & docu
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
170 |
placing a subView into it: |
1696
ba6085a629e0
replaced isPopUp flag in #createWindow by a more general #style symbol argument
Claus Gittinger <cg@exept.de>
parents:
1612
diff
changeset
|
171 |
[exBegin] |
ba6085a629e0
replaced isPopUp flag in #createWindow by a more general #style symbol argument
Claus Gittinger <cg@exept.de>
parents:
1612
diff
changeset
|
172 |
|topView button| |
604
672ecb7ec347
fixed iconView handling (thought it was not realized); comments & docu
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
173 |
|
1696
ba6085a629e0
replaced isPopUp flag in #createWindow by a more general #style symbol argument
Claus Gittinger <cg@exept.de>
parents:
1612
diff
changeset
|
174 |
topView := StandardSystemView new. |
ba6085a629e0
replaced isPopUp flag in #createWindow by a more general #style symbol argument
Claus Gittinger <cg@exept.de>
parents:
1612
diff
changeset
|
175 |
topView label:'my second view'. |
ba6085a629e0
replaced isPopUp flag in #createWindow by a more general #style symbol argument
Claus Gittinger <cg@exept.de>
parents:
1612
diff
changeset
|
176 |
topView extent:200 @ 200. |
604
672ecb7ec347
fixed iconView handling (thought it was not realized); comments & docu
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
177 |
|
1696
ba6085a629e0
replaced isPopUp flag in #createWindow by a more general #style symbol argument
Claus Gittinger <cg@exept.de>
parents:
1612
diff
changeset
|
178 |
button := Button label:'close' in:topView. |
ba6085a629e0
replaced isPopUp flag in #createWindow by a more general #style symbol argument
Claus Gittinger <cg@exept.de>
parents:
1612
diff
changeset
|
179 |
button action:[topView destroy]. |
604
672ecb7ec347
fixed iconView handling (thought it was not realized); comments & docu
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
180 |
|
1696
ba6085a629e0
replaced isPopUp flag in #createWindow by a more general #style symbol argument
Claus Gittinger <cg@exept.de>
parents:
1612
diff
changeset
|
181 |
topView open. |
ba6085a629e0
replaced isPopUp flag in #createWindow by a more general #style symbol argument
Claus Gittinger <cg@exept.de>
parents:
1612
diff
changeset
|
182 |
[exEnd] |
604
672ecb7ec347
fixed iconView handling (thought it was not realized); comments & docu
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
183 |
|
672ecb7ec347
fixed iconView handling (thought it was not realized); comments & docu
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
184 |
same, relative sized subview: |
1696
ba6085a629e0
replaced isPopUp flag in #createWindow by a more general #style symbol argument
Claus Gittinger <cg@exept.de>
parents:
1612
diff
changeset
|
185 |
[exBegin] |
ba6085a629e0
replaced isPopUp flag in #createWindow by a more general #style symbol argument
Claus Gittinger <cg@exept.de>
parents:
1612
diff
changeset
|
186 |
|topView button| |
604
672ecb7ec347
fixed iconView handling (thought it was not realized); comments & docu
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
187 |
|
1696
ba6085a629e0
replaced isPopUp flag in #createWindow by a more general #style symbol argument
Claus Gittinger <cg@exept.de>
parents:
1612
diff
changeset
|
188 |
topView := StandardSystemView new. |
ba6085a629e0
replaced isPopUp flag in #createWindow by a more general #style symbol argument
Claus Gittinger <cg@exept.de>
parents:
1612
diff
changeset
|
189 |
topView label:'my second view'. |
ba6085a629e0
replaced isPopUp flag in #createWindow by a more general #style symbol argument
Claus Gittinger <cg@exept.de>
parents:
1612
diff
changeset
|
190 |
topView extent:200 @ 200. |
604
672ecb7ec347
fixed iconView handling (thought it was not realized); comments & docu
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
191 |
|
1696
ba6085a629e0
replaced isPopUp flag in #createWindow by a more general #style symbol argument
Claus Gittinger <cg@exept.de>
parents:
1612
diff
changeset
|
192 |
button := Button label:'close' in:topView. |
ba6085a629e0
replaced isPopUp flag in #createWindow by a more general #style symbol argument
Claus Gittinger <cg@exept.de>
parents:
1612
diff
changeset
|
193 |
button action:[topView destroy]. |
ba6085a629e0
replaced isPopUp flag in #createWindow by a more general #style symbol argument
Claus Gittinger <cg@exept.de>
parents:
1612
diff
changeset
|
194 |
button origin:0.25 @ 0.25 corner:0.75 @ 0.75. |
604
672ecb7ec347
fixed iconView handling (thought it was not realized); comments & docu
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
195 |
|
1696
ba6085a629e0
replaced isPopUp flag in #createWindow by a more general #style symbol argument
Claus Gittinger <cg@exept.de>
parents:
1612
diff
changeset
|
196 |
topView open. |
ba6085a629e0
replaced isPopUp flag in #createWindow by a more general #style symbol argument
Claus Gittinger <cg@exept.de>
parents:
1612
diff
changeset
|
197 |
[exEnd] |
604
672ecb7ec347
fixed iconView handling (thought it was not realized); comments & docu
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
198 |
|
672ecb7ec347
fixed iconView handling (thought it was not realized); comments & docu
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
199 |
multiple buttons in a panel in a topView: |
1696
ba6085a629e0
replaced isPopUp flag in #createWindow by a more general #style symbol argument
Claus Gittinger <cg@exept.de>
parents:
1612
diff
changeset
|
200 |
[exBegin] |
ba6085a629e0
replaced isPopUp flag in #createWindow by a more general #style symbol argument
Claus Gittinger <cg@exept.de>
parents:
1612
diff
changeset
|
201 |
|topView panel button1 button2 button3| |
604
672ecb7ec347
fixed iconView handling (thought it was not realized); comments & docu
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
202 |
|
1696
ba6085a629e0
replaced isPopUp flag in #createWindow by a more general #style symbol argument
Claus Gittinger <cg@exept.de>
parents:
1612
diff
changeset
|
203 |
topView := StandardSystemView new. |
ba6085a629e0
replaced isPopUp flag in #createWindow by a more general #style symbol argument
Claus Gittinger <cg@exept.de>
parents:
1612
diff
changeset
|
204 |
topView label:'my second view'. |
ba6085a629e0
replaced isPopUp flag in #createWindow by a more general #style symbol argument
Claus Gittinger <cg@exept.de>
parents:
1612
diff
changeset
|
205 |
topView extent:200 @ 200. |
604
672ecb7ec347
fixed iconView handling (thought it was not realized); comments & docu
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
206 |
|
1696
ba6085a629e0
replaced isPopUp flag in #createWindow by a more general #style symbol argument
Claus Gittinger <cg@exept.de>
parents:
1612
diff
changeset
|
207 |
panel := HorizontalPanelView origin:0.0@0.0 corner:1.0@1.0 in:topView. |
ba6085a629e0
replaced isPopUp flag in #createWindow by a more general #style symbol argument
Claus Gittinger <cg@exept.de>
parents:
1612
diff
changeset
|
208 |
panel inset:10. |
ba6085a629e0
replaced isPopUp flag in #createWindow by a more general #style symbol argument
Claus Gittinger <cg@exept.de>
parents:
1612
diff
changeset
|
209 |
panel level:-1. |
604
672ecb7ec347
fixed iconView handling (thought it was not realized); comments & docu
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
210 |
|
1696
ba6085a629e0
replaced isPopUp flag in #createWindow by a more general #style symbol argument
Claus Gittinger <cg@exept.de>
parents:
1612
diff
changeset
|
211 |
button1 := Button label:'one' in:panel. |
ba6085a629e0
replaced isPopUp flag in #createWindow by a more general #style symbol argument
Claus Gittinger <cg@exept.de>
parents:
1612
diff
changeset
|
212 |
button1 action:[Transcript showCR:'one pressed']. |
604
672ecb7ec347
fixed iconView handling (thought it was not realized); comments & docu
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
213 |
|
1696
ba6085a629e0
replaced isPopUp flag in #createWindow by a more general #style symbol argument
Claus Gittinger <cg@exept.de>
parents:
1612
diff
changeset
|
214 |
button2 := Button label:'two' in:panel. |
ba6085a629e0
replaced isPopUp flag in #createWindow by a more general #style symbol argument
Claus Gittinger <cg@exept.de>
parents:
1612
diff
changeset
|
215 |
button2 action:[Transcript showCR:'two pressed']. |
604
672ecb7ec347
fixed iconView handling (thought it was not realized); comments & docu
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
216 |
|
1696
ba6085a629e0
replaced isPopUp flag in #createWindow by a more general #style symbol argument
Claus Gittinger <cg@exept.de>
parents:
1612
diff
changeset
|
217 |
button3 := Button label:'three' in:panel. |
ba6085a629e0
replaced isPopUp flag in #createWindow by a more general #style symbol argument
Claus Gittinger <cg@exept.de>
parents:
1612
diff
changeset
|
218 |
button3 action:[Transcript showCR:'three pressed']. |
604
672ecb7ec347
fixed iconView handling (thought it was not realized); comments & docu
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
219 |
|
1696
ba6085a629e0
replaced isPopUp flag in #createWindow by a more general #style symbol argument
Claus Gittinger <cg@exept.de>
parents:
1612
diff
changeset
|
220 |
topView open. |
ba6085a629e0
replaced isPopUp flag in #createWindow by a more general #style symbol argument
Claus Gittinger <cg@exept.de>
parents:
1612
diff
changeset
|
221 |
[exEnd] |
46 | 222 |
" |
223 |
! ! |
|
0 | 224 |
|
269 | 225 |
!StandardSystemView class methodsFor:'instance creation'! |
183 | 226 |
|
269 | 227 |
extent:anExtent label:aLabel icon:aForm |
228 |
"create a new topView and define its extent, label and icon" |
|
180 | 229 |
|
269 | 230 |
^ self origin:nil extent:anExtent |
231 |
label:aLabel icon:aForm |
|
232 |
minExtent:nil maxExtent:nil |
|
81 | 233 |
! |
234 |
||
269 | 235 |
extent:anExtent label:aLabel icon:aForm minExtent:minExtent |
236 |
^ self origin:nil extent:anExtent |
|
237 |
label:aLabel icon:aForm |
|
238 |
minExtent:minExtent maxExtent:nil |
|
46 | 239 |
! |
240 |
||
269 | 241 |
extent:anExtent label:aLabel icon:aForm minExtent:minExtent maxExtent:maxExtent |
242 |
^ self origin:nil extent:anExtent |
|
243 |
label:aLabel icon:aForm |
|
244 |
minExtent:minExtent maxExtent:maxExtent |
|
245 |
! |
|
0 | 246 |
|
269 | 247 |
extent:anExtent label:aLabel minExtent:minExtent |
248 |
"create a new topView and define its extent, label and minumum extent" |
|
0 | 249 |
|
269 | 250 |
^ self origin:nil extent:anExtent |
251 |
label:aLabel icon:nil |
|
252 |
minExtent:minExtent maxExtent:nil |
|
0 | 253 |
! |
254 |
||
255 |
label:aLabel |
|
256 |
"create a new topView and define its label" |
|
257 |
||
258 |
^ self origin:nil extent:nil |
|
72 | 259 |
label:aLabel icon:nil |
260 |
minExtent:nil maxExtent:nil |
|
0 | 261 |
! |
262 |
||
263 |
label:aLabel icon:aForm |
|
81 | 264 |
"create a new topView and define its label and icon" |
265 |
||
0 | 266 |
^ self origin:nil extent:nil |
72 | 267 |
label:aLabel icon:aForm |
268 |
minExtent:nil maxExtent:nil |
|
0 | 269 |
! |
270 |
||
271 |
label:aLabel icon:aForm minExtent:anExtent |
|
81 | 272 |
"create a new topView and define its label, icon and minumum extent" |
273 |
||
0 | 274 |
^ self origin:nil extent:nil |
72 | 275 |
label:aLabel icon:aForm |
276 |
minExtent:anExtent maxExtent:nil |
|
0 | 277 |
! |
278 |
||
279 |
label:aLabel icon:aForm minExtent:minExtent maxExtent:maxExtent |
|
81 | 280 |
"create a new topView and define its label, icon, min and max extents" |
281 |
||
0 | 282 |
^ self origin:nil extent:nil |
72 | 283 |
label:aLabel icon:aForm |
284 |
minExtent:minExtent maxExtent:maxExtent |
|
0 | 285 |
! |
286 |
||
269 | 287 |
label:aLabel minExtent:anExtent |
288 |
"create a new topView and define its label and minimum extent" |
|
289 |
||
290 |
^ self origin:nil extent:nil |
|
291 |
label:aLabel icon:nil |
|
292 |
minExtent:anExtent maxExtent:nil |
|
293 |
! |
|
294 |
||
295 |
model:aModel label:aLabel minimumSize:minExtent |
|
296 |
"ST80-style instance creation" |
|
297 |
||
298 |
|newView| |
|
299 |
||
300 |
newView := self origin:nil |
|
301 |
extent:minExtent |
|
302 |
label:aLabel |
|
303 |
icon:nil |
|
304 |
minExtent:minExtent |
|
305 |
maxExtent:nil. |
|
306 |
newView model:aModel. |
|
307 |
"/ newView controller:(self defaultControllerClass new view:newView). |
|
308 |
^ newView |
|
309 |
! |
|
310 |
||
0 | 311 |
origin:anOrigin extent:anExtent label:aLabel |
81 | 312 |
"create a new topView and define its origin, extent and label" |
313 |
||
0 | 314 |
^ self origin:anOrigin extent:anExtent |
72 | 315 |
label:aLabel icon:nil |
316 |
minExtent:nil maxExtent:nil |
|
0 | 317 |
! |
318 |
||
319 |
origin:anOrigin label:aLabel icon:aForm |
|
72 | 320 |
minExtent:minExtent maxExtent:maxExtent |
81 | 321 |
"create a new topView and define its origin, extent, label, icon |
322 |
and extent-boundaries." |
|
323 |
||
0 | 324 |
^ self origin:anOrigin extent:nil |
72 | 325 |
label:aLabel icon:aForm |
326 |
minExtent:minExtent maxExtent:maxExtent |
|
269 | 327 |
! ! |
328 |
||
1878
76e9bc8e1b9c
new hostName in label format
Claus Gittinger <cg@exept.de>
parents:
1865
diff
changeset
|
329 |
!StandardSystemView class methodsFor:'class initialization'! |
76e9bc8e1b9c
new hostName in label format
Claus Gittinger <cg@exept.de>
parents:
1865
diff
changeset
|
330 |
|
76e9bc8e1b9c
new hostName in label format
Claus Gittinger <cg@exept.de>
parents:
1865
diff
changeset
|
331 |
initialize |
76e9bc8e1b9c
new hostName in label format
Claus Gittinger <cg@exept.de>
parents:
1865
diff
changeset
|
332 |
IncludeHostNameInLabel := false. |
3463 | 333 |
WindowLabelFormat := self defaultWindowLabelFormat. |
2272
a355b3aaf38d
make takeFocusWhenMapped standard on win32 platforms
Claus Gittinger <cg@exept.de>
parents:
2218
diff
changeset
|
334 |
|
2283 | 335 |
TakeFocusWhenMapped := (Display notNil and:[Display platformName = 'WIN32']). |
1878
76e9bc8e1b9c
new hostName in label format
Claus Gittinger <cg@exept.de>
parents:
1865
diff
changeset
|
336 |
|
2272
a355b3aaf38d
make takeFocusWhenMapped standard on win32 platforms
Claus Gittinger <cg@exept.de>
parents:
2218
diff
changeset
|
337 |
"Created: / 20.8.1997 / 14:16:32 / cg" |
a355b3aaf38d
make takeFocusWhenMapped standard on win32 platforms
Claus Gittinger <cg@exept.de>
parents:
2218
diff
changeset
|
338 |
"Modified: / 24.8.1998 / 17:16:33 / cg" |
1878
76e9bc8e1b9c
new hostName in label format
Claus Gittinger <cg@exept.de>
parents:
1865
diff
changeset
|
339 |
! ! |
76e9bc8e1b9c
new hostName in label format
Claus Gittinger <cg@exept.de>
parents:
1865
diff
changeset
|
340 |
|
269 | 341 |
!StandardSystemView class methodsFor:'defaults'! |
342 |
||
1865
43c2eaba229d
allow default topViews extends to be overwritten by styleSheet
Claus Gittinger <cg@exept.de>
parents:
1830
diff
changeset
|
343 |
defaultExtent |
43c2eaba229d
allow default topViews extends to be overwritten by styleSheet
Claus Gittinger <cg@exept.de>
parents:
1830
diff
changeset
|
344 |
"return a standardSystemViews default window extent" |
43c2eaba229d
allow default topViews extends to be overwritten by styleSheet
Claus Gittinger <cg@exept.de>
parents:
1830
diff
changeset
|
345 |
|
43c2eaba229d
allow default topViews extends to be overwritten by styleSheet
Claus Gittinger <cg@exept.de>
parents:
1830
diff
changeset
|
346 |
DefaultExtent notNil ifTrue:[ |
2303 | 347 |
^ DefaultExtent |
1865
43c2eaba229d
allow default topViews extends to be overwritten by styleSheet
Claus Gittinger <cg@exept.de>
parents:
1830
diff
changeset
|
348 |
]. |
43c2eaba229d
allow default topViews extends to be overwritten by styleSheet
Claus Gittinger <cg@exept.de>
parents:
1830
diff
changeset
|
349 |
^ super defaultExtent |
43c2eaba229d
allow default topViews extends to be overwritten by styleSheet
Claus Gittinger <cg@exept.de>
parents:
1830
diff
changeset
|
350 |
|
43c2eaba229d
allow default topViews extends to be overwritten by styleSheet
Claus Gittinger <cg@exept.de>
parents:
1830
diff
changeset
|
351 |
"Created: 15.8.1997 / 01:36:21 / cg" |
43c2eaba229d
allow default topViews extends to be overwritten by styleSheet
Claus Gittinger <cg@exept.de>
parents:
1830
diff
changeset
|
352 |
! |
43c2eaba229d
allow default topViews extends to be overwritten by styleSheet
Claus Gittinger <cg@exept.de>
parents:
1830
diff
changeset
|
353 |
|
269 | 354 |
defaultIcon |
1612 | 355 |
"return a topViews default window icon" |
356 |
||
357 |
<resource: #style (#ICON #ICON_FILE)> |
|
358 |
||
3210 | 359 |
|n nm i| |
269 | 360 |
|
1612 | 361 |
(i := DefaultIcon) isNil ifTrue:[ |
3315
995d017b5107
must keep a reference to the deviceIcon...
Claus Gittinger <cg@exept.de>
parents:
3301
diff
changeset
|
362 |
i := self classResources at:'ICON' default:nil. |
995d017b5107
must keep a reference to the deviceIcon...
Claus Gittinger <cg@exept.de>
parents:
3301
diff
changeset
|
363 |
i isNil ifTrue:[ |
995d017b5107
must keep a reference to the deviceIcon...
Claus Gittinger <cg@exept.de>
parents:
3301
diff
changeset
|
364 |
OperatingSystem platformName == #win32 ifTrue:[ |
995d017b5107
must keep a reference to the deviceIcon...
Claus Gittinger <cg@exept.de>
parents:
3301
diff
changeset
|
365 |
n := 'stx_16x16.xpm'. |
995d017b5107
must keep a reference to the deviceIcon...
Claus Gittinger <cg@exept.de>
parents:
3301
diff
changeset
|
366 |
] ifFalse:[ |
995d017b5107
must keep a reference to the deviceIcon...
Claus Gittinger <cg@exept.de>
parents:
3301
diff
changeset
|
367 |
n := 'SmalltalkX.xbm'. |
995d017b5107
must keep a reference to the deviceIcon...
Claus Gittinger <cg@exept.de>
parents:
3301
diff
changeset
|
368 |
]. |
995d017b5107
must keep a reference to the deviceIcon...
Claus Gittinger <cg@exept.de>
parents:
3301
diff
changeset
|
369 |
nm := ClassResources at:'ICON_FILE' default:n. |
995d017b5107
must keep a reference to the deviceIcon...
Claus Gittinger <cg@exept.de>
parents:
3301
diff
changeset
|
370 |
i := Smalltalk imageFromFileNamed:nm inPackage:'stx:libtool'. |
995d017b5107
must keep a reference to the deviceIcon...
Claus Gittinger <cg@exept.de>
parents:
3301
diff
changeset
|
371 |
]. |
995d017b5107
must keep a reference to the deviceIcon...
Claus Gittinger <cg@exept.de>
parents:
3301
diff
changeset
|
372 |
i notNil ifTrue:[ |
995d017b5107
must keep a reference to the deviceIcon...
Claus Gittinger <cg@exept.de>
parents:
3301
diff
changeset
|
373 |
DefaultIcon := i := i onDevice:Display |
995d017b5107
must keep a reference to the deviceIcon...
Claus Gittinger <cg@exept.de>
parents:
3301
diff
changeset
|
374 |
] |
269 | 375 |
]. |
1612 | 376 |
^ i |
1464 | 377 |
|
2729
cecfd2c7ab68
changed default icon under win32
Claus Gittinger <cg@exept.de>
parents:
2722
diff
changeset
|
378 |
" |
cecfd2c7ab68
changed default icon under win32
Claus Gittinger <cg@exept.de>
parents:
2722
diff
changeset
|
379 |
DefaultIcon := nil. |
cecfd2c7ab68
changed default icon under win32
Claus Gittinger <cg@exept.de>
parents:
2722
diff
changeset
|
380 |
self defaultIcon inspect |
cecfd2c7ab68
changed default icon under win32
Claus Gittinger <cg@exept.de>
parents:
2722
diff
changeset
|
381 |
" |
cecfd2c7ab68
changed default icon under win32
Claus Gittinger <cg@exept.de>
parents:
2722
diff
changeset
|
382 |
|
2730 | 383 |
"Modified: / 25.5.1999 / 15:36:49 / cg" |
269 | 384 |
! |
385 |
||
386 |
defaultLabel |
|
387 |
"return the default label for views of my kind. |
|
388 |
This can be redefined in subclasses or overwritten in |
|
389 |
initialize methods." |
|
390 |
||
2931 | 391 |
^ self nameWithoutPrefix. "/ 'aView' |
392 |
||
393 |
"Modified: / 27.9.1999 / 11:38:57 / cg" |
|
269 | 394 |
! |
395 |
||
3463 | 396 |
defaultWindowLabelFormat |
397 |
"%2 is the hostName; |
|
398 |
%1 is the actual window label." |
|
399 |
||
400 |
"/ ^ '%2:%1'. "/ the old format |
|
401 |
"/ ^ '%1 @ %2'. |
|
402 |
^ '%1 [%2]'. |
|
403 |
! |
|
404 |
||
269 | 405 |
includeHostNameInLabel |
406 |
"return the flag which controls if a views label should |
|
407 |
include the hostname. |
|
408 |
This flag is usually set/cleared in your private.rc file; |
|
409 |
the default is false." |
|
410 |
||
411 |
^ IncludeHostNameInLabel |
|
412 |
||
413 |
"Created: 10.9.1995 / 19:21:16 / claus" |
|
414 |
! |
|
415 |
||
416 |
includeHostNameInLabel:aBoolean |
|
417 |
"set/clear the flag which controls if a views label should |
|
418 |
include the hostname - this is highly useful if you have |
|
604
672ecb7ec347
fixed iconView handling (thought it was not realized); comments & docu
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
419 |
multiple smalltalks open simultaneously ... |
269 | 420 |
This flag is usually set/cleared in your private.rc file; |
421 |
the default is false." |
|
422 |
||
423 |
IncludeHostNameInLabel := aBoolean |
|
604
672ecb7ec347
fixed iconView handling (thought it was not realized); comments & docu
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
424 |
|
672ecb7ec347
fixed iconView handling (thought it was not realized); comments & docu
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
425 |
"Modified: 24.4.1996 / 09:09:21 / cg" |
1260
a89bbf1a52a2
added public access to TakeFocusWhenMapped
Claus Gittinger <cg@exept.de>
parents:
1202
diff
changeset
|
426 |
! |
a89bbf1a52a2
added public access to TakeFocusWhenMapped
Claus Gittinger <cg@exept.de>
parents:
1202
diff
changeset
|
427 |
|
a89bbf1a52a2
added public access to TakeFocusWhenMapped
Claus Gittinger <cg@exept.de>
parents:
1202
diff
changeset
|
428 |
takeFocusWhenMapped |
a89bbf1a52a2
added public access to TakeFocusWhenMapped
Claus Gittinger <cg@exept.de>
parents:
1202
diff
changeset
|
429 |
^ TakeFocusWhenMapped |
a89bbf1a52a2
added public access to TakeFocusWhenMapped
Claus Gittinger <cg@exept.de>
parents:
1202
diff
changeset
|
430 |
|
a89bbf1a52a2
added public access to TakeFocusWhenMapped
Claus Gittinger <cg@exept.de>
parents:
1202
diff
changeset
|
431 |
" |
a89bbf1a52a2
added public access to TakeFocusWhenMapped
Claus Gittinger <cg@exept.de>
parents:
1202
diff
changeset
|
432 |
StandardSystemView takeFocusWhenMapped |
a89bbf1a52a2
added public access to TakeFocusWhenMapped
Claus Gittinger <cg@exept.de>
parents:
1202
diff
changeset
|
433 |
" |
a89bbf1a52a2
added public access to TakeFocusWhenMapped
Claus Gittinger <cg@exept.de>
parents:
1202
diff
changeset
|
434 |
! |
a89bbf1a52a2
added public access to TakeFocusWhenMapped
Claus Gittinger <cg@exept.de>
parents:
1202
diff
changeset
|
435 |
|
1865
43c2eaba229d
allow default topViews extends to be overwritten by styleSheet
Claus Gittinger <cg@exept.de>
parents:
1830
diff
changeset
|
436 |
updateStyleCache |
43c2eaba229d
allow default topViews extends to be overwritten by styleSheet
Claus Gittinger <cg@exept.de>
parents:
1830
diff
changeset
|
437 |
"extract values from the styleSheet and cache them in class variables" |
43c2eaba229d
allow default topViews extends to be overwritten by styleSheet
Claus Gittinger <cg@exept.de>
parents:
1830
diff
changeset
|
438 |
|
1931 | 439 |
<resource: #style (#'standardSystemView.defaultExtent')> |
1865
43c2eaba229d
allow default topViews extends to be overwritten by styleSheet
Claus Gittinger <cg@exept.de>
parents:
1830
diff
changeset
|
440 |
|
1931 | 441 |
DefaultExtent := StyleSheet at:'standardSystemView.defaultExtent' default:nil. |
1865
43c2eaba229d
allow default topViews extends to be overwritten by styleSheet
Claus Gittinger <cg@exept.de>
parents:
1830
diff
changeset
|
442 |
|
43c2eaba229d
allow default topViews extends to be overwritten by styleSheet
Claus Gittinger <cg@exept.de>
parents:
1830
diff
changeset
|
443 |
" |
43c2eaba229d
allow default topViews extends to be overwritten by styleSheet
Claus Gittinger <cg@exept.de>
parents:
1830
diff
changeset
|
444 |
self updateStyleCache |
43c2eaba229d
allow default topViews extends to be overwritten by styleSheet
Claus Gittinger <cg@exept.de>
parents:
1830
diff
changeset
|
445 |
" |
43c2eaba229d
allow default topViews extends to be overwritten by styleSheet
Claus Gittinger <cg@exept.de>
parents:
1830
diff
changeset
|
446 |
|
43c2eaba229d
allow default topViews extends to be overwritten by styleSheet
Claus Gittinger <cg@exept.de>
parents:
1830
diff
changeset
|
447 |
"Modified: 31.8.1995 / 03:01:14 / claus" |
43c2eaba229d
allow default topViews extends to be overwritten by styleSheet
Claus Gittinger <cg@exept.de>
parents:
1830
diff
changeset
|
448 |
"Created: 15.8.1997 / 01:34:37 / cg" |
1931 | 449 |
"Modified: 20.10.1997 / 15:13:50 / cg" |
3463 | 450 |
! |
451 |
||
452 |
windowLabelFormat |
|
453 |
^ WindowLabelFormat |
|
454 |
! |
|
455 |
||
456 |
windowLabelFormat:aFormatString |
|
457 |
WindowLabelFormat := aFormatString |
|
269 | 458 |
! ! |
459 |
||
460 |
!StandardSystemView class methodsFor:'startup'! |
|
461 |
||
462 |
start |
|
463 |
"create, realize the view - this topview and all its subviews will |
|
464 |
run as a separate process with its own windowGroup. |
|
465 |
This method exists for backward compatibility - use open." |
|
466 |
||
467 |
^ self open |
|
468 |
! ! |
|
469 |
||
3880 | 470 |
!StandardSystemView methodsFor:'Compatibility-ST80'! |
1939
a32908e2214d
added #menuBar for VW compatibility
Claus Gittinger <cg@exept.de>
parents:
1931
diff
changeset
|
471 |
|
2651
8f800d7bcee3
send minExtend/maxExtend changes down to the device.
Claus Gittinger <cg@exept.de>
parents:
2644
diff
changeset
|
472 |
maximumSize |
8f800d7bcee3
send minExtend/maxExtend changes down to the device.
Claus Gittinger <cg@exept.de>
parents:
2644
diff
changeset
|
473 |
"same as maxExtent; for ST-80 compatibility" |
8f800d7bcee3
send minExtend/maxExtend changes down to the device.
Claus Gittinger <cg@exept.de>
parents:
2644
diff
changeset
|
474 |
|
8f800d7bcee3
send minExtend/maxExtend changes down to the device.
Claus Gittinger <cg@exept.de>
parents:
2644
diff
changeset
|
475 |
^ self maxExtent |
8f800d7bcee3
send minExtend/maxExtend changes down to the device.
Claus Gittinger <cg@exept.de>
parents:
2644
diff
changeset
|
476 |
! |
8f800d7bcee3
send minExtend/maxExtend changes down to the device.
Claus Gittinger <cg@exept.de>
parents:
2644
diff
changeset
|
477 |
|
8f800d7bcee3
send minExtend/maxExtend changes down to the device.
Claus Gittinger <cg@exept.de>
parents:
2644
diff
changeset
|
478 |
maximumSize:anExtent |
8f800d7bcee3
send minExtend/maxExtend changes down to the device.
Claus Gittinger <cg@exept.de>
parents:
2644
diff
changeset
|
479 |
"same as maxExtent; for ST-80 compatibility" |
8f800d7bcee3
send minExtend/maxExtend changes down to the device.
Claus Gittinger <cg@exept.de>
parents:
2644
diff
changeset
|
480 |
|
8f800d7bcee3
send minExtend/maxExtend changes down to the device.
Claus Gittinger <cg@exept.de>
parents:
2644
diff
changeset
|
481 |
^ self maxExtent:anExtent |
8f800d7bcee3
send minExtend/maxExtend changes down to the device.
Claus Gittinger <cg@exept.de>
parents:
2644
diff
changeset
|
482 |
! |
8f800d7bcee3
send minExtend/maxExtend changes down to the device.
Claus Gittinger <cg@exept.de>
parents:
2644
diff
changeset
|
483 |
|
1939
a32908e2214d
added #menuBar for VW compatibility
Claus Gittinger <cg@exept.de>
parents:
1931
diff
changeset
|
484 |
menuBar |
a32908e2214d
added #menuBar for VW compatibility
Claus Gittinger <cg@exept.de>
parents:
1931
diff
changeset
|
485 |
"return my menuBar or nil if I have none. |
a32908e2214d
added #menuBar for VW compatibility
Claus Gittinger <cg@exept.de>
parents:
1931
diff
changeset
|
486 |
This is only valid for topViews which were built with the UIBuilder." |
a32908e2214d
added #menuBar for VW compatibility
Claus Gittinger <cg@exept.de>
parents:
1931
diff
changeset
|
487 |
|
a32908e2214d
added #menuBar for VW compatibility
Claus Gittinger <cg@exept.de>
parents:
1931
diff
changeset
|
488 |
^ application builder menuBar |
a32908e2214d
added #menuBar for VW compatibility
Claus Gittinger <cg@exept.de>
parents:
1931
diff
changeset
|
489 |
|
a32908e2214d
added #menuBar for VW compatibility
Claus Gittinger <cg@exept.de>
parents:
1931
diff
changeset
|
490 |
"Created: / 27.10.1997 / 16:23:13 / cg" |
1944 | 491 |
! |
492 |
||
2651
8f800d7bcee3
send minExtend/maxExtend changes down to the device.
Claus Gittinger <cg@exept.de>
parents:
2644
diff
changeset
|
493 |
minimumSize |
8f800d7bcee3
send minExtend/maxExtend changes down to the device.
Claus Gittinger <cg@exept.de>
parents:
2644
diff
changeset
|
494 |
"same as minExtent; for ST-80 compatibility" |
8f800d7bcee3
send minExtend/maxExtend changes down to the device.
Claus Gittinger <cg@exept.de>
parents:
2644
diff
changeset
|
495 |
|
8f800d7bcee3
send minExtend/maxExtend changes down to the device.
Claus Gittinger <cg@exept.de>
parents:
2644
diff
changeset
|
496 |
^ self minExtent |
8f800d7bcee3
send minExtend/maxExtend changes down to the device.
Claus Gittinger <cg@exept.de>
parents:
2644
diff
changeset
|
497 |
! |
8f800d7bcee3
send minExtend/maxExtend changes down to the device.
Claus Gittinger <cg@exept.de>
parents:
2644
diff
changeset
|
498 |
|
8f800d7bcee3
send minExtend/maxExtend changes down to the device.
Claus Gittinger <cg@exept.de>
parents:
2644
diff
changeset
|
499 |
minimumSize:anExtent |
8f800d7bcee3
send minExtend/maxExtend changes down to the device.
Claus Gittinger <cg@exept.de>
parents:
2644
diff
changeset
|
500 |
"same as minExtent; for ST-80 compatibility" |
8f800d7bcee3
send minExtend/maxExtend changes down to the device.
Claus Gittinger <cg@exept.de>
parents:
2644
diff
changeset
|
501 |
|
8f800d7bcee3
send minExtend/maxExtend changes down to the device.
Claus Gittinger <cg@exept.de>
parents:
2644
diff
changeset
|
502 |
^ self minExtent:anExtent |
8f800d7bcee3
send minExtend/maxExtend changes down to the device.
Claus Gittinger <cg@exept.de>
parents:
2644
diff
changeset
|
503 |
! |
8f800d7bcee3
send minExtend/maxExtend changes down to the device.
Claus Gittinger <cg@exept.de>
parents:
2644
diff
changeset
|
504 |
|
1944 | 505 |
quit |
2217
8ce6a3da5bab
#terminate -> #closeRequest -> #destroy
Claus Gittinger <cg@exept.de>
parents:
2165
diff
changeset
|
506 |
"same as closeRequest |
8ce6a3da5bab
#terminate -> #closeRequest -> #destroy
Claus Gittinger <cg@exept.de>
parents:
2165
diff
changeset
|
507 |
(but sometimes sent via the sensors event queue from VW programs)" |
1944 | 508 |
|
509 |
self closeRequest |
|
510 |
||
511 |
"Created: / 30.10.1997 / 19:23:01 / cg" |
|
2217
8ce6a3da5bab
#terminate -> #closeRequest -> #destroy
Claus Gittinger <cg@exept.de>
parents:
2165
diff
changeset
|
512 |
"Modified: / 3.8.1998 / 20:04:22 / cg" |
1939
a32908e2214d
added #menuBar for VW compatibility
Claus Gittinger <cg@exept.de>
parents:
1931
diff
changeset
|
513 |
! ! |
a32908e2214d
added #menuBar for VW compatibility
Claus Gittinger <cg@exept.de>
parents:
1931
diff
changeset
|
514 |
|
269 | 515 |
!StandardSystemView methodsFor:'accessing'! |
516 |
||
517 |
application |
|
518 |
"return the topViews application. |
|
519 |
This is new protocol for ST-80 compatibility and not yet fully supported" |
|
520 |
||
521 |
^ application |
|
522 |
! |
|
523 |
||
524 |
application:anApplicationModel |
|
525 |
"set the topViews application. |
|
526 |
This is new protocol for ST-80 compatibility and not yet fully supported" |
|
527 |
||
570
8a7c398caa94
preset the applications window when my app is set
Claus Gittinger <cg@exept.de>
parents:
516
diff
changeset
|
528 |
application := anApplicationModel. |
8a7c398caa94
preset the applications window when my app is set
Claus Gittinger <cg@exept.de>
parents:
516
diff
changeset
|
529 |
anApplicationModel notNil ifTrue:[ |
1696
ba6085a629e0
replaced isPopUp flag in #createWindow by a more general #style symbol argument
Claus Gittinger <cg@exept.de>
parents:
1612
diff
changeset
|
530 |
anApplicationModel window isNil ifTrue:[ |
ba6085a629e0
replaced isPopUp flag in #createWindow by a more general #style symbol argument
Claus Gittinger <cg@exept.de>
parents:
1612
diff
changeset
|
531 |
anApplicationModel window:self |
ba6085a629e0
replaced isPopUp flag in #createWindow by a more general #style symbol argument
Claus Gittinger <cg@exept.de>
parents:
1612
diff
changeset
|
532 |
] |
570
8a7c398caa94
preset the applications window when my app is set
Claus Gittinger <cg@exept.de>
parents:
516
diff
changeset
|
533 |
] |
8a7c398caa94
preset the applications window when my app is set
Claus Gittinger <cg@exept.de>
parents:
516
diff
changeset
|
534 |
|
8a7c398caa94
preset the applications window when my app is set
Claus Gittinger <cg@exept.de>
parents:
516
diff
changeset
|
535 |
"Modified: 18.4.1996 / 14:55:44 / cg" |
625
4d8f6dc3af75
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
621
diff
changeset
|
536 |
! ! |
4d8f6dc3af75
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
621
diff
changeset
|
537 |
|
4d8f6dc3af75
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
621
diff
changeset
|
538 |
!StandardSystemView methodsFor:'accessing-behavior'! |
4d8f6dc3af75
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
621
diff
changeset
|
539 |
|
269 | 540 |
bePartner |
504
bc7734000bd3
windowGroup pulls focusSequence from topView (used to be pushed into it)
Claus Gittinger <cg@exept.de>
parents:
385
diff
changeset
|
541 |
"define me as a partner-View. |
bc7734000bd3
windowGroup pulls focusSequence from topView (used to be pushed into it)
Claus Gittinger <cg@exept.de>
parents:
385
diff
changeset
|
542 |
All partners within the applications windowGroup iconify/deiconify together." |
bc7734000bd3
windowGroup pulls focusSequence from topView (used to be pushed into it)
Claus Gittinger <cg@exept.de>
parents:
385
diff
changeset
|
543 |
|
269 | 544 |
self setWindowGroupFromApplication. |
545 |
super bePartner. |
|
546 |
||
298 | 547 |
" |
548 |
see example in TopView>>bePartner |
|
549 |
" |
|
550 |
||
269 | 551 |
"Created: 22.9.1995 / 17:40:15 / claus" |
504
bc7734000bd3
windowGroup pulls focusSequence from topView (used to be pushed into it)
Claus Gittinger <cg@exept.de>
parents:
385
diff
changeset
|
552 |
"Modified: 6.3.1996 / 16:16:42 / cg" |
269 | 553 |
! |
554 |
||
555 |
beSlave |
|
504
bc7734000bd3
windowGroup pulls focusSequence from topView (used to be pushed into it)
Claus Gittinger <cg@exept.de>
parents:
385
diff
changeset
|
556 |
"define me as a slave-View. |
4032 | 557 |
All slaves within the applications windowGroup iconify/deiconify with the masterView(s) |
558 |
(i.e. they follow their master(s))" |
|
504
bc7734000bd3
windowGroup pulls focusSequence from topView (used to be pushed into it)
Claus Gittinger <cg@exept.de>
parents:
385
diff
changeset
|
559 |
|
269 | 560 |
self setWindowGroupFromApplication. |
561 |
super beSlave. |
|
562 |
||
298 | 563 |
" |
564 |
see example in TopView>>beSlave |
|
565 |
" |
|
566 |
||
269 | 567 |
"Created: 22.9.1995 / 17:40:15 / claus" |
504
bc7734000bd3
windowGroup pulls focusSequence from topView (used to be pushed into it)
Claus Gittinger <cg@exept.de>
parents:
385
diff
changeset
|
568 |
"Modified: 6.3.1996 / 16:16:50 / cg" |
269 | 569 |
! |
570 |
||
625
4d8f6dc3af75
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
621
diff
changeset
|
571 |
sendWindowEvents:collectionOfEventSymbols |
4d8f6dc3af75
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
621
diff
changeset
|
572 |
"define the events that are to be forwarded to the application. |
4d8f6dc3af75
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
621
diff
changeset
|
573 |
This is being implemented ..." |
4d8f6dc3af75
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
621
diff
changeset
|
574 |
|
4d8f6dc3af75
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
621
diff
changeset
|
575 |
windowEventsForApplication := collectionOfEventSymbols |
4d8f6dc3af75
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
621
diff
changeset
|
576 |
! |
4d8f6dc3af75
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
621
diff
changeset
|
577 |
|
4d8f6dc3af75
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
621
diff
changeset
|
578 |
sizeFixed:aBoolean |
4d8f6dc3af75
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
621
diff
changeset
|
579 |
"this prevents the view from resizing itself when realized. |
4d8f6dc3af75
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
621
diff
changeset
|
580 |
For normal topViews, this is void, since they dont do this anyway. |
4d8f6dc3af75
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
621
diff
changeset
|
581 |
|
4d8f6dc3af75
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
621
diff
changeset
|
582 |
However, modalBoxes (especially: DialogBoxes) typically resize themselfes |
4d8f6dc3af75
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
621
diff
changeset
|
583 |
to the preferredExtent of their components. In some cases, this behavior is |
4d8f6dc3af75
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
621
diff
changeset
|
584 |
not desired and it should be turned off by setting sizeFixed to true. |
4d8f6dc3af75
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
621
diff
changeset
|
585 |
|
4d8f6dc3af75
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
621
diff
changeset
|
586 |
To avoid confusion: |
4d8f6dc3af75
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
621
diff
changeset
|
587 |
This does NOT prevent the window manager from resizing the view, |
4d8f6dc3af75
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
621
diff
changeset
|
588 |
instead it tells the view to NOT resize ITSELF." |
4d8f6dc3af75
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
621
diff
changeset
|
589 |
|
4d8f6dc3af75
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
621
diff
changeset
|
590 |
sizeFixed := aBoolean. |
4d8f6dc3af75
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
621
diff
changeset
|
591 |
|
4d8f6dc3af75
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
621
diff
changeset
|
592 |
"example: dialog which resizes itself on #open: |
4d8f6dc3af75
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
621
diff
changeset
|
593 |
(thereby ignoring the 200@200 extent) |
4d8f6dc3af75
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
621
diff
changeset
|
594 |
|
4d8f6dc3af75
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
621
diff
changeset
|
595 |
|dialog| |
4d8f6dc3af75
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
621
diff
changeset
|
596 |
|
4d8f6dc3af75
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
621
diff
changeset
|
597 |
dialog := Dialog new. |
4d8f6dc3af75
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
621
diff
changeset
|
598 |
dialog addInputFieldOn:'' asValue. |
4d8f6dc3af75
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
621
diff
changeset
|
599 |
dialog addOkButton. |
4d8f6dc3af75
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
621
diff
changeset
|
600 |
dialog extent:200@200. |
4d8f6dc3af75
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
621
diff
changeset
|
601 |
dialog open. |
4d8f6dc3af75
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
621
diff
changeset
|
602 |
|
4d8f6dc3af75
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
621
diff
changeset
|
603 |
|
4d8f6dc3af75
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
621
diff
changeset
|
604 |
using sizeFixed: |
4d8f6dc3af75
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
621
diff
changeset
|
605 |
|
4d8f6dc3af75
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
621
diff
changeset
|
606 |
|dialog| |
4d8f6dc3af75
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
621
diff
changeset
|
607 |
|
4d8f6dc3af75
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
621
diff
changeset
|
608 |
dialog := Dialog new. |
4d8f6dc3af75
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
621
diff
changeset
|
609 |
dialog addInputFieldOn:'' asValue. |
4d8f6dc3af75
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
621
diff
changeset
|
610 |
dialog addOkButton. |
4d8f6dc3af75
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
621
diff
changeset
|
611 |
dialog extent:200@200; sizeFixed:true. |
4d8f6dc3af75
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
621
diff
changeset
|
612 |
dialog open. |
4d8f6dc3af75
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
621
diff
changeset
|
613 |
|
4d8f6dc3af75
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
621
diff
changeset
|
614 |
|
4d8f6dc3af75
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
621
diff
changeset
|
615 |
using openWithExtent (also sets sizeFixed): |
4d8f6dc3af75
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
621
diff
changeset
|
616 |
|
4d8f6dc3af75
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
621
diff
changeset
|
617 |
|dialog| |
4d8f6dc3af75
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
621
diff
changeset
|
618 |
|
4d8f6dc3af75
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
621
diff
changeset
|
619 |
dialog := Dialog new. |
4d8f6dc3af75
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
621
diff
changeset
|
620 |
dialog addInputFieldOn:'' asValue. |
4d8f6dc3af75
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
621
diff
changeset
|
621 |
dialog addOkButton. |
4d8f6dc3af75
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
621
diff
changeset
|
622 |
dialog openWithExtent:200@200. |
4d8f6dc3af75
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
621
diff
changeset
|
623 |
" |
4d8f6dc3af75
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
621
diff
changeset
|
624 |
! ! |
4d8f6dc3af75
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
621
diff
changeset
|
625 |
|
3776 | 626 |
!StandardSystemView methodsFor:'accessing-channels'! |
627 |
||
628 |
labelChannel |
|
629 |
"return the labelChannel - or nil" |
|
630 |
||
631 |
^ labelChannel. |
|
632 |
! |
|
633 |
||
634 |
labelChannel:aValueHolder |
|
635 |
"set the labelChannel - a valueHolder holding a string |
|
636 |
which is shown as title bar" |
|
637 |
||
638 |
|prev| |
|
639 |
||
640 |
prev := labelChannel. |
|
641 |
labelChannel := aValueHolder. |
|
642 |
self setupChannel:aValueHolder for:nil withOld:prev. |
|
643 |
! ! |
|
644 |
||
625
4d8f6dc3af75
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
621
diff
changeset
|
645 |
!StandardSystemView methodsFor:'accessing-dimensions'! |
4d8f6dc3af75
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
621
diff
changeset
|
646 |
|
4d8f6dc3af75
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
621
diff
changeset
|
647 |
maxExtent |
4d8f6dc3af75
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
621
diff
changeset
|
648 |
"return the views maximum allowed extent" |
4d8f6dc3af75
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
621
diff
changeset
|
649 |
|
4d8f6dc3af75
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
621
diff
changeset
|
650 |
^ maxExtent |
4d8f6dc3af75
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
621
diff
changeset
|
651 |
! |
4d8f6dc3af75
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
621
diff
changeset
|
652 |
|
4d8f6dc3af75
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
621
diff
changeset
|
653 |
maxExtent:max |
4d8f6dc3af75
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
621
diff
changeset
|
654 |
"define the maximum extent the view may have - |
4d8f6dc3af75
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
621
diff
changeset
|
655 |
depends on good-will of window manager" |
4d8f6dc3af75
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
621
diff
changeset
|
656 |
|
2651
8f800d7bcee3
send minExtend/maxExtend changes down to the device.
Claus Gittinger <cg@exept.de>
parents:
2644
diff
changeset
|
657 |
maxExtent ~= max ifTrue:[ |
4197
1984b2ba83de
Do not set maxExtent (to the Screen size) in StandartSystemView.
Stefan Vogel <sv@exept.de>
parents:
4178
diff
changeset
|
658 |
maxExtent := max. |
1984b2ba83de
Do not set maxExtent (to the Screen size) in StandartSystemView.
Stefan Vogel <sv@exept.de>
parents:
4178
diff
changeset
|
659 |
maxExtent x isNil ifTrue:[ |
1984b2ba83de
Do not set maxExtent (to the Screen size) in StandartSystemView.
Stefan Vogel <sv@exept.de>
parents:
4178
diff
changeset
|
660 |
maxExtent := 99999 @ maxExtent y. |
1984b2ba83de
Do not set maxExtent (to the Screen size) in StandartSystemView.
Stefan Vogel <sv@exept.de>
parents:
4178
diff
changeset
|
661 |
]. |
1984b2ba83de
Do not set maxExtent (to the Screen size) in StandartSystemView.
Stefan Vogel <sv@exept.de>
parents:
4178
diff
changeset
|
662 |
maxExtent y isNil ifTrue:[ |
1984b2ba83de
Do not set maxExtent (to the Screen size) in StandartSystemView.
Stefan Vogel <sv@exept.de>
parents:
4178
diff
changeset
|
663 |
maxExtent := maxExtent x @ 99999. |
1984b2ba83de
Do not set maxExtent (to the Screen size) in StandartSystemView.
Stefan Vogel <sv@exept.de>
parents:
4178
diff
changeset
|
664 |
]. |
2651
8f800d7bcee3
send minExtend/maxExtend changes down to the device.
Claus Gittinger <cg@exept.de>
parents:
2644
diff
changeset
|
665 |
|
4197
1984b2ba83de
Do not set maxExtent (to the Screen size) in StandartSystemView.
Stefan Vogel <sv@exept.de>
parents:
4178
diff
changeset
|
666 |
drawableId notNil ifTrue:[ |
1984b2ba83de
Do not set maxExtent (to the Screen size) in StandartSystemView.
Stefan Vogel <sv@exept.de>
parents:
4178
diff
changeset
|
667 |
device setWindowMinExtent:nil maxExtent:max in:drawableId |
1984b2ba83de
Do not set maxExtent (to the Screen size) in StandartSystemView.
Stefan Vogel <sv@exept.de>
parents:
4178
diff
changeset
|
668 |
]. |
625
4d8f6dc3af75
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
621
diff
changeset
|
669 |
|
4197
1984b2ba83de
Do not set maxExtent (to the Screen size) in StandartSystemView.
Stefan Vogel <sv@exept.de>
parents:
4178
diff
changeset
|
670 |
"/ if my current extent is larger than the new |
1984b2ba83de
Do not set maxExtent (to the Screen size) in StandartSystemView.
Stefan Vogel <sv@exept.de>
parents:
4178
diff
changeset
|
671 |
"/ maxExtent, adjust. |
625
4d8f6dc3af75
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
621
diff
changeset
|
672 |
|
4197
1984b2ba83de
Do not set maxExtent (to the Screen size) in StandartSystemView.
Stefan Vogel <sv@exept.de>
parents:
4178
diff
changeset
|
673 |
(width notNil and:[height notNil]) ifTrue:[ |
1984b2ba83de
Do not set maxExtent (to the Screen size) in StandartSystemView.
Stefan Vogel <sv@exept.de>
parents:
4178
diff
changeset
|
674 |
((width > (max x)) or: |
1984b2ba83de
Do not set maxExtent (to the Screen size) in StandartSystemView.
Stefan Vogel <sv@exept.de>
parents:
4178
diff
changeset
|
675 |
[height > (max y)]) ifTrue: [ |
1984b2ba83de
Do not set maxExtent (to the Screen size) in StandartSystemView.
Stefan Vogel <sv@exept.de>
parents:
4178
diff
changeset
|
676 |
self extent:(max min:self extent) |
1984b2ba83de
Do not set maxExtent (to the Screen size) in StandartSystemView.
Stefan Vogel <sv@exept.de>
parents:
4178
diff
changeset
|
677 |
] |
1984b2ba83de
Do not set maxExtent (to the Screen size) in StandartSystemView.
Stefan Vogel <sv@exept.de>
parents:
4178
diff
changeset
|
678 |
] |
2651
8f800d7bcee3
send minExtend/maxExtend changes down to the device.
Claus Gittinger <cg@exept.de>
parents:
2644
diff
changeset
|
679 |
]. |
625
4d8f6dc3af75
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
621
diff
changeset
|
680 |
! |
4d8f6dc3af75
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
621
diff
changeset
|
681 |
|
4d8f6dc3af75
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
621
diff
changeset
|
682 |
minExtent |
4d8f6dc3af75
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
621
diff
changeset
|
683 |
"return the views minimum allowed extent" |
4d8f6dc3af75
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
621
diff
changeset
|
684 |
|
4d8f6dc3af75
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
621
diff
changeset
|
685 |
^ minExtent |
4d8f6dc3af75
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
621
diff
changeset
|
686 |
! |
4d8f6dc3af75
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
621
diff
changeset
|
687 |
|
4d8f6dc3af75
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
621
diff
changeset
|
688 |
minExtent:min |
4d8f6dc3af75
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
621
diff
changeset
|
689 |
"define the minimum extent the view may have - |
4d8f6dc3af75
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
621
diff
changeset
|
690 |
depends on good-will of window manager" |
4d8f6dc3af75
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
621
diff
changeset
|
691 |
|
2651
8f800d7bcee3
send minExtend/maxExtend changes down to the device.
Claus Gittinger <cg@exept.de>
parents:
2644
diff
changeset
|
692 |
minExtent ~= min ifTrue:[ |
3152 | 693 |
minExtent := min. |
694 |
drawableId notNil ifTrue:[ |
|
695 |
device setWindowMinExtent:min maxExtent:nil in:drawableId |
|
696 |
]. |
|
2651
8f800d7bcee3
send minExtend/maxExtend changes down to the device.
Claus Gittinger <cg@exept.de>
parents:
2644
diff
changeset
|
697 |
|
3152 | 698 |
"/ if my current extent is smaller than the new |
699 |
"/ minExtent, adjust. |
|
625
4d8f6dc3af75
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
621
diff
changeset
|
700 |
|
3152 | 701 |
(width notNil and:[height notNil]) ifTrue:[ |
702 |
((width < (min x)) or: |
|
703 |
[height < (min y)]) ifTrue: [ |
|
704 |
self extent:(min max:self extent) |
|
705 |
] |
|
706 |
] |
|
2651
8f800d7bcee3
send minExtend/maxExtend changes down to the device.
Claus Gittinger <cg@exept.de>
parents:
2644
diff
changeset
|
707 |
] |
625
4d8f6dc3af75
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
621
diff
changeset
|
708 |
|
4d8f6dc3af75
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
621
diff
changeset
|
709 |
! ! |
4d8f6dc3af75
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
621
diff
changeset
|
710 |
|
4d8f6dc3af75
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
621
diff
changeset
|
711 |
!StandardSystemView methodsFor:'accessing-look'! |
4d8f6dc3af75
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
621
diff
changeset
|
712 |
|
269 | 713 |
icon |
714 |
"return the form defined as icon" |
|
715 |
||
716 |
^ icon |
|
0 | 717 |
! |
718 |
||
1538 | 719 |
icon:aFormOrImage |
720 |
"define the form or image (bitmap) used as icon" |
|
269 | 721 |
|
1538 | 722 |
|i m| |
269 | 723 |
|
1538 | 724 |
icon := aFormOrImage. |
269 | 725 |
icon notNil ifTrue:[ |
1696
ba6085a629e0
replaced isPopUp flag in #createWindow by a more general #style symbol argument
Claus Gittinger <cg@exept.de>
parents:
1612
diff
changeset
|
726 |
drawableId notNil ifTrue:[ |
ba6085a629e0
replaced isPopUp flag in #createWindow by a more general #style symbol argument
Claus Gittinger <cg@exept.de>
parents:
1612
diff
changeset
|
727 |
i := self convertedIcon:icon. |
ba6085a629e0
replaced isPopUp flag in #createWindow by a more general #style symbol argument
Claus Gittinger <cg@exept.de>
parents:
1612
diff
changeset
|
728 |
(i notNil and:[i id notNil]) ifTrue:[ |
ba6085a629e0
replaced isPopUp flag in #createWindow by a more general #style symbol argument
Claus Gittinger <cg@exept.de>
parents:
1612
diff
changeset
|
729 |
(m := icon mask) notNil ifTrue:[ |
ba6085a629e0
replaced isPopUp flag in #createWindow by a more general #style symbol argument
Claus Gittinger <cg@exept.de>
parents:
1612
diff
changeset
|
730 |
m := self convertedIconMask:m. |
ba6085a629e0
replaced isPopUp flag in #createWindow by a more general #style symbol argument
Claus Gittinger <cg@exept.de>
parents:
1612
diff
changeset
|
731 |
]. |
ba6085a629e0
replaced isPopUp flag in #createWindow by a more general #style symbol argument
Claus Gittinger <cg@exept.de>
parents:
1612
diff
changeset
|
732 |
device setWindowIcon:i mask:m in:drawableId |
ba6085a629e0
replaced isPopUp flag in #createWindow by a more general #style symbol argument
Claus Gittinger <cg@exept.de>
parents:
1612
diff
changeset
|
733 |
] |
ba6085a629e0
replaced isPopUp flag in #createWindow by a more general #style symbol argument
Claus Gittinger <cg@exept.de>
parents:
1612
diff
changeset
|
734 |
] |
269 | 735 |
] |
816 | 736 |
|
1538 | 737 |
"Modified: 4.4.1997 / 16:20:52 / cg" |
269 | 738 |
! |
739 |
||
740 |
iconLabel |
|
741 |
"return the name displayed in the icon" |
|
742 |
||
743 |
^ iconLabel |
|
744 |
! |
|
745 |
||
746 |
iconLabel:aString |
|
747 |
"define the name to be displayed in the icon" |
|
748 |
||
2099
84cde59b2575
handle label/iconLabel being a text (instead of a string)
Claus Gittinger <cg@exept.de>
parents:
2092
diff
changeset
|
749 |
|newLabel| |
84cde59b2575
handle label/iconLabel being a text (instead of a string)
Claus Gittinger <cg@exept.de>
parents:
2092
diff
changeset
|
750 |
|
84cde59b2575
handle label/iconLabel being a text (instead of a string)
Claus Gittinger <cg@exept.de>
parents:
2092
diff
changeset
|
751 |
(newLabel := aString string) ~= iconLabel ifTrue:[ |
2303 | 752 |
iconLabel := newLabel. |
753 |
drawableId notNil ifTrue:[ |
|
754 |
device setIconName:newLabel in:drawableId. |
|
755 |
" |
|
756 |
unbuffered - to make it visible right NOW |
|
757 |
" |
|
758 |
device flush. |
|
759 |
] |
|
269 | 760 |
] |
761 |
! |
|
81 | 762 |
|
1464 | 763 |
iconMask |
764 |
"return the form defined as iconMask. |
|
765 |
Notice, that many windowManagers ignore this mask |
|
766 |
(usually, only managers which place icons on the background desktop |
|
767 |
care for an icon - if at all ...)" |
|
768 |
||
769 |
|mask| |
|
770 |
||
771 |
"/ only images possibly have iconMasks |
|
772 |
icon notNil ifTrue:[ |
|
1696
ba6085a629e0
replaced isPopUp flag in #createWindow by a more general #style symbol argument
Claus Gittinger <cg@exept.de>
parents:
1612
diff
changeset
|
773 |
(mask := icon mask) notNil ifTrue:[ |
ba6085a629e0
replaced isPopUp flag in #createWindow by a more general #style symbol argument
Claus Gittinger <cg@exept.de>
parents:
1612
diff
changeset
|
774 |
^ self convertedIconMask:mask |
ba6085a629e0
replaced isPopUp flag in #createWindow by a more general #style symbol argument
Claus Gittinger <cg@exept.de>
parents:
1612
diff
changeset
|
775 |
] |
1464 | 776 |
]. |
777 |
||
778 |
^ nil |
|
1538 | 779 |
|
780 |
"Modified: 4.4.1997 / 16:39:00 / cg" |
|
1464 | 781 |
! |
782 |
||
269 | 783 |
iconName:aString |
784 |
"this method will vanish soon ... - for backward compatibility" |
|
785 |
||
3435 | 786 |
<resource:#obsolete> |
787 |
||
3408
42384f123133
Add labelChannel and visibilityChannel to WindowSpec/StandardSystemView
Stefan Vogel <sv@exept.de>
parents:
3393
diff
changeset
|
788 |
self obsoleteMethodWarning:'use #iconLabel:'. |
269 | 789 |
self iconLabel:aString |
790 |
! |
|
791 |
||
792 |
iconView |
|
793 |
"return the view used as icon-view" |
|
794 |
||
795 |
^ iconView |
|
796 |
! |
|
797 |
||
798 |
iconView:aView |
|
1538 | 799 |
"specify the view to be used as icon. |
800 |
This may not be supported on all display types" |
|
269 | 801 |
|
802 |
iconView := aView. |
|
803 |
drawableId notNil ifTrue:[ |
|
1696
ba6085a629e0
replaced isPopUp flag in #createWindow by a more general #style symbol argument
Claus Gittinger <cg@exept.de>
parents:
1612
diff
changeset
|
804 |
aView create. |
ba6085a629e0
replaced isPopUp flag in #createWindow by a more general #style symbol argument
Claus Gittinger <cg@exept.de>
parents:
1612
diff
changeset
|
805 |
device setWindowIconWindow:aView in:drawableId. |
ba6085a629e0
replaced isPopUp flag in #createWindow by a more general #style symbol argument
Claus Gittinger <cg@exept.de>
parents:
1612
diff
changeset
|
806 |
aView setRealized:true. |
269 | 807 |
] |
604
672ecb7ec347
fixed iconView handling (thought it was not realized); comments & docu
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
808 |
|
1538 | 809 |
"Modified: 4.4.1997 / 16:21:37 / cg" |
269 | 810 |
! |
811 |
||
812 |
label |
|
813 |
"return the views name in the title area" |
|
814 |
||
815 |
^ label |
|
816 |
! |
|
817 |
||
818 |
label:aString |
|
819 |
"define the views name in the windows title area. |
|
820 |
If IncludeHostNameInLabel is true, prepend the hostname |
|
821 |
(you will appreciate this, if you are working on multiple |
|
604
672ecb7ec347
fixed iconView handling (thought it was not realized); comments & docu
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
822 |
machines simultaneously - as I do ...)" |
269 | 823 |
|
4128
c8b677256664
to utf8 or not - that is the question in window labels
Michael Beyl <mb@exept.de>
parents:
4125
diff
changeset
|
824 |
|newLabel| |
2099
84cde59b2575
handle label/iconLabel being a text (instead of a string)
Claus Gittinger <cg@exept.de>
parents:
2092
diff
changeset
|
825 |
|
84cde59b2575
handle label/iconLabel being a text (instead of a string)
Claus Gittinger <cg@exept.de>
parents:
2092
diff
changeset
|
826 |
(newLabel := aString string) ~= label ifTrue:[ |
4060
3de2582320a0
for now, set the window-label in utf8
Claus Gittinger <cg@exept.de>
parents:
4032
diff
changeset
|
827 |
label := newLabel. |
3de2582320a0
for now, set the window-label in utf8
Claus Gittinger <cg@exept.de>
parents:
4032
diff
changeset
|
828 |
drawableId notNil ifTrue: [ |
4128
c8b677256664
to utf8 or not - that is the question in window labels
Michael Beyl <mb@exept.de>
parents:
4125
diff
changeset
|
829 |
device setWindowName:(self windowLabelFor:label) in:drawableId. |
4060
3de2582320a0
for now, set the window-label in utf8
Claus Gittinger <cg@exept.de>
parents:
4032
diff
changeset
|
830 |
shown ifTrue:[ |
3de2582320a0
for now, set the window-label in utf8
Claus Gittinger <cg@exept.de>
parents:
4032
diff
changeset
|
831 |
" |
3de2582320a0
for now, set the window-label in utf8
Claus Gittinger <cg@exept.de>
parents:
4032
diff
changeset
|
832 |
unbuffered - to make it visible right NOW |
3de2582320a0
for now, set the window-label in utf8
Claus Gittinger <cg@exept.de>
parents:
4032
diff
changeset
|
833 |
" |
3de2582320a0
for now, set the window-label in utf8
Claus Gittinger <cg@exept.de>
parents:
4032
diff
changeset
|
834 |
device flush. |
3de2582320a0
for now, set the window-label in utf8
Claus Gittinger <cg@exept.de>
parents:
4032
diff
changeset
|
835 |
] |
3de2582320a0
for now, set the window-label in utf8
Claus Gittinger <cg@exept.de>
parents:
4032
diff
changeset
|
836 |
] |
269 | 837 |
] |
838 |
||
2218
f3e1685b3698
no need to change the label immediately if not shown.
Claus Gittinger <cg@exept.de>
parents:
2217
diff
changeset
|
839 |
"Created: / 8.9.1995 / 19:37:06 / claus" |
f3e1685b3698
no need to change the label immediately if not shown.
Claus Gittinger <cg@exept.de>
parents:
2217
diff
changeset
|
840 |
"Modified: / 8.9.1995 / 19:39:18 / claus" |
f3e1685b3698
no need to change the label immediately if not shown.
Claus Gittinger <cg@exept.de>
parents:
2217
diff
changeset
|
841 |
"Modified: / 3.8.1998 / 17:05:10 / cg" |
0 | 842 |
! |
843 |
||
269 | 844 |
label:labelString iconLabel:iconLabelString |
845 |
"set both the label and the iconLabel" |
|
846 |
||
847 |
self label:labelString. |
|
848 |
self iconLabel:iconLabelString |
|
849 |
! ! |
|
850 |
||
3408
42384f123133
Add labelChannel and visibilityChannel to WindowSpec/StandardSystemView
Stefan Vogel <sv@exept.de>
parents:
3393
diff
changeset
|
851 |
!StandardSystemView methodsFor:'change & update'! |
42384f123133
Add labelChannel and visibilityChannel to WindowSpec/StandardSystemView
Stefan Vogel <sv@exept.de>
parents:
3393
diff
changeset
|
852 |
|
42384f123133
Add labelChannel and visibilityChannel to WindowSpec/StandardSystemView
Stefan Vogel <sv@exept.de>
parents:
3393
diff
changeset
|
853 |
update:something with:aParameter from:changedObject |
42384f123133
Add labelChannel and visibilityChannel to WindowSpec/StandardSystemView
Stefan Vogel <sv@exept.de>
parents:
3393
diff
changeset
|
854 |
"the MVC way of changing the label ..." |
42384f123133
Add labelChannel and visibilityChannel to WindowSpec/StandardSystemView
Stefan Vogel <sv@exept.de>
parents:
3393
diff
changeset
|
855 |
|
42384f123133
Add labelChannel and visibilityChannel to WindowSpec/StandardSystemView
Stefan Vogel <sv@exept.de>
parents:
3393
diff
changeset
|
856 |
changedObject notNil ifTrue:[ |
42384f123133
Add labelChannel and visibilityChannel to WindowSpec/StandardSystemView
Stefan Vogel <sv@exept.de>
parents:
3393
diff
changeset
|
857 |
changedObject == labelChannel ifTrue:[ |
42384f123133
Add labelChannel and visibilityChannel to WindowSpec/StandardSystemView
Stefan Vogel <sv@exept.de>
parents:
3393
diff
changeset
|
858 |
self label:labelChannel value. |
42384f123133
Add labelChannel and visibilityChannel to WindowSpec/StandardSystemView
Stefan Vogel <sv@exept.de>
parents:
3393
diff
changeset
|
859 |
^ self |
42384f123133
Add labelChannel and visibilityChannel to WindowSpec/StandardSystemView
Stefan Vogel <sv@exept.de>
parents:
3393
diff
changeset
|
860 |
]. |
42384f123133
Add labelChannel and visibilityChannel to WindowSpec/StandardSystemView
Stefan Vogel <sv@exept.de>
parents:
3393
diff
changeset
|
861 |
]. |
42384f123133
Add labelChannel and visibilityChannel to WindowSpec/StandardSystemView
Stefan Vogel <sv@exept.de>
parents:
3393
diff
changeset
|
862 |
^ super update:something with:aParameter from:changedObject |
42384f123133
Add labelChannel and visibilityChannel to WindowSpec/StandardSystemView
Stefan Vogel <sv@exept.de>
parents:
3393
diff
changeset
|
863 |
! ! |
42384f123133
Add labelChannel and visibilityChannel to WindowSpec/StandardSystemView
Stefan Vogel <sv@exept.de>
parents:
3393
diff
changeset
|
864 |
|
269 | 865 |
!StandardSystemView methodsFor:'destroying'! |
866 |
||
3706 | 867 |
release |
269 | 868 |
self removeFromCurrentProject. |
3408
42384f123133
Add labelChannel and visibilityChannel to WindowSpec/StandardSystemView
Stefan Vogel <sv@exept.de>
parents:
3393
diff
changeset
|
869 |
labelChannel notNil ifTrue:[ |
42384f123133
Add labelChannel and visibilityChannel to WindowSpec/StandardSystemView
Stefan Vogel <sv@exept.de>
parents:
3393
diff
changeset
|
870 |
labelChannel removeDependent:self. |
42384f123133
Add labelChannel and visibilityChannel to WindowSpec/StandardSystemView
Stefan Vogel <sv@exept.de>
parents:
3393
diff
changeset
|
871 |
labelChannel := nil. |
42384f123133
Add labelChannel and visibilityChannel to WindowSpec/StandardSystemView
Stefan Vogel <sv@exept.de>
parents:
3393
diff
changeset
|
872 |
]. |
269 | 873 |
windowGroup notNil ifTrue:[ |
3383
111b54361247
postOpenedWith, windowEvent and noticeOfWindow-Whatever
tm
parents:
3369
diff
changeset
|
874 |
windowGroup focusSequence:nil. |
269 | 875 |
]. |
3706 | 876 |
super release. |
0 | 877 |
! |
878 |
||
269 | 879 |
saveAndTerminate |
880 |
"save & terminate request from the windowManager. The application should |
|
881 |
save its data/files/text etc. somehow and close. |
|
882 |
If there is an application, let it decide how do do that. |
|
883 |
Otherwise, forward it to superclasses which knows how to do this. |
|
884 |
(it defaults to a terminate there). |
|
885 |
Notice, that not all windowmanagers are nice enough |
|
886 |
to send this request; some simply distroy the view." |
|
887 |
||
888 |
application notNil ifTrue:[ |
|
1696
ba6085a629e0
replaced isPopUp flag in #createWindow by a more general #style symbol argument
Claus Gittinger <cg@exept.de>
parents:
1612
diff
changeset
|
889 |
application saveAndTerminateRequestFor:self |
269 | 890 |
] ifFalse:[ |
1696
ba6085a629e0
replaced isPopUp flag in #createWindow by a more general #style symbol argument
Claus Gittinger <cg@exept.de>
parents:
1612
diff
changeset
|
891 |
super saveAndTerminate |
269 | 892 |
] |
893 |
! |
|
894 |
||
895 |
terminate |
|
896 |
"terminate request from the windowManager. If there is an application, |
|
897 |
let it decide if it really wants to be close. Otherwise, forward it to |
|
898 |
superclasses terminate which knows how to do this. |
|
899 |
Notice, that not all windowmanagers are nice enough |
|
900 |
to send this request; some simply distroy the view." |
|
901 |
||
902 |
application notNil ifTrue:[ |
|
2303 | 903 |
application closeRequestFor:self |
269 | 904 |
] ifFalse:[ |
2303 | 905 |
self closeRequest. |
269 | 906 |
] |
2217
8ce6a3da5bab
#terminate -> #closeRequest -> #destroy
Claus Gittinger <cg@exept.de>
parents:
2165
diff
changeset
|
907 |
|
8ce6a3da5bab
#terminate -> #closeRequest -> #destroy
Claus Gittinger <cg@exept.de>
parents:
2165
diff
changeset
|
908 |
"Modified: / 3.8.1998 / 19:49:45 / cg" |
269 | 909 |
! ! |
910 |
||
911 |
!StandardSystemView methodsFor:'event handling'! |
|
912 |
||
913 |
focusIn |
|
2582
849551c05f70
focus handling (restore focusView when topView is re-entered)
Claus Gittinger <cg@exept.de>
parents:
2573
diff
changeset
|
914 |
"the view got the keyboard focus (via the window manager). |
849551c05f70
focus handling (restore focusView when topView is re-entered)
Claus Gittinger <cg@exept.de>
parents:
2573
diff
changeset
|
915 |
I.e. the mouse was moved out into the topView area - restore the |
849551c05f70
focus handling (restore focusView when topView is re-entered)
Claus Gittinger <cg@exept.de>
parents:
2573
diff
changeset
|
916 |
focus to the previous focusView.." |
269 | 917 |
|
918 |
|v| |
|
919 |
||
920 |
windowGroup notNil ifTrue:[ |
|
4178
e176977f5f2c
initial focus - allow explicit setup via InputFieldSpec
Claus Gittinger <cg@exept.de>
parents:
4130
diff
changeset
|
921 |
"/ I got the focus - tell the current focus-windowgroup |
e176977f5f2c
initial focus - allow explicit setup via InputFieldSpec
Claus Gittinger <cg@exept.de>
parents:
4130
diff
changeset
|
922 |
"/ that its focus is gone elsewhere ... |
2742
7013a6aafebd
added extra query: #wantsFocusWithPointerEnter;
Claus Gittinger <cg@exept.de>
parents:
2739
diff
changeset
|
923 |
"/ 'focusIn ' print. windowGroup process name printCR. |
7013a6aafebd
added extra query: #wantsFocusWithPointerEnter;
Claus Gittinger <cg@exept.de>
parents:
2739
diff
changeset
|
924 |
"/ 'focusView is ' print. windowGroup focusView printCR. |
2722
6fa197cfc572
take focus from focus-group, when getting the focus
Claus Gittinger <cg@exept.de>
parents:
2694
diff
changeset
|
925 |
|
4178
e176977f5f2c
initial focus - allow explicit setup via InputFieldSpec
Claus Gittinger <cg@exept.de>
parents:
4130
diff
changeset
|
926 |
WindowGroup takeFocusFromDevice:device. |
2722
6fa197cfc572
take focus from focus-group, when getting the focus
Claus Gittinger <cg@exept.de>
parents:
2694
diff
changeset
|
927 |
|
4178
e176977f5f2c
initial focus - allow explicit setup via InputFieldSpec
Claus Gittinger <cg@exept.de>
parents:
4130
diff
changeset
|
928 |
v := windowGroup focusView. |
e176977f5f2c
initial focus - allow explicit setup via InputFieldSpec
Claus Gittinger <cg@exept.de>
parents:
4130
diff
changeset
|
929 |
v isNil ifTrue:[ |
e176977f5f2c
initial focus - allow explicit setup via InputFieldSpec
Claus Gittinger <cg@exept.de>
parents:
4130
diff
changeset
|
930 |
UserPreferences current focusFollowsMouse ~~ false ifTrue:[ |
e176977f5f2c
initial focus - allow explicit setup via InputFieldSpec
Claus Gittinger <cg@exept.de>
parents:
4130
diff
changeset
|
931 |
v := windowGroup pointerView. |
2742
7013a6aafebd
added extra query: #wantsFocusWithPointerEnter;
Claus Gittinger <cg@exept.de>
parents:
2739
diff
changeset
|
932 |
"/ 'pointerView is ' print. v printCR. |
4178
e176977f5f2c
initial focus - allow explicit setup via InputFieldSpec
Claus Gittinger <cg@exept.de>
parents:
4130
diff
changeset
|
933 |
(v notNil |
e176977f5f2c
initial focus - allow explicit setup via InputFieldSpec
Claus Gittinger <cg@exept.de>
parents:
4130
diff
changeset
|
934 |
and:[v isKeyboardConsumer not |
e176977f5f2c
initial focus - allow explicit setup via InputFieldSpec
Claus Gittinger <cg@exept.de>
parents:
4130
diff
changeset
|
935 |
and:[v wantsFocusWithPointerEnter not]]) ifTrue:[ |
e176977f5f2c
initial focus - allow explicit setup via InputFieldSpec
Claus Gittinger <cg@exept.de>
parents:
4130
diff
changeset
|
936 |
"/ no - not this one |
2742
7013a6aafebd
added extra query: #wantsFocusWithPointerEnter;
Claus Gittinger <cg@exept.de>
parents:
2739
diff
changeset
|
937 |
"/ 'not a kbdConsumer' printCR. |
4178
e176977f5f2c
initial focus - allow explicit setup via InputFieldSpec
Claus Gittinger <cg@exept.de>
parents:
4130
diff
changeset
|
938 |
v := nil. |
e176977f5f2c
initial focus - allow explicit setup via InputFieldSpec
Claus Gittinger <cg@exept.de>
parents:
4130
diff
changeset
|
939 |
] |
e176977f5f2c
initial focus - allow explicit setup via InputFieldSpec
Claus Gittinger <cg@exept.de>
parents:
4130
diff
changeset
|
940 |
] |
e176977f5f2c
initial focus - allow explicit setup via InputFieldSpec
Claus Gittinger <cg@exept.de>
parents:
4130
diff
changeset
|
941 |
]. |
e176977f5f2c
initial focus - allow explicit setup via InputFieldSpec
Claus Gittinger <cg@exept.de>
parents:
4130
diff
changeset
|
942 |
v isNil ifTrue:[ |
e176977f5f2c
initial focus - allow explicit setup via InputFieldSpec
Claus Gittinger <cg@exept.de>
parents:
4130
diff
changeset
|
943 |
self assignInitialKeyboardFocus. |
e176977f5f2c
initial focus - allow explicit setup via InputFieldSpec
Claus Gittinger <cg@exept.de>
parents:
4130
diff
changeset
|
944 |
] ifFalse:[ |
e176977f5f2c
initial focus - allow explicit setup via InputFieldSpec
Claus Gittinger <cg@exept.de>
parents:
4130
diff
changeset
|
945 |
"/ v requestFocus. - will be denied; but we must force it here |
e176977f5f2c
initial focus - allow explicit setup via InputFieldSpec
Claus Gittinger <cg@exept.de>
parents:
4130
diff
changeset
|
946 |
windowGroup focusView:v byTab:false. |
e176977f5f2c
initial focus - allow explicit setup via InputFieldSpec
Claus Gittinger <cg@exept.de>
parents:
4130
diff
changeset
|
947 |
] |
269 | 948 |
]. |
1382 | 949 |
super focusIn |
655 | 950 |
|
2722
6fa197cfc572
take focus from focus-group, when getting the focus
Claus Gittinger <cg@exept.de>
parents:
2694
diff
changeset
|
951 |
"Modified: / 23.5.1999 / 14:00:20 / cg" |
269 | 952 |
! |
953 |
||
2582
849551c05f70
focus handling (restore focusView when topView is re-entered)
Claus Gittinger <cg@exept.de>
parents:
2573
diff
changeset
|
954 |
focusOut |
849551c05f70
focus handling (restore focusView when topView is re-entered)
Claus Gittinger <cg@exept.de>
parents:
2573
diff
changeset
|
955 |
"the top-view lost the keyboard focus (via the window manager). |
849551c05f70
focus handling (restore focusView when topView is re-entered)
Claus Gittinger <cg@exept.de>
parents:
2573
diff
changeset
|
956 |
I.e. the mouse was moved out of the topView area." |
849551c05f70
focus handling (restore focusView when topView is re-entered)
Claus Gittinger <cg@exept.de>
parents:
2573
diff
changeset
|
957 |
|
849551c05f70
focus handling (restore focusView when topView is re-entered)
Claus Gittinger <cg@exept.de>
parents:
2573
diff
changeset
|
958 |
|v| |
849551c05f70
focus handling (restore focusView when topView is re-entered)
Claus Gittinger <cg@exept.de>
parents:
2573
diff
changeset
|
959 |
|
849551c05f70
focus handling (restore focusView when topView is re-entered)
Claus Gittinger <cg@exept.de>
parents:
2573
diff
changeset
|
960 |
windowGroup notNil ifTrue:[ |
3152 | 961 |
(v := windowGroup focusView) notNil ifTrue:[ |
962 |
v showNoFocus:(windowGroup explicitFocusView == v). |
|
963 |
v hasKeyboardFocus:false. |
|
964 |
] |
|
2582
849551c05f70
focus handling (restore focusView when topView is re-entered)
Claus Gittinger <cg@exept.de>
parents:
2573
diff
changeset
|
965 |
]. |
849551c05f70
focus handling (restore focusView when topView is re-entered)
Claus Gittinger <cg@exept.de>
parents:
2573
diff
changeset
|
966 |
super focusOut |
849551c05f70
focus handling (restore focusView when topView is re-entered)
Claus Gittinger <cg@exept.de>
parents:
2573
diff
changeset
|
967 |
|
849551c05f70
focus handling (restore focusView when topView is re-entered)
Claus Gittinger <cg@exept.de>
parents:
2573
diff
changeset
|
968 |
"Modified: 25.2.1997 / 23:19:46 / cg" |
849551c05f70
focus handling (restore focusView when topView is re-entered)
Claus Gittinger <cg@exept.de>
parents:
2573
diff
changeset
|
969 |
! |
849551c05f70
focus handling (restore focusView when topView is re-entered)
Claus Gittinger <cg@exept.de>
parents:
2573
diff
changeset
|
970 |
|
328 | 971 |
showActivity:someMessage |
597 | 972 |
"some activityNotification shalt be communicated to |
973 |
the user. Forward it to my application (if any). |
|
974 |
(that one should know how to deal with it). |
|
975 |
Otherwise, simply ignore it." |
|
976 |
||
328 | 977 |
application notNil ifTrue:[ |
1696
ba6085a629e0
replaced isPopUp flag in #createWindow by a more general #style symbol argument
Claus Gittinger <cg@exept.de>
parents:
1612
diff
changeset
|
978 |
application showActivity:someMessage |
328 | 979 |
] |
980 |
||
981 |
"Created: 16.12.1995 / 18:40:44 / cg" |
|
597 | 982 |
"Modified: 23.4.1996 / 21:38:11 / cg" |
0 | 983 |
! ! |
984 |
||
3883 | 985 |
!StandardSystemView methodsFor:'initialization & release'! |
0 | 986 |
|
987 |
addToCurrentProject |
|
46 | 988 |
"add the receiver (a topview) to the current projects set-of-views. |
989 |
(If there is a current project)" |
|
990 |
||
72 | 991 |
|p| |
69 | 992 |
|
993 |
" |
|
72 | 994 |
the following check allows systems |
995 |
without projects and changeSets |
|
69 | 996 |
" |
72 | 997 |
(Project notNil and:[(p := Project current) notNil]) ifTrue:[ |
998 |
p addView: self |
|
69 | 999 |
] |
1000 |
! |
|
12 | 1001 |
|
269 | 1002 |
defaultControllerClass |
1003 |
"for ST-80 compatibility only - not used in ST/X" |
|
1004 |
||
1005 |
^ nil "/ StandardSystemController |
|
1006 |
! |
|
1007 |
||
1008 |
initEvents |
|
1009 |
super initEvents. |
|
1010 |
self enableFocusEvents. |
|
1011 |
! |
|
1012 |
||
1013 |
initialize |
|
1014 |
super initialize. |
|
69 | 1015 |
|
269 | 1016 |
borderWidth := 2. "- notice: many window managers ignore this" |
2651
8f800d7bcee3
send minExtend/maxExtend changes down to the device.
Claus Gittinger <cg@exept.de>
parents:
2644
diff
changeset
|
1017 |
device platformName = 'WIN32' ifTrue:[ |
4197
1984b2ba83de
Do not set maxExtent (to the Screen size) in StandartSystemView.
Stefan Vogel <sv@exept.de>
parents:
4178
diff
changeset
|
1018 |
minExtent := 0 @ 0. |
2651
8f800d7bcee3
send minExtend/maxExtend changes down to the device.
Claus Gittinger <cg@exept.de>
parents:
2644
diff
changeset
|
1019 |
] ifFalse:[ |
4197
1984b2ba83de
Do not set maxExtent (to the Screen size) in StandartSystemView.
Stefan Vogel <sv@exept.de>
parents:
4178
diff
changeset
|
1020 |
minExtent := 10 @ 10. |
2651
8f800d7bcee3
send minExtend/maxExtend changes down to the device.
Claus Gittinger <cg@exept.de>
parents:
2644
diff
changeset
|
1021 |
]. |
4197
1984b2ba83de
Do not set maxExtent (to the Screen size) in StandartSystemView.
Stefan Vogel <sv@exept.de>
parents:
4178
diff
changeset
|
1022 |
|
1984b2ba83de
Do not set maxExtent (to the Screen size) in StandartSystemView.
Stefan Vogel <sv@exept.de>
parents:
4178
diff
changeset
|
1023 |
"/ This code is bad for 2 reasons: |
1984b2ba83de
Do not set maxExtent (to the Screen size) in StandartSystemView.
Stefan Vogel <sv@exept.de>
parents:
4178
diff
changeset
|
1024 |
"/ - KDE (3.2) WM does not show the maximize button if the maxExtent is restricted. |
1984b2ba83de
Do not set maxExtent (to the Screen size) in StandartSystemView.
Stefan Vogel <sv@exept.de>
parents:
4178
diff
changeset
|
1025 |
"/ - why restrict the size of a window? |
1984b2ba83de
Do not set maxExtent (to the Screen size) in StandartSystemView.
Stefan Vogel <sv@exept.de>
parents:
4178
diff
changeset
|
1026 |
"/ maxExtent := device usableExtent "- (0 @ device captionHeight)". |
1984b2ba83de
Do not set maxExtent (to the Screen size) in StandartSystemView.
Stefan Vogel <sv@exept.de>
parents:
4178
diff
changeset
|
1027 |
|
269 | 1028 |
label isNil ifTrue:[label := self class defaultLabel]. |
1029 |
icon isNil ifTrue:[icon := self class defaultIcon]. |
|
857
df5125310d86
New method #setWindowClass:name:in: to give a hint to the window manager.
Stefan Vogel <sv@exept.de>
parents:
827
diff
changeset
|
1030 |
|
df5125310d86
New method #setWindowClass:name:in: to give a hint to the window manager.
Stefan Vogel <sv@exept.de>
parents:
827
diff
changeset
|
1031 |
"Modified: 14.6.1996 / 17:18:28 / stefan" |
269 | 1032 |
! |
1033 |
||
1034 |
reAdjustGeometry |
|
504
bc7734000bd3
windowGroup pulls focusSequence from topView (used to be pushed into it)
Claus Gittinger <cg@exept.de>
parents:
385
diff
changeset
|
1035 |
"sent as a final step when an image is restarted. |
bc7734000bd3
windowGroup pulls focusSequence from topView (used to be pushed into it)
Claus Gittinger <cg@exept.de>
parents:
385
diff
changeset
|
1036 |
when we come up on a smaller display, |
269 | 1037 |
make certain, that the receiver is visible" |
1038 |
||
1039 |
|dX dY limitRight limitBottom| |
|
1040 |
||
1041 |
dX := (device horizontalPixelPerMillimeter * 20) rounded. |
|
1042 |
dY := (device verticalPixelPerMillimeter * 20) rounded. |
|
69 | 1043 |
|
1703 | 1044 |
limitRight := device usableWidth - dX. |
1045 |
limitBottom := device usableHeight - dY. |
|
269 | 1046 |
((self left > limitRight) or:[ |
1047 |
self top > limitBottom]) ifTrue:[ |
|
1696
ba6085a629e0
replaced isPopUp flag in #createWindow by a more general #style symbol argument
Claus Gittinger <cg@exept.de>
parents:
1612
diff
changeset
|
1048 |
'StandardSystemView [info]: moving view into visible area' infoPrintCR. |
ba6085a629e0
replaced isPopUp flag in #createWindow by a more general #style symbol argument
Claus Gittinger <cg@exept.de>
parents:
1612
diff
changeset
|
1049 |
self origin:limitRight @ limitBottom |
269 | 1050 |
] |
1051 |
||
1163 | 1052 |
"Modified: 10.1.1997 / 15:12:19 / cg" |
0 | 1053 |
! |
1054 |
||
24 | 1055 |
reinitialize |
46 | 1056 |
"reopen the receiver if if was visible before. |
1057 |
This is called right after snapIn; Notice, that all instance variables |
|
72 | 1058 |
(such as shown, realized etc.) are left-overs from the time the snapout |
46 | 1059 |
was done. Remap the receiver, if it was mapped at snapout time" |
24 | 1060 |
|
1061 |
|myController| |
|
1062 |
||
1063 |
"if I have already been reinited - return" |
|
1064 |
drawableId notNil ifTrue:[ |
|
3152 | 1065 |
^ self |
24 | 1066 |
]. |
1067 |
||
46 | 1068 |
"have to kludge with the controller |
1069 |
- otherwise its startup performs unwanted actions ..." |
|
1070 |
||
24 | 1071 |
myController := controller. |
1072 |
controller := nil. |
|
46 | 1073 |
|
1074 |
"physically create the view & subviews" |
|
24 | 1075 |
self recreate. |
1076 |
||
2644
bb15778539af
oops - restart with iconified views recreated them
Claus Gittinger <cg@exept.de>
parents:
2605
diff
changeset
|
1077 |
"if I was iconified (not realized), remap iconified" |
bb15778539af
oops - restart with iconified views recreated them
Claus Gittinger <cg@exept.de>
parents:
2605
diff
changeset
|
1078 |
device |
3152 | 1079 |
mapView:self id:drawableId iconified:(realized "shown" not) |
1080 |
atX:left y:top width:width height:height |
|
1081 |
minExtent:minExtent maxExtent:maxExtent. |
|
24 | 1082 |
|
2644
bb15778539af
oops - restart with iconified views recreated them
Claus Gittinger <cg@exept.de>
parents:
2605
diff
changeset
|
1083 |
"and restart the window-group process" |
bb15778539af
oops - restart with iconified views recreated them
Claus Gittinger <cg@exept.de>
parents:
2605
diff
changeset
|
1084 |
windowGroup notNil ifTrue:[ |
3152 | 1085 |
windowGroup restart |
24 | 1086 |
]. |
1087 |
||
1088 |
"restore controller" |
|
1089 |
controller := myController |
|
2644
bb15778539af
oops - restart with iconified views recreated them
Claus Gittinger <cg@exept.de>
parents:
2605
diff
changeset
|
1090 |
|
bb15778539af
oops - restart with iconified views recreated them
Claus Gittinger <cg@exept.de>
parents:
2605
diff
changeset
|
1091 |
"Modified: / 6.5.1999 / 09:50:13 / cg" |
24 | 1092 |
! |
1093 |
||
269 | 1094 |
removeFromCurrentProject |
1095 |
"remove the receiver (a topview) from the current projects set-of-views. |
|
1096 |
(If there is a current project)" |
|
46 | 1097 |
|
269 | 1098 |
|p| |
12 | 1099 |
|
269 | 1100 |
" |
1101 |
the following check allows systems |
|
1102 |
without projects and changeSets |
|
1103 |
" |
|
1104 |
(Project notNil and:[(p := Project current) notNil]) ifTrue:[ |
|
1105 |
p removeView:self |
|
89 | 1106 |
] |
1107 |
! |
|
1108 |
||
140 | 1109 |
restarted |
1110 |
"sent by my windowGroup, when restarted from an image. |
|
1111 |
Nothing done here, but can be redefined to perform any actions |
|
1112 |
required to reset the application after an image-restart. |
|
1113 |
(for example: check if application files are still around, restart |
|
1114 |
subprocesses etc.)." |
|
1115 |
||
1116 |
application notNil ifTrue:[ |
|
1117 |
application restarted |
|
1118 |
]. |
|
0 | 1119 |
! ! |
1120 |
||
269 | 1121 |
!StandardSystemView methodsFor:'printing & storing'! |
142 | 1122 |
|
269 | 1123 |
displayString |
1124 |
"just for your convenience in inspectors ... |
|
1125 |
... add the views label to the displayString." |
|
142 | 1126 |
|
269 | 1127 |
|s| |
142 | 1128 |
|
269 | 1129 |
s := super displayString. |
1130 |
label notNil ifTrue:[ |
|
1131 |
s := s , '(' , label , ')' |
|
157 | 1132 |
]. |
269 | 1133 |
^ s |
0 | 1134 |
! ! |
1135 |
||
24 | 1136 |
!StandardSystemView methodsFor:'private'! |
1137 |
||
1138 |
convertedIcon |
|
1425
c6963c38dcd8
preparations for iconMasks (for windows)
Claus Gittinger <cg@exept.de>
parents:
1405
diff
changeset
|
1139 |
"make certain, that the icon is compatible with my device; |
c6963c38dcd8
preparations for iconMasks (for windows)
Claus Gittinger <cg@exept.de>
parents:
1405
diff
changeset
|
1140 |
this means converting it to a format (typically: monochrome) which |
c6963c38dcd8
preparations for iconMasks (for windows)
Claus Gittinger <cg@exept.de>
parents:
1405
diff
changeset
|
1141 |
the device supports. Return a compatible version of the icon." |
24 | 1142 |
|
816 | 1143 |
^ self convertedIcon:icon |
1144 |
||
1145 |
"Modified: 10.6.1996 / 19:42:20 / cg" |
|
1146 |
! |
|
1147 |
||
4320 | 1148 |
convertedIcon:iconArg |
1425
c6963c38dcd8
preparations for iconMasks (for windows)
Claus Gittinger <cg@exept.de>
parents:
1405
diff
changeset
|
1149 |
"make certain, that the image argument is compatible with my device; |
c6963c38dcd8
preparations for iconMasks (for windows)
Claus Gittinger <cg@exept.de>
parents:
1405
diff
changeset
|
1150 |
this means converting it to a format (typically: monochrome) which |
c6963c38dcd8
preparations for iconMasks (for windows)
Claus Gittinger <cg@exept.de>
parents:
1405
diff
changeset
|
1151 |
the device supports. Return a compatible version of the icon." |
816 | 1152 |
|
4320 | 1153 |
|deviceIcon d toMono toDeep icon| |
24 | 1154 |
|
4320 | 1155 |
icon := iconArg value. |
24 | 1156 |
icon isNil ifTrue:[^ nil]. |
1157 |
||
825 | 1158 |
toMono := toDeep := false. |
1159 |
||
1160 |
d := icon depth. |
|
81 | 1161 |
device supportsDeepIcons ifFalse:[ |
4320 | 1162 |
(d ~~ 1 or:[icon isImage]) ifTrue:[ |
1163 |
" |
|
1164 |
dither to monochrome |
|
1165 |
" |
|
1166 |
toMono := true. |
|
1167 |
] |
|
816 | 1168 |
] ifTrue:[ |
4320 | 1169 |
d == 1 ifTrue:[ |
1170 |
icon colorMap notNil ifTrue:[ |
|
1171 |
icon isImage ifFalse:[ |
|
1172 |
toMono := true. |
|
1173 |
] ifTrue:[ |
|
1174 |
toDeep := true. |
|
1175 |
] |
|
1176 |
] |
|
1177 |
] ifFalse:[ |
|
1178 |
d ~~ device depth ifTrue:[ |
|
1179 |
icon isImage ifFalse:[ |
|
1180 |
toMono := true. |
|
1181 |
] ifTrue:[ |
|
1182 |
toDeep := true. |
|
1183 |
] |
|
1184 |
] |
|
1185 |
] |
|
825 | 1186 |
]. |
1187 |
||
1188 |
deviceIcon := icon. |
|
1189 |
toMono ifTrue:[ |
|
4320 | 1190 |
deviceIcon := icon asMonochromeFormOn:device. |
825 | 1191 |
]. |
1192 |
toDeep ifTrue:[ |
|
4320 | 1193 |
deviceIcon := (Image implementorForDepth:device depth) |
1194 |
fromImage:icon. |
|
24 | 1195 |
]. |
816 | 1196 |
|
24 | 1197 |
deviceIcon notNil ifTrue:[ |
4320 | 1198 |
" |
1199 |
get device pixmap (i.e. allocate colors & resource) |
|
1200 |
" |
|
1201 |
deviceIcon := deviceIcon onDevice:device |
|
24 | 1202 |
]. |
1203 |
^ deviceIcon |
|
816 | 1204 |
|
1205 |
"Created: 10.6.1996 / 19:41:31 / cg" |
|
1755 | 1206 |
"Modified: 17.6.1997 / 11:46:44 / cg" |
193 | 1207 |
! |
1208 |
||
1425
c6963c38dcd8
preparations for iconMasks (for windows)
Claus Gittinger <cg@exept.de>
parents:
1405
diff
changeset
|
1209 |
convertedIconMask:aMask |
c6963c38dcd8
preparations for iconMasks (for windows)
Claus Gittinger <cg@exept.de>
parents:
1405
diff
changeset
|
1210 |
"return a version of the argument which can be used as an iconMask |
c6963c38dcd8
preparations for iconMasks (for windows)
Claus Gittinger <cg@exept.de>
parents:
1405
diff
changeset
|
1211 |
on my device. Typically, this means conversion to a monochrome |
c6963c38dcd8
preparations for iconMasks (for windows)
Claus Gittinger <cg@exept.de>
parents:
1405
diff
changeset
|
1212 |
mask - future versions may add alpha channel masks, if the device supports |
c6963c38dcd8
preparations for iconMasks (for windows)
Claus Gittinger <cg@exept.de>
parents:
1405
diff
changeset
|
1213 |
them ..." |
c6963c38dcd8
preparations for iconMasks (for windows)
Claus Gittinger <cg@exept.de>
parents:
1405
diff
changeset
|
1214 |
|
2605
951cf4e422be
ask device if it supports icon masks
Claus Gittinger <cg@exept.de>
parents:
2582
diff
changeset
|
1215 |
device supportsIconMasks ifFalse:[^ nil]. |
951cf4e422be
ask device if it supports icon masks
Claus Gittinger <cg@exept.de>
parents:
2582
diff
changeset
|
1216 |
|
1425
c6963c38dcd8
preparations for iconMasks (for windows)
Claus Gittinger <cg@exept.de>
parents:
1405
diff
changeset
|
1217 |
aMask depth ~~ 1 ifTrue:[ |
3152 | 1218 |
^ aMask asMonochromeFormOn:device |
1425
c6963c38dcd8
preparations for iconMasks (for windows)
Claus Gittinger <cg@exept.de>
parents:
1405
diff
changeset
|
1219 |
]. |
c6963c38dcd8
preparations for iconMasks (for windows)
Claus Gittinger <cg@exept.de>
parents:
1405
diff
changeset
|
1220 |
^ aMask |
2605
951cf4e422be
ask device if it supports icon masks
Claus Gittinger <cg@exept.de>
parents:
2582
diff
changeset
|
1221 |
|
951cf4e422be
ask device if it supports icon masks
Claus Gittinger <cg@exept.de>
parents:
2582
diff
changeset
|
1222 |
"Modified: / 28.4.1999 / 20:00:00 / cg" |
1425
c6963c38dcd8
preparations for iconMasks (for windows)
Claus Gittinger <cg@exept.de>
parents:
1405
diff
changeset
|
1223 |
! |
c6963c38dcd8
preparations for iconMasks (for windows)
Claus Gittinger <cg@exept.de>
parents:
1405
diff
changeset
|
1224 |
|
193 | 1225 |
setWindowGroupFromApplication |
504
bc7734000bd3
windowGroup pulls focusSequence from topView (used to be pushed into it)
Claus Gittinger <cg@exept.de>
parents:
385
diff
changeset
|
1226 |
"get the applications topView and set my windowGroup to its wg." |
bc7734000bd3
windowGroup pulls focusSequence from topView (used to be pushed into it)
Claus Gittinger <cg@exept.de>
parents:
385
diff
changeset
|
1227 |
|
3746
d9dccd3a4a41
beSlave: also try masterApp in setWGFromApplication
Claus Gittinger <cg@exept.de>
parents:
3706
diff
changeset
|
1228 |
|win master| |
193 | 1229 |
|
1230 |
windowGroup isNil ifTrue:[ |
|
3746
d9dccd3a4a41
beSlave: also try masterApp in setWGFromApplication
Claus Gittinger <cg@exept.de>
parents:
3706
diff
changeset
|
1231 |
application notNil ifTrue:[ |
d9dccd3a4a41
beSlave: also try masterApp in setWGFromApplication
Claus Gittinger <cg@exept.de>
parents:
3706
diff
changeset
|
1232 |
(win := application window) notNil ifTrue:[ |
d9dccd3a4a41
beSlave: also try masterApp in setWGFromApplication
Claus Gittinger <cg@exept.de>
parents:
3706
diff
changeset
|
1233 |
win ~~ self ifTrue:[ |
d9dccd3a4a41
beSlave: also try masterApp in setWGFromApplication
Claus Gittinger <cg@exept.de>
parents:
3706
diff
changeset
|
1234 |
windowGroup := win windowGroup. |
d9dccd3a4a41
beSlave: also try masterApp in setWGFromApplication
Claus Gittinger <cg@exept.de>
parents:
3706
diff
changeset
|
1235 |
^ self |
d9dccd3a4a41
beSlave: also try masterApp in setWGFromApplication
Claus Gittinger <cg@exept.de>
parents:
3706
diff
changeset
|
1236 |
]. |
d9dccd3a4a41
beSlave: also try masterApp in setWGFromApplication
Claus Gittinger <cg@exept.de>
parents:
3706
diff
changeset
|
1237 |
(master := application masterApplication) notNil ifTrue:[ |
d9dccd3a4a41
beSlave: also try masterApp in setWGFromApplication
Claus Gittinger <cg@exept.de>
parents:
3706
diff
changeset
|
1238 |
(win := master window) notNil ifTrue:[ |
d9dccd3a4a41
beSlave: also try masterApp in setWGFromApplication
Claus Gittinger <cg@exept.de>
parents:
3706
diff
changeset
|
1239 |
windowGroup := win windowGroup. |
d9dccd3a4a41
beSlave: also try masterApp in setWGFromApplication
Claus Gittinger <cg@exept.de>
parents:
3706
diff
changeset
|
1240 |
^ self |
d9dccd3a4a41
beSlave: also try masterApp in setWGFromApplication
Claus Gittinger <cg@exept.de>
parents:
3706
diff
changeset
|
1241 |
]. |
d9dccd3a4a41
beSlave: also try masterApp in setWGFromApplication
Claus Gittinger <cg@exept.de>
parents:
3706
diff
changeset
|
1242 |
]. |
d9dccd3a4a41
beSlave: also try masterApp in setWGFromApplication
Claus Gittinger <cg@exept.de>
parents:
3706
diff
changeset
|
1243 |
] |
d9dccd3a4a41
beSlave: also try masterApp in setWGFromApplication
Claus Gittinger <cg@exept.de>
parents:
3706
diff
changeset
|
1244 |
] |
193 | 1245 |
]. |
1246 |
||
1247 |
"Created: 22.9.1995 / 17:40:36 / claus" |
|
504
bc7734000bd3
windowGroup pulls focusSequence from topView (used to be pushed into it)
Claus Gittinger <cg@exept.de>
parents:
385
diff
changeset
|
1248 |
"Modified: 6.3.1996 / 16:17:32 / cg" |
1915
f86162de1a2f
extracted windowLabel generation into a separate method
Claus Gittinger <cg@exept.de>
parents:
1904
diff
changeset
|
1249 |
! |
f86162de1a2f
extracted windowLabel generation into a separate method
Claus Gittinger <cg@exept.de>
parents:
1904
diff
changeset
|
1250 |
|
f86162de1a2f
extracted windowLabel generation into a separate method
Claus Gittinger <cg@exept.de>
parents:
1904
diff
changeset
|
1251 |
windowLabelFor:labelString |
3539 | 1252 |
"return an expanded labelString, according to the hostName-in-window setting. |
1253 |
The labelString may include positional parameters: |
|
1254 |
%1 - the actual label |
|
1255 |
%2 - the hostname |
|
1256 |
%3 - the userName |
|
1257 |
%4 - the processId |
|
1258 |
" |
|
1259 |
||
4128
c8b677256664
to utf8 or not - that is the question in window labels
Michael Beyl <mb@exept.de>
parents:
4125
diff
changeset
|
1260 |
|wg proc id pidString lbl| |
1915
f86162de1a2f
extracted windowLabel generation into a separate method
Claus Gittinger <cg@exept.de>
parents:
1904
diff
changeset
|
1261 |
|
f86162de1a2f
extracted windowLabel generation into a separate method
Claus Gittinger <cg@exept.de>
parents:
1904
diff
changeset
|
1262 |
(IncludeHostNameInLabel == true |
f86162de1a2f
extracted windowLabel generation into a separate method
Claus Gittinger <cg@exept.de>
parents:
1904
diff
changeset
|
1263 |
and:[WindowLabelFormat notNil]) ifTrue:[ |
3539 | 1264 |
(wg := self windowGroup) notNil ifTrue:[ |
1265 |
(proc := wg process) notNil ifTrue:[ |
|
1266 |
(id := proc id) notNil ifTrue:[ |
|
1267 |
pidString := id printString |
|
1268 |
] |
|
1269 |
] |
|
1270 |
]. |
|
4128
c8b677256664
to utf8 or not - that is the question in window labels
Michael Beyl <mb@exept.de>
parents:
4125
diff
changeset
|
1271 |
lbl := WindowLabelFormat |
3539 | 1272 |
bindWith:labelString |
1273 |
with:(OperatingSystem getHostName) |
|
1274 |
with:(OperatingSystem getLoginName) |
|
4128
c8b677256664
to utf8 or not - that is the question in window labels
Michael Beyl <mb@exept.de>
parents:
4125
diff
changeset
|
1275 |
with:pidString. |
c8b677256664
to utf8 or not - that is the question in window labels
Michael Beyl <mb@exept.de>
parents:
4125
diff
changeset
|
1276 |
^ lbl |
1915
f86162de1a2f
extracted windowLabel generation into a separate method
Claus Gittinger <cg@exept.de>
parents:
1904
diff
changeset
|
1277 |
]. |
f86162de1a2f
extracted windowLabel generation into a separate method
Claus Gittinger <cg@exept.de>
parents:
1904
diff
changeset
|
1278 |
^ labelString |
f86162de1a2f
extracted windowLabel generation into a separate method
Claus Gittinger <cg@exept.de>
parents:
1904
diff
changeset
|
1279 |
|
f86162de1a2f
extracted windowLabel generation into a separate method
Claus Gittinger <cg@exept.de>
parents:
1904
diff
changeset
|
1280 |
"Created: 22.9.1997 / 10:10:32 / cg" |
24 | 1281 |
! ! |
1282 |
||
269 | 1283 |
!StandardSystemView methodsFor:'queries'! |
1284 |
||
1285 |
focusSequence |
|
1286 |
"return a sequence which defines the order in which the focus |
|
1287 |
is passed for FocusNext and FocusPrevious keys. |
|
504
bc7734000bd3
windowGroup pulls focusSequence from topView (used to be pushed into it)
Claus Gittinger <cg@exept.de>
parents:
385
diff
changeset
|
1288 |
|
bc7734000bd3
windowGroup pulls focusSequence from topView (used to be pushed into it)
Claus Gittinger <cg@exept.de>
parents:
385
diff
changeset
|
1289 |
All views which like to support these keys should either redefine |
269 | 1290 |
this method and return a collection of (sub-) views. |
1291 |
Or, if the model is some applicationModel, it may itself define |
|
1292 |
the focusSequence. |
|
504
bc7734000bd3
windowGroup pulls focusSequence from topView (used to be pushed into it)
Claus Gittinger <cg@exept.de>
parents:
385
diff
changeset
|
1293 |
Or, somehow let me (via focusSequence:) know about the order. |
bc7734000bd3
windowGroup pulls focusSequence from topView (used to be pushed into it)
Claus Gittinger <cg@exept.de>
parents:
385
diff
changeset
|
1294 |
|
269 | 1295 |
Notice: I dont think this is good style: the focusSequence seems |
1944 | 1296 |
to belong into the controller or the builder ..." |
269 | 1297 |
|
1298 |
"/ |
|
1299 |
"/ if I have an application, its supposed to |
|
1300 |
"/ know about the focusSequence |
|
1301 |
"/ |
|
1302 |
application notNil ifTrue:[ |
|
2303 | 1303 |
^ application focusSequence |
269 | 1304 |
]. |
1305 |
||
1944 | 1306 |
"/ is that really a good idea ? |
1307 |
||
269 | 1308 |
(model notNil |
1309 |
and:[(model respondsTo:#focusSequence) |
|
1310 |
and:[model ~~ self]]) ifTrue:[ |
|
2303 | 1311 |
^ model focusSequence |
269 | 1312 |
]. |
1313 |
^ nil |
|
504
bc7734000bd3
windowGroup pulls focusSequence from topView (used to be pushed into it)
Claus Gittinger <cg@exept.de>
parents:
385
diff
changeset
|
1314 |
|
1944 | 1315 |
"Modified: / 31.10.1997 / 19:14:02 / cg" |
269 | 1316 |
! |
1317 |
||
1318 |
processName |
|
1319 |
"return a string to be shown for my process in the |
|
604
672ecb7ec347
fixed iconView handling (thought it was not realized); comments & docu
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
1320 |
process monitor. This has no semantic meaning, but exists |
672ecb7ec347
fixed iconView handling (thought it was not realized); comments & docu
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
1321 |
for your convenience only." |
269 | 1322 |
|
1323 |
application notNil ifTrue:[ |
|
1696
ba6085a629e0
replaced isPopUp flag in #createWindow by a more general #style symbol argument
Claus Gittinger <cg@exept.de>
parents:
1612
diff
changeset
|
1324 |
^ application processName |
269 | 1325 |
]. |
1326 |
label notNil ifTrue:[^ label]. |
|
1327 |
^ super processName |
|
604
672ecb7ec347
fixed iconView handling (thought it was not realized); comments & docu
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
1328 |
|
672ecb7ec347
fixed iconView handling (thought it was not realized); comments & docu
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
1329 |
"Modified: 24.4.1996 / 09:47:01 / cg" |
269 | 1330 |
! ! |
1331 |
||
0 | 1332 |
!StandardSystemView methodsFor:'realization'! |
1333 |
||
1405 | 1334 |
collapse |
1335 |
"iconify the receiver" |
|
1336 |
||
1337 |
shown ifTrue:[ |
|
2303 | 1338 |
self unmap. |
1405 | 1339 |
|
2303 | 1340 |
"if it was iconified, try to remap iconified" |
1341 |
device |
|
2103
dbe7a348084f
do not forget minExtent/maxExtent in remap
Claus Gittinger <cg@exept.de>
parents:
2099
diff
changeset
|
1342 |
mapView:self id:drawableId iconified:true |
2303 | 1343 |
atX:left y:top width:width height:height |
2103
dbe7a348084f
do not forget minExtent/maxExtent in remap
Claus Gittinger <cg@exept.de>
parents:
2099
diff
changeset
|
1344 |
minExtent:minExtent maxExtent:maxExtent. |
2303 | 1345 |
shown := false. |
1405 | 1346 |
]. |
1347 |
||
1348 |
" |
|
1349 |
|top| |
|
1350 |
||
1351 |
top := StandardSystemView new. |
|
1352 |
top label:'hello'. |
|
1353 |
top openAndWait. |
|
1820 | 1354 |
Delay waitForSeconds:2. |
1355 |
top collapse. |
|
1356 |
Delay waitForSeconds:2. |
|
1357 |
top expand. |
|
1405 | 1358 |
" |
1359 |
||
1820 | 1360 |
"Modified: 24.7.1997 / 12:32:17 / cg" |
1405 | 1361 |
! |
1362 |
||
269 | 1363 |
create |
1364 |
"create - make certain that icon is available" |
|
1365 |
||
1366 |
super create. |
|
1367 |
||
1368 |
iconView notNil ifTrue:[ |
|
3393 | 1369 |
iconView create. |
1370 |
device setWindowIconWindow:iconView in:drawableId. |
|
1371 |
iconView setRealized:true. |
|
269 | 1372 |
]. |
1373 |
iconLabel notNil ifTrue:[ |
|
3393 | 1374 |
device setIconName:iconLabel string in:drawableId |
269 | 1375 |
] |
604
672ecb7ec347
fixed iconView handling (thought it was not realized); comments & docu
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
1376 |
|
816 | 1377 |
"Modified: 10.6.1996 / 20:14:50 / cg" |
269 | 1378 |
! |
1379 |
||
1405 | 1380 |
expand |
1381 |
"de-iconify the receiver at its old position" |
|
1382 |
||
1383 |
shown ifFalse:[ |
|
2303 | 1384 |
self unmap. |
1405 | 1385 |
|
2303 | 1386 |
"if it was iconified, try to remap iconified" |
1387 |
device |
|
2103
dbe7a348084f
do not forget minExtent/maxExtent in remap
Claus Gittinger <cg@exept.de>
parents:
2099
diff
changeset
|
1388 |
mapView:self id:drawableId iconified:false |
2303 | 1389 |
atX:left y:top width:width height:height |
2103
dbe7a348084f
do not forget minExtent/maxExtent in remap
Claus Gittinger <cg@exept.de>
parents:
2099
diff
changeset
|
1390 |
minExtent:minExtent maxExtent:maxExtent. |
1405 | 1391 |
]. |
1392 |
||
1393 |
" |
|
1394 |
|top| |
|
1395 |
||
1396 |
top := StandardSystemView new. |
|
1397 |
top label:'hello'. |
|
1398 |
top openAndWait. |
|
1399 |
top collapse. |
|
1400 |
Delay waitForSeconds:5. |
|
1401 |
top expand. |
|
1402 |
" |
|
1403 |
||
2038 | 1404 |
"Modified: / 3.2.1998 / 16:02:56 / cg" |
1405 | 1405 |
! |
1406 |
||
46 | 1407 |
physicalCreate |
1408 |
"common code for create & recreate" |
|
1409 |
||
4319 | 1410 |
|lbl iconValue icn icnMask windowClassNameString| |
183 | 1411 |
|
4128
c8b677256664
to utf8 or not - that is the question in window labels
Michael Beyl <mb@exept.de>
parents:
4125
diff
changeset
|
1412 |
lbl := self windowLabelFor:label. |
183 | 1413 |
|
1560 | 1414 |
icon notNil ifTrue:[ |
4319 | 1415 |
iconValue := icon value. |
1416 |
icn := self convertedIcon:iconValue. |
|
1417 |
(icnMask := iconValue mask) notNil ifTrue:[ |
|
3315
995d017b5107
must keep a reference to the deviceIcon...
Claus Gittinger <cg@exept.de>
parents:
3301
diff
changeset
|
1418 |
icnMask := self convertedIconMask:icnMask |
995d017b5107
must keep a reference to the deviceIcon...
Claus Gittinger <cg@exept.de>
parents:
3301
diff
changeset
|
1419 |
]. |
995d017b5107
must keep a reference to the deviceIcon...
Claus Gittinger <cg@exept.de>
parents:
3301
diff
changeset
|
1420 |
deviceIcon := icn. |
1696
ba6085a629e0
replaced isPopUp flag in #createWindow by a more general #style symbol argument
Claus Gittinger <cg@exept.de>
parents:
1612
diff
changeset
|
1421 |
]. |
ba6085a629e0
replaced isPopUp flag in #createWindow by a more general #style symbol argument
Claus Gittinger <cg@exept.de>
parents:
1612
diff
changeset
|
1422 |
|
3008
81987f198808
let WindowSensor perform the preViewCreation/postViewCreation
Claus Gittinger <cg@exept.de>
parents:
2935
diff
changeset
|
1423 |
"/ give global eventListeners a chance to intercept windowCreation |
81987f198808
let WindowSensor perform the preViewCreation/postViewCreation
Claus Gittinger <cg@exept.de>
parents:
2935
diff
changeset
|
1424 |
"/ and provide another origin (by payching my origin via setOrigin:). |
81987f198808
let WindowSensor perform the preViewCreation/postViewCreation
Claus Gittinger <cg@exept.de>
parents:
2935
diff
changeset
|
1425 |
WindowSensor preViewCreateNotification:self. |
81987f198808
let WindowSensor perform the preViewCreation/postViewCreation
Claus Gittinger <cg@exept.de>
parents:
2935
diff
changeset
|
1426 |
|
46 | 1427 |
drawableId := device |
3315
995d017b5107
must keep a reference to the deviceIcon...
Claus Gittinger <cg@exept.de>
parents:
3301
diff
changeset
|
1428 |
createWindowFor:self |
995d017b5107
must keep a reference to the deviceIcon...
Claus Gittinger <cg@exept.de>
parents:
3301
diff
changeset
|
1429 |
type:nil |
3393 | 1430 |
origin:(left @ top) |
3315
995d017b5107
must keep a reference to the deviceIcon...
Claus Gittinger <cg@exept.de>
parents:
3301
diff
changeset
|
1431 |
extent:(width @ height) |
995d017b5107
must keep a reference to the deviceIcon...
Claus Gittinger <cg@exept.de>
parents:
3301
diff
changeset
|
1432 |
minExtent:minExtent |
995d017b5107
must keep a reference to the deviceIcon...
Claus Gittinger <cg@exept.de>
parents:
3301
diff
changeset
|
1433 |
maxExtent:maxExtent |
995d017b5107
must keep a reference to the deviceIcon...
Claus Gittinger <cg@exept.de>
parents:
3301
diff
changeset
|
1434 |
borderWidth:borderWidth |
995d017b5107
must keep a reference to the deviceIcon...
Claus Gittinger <cg@exept.de>
parents:
3301
diff
changeset
|
1435 |
subViewOf:nil |
995d017b5107
must keep a reference to the deviceIcon...
Claus Gittinger <cg@exept.de>
parents:
3301
diff
changeset
|
1436 |
style:(self windowStyle) |
995d017b5107
must keep a reference to the deviceIcon...
Claus Gittinger <cg@exept.de>
parents:
3301
diff
changeset
|
1437 |
inputOnly:(self isInputOnly) |
4128
c8b677256664
to utf8 or not - that is the question in window labels
Michael Beyl <mb@exept.de>
parents:
4125
diff
changeset
|
1438 |
label:lbl |
3315
995d017b5107
must keep a reference to the deviceIcon...
Claus Gittinger <cg@exept.de>
parents:
3301
diff
changeset
|
1439 |
owner:nil |
995d017b5107
must keep a reference to the deviceIcon...
Claus Gittinger <cg@exept.de>
parents:
3301
diff
changeset
|
1440 |
icon:icn iconMask:icnMask |
995d017b5107
must keep a reference to the deviceIcon...
Claus Gittinger <cg@exept.de>
parents:
3301
diff
changeset
|
1441 |
iconView:iconView. |
46 | 1442 |
|
641
f265a4c4785f
Must register drawableId in Lobby when physicalCreate'ing a window.
Stefan Vogel <sv@exept.de>
parents:
625
diff
changeset
|
1443 |
Lobby registerChange:self. |
1724
166073494dcc
pass window styles (normal / dialog / popup)
Claus Gittinger <cg@exept.de>
parents:
1703
diff
changeset
|
1444 |
|
3008
81987f198808
let WindowSensor perform the preViewCreation/postViewCreation
Claus Gittinger <cg@exept.de>
parents:
2935
diff
changeset
|
1445 |
"/ give global listeners a chance to track views |
81987f198808
let WindowSensor perform the preViewCreation/postViewCreation
Claus Gittinger <cg@exept.de>
parents:
2935
diff
changeset
|
1446 |
WindowSensor postViewCreateNotification:self. |
1724
166073494dcc
pass window styles (normal / dialog / popup)
Claus Gittinger <cg@exept.de>
parents:
1703
diff
changeset
|
1447 |
|
3369
2710ff974761
only access originChanged, extentChanged and cornerChanged
Claus Gittinger <cg@exept.de>
parents:
3346
diff
changeset
|
1448 |
self extentChangedFlag:false. |
2710ff974761
only access originChanged, extentChanged and cornerChanged
Claus Gittinger <cg@exept.de>
parents:
3346
diff
changeset
|
1449 |
self originChangedFlag:false. |
46 | 1450 |
|
1202 | 1451 |
(borderColor notNil and:[borderColor ~= Black]) ifTrue:[ |
3315
995d017b5107
must keep a reference to the deviceIcon...
Claus Gittinger <cg@exept.de>
parents:
3301
diff
changeset
|
1452 |
self setBorderColor |
72 | 1453 |
]. |
81 | 1454 |
|
1455 |
"/ (viewGravity notNil "and:[viewGravity ~~ #NorthWest]") ifTrue:[ |
|
1456 |
"/ device setWindowGravity:viewGravity in:drawableId |
|
1457 |
"/ ]. |
|
1458 |
||
1459 |
"/ (bitGravity notNil "and:[bitGravity ~~ #NorthWest]") ifTrue:[ |
|
1460 |
"/ device setBitGravity:bitGravity in:drawableId |
|
1461 |
"/ ]. |
|
72 | 1462 |
|
1904 | 1463 |
viewShape notNil ifTrue:[ |
3315
995d017b5107
must keep a reference to the deviceIcon...
Claus Gittinger <cg@exept.de>
parents:
3301
diff
changeset
|
1464 |
self setViewShape |
46 | 1465 |
]. |
1904 | 1466 |
|
46 | 1467 |
(backed notNil and:[backed ~~ false]) ifTrue:[ |
3315
995d017b5107
must keep a reference to the deviceIcon...
Claus Gittinger <cg@exept.de>
parents:
3301
diff
changeset
|
1468 |
device setBackingStore:backed in:drawableId |
46 | 1469 |
]. |
3152 | 1470 |
self saveUnder ifTrue:[ |
3315
995d017b5107
must keep a reference to the deviceIcon...
Claus Gittinger <cg@exept.de>
parents:
3301
diff
changeset
|
1471 |
device setSaveUnder:true in:drawableId |
46 | 1472 |
]. |
1960 | 1473 |
cursor notNil ifTrue:[ |
3315
995d017b5107
must keep a reference to the deviceIcon...
Claus Gittinger <cg@exept.de>
parents:
3301
diff
changeset
|
1474 |
self setCursor |
1960 | 1475 |
]. |
3917
806839e6531e
Set windowClasses based on application class name.
Stefan Vogel <sv@exept.de>
parents:
3883
diff
changeset
|
1476 |
|
806839e6531e
Set windowClasses based on application class name.
Stefan Vogel <sv@exept.de>
parents:
3883
diff
changeset
|
1477 |
application isNil ifTrue:[ |
3919
6b390fe57e96
More fixes for X11 window class names
Stefan Vogel <sv@exept.de>
parents:
3917
diff
changeset
|
1478 |
(self class == StandardSystemView and:[subViews size == 1]) ifTrue:[ |
6b390fe57e96
More fixes for X11 window class names
Stefan Vogel <sv@exept.de>
parents:
3917
diff
changeset
|
1479 |
"This is a subclass of SimpleView wrapped into a StandardSystemView" |
6b390fe57e96
More fixes for X11 window class names
Stefan Vogel <sv@exept.de>
parents:
3917
diff
changeset
|
1480 |
windowClassNameString := subViews first className. |
6b390fe57e96
More fixes for X11 window class names
Stefan Vogel <sv@exept.de>
parents:
3917
diff
changeset
|
1481 |
] ifFalse:[ |
6b390fe57e96
More fixes for X11 window class names
Stefan Vogel <sv@exept.de>
parents:
3917
diff
changeset
|
1482 |
windowClassNameString := self className. |
6b390fe57e96
More fixes for X11 window class names
Stefan Vogel <sv@exept.de>
parents:
3917
diff
changeset
|
1483 |
] |
3917
806839e6531e
Set windowClasses based on application class name.
Stefan Vogel <sv@exept.de>
parents:
3883
diff
changeset
|
1484 |
] ifFalse:[ |
806839e6531e
Set windowClasses based on application class name.
Stefan Vogel <sv@exept.de>
parents:
3883
diff
changeset
|
1485 |
windowClassNameString := application className. |
806839e6531e
Set windowClasses based on application class name.
Stefan Vogel <sv@exept.de>
parents:
3883
diff
changeset
|
1486 |
]. |
806839e6531e
Set windowClasses based on application class name.
Stefan Vogel <sv@exept.de>
parents:
3883
diff
changeset
|
1487 |
self setWindowClass:('Stx.', windowClassNameString) name:"name"'bla'. |
641
f265a4c4785f
Must register drawableId in Lobby when physicalCreate'ing a window.
Stefan Vogel <sv@exept.de>
parents:
625
diff
changeset
|
1488 |
|
857
df5125310d86
New method #setWindowClass:name:in: to give a hint to the window manager.
Stefan Vogel <sv@exept.de>
parents:
827
diff
changeset
|
1489 |
"Modified: 14.6.1996 / 17:14:25 / stefan" |
1915
f86162de1a2f
extracted windowLabel generation into a separate method
Claus Gittinger <cg@exept.de>
parents:
1904
diff
changeset
|
1490 |
"Modified: 22.9.1997 / 10:11:16 / cg" |
504
bc7734000bd3
windowGroup pulls focusSequence from topView (used to be pushed into it)
Claus Gittinger <cg@exept.de>
parents:
385
diff
changeset
|
1491 |
! |
bc7734000bd3
windowGroup pulls focusSequence from topView (used to be pushed into it)
Claus Gittinger <cg@exept.de>
parents:
385
diff
changeset
|
1492 |
|
1830 | 1493 |
postRealize |
1494 |
"postRealize actions - tell the application (if any)." |
|
504
bc7734000bd3
windowGroup pulls focusSequence from topView (used to be pushed into it)
Claus Gittinger <cg@exept.de>
parents:
385
diff
changeset
|
1495 |
|
2873 | 1496 |
super postRealize. |
1830 | 1497 |
"/ |
1498 |
"/ let the application add its views to the current project |
|
1499 |
"/ |
|
1500 |
application notNil ifTrue:[ |
|
3152 | 1501 |
application opened:self. |
1830 | 1502 |
] ifFalse:[ |
3152 | 1503 |
self addToCurrentProject. |
1830 | 1504 |
]. |
504
bc7734000bd3
windowGroup pulls focusSequence from topView (used to be pushed into it)
Claus Gittinger <cg@exept.de>
parents:
385
diff
changeset
|
1505 |
|
1830 | 1506 |
"Created: 24.7.1997 / 18:11:26 / cg" |
504
bc7734000bd3
windowGroup pulls focusSequence from topView (used to be pushed into it)
Claus Gittinger <cg@exept.de>
parents:
385
diff
changeset
|
1507 |
! |
bc7734000bd3
windowGroup pulls focusSequence from topView (used to be pushed into it)
Claus Gittinger <cg@exept.de>
parents:
385
diff
changeset
|
1508 |
|
4125 | 1509 |
preRealize |
1510 |
"invoked right before the view is realized. |
|
1511 |
preRealize actions - tell the application (if any)." |
|
1512 |
||
1513 |
super preRealize. |
|
1514 |
||
1515 |
application notNil ifTrue:[ |
|
1516 |
application aboutToOpen:self. |
|
1517 |
]. |
|
1518 |
! |
|
1519 |
||
504
bc7734000bd3
windowGroup pulls focusSequence from topView (used to be pushed into it)
Claus Gittinger <cg@exept.de>
parents:
385
diff
changeset
|
1520 |
recreate |
3301 | 1521 |
"recreate the view after a snap-in or a migration" |
504
bc7734000bd3
windowGroup pulls focusSequence from topView (used to be pushed into it)
Claus Gittinger <cg@exept.de>
parents:
385
diff
changeset
|
1522 |
|
bc7734000bd3
windowGroup pulls focusSequence from topView (used to be pushed into it)
Claus Gittinger <cg@exept.de>
parents:
385
diff
changeset
|
1523 |
super recreate. |
bc7734000bd3
windowGroup pulls focusSequence from topView (used to be pushed into it)
Claus Gittinger <cg@exept.de>
parents:
385
diff
changeset
|
1524 |
|
bc7734000bd3
windowGroup pulls focusSequence from topView (used to be pushed into it)
Claus Gittinger <cg@exept.de>
parents:
385
diff
changeset
|
1525 |
iconView notNil ifTrue:[ |
3408
42384f123133
Add labelChannel and visibilityChannel to WindowSpec/StandardSystemView
Stefan Vogel <sv@exept.de>
parents:
3393
diff
changeset
|
1526 |
iconView recreate. |
42384f123133
Add labelChannel and visibilityChannel to WindowSpec/StandardSystemView
Stefan Vogel <sv@exept.de>
parents:
3393
diff
changeset
|
1527 |
device setWindowIconWindow:iconView in:drawableId. |
42384f123133
Add labelChannel and visibilityChannel to WindowSpec/StandardSystemView
Stefan Vogel <sv@exept.de>
parents:
3393
diff
changeset
|
1528 |
iconView setRealized:true. |
504
bc7734000bd3
windowGroup pulls focusSequence from topView (used to be pushed into it)
Claus Gittinger <cg@exept.de>
parents:
385
diff
changeset
|
1529 |
] ifFalse:[ |
3408
42384f123133
Add labelChannel and visibilityChannel to WindowSpec/StandardSystemView
Stefan Vogel <sv@exept.de>
parents:
3393
diff
changeset
|
1530 |
icon notNil ifTrue:[ |
42384f123133
Add labelChannel and visibilityChannel to WindowSpec/StandardSystemView
Stefan Vogel <sv@exept.de>
parents:
3393
diff
changeset
|
1531 |
self icon:icon. |
42384f123133
Add labelChannel and visibilityChannel to WindowSpec/StandardSystemView
Stefan Vogel <sv@exept.de>
parents:
3393
diff
changeset
|
1532 |
]. |
504
bc7734000bd3
windowGroup pulls focusSequence from topView (used to be pushed into it)
Claus Gittinger <cg@exept.de>
parents:
385
diff
changeset
|
1533 |
]. |
bc7734000bd3
windowGroup pulls focusSequence from topView (used to be pushed into it)
Claus Gittinger <cg@exept.de>
parents:
385
diff
changeset
|
1534 |
|
bc7734000bd3
windowGroup pulls focusSequence from topView (used to be pushed into it)
Claus Gittinger <cg@exept.de>
parents:
385
diff
changeset
|
1535 |
iconLabel notNil ifTrue:[ |
3408
42384f123133
Add labelChannel and visibilityChannel to WindowSpec/StandardSystemView
Stefan Vogel <sv@exept.de>
parents:
3393
diff
changeset
|
1536 |
device setIconName:iconLabel in:drawableId |
504
bc7734000bd3
windowGroup pulls focusSequence from topView (used to be pushed into it)
Claus Gittinger <cg@exept.de>
parents:
385
diff
changeset
|
1537 |
] |
604
672ecb7ec347
fixed iconView handling (thought it was not realized); comments & docu
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
1538 |
|
1538 | 1539 |
"Modified: 4.4.1997 / 16:16:40 / cg" |
141 | 1540 |
! ! |
1541 |
||
269 | 1542 |
!StandardSystemView class methodsFor:'documentation'! |
0 | 1543 |
|
269 | 1544 |
version |
4320 | 1545 |
^ '$Header: /cvs/stx/stx/libview/StandardSystemView.st,v 1.161 2004-10-25 13:08:47 cg Exp $' |
0 | 1546 |
! ! |
3746
d9dccd3a4a41
beSlave: also try masterApp in setWGFromApplication
Claus Gittinger <cg@exept.de>
parents:
3706
diff
changeset
|
1547 |
|
1878
76e9bc8e1b9c
new hostName in label format
Claus Gittinger <cg@exept.de>
parents:
1865
diff
changeset
|
1548 |
StandardSystemView initialize! |