|
Class: VisualComponent
Object
|
+--DisplayObject
|
+--VisualComponent
|
+--VisualPart
- Package:
- stx:libview2
- Category:
- Compatibility-ST80-Graphics-Display Objects
- Version:
- rev:
1.43
date: 2023/06/15 19:55:22
- user: cg
- file: VisualComponent.st directory: libview2
- module: stx stc-classLibrary: libview2
abstract superclass for all kinds of visual components.
This class and its subclasses (currently) exist mostly for
ST-80 compatibility - to provide a home for ported PD classes,
which depend on the VisualComponent hierarchy.
Notice:
this class was implemented using protocol information
from alpha testers, from reading PD programs and
from the Hopkins/Horan book.
- it may not be complete or compatible to the corresponding ST-80 class.
If you encounter any incompatibilities, please forward a note
describing the incompatibility verbal (i.e. no code) to the ST/X team.
This is still being constructed - not yet finished.
copyrightCOPYRIGHT (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.
instance creation
-
new
-
queries
-
defaultFont
-
-
defaultViewBackgroundColor
-
-
isAbstract
-
Return if this class is an abstract class.
True is returned here for myself only; false for subclasses.
Abstract subclasses must redefine this again.
accessing
-
container: someContainer
-
ignored here
-
geometryLayout
-
ignored here
-
geometryLayout: aLayout
-
ignored here
-
hiddenOnRealize: aBoolean
-
ignored here
-
id
-
ignored here
-
setParentViewIn: aView
-
ignored here - for now
-
superView
-
accessing-STX-attributes
-
application
-
-
borderWidth
-
-
borderWidth: aNumber
-
-
canTab: aBoolean
-
-
layout
-
-
layout: newLayout
-
-
level
-
-
level: newLevel
-
-
name
-
-
realized
-
return true, if the receiver is realized.
Realized means that it has been mapped (i.e. made visible) on
the display (as opposed to being only created and possibly invisible)
-
viewBackground
-
accessing-color & font
-
backgroundColor
-
-
backgroundColor: aColor
-
ignored here
-
defaultFont
-
-
font: aFont
-
ignored here
-
foregroundColor
-
-
foregroundColor: aColor
-
ignored here
accessing-dimensions
-
bottom
-
return my bottom y coordinate
-
bounds
-
return my bounds
-
bounds: aRectangle
-
set my bounds
-
computePreferredExtent
-
-
corner: aPoint
-
set my corner
-
defaultExtent
-
-
extent: anExtent
-
set my extent
-
left
-
return my left x coordinate
-
origin: newOrigin
-
move my origin
-
preferredBounds
-
return my preferredBounds
-
preferredExtent
-
-
right
-
return my right x coordinate
-
top
-
return my top y coordinate
-
viewRectangle
-
accessing-mvc
-
model
-
return nil - generic components have no model
change & update
-
changedPreferredBounds: oldPreferredBoundsOrNil
-
The receiver is notifying any dependents that its preferredBounds has changed.
displaying
-
displayOn: aGCOrStream
-
display the receiver on some graphicsContext.
The sender is repsonsible for restoring the GC's state
(i.e. it may be left in any undefined state)
** This method must be redefined in concrete classes (subclassResponsibility) **
-
displayOn: aGC at: aPoint
-
display the receiver translated by some amount on some graphicsContext
-
displayOn: aGC x: x y: y
-
display the receiver translated by some amount on some graphicsContext
event handling
-
buttonPress: button x: x y: y
-
button was pressed over me - ignored here
-
buttonRelease: button x: x y: y
-
button was released over me - ignored here
-
containerChangedSize
-
(comment from inherited method)
ignored here - added to allow images to be used like
VisualComponents (later, Image should inherit from it)
-
containerMapped
-
-
containerUnmapped
-
-
destroy
-
(comment from inherited method)
SimpleView>>destroySubviews wants to destroy us (if we are a view's component).
Do nothing here
-
hasKeyboardFocus: aBoolean
-
notification from the windowGroup that I got the keyboardFocus.
-
keyPress: key x: x y: y
-
key was pressed over me - ignored here
-
keyRelease: key x: x y: y
-
key was released over me - ignored here
-
mapped
-
-
showFocus: explicit
-
-
showNoFocus: explicit
-
initialization
-
initialize
-
-
resize
-
queries
-
delegate
-
-
heightOn: aGC
-
return my height, if displayed on aGC;
I assume that my height is independent of the device, and return
the bounds height
-
isBorderedWrapper
-
-
isCursorKeyConsumer
-
return true, if the receiver can be controlled by cursor keys;
i.e. it can handle some keyboard input,
isCursorKeyConsumer are potential candidates for getting the keyboard
focus initially within dialogBoxes, or when the focus-follows-pointer
mode is off.
-
isExternalTopView
-
-
isInputField
-
-
isKeyboardConsumer
-
-
isLayoutWrapper
-
-
isRootView
-
-
isTransparentBox
-
-
isWrapper
-
-
widthOn: aGC
-
return my width, if displayed on aGC;
I assume that my width is independent of the device, and return
the bounds width
testing
-
containsPoint: aPoint
-
return true, if the receiver contains aPoint
-
hasBorder
-
return true, if the receiver shows a border
-
intersects: aRectangle
-
return true, if the receiver's bounds intersects aRectangle
|