Om  1.0.0
A universal framework for multimedia simulation
Classes | Public Types | Public Member Functions | Static Public Attributes | List of all members
om::graphics::gui::objects::TreeView Class Reference

A class that displays a hierarchy of objects in collapsable table format. More...

#include <omGraphicsGUITreeView.h>

Inheritance diagram for om::graphics::gui::objects::TreeView:
om::graphics::gui::objects::GUIObject om::gui::input::InputHandler

Classes

class  ColumnFlags
 A class that contains flags for a column in a tree view. More...
 
class  ColumnInfo
 An object that contains information for a tree view column. More...
 
class  Delegate
 A class that contains function objects that recieve TreeView events. More...
 
class  RowFlags
 A class that contains flags for a row in a tree view. More...
 
class  RowInfo
 An object that contains information for a tree view row. More...
 

Public Types

typedef UInt32 Flags
 The base type to use for boolean flags in this tree view. More...
 

Public Member Functions

 TreeView ()
 Create a new tree view with no width or height positioned at the origin. More...
 
 TreeView (const Rectangle &newRectangle)
 Create a new empty tree view which occupies the specified rectangular region. More...
 
Size getColumnCount () const
 Return the total number of columns that there are in this tree view. More...
 
Int getColumnSort (Index columnIndex) const
 Return the sort direction for the column at the specified index in this tree view. More...
 
Index getColumnUserID (Index columnIndex) const
 Return the user ID of the tree view column at the specified index. More...
 
const ColumnFlagsgetColumnFlags (Index columnIndex) const
 Return the boolean flags for the specified column. More...
 
Float getColumnSize (Index columnIndex) const
 Return the size of the tree view column at the specified index. More...
 
void setColumnSize (Index columnIndex, Float newSize)
 Set the size of the tree view column at the specified index. More...
 
GUIObjectgetColumnHeader (Index columnIndex) const
 Return a pointer to the object that is displayed in the header area for the specified column. More...
 
void setColumnSizeRange (Index columnIndex, GUIObject *newHeader)
 Set a pointer to the object that is displayed in the header area for the specified column. More...
 
const AABB1fgetColumnSizeRange (Index columnIndex) const
 Return the legal size of the tree view column at the specified index. More...
 
void setColumnSizeRange (Index columnIndex, const AABB1f &newSizeRange)
 Set the legal size of the tree view column at the specified index. More...
 
const AABB1fgetColumnLocalBounds (Index columnIndex) const
 Return the local bounding box along the column axis for the specified column. More...
 
void addColumn (const ColumnInfo &newInfo)
 Add a new column to this tree view with the given information. More...
 
void removeColumn (Index columnIndex)
 Remove the column at the specified index in this tree view. More...
 
void clearColumns ()
 Remove all columns from this tree view. More...
 
Size getRowCount () const
 Return the total number of rows that there are in this tree view. More...
 
Float getRowSize (Index rowIndex) const
 Return the size for the specified row in this tree view. More...
 
Index getRowParent (Index rowIndex) const
 Return the row index of the specified row's parent in this tree view. More...
 
Index getRowChildCount (Index rowIndex) const
 Return the number of direct children there are for the specified row in this tree view. More...
 
Index getRowChildCountTotal (Index rowIndex) const
 Return the total number of children there are for the specified row in this tree view. More...
 
Index getRowUserType (Index rowIndex) const
 Return the user identifier for the specified row's type in this tree view. More...
 
Index getRowUserID (Index rowIndex) const
 Return the user identifier for the specified row in this tree view. More...
 
Float getRowIndent (Index rowIndex) const
 Return the number of indentations there are for the specified row. More...
 
Float getRowIndentSize (Index rowIndex) const
 Return the actual size of the indentation for the specified row. More...
 
const AABB1fgetRowLocalBounds (Index rowIndex) const
 Return the local bounding box along the row axis for the specified row. More...
 
const RowFlagsgetRowFlags (Index rowIndex) const
 Return the boolean flags for the specified row. More...
 
Size getCellCount () const
 Return the total number of cells that there are in this tree view. More...
 
GUIObjectgetCell (Index rowIndex, Index columnIndex) const
 Return a pointer to the GUI object that is displayed at the specified row and column index. More...
 
void setCell (Index rowIndex, Index columnIndex, GUIObject *newObject)
 Set a pointer to the GUI object that is displayed at the specified row and column index. More...
 
AABB2f getLocalCellBoundsXY (Index rowIndex, Index columnIndex) const
 Return the view-local bounding box of the cell with the specified row and column indices. More...
 
AABB3f getLocalCellBounds (Index rowIndex, Index columnIndex) const
 Return the view-local bounding box of the cell with the specified row and column indices. More...
 
Float getIndentSize () const
 Return the global amount that rows are indented for each parent scope. More...
 
void setIndentSize (Float newIndentSize)
 Set the global amount that rows are indented for each parent scope. More...
 
Size getSelectionCount () const
 Return the number of selection ranges there currently are in the tree view. More...
 
