MonoMappedPalette.st
author Claus Gittinger <cg@exept.de>
Wed, 22 Aug 2018 12:58:11 +0200
changeset 8451 6eafe0433763
parent 7955 66531231e428
permissions -rw-r--r--
#QUALITY by cg class: WindowSensor comment/format in: #basicAddDamage:view:
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
3847
288ab85676aa *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
     1
"
7955
66531231e428 #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3876
diff changeset
     2
 COPYRIGHT (c) 1997 by Claus Gittinger / eXept Software AG
66531231e428 #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3876
diff changeset
     3
              All Rights Reserved
3847
288ab85676aa *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
     4
288ab85676aa *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
     5
 This software is furnished under a license and may be used
288ab85676aa *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
     6
 only in accordance with the terms of that license and with the
288ab85676aa *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
     7
 inclusion of the above copyright notice.   This software may not
288ab85676aa *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
     8
 be provided or otherwise made available to, or used by, any
288ab85676aa *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
     9
 other person.  No title to or ownership of the software is
288ab85676aa *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    10
 hereby transferred.
288ab85676aa *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    11
"
7955
66531231e428 #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3876
diff changeset
    12
"{ Package: 'stx:libview' }"
3847
288ab85676aa *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    13
7955
66531231e428 #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3876
diff changeset
    14
"{ NameSpace: Smalltalk }"
3847
288ab85676aa *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    15
288ab85676aa *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    16
MappedPalette subclass:#MonoMappedPalette
288ab85676aa *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    17
	instanceVariableNames:''
3876
f4dc6267a30a getting rid of colorMap
Claus Gittinger <cg@exept.de>
parents: 3848
diff changeset
    18
	classVariableNames:'WhiteBlack BlackWhite'
3847
288ab85676aa *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    19
	poolDictionaries:''
3848
84597432b833 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3847
diff changeset
    20
	category:'Graphics-Images-Support'
3847
288ab85676aa *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    21
!
288ab85676aa *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    22
288ab85676aa *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    23
!MonoMappedPalette class methodsFor:'documentation'!
288ab85676aa *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    24
288ab85676aa *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    25
copyright
288ab85676aa *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    26
"
7955
66531231e428 #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3876
diff changeset
    27
 COPYRIGHT (c) 1997 by Claus Gittinger / eXept Software AG
66531231e428 #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3876
diff changeset
    28
              All Rights Reserved
3847
288ab85676aa *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    29
288ab85676aa *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    30
 This software is furnished under a license and may be used
288ab85676aa *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    31
 only in accordance with the terms of that license and with the
288ab85676aa *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    32
 inclusion of the above copyright notice.   This software may not
288ab85676aa *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    33
 be provided or otherwise made available to, or used by, any
288ab85676aa *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    34
 other person.  No title to or ownership of the software is
288ab85676aa *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    35
 hereby transferred.
288ab85676aa *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    36
"
288ab85676aa *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    37
!
288ab85676aa *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    38
288ab85676aa *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    39
documentation
288ab85676aa *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    40
"
3848
84597432b833 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3847
diff changeset
    41
    This class will (sooner or later) take over and/or redefine some of the Colormap functionality.
84597432b833 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3847
diff changeset
    42
    This migration will be done both to cleanup the code and for VW compatibility.
3847
288ab85676aa *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    43
3848
84597432b833 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3847
diff changeset
    44
    Notice: For now, the whole functionality is still in Colormap
84597432b833 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3847
diff changeset
    45
84597432b833 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3847
diff changeset
    46
    [see also:]
84597432b833 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3847
diff changeset
    47
	Color Image Form
3847
288ab85676aa *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    48
"
288ab85676aa *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    49
! !
288ab85676aa *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    50
3876
f4dc6267a30a getting rid of colorMap
Claus Gittinger <cg@exept.de>
parents: 3848
diff changeset
    51
!MonoMappedPalette class methodsFor:'instance creation'!
f4dc6267a30a getting rid of colorMap
Claus Gittinger <cg@exept.de>
parents: 3848
diff changeset
    52
f4dc6267a30a getting rid of colorMap
Claus Gittinger <cg@exept.de>
parents: 3848
diff changeset
    53
blackWhite
f4dc6267a30a getting rid of colorMap
Claus Gittinger <cg@exept.de>
parents: 3848
diff changeset
    54
    BlackWhite isNil ifTrue:[
f4dc6267a30a getting rid of colorMap
Claus Gittinger <cg@exept.de>
parents: 3848
diff changeset
    55
        BlackWhite := super blackWhite
f4dc6267a30a getting rid of colorMap
Claus Gittinger <cg@exept.de>
parents: 3848
diff changeset
    56
    ].
f4dc6267a30a getting rid of colorMap
Claus Gittinger <cg@exept.de>
parents: 3848
diff changeset
    57
    ^ BlackWhite
f4dc6267a30a getting rid of colorMap
Claus Gittinger <cg@exept.de>
parents: 3848
diff changeset
    58
!
f4dc6267a30a getting rid of colorMap
Claus Gittinger <cg@exept.de>
parents: 3848
diff changeset
    59
f4dc6267a30a getting rid of colorMap
Claus Gittinger <cg@exept.de>
parents: 3848
diff changeset
    60
whiteBlack
f4dc6267a30a getting rid of colorMap
Claus Gittinger <cg@exept.de>
parents: 3848
diff changeset
    61
    WhiteBlack isNil ifTrue:[
f4dc6267a30a getting rid of colorMap
Claus Gittinger <cg@exept.de>
parents: 3848
diff changeset
    62
        WhiteBlack := super whiteBlack
f4dc6267a30a getting rid of colorMap
Claus Gittinger <cg@exept.de>
parents: 3848
diff changeset
    63
    ].
f4dc6267a30a getting rid of colorMap
Claus Gittinger <cg@exept.de>
parents: 3848
diff changeset
    64
    ^ WhiteBlack
f4dc6267a30a getting rid of colorMap
Claus Gittinger <cg@exept.de>
parents: 3848
diff changeset
    65
! !
f4dc6267a30a getting rid of colorMap
Claus Gittinger <cg@exept.de>
parents: 3848
diff changeset
    66
f4dc6267a30a getting rid of colorMap
Claus Gittinger <cg@exept.de>
parents: 3848
diff changeset
    67
!MonoMappedPalette methodsFor:'accessing'!
f4dc6267a30a getting rid of colorMap
Claus Gittinger <cg@exept.de>
parents: 3848
diff changeset
    68
f4dc6267a30a getting rid of colorMap
Claus Gittinger <cg@exept.de>
parents: 3848
diff changeset
    69
at:index put:aColor
f4dc6267a30a getting rid of colorMap
Claus Gittinger <cg@exept.de>
parents: 3848
diff changeset
    70
    self error:'this palette cannot be changed'.
f4dc6267a30a getting rid of colorMap
Claus Gittinger <cg@exept.de>
parents: 3848
diff changeset
    71
! !
f4dc6267a30a getting rid of colorMap
Claus Gittinger <cg@exept.de>
parents: 3848
diff changeset
    72
3847
288ab85676aa *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    73
!MonoMappedPalette class methodsFor:'documentation'!
288ab85676aa *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    74
288ab85676aa *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    75
version
7955
66531231e428 #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3876
diff changeset
    76
    ^ '$Header$'
3847
288ab85676aa *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    77
! !
7955
66531231e428 #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3876
diff changeset
    78