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