const AABB1D< Index > & getSelection (Index selectionIndex) const
 Return the range of rows for the selection at the given index in the tree view. More...
 
const Color4f & getSelectionColor () const
 Return the selection color for a tree view. More...
 
void setSelectionColor (const Color4f &newSelectionColor)
 Set the selection color for a tree view. More...
 
const Color4f & getDividerColor () const
 Return the color to use for the table dividing lines. More...
 
void setDividerColor (const Color4f &newDividerColor)
 Set the color to use for the table dividing lines. More...
 
Float getDividerWidth () const
 Return the width of the dividing lines between table rows and columns. More...
 
void setDividerWidth (Float newDividerWidth)
 Set the width of the dividing lines between table rows and columns. More...
 
ScrollViewgetScrollView () const
 Return a pointer to the external scroll view that contains this tree view. More...
 
void setScrollView (ScrollView *newScrollView)
 Set a pointer to the external scroll view that contains this tree view. More...
 
AABB2f getVisibleBoundsXY () const
 Return the local bounding box of the visible area of this tree view, based on the scroll view. More...
 
void clearTree ()
 Remove all rows and cells from this tree view, but keep the columns. More...
 
void updateTree ()
 Update the tree for this view using the tree view delegate. More...
 
void addRow (const RowInfo &rowInfo)
 Add a new row to the end of this tree view at the current position in the depth-first traversal. More...
 
void addRowCell (GUIObject *object)
 Add a row column cell to the current row at the current position in the depth-first traversal. More...
 
void finishRowScope ()
 Finish the current row's scope, even if the number of children of the scope is not yet fulfilled. More...
 
Float getHeaderSize () const
 Return the size of the header area that contains the column headers for this tree view. More...
 
void setHeaderSize (Float newHeaderSize)
 Set the size of the header area that contains the column headers for this tree view. More...
 
const RectangleStylegetHeaderStyle () const
 Return an object that describes the style of this tree view's column header area. More...
 
void setHeaderSize (const RectangleStyle &newHeaderStyle)
 Set an object that describes the style of this tree view's column header area. More...
 
AABB2f getLocalHeaderBoundsXY () const
 Return the view-local bounding box of the column header area of this tree view. More...
 
AABB2f getLocalHeaderContentBoundsXY (Index columnIndex) const
 Return the view-local bounding box of the header cell with the specified column index. More...
 
AABB3f getLocalHeaderContentBounds (Index columnIndex) const
 Return the view-local bounding box of the header cell with the specified column index. More...
 
virtual Bool setSize (const Vector3f &newSize)
 Set the 3D size of the tree view along each of its local axes. More...
 
virtual Bool resizeForContent ()
 Resize this tree view to fit tightly around its contents. More...
 
virtual Bool setFocus (Bool newHasFocus)
 Set whether or not this tree view currently has keyboard focus at its level in the GUI hierarchy. More...
 
virtual void update (Float dt)
 Update the current internal state of this tree view for the specified time interval in seconds. More...
 
virtual Bool drawSelf (GUIRenderer &renderer, const AABB3f &parentBounds) const
 Draw this tree view using the specified GUI renderer to the given parent coordinate system bounds. More...
 
virtual Bool guiEvent (const GUIEvent &event)
 Handle the specified GUI event that occured when this tree view had focus. More...
 
virtual Bool textEvent (const TextEvent &text)
 Handle the specified text input event that occured when this tree view had focus. More...
 
virtual Bool keyEvent (const KeyEvent &event)
 Handle the specified keyboard event for the entire tree view. More...
 
virtual Bool mouseMotionEvent (const MouseMotionEvent &event)
 Handle the specified mouse motion event for the entire tree view. More...
 
virtual Bool mouseButtonEvent (const MouseButtonEvent &event)
 Handle the specified mouse button event for the entire tree view. More...
 
virtual Bool mouseWheelEvent (const MouseWheelEvent &event)
 Handle the specified mouse wheel event for the entire tree view. More...
 
DelegategetDelegate ()
 Return a reference to the delegate which responds to events for this tree view. More...
 
const DelegategetDelegate () const
 Return a reference to the delegate which responds to events for this tree view. More...
 
void setDelegate (const Delegate &newDelegate)
 Return a reference to the delegate which responds to events for this tree view. More...
 
- Public Member Functions inherited from om::graphics::gui::objects::GUIObject
 GUIObject ()
 Create a default visible GUI object positioned at the origin (0,0) with 0 width and 0 height. More...
 
 GUIObject (const RectangleStyle &newRectangleStyle)
 Create a visible GUI object positioned at the origin (0,0) with 0 width and 0 height and the given rectangle style. More...
 
 GUIObject (const Rectangle &newRectangle)
 Create a visible GUI object that occupies the specified rectangle. More...
 
 GUIObject (const Rectangle &newRectangle, const RectangleStyle &newRectangleStyle)
 Create a visible GUI object that occupies the specified rectangle and rectangle style. More...
 
