BCGSoft Professional Editor for MFC
virtual CBCGPOutlineNode* CBCGPOutlineNode::AddBlock ( const CBCGPOutlineBaseNode srcNode,

Adds a new collapsible node.

A pointer to a newly created collapsible node

The AddBlock function creates a copy of the source node dynamically allocating a new node. Then it inserts the new subnode to the list of subnodes.

The following conditions are verified while adding new nodes:

  • Subnodes are sorted by their offsets.
  • Intersection of collapsible nodes is not allowed.
  • Parent node covers all its subnodes. A subnode should be inside the parent one.

Note, that all existing collapsible nodes that are intersected by the new node will be removed!

The BCGP_EDIT_OUTLINE_CHANGES structure is used to keep changes during insertions. The intersection of collapsible nodes is not allowed, therefore all intersected nodes will be removed and saved in BCGP_EDIT_OUTLINE_CHANGES structure.

changesA reference to structure containing outline node changes.
srcNodeA node to insert.