"
COPYRIGHT (c) 1996 by Claus Gittinger
All Rights Reserved
This software is furnished under a license and may be used
only in accordance with the terms of that license and with the
inclusion of the above copyright notice. This software may not
be provided or otherwise made available to, or used by, any
other person. No title to or ownership of the software is
hereby transferred.
"
Object subclass:#VisualComponent
instanceVariableNames:'bounds fgColor bgColor'
classVariableNames:''
poolDictionaries:''
category:'Graphics-Display Objects'
!
!VisualComponent class methodsFor:'documentation'!
copyright
"
COPYRIGHT (c) 1996 by Claus Gittinger
All Rights Reserved
This software is furnished under a license and may be used
only in accordance with the terms of that license and with the
inclusion of the above copyright notice. This software may not
be provided or otherwise made available to, or used by, any
other person. No title to or ownership of the software is
hereby transferred.
"
!
documentation
"
abstract superclass for all kinds of visual components.
This is still being constructed - not yet finished.
[author:]
Claus Gittinger
"
! !
!VisualComponent class methodsFor:'instance creation'!
new
^ self basicNew initialize
! !
!VisualComponent methodsFor:'accessing'!
bounds
"return my bounds"
^ bounds
"Created: 8.5.1996 / 23:35:19 / cg"
"Modified: 9.5.1996 / 00:12:00 / cg"
!
bounds:aRectangle
"set my bounds"
bounds := aRectangle
"Created: 8.5.1996 / 23:36:07 / cg"
"Modified: 9.5.1996 / 00:13:12 / cg"
!
preferredBounds
"return my preferredBounds"
^ 100@100
"Created: 8.5.1996 / 23:36:29 / cg"
"Modified: 9.5.1996 / 00:13:22 / cg"
! !
!VisualComponent methodsFor:'accessing - look'!
backgroundColor:aColor
"set my backgroundColor"
bgColor := aColor
"Created: 8.5.1996 / 23:47:11 / cg"
"Modified: 9.5.1996 / 00:13:33 / cg"
!
foregroundColor:aColor
"set my foregroundColor"
fgColor := aColor
"Created: 8.5.1996 / 23:47:05 / cg"
"Modified: 9.5.1996 / 00:13:39 / cg"
! !
!VisualComponent methodsFor:'event handling'!
buttonPress:button x:x y:y
"button was pressed over me - ignored here"
"Modified: 9.5.1996 / 00:14:08 / cg"
!
buttonRelease:button x:x y:y
"button was released over me - ignored here"
"Created: 8.5.1996 / 23:38:30 / cg"
"Modified: 9.5.1996 / 00:14:04 / cg"
!
keyPress:key x:x y:y
"key was pressed over me - ignored here"
"Created: 8.5.1996 / 23:46:03 / cg"
"Modified: 9.5.1996 / 00:14:14 / cg"
!
keyRelease:key x:x y:y
"key was released over me - ignored here"
"Created: 8.5.1996 / 23:46:07 / cg"
"Modified: 9.5.1996 / 00:14:19 / cg"
! !
!VisualComponent methodsFor:'initialization'!
initialize
fgColor := Color black.
bgColor := Color white.
"Created: 8.5.1996 / 23:49:54 / cg"
! !
!VisualComponent class methodsFor:'documentation'!
version
^ '$Header: /cvs/stx/stx/libview2/VisualComponent.st,v 1.2 1996-05-08 22:14:40 cg Exp $'
! !