virtual ~GUIObject ()
 Destory the GUI object, releasing all internal resources. More...
 
const RectanglegetRectangle () const
 Return a reference to this GUI object's rectangle. More...
 
const Vector3fgetSize () const
 Return a reference to the 3D size of this object along each of its local axes. More...
 
const Vector2fgetSizeXY () const
 Return a reference to the 2D scaling factor of this object along each of its local axes. More...
 
Bool setSize (const Vector2f &newSizeXY)
 Set the 2D size of this object along the X and Y local axes. More...
 
Bool setSize (Float newWidth, Float newHeight)
 Set the 2D size of this object along the X and Y local axes. More...
 
Bool setSizeX (Float newWidth)
 Set the size of this object along the X axis. More...
 
Bool setSizeY (Float newHeight)
 Set the size of this object along the Y axis. More...
 
Bool setSizeZ (Float newDepth)
 Set the size of this object along the Z axis. More...
 
void fillParent (const Vector3f &parentSize)
 Resize and resposition this object so that it fills the specified parent bounding box size. More...
 
const Vector3fgetScale () const
 Return a reference to the 3D scaling factor of this object along each of its local axes. More...
 
const Vector2fgetScaleXY () const
 Return a reference to the 2D scaling factor of this object along each of its local axes. More...
 
virtual Bool setScale (const Vector3f &newScale)
 Set the 3D scaling factor of this object along each of its local axes. More...
 
Bool setScale (const Vector2f &newScaleXY)
 Set the 2D scaling factor of this object along the X and Y local axes. More...
 
Bool setScale (Float newScaleX, Float newScaleY)
 Set the 2D scaling factor of this object along the X and Y local axes. More...
 
Bool setScale (Float newScale)
 Set the scaling factor of this object along all 3 axes. More...
 
const Vector3fgetPosition () const
 Return the position of this GUI object's origin relative to its parent's coordinate origin. More...
 
const Vector2fgetPositionXY () const
 Return the 2D position of this GUI object's origin relative to its parent's coordinate origin. More...
 
Bool setPosition (const Vector2f &newPosition)
 Set the position of this GUI object's origin relative to its parent's coordinate origin. More...
 
virtual Bool setPosition (const Vector3f &newPosition)
 Set the position of this GUI object's origin relative to its parent's coordinate origin. More...
 
const Matrix3fgetRotation () const
 Return a 3x3 orthonormal matrix indicating the basis of this object's coordinate frame. More...
 
virtual Bool setRotation (const Matrix3f &newRotation)
 Set a 3x3 orthonormal matrix indicating the basis of this object's coordinate frame. More...
 
Bool setRotation (Float radians)
 Set the rotation of this GUI object to be along the Z-axis with a rotation specified in radians. More...
 
Bool setRotationDegrees (Float degrees)
 Set the rotation of this GUI object to be along the Z-axis with a rotation specified in degrees. More...
 
OrigingetOrigin ()
 Return the alignment of the coordinate origin for this object. More...
 
const OrigingetOrigin () const
 Return the alignment of the coordinate origin for this object. More...
 
virtual Bool setOrigin (const Origin &newPositionOrigin)
 Set the alignment of the coordinate origin for this object. More...
 
void setOrigin (Origin::XOrigin newXOrigin, Origin::YOrigin newYOrigin)
 Set the XY alignment of the coordinate origin for this object. More...
 
void setOrigin (Origin::XOrigin newXOrigin, Origin::YOrigin newYOrigin, Origin::ZOrigin newZOrigin)
 Set the XYZ alignment of the coordinate origin for this object. More...
 
AABB2f getBoundsInParent (const AABB2f &parentBounds) const
 Return the 2D bounding box of this object in the coordinate frame of the specified parent bounding box. More...
 
AABB3f getBoundsInParent (const AABB3f &parentBounds) const
 Return the 3D bounding box of this object in the coordinate frame of the specified parent bounding box. More...
 
AABB2f getLocalBoundsXY () const
 Return the 2D bounding box of this object in its local coordinate frame. More...
 
AABB3f getLocalBounds () const
 Return the 3D bounding box of this object in its local coordinate frame. More...
 
Vector2f getLocalCenterXY () const
 Return the 2D center of this object's rectangle in its local coordinate frame. More...
 
Vector3f getLocalCenter () const
 Return the 3D center of this object's rectangle in its local coordinate frame. More...
 
Matrix4f getTransformMatrix (const AABB3f &parentBounds) const
 Return the object-space-to-parent-space homogeneous transformation matrix for the given parent bounding box. More...
 
Vector2f transformToLocal (const Vector2f &pointInParent, const AABB2f &parentBounds) const
 Transform a 3D point in the parent coordinate system into this object's coordinate system. More...
 
Vector3f transformToLocal (const Vector3f &pointInParent, const AABB3f &parentBounds) const
 Transform a 3D point in the parent coordinate system into this object's coordinate system. More...
 
Vector2f transformFromLocal (const Vector2f &localPoint, const AABB2f &parentBounds) const
 Transform a 2D point in this object's local coordinate system into its parent's coordinate system. More...
 
