HostGraphicsDevice.st
author Claus Gittinger <cg@exept.de>
Mon, 24 Feb 1997 22:23:33 +0100
changeset 1371 22f586987cd1
parent 1367 84941299a4df
child 2809 96f6b7b449c7
permissions -rw-r--r--
*** empty log message ***
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
1284
d17f4d91174d intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
     1
"
d17f4d91174d intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
     2
COPYRIGHT (c) 1997 by eXept Software AG / Claus Gittinger
d17f4d91174d intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
     3
              All Rights Reserved
d17f4d91174d intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
     4
d17f4d91174d intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
     5
 This software is furnished under a license and may be used
d17f4d91174d intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
     6
 only in accordance with the terms of that license and with the
d17f4d91174d intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
     7
 inclusion of the above copyright notice.   This software may not
d17f4d91174d intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
     8
 be provided or otherwise made available to, or used by, any
d17f4d91174d intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
     9
 other person.  No title to or ownership of the software is
d17f4d91174d intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    10
 hereby transferred.
d17f4d91174d intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    11
"
d17f4d91174d intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    12
d17f4d91174d intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    13
d17f4d91174d intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    14
d17f4d91174d intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    15
GraphicsDevice subclass:#HostGraphicsDevice
1371
22f586987cd1 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1367
diff changeset
    16
	instanceVariableNames:'deviceColors deviceFonts'
1284
d17f4d91174d intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    17
	classVariableNames:''
d17f4d91174d intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    18
	poolDictionaries:''
d17f4d91174d intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    19
	category:'Interface-Graphics'
d17f4d91174d intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    20
!
d17f4d91174d intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    21
d17f4d91174d intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    22
!HostGraphicsDevice class methodsFor:'documentation'!
d17f4d91174d intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    23
d17f4d91174d intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    24
copyright
d17f4d91174d intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    25
"
d17f4d91174d intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    26
COPYRIGHT (c) 1997 by eXept Software AG / Claus Gittinger
d17f4d91174d intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    27
              All Rights Reserved
d17f4d91174d intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    28
d17f4d91174d intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    29
 This software is furnished under a license and may be used
d17f4d91174d intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    30
 only in accordance with the terms of that license and with the
d17f4d91174d intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    31
 inclusion of the above copyright notice.   This software may not
d17f4d91174d intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    32
 be provided or otherwise made available to, or used by, any
d17f4d91174d intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    33
 other person.  No title to or ownership of the software is
d17f4d91174d intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    34
 hereby transferred.
d17f4d91174d intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    35
"
d17f4d91174d intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    36
d17f4d91174d intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    37
d17f4d91174d intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    38
!
d17f4d91174d intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    39
d17f4d91174d intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    40
documentation
d17f4d91174d intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    41
"
d17f4d91174d intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    42
    this abstract class was inserted to provide a home for ST-80 classes
d17f4d91174d intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    43
    (previously, DeviceWorkstation was directly under Object).
1315
b8872f2bdbad *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1284
diff changeset
    44
    Will (over time) move commn functionality from there into this class.
1284
d17f4d91174d intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    45
d17f4d91174d intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    46
    In ST/X, this is mostly dummy.
d17f4d91174d intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    47
d17f4d91174d intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    48
    [see also:]
d17f4d91174d intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    49
        DeviceWorkstation XWorkstation
d17f4d91174d intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    50
d17f4d91174d intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    51
    [author:]
d17f4d91174d intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    52
        Claus Gittinger
d17f4d91174d intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    53
"
d17f4d91174d intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    54
d17f4d91174d intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    55
d17f4d91174d intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    56
! !
d17f4d91174d intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    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
22f586987cd1 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1367
diff changeset
    61
    "return the registry keeping track of colors which were allocated
22f586987cd1 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1367
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
22f586987cd1 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1367
diff changeset
    69
deviceFonts
22f586987cd1 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1367
diff changeset
    70
    "return the registry keeping track of fonts which were allocated
22f586987cd1 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1367
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
22f586987cd1 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1367
diff changeset
    73
    ^ deviceFonts
1365
37a9e7ac4dbc moved color registration from Color class to per-device lobby
Claus Gittinger <cg@exept.de>
parents: 1315
diff changeset
    74
! !
37a9e7ac4dbc moved color registration from Color class to per-device lobby
Claus Gittinger <cg@exept.de>
parents: 1315
diff changeset
    75
37a9e7ac4dbc moved color registration from Color class to per-device lobby
Claus Gittinger <cg@exept.de>
parents: 1315
diff changeset
    76
!HostGraphicsDevice methodsFor:'color stuff'!
37a9e7ac4dbc moved color registration from Color class to per-device lobby
Claus Gittinger <cg@exept.de>
parents: 1315
diff changeset
    77
37a9e7ac4dbc moved color registration from Color class to per-device lobby
Claus Gittinger <cg@exept.de>
parents: 1315
diff changeset
    78
registerColor:aColor
37a9e7ac4dbc moved color registration from Color class to per-device lobby
Claus Gittinger <cg@exept.de>
parents: 1315
diff changeset
    79
    deviceColors register:aColor.
37a9e7ac4dbc moved color registration from Color class to per-device lobby
Claus Gittinger <cg@exept.de>
parents: 1315
diff changeset
    80
