Name: | Window |
Version: | 1.0 |
ID: | ID_WINDOW |
Status: | Beta |
Category: | GUI |
Date: | July 2004 |
Author: | Rocklyte Systems |
Copyright: | Rocklyte Systems, 2003-2004. All rights reserved. |
Short: | The Window class is used to create desktop windows and screen areas. |
The Window class provides a control system for the creation and management of application windows within the user interface. Because the Window class acts as a control system only, the window itself is virtual and physically represented as a Render drawable. The characteristics of the Render class are inherited by the window system, thereby allowing you to read and manipulate render fields (such as x, y, width and height) through the window object.
By default, new windows are created in the desktop area with the dimensions that you specify. If desirable, you can create full-screen windows by setting the Screen field to TRUE. Full-screen windows have a different set of specifications that keep them maximised to the display area at all times. They are borderless but still maintain a title bar and optional menu bar if required. If your application creates a full-screen window then all future windows will open within that screen space by default rather than on the desktop.
Window definitions are loaded by default from the environment file "templates:windowdef.xml". You can change the template file prior to initialisation by setting the Template field, however this is not recommended except under exceptional circumstances. See the Template field for details on how to design your own windows for custom environments.
Windows are publicly shared objects as standard and may not be allocated privately. This is automatically managed when using windows in scripts. If programming a window object directly, remember to grab its unique ID and access/release the window object correctly as you make use of it.
The Window class supports the following actions:
Activate Shows the window. Disable Disables the user's ability to interact with the window. Enable Enables user interactivity after prior disablement. Focus Sets the user focus to the window's drawable. GetUnlistedField Pass-through arguments can be retrieved through this action. Hide Removes the window from the display. MoveToBack Moves the window to the back of the display area. MoveToFront Moves the window to the front of the display area. Redimension Changes the size and position of the window. Resize Alters the size of the window. SetUnlistedField Pass-through arguments can be set by using this action. Show Puts the window on display.
The Window class implements the following methods:
CloseWindow Closes the window according to application requirements. Maximise Maximises the window to its available display area. Minimise Minimises the size of the window.
The Window object consists of the following public fields:
Canvas Allocates a drawable canvas inside the window when read. Center Displays the window in the center of the display on initialisation. Close Operator for the window's close gadget. CloseObject The drawable that controls the Close gadget. Drawable The window's drawable. Flags Optional flags may be set here. Focus May be set to FALSE if you wish to open the window without giving it the focus. Hide Set on initialisation to keep the window hidden. Icon A graphical icon to be applied to the window. InsideBorder Enables a custom graphics border that surrounds the internal window. Maximise Operator for the window's maximise gadget. MaximiseObject The drawable that controls the maximise gadget. Menu References the location of an XML menu file to be applied to the window. MenubarObject The drawable that controls the window's menu bar. Minimise Operator for the title bar's minimise gadget. MinimiseObject The drawable that controls the minimise gadget. MoveToBack Operator for the title bar's move-to-back gadget. MoveToBackObject The drawable that controls the move-to-back gadget. Quit Set to FALSE to prevent application termination when the window is closed. Resize Determines what sides of the window are resizable. ResizeBorder Defines the extent of the resize area at the sides of the window. RestoreHeight Controls the height of the window when restoring to its previous state. RestoreWidth Controls the width of the window when restoring to its previous state. RestoreX Controls the horizontal position of the window when restoring to its previous state. RestoreY Controls the vertical position of the window when restoring to its previous state. Screen Enables full-screen mode. ScreenMargin Defines the minimum amount of margin space if the window is in full-screen mode. ScriptArgs Readable field for template usage only, retrieves custom arguments in DML format. StickToFront Forces the window to stick to the front of the display. Template Defines the makeup of the window using a pre-defined template. Title The title string to display in the window's title bar. TitleObject The object that controls the window title is referenced here.
Method: | Maximise() | |||||||
Short: | Maximises the window to its available display area. | |||||||
Arguments: |
| |||||||
|
Method: | Minimise() | |||||
Short: | Minimises the size of the window. | |||||
|
Field: | Canvas | |
Short: | Allocates a drawable canvas inside the window when read. | |
Type: | OBJECTID | |
Status: | Get | |
|
Field: | Center | |
Short: | Displays the window in the center of the display on initialisation. | |
Type: | BOOLEAN | |
Status: | Read/Init | |
|
Field: | Close | |
Short: | Operator for the window's close gadget. | |
Type: | BOOLEAN | |
Status: | Read/Set | |
|
Field: | CloseObject | |
Short: | The drawable that controls the Close gadget. | |
Type: | OBJECTID | |
Status: | Read/Init | |
|
Field: | Drawable | |
Short: | The window's drawable. | |
Type: | struct Render * | |
Status: | Read | |
|
Field: | Flags | |||||||||||
Short: | Optional flags may be set here. | |||||||||||
Type: | LONG | |||||||||||
Prefix: | WNF | |||||||||||
Status: | Read/Init | |||||||||||
|
Field: | Focus | |
Short: | May be set to FALSE if you wish to open the window without giving it the focus. | |
Type: | BOOLEAN | |
Status: | Read/Write | |
|
Field: | Hide | |
Short: | Set on initialisation to keep the window hidden. | |
Type: | BOOLEAN | |
Status: | Read/Init | |
|
Field: | Icon | |
Short: | A graphical icon to be applied to the window. | |
Type: | STRING | |
Status: | Get/Set | |
|
Field: | InsideBorder | |
Short: | Enables a custom graphics border that surrounds the internal window. | |
Type: | BOOLEAN | |
Status: | Read/Init | |
|
Field: | Maximise | |
Short: | Operator for the window's maximise gadget. | |
Type: | BOOLEAN | |
Status: | Read/Set | |
|
Field: | MaximiseObject | |
Short: | The drawable that controls the maximise gadget. | |
Type: | OBJECTID | |
Status: | Read/Init | |
|
Field: | Menu | |
Short: | References the location of an XML menu file to be applied to the window. | |
Type: | STRING | |
Status: | Get/Set | |
|
Field: | MenubarObject | |
Short: | The drawable that controls the window's menu bar. | |
Type: | OBJECTID | |
Status: | Read/Init | |
|
Field: | Minimise | |
Short: | Operator for the title bar's minimise gadget. | |
Type: | BOOLEAN | |
Status: | Read/Init | |
|
Field: | MinimiseObject |
Short: | The drawable that controls the minimise gadget. |
Type: | OBJECTID |
Status: | Read/Init |
Field: | MoveToBack | |
Short: | Operator for the title bar's move-to-back gadget. | |
Type: | BOOLEAN | |
Status: | Read/Init | |
|
Field: | MoveToBackObject | |
Short: | The drawable that controls the move-to-back gadget. | |
Type: | OBJECTID | |
Status: | Read/Init | |
|
Field: | Quit | |
Short: | Set to FALSE to prevent application termination when the window is closed. | |
Type: | BOOLEAN | |
Status: | Read/Write | |
|
Field: | Resize | |
Short: | Determines what sides of the window are resizable. | |
Type: | STRING | |
Status: | Init | |
|
Field: | ResizeBorder | |
Short: | Defines the extent of the resize area at the sides of the window. | |
Type: | LONG | |
Status: | Init | |
|
Field: | RestoreHeight | |
Short: | Controls the height of the window when restoring to its previous state. | |
Type: | LONG | |
Status: | Read/Write | |
|
Field: | RestoreWidth | |
Short: | Controls the width of the window when restoring to its previous state. | |
Type: | LONG | |
Status: | Read/Write | |
|
Field: | RestoreX | |
Short: | Controls the horizontal position of the window when restoring to its previous state. | |
Type: | LONG | |
Status: | Read/Write | |
|
Field: | RestoreY | |
Short: | Controls the vertical position of the window when restoring to its previous state. | |
Type: | LONG | |
Status: | Read/Write | |
|
Field: | Screen | |
Short: | Enables full-screen mode. | |
Type: | BOOLEAN | |
Status: | Get/Init | |
|
Field: | ScreenMargin | |
Short: | Defines the minimum amount of margin space if the window is in full-screen mode. | |
Type: | LONG | |
Status: | Get/Init | |
|
Field: | ScriptArgs | |
Short: | Readable field for template usage only, retrieves custom arguments in DML format. | |
Type: | STRING | |
Status: | Get | |
|
Field: | StickToFront | |
Short: | Forces the window to stick to the front of the display. | |
Type: | BOOLEAN | |
Status: | Set | |
|
Field: | Template | |||||||
Short: | Defines the makeup of the window using a pre-defined template. | |||||||
Type: | STRING | |||||||
Status: | Init | |||||||
|
Field: | Title | |
Short: | The title string to display in the window's title bar. | |
Type: | STRING | |
Status: | Get/Set | |
|
Field: | TitleObject | |
Short: | The object that controls the window title is referenced here. | |
Type: | OBJECTID | |
Status: | Read/Init | |
|