Vector3f transformFromLocal (const Vector3f &localPoint, const AABB3f &parentBounds) const
 Transform a 3D point in this object's local coordinate system into its parent's coordinate system. More...
 
Vector2f transformVectorToLocal (const Vector2f &vectorInParent) const
 Transform a 3D vector in the parent coordinate system into this object's coordinate system. More...
 
Vector3f transformVectorToLocal (const Vector3f &vectorInParent) const
 Transform a 3D vector in the parent coordinate system into this object's coordinate system. More...
 
Vector2f transformVectorFromLocal (const Vector2f &localVector) const
 Transform a 2D vector in this object's local coordinate system into its parent's coordinate system. More...
 
Vector3f transformVectorFromLocal (const Vector3f &localVector) const
 Transform a 3D vector in this object's local coordinate system into its parent's coordinate system. More...
 
MouseButtonEvent transformEventToLocal (const MouseButtonEvent &event, const AABB2f &parentBounds) const
 Transform a mouse button event in the parent coordinate system into this object's coordinate system. More...
 
MouseButtonEvent transformEventFromLocal (const MouseButtonEvent &event, const AABB2f &parentBounds) const
 Transform a mouse button event in this object's local coordinate system into its parent's coordinate system. More...
 
MouseMotionEvent transformEventToLocal (const MouseMotionEvent &event, const AABB2f &parentBounds) const
 Transform a mouse motion event in the parent coordinate system into this object's coordinate system. More...
 
MouseMotionEvent transformEventFromLocal (const MouseMotionEvent &event, const AABB2f &parentBounds) const
 Transform a mouse motion event in this object's local coordinate system into its parent's coordinate system. More...
 
MouseWheelEvent transformEventToLocal (const MouseWheelEvent &event, const AABB2f &parentBounds) const
 Transform a mouse wheel event in the parent coordinate system into this object's coordinate system. More...
 
MouseWheelEvent transformEventFromLocal (const MouseWheelEvent &event, const AABB2f &parentBounds) const
 Transform a mouse wheel event in this object's local coordinate system into its parent's coordinate system. More...
 
virtual Bool containsLocalPoint (const Vector2f &localPoint) const
 Return whether or not this GUI object contains the specified local 2D point within its local bounds. More...
 
virtual Bool containsLocalPoint (const Vector3f &localPoint) const
 Return whether or not this GUI object contains the specified local 3D point within its local bounds. More...
 
AABB2f getLocalContentBoundsXY () const
 Return the 2D bounding box for the object's rectangle inside area in its local coordinate frame. More...
 
virtual AABB3f getLocalContentBounds () const
 Return the 3D bounding box for the object's rectangle inside area in its local coordinate frame. More...
 
GUIStylegetStyle () const
 Return a pointer to the style object to use when drawing this GUI object. More...
 
void setStyle (GUIStyle *newStyle)
 Set a pointer to the style object to use when drawing this GUI object. More...
 
const RectangleStylegetRectangleStyle () const
 Return an object that describes the style of the main outside rectangle of this object. More...
 
virtual Bool setRectangleStyle (const RectangleStyle &newRectangleStyle)
 Set an object that describes the style of the main outside rectangle of this object. More...
 
const BordergetBorder () const
 Return an object that describes the border for this object's main rectangle. More...
 
virtual Bool setBorder (const Border &newBorder)
 Set an object that describes the border for this object's main rectangle. More...
 
Float getBorderWidth () const
 Return the width of this object's main rectangle border. More...
 
Bool setBorderWidth (Float newWidth)
 Set the width of this object's main rectangle border. More...
 
Float getBorderRadius () const
 Return the corner radius of this object's main rectangle border. More...
 
Bool setBorderRadius (Float newRadius)
 Set the corner radius of this object's main rectangle border. More...
 
const MargingetBorderMargin () const
 Return an object that describes the padding between the exterior and interior of the object's main rectangle. More...
 
Bool setBorderMargin (const Margin &newMargin)
 Set an object that describes the padding between the exterior and interior of the object's main rectangle. More...
 
const Color4f & getBackgroundColor () const
 Return the background color for this object's main rectangle. More...
 
virtual Bool setBackgroundColor (const Color4f &newBackgroundColor)
 Set the background color for this object's main rectangle. More...
 
const Color4f & getBorderColor () const
 Return the border color used when rendering the object's main rectangle. More...
 
virtual Bool setBorderColor (const Color4f &newBorderColor)
 Set the border color used when rendering the object's main rectangle. More...
 
const GUIObjectFlagsgetFlags () const
 Return a const reference to the flags for this GUI object. More...
 
Bool flagIsSet (GUIObjectFlags::Flag flag) const
 Return whether or not the specified boolan flag is set for this GUI object. More...
 
virtual Bool setFlags (const GUIObjectFlags &newFlags)
 Set the flags for this GUI object. More...
 
