BCGSoft Professional Editor for MFC
CBCGPOutlineNode

Detailed Description

The CBCGPOutlineNode class is used with CBCGPEditCtrl and CBCGPOutlineParser classes.

It represents an hierarchy of outlining nodes and the data structure for collapsible node itself. It contains a list of sub nodes and a pointer to parent node.

The root of the hierarchy tree is the node that meets the following conditions: parent node is NULL, m_nStart is -1, m_nEnd is -1. The CBCGPEditCtrl class contains the root of the hierarchy tree for all collapsible nodes.

Each node has a list of sub nodes:

  • Sub nodes are sorted by their offsets from the beginning of the edit control's text buffer.
  • Intersection of collapsible nodes is not allowed.
  • Parent node covers all sub nodes. A sub node should be inside its parent node.

All these conditions are verified while new nodes are being added. Note, that if you add a new node, which intersects some of existing nodes, then all intersected nodes are removed.

See also
CBCGPOutlineBaseNode
+ Inheritance diagram for CBCGPOutlineNode:

Public Member Functions

 AddBlockAdds a new collapsible node.
 
 DeleteBlocksInRangeRemoves all collapsible nodes within a range.
 
 DeleteInnermostBlockDeletes a node, which contains the specified offset.
 
 GetAllBlocksReturns all subnodes of a collapsible node.
 
 GetBlocksByStateReturns a list of subnodes according to their state, either collapsed or expanded.
 
 GetBlocksByStateInRangeFinds all collapsed or expanded nodes inside the specified range.
 
 GetBlocksInRangeReturns all collapsible nodes from the specified range (by offsets).
 
 GetCountReturns the number of subnodes for this collapsible node.
 
 GetInnermostBlockSearches for a collabsible node by offset and returns an innermost node.
 
 GetParentNodeReturns a pointer to parent node.
 
 GetValueReturns data members of a collapsible node.
 
 SerializeSerialize a collapsible node.
 
 ToggleAllOutliningExpands or collapses all nodes.
 
 ToggleOutliningInRangeExpands or collapses blocks in range (by offset).
 
 UpdateBlocksForDeletedRangeUpdates a collapsible node's bounds in case the text at the collapsible node is being deleted partially.
 
 UpdateBlocksForInsertedTextUpdates the collapsible node's bounds in case the new text is being inserted at the collapsible node.
 
- Public Member Functions inherited from CBCGPOutlineBaseNode
 IsInRangeByOffsetCalled by the edit control when it needs to determine whether the collapsible is placed within some range.
 
 MoveCalled by the framework when it needs to move a collapsible node.
 

Additional Inherited Members

- Public Attributes inherited from CBCGPOutlineBaseNode
 m_bCollapsedSpecifies whether the node is collapsed or not.
 
 m_dwFlagsUsed by the framework for auto-outlining.
 
 m_nBlockTypeSpecifies the type of block for this collapsible node.
 
 m_nEndSpecifies the end offset of the collapsible node hidden area.
 
 m_nNameOffsetKeyword offset.
 
 m_nStartSpecifies the start offset of the collapsible node hidden area.
 
 m_pDataA pointer to user-defined data.
 
 m_rectToolThe rect bounds for the symbol that is drawing in the edit control in place of hidden text. Used by the framework.
 
 m_strReplaceSpecifies the replace string that is shown when the node is collapsed. The default string is three dots ("...").
 
- Static Public Attributes inherited from CBCGPOutlineBaseNode
 m_bCollapsedDefaultSpecifies whether the outline node is collapsed by default, or not.