eXept Software AG Logo

Smalltalk/X Webserver

Documentation of class 'VisualComponent':

Home

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

Class: VisualComponent


Inheritance:

   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

Description:


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.

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.

Class protocol:

instance creation
o  new

queries
o  defaultFont

o  defaultViewBackgroundColor

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:

accessing
o  container: someContainer
ignored here

o  geometryLayout
ignored here

o  geometryLayout: aLayout
ignored here

o  hiddenOnRealize: aBoolean
ignored here

o  id
ignored here

o  setParentViewIn: aView
ignored here - for now

o  superView

accessing-STX-attributes
o  application

o  borderWidth

o  borderWidth: aNumber

o  canTab: aBoolean

o  layout

o  layout: newLayout

o  level

o  level: newLevel

o  name

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

o  viewBackground

accessing-color & font
o  backgroundColor

o  backgroundColor: aColor
ignored here

o  defaultFont

o  font: aFont
ignored here

o  foregroundColor

o  foregroundColor: aColor
ignored here

accessing-dimensions
o  bottom
return my bottom y coordinate

o  bounds
return my bounds

o  bounds: aRectangle
set my bounds

o  computePreferredExtent

o  corner: aPoint
set my corner

o  defaultExtent

o  extent: anExtent
set my extent

o  left
return my left x coordinate

o  origin: newOrigin
move my origin

o  preferredBounds
return my preferredBounds

o  preferredExtent

o  right
return my right x coordinate

o  top
return my top y coordinate

o  viewRectangle

accessing-mvc
o  model
return nil - generic components have no model

change & update
o  changedPreferredBounds: oldPreferredBoundsOrNil
The receiver is notifying any dependents that its preferredBounds has changed.

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

o  displayOn: aGC at: aPoint
display the receiver translated by some amount on some graphicsContext

o  displayOn: aGC x: x y: y
display the receiver translated by some amount on some graphicsContext

event handling
o  buttonPress: button x: x y: y
button was pressed over me - ignored here

o  buttonRelease: button x: x y: y
button was released over me - ignored here

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

o  containerMapped

o  containerUnmapped

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

o  hasKeyboardFocus: aBoolean
notification from the windowGroup that I got the keyboardFocus.

o  keyPress: key x: x y: y
key was pressed over me - ignored here

o  keyRelease: key x: x y: y
key was released over me - ignored here

o  mapped

o  showFocus: explicit

o  showNoFocus: explicit

initialization
o  initialize

o  resize

queries
o  delegate

o  heightOn: aGC
return my height, if displayed on aGC;
I assume that my height is independent of the device, and return
the bounds height

o  isBorderedWrapper

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

o  isExternalTopView

o  isInputField

o  isKeyboardConsumer

o  isLayoutWrapper

o  isRootView

o  isTransparentBox

o  isWrapper

o  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
o  containsPoint: aPoint
return true, if the receiver contains aPoint

o  hasBorder
return true, if the receiver shows a border

o  intersects: aRectangle
return true, if the receiver's bounds intersects aRectangle



ST/X 7.7.0.0; WebServer 1.702 at 20f6060372b9.unknown:8081; Sat, 27 Jul 2024 07:43:13 GMT