Bool setFlag (GUIObjectFlags::Flag flag, Bool newIsSet=true)
 Set whether or not the specified boolan flag is set for this GUI object. More...
 
Bool getIsVisible () const
 Return whether or not this GUI object should be drawn to the screen. More...
 
void setIsVisible (Bool newIsVisible)
 Set whether or not this GUI object should be drawn to the screen. More...
 
Bool hasFocus () const
 Return whether or not this GUI object currently has keyboard focus at its level in the GUI hierarchy. More...
 
- Public Member Functions inherited from om::gui::input::InputHandler
virtual ~InputHandler ()
 Destroy an input handler. More...
 

Static Public Attributes

static const Flags EXPANDABLE = (1 << 0)
 A flag indicating whether or not a row can be a parent of other rows. More...
 
static const Flags EXPANDED = (1 << 1)
 A flag indicating whether or not a row is currently expanded if it is a parent. More...
 
static const Flags SELECTABLE = (1 << 2)
 A flag indicating whether or not a row is selectable by the user. More...
 
static const Flags SELECTED = (1 << 3)
 A flag indicating whether or not a row is selected by the user. More...
 
static const Flags SORTABLE = (1 << 3)
 A flag indicating whether or not a column can be sorted by the user. More...
 
static const Flags HIDEABLE = (1 << 4)
 A flag indicating whether or not a column can be hidden by the user. More...
 
static const Flags RESIZEABLE = (1 << 5)
 A flag indicating whether or not a column is resizable by the user. More...
 
static const Flags VISIBLE = (1 << 6)
 A flag indicating whether or not a row or column is currently visible. More...
 
static const Flags EDITABLE = (1 << 7)
 A flag indicating whether or not a row or column is able to be edited by the user. More...
 
static const Flags OPENABLE = (1 << 8)
 A flag indicating whether or not a row is able to be opened by the user. More...
 
static const Flags DEFAULT_ROW_FLAGS = SELECTABLE
 The default flags for a tree view row. More...
 
static const Flags DEFAULT_COLUMN_FLAGS = SORTABLE | HIDEABLE | RESIZEABLE | VISIBLE
 The default flags for a tree view column. More...
 
static const Border DEFAULT_BORDER
 The default border that is used for an tree view. More...
 
static const Color4f DEFAULT_BACKGROUND_COLOR
 The default background color that is used for an tree view's area. More...
 
static const Color4f DEFAULT_BORDER_COLOR
 The default border color that is used for an tree view. More...
 
static const Border DEFAULT_HEADER_BORDER
 The default border that is used for an tree view's header area. More...
 
static const Color4f DEFAULT_HEADER_BACKGROUND_COLOR
 The default background color that is used for an tree view's header area. More...
 
static const Color4f DEFAULT_HEADER_BORDER_COLOR
 The default border color that is used for an tree view's header area. More...
 
static const Color4f DEFAULT_SELECTION_COLOR
 The default color that is used to highlight a tree view's selected rows. More...
 
static const Color4f DEFAULT_DIVIDER_COLOR
 The default color of the dividing lines between table rows and columns. More...
 
static const Float DEFAULT_DIVIDER_WIDTH
 The default width of the dividing lines between table rows and columns. More...
 
static const Float DEFAULT_INDENT_SIZE
 The default amount that rows are indented for each parent scope. More...
 
static const Float DEFAULT_HEADER_SIZE
 The default amount that rows are indented for each parent scope. More...
 

Detailed Description

A class that displays a hierarchy of objects in collapsable table format.

Member Typedef Documentation

The base type to use for boolean flags in this tree view.

Constructor & Destructor Documentation

om::graphics::gui::objects::TreeView::TreeView ( )

Create a new tree view with no width or height positioned at the origin.

om::graphics::gui::objects::TreeView::TreeView ( const Rectangle newRectangle)

Create a new empty tree view which occupies the specified rectangular region.

Member Function Documentation

Size om::graphics::gui::objects::TreeView::getColumnCount ( ) const
inline

Return the total number of columns that there are in this tree view.

Int om::graphics::gui::objects::TreeView::getColumnSort ( Index  columnIndex) const
inline

Return the sort direction for the column at the specified index in this tree view.

Index om::graphics::gui::objects::TreeView::getColumnUserID ( Index  columnIndex) const
inline

Return the user ID of the tree view column at the specified index.

const ColumnFlags& om::graphics::gui::objects::TreeView::getColumnFlags ( Index  columnIndex) const
inline

Return the boolean flags for the specified column.

Float om::graphics::gui::objects::TreeView::getColumnSize ( Index  columnIndex) const
inline

Return the size of the tree view column at the specified index.

void om::graphics::gui::objects::TreeView::setColumnSize ( Index  columnIndex,
Float  newSize 
)
inline

Set the size of the tree view column at the specified index.

GUIObject* om::graphics::gui::objects::TreeView::getColumnHeader ( Index  columnIndex) const
inline

Return a pointer to the object that is displayed in the header area for the specified column.

