Name: | Render |
Version: | 1.0 |
ID: | ID_RENDER |
Status: | Stable |
Category: | GUI |
Date: | June 2004 |
Author: | Rocklyte Systems |
Copyright: | Rocklyte Systems (c) 2000-2004. All rights reserved. |
Short: | Manages the display and positioning of 2-Dimensional rendered graphics. |
The Render class is the primary tool that is used for interface construction. On its own the Render class does very little in terms of creating graphics, but it has the sole responsibility of managing 2-Dimensional graphics space and keeping everything organised for the display.
Graphically, each render object represents a rectangular area of space on the display. The biggest render object, often referred to as the 'Master' represents the screen space, and is as big as the display itself, if not larger. render objects can be placed inside the master and are typically known as children. You can place more render objects inside of these children, causing a hierachy to develop that consists of many objects that are all working together on the display.
In order to actually draw graphics onto the display, classes that have been specifically created for drawing graphics must be used to create a meaningful interface. Classes such as Box, Image, Text and Gradient are able to create an assemblance of imagery that has meaning to the user. The interface is then enhanced through the use of user-interactive classes such as OnClick, Movement and Pointer. With a little effort and imagination, a customised interface can thus be assembled and presented to the user without much difficulty on the part of the developer.
While this is a simple concept, the Render class is at the base of its foundation and is one of the largest and most important classes in the system. It provides a great deal of functionality which cannot be summarised in this introduction, but you will find a lot of technical detail on each individual field in this manual. The DML Whitepaper has a good summary as to the basic use of the Render class. It is also recommended that you refer to the DML scripts that come with Athene if you require a real-world view of how the class is typically used.
The Render class supports the following actions:
Activate Shows a render object on the display. ClosingTag Activates a render object. Disable Disables a render object. Draw Redraws the contents of a render object. Enable Enables a disabled render object. Focus Informs a render object that it has received the user focus. Hide Hides a render object from the display. LostFocus Informs a render object that it has lost the user focus. Move Moves a render object to a new display position. MoveToBack Moves a render object to the back of its container. MoveToFront Moves a render object to the front of its container. MoveToPoint Moves a render object to an absolute coordinate. Redimension Moves and resizes a render object in a single action call. Resize Resizes a render object's dimensions. SaveImage Saves the graphical image of a render object. Scroll Scrolls rendered content to a new position. ScrollToPoint Moves the content of a render object to a specific point. Show Shows a render object on the display. UserClick Informs a render object that the user has clicked on it. UserClickRelease Used to inform a render object when a user click has been released. UserMovement Used to notify render object's of user movement in and out of their graphical areas.
The Render class implements the following methods:
Expose Redraws a render region to the display, preferably from its graphics buffer. InvalidateRegion Redraws all of the content in a render object. MoveContent Shifts the graphical content of a render object to a new position. SetDisplay Changes the screen resolution (applies to top-level render objects only). SetOpacity Alters the opacity of a render object. SetRenderCallback Allows you to hook into the drawing process of a rendered object.
The Render object consists of the following public fields:
AbsX The absolute horizontal position of a render object. AbsY The absolute vertical position of a render object. Align This field allows you to align a rendered area within its owner. Bitmap Readable field that returns a pointer to a render object's drawable Bitmap. Bottom Returns the bottom-most coordinate of a render object. BottomLimit Prevents a render object from moving beyond a given point at the bottom of its container. BottomMargin Manipulates the bottom margin of a render object. Buffer If set to TRUE, buffering will be used when drawing a render object. Colour String-based field for setting the background colour. ColourRGB An RGB based field for manipulating the background colour. Drag This object-based field is used to control the dragging of objects around the display. FastResize Enables fast resizing when set to TRUE. Flags Special flags. Frame Manipulates the frame number that a render object has on display. Height Defines the height of a render object. Hide Set to TRUE to hide a render object from the display. Host If this field is enabled, the render object will be able to host drawables from foreign processes. InsideHeight Reflects the amount of space between the vertical margins. InsideWidth Reflects the amount of space between the horizontal margins. Invisible Defines a render object as being transparent (no drawable content). KeyOutput Manages access to the keyboard when the user focusses on the drawable. LeftLimit Prevents a render object from moving beyond a given point on the left-hand side. LeftMargin Manipulates the left margin of a render object. MaxHeight Prevents the height of a render object from exceeding a certain value. MaxWidth Prevents the width of a render object from exceeding a certain value. MinHeight Prevents the height of a render object from shrinking beyond a certain value. MinWidth Prevents the width of a render object from shrinking beyond a certain value. Movement Limits the movement of a render object to vertical or horizontal shifts. Opacity Affects the level of translucency applied to a render object. Precopy Enables the masking feature for render objects. Region Specifies whether or not a render object is acting as a simple region. Right Returns the right-most coordinate of a render object. RightLimit Prevents a render object from moving beyond a given point on the right-hand side. RightMargin Manipulates the right margin of a render object. RouteFocus Diverts render focussing through a specific path. StickToBack Set to TRUE if you want a render object to stick to the back of its container. StickToFront Set to TRUE if you want a render object to stick to the front of its container. Sticky Set this field to TRUE to prevent a render object from being moved around. TopLimit Prevents a render object from moving beyond a given point at the top of its container. TopMargin Manipulates the top margin of a render object. UserFocus Refers to the render object that has the current focus. VisibleHeight Reflects the visible height of a rendered area within its container. VisibleWidth Reflects the visible width of a rendered area within its container. Visible Indicates the visibility of a render object. Width Defines the width of a render object. WindowHandle Refers to a render object's window handle, if relevant. X Determines the horizontal position of a render object. XOffset Determines the horizontal offset of a render object. YCoord Determines the vertical position of a render object. YOffset Determines the vertical offset of a render object.
Action: | SaveImage | |
Short: | Saves the graphical image of a render object. | |
|
Action: | Scroll | |
Short: | Scrolls rendered content to a new position. | |
|
Method: | InvalidateRegion() | |
Short: | Redraws all of the content in a render object. | |
|
Method: | MoveContent() | ||||||||||||||||||||||
Short: | Shifts the graphical content of a render object to a new position. | ||||||||||||||||||||||
Arguments: |
| ||||||||||||||||||||||
|
Method: | SetDisplay() | ||||||||||||||||||
Synonym: | SetRenderDisplay | ||||||||||||||||||
Short: | Changes the screen resolution (applies to top-level render objects only). | ||||||||||||||||||
Arguments: |
| ||||||||||||||||||
|
Method: | SetOpacity() | |||||||
Synonym: | SetRenderOpacity | |||||||
Short: | Alters the opacity of a render object. | |||||||
Arguments: |
| |||||||
|
Method: | SetRenderCallback() | |||||||
Synonym: | SetCallback | |||||||
Short: | Allows you to hook into the drawing process of a rendered object. | |||||||
Arguments: |
| |||||||
|
Field: | AbsX | |
Short: | The absolute horizontal position of a render object. | |
Type: | LONG | |
Status: | Get/Set | |
|
Field: | AbsY | |
Short: | The absolute vertical position of a render object. | |
Type: | LONG | |
Status: | Get/Set | |
|
Field: | Align | |
Short: | This field allows you to align a rendered area within its owner. | |
Type: | LONG/FLAGS | |
Prefix: | ALIGN | |
Status: | Read/Write | |
|
Field: | Bitmap | |
Short: | Readable field that returns a pointer to a render object's drawable Bitmap. | |
Type: | *Bitmap | |
Status: | Get | |
|
Field: | Bottom | |
Short: | Returns the bottom-most coordinate of a render object. | |
Type: | LONG | |
Status: | Read | |
|
Field: | BottomLimit | |
Short: | Prevents a render object from moving beyond a given point at the bottom of its container. | |
Type: | LONG | |
Status: | Read/Write | |
|
Field: | BottomMargin | |
Short: | Manipulates the bottom margin of a render object. | |
Type: | LONG | |
Status: | Read/Write | |
|
Field: | Buffer | |
Short: | If set to TRUE, buffering will be used when drawing a render object. | |
Type: | LONG|BOOLEAN | |
Status: | Get/Set | |
|
Field: | Colour | |
Short: | String-based field for setting the background colour. | |
Type: | STRING | |
Status: | Set | |
|
Field: | ColourRGB | |
Short: | An RGB based field for manipulating the background colour. | |
Type: | RGB | |
Status: | Get/Set | |
|
Field: | Drag | |
Short: | This object-based field is used to control the dragging of objects around the display. | |
Type: | OBJECTID | |
Status: | Read/Write | |
|
Field: | FastResize | |
Short: | Enables fast resizing when set to TRUE. | |
Type: | LONG|BOOLEAN | |
Status: | Get/Set | |
|
Field: | Flags | |||||||||||||||||||||||||||||||||||||||
Short: | Special flags. | |||||||||||||||||||||||||||||||||||||||
Type: | LONG|FLAGS | |||||||||||||||||||||||||||||||||||||||
Prefix: | RNF | |||||||||||||||||||||||||||||||||||||||
Status: | Read | |||||||||||||||||||||||||||||||||||||||
|
Field: | Frame | |
Short: | Manipulates the frame number that a render object has on display. | |
Type: | LONG | |
Status: | Read/Write | |
|
Field: | Height | |
Short: | Defines the height of a render object. | |
Type: | LONG/PERCENTAGE | |
Status: | Read/Write | |
|
Field: | Hide | |
Short: | Set to TRUE to hide a render object from the display. | |
Type: | BOOLEAN | |
Status: | Init | |
|
Field: | Host | |
Short: | If this field is enabled, the render object will be able to host drawables from foreign processes. | |
Type: | LONG|BOOLEAN | |
Status: | Get/Init | |
|
Field: | InsideHeight | |
Short: | Reflects the amount of space between the vertical margins. | |
Type: | LONG | |
Status: | Read | |
|
Field: | InsideWidth | |
Short: | Reflects the amount of space between the horizontal margins. | |
Type: | LONG | |
Status: | Read | |
|
Field: | Invisible | |
Short: | Defines a render object as being transparent (no drawable content). | |
Type: | LONG|BOOLEAN | |
Status: | Get/Set | |
|
Field: | KeyOutput | |
Short: | Manages access to the keyboard when the user focusses on the drawable. | |
Type: | OBJECTID | |
Status: | Read/Init | |
|
Field: | LeftLimit | |
Short: | Prevents a render object from moving beyond a given point on the left-hand side. | |
Type: | LONG | |
Status: | Read/Write | |
|
Field: | LeftMargin | |
Short: | Manipulates the left margin of a render object. | |
Type: | LONG | |
Status: | Read/Write | |
|
Field: | MaxHeight | |
Short: | Prevents the height of a render object from exceeding a certain value. | |
Type: | LONG | |
Status: | Read/Set | |
|
Field: | MaxWidth | |
Short: | Prevents the width of a render object from exceeding a certain value. | |
Type: | LONG | |
Status: | Read/Set | |
|
Field: | MinHeight | |
Short: | Prevents the height of a render object from shrinking beyond a certain value. | |
Type: | LONG | |
Status: | Read/Set | |
|
Field: | MinWidth | |
Short: | Prevents the width of a render object from shrinking beyond a certain value. | |
Type: | LONG | |
Status: | Read/Set | |
|
Field: | Movement | |
Short: | Limits the movement of a render object to vertical or horizontal shifts. | |
Type: | LONG|FLAGS | |
Prefix: | MOVE_ | |
Status: | Read/Set | |
|
Field: | Opacity | |
Short: | Affects the level of translucency applied to a render object. | |
Type: | FLOAT | |
Status: | Get/Set | |
|
Field: | Precopy | |
Short: | Enables the masking feature for render objects. | |
Type: | LONG|BOOLEAN | |
Status: | Get/Set | |
|
Field: | Region | |
Short: | Specifies whether or not a render object is acting as a simple region. | |
Type: | LONG|BOOLEAN | |
Status: | Get/Set | |
|
Field: | Right | |
Short: | Returns the right-most coordinate of a render object. | |
Type: | LONG | |
Status: | Read | |
|
Field: | RightLimit | |
Short: | Prevents a render object from moving beyond a given point on the right-hand side. | |
Type: | LONG | |
Status: | Read/Write | |
|
Field: | RightMargin | |
Short: | Manipulates the right margin of a render object. | |
Type: | LONG | |
Status: | Read/Write | |
|
Field: | RouteFocus | |
Short: | Diverts render focussing through a specific path. | |
Type: | OBJECTID | |
Status: | Read/Set | |
|
Field: | StickToBack | |
Short: | Set to TRUE if you want a render object to stick to the back of its container. | |
Type: | LONG|BOOLEAN | |
Status: | Set | |
|
Field: | StickToFront | |
Short: | Set to TRUE if you want a render object to stick to the front of its container. | |
Type: | LONG|BOOLEAN | |
Status: | Set | |
|
Field: | Sticky | |
Short: | Set this field to TRUE to prevent a render object from being moved around. | |
Type: | LONG|BOOLEAN | |
Status: | Get/Set | |
|
Field: | TopLimit | |
Short: | Prevents a render object from moving beyond a given point at the top of its container. | |
Type: | LONG | |
Status: | Read/Write | |
|
Field: | TopMargin | |
Short: | Manipulates the top margin of a render object. | |
Type: | LONG | |
Status: | Read/Write | |
|
Field: | UserFocus | |
Short: | Refers to the render object that has the current focus. | |
Type: | OBJECTID | |
Status: | Get | |
|
Field: | VisibleHeight | |
Short: | Reflects the visible height of a rendered area within its container. | |
Type: | LONG | |
Status: | Read | |
|
Field: | VisibleWidth | |
Short: | Reflects the visible width of a rendered area within its container. | |
Type: | LONG | |
Status: | Read | |
|
Field: | Visible | |
Short: | Indicates the visibility of a render object. | |
Type: | LONG|BOOLEAN | |
Status: | Get/Set | |
|
Field: | Width | |
Short: | Defines the width of a render object. | |
Type: | LONG/PERCENTAGE | |
Status: | Read/Write | |
|
Field: | WindowHandle | |
Short: | Refers to a render object's window handle, if relevant. | |
Type: | LONG | |
Status: | Get/Init | |
|
Field: | X | |
Synonyms: | X | |
Short: | Determines the horizontal position of a render object. | |
Type: | LONG/PERCENTAGE | |
Status: | Read/Write | |
|
Field: | XOffset | |
Short: | Determines the horizontal offset of a render object. | |
Type: | LONG/PERCENTAGE | |
Status: | Read/Write | |
|
Field: | YCoord | |
Synonyms: | Y | |
Short: | Determines the vertical position of a render object. | |
Type: | LONG/PERCENTAGE | |
Status: | Read/Write | |
|
Field: | YOffset | |
Short: | Determines the vertical offset of a render object. | |
Type: | LONG/PERCENTAGE | |
Status: | Read/Write | |
|