Class Documentation
| Divider |
| 1.0 |
| ID_DIVIDER |
| Unspecified |
| GUI |
| November 2004 |
| Rocklyte Systems |
| Rocklyte Systems (c) 2004. All rights reserved. |
| The Divider class controls the resizing of divided rendered areas. |
Description
The Divider class is used to break up the space between rendered areas and
provides mouse dragging facilities, allowing the amount of space on either side of the
divider to be adjusted by the user.
A divider object is configured by telling it what drawables are positioned to the
left and right of the divider for a vertical split, or the top and bottom for
a horizontal split. The following script illustrates:
<render name="leftview" x="5" width="100" minwidth="20" .../>
<render name="rightview" x="111" width="100" minwidth="30" .../>
<divider gap="6" left="[leftview]" right="[rightview]"/>
Divider objects will honour the minimum and maximum width and height
settings of drawables. This allows you to control the extent to which the
user may drag the dividing zone.
Actions
The Divider class supports the following actions:
| SetUnlistedField | Unlisted fields are used to declare the drawables that can be dragged by the divider. |
Structure
The Divider object consists of the following public fields:
| Drawable | Defines the drawable area for the divider and its graphics. |
| Gap | Specifies the amount of space to put between divided drawables. |
| MaxBottom | Specifies the maximum amount of space allowed at the bottom of the divided area. |
| MaxLeft | Specifies the maximum amount of space allowed to the left of the divided area. |
| MaxRight | Specifies the maximum amount of space allowed to the right of the divided area. |
| MaxTop | Specifies the maximum amount of space allowed at the top of the divided area. |
| MinBottom | Specifies the minimum amount of space required at the bottom of the divided area. |
| MinLeft | Specifies the minimum amount of space required to the left of the divided area. |
| MinRight | Specifies the minimum amount of space required to the right of the divided area. |
| MinTop | Specifies the minimum amount of space required at the top of the divided area. |
| SetUnlistedField |
| Unlisted fields are used to declare the drawables that can be dragged by the divider. |
|
The drawables on either side of the divider are defined using unlisted fields
and accessed via an array based system. If the divider will split drawables
vertically, you need to define drawables for the left and right sides of the
divider. If splitting drawables horizontally, set top and bottom sides of the
divider. The fields that are available for doing this are:
Left(0) = DrawableID
Top(0) = DrawableID
Right(0) = DrawableID
Bottom(0) = DrawableID
The index number of the drawable that you want to set is optional - the
default is always index 0. You can specify a maximum of 4 drawables for
any given side of the divider. You only need to define drawables for the
left and right side, or top and bottom sides only. It is not possible for a
divider to split both the horizontal and vertical axis.
|
|
| Field: | Drawable |
| Short: | Defines the drawable area for the divider and its graphics. |
| Type: | OBJECTID |
| Status: | Read/Init |
|
When you create a new divider object it must be contained by a drawable
area, such as a Render object. If you do this correctly then the divider
will detect the drawable area and automatically set the Drawable field to the
correct object. However, there may be occasions where you want to
initialise a divider to a non-graphical container. If this is the case then
you must set the Drawable field to point to a valid drawable area, such as a
Render object.
|
|
| Field: | Gap |
| Short: | Specifies the amount of space to put between divided drawables. |
| Type: | FLOAT|PERCENTAGE |
| Status: | Read/Write |
|
The amount of space between the drawables on either side of the divider is
defined by the Gap field. The amount of space can be defined in pixels (the default)
or as a percentage of the drawable area.
|
|
| Field: | MaxBottom |
| Short: | Specifies the maximum amount of space allowed at the bottom of the divided area. |
| Type: | LONG |
| Status: | Read/Write |
|
The maximum amount of space allowed at the bottom of the divider can be
specified here. Setting a reasonable value in this field will prevent the
divider from being dragged too far upwards, leaving excess space at the bottom of
the container.
|
|
| Field: | MaxLeft |
| Short: | Specifies the maximum amount of space allowed to the left of the divided area. |
| Type: | LONG |
| Status: | Read/Write |
|
The maximum amount of space allowed on the left side of the divider can be
specified here. Setting a reasonable value in this field will prevent the
divider from being dragged too far right, leaving excess space at the left of
the container.
|
|
| Field: | MaxRight |
| Short: | Specifies the maximum amount of space allowed to the right of the divided area. |
| Type: | LONG |
| Status: | Read/Write |
|
The maximum amount of space allowed on the right side of the divider can be
specified here. Setting a reasonable value in this field will prevent the
divider from being dragged too far left, leaving excess space at the right of
the container.
|
|
| Field: | MaxTop |
| Short: | Specifies the maximum amount of space allowed at the top of the divided area. |
| Type: | LONG |
| Status: | Read/Write |
|
The maximum amount of space allowed at the top of the divider can be
specified here. Setting a reasonable value in this field will prevent the
divider from being dragged too far down, leaving excess space at the top of
the container.
|
|
| Field: | MinBottom |
| Short: | Specifies the minimum amount of space required at the bottom of the divided area. |
| Type: | LONG |
| Status: | Read/Write |
|
The minimum amount of space required at the bottom of the divider can be
specified here. Setting a reasonable value in this field will prevent the
divider from being dragged too far down, into the drawable space of the split
objects.
|
|
| Field: | MinLeft |
| Short: | Specifies the minimum amount of space required to the left of the divided area. |
| Type: | LONG |
| Status: | Read/Write |
|
The minimum amount of space required to the left of the divider can be
specified here. Setting a reasonable value in this field will prevent the
divider from being dragged too far left, into the drawable space of the split
objects.
|
|
| Field: | MinRight |
| Short: | Specifies the minimum amount of space required to the right of the divided area. |
| Type: | LONG |
| Status: | Read/Write |
|
The minimum amount of space required to the right of the divider can be
specified here. Setting a reasonable value in this field will prevent the
divider from being dragged too far right, into the drawable space of the
split objects.
|
|
| Field: | MinTop |
| Short: | Specifies the minimum amount of space required at the top of the divided area. |
| Type: | LONG |
| Status: | Read/Write |
|
The minimum amount of space required at the top of the divider can be
specified here. Setting a reasonable value in this field will prevent the
divider from being dragged too far north, into the drawable space of the
split objects.
|
|