void om::graphics::gui::objects::TreeView::setColumnSizeRange ( Index  columnIndex,
GUIObject newHeader 
)
inline

Set a pointer to the object that is displayed in the header area for the specified column.

const AABB1f& om::graphics::gui::objects::TreeView::getColumnSizeRange ( Index  columnIndex) const
inline

Return the legal size of the tree view column at the specified index.

void om::graphics::gui::objects::TreeView::setColumnSizeRange ( Index  columnIndex,
const AABB1f newSizeRange 
)
inline

Set the legal size of the tree view column at the specified index.

const AABB1f& om::graphics::gui::objects::TreeView::getColumnLocalBounds ( Index  columnIndex) const
inline

Return the local bounding box along the column axis for the specified column.

void om::graphics::gui::objects::TreeView::addColumn ( const ColumnInfo newInfo)

Add a new column to this tree view with the given information.

Changing the columns in a tree view invalidates any previous hierarchy and requires the tree to be rebuilt using updateTree().

void om::graphics::gui::objects::TreeView::removeColumn ( Index  columnIndex)

Remove the column at the specified index in this tree view.

Changing the columns in a tree view invalidates any previous hierarchy and requires the tree to be rebuilt using updateTree().

void om::graphics::gui::objects::TreeView::clearColumns ( )

Remove all columns from this tree view.

Changing the columns in a tree view invalidates any previous hierarchy and requires the tree to be rebuilt using updateTree().

Size om::graphics::gui::objects::TreeView::getRowCount ( ) const
inline

Return the total number of rows that there are in this tree view.

Float om::graphics::gui::objects::TreeView::getRowSize ( Index  rowIndex) const
inline

Return the size for the specified row in this tree view.

Index om::graphics::gui::objects::TreeView::getRowParent ( Index  rowIndex) const
inline

Return the row index of the specified row's parent in this tree view.

Index om::graphics::gui::objects::TreeView::getRowChildCount ( Index  rowIndex) const
inline

Return the number of direct children there are for the specified row in this tree view.

Index om::graphics::gui::objects::TreeView::getRowChildCountTotal ( Index  rowIndex) const
inline

Return the total number of children there are for the specified row in this tree view.

Index om::graphics::gui::objects::TreeView::getRowUserType ( Index  rowIndex) const
inline

Return the user identifier for the specified row's type in this tree view.

Index om::graphics::gui::objects::TreeView::getRowUserID ( Index  rowIndex) const
inline

Return the user identifier for the specified row in this tree view.

Float om::graphics::gui::objects::TreeView::getRowIndent ( Index  rowIndex) const
inline

Return the number of indentations there are for the specified row.

Float om::graphics::gui::objects::TreeView::getRowIndentSize ( Index  rowIndex) const
inline

Return the actual size of the indentation for the specified row.

const AABB1f& om::graphics::gui::objects::TreeView::getRowLocalBounds ( Index  rowIndex) const
inline

Return the local bounding box along the row axis for the specified row.

const RowFlags& om::graphics::gui::objects::TreeView::getRowFlags ( Index  rowIndex) const
inline

Return the boolean flags for the specified row.

Size om::graphics::gui::objects::TreeView::getCellCount ( ) const
inline

Return the total number of cells that there are in this tree view.

GUIObject* om::graphics::gui::objects::TreeView::getCell ( Index  rowIndex,
Index  columnIndex 
) const
inline

Return a pointer to the GUI object that is displayed at the specified row and column index.

void om::graphics::gui::objects::TreeView::setCell ( Index  rowIndex,
Index  columnIndex,
GUIObject newObject 
)
inline

Set a pointer to the GUI object that is displayed at the specified row and column index.

AABB2f om::graphics::gui::objects::TreeView::getLocalCellBoundsXY ( Index  rowIndex,
Index  columnIndex 
) const
inline

Return the view-local bounding box of the cell with the specified row and column indices.

AABB3f om::graphics::gui::objects::TreeView::getLocalCellBounds ( Index  rowIndex,
Index  columnIndex 
) const
inline

Return the view-local bounding box of the cell with the specified row and column indices.

Float om::graphics::gui::objects::TreeView::getIndentSize ( ) const
inline

Return the global amount that rows are indented for each parent scope.

void om::graphics::gui::objects::TreeView::setIndentSize ( Float  newIndentSize)
inline

Set the global amount that rows are indented for each parent scope.

Size om::graphics::gui::objects::TreeView::getSelectionCount ( ) const
inline

Return the number of selection ranges there currently are in the tree view.

const AABB1D<Index>& om::graphics::gui::objects::TreeView::getSelection ( Index  selectionIndex) const
inline

Return the range of rows for the selection at the given index in the tree view.

const Color4f& om::graphics::gui::objects::TreeView::getSelectionColor ( ) const
inline

Return the selection color for a tree view.

void om::graphics::gui::objects::TreeView::setSelectionColor ( const Color4f &  newSelectionColor)
inline

Set the selection color for a tree view.

const Color4f& om::graphics::gui::objects::TreeView::getDividerColor ( ) const
inline