37a9e7ac4dbc moved color registration from Color class to per-device lobby
Claus Gittinger <cg@exept.de>
parents: 1315
diff changeset
    81
    "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
    82
!
37a9e7ac4dbc moved color registration from Color class to per-device lobby
Claus Gittinger <cg@exept.de>
parents: 1315
diff changeset
    83
37a9e7ac4dbc moved color registration from Color class to per-device lobby
Claus Gittinger <cg@exept.de>
parents: 1315
diff changeset
    84
unregisterColor:aColor
37a9e7ac4dbc moved color registration from Color class to per-device lobby
Claus Gittinger <cg@exept.de>
parents: 1315
diff changeset
    85
    deviceColors unregister:aColor.
37a9e7ac4dbc moved color registration from Color class to per-device lobby
Claus Gittinger <cg@exept.de>
parents: 1315
diff changeset
    86
37a9e7ac4dbc moved color registration from Color class to per-device lobby
Claus Gittinger <cg@exept.de>
parents: 1315
diff changeset
    87
    "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
    88
! !
37a9e7ac4dbc moved color registration from Color class to per-device lobby
Claus Gittinger <cg@exept.de>
parents: 1315
diff changeset
    89
1371
22f586987cd1 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1367
diff changeset
    90
!HostGraphicsDevice methodsFor:'font stuff'!
22f586987cd1 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1367
diff changeset
    91
22f586987cd1 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1367
diff changeset
    92
registerFont:aFont
22f586987cd1 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1367
diff changeset
    93
    deviceFonts register:aFont.
22f586987cd1 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1367
diff changeset
    94
22f586987cd1 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1367
diff changeset
    95
    "Created: 24.2.1997 / 18:29:10 / cg"
22f586987cd1 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1367
diff changeset
    96
!
22f586987cd1 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1367
diff changeset
    97
22f586987cd1 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1367
diff changeset
    98
unregisterFont:aFont
22f586987cd1 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1367
diff changeset
    99
    deviceFonts unregister:aFont.
22f586987cd1 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1367
diff changeset
   100
22f586987cd1 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1367
diff changeset
   101
    "Created: 24.2.1997 / 18:29:14 / cg"
22f586987cd1 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1367
diff changeset
   102
! !
22f586987cd1 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1367
diff changeset
   103
1365
37a9e7ac4dbc moved color registration from Color class to per-device lobby
Claus Gittinger <cg@exept.de>
parents: 1315
diff changeset
   104
!HostGraphicsDevice methodsFor:'initialize / release'!
37a9e7ac4dbc moved color registration from Color class to per-device lobby
Claus Gittinger <cg@exept.de>
parents: 1315
diff changeset
   105
1367
84941299a4df *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1365
diff changeset
   106
initializeDeviceResourceTables
1365
37a9e7ac4dbc moved color registration from Color class to per-device lobby
Claus Gittinger <cg@exept.de>
parents: 1315
diff changeset
   107
    deviceColors := Registry new.
1371
22f586987cd1 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1367
diff changeset
   108
    deviceFonts := Registry new.
1365
37a9e7ac4dbc moved color registration from Color class to per-device lobby
Claus Gittinger <cg@exept.de>
parents: 1315
diff changeset
   109
37a9e7ac4dbc moved color registration from Color class to per-device lobby
Claus Gittinger <cg@exept.de>
parents: 1315
diff changeset
   110
    "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
   111
!
37a9e7ac4dbc moved color registration from Color class to per-device lobby
Claus Gittinger <cg@exept.de>
parents: 1315
diff changeset
   112
37a9e7ac4dbc moved color registration from Color class to per-device lobby
Claus Gittinger <cg@exept.de>
parents: 1315
diff changeset
   113
releaseDeviceColors
37a9e7ac4dbc moved color registration from Color class to per-device lobby
Claus Gittinger <cg@exept.de>
parents: 1315
diff changeset
   114
    deviceColors := Registry new.
37a9e7ac4dbc moved color registration from Color class to per-device lobby
Claus Gittinger <cg@exept.de>
parents: 1315
diff changeset
   115
37a9e7ac4dbc moved color registration from Color class to per-device lobby
Claus Gittinger <cg@exept.de>
parents: 1315
diff changeset
   116
    "Created: 24.2.1997 / 18:07:49 / cg"
1371
22f586987cd1 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1367
diff changeset
   117
!
22f586987cd1 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1367
diff changeset
   118
22f586987cd1 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1367
diff changeset
   119
releaseDeviceFonts
22f586987cd1 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1367
diff changeset
   120
    deviceFonts := Registry new.
1365
37a9e7ac4dbc moved color registration from Color class to per-device lobby
Claus Gittinger <cg@exept.de>
parents: 1315
diff changeset
   121
! !
37a9e7ac4dbc moved color registration from Color class to per-device lobby
Claus Gittinger <cg@exept.de>
parents: 1315
diff changeset
   122
1284
d17f4d91174d intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   123
!HostGraphicsDevice class methodsFor:'documentation'!
d17f4d91174d intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   124
d17f4d91174d intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   125
version
1371
22f586987cd1 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1367
diff changeset
   126
    ^ '$Header: /cvs/stx/stx/libview/HostGraphicsDevice.st,v 1.5 1997-02-24 21:23:33 cg Exp $'
1284
d17f4d91174d intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   127
! !