os::TreeViewNode Class Reference
[The Syllable Graphical User Interface API]

Baseclass for TreeView nodes. More...

Inheritance diagram for os::TreeViewNode:

os::ListViewRow os::TreeViewStringNode List of all members.

Public Member Functions

 TreeViewNode ()
virtual ~TreeViewNode ()
void AttachToView (View *pcView, int nColumn)=0
void SetRect (const Rect &cRect, int nColumn)=0
virtual float GetWidth (View *pcView, int nColumn)=0
virtual float GetHeight (View *pcView)=0
virtual void Paint (const Rect &cFrame, View *pcView, uint nColumn, bool bSelected, bool bHighlighted, bool bHasFocus)=0
virtual bool IsLessThan (const ListViewRow *pcOther, uint nColumn) const=0
virtual bool HitTest (View *pcView, const Rect &cFrame, int nColumn, Point cPos)
void SetIndent (uint nIndent)
 Set indentation depth.
uint GetIndent () const
 Get indentation depth.
void SetExpanded (bool bExpanded)
 Set expanded state.
bool IsExpanded () const
 Get expanded state.
TreeViewGetOwner () const
 Get owner.
bool IsLastSibling () const
 Check if node has more siblings.

Protected Member Functions

void _DrawExpanderCross (View *pcView, const Rect &cRect)
 Draw expander cross.
Rect _ExpanderCrossPos (const Rect &cFrame) const
 Get expander position.
void _SetOwner (TreeView *pcOwner)
 Set owner.
void _SetLinePositions (uint32 nLPos)
 Set line positions.
uint32 _GetLinePositions () const
 Get line positions.
void _SetLastSibling (bool bIsLast)
 Set LastSibling.

Friends

class TreeView

Classes

class  Private

Detailed Description

Description:
See also:
Author:
Henrik Isaksson ([email protected])


Constructor & Destructor Documentation

TreeViewNode::TreeViewNode (  ) 

TreeViewNode::~TreeViewNode (  )  [virtual]


Member Function Documentation

void os::TreeViewNode::AttachToView ( View pcView,
int  nColumn 
) [pure virtual]

Implements os::ListViewRow.

Implemented in os::TreeViewStringNode.

void os::TreeViewNode::SetRect ( const Rect cRect,
int  nColumn 
) [pure virtual]

Implements os::ListViewRow.

Implemented in os::TreeViewStringNode.

virtual float os::TreeViewNode::GetWidth ( View pcView,
int  nColumn 
) [pure virtual]

Implements os::ListViewRow.

Implemented in os::TreeViewStringNode.

virtual float os::TreeViewNode::GetHeight ( View pcView  )  [pure virtual]

Implements os::ListViewRow.

Implemented in os::TreeViewStringNode.

virtual void os::TreeViewNode::Paint ( const Rect cFrame,
View pcView,
uint  nColumn,
bool  bSelected,
bool  bHighlighted,
bool  bHasFocus 
) [pure virtual]

Implements os::ListViewRow.

Implemented in os::TreeViewStringNode.

virtual bool os::TreeViewNode::IsLessThan ( const ListViewRow pcOther,
uint  nColumn 
) const [pure virtual]

Implements os::ListViewRow.

Implemented in os::TreeViewStringNode.

bool TreeViewNode::HitTest ( View pcView,
const Rect cFrame,
int  nColumn,
Point  cPos 
) [virtual]

Reimplemented from os::ListViewRow.

void TreeViewNode::SetIndent ( uint  nIndent  ) 

Description:
Set indentation depth for a node. The hierarchical relations between nodes is decided by their indentation depths. A node with a higher indentation depth than the node before it, is considered a sub node.
Parameters:
nIndent Indentation depth.
Author:
Henrik Isaksson ([email protected])

uint TreeViewNode::GetIndent (  )  const

Description:
See also:
SetIndent()
Author:
Henrik Isaksson ([email protected])

void TreeViewNode::SetExpanded ( bool  bExpanded  ) 

Description:
Set expanded state of a node. Do not call this method directly, as it does not update sub nodes. Use TreeView::Expand() instead.
See also:
TreeView::Expand(), GetExpanded()
Author:
Henrik Isaksson ([email protected])

bool TreeViewNode::IsExpanded (  )  const

Description:
Returns true if the node is in expanded state (ie. sub nodes are displayed).
See also:
SetIndent()
Author:
Henrik Isaksson ([email protected])

TreeView * TreeViewNode::GetOwner (  )  const

Description:
Returns a pointer to the TreeView this node belongs to. Returns NULL if the node is not attached to a TreeView.
See also:
_SetOwner()
Author:
Henrik Isaksson ([email protected])

bool TreeViewNode::IsLastSibling (  )  const

Description:
Check if there is a sibling following the current node. Used when rendering the "tree trunk", to know if it should continue to the next node or if it should be finished at this node.
Author:
Henrik Isaksson ([email protected])

void TreeViewNode::_DrawExpanderCross ( View pcView,
const Rect cRect 
) [protected]

Description:
The default expander cross drawing routine.
Author:
Henrik Isaksson ([email protected])

Rect TreeViewNode::_ExpanderCrossPos ( const Rect cFrame  )  const [protected]

Description:
Returns a rect with dimensions and position for where the expander image should be drawn.
Author:
Henrik Isaksson ([email protected])

void TreeViewNode::_SetOwner ( TreeView pcOwner  )  [protected]

Description:
This method is used by TreeView to tell nodes which TreeView they belong to. It is called automatically by TreeView::InsertNode(), so you should never need to use this method directly.
See also:
TreeView::InsertNode(), GetOwner()
Author:
Henrik Isaksson ([email protected])

void TreeViewNode::_SetLinePositions ( uint32  nLPos  )  [protected]

Description:
A 'one' in the line positions integer means that a tree trunk segment should be drawn at the corresponding indentation depth on the current row.
See also:
_GetLinePositions()
Author:
Henrik Isaksson ([email protected])

uint32 TreeViewNode::_GetLinePositions (  )  const [protected]

Description:
See also:
_SetLinePositions()
Author:
Henrik Isaksson ([email protected])

void TreeViewNode::_SetLastSibling ( bool  bIsLast  )  [protected]

Description:
Used by TreeView to keep the LastSibling attribute up to date. Should not be called elsewhere.
Author:
Henrik Isaksson ([email protected])


Friends And Related Function Documentation

friend class TreeView [friend]


Generated on Sat May 9 22:51:49 2009 for Syllable higlevel API by  doxygen 1.5.1