Return the color to use for the table dividing lines.

void om::graphics::gui::objects::TreeView::setDividerColor ( const Color4f &  newDividerColor)
inline

Set the color to use for the table dividing lines.

Float om::graphics::gui::objects::TreeView::getDividerWidth ( ) const
inline

Return the width of the dividing lines between table rows and columns.

void om::graphics::gui::objects::TreeView::setDividerWidth ( Float  newDividerWidth)
inline

Set the width of the dividing lines between table rows and columns.

ScrollView* om::graphics::gui::objects::TreeView::getScrollView ( ) const
inline

Return a pointer to the external scroll view that contains this tree view.

void om::graphics::gui::objects::TreeView::setScrollView ( ScrollView newScrollView)
inline

Set a pointer to the external scroll view that contains this tree view.

AABB2f om::graphics::gui::objects::TreeView::getVisibleBoundsXY ( ) const

Return the local bounding box of the visible area of this tree view, based on the scroll view.

void om::graphics::gui::objects::TreeView::clearTree ( )

Remove all rows and cells from this tree view, but keep the columns.

void om::graphics::gui::objects::TreeView::updateTree ( )

Update the tree for this view using the tree view delegate.

void om::graphics::gui::objects::TreeView::addRow ( const RowInfo rowInfo)

Add a new row to the end of this tree view at the current position in the depth-first traversal.

This method should only be called by the delegate inside the updateTree() delegate method, and the rows must be provided in depth-first traversal order.

The user must provide rows for the specified number of children that follow this row, in depth-first order.

void om::graphics::gui::objects::TreeView::addRowCell ( GUIObject object)

Add a row column cell to the current row at the current position in the depth-first traversal.

This method should only be called by the delegate inside the updateTree() delegate method, and the cells must be provided in depth-first traversal order, then in column order.

A NULL pointer should be provided when a cell is empty.

void om::graphics::gui::objects::TreeView::finishRowScope ( )

Finish the current row's scope, even if the number of children of the scope is not yet fulfilled.

The number of children for the row is updated to reflect the actual child count.

Float om::graphics::gui::objects::TreeView::getHeaderSize ( ) const
inline

Return the size of the header area that contains the column headers for this tree view.

void om::graphics::gui::objects::TreeView::setHeaderSize ( Float  newHeaderSize)
inline

Set the size of the header area that contains the column headers for this tree view.

const RectangleStyle& om::graphics::gui::objects::TreeView::getHeaderStyle ( ) const
inline

Return an object that describes the style of this tree view's column header area.

void om::graphics::gui::objects::TreeView::setHeaderSize ( const RectangleStyle newHeaderStyle)
inline

Set an object that describes the style of this tree view's column header area.

AABB2f om::graphics::gui::objects::TreeView::getLocalHeaderBoundsXY ( ) const
inline

Return the view-local bounding box of the column header area of this tree view.

AABB2f om::graphics::gui::objects::TreeView::getLocalHeaderContentBoundsXY ( Index  columnIndex) const
inline

Return the view-local bounding box of the header cell with the specified column index.

AABB3f om::graphics::gui::objects::TreeView::getLocalHeaderContentBounds ( Index  columnIndex) const
inline

Return the view-local bounding box of the header cell with the specified column index.

virtual Bool om::graphics::gui::objects::TreeView::setSize ( const Vector3f newSize)
virtual

Set the 3D size of the tree view along each of its local axes.

Reimplemented from om::graphics::gui::objects::GUIObject.

virtual Bool om::graphics::gui::objects::TreeView::resizeForContent ( )
virtual

Resize this tree view to fit tightly around its contents.

Reimplemented from om::graphics::gui::objects::GUIObject.

virtual Bool om::graphics::gui::objects::TreeView::setFocus ( Bool  newHasFocus)
virtual

Set whether or not this tree view currently has keyboard focus at its level in the GUI hierarchy.

Reimplemented from om::graphics::gui::objects::GUIObject.

virtual void om::graphics::gui::objects::TreeView::update ( Float  dt)
virtual

Update the current internal state of this tree view for the specified time interval in seconds.

This method recursively calls the update() methods for all child objects so that they are updated.

Reimplemented from om::graphics::gui::objects::GUIObject.

virtual Bool om::graphics::gui::objects::TreeView::drawSelf ( GUIRenderer renderer,
const AABB3f parentBounds 
) const
virtual

Draw this tree view using the specified GUI renderer to the given parent coordinate system bounds.

The method returns whether or not the tree view was successfully drawn.

Reimplemented from om::graphics::gui::objects::GUIObject.

virtual Bool om::graphics::gui::objects::TreeView::guiEvent ( const GUIEvent event)
virtual

Handle the specified GUI event that occured when this tree view had focus.

Reimplemented from om::gui::input::InputHandler.

virtual Bool om::graphics::gui::objects::TreeView::textEvent ( const TextEvent text)
virtual

Handle the specified text input event that occured when this tree view had focus.

