eXept Software AG Logo

Smalltalk/X Webserver

Documentation of class 'DisplayObject':

Home

Documentation
www.exept.de
Everywhere
for:
[back]

Class: DisplayObject


Inheritance:

   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

Description:


generic superclass for Display Objects held in ObjectViews
see DrawObject/LogicObject/DeskTopObject and subclasses for example uses.


Class protocol:

behavior
o  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).

o  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
o  new

queries
o  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.


Instance protocol:

ST-80 drawing
o  displayOn: aDisplayMedium at: aPoint
for ST-80 compatibility; not used in ST/X

o  displayOn: aDisplayMedium at: aPoint clippingBox: clipRectangle
for ST-80 compatibility; not used in ST/X

o  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

o  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
o  bottom

o  bottomCenter

o  bottomLeft

o  bottomRight

o  bounds
ST80 component compatibility

o  corner
return the frame corner

o  extent
return the extent of the frame

o  frame
object must return a frame boundary rectangle

o  height
return the height of the frame

o  heightOn: aGC
return the height of the frame if drawon on aCG

o  left

o  leftCenter

o  origin
return the frame origin

o  origin: origin
object must calculate its dimension from outline

** This method raises an error - it must be redefined in concrete classes **

o  origin: origin corner: corner
object must calculate its dimension from outline

** This method raises an error - it must be redefined in concrete classes **

o  right

o  rightCenter

o  top

o  topCenter

o  topLeft

o  topRight

o  width
return the width of the frame

o  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 **

o  widthOn: aGC
return the width of the frame if drawn on aCG

component protocol
o  container: aComponent
ignored here - added to allow images to be used like
VisualComponents (later, Image should inherit from it)

o  containerChangedSize
ignored here - added to allow images to be used like
VisualComponents (later, Image should inherit from it)

o  destroy
SimpleView>>destroySubviews wants to destroy us (if we are a view's component).
Do nothing here

o  realize
ignored here - added to allow images to be used like
VisualComponents (later, Image should inherit from it)

converting
o  asDisplayObject

drawing
o  drawDashedOutlineIn: aGC offset: anOffset
draw the receiver's outline at its origin offset by anOffset, aPoint

o  drawDragIn: aView
draw the receiver for dragging at its origin

o  drawDragIn: aView at: drawOrigin
draw the receiver for dragging at some point

o  drawDragIn: aView offset: drawOrigin
draw the receiver for dragging offset by some amount

o  drawIn: aView
draw the receiver at its origin

o  drawIn: aView at: drawOrigin
draw the receiver at drawOrigin, aPoint

o  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 **

o  drawOutlineIn: aView
draw the receiver's outline at its origin

o  drawOutlineIn: aView at: drawOrigin
draw the receiver's outline at drawOrigin, aPoint

o  drawOutlineIn: aView offset: anOffset
draw the receiver's outline at its origin offset by anOffset, aPoint

o  drawSelectedIn: aView
draw the receiver highlighted at its position

o  drawSelectedIn: aView offset: anOffset
draw the receiver highlighted - this is usually redefined

dummy event handling
o  buttonMotion: buttNr x: x y: y

o  buttonPress: buttNr x: x y: y

o  buttonRelease: buttNr x: x y: y

o  keyPress: key x: x y: y

o  keyRelease: key x: x y: y

initialization
o  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 **

o  computeBoundingBoxFor: aDevice
compute my boundingBox into the local variable 'frame'.
The box is to be computed for aDevice.

o  initialize

queries
o  canBeMoved
return true, if the receiver can be moved around (in an ObjectView)

o  canBeSelected
return true, if the receiver can be selected (in an ObjectView)

o  containsPoint: aPoint

o  frameIsHitBy: aPoint withDelta: delta
return true, if my frame is hit by aPoint

o  handlesKeyboardInput
return true, if the receiver handles keyboard input

o  hasFixedSize
return true, if the receiver has fixed size i.e. cannot be
resized
- by default, we do not allow resizing

o  intersects: aRectangle
object must decide, if it's intersecting a rectangle

o  isContainedIn: aRectangle
object must decide, if it's within a rectangle

o  isHitBy: aPoint
object must decide, if hit by a click at aPoint

o  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)

o  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
o  keyInput: akey

user actions-move
o  moveBy: delta
move the receiver - extent is unchanged

o  moveTo: aPoint
object must move to new origin
- default is to stay; ought to be redefined in subclass



ST/X 7.1.0.0; WebServer 1.663 at exept.de:8081; Thu, 15 Nov 2018 12:25:03 GMT