SolidBackground.st
author matilk
Wed, 13 Sep 2017 09:40:34 +0200
changeset 8174 2704c965b97b
parent 7943 f6486c8f64dc
permissions -rw-r--r--
#BUGFIX by Maren class: DeviceGraphicsContext changed: #displayDeviceOpaqueForm:x:y: nil check
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
5465
02601a774050 added: #copyright
Claus Gittinger <cg@exept.de>
parents: 5397
diff changeset
     1
"
7943
f6486c8f64dc #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 6688
diff changeset
     2
 COPYRIGHT (c) 2009 by Claus Gittinger / eXept Software AG
5465
02601a774050 added: #copyright
Claus Gittinger <cg@exept.de>
parents: 5397
diff changeset
     3
              All Rights Reserved
02601a774050 added: #copyright
Claus Gittinger <cg@exept.de>
parents: 5397
diff changeset
     4
02601a774050 added: #copyright
Claus Gittinger <cg@exept.de>
parents: 5397
diff changeset
     5
 This software is furnished under a license and may be used
02601a774050 added: #copyright
Claus Gittinger <cg@exept.de>
parents: 5397
diff changeset
     6
 only in accordance with the terms of that license and with the
02601a774050 added: #copyright
Claus Gittinger <cg@exept.de>
parents: 5397
diff changeset
     7
 inclusion of the above copyright notice.   This software may not
02601a774050 added: #copyright
Claus Gittinger <cg@exept.de>
parents: 5397
diff changeset
     8
 be provided or otherwise made available to, or used by, any
02601a774050 added: #copyright
Claus Gittinger <cg@exept.de>
parents: 5397
diff changeset
     9
 other person.  No title to or ownership of the software is
02601a774050 added: #copyright
Claus Gittinger <cg@exept.de>
parents: 5397
diff changeset
    10
 hereby transferred.
02601a774050 added: #copyright
Claus Gittinger <cg@exept.de>
parents: 5397
diff changeset
    11
"
5397
cf2688ceb3f4 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    12
"{ Package: 'stx:libview' }"
cf2688ceb3f4 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    13
7943
f6486c8f64dc #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 6688
diff changeset
    14
"{ NameSpace: Smalltalk }"
f6486c8f64dc #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 6688
diff changeset
    15
5397
cf2688ceb3f4 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    16
AbstractBackground subclass:#SolidBackground
cf2688ceb3f4 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    17
	instanceVariableNames:'color'
cf2688ceb3f4 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    18
	classVariableNames:''
cf2688ceb3f4 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    19
	poolDictionaries:''
cf2688ceb3f4 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    20
	category:'Graphics-Support'
cf2688ceb3f4 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    21
!
cf2688ceb3f4 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    22
5465
02601a774050 added: #copyright
Claus Gittinger <cg@exept.de>
parents: 5397
diff changeset
    23
!SolidBackground class methodsFor:'documentation'!
02601a774050 added: #copyright
Claus Gittinger <cg@exept.de>
parents: 5397
diff changeset
    24
02601a774050 added: #copyright
Claus Gittinger <cg@exept.de>
parents: 5397
diff changeset
    25
copyright
02601a774050 added: #copyright
Claus Gittinger <cg@exept.de>
parents: 5397
diff changeset
    26
"
7943
f6486c8f64dc #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 6688
diff changeset
    27
 COPYRIGHT (c) 2009 by Claus Gittinger / eXept Software AG
5465
02601a774050 added: #copyright
Claus Gittinger <cg@exept.de>
parents: 5397
diff changeset
    28
              All Rights Reserved
02601a774050 added: #copyright
Claus Gittinger <cg@exept.de>
parents: 5397
diff changeset
    29
02601a774050 added: #copyright
Claus Gittinger <cg@exept.de>
parents: 5397
diff changeset
    30
 This software is furnished under a license and may be used
02601a774050 added: #copyright
Claus Gittinger <cg@exept.de>
parents: 5397
diff changeset
    31
 only in accordance with the terms of that license and with the
02601a774050 added: #copyright
Claus Gittinger <cg@exept.de>
parents: 5397
diff changeset
    32
 inclusion of the above copyright notice.   This software may not
02601a774050 added: #copyright
Claus Gittinger <cg@exept.de>
parents: 5397
diff changeset
    33
 be provided or otherwise made available to, or used by, any
02601a774050 added: #copyright
Claus Gittinger <cg@exept.de>
parents: 5397
diff changeset
    34
 other person.  No title to or ownership of the software is
