Class Documentation

Name:PointerMonitor
Version:1.0
ID:ID_POINTERMONITOR
Status:Unspecified
Category:GUI
Date:January 2001
Author:Rocklyte Systems
Copyright:  Rocklyte Systems (c) 2000-2001. All rights reserved.
Short:  Monitors the position of the pointing device.



Description

The PointerMonitor class provides an accurate indication of a pointer's coordinates as it moves around the display. This can be useful for debugging and other circumstances where it might be useful to know the exact position of the mouse pointer. By default a PointerMonitor object will always look for the object named 'SystemPointer' and monitor it on initialisation. If necessary, you may specify the Pointer object to be monitored by setting the Pointer field.

Creating a valid PointerMonitor object does not require any field presets. Support for setting up the font used to print out the coordinates and the alignment/positioning of the graphic is available if you need it. Once initialised, a PointerMonitor will continuously print changes to the pointer's coordinates until it is freed from the system.

Structure

The PointerMonitor object consists of the following public fields:

Align  Sets the alignment of the PointerMonitor within its container.
ColourRGB  Defines the colour of the PointerMonitor font in RGB format.
Colour  String-based field for setting the colour of a PointerMonitor font.
Drawable  The object that the PointerMonitor is drawn to.
Pointer  Refers to the Pointer object that should be monitored.
XCoord  The horizontal coordinate of the PointerMonitor graphic.
YCoord  The vertical coordinate of the PointerMonitor graphic.
Field:Align
Short:Sets the alignment of the PointerMonitor within its container.
Type:LONG
Status:Write

The position of the PointerMonitor graphic can be arbitrarily set by giving it an alignment. Valid alignment values are:

   RIGHT      - Align to the right of the container.
   LEFT       - Keep to the left of the container.
   BOTTOM     - Align to the bottom of the container.
   TOP        - Keep to the top of the container.
   CENTER     - Center the graphic in the middle of the container.
   HORIZONTAL - Center the graphic horizontally.
   VERTICAL   - Center the graphic vertically.

 

Field:ColourRGB
Short:Defines the colour of the PointerMonitor font in RGB format.
Type:RGB
Status:Read/Write

The colour of the PointerMonitor font can be manipulated in RGB format using this field.

 

Field:Colour
Short:String-based field for setting the colour of a PointerMonitor font.
Type:STRING
Status:Write

The colour of a PointerMonitor's font can be declared by writing to this field. The colour must be in hexadecimal or separated-decimal format - for example to create a pure red colour, a setting of "#ff0000" or "255,0,0" would be valid.

 

Field:Drawable
Short:The object that the PointerMonitor is drawn to.
Type:OBJECTID
Status:Read/Init

The drawable object that the PointerMonitor should use for its drawing operations can be set in this field. If you do not set the field, then the PointerMonitor will search for the nearest Render object based on its position in the object hierarchy. The result of the search is usually sufficient, so in most cases this field does not need to be explicitly set.

 

Field:Pointer
Short:Refers to the Pointer object that should be monitored.
Type:OBJECTID
Status:Read/Write

Because Athene supports the concept of multiple mouse pointers on one display, you may want to set this field so that the PointerMonitor knows exactly who to examine. If the field is not set, the PointerMonitor will look for the first public object named "SystemPointer" and monitor it after initialisation.

The object that is referred to in this field should belong to the Pointer class, but you may use any object so long as it features XCoord and YCoord fields.

 

Field:XCoord
Synonyms:X
Short:The horizontal coordinate of the PointerMonitor graphic.
Type:LONG
Status:Read/Write

The horizontal coordinate of the PointerMonitor graphic is determined by this field. It is dynamic, so writing to it while the object is on display will also cause a visual update.

 

Field:YCoord
Synonyms:Y
Short:The vertical coordinate of the PointerMonitor graphic.
Type:LONG
Status:Read/Write

The vertical coordinate of the PointerMonitor graphic is determined by this field. It is dynamic, so writing to it while the object is on display will also cause a visual update.