Torque 3D - Script Manual: GuiFrameSetCtrl Class Reference

TorqueScript

Main   Class List   Namespace List   Online

GuiFrameSetCtrl Class Reference
[Container Controls]

A gui control allowing a window to be subdivided into panes, each of which displays a gui control child of the GuiFrameSetCtrl. More...

Inheritance diagram for GuiFrameSetCtrl:

List of all members.

Public Member Functions

void addColumn ()
 Add a new column.
void addRow ()
 Add a new row.
void frameBorder (int index, string state="dynamic")
 Override the borderEnable setting for this frame.
void frameMinExtent (int index, int width, int height)
 Set the minimum width and height for the frame. It will not be possible for the user to resize the frame smaller than this.
void frameMovable (int index, string state="dynamic")
 Override the borderMovable setting for this frame.
void framePadding (int index, RectSpacingI padding)
 Set the padding for this frame. Padding introduces blank space on the inside edge of the frame.
int getColumnCount ()
 Get the number of columns.
int getColumnOffset (int index)
 Get the horizontal offset of a column.
RectSpacingI getFramePadding (int index)
 Get the padding for this frame.
int getRowCount ()
 Get the number of rows.
int getRowOffset (int index)
 Get the vertical offset of a row.
void removeColumn ()
 Remove the last (rightmost) column.
void removeRow ()
 Remove the last (bottom) row.
void setColumnOffset (int index, int offset)
 Set the horizontal offset of a column.
void setRowOffset (int index, int offset)
 Set the vertical offset of a row.
void updateSizes ()
 Recalculates child control sizes.

Public Attributes

bool autoBalance
 If true, row and column offsets are automatically scaled to match the new extents when the control is resized.
ColorI borderColor
 Color of interior borders between cells.
GuiFrameState borderEnable
 Controls whether frame borders are enabled.
GuiFrameState borderMovable
 Controls whether borders can be dynamically repositioned with the mouse by the user.
int borderWidth
 Width of interior borders between cells in pixels.
intList columns
 A vector of column offsets (determines the width of each column).
int fudgeFactor
 Offset for row and column dividers in pixels.
intList rows
 A vector of row offsets (determines the height of each row).

Detailed Description

A gui control allowing a window to be subdivided into panes, each of which displays a gui control child of the GuiFrameSetCtrl.

Each gui control child will have an associated FrameDetail through which frame-specific details can be assigned. Frame-specific values override the values specified for the entire frameset.

Note that it is possible to have more children than frames, or more frames than children. In the former case, the extra children will not be visible (they are moved beyond the visible extent of the frameset). In the latter case, frames will be empty. For example, if a frameset had two columns and two rows but only three gui control children they would be assigned to frames as follows:

                 1 | 2
                 -----
                 3 |

The last frame would be blank.

Example:
new GuiFrameSetCtrl()
{
   columns = "3";
   rows = "2";
   borderWidth = "1";
   borderColor = "128 128 128";
   borderEnable = "dynamic";
   borderMovable = "dynamic";
   autoBalance = "1";
   fudgeFactor = "0";
   //Properties not specific to this control have been omitted from this example.
};

Member Function Documentation

void GuiFrameSetCtrl::addColumn (  ) 

Add a new column.

void GuiFrameSetCtrl::addRow (  ) 

Add a new row.

void GuiFrameSetCtrl::frameBorder ( int  index,
string  state = "dynamic" 
)

Override the borderEnable setting for this frame.

Parameters:
index Index of the frame to modify
state New borderEnable state: "on", "off" or "dynamic"
void GuiFrameSetCtrl::frameMinExtent ( int  index,
int  width,
int  height 
)

Set the minimum width and height for the frame. It will not be possible for the user to resize the frame smaller than this.

Parameters:
index Index of the frame to modify
width Minimum width in pixels
height Minimum height in pixels
void GuiFrameSetCtrl::frameMovable ( int  index,
string  state = "dynamic" 
)

Override the borderMovable setting for this frame.

Parameters:
index Index of the frame to modify
state New borderEnable state: "on", "off" or "dynamic"
void GuiFrameSetCtrl::framePadding ( int  index,
RectSpacingI  padding 
)

Set the padding for this frame. Padding introduces blank space on the inside edge of the frame.

Parameters:
index Index of the frame to modify
padding Frame top, bottom, left, and right padding
int GuiFrameSetCtrl::getColumnCount (  ) 

Get the number of columns.

Returns:
The number of columns
int GuiFrameSetCtrl::getColumnOffset ( int  index  ) 

Get the horizontal offset of a column.

Parameters:
index Index of the column to query
Returns:
Column offset in pixels
RectSpacingI GuiFrameSetCtrl::getFramePadding ( int  index  ) 

Get the padding for this frame.

Parameters:
index Index of the frame to query
int GuiFrameSetCtrl::getRowCount (  ) 

Get the number of rows.

Returns:
The number of rows
int GuiFrameSetCtrl::getRowOffset ( int  index  ) 

Get the vertical offset of a row.

Parameters:
index Index of the row to query
Returns:
Row offset in pixels
void GuiFrameSetCtrl::removeColumn (  ) 

Remove the last (rightmost) column.

void GuiFrameSetCtrl::removeRow (  ) 

Remove the last (bottom) row.

void GuiFrameSetCtrl::setColumnOffset ( int  index,
int  offset 
)

Set the horizontal offset of a column.

Note that column offsets must always be in increasing order, and therefore this offset must be between the offsets of the colunns either side.

Parameters:
index Index of the column to modify
offset New column offset
void GuiFrameSetCtrl::setRowOffset ( int  index,
int  offset 
)

Set the vertical offset of a row.

Note that row offsets must always be in increasing order, and therefore this offset must be between the offsets of the rows either side.

Parameters:
index Index of the row to modify
offset New row offset
void GuiFrameSetCtrl::updateSizes (  ) 

Recalculates child control sizes.


Member Data Documentation

If true, row and column offsets are automatically scaled to match the new extents when the control is resized.

Color of interior borders between cells.

Controls whether frame borders are enabled.

Frames use this value unless overridden for that frame using ctrl.frameBorder(index)

Controls whether borders can be dynamically repositioned with the mouse by the user.

Frames use this value unless overridden for that frame using ctrl.frameMovable(index)

Width of interior borders between cells in pixels.

A vector of column offsets (determines the width of each column).

Offset for row and column dividers in pixels.

A vector of row offsets (determines the height of each row).



Copyright © GarageGames, LLC. All Rights Reserved.