HostGraphicsDevice.st
author Claus Gittinger <cg@exept.de>
Mon, 24 Feb 1997 18:32:40 +0100
changeset 1365 37a9e7ac4dbc
parent 1315 b8872f2bdbad
child 1367 84941299a4df
permissions -rw-r--r--
moved color registration from Color class to per-device lobby
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
1315
b8872f2bdbad *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1284
diff changeset
    16
	instanceVariableNames:'deviceColors'
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
37a9e7ac4dbc moved color registration from Color class to per-device lobby
Claus Gittinger <cg@exept.de>
parents: 1315
diff changeset
    61
    "return the value of the instance variable 'deviceColors' (automatically generated)"
37a9e7ac4dbc moved color registration from Color class to per-device lobby
Claus Gittinger <cg@exept.de>
parents: 1315
diff changeset
    62
37a9e7ac4dbc moved color registration from Color class to per-device lobby
Claus Gittinger <cg@exept.de>
parents: 1315
diff changeset
    63
    ^ deviceColors
37a9e7ac4dbc moved color registration from Color class to per-device lobby
Claus Gittinger <cg@exept.de>
parents: 1315
diff changeset
    64
37a9e7ac4dbc moved color registration from Color class to per-device lobby
Claus Gittinger <cg@exept.de>
parents: 1315
diff changeset
    65
    "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
    66
!
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
deviceColors:something
37a9e7ac4dbc moved color registration from Color class to per-device lobby
Claus Gittinger <cg@exept.de>
parents: 1315
diff changeset
    69
    "set the value of the instance variable 'deviceColors' (automatically generated)"
37a9e7ac4dbc moved color registration from Color class to per-device lobby
Claus Gittinger <cg@exept.de>
parents: 1315
diff changeset
    70
37a9e7ac4dbc moved color registration from Color class to per-device lobby
Claus Gittinger <cg@exept.de>
parents: 1315
diff changeset
    71
    deviceColors := something.
37a9e7ac4dbc moved color registration from Color class to per-device lobby
Claus Gittinger <cg@exept.de>
parents: 1315
diff changeset
    72
37a9e7ac4dbc moved color registration from Color class to per-device lobby
Claus Gittinger <cg@exept.de>
parents: 1315
diff changeset
    73
    "Created: 24.2.1997 / 18:01:42 / cg"
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
37a9e7ac4dbc moved color registration from Color class to per-device lobby
Claus Gittinger <cg@exept.de>
parents: 1315
diff changeset
    90
!HostGraphicsDevice methodsFor:'initialize / release'!
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
initializeDeviceResourceTrackers
37a9e7ac4dbc moved color registration from Color class to per-device lobby
Claus Gittinger <cg@exept.de>
parents: 1315
diff changeset
    93
    deviceColors := Registry new.
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:53 / 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
releaseDeviceColors
37a9e7ac4dbc moved color registration from Color class to per-device lobby
Claus Gittinger <cg@exept.de>
parents: 1315
diff changeset
    99
    deviceColors := Registry new.
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:07:49 / 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
1284
d17f4d91174d intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   104
!HostGraphicsDevice class methodsFor:'documentation'!
d17f4d91174d intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   105
d17f4d91174d intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   106
version
1365
37a9e7ac4dbc moved color registration from Color class to per-device lobby
Claus Gittinger <cg@exept.de>
parents: 1315
diff changeset
   107
    ^ '$Header: /cvs/stx/stx/libview/HostGraphicsDevice.st,v 1.3 1997-02-24 17:32:04 cg Exp $'
1284
d17f4d91174d intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   108
! !