02601a774050 added: #copyright
Claus Gittinger <cg@exept.de>
parents: 5397
diff changeset
    35
 hereby transferred.
02601a774050 added: #copyright
Claus Gittinger <cg@exept.de>
parents: 5397
diff changeset
    36
"
6688
3aa9c7b534b8 class: SolidBackground
Claus Gittinger <cg@exept.de>
parents: 5682
diff changeset
    37
!
3aa9c7b534b8 class: SolidBackground
Claus Gittinger <cg@exept.de>
parents: 5682
diff changeset
    38
3aa9c7b534b8 class: SolidBackground
Claus Gittinger <cg@exept.de>
parents: 5682
diff changeset
    39
examples
3aa9c7b534b8 class: SolidBackground
Claus Gittinger <cg@exept.de>
parents: 5682
diff changeset
    40
"
3aa9c7b534b8 class: SolidBackground
Claus Gittinger <cg@exept.de>
parents: 5682
diff changeset
    41
    |v|
3aa9c7b534b8 class: SolidBackground
Claus Gittinger <cg@exept.de>
parents: 5682
diff changeset
    42
3aa9c7b534b8 class: SolidBackground
Claus Gittinger <cg@exept.de>
parents: 5682
diff changeset
    43
    v := View new.
3aa9c7b534b8 class: SolidBackground
Claus Gittinger <cg@exept.de>
parents: 5682
diff changeset
    44
    v viewBackground:(SolidBackground new color:Color red).
3aa9c7b534b8 class: SolidBackground
Claus Gittinger <cg@exept.de>
parents: 5682
diff changeset
    45
    v open.
3aa9c7b534b8 class: SolidBackground
Claus Gittinger <cg@exept.de>
parents: 5682
diff changeset
    46
"
5465
02601a774050 added: #copyright
Claus Gittinger <cg@exept.de>
parents: 5397
diff changeset
    47
! !
5397
cf2688ceb3f4 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    48
5682
Claus Gittinger <cg@exept.de>
parents: 5465
diff changeset
    49
!SolidBackground methodsFor:'accessing'!
Claus Gittinger <cg@exept.de>
parents: 5465
diff changeset
    50
Claus Gittinger <cg@exept.de>
parents: 5465
diff changeset
    51
color
Claus Gittinger <cg@exept.de>
parents: 5465
diff changeset
    52
    ^ color
Claus Gittinger <cg@exept.de>
parents: 5465
diff changeset
    53
!
Claus Gittinger <cg@exept.de>
parents: 5465
diff changeset
    54
Claus Gittinger <cg@exept.de>
parents: 5465
diff changeset
    55
color:something
Claus Gittinger <cg@exept.de>
parents: 5465
diff changeset
    56
    color := something.
Claus Gittinger <cg@exept.de>
parents: 5465
diff changeset
    57
! !
Claus Gittinger <cg@exept.de>
parents: 5465
diff changeset
    58
Claus Gittinger <cg@exept.de>
parents: 5465
diff changeset
    59
!SolidBackground methodsFor:'drawing'!
Claus Gittinger <cg@exept.de>
parents: 5465
diff changeset
    60
Claus Gittinger <cg@exept.de>
parents: 5465
diff changeset
    61
fillRectangleX:x y:y width:w height:h in:aView
Claus Gittinger <cg@exept.de>
parents: 5465
diff changeset
    62
    aView paint:color.
Claus Gittinger <cg@exept.de>
parents: 5465
diff changeset
    63
    aView fillRectangleX:x y:y width:w height:h
Claus Gittinger <cg@exept.de>
parents: 5465
diff changeset
    64
Claus Gittinger <cg@exept.de>
parents: 5465
diff changeset
    65
    "Created: / 23-01-2011 / 01:59:29 / cg"
Claus Gittinger <cg@exept.de>
parents: 5465
diff changeset
    66
! !
Claus Gittinger <cg@exept.de>
parents: 5465
diff changeset
    67
5397
cf2688ceb3f4 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    68
!SolidBackground class methodsFor:'documentation'!
cf2688ceb3f4 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    69
cf2688ceb3f4 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    70
version_CVS
7943
f6486c8f64dc #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 6688
diff changeset
    71
    ^ '$Header$'
5397
cf2688ceb3f4 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    72
! !
6688
3aa9c7b534b8 class: SolidBackground
Claus Gittinger <cg@exept.de>
parents: 5682
diff changeset
    73