author | Claus Gittinger <cg@exept.de> |
Wed, 18 Aug 1999 18:44:12 +0200 | |
changeset 2840 | c8f5ba536263 |
parent 2839 | 36f61177428c |
child 2843 | e13e0c53924a |
permissions | -rw-r--r-- |
1284 | 1 |
" |
2 |
COPYRIGHT (c) 1997 by eXept Software AG / Claus Gittinger |
|
2840 | 3 |
All Rights Reserved |
1284 | 4 |
|
5 |
This software is furnished under a license and may be used |
|
6 |
only in accordance with the terms of that license and with the |
|
7 |
inclusion of the above copyright notice. This software may not |
|
8 |
be provided or otherwise made available to, or used by, any |
|
9 |
other person. No title to or ownership of the software is |
|
10 |
hereby transferred. |
|
11 |
" |
|
12 |
||
13 |
||
14 |
||
15 |
GraphicsDevice subclass:#HostGraphicsDevice |
|
2840 | 16 |
instanceVariableNames:'deviceColors deviceFonts deviceViews deviceForms deviceCursors' |
1284 | 17 |
classVariableNames:'' |
18 |
poolDictionaries:'' |
|
19 |
category:'Interface-Graphics' |
|
20 |
! |
|
21 |
||
22 |
!HostGraphicsDevice class methodsFor:'documentation'! |
|
23 |
||
24 |
copyright |
|
25 |
" |
|
26 |
COPYRIGHT (c) 1997 by eXept Software AG / Claus Gittinger |
|
2840 | 27 |
All Rights Reserved |
1284 | 28 |
|
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 |
||
37 |
||
38 |
! |
|
39 |
||
40 |
documentation |
|
41 |
" |
|
42 |
this abstract class was inserted to provide a home for ST-80 classes |
|
43 |
(previously, DeviceWorkstation was directly under Object). |
|
2813
913aca399962
preps to keep the view & form lobbies on a per-display basis.
Claus Gittinger <cg@exept.de>
parents:
2809
diff
changeset
|
44 |
We will (over time) move common functionality from there into this class. |
1284 | 45 |
|
46 |
In ST/X, this is mostly dummy. |
|
47 |
||
48 |
[see also:] |
|
2840 | 49 |
DeviceWorkstation XWorkstation |
1284 | 50 |
|
51 |
[author:] |
|
2840 | 52 |
Claus Gittinger |
1284 | 53 |
" |
54 |
||
55 |
||
56 |
! ! |
|
57 |
||
1365
37a9e7ac4dbc
moved color registration from Color class to per-device lobby
Claus Gittinger <cg@exept.de>
parents:
1315
diff
changeset
|
58 |
!HostGraphicsDevice methodsFor:'accessing'! |
37a9e7ac4dbc
moved color registration from Color class to per-device lobby
Claus Gittinger <cg@exept.de>
parents:
1315
diff
changeset
|
59 |
|
37a9e7ac4dbc
moved color registration from Color class to per-device lobby
Claus Gittinger <cg@exept.de>
parents:
1315
diff
changeset
|
60 |
deviceColors |
1371 | 61 |
"return the registry keeping track of colors which were allocated |
2813
913aca399962
preps to keep the view & form lobbies on a per-display basis.
Claus Gittinger <cg@exept.de>
parents:
2809
diff
changeset
|
62 |
on this device." |
1365
37a9e7ac4dbc
moved color registration from Color class to per-device lobby
Claus Gittinger <cg@exept.de>
parents:
1315
diff
changeset
|
63 |
|
37a9e7ac4dbc
moved color registration from Color class to per-device lobby
Claus Gittinger <cg@exept.de>
parents:
1315
diff
changeset
|
64 |
^ deviceColors |
37a9e7ac4dbc
moved color registration from Color class to per-device lobby
Claus Gittinger <cg@exept.de>
parents:
1315
diff
changeset
|
65 |
|
37a9e7ac4dbc
moved color registration from Color class to per-device lobby
Claus Gittinger <cg@exept.de>
parents:
1315
diff
changeset
|
66 |
"Created: 24.2.1997 / 18:01:41 / cg" |
37a9e7ac4dbc
moved color registration from Color class to per-device lobby
Claus Gittinger <cg@exept.de>
parents:
1315
diff
changeset
|
67 |
! |
37a9e7ac4dbc
moved color registration from Color class to per-device lobby
Claus Gittinger <cg@exept.de>
parents:
1315
diff
changeset
|
68 |
|
1371 | 69 |
deviceFonts |
70 |
"return the registry keeping track of fonts which were allocated |
|
2813
913aca399962
preps to keep the view & form lobbies on a per-display basis.
Claus Gittinger <cg@exept.de>
parents:
2809
diff
changeset
|
71 |
on this device." |
1365
37a9e7ac4dbc
moved color registration from Color class to per-device lobby
Claus Gittinger <cg@exept.de>
parents:
1315
diff
changeset
|
72 |
|
1371 | 73 |
^ deviceFonts |
2813
913aca399962
preps to keep the view & form lobbies on a per-display basis.
Claus Gittinger <cg@exept.de>
parents:
2809
diff
changeset
|
74 |
! |
913aca399962
preps to keep the view & form lobbies on a per-display basis.
Claus Gittinger <cg@exept.de>
parents:
2809
diff
changeset
|
75 |
|
2839 | 76 |
deviceForms |
77 |
"return the registry keeping track of forms which were allocated |
|
78 |
on this device." |
|
79 |
||
80 |
^ deviceForms |
|
81 |
! |
|
82 |
||
2813
913aca399962
preps to keep the view & form lobbies on a per-display basis.
Claus Gittinger <cg@exept.de>
parents:
2809
diff
changeset
|
83 |
deviceViews |
913aca399962
preps to keep the view & form lobbies on a per-display basis.
Claus Gittinger <cg@exept.de>
parents:
2809
diff
changeset
|
84 |
"return the registry keeping track of views which were allocated |
913aca399962
preps to keep the view & form lobbies on a per-display basis.
Claus Gittinger <cg@exept.de>
parents:
2809
diff
changeset
|
85 |
on this device." |
913aca399962
preps to keep the view & form lobbies on a per-display basis.
Claus Gittinger <cg@exept.de>
parents:
2809
diff
changeset
|
86 |
|
913aca399962
preps to keep the view & form lobbies on a per-display basis.
Claus Gittinger <cg@exept.de>
parents:
2809
diff
changeset
|
87 |
^ deviceViews |
1365
37a9e7ac4dbc
moved color registration from Color class to per-device lobby
Claus Gittinger <cg@exept.de>
parents:
1315
diff
changeset
|
88 |
! ! |
37a9e7ac4dbc
moved color registration from Color class to per-device lobby
Claus Gittinger <cg@exept.de>
parents:
1315
diff
changeset
|
89 |
|
37a9e7ac4dbc
moved color registration from Color class to per-device lobby
Claus Gittinger <cg@exept.de>
parents:
1315
diff
changeset
|
90 |
!HostGraphicsDevice methodsFor:'color stuff'! |
37a9e7ac4dbc
moved color registration from Color class to per-device lobby
Claus Gittinger <cg@exept.de>
parents:
1315
diff
changeset
|
91 |
|
37a9e7ac4dbc
moved color registration from Color class to per-device lobby
Claus Gittinger <cg@exept.de>
parents:
1315
diff
changeset
|
92 |
registerColor:aColor |
37a9e7ac4dbc
moved color registration from Color class to per-device lobby
Claus Gittinger <cg@exept.de>
parents:
1315
diff
changeset
|
93 |
deviceColors register:aColor. |
37a9e7ac4dbc
moved color registration from Color class to per-device lobby
Claus Gittinger <cg@exept.de>
parents:
1315
diff
changeset
|
94 |
|
37a9e7ac4dbc
moved color registration from Color class to per-device lobby
Claus Gittinger <cg@exept.de>
parents:
1315
diff
changeset
|
95 |
"Created: 24.2.1997 / 18:29:10 / cg" |
37a9e7ac4dbc
moved color registration from Color class to per-device lobby
Claus Gittinger <cg@exept.de>
parents:
1315
diff
changeset
|
96 |
! |
37a9e7ac4dbc
moved color registration from Color class to per-device lobby
Claus Gittinger <cg@exept.de>
parents:
1315
diff
changeset
|
97 |
|
37a9e7ac4dbc
moved color registration from Color class to per-device lobby
Claus Gittinger <cg@exept.de>
parents:
1315
diff
changeset
|
98 |
unregisterColor:aColor |
37a9e7ac4dbc
moved color registration from Color class to per-device lobby
Claus Gittinger <cg@exept.de>
parents:
1315
diff
changeset
|
99 |
deviceColors unregister:aColor. |
37a9e7ac4dbc
moved color registration from Color class to per-device lobby
Claus Gittinger <cg@exept.de>
parents:
1315
diff
changeset
|
100 |
|
37a9e7ac4dbc
moved color registration from Color class to per-device lobby
Claus Gittinger <cg@exept.de>
parents:
1315
diff
changeset
|
101 |
"Created: 24.2.1997 / 18:29:14 / cg" |
37a9e7ac4dbc
moved color registration from Color class to per-device lobby
Claus Gittinger <cg@exept.de>
parents:
1315
diff
changeset
|
102 |
! ! |
37a9e7ac4dbc
moved color registration from Color class to per-device lobby
Claus Gittinger <cg@exept.de>
parents:
1315
diff
changeset
|
103 |
|
1371 | 104 |
!HostGraphicsDevice methodsFor:'font stuff'! |
105 |
||
106 |
registerFont:aFont |
|
107 |
deviceFonts register:aFont. |
|
108 |
||
109 |
"Created: 24.2.1997 / 18:29:10 / cg" |
|
110 |
! |
|
111 |
||
112 |
unregisterFont:aFont |
|
113 |
deviceFonts unregister:aFont. |
|
114 |
||
115 |
"Created: 24.2.1997 / 18:29:14 / cg" |
|
116 |
! ! |
|
117 |
||
1365
37a9e7ac4dbc
moved color registration from Color class to per-device lobby
Claus Gittinger <cg@exept.de>
parents:
1315
diff
changeset
|
118 |
!HostGraphicsDevice methodsFor:'initialize / release'! |
37a9e7ac4dbc
moved color registration from Color class to per-device lobby
Claus Gittinger <cg@exept.de>
parents:
1315
diff
changeset
|
119 |
|
1367 | 120 |
initializeDeviceResourceTables |
2813
913aca399962
preps to keep the view & form lobbies on a per-display basis.
Claus Gittinger <cg@exept.de>
parents:
2809
diff
changeset
|
121 |
deviceViews := Registry new. |
913aca399962
preps to keep the view & form lobbies on a per-display basis.
Claus Gittinger <cg@exept.de>
parents:
2809
diff
changeset
|
122 |
deviceForms := Registry new. |
1365
37a9e7ac4dbc
moved color registration from Color class to per-device lobby
Claus Gittinger <cg@exept.de>
parents:
1315
diff
changeset
|
123 |
deviceColors := Registry new. |
2809
96f6b7b449c7
use a CachingRegistry for fonts.
Claus Gittinger <cg@exept.de>
parents:
1371
diff
changeset
|
124 |
deviceFonts := CachingRegistry new cacheSize:10. |
1365
37a9e7ac4dbc
moved color registration from Color class to per-device lobby
Claus Gittinger <cg@exept.de>
parents:
1315
diff
changeset
|
125 |
|
37a9e7ac4dbc
moved color registration from Color class to per-device lobby
Claus Gittinger <cg@exept.de>
parents:
1315
diff
changeset
|
126 |
"Created: 24.2.1997 / 18:29:53 / cg" |
37a9e7ac4dbc
moved color registration from Color class to per-device lobby
Claus Gittinger <cg@exept.de>
parents:
1315
diff
changeset
|
127 |
! |
37a9e7ac4dbc
moved color registration from Color class to per-device lobby
Claus Gittinger <cg@exept.de>
parents:
1315
diff
changeset
|
128 |
|
37a9e7ac4dbc
moved color registration from Color class to per-device lobby
Claus Gittinger <cg@exept.de>
parents:
1315
diff
changeset
|
129 |
releaseDeviceColors |
2839 | 130 |
deviceColors do:[:aColor | |
2840 | 131 |
aColor setDevice:nil colorId:nil |
2839 | 132 |
]. |
1365
37a9e7ac4dbc
moved color registration from Color class to per-device lobby
Claus Gittinger <cg@exept.de>
parents:
1315
diff
changeset
|
133 |
deviceColors := Registry new. |
37a9e7ac4dbc
moved color registration from Color class to per-device lobby
Claus Gittinger <cg@exept.de>
parents:
1315
diff
changeset
|
134 |
|
37a9e7ac4dbc
moved color registration from Color class to per-device lobby
Claus Gittinger <cg@exept.de>
parents:
1315
diff
changeset
|
135 |
"Created: 24.2.1997 / 18:07:49 / cg" |
2839 | 136 |
|
1371 | 137 |
! |
138 |
||
139 |
releaseDeviceFonts |
|
2809
96f6b7b449c7
use a CachingRegistry for fonts.
Claus Gittinger <cg@exept.de>
parents:
1371
diff
changeset
|
140 |
deviceFonts := CachingRegistry new cacheSize:10. |
1365
37a9e7ac4dbc
moved color registration from Color class to per-device lobby
Claus Gittinger <cg@exept.de>
parents:
1315
diff
changeset
|
141 |
! ! |
37a9e7ac4dbc
moved color registration from Color class to per-device lobby
Claus Gittinger <cg@exept.de>
parents:
1315
diff
changeset
|
142 |
|
1284 | 143 |
!HostGraphicsDevice class methodsFor:'documentation'! |
144 |
||
145 |
version |
|
2840 | 146 |
^ '$Header: /cvs/stx/stx/libview/HostGraphicsDevice.st,v 1.9 1999-08-18 16:44:12 cg Exp $' |
1284 | 147 |
! ! |