Reimplemented from om::gui::input::InputHandler.

virtual Bool om::graphics::gui::objects::TreeView::keyEvent ( const KeyEvent event)
virtual

Handle the specified keyboard event for the entire tree view.

Reimplemented from om::gui::input::InputHandler.

virtual Bool om::graphics::gui::objects::TreeView::mouseMotionEvent ( const MouseMotionEvent event)
virtual

Handle the specified mouse motion event for the entire tree view.

Reimplemented from om::gui::input::InputHandler.

virtual Bool om::graphics::gui::objects::TreeView::mouseButtonEvent ( const MouseButtonEvent event)
virtual

Handle the specified mouse button event for the entire tree view.

Reimplemented from om::gui::input::InputHandler.

virtual Bool om::graphics::gui::objects::TreeView::mouseWheelEvent ( const MouseWheelEvent event)
virtual

Handle the specified mouse wheel event for the entire tree view.

Reimplemented from om::gui::input::InputHandler.

Delegate& om::graphics::gui::objects::TreeView::getDelegate ( )
inline

Return a reference to the delegate which responds to events for this tree view.

const Delegate& om::graphics::gui::objects::TreeView::getDelegate ( ) const
inline

Return a reference to the delegate which responds to events for this tree view.

void om::graphics::gui::objects::TreeView::setDelegate ( const Delegate newDelegate)
inline

Return a reference to the delegate which responds to events for this tree view.

Member Data Documentation

const Flags om::graphics::gui::objects::TreeView::EXPANDABLE = (1 << 0)
static

A flag indicating whether or not a row can be a parent of other rows.

const Flags om::graphics::gui::objects::TreeView::EXPANDED = (1 << 1)
static

A flag indicating whether or not a row is currently expanded if it is a parent.

const Flags om::graphics::gui::objects::TreeView::SELECTABLE = (1 << 2)
static

A flag indicating whether or not a row is selectable by the user.

const Flags om::graphics::gui::objects::TreeView::SELECTED = (1 << 3)
static

A flag indicating whether or not a row is selected by the user.

const Flags om::graphics::gui::objects::TreeView::SORTABLE = (1 << 3)
static

A flag indicating whether or not a column can be sorted by the user.

const Flags om::graphics::gui::objects::TreeView::HIDEABLE = (1 << 4)
static

A flag indicating whether or not a column can be hidden by the user.

const Flags om::graphics::gui::objects::TreeView::RESIZEABLE = (1 << 5)
static

A flag indicating whether or not a column is resizable by the user.

const Flags om::graphics::gui::objects::TreeView::VISIBLE = (1 << 6)
static

A flag indicating whether or not a row or column is currently visible.

const Flags om::graphics::gui::objects::TreeView::EDITABLE = (1 << 7)
static

A flag indicating whether or not a row or column is able to be edited by the user.

const Flags om::graphics::gui::objects::TreeView::OPENABLE = (1 << 8)
static

A flag indicating whether or not a row is able to be opened by the user.

const Flags om::graphics::gui::objects::TreeView::DEFAULT_ROW_FLAGS = SELECTABLE
static

The default flags for a tree view row.

const Flags om::graphics::gui::objects::TreeView::DEFAULT_COLUMN_FLAGS = SORTABLE | HIDEABLE | RESIZEABLE | VISIBLE
static

The default flags for a tree view column.

const Border om::graphics::gui::objects::TreeView::DEFAULT_BORDER
static

The default border that is used for an tree view.

const Color4f om::graphics::gui::objects::TreeView::DEFAULT_BACKGROUND_COLOR
static

The default background color that is used for an tree view's area.

const Color4f om::graphics::gui::objects::TreeView::DEFAULT_BORDER_COLOR
static

The default border color that is used for an tree view.

const Border om::graphics::gui::objects::TreeView::DEFAULT_HEADER_BORDER
static

The default border that is used for an tree view's header area.

const Color4f om::graphics::gui::objects::TreeView::DEFAULT_HEADER_BACKGROUND_COLOR
static

The default background color that is used for an tree view's header area.

const Color4f om::graphics::gui::objects::TreeView::DEFAULT_HEADER_BORDER_COLOR
static

The default border color that is used for an tree view's header area.

const Color4f om::graphics::gui::objects::TreeView::DEFAULT_SELECTION_COLOR
static

The default color that is used to highlight a tree view's selected rows.

const Color4f om::graphics::gui::objects::TreeView::DEFAULT_DIVIDER_COLOR
static

The default color of the dividing lines between table rows and columns.

const Float om::graphics::gui::objects::TreeView::DEFAULT_DIVIDER_WIDTH
static

The default width of the dividing lines between table rows and columns.

const Float om::graphics::gui::objects::TreeView::DEFAULT_INDENT_SIZE
static

The default amount that rows are indented for each parent scope.

const Float om::graphics::gui::objects::TreeView::DEFAULT_HEADER_SIZE
static

The default amount that rows are indented for each parent scope.


The documentation for this class was generated from the following file: