|
Class: DisplayObject
Object
|
+--DisplayObject
|
+--BarChart3DWidget::Bar
|
+--BarChart3DWidget::Label
|
+--VisualComponent
- Package:
- stx:libview2
- Category:
- Compatibility-ST80-Graphics-Display Objects
- Version:
- rev:
1.43
date: 2017/02/13 19:01:46
- user: cg
- file: DisplayObject.st directory: libview2
- module: stx stc-classLibrary: libview2
- Author:
- Claus Gittinger
generic superclass for Display Objects held in ObjectViews
see DrawObject/LogicObject/DeskTopObject and subclasses for example uses.
behavior
-
dragDashedOutline
-
if true, outline dragging is done by drawing the line dashed.
if false, the outline is drawn solid.
Can be redefined in subclasses (for solid outline).
-
dragOutline
-
if true, dragging is done by drawing outline only;
if false, dragging is done by full draw (fast servers only).
Can be redefined in subclasses (for full dragging)
instance creation
-
new
-
queries
-
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.
ST-80 drawing
-
displayOn: aDisplayMedium at: aPoint
-
for ST-80 compatibility; not used in ST/X
-
displayOn: aDisplayMedium at: aPoint clippingBox: clipRectangle
-
for ST-80 compatibility; not used in ST/X
-
displayOn: aDisplayMedium at: aPoint clippingBox: clip rule: rule mask: aForm
-
for ST-80 compatibility; not used in ST/X.
in ST-80 programs, this is redefined
-
displayOn: aDisplayMedium x: x y: y
-
(comment from inherited method)
display the receiver in a graphicsContext - this method allows
for any object to be displayed in a ListView - for example.
accessing
-
bottom
-
-
bottomCenter
-
-
bottomLeft
-
-
bottomRight
-
-
bounds
-
ST80 component compatibility
-
corner
-
return the frame corner
-
extent
-
return the extent of the frame
-
frame
-
object must return a frame boundary rectangle
-
height
-
return the height of the frame
-
heightOn: aGC
-
return the height of the frame if drawon on aCG
-
left
-
-
leftCenter
-
-
origin
-
return the frame origin
-
origin: origin
-
object must calculate its dimension from outline
** This method raises an error - it must be redefined in concrete classes **
-
origin: origin corner: corner
-
object must calculate its dimension from outline
** This method raises an error - it must be redefined in concrete classes **
-
right
-
-
rightCenter
-
-
top
-
-
topCenter
-
-
topLeft
-
-
topRight
-
-
width
-
return the width of the frame
-
widthFrom: startIndex to: endIndex on: aGC
-
return the width of part of myself if drawn on aCG
** This method raises an error - it must be redefined in concrete classes **
-
widthOn: aGC
-
return the width of the frame if drawn on aCG
component protocol
-
container: aComponent
-
ignored here - added to allow images to be used like
VisualComponents (later, Image should inherit from it)
-
containerChangedSize
-
ignored here - added to allow images to be used like
VisualComponents (later, Image should inherit from it)
-
destroy
-
SimpleView>>destroySubviews wants to destroy us (if we are a view's component).
Do nothing here
-
realize
-
ignored here - added to allow images to be used like
VisualComponents (later, Image should inherit from it)
converting
-
asDisplayObject
-
drawing
-
drawDashedOutlineIn: aGC offset: anOffset
-
draw the receiver's outline at its origin offset by anOffset, aPoint
-
drawDragIn: aView
-
draw the receiver for dragging at its origin
-
drawDragIn: aView at: drawOrigin
-
draw the receiver for dragging at some point
-
drawDragIn: aView offset: drawOrigin
-
draw the receiver for dragging offset by some amount
-
drawIn: aView
-
draw the receiver at its origin
-
drawIn: aView at: drawOrigin
-
draw the receiver at drawOrigin, aPoint
-
drawIn: aView offset: anOffset
-
draw the receiver at its origin offset by anOffset, aPoint
** This method raises an error - it must be redefined in concrete classes **
-
drawOutlineIn: aView
-
draw the receiver's outline at its origin
-
drawOutlineIn: aView at: drawOrigin
-
draw the receiver's outline at drawOrigin, aPoint
-
drawOutlineIn: aView offset: anOffset
-
draw the receiver's outline at its origin offset by anOffset, aPoint
-
drawSelectedIn: aView
-
draw the receiver highlighted at its position
-
drawSelectedIn: aView offset: anOffset
-
draw the receiver highlighted - this is usually redefined
dummy event handling
-
buttonMotion: buttNr x: x y: y
-
-
buttonPress: buttNr x: x y: y
-
-
buttonRelease: buttNr x: x y: y
-
-
keyPress: key x: x y: y
-
-
keyRelease: key x: x y: y
-
initialization
-
computeBoundingBox
-
compute my boundingBox into the local variable 'frame'.
The box should be computed for Display.
** This method raises an error - it must be redefined in concrete classes **
-
computeBoundingBoxFor: aDevice
-
compute my boundingBox into the local variable 'frame'.
The box is to be computed for aDevice.
-
initialize
-
queries
-
canBeMoved
-
return true, if the receiver can be moved around (in an ObjectView)
-
canBeSelected
-
return true, if the receiver can be selected (in an ObjectView)
-
containsPoint: aPoint
-
-
frameIsHitBy: aPoint withDelta: delta
-
return true, if my frame is hit by aPoint
-
handlesKeyboardInput
-
return true, if the receiver handles keyboard input
-
hasFixedSize
-
return true, if the receiver has fixed size i.e. cannot be
resized
- by default, we do not allow resizing
-
intersects: aRectangle
-
object must decide, if it's intersecting a rectangle
-
isContainedIn: aRectangle
-
object must decide, if it's within a rectangle
-
isHitBy: aPoint
-
object must decide, if hit by a click at aPoint
-
isHitBy: aPoint withDelta: delta
-
object must decide, if hit by a click at aPoint;
usually this method is redefined in subclasses for a more complete
check (i.e. if objects boundary is not rectangular)
-
isOpaque
-
return true, if the object fully covers its frame (i.e. is rectangular
and has no 'holes'. Since we don't know, return false here
user actions
-
keyInput: akey
-
user actions-move
-
moveBy: delta
-
move the receiver - extent is unchanged
-
moveTo: aPoint
-
object must move to new origin
- default is to stay; ought to be redefined in subclass
|