245
|
1 |
"
|
|
2 |
COPYRIGHT (c) 1996 by Claus Gittinger
|
|
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 |
"
|
|
12 |
|
|
13 |
|
|
14 |
|
|
15 |
Object subclass:#VisualComponent
|
|
16 |
instanceVariableNames:'bounds fgColor bgColor'
|
|
17 |
classVariableNames:''
|
|
18 |
poolDictionaries:''
|
|
19 |
category:'Graphics-Display Objects'
|
|
20 |
!
|
|
21 |
|
|
22 |
!VisualComponent class methodsFor:'documentation'!
|
|
23 |
|
|
24 |
copyright
|
|
25 |
"
|
|
26 |
COPYRIGHT (c) 1996 by Claus Gittinger
|
|
27 |
All Rights Reserved
|
|
28 |
|
|
29 |
This software is furnished under a license and may be used
|
|
30 |
only in accordance with the terms of that license and with the
|
|
31 |
inclusion of the above copyright notice. This software may not
|
|
32 |
be provided or otherwise made available to, or used by, any
|
|
33 |
other person. No title to or ownership of the software is
|
|
34 |
hereby transferred.
|
|
35 |
"
|
|
36 |
|
|
37 |
|
|
38 |
!
|
|
39 |
|
|
40 |
documentation
|
|
41 |
"
|
|
42 |
abstract superclass for all kinds of visual components
|
|
43 |
|
|
44 |
[author:]
|
|
45 |
Claus Gittinger
|
|
46 |
"
|
|
47 |
|
|
48 |
! !
|
|
49 |
|
|
50 |
!VisualComponent class methodsFor:'instance creation'!
|
|
51 |
|
|
52 |
new
|
|
53 |
^ self basicNew initialize
|
|
54 |
! !
|
|
55 |
|
|
56 |
!VisualComponent methodsFor:'accessing'!
|
|
57 |
|
|
58 |
bounds
|
|
59 |
^ bounds
|
|
60 |
|
|
61 |
"Created: 8.5.1996 / 23:35:19 / cg"
|
|
62 |
"Modified: 8.5.1996 / 23:35:43 / cg"
|
|
63 |
!
|
|
64 |
|
|
65 |
bounds:newBounds
|
|
66 |
bounds := newBounds
|
|
67 |
|
|
68 |
"Created: 8.5.1996 / 23:36:07 / cg"
|
|
69 |
!
|
|
70 |
|
|
71 |
preferredBounds
|
|
72 |
^ 100@100
|
|
73 |
|
|
74 |
"Created: 8.5.1996 / 23:36:29 / cg"
|
|
75 |
"Modified: 8.5.1996 / 23:37:05 / cg"
|
|
76 |
! !
|
|
77 |
|
|
78 |
!VisualComponent methodsFor:'accessing - look'!
|
|
79 |
|
|
80 |
backgroundColor:aColor
|
|
81 |
bgColor := aColor
|
|
82 |
|
|
83 |
"Created: 8.5.1996 / 23:47:11 / cg"
|
|
84 |
!
|
|
85 |
|
|
86 |
foregroundColor:aColor
|
|
87 |
fgColor := aColor
|
|
88 |
|
|
89 |
"Created: 8.5.1996 / 23:47:05 / cg"
|
|
90 |
! !
|
|
91 |
|
|
92 |
!VisualComponent methodsFor:'event handling'!
|
|
93 |
|
|
94 |
buttonPress:button x:x y:y
|
|
95 |
"/ ignored here
|
|
96 |
|
|
97 |
"Modified: 8.5.1996 / 23:43:51 / cg"
|
|
98 |
!
|
|
99 |
|
|
100 |
buttonRelease:button x:x y:y
|
|
101 |
"/ ignored here
|
|
102 |
|
|
103 |
"Created: 8.5.1996 / 23:38:30 / cg"
|
|
104 |
"Modified: 8.5.1996 / 23:43:53 / cg"
|
|
105 |
!
|
|
106 |
|
|
107 |
keyPress:key x:x y:y
|
|
108 |
"/ ignored here
|
|
109 |
|
|
110 |
"Modified: 8.5.1996 / 23:43:51 / cg"
|
|
111 |
"Created: 8.5.1996 / 23:46:03 / cg"
|
|
112 |
!
|
|
113 |
|
|
114 |
keyRelease:key x:x y:y
|
|
115 |
"/ ignored here
|
|
116 |
|
|
117 |
"Modified: 8.5.1996 / 23:43:51 / cg"
|
|
118 |
"Created: 8.5.1996 / 23:46:07 / cg"
|
|
119 |
! !
|
|
120 |
|
|
121 |
!VisualComponent methodsFor:'initialization'!
|
|
122 |
|
|
123 |
initialize
|
|
124 |
fgColor := Color black.
|
|
125 |
bgColor := Color white.
|
|
126 |
|
|
127 |
"Created: 8.5.1996 / 23:49:54 / cg"
|
|
128 |
! !
|
|
129 |
|
|
130 |
!VisualComponent class methodsFor:'documentation'!
|
|
131 |
|
|
132 |
version
|
|
133 |
^ '$Header: /cvs/stx/stx/libview2/Attic/VComponent.st,v 1.1 1996-05-08 22:00:45 cg Exp $'
|
|
134 |
! !
|