Name: | View |
Version: | 1.0 |
ID: | ID_VIEW |
Status: | In Development |
Category: | GUI |
Date: | January 2004 |
Author: | Rocklyte Systems |
Copyright: | Rocklyte Systems, 2003-2004. All rights reserved. |
Short: | The View class is used to display XML data in a number of possible formats to the user. |
The View is an interface class that is designed to ease the display and management of multiple items within a container. It is capable of displaying items in a number of formats, including a simple list, tree view and column view. The ability to sort data and handle different types of data such as date and time information is provided. The View class is commonly used for file display and certain classes such as the FileView are dependent on the functionality that it provides.
Items are created and stored within each View as a large XML statement and are managed via the XML class. This simplifies the creation and retrieval of item data and also allows you to develop hierarchies and tree structures for complex item arrangement.
The View class inherits the fields and functionality of the XML class, which you can use for scanning view items after they have been added. The Font class is also inherited, allowing you to set details such as the default font face through the view.
When the user double-clicks on a view item, the object will activate itself. Once activated, the view object will send Activate actions on to any children that have been initialised to the view. This allows you to develop a response for user interaction with the view. If the sensitive option has been enabled as one of the Flags attributes, activation will occur whenever the user selects a file (thus single clicks will be enough to cause object activation).
The View class supports the following actions:
Clear Clears a view of all internal content and updates the display. DataChannel Items can be added to the view using data channels. Disable Disables the view. Enable Enables a view that has been disabled. Focus Activates keyboard monitoring (by force). GetUnlistedField Special field types are available via unlisted field support. Hide Hides the view from the display. LostFocus Deactivates keyboard monitoring (by force). Refresh Refreshes the display. ScrollToPoint Scrolls the graphical content of a view. Show Redisplays the view if it has been hidden. Sort Resorts XML data in the view when it has been manually altered. UserClick User-click emulations can be passed through this action. UserClickRelease User-click emulations can be passed through this action. UserMovement User movement emulations can be passed through this action.
The View class implements the following methods:
CacheIcon Caches icons in the View object. InvertSelection Inverts all currently selected items in the view. RemoveViewItem Removes an item from the view. RemoveViewTag Removes an XML tag without updating the view (for optimisation only). SelectAll Selects all items in the view for the user. SelectItem Manually select items for the user. SelectNone Deselects all currently selected items. SetViewItem Changes the attributes of any item in the view. SortColumn Sorts the view by column. SortColumnIndex Sorts the view by column (index).
The View object consists of the following public fields:
BorderOffset Sets the X, Y, XOffset and YOffset to a single value. Columns Active columns for 'column mode' may be set via this field. DateFormat Sets the format to use when displaying date types. HScroll If scrolling is required, use this field to refer to a horizontal scroll bar. Height Defines the height of a view. HighlightColour Defines the colour when an item is selected via mouse-over or user focus. ItemColour The default font colour to use for view items. SelectColour Defines the colour when an item is selected via mouse-over or user focus. SelectedTags Returns an array of tag indexes for all currently selected items. Selection Indicates the currently selected file or directory. SelectionIndex Indicates the index number of the currently selected file or directory. Style The style of view that is displayed to the user is configured here. TotalSelected The total number of currently selected items. VScroll If scrolling is required, use this field to refer to a vertical scroll bar. Width Defines the width of a view. XCoord The horizontal position of a view. XOffset The horizontal offset of a view. YCoord The vertical position of a view. YOffset The vertical offset of a view.
Action: | DataChannel | |
Short: | Items can be added to the view using data channels. | |
|
Action: | Refresh | |
Short: | Refreshes the display. | |
|
Method: | CacheIcon() | |||||||||
Short: | Caches icons in the View object. | |||||||||
Arguments: |
| |||||||||
|
Method: | InvertSelection() | |
Short: | Inverts all currently selected items in the view. | |
|
Method: | RemoveViewItem() | |||||||
Synonym: | RemoveItem | |||||||
Short: | Removes an item from the view. | |||||||
Arguments: |
| |||||||
|
Method: | RemoveViewTag() | |||||||
Synonym: | RemoveTag | |||||||
Short: | Removes an XML tag without updating the view (for optimisation only). | |||||||
Arguments: |
| |||||||
|
Method: | SelectAll() | |
Short: | Selects all items in the view for the user. | |
|
Method: | SelectItem() | |||||||
Short: | Manually select items for the user. | |||||||
Arguments: |
| |||||||
|
Method: | SelectNone() | |
Short: | Deselects all currently selected items. | |
|
Method: | SetViewItem() | ||||||||||
Synonym: | SetItem | ||||||||||
Short: | Changes the attributes of any item in the view. | ||||||||||
Arguments: |
| ||||||||||
|
Method: | SortColumn() | |||||||||
Short: | Sorts the view by column. | |||||||||
Arguments: |
| |||||||||
|
Method: | SortColumnIndex() | ||||
Short: | Sorts the view by column (index). | ||||
Arguments: |
| ||||
|
Field: | BorderOffset | |
Short: | Sets the X, Y, XOffset and YOffset to a single value. | |
Type: | LONG | |
Status: | Set | |
|
Field: | Columns | |
Short: | Active columns for 'column mode' may be set via this field. | |
Type: | STRING | |
Status: | Get/Set | |
|
Field: | DateFormat | |
Short: | Sets the format to use when displaying date types. | |
Type: | STRING | |
Status: | Get/Set | |
|
Field: | HScroll | |
Short: | If scrolling is required, use this field to refer to a horizontal scroll bar. | |
Type: | OBJECTID | |
Status: | Read/Set | |
|
Field: | Height | |
Short: | Defines the height of a view. | |
Type: | DOUBLE/PERCENTAGE | |
Status: | Get/Set | |
|
Field: | HighlightColour | |
Short: | Defines the colour when an item is selected via mouse-over or user focus. | |
Type: | STRING | |
Status: | Set | |
|
Field: | ItemColour | |
Short: | The default font colour to use for view items. | |
Type: | STRING | |
Status: | Set | |
|
Field: | SelectColour | |
Short: | Defines the colour when an item is selected via mouse-over or user focus. | |
Type: | STRING | |
Status: | Set | |
|
Field: | SelectedTags | |
Short: | Returns an array of tag indexes for all currently selected items. | |
Type: | LONG * | |
Status: | Get | |
|
Field: | Selection | |
Short: | Indicates the currently selected file or directory. | |
Type: | STRING | |
Status: | Get/Set | |
|
Field: | SelectionIndex | |
Short: | Indicates the index number of the currently selected file or directory. | |
Type: | STRING | |
Status: | Get/Set | |
|
Field: | Style | |||||||||||||
Short: | The style of view that is displayed to the user is configured here. | |||||||||||||
Type: | LONG | |||||||||||||
Status: | Read/Set | |||||||||||||
|
Field: | TotalSelected | |
Short: | The total number of currently selected items. | |
Type: | LONG | |
Status: | Get | |
|
Field: | VScroll | |
Short: | If scrolling is required, use this field to refer to a vertical scroll bar. | |
Type: | OBJECTID | |
Status: | Read/Set | |
|
Field: | Width | |
Short: | Defines the width of a view. | |
Type: | DOUBLE/PERCENTAGE | |
Status: | Get/Set | |
|
Field: | XCoord | |
Short: | The horizontal position of a view. | |
Type: | DOUBLE/PERCENTAGE | |
Status: | Get/Set | |
|
Field: | XOffset | |
Short: | The horizontal offset of a view. | |
Type: | DOUBLE/PERCENTAGE | |
Status: | Get/Set | |
|
Field: | YCoord | |
Short: | The vertical position of a view. | |
Type: | DOUBLE/PERCENTAGE | |
Status: | Get/Set | |
|
Field: | YOffset | |
Short: | The vertical offset of a view. | |
Type: | DOUBLE/PERCENTAGE | |
Status: | Get/Set | |
|