SolidBackground.st
author Jan Vrany <jan.vrany@fit.cvut.cz>
Thu, 14 Sep 2017 09:28:09 +0100
branchjv
changeset 8182 c730140a0156
parent 6688 3aa9c7b534b8
child 7943 f6486c8f64dc
permissions -rw-r--r--
X11: compile `GLXWorkstation` with OpenGL OpenGL compiler and linker flags are configured locally in `Make.proto` rather than in target config - this moves the configuration closer to the code. Currently all supported (and considered) platforms have OpenGL implementation. Later on one may use conditionals in makefile to deal exceptions.
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
5465
02601a774050 added: #copyright
Claus Gittinger <cg@exept.de>
parents: 5397
diff changeset
     1
"
02601a774050 added: #copyright
Claus Gittinger <cg@exept.de>
parents: 5397
diff changeset
     2
 COPYRIGHT (c) 2009 by eXept Software AG
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
cf2688ceb3f4 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    14
AbstractBackground subclass:#SolidBackground
cf2688ceb3f4 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    15
	instanceVariableNames:'color'
cf2688ceb3f4 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    16
	classVariableNames:''
cf2688ceb3f4 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    17
	poolDictionaries:''
cf2688ceb3f4 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    18
	category:'Graphics-Support'
cf2688ceb3f4 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    19
!
cf2688ceb3f4 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    20
5465
02601a774050 added: #copyright
Claus Gittinger <cg@exept.de>
parents: 5397
diff changeset
    21
!SolidBackground class methodsFor:'documentation'!
02601a774050 added: #copyright
Claus Gittinger <cg@exept.de>
parents: 5397
diff changeset
    22
02601a774050 added: #copyright
Claus Gittinger <cg@exept.de>
parents: 5397
diff changeset
    23
copyright
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 (c) 2009 by eXept Software AG
02601a774050 added: #copyright
Claus Gittinger <cg@exept.de>
parents: 5397
diff changeset
    26
              All Rights Reserved
02601a774050 added: #copyright
Claus Gittinger <cg@exept.de>
parents: 5397
diff changeset
    27
02601a774050 added: #copyright
Claus Gittinger <cg@exept.de>
parents: 5397
diff changeset
    28
 This software is furnished under a license and may be used
02601a774050 added: #copyright
Claus Gittinger <cg@exept.de>
parents: 5397
diff changeset
    29
 only in accordance with the terms of that license and with the
02601a774050 added: #copyright
Claus Gittinger <cg@exept.de>
parents: 5397
diff changeset
    30
 inclusion of the above copyright notice.   This software may not
02601a774050 added: #copyright
Claus Gittinger <cg@exept.de>
parents: 5397
diff changeset
    31
 be provided or otherwise made available to, or used by, any
02601a774050 added: #copyright
Claus Gittinger <cg@exept.de>
parents: 5397
diff changeset
    32
 other person.  No title to or ownership of the software is
02601a774050 added: #copyright
Claus Gittinger <cg@exept.de>
parents: 5397
diff changeset
    33
 hereby transferred.
02601a774050 added: #copyright
Claus Gittinger <cg@exept.de>
parents: 5397
diff changeset
    34
"
6688
3aa9c7b534b8 class: SolidBackground
Claus Gittinger <cg@exept.de>
parents: 5682
diff changeset
    35
!
3aa9c7b534b8 class: SolidBackground
Claus Gittinger <cg@exept.de>
parents: 5682
diff changeset
    36
3aa9c7b534b8 class: SolidBackground
Claus Gittinger <cg@exept.de>
parents: 5682
diff changeset
    37
examples
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
    |v|
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 := View new.
3aa9c7b534b8 class: SolidBackground
Claus Gittinger <cg@exept.de>
parents: 5682
diff changeset
    42
    v viewBackground:(SolidBackground new color:Color red).
3aa9c7b534b8 class: SolidBackground
Claus Gittinger <cg@exept.de>
parents: 5682
diff changeset
    43
    v open.
3aa9c7b534b8 class: SolidBackground
Claus Gittinger <cg@exept.de>
parents: 5682
diff changeset
    44
"
5465
02601a774050 added: #copyright
Claus Gittinger <cg@exept.de>
parents: 5397
diff changeset
    45
! !
5397
cf2688ceb3f4 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    46
5682
Claus Gittinger <cg@exept.de>
parents: 5465
diff changeset
    47
!SolidBackground methodsFor:'accessing'!
Claus Gittinger <cg@exept.de>
parents: 5465
diff changeset
    48
Claus Gittinger <cg@exept.de>
parents: 5465
diff changeset
    49
color
Claus Gittinger <cg@exept.de>
parents: 5465
diff changeset
    50
    ^ color
Claus Gittinger <cg@exept.de>
parents: 5465
diff changeset
    51
!
Claus Gittinger <cg@exept.de>
parents: 5465
diff changeset
    52
Claus Gittinger <cg@exept.de>
parents: 5465
diff changeset
    53
color:something
Claus Gittinger <cg@exept.de>
parents: 5465
diff changeset
    54
    color := something.
Claus Gittinger <cg@exept.de>
parents: 5465
diff changeset
    55
! !
Claus Gittinger <cg@exept.de>
parents: 5465
diff changeset
    56
Claus Gittinger <cg@exept.de>
parents: 5465
diff changeset
    57
!SolidBackground methodsFor:'drawing'!
Claus Gittinger <cg@exept.de>
parents: 5465
diff changeset
    58
Claus Gittinger <cg@exept.de>
parents: 5465
diff changeset
    59
fillRectangleX:x y:y width:w height:h in:aView
Claus Gittinger <cg@exept.de>
parents: 5465
diff changeset
    60
    aView paint:color.
Claus Gittinger <cg@exept.de>
parents: 5465
diff changeset
    61
    aView fillRectangleX:x y:y width:w height:h
Claus Gittinger <cg@exept.de>
parents: 5465
diff changeset
    62
Claus Gittinger <cg@exept.de>
parents: 5465
diff changeset
    63
    "Created: / 23-01-2011 / 01:59:29 / cg"
Claus Gittinger <cg@exept.de>
parents: 5465
diff changeset
    64
! !
Claus Gittinger <cg@exept.de>
parents: 5465
diff changeset
    65
5397
cf2688ceb3f4 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    66
!SolidBackground class methodsFor:'documentation'!
cf2688ceb3f4 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    67
cf2688ceb3f4 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    68
version_CVS
6688
3aa9c7b534b8 class: SolidBackground
Claus Gittinger <cg@exept.de>
parents: 5682
diff changeset
    69
    ^ '$Header: /cvs/stx/stx/libview/SolidBackground.st,v 1.4 2014-12-21 15:38:34 cg Exp $'
5397
cf2688ceb3f4 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    70
! !
6688
3aa9c7b534b8 class: SolidBackground
Claus Gittinger <cg@exept.de>
parents: 5682
diff changeset
    71