author | Claus Gittinger <cg@exept.de> |
Mon, 22 Jul 2019 13:56:47 +0200 | |
changeset 8744 | d9c17cf6f9dd |
parent 7949 | eea2873e09b7 |
permissions | -rw-r--r-- |
5459 | 1 |
" |
7949 | 2 |
COPYRIGHT (c) 2009 by Claus Gittinger / eXept Software AG |
5459 | 3 |
All Rights Reserved |
4 |
||
5 |
This software is furnished under a license and may be used |
|
6 |
only in accordance with the terms of that license and with the |
|
7 |
inclusion of the above copyright notice. This software may not |
|
8 |
be provided or otherwise made available to, or used by, any |
|
9 |
other person. No title to or ownership of the software is |
|
10 |
hereby transferred. |
|
11 |
" |
|
5398 | 12 |
"{ Package: 'stx:libview' }" |
13 |
||
6955 | 14 |
"{ NameSpace: Smalltalk }" |
15 |
||
5398 | 16 |
Object subclass:#AbstractBackground |
17 |
instanceVariableNames:'' |
|
18 |
classVariableNames:'' |
|
19 |
poolDictionaries:'' |
|
20 |
category:'Graphics-Support' |
|
21 |
! |
|
22 |
||
23 |
!AbstractBackground class methodsFor:'documentation'! |
|
24 |
||
5459 | 25 |
copyright |
26 |
" |
|
7949 | 27 |
COPYRIGHT (c) 2009 by Claus Gittinger / eXept Software AG |
5459 | 28 |
All Rights Reserved |
29 |
||
30 |
This software is furnished under a license and may be used |
|
31 |
only in accordance with the terms of that license and with the |
|
32 |
inclusion of the above copyright notice. This software may not |
|
33 |
be provided or otherwise made available to, or used by, any |
|
34 |
other person. No title to or ownership of the software is |
|
35 |
hereby transferred. |
|
36 |
" |
|
37 |
! |
|
38 |
||
5398 | 39 |
documentation |
40 |
" |
|
41 |
This will replace the viewBackground color. |
|
6238 | 42 |
Instances of me (and subclasses) can be set as a widget's |
43 |
viewBackground, and will get |
|
44 |
fillRectangleX:x y:y width:w height:h in:aView |
|
45 |
messages whenever the widget wants to redraw (parts of) its background. |
|
46 |
||
47 |
See the example in GradientBackground. |
|
5398 | 48 |
|
49 |
[author:] |
|
50 |
Claus Gittinger |
|
6238 | 51 |
|
52 |
[see also:] |
|
53 |
GradientBackground |
|
5398 | 54 |
" |
5683 | 55 |
! |
56 |
||
57 |
examples |
|
58 |
" |
|
59 |
|v| |
|
60 |
||
61 |
v := View new. |
|
62 |
v viewBackground:(SolidBackground new color:Color red). |
|
63 |
v open. |
|
64 |
" |
|
65 |
! ! |
|
66 |
||
7862 | 67 |
!AbstractBackground class methodsFor:'queries'! |
68 |
||
69 |
isAbstract |
|
70 |
"Return if this class is an abstract class. |
|
71 |
True is returned here for myself only; false for subclasses. |
|
72 |
Abstract subclasses must redefine this again." |
|
73 |
||
74 |
^ self == AbstractBackground. |
|
75 |
! ! |
|
76 |
||
5683 | 77 |
!AbstractBackground methodsFor:'drawing'! |
78 |
||
79 |
fillRectangleX:x y:y width:w height:h in:aView |
|
80 |
self subclassResponsibility |
|
81 |
||
82 |
"Created: / 23-01-2011 / 01:59:29 / cg" |
|
83 |
! ! |
|
84 |
||
85 |
!AbstractBackground methodsFor:'ignored conversion'! |
|
86 |
||
87 |
asFormOn:aDevice |
|
5704
d7c401801223
comment/format in: #initializeAllPluginClasses
Claus Gittinger <cg@exept.de>
parents:
5683
diff
changeset
|
88 |
self subclassResponsibility |
5683 | 89 |
|
90 |
"Created: / 23-01-2011 / 01:45:35 / cg" |
|
5704
d7c401801223
comment/format in: #initializeAllPluginClasses
Claus Gittinger <cg@exept.de>
parents:
5683
diff
changeset
|
91 |
"Modified: / 03-02-2011 / 19:55:49 / cg" |
5683 | 92 |
! |
93 |
||
94 |
onDevice:aDevice |
|
5704
d7c401801223
comment/format in: #initializeAllPluginClasses
Claus Gittinger <cg@exept.de>
parents:
5683
diff
changeset
|
95 |
self subclassResponsibility |
5683 | 96 |
|
97 |
"Created: / 23-01-2011 / 01:46:11 / cg" |
|
5704
d7c401801223
comment/format in: #initializeAllPluginClasses
Claus Gittinger <cg@exept.de>
parents:
5683
diff
changeset
|
98 |
"Modified: / 03-02-2011 / 19:55:40 / cg" |
5398 | 99 |
! ! |
100 |
||
6239 | 101 |
!AbstractBackground methodsFor:'testing'! |
102 |
||
103 |
isViewBackground |
|
104 |
^ true |
|
6955 | 105 |
! |
106 |
||
107 |
needsFullRedrawOnChangeOfHeight |
|
108 |
^ false |
|
109 |
! |
|
110 |
||
111 |
needsFullRedrawOnChangeOfWidth |
|
112 |
^ false |
|
6239 | 113 |
! ! |
114 |
||
5398 | 115 |
!AbstractBackground class methodsFor:'documentation'! |
116 |
||
6239 | 117 |
version |
6955 | 118 |
^ '$Header$' |
6239 | 119 |
! |
120 |
||
5398 | 121 |
version_CVS |
6955 | 122 |
^ '$Header$' |
5398 | 123 |
! ! |
6238 | 124 |