Modules | Functions

Modules

 TreeCells
 
 TreeColumns
 
 TreeNodes
 
 TreeNodePaths
 

Functions

GuiTreeModelP mdlTreeModel_create (int numCols)
 Creates a GuiTreeModel with the specified number of columns. More...
 
StatusInt mdlTreeModel_destroy (GuiTreeModelP pModel, bool bDestroyNodes)
 Destroys a GuiTreeModel an optionally destroys the GuiTreeNodes contained within the GuiTreeModel. More...
 
GuiTreeNodeP mdlTreeModel_getRootNode (GuiTreeModelCP pModel)
 Returns the root node defined for this GuiTreeNode. More...
 
StatusInt mdlTreeModel_empty (GuiTreeModelP pModel, bool bDestroyNodes)
 Cleans up (reclaims) the memory that was occupied by the given tree model. More...
 
StatusInt mdlTreeModel_setRootNode (GuiTreeModelP pModel, GuiTreeNodeP pNode, bool bDestroyPreviousRoot, bool bReloadDisplayList)
 Resets the root node of the GuiTreeModel. More...
 
StatusInt mdlTreeModel_setDisplayRoot (GuiTreeModelP pModel, bool bDisplayRoot)
 Sets whether to display the root node in the Gui Tree item. More...
 
StatusInt mdlTreeModel_emptyDisplayList (GuiTreeModelP pModel)
 Empties the display list based on the root node and its descendents. More...
 
StatusInt mdlTreeModel_reloadDisplayList (GuiTreeModelP pModel)
 Empties and reloads the display list based on the root node and its descendents. More...
 
int mdlTreeModel_getColumnCount (GuiTreeModelCP pModel)
 Returns the number of columns defined for this GuiTreeModel. More...
 
GuiTreeColumnP mdlTreeModel_getColumnAtIndex (GuiTreeModelCP pModel, int colIndex)
 Returns a pointer to the GuiTreeColumn at the specified column index. More...
 
GuiTreeColumnP mdlTreeModel_getColumnById (GuiTreeModelCP pModel, int colId)
 Returns a pointer to the GuiTreeColumn with the specified column Id. More...
 
GuiTreeColumnP mdlTreeModel_getColumnByName (GuiTreeModelCP pModel, WCharCP pwName)
 Returns a pointer to the GuiTreeColumn with the specified name. More...
 
StatusInt mdlTreeModel_search (GuiTreeModelP pModel, MSValueDescrCP pValueDescr, InfoField *pInfoFields, int columnIndex, GuiTreeNodeP *ppFoundNode)
 Searches through the GuiTreeNodes within the GuiTreeModel for a specified value in a certain column. More...
 
StatusInt mdlTreeModel_searchUsingFunction (GuiTreeModelP pModel, MSValueDescrCP pValueDescr, InfoField *pInfoFields, int columnIndex, TreeColumnSearchFuncP pSearchFunc, MdlDesc *pSearchOwnerMD, GuiTreeNodeP *ppFoundNode)
 Searches through the GuiTreeNodes within the GuiTreeModel for a specified value in a certain column using the specified search function for all columns, including secondary columns. More...
 
UserDataP mdlTreeModel_getAppData (GuiTreeModelCP pModel)
 Returns a pointer to application data associated with the GuiTreeModel. More...
 
StatusInt mdlTreeModel_setAppData (GuiTreeModelP pModel, UserDataP pAppData)
 Sets the pointer to application data to be associated with the GuiTreeModel. More...
 
int mdlTreeModel_getId (GuiTreeModelCP pModel)
 Returns the Id of a specified GuiTreeModel. More...
 
StatusInt mdlTreeModel_setId (GuiTreeModelP pModel, int id)
 Sets the Id of a specified GuiTreeModel. More...
 
long mdlTreeModel_getNodeCount (GuiTreeModelCP pModel)
 Counts the total number of nodes in the specified tree. More...
 
void mdlTreeModel_dump (GuiTreeModelCP pModel, WCharCP pComment, TreeNodeFormatFuncP nodeFormatter, CallbackArgP userArg)
 Dumps the contents of the specified tree to stdout. More...
 
void mdlTreeModel_traverse (GuiTreeModelP pModel, TreeNodeTraverseFuncP traverseFunc, MdlDesc *traverseOwnerMD, CallbackArgP userArg)
 Traverses through all nodes of the TreeModel, calling the traverse function. More...
 
StatusInt mdlTreeModel_compare (GuiTreeModelP pTreeModel1, GuiTreeModelP pTreeModel2, TreeNodeCompareFuncP compareFunc, MdlDesc *compareOwnerMD, TreeNodeModsFuncP modsFunc, MdlDesc *modsOwnerMD, int columnIndex)
 Compares two TreeModels, calling an optional compare function and a modifications function. More...
 
int mdlTreeModel_getDisplayRowCount (GuiTreeModelCP pModel)
 Returns the number of rows in the display list of a GuiTreeModel. More...
 
GuiTreeNodeP mdlTreeModel_getDisplayRowAtIndex (GuiTreeModelCP pModel, int index)
 Returns a pointer to the GuiTreeNode at a specified display row index. More...
 
GuiTreeCellP mdlTreeModel_getDisplayCellAtIndexes (GuiTreeModelCP pModel, int rowIndex, int columnIndex)
 Returns a pointer to the GuiTreeCell at a specified row index and column index. More...
 
GuiTreeNodeP mdlTreeModel_getFirstDisplayRow (GuiTreeModelCP pModel)
 Returns a pointer to the first GuiTreeNode in the display list of a GuiTreeModel. More...
 
GuiTreeNodeP mdlTreeModel_getNextDisplayRow (GuiTreeModelCP pModel, GuiTreeNodeCP pNode)
 Returns a pointer to the next GuiTreeNode after a specified GuiTreeNode in the display list of a GuiTreeModel. More...
 
GuiTreeNodeP mdlTreeModel_getPrevDisplayRow (GuiTreeModelCP pModel, GuiTreeNodeCP pNode)
 Returns a pointer to the previous GuiTreeNode before a specified GuiTreeNode in the display list of a GuiTreeModel. More...
 
GuiTreeNodeP mdlTreeModel_getLastDisplayRow (GuiTreeModelCP pModel)
 Returns a pointer to the last GuiTreeNode in the display list of a GuiTreeModel. More...
 
int mdlTreeModel_getDisplayRowIndex (GuiTreeModelCP pModel, GuiTreeNodeCP pNode)
 Returns the index of the specified GuiTreeNode within the display list of a GuiTreeModel. More...
 

Detailed Description

Function Documentation

StatusInt mdlTreeModel_compare ( GuiTreeModelP  pTreeModel1,
GuiTreeModelP  pTreeModel2,
TreeNodeCompareFuncP  compareFunc,
MdlDesc compareOwnerMD,
TreeNodeModsFuncP  modsFunc,
MdlDesc modsOwnerMD,
int  columnIndex 
)

Compares two TreeModels, calling an optional compare function and a modifications function.

Parameters
[in]pTreeModel1the first GuiTreeModel to compare.
[in]pTreeModel2the second GuiTreeModel to compare.
[in]compareFunca specialized node comparison function.
[in]compareOwnerMDOwnerMD of the comparison function.
[in]modsFunca specialized modifications handling function, called for each perceived difference.
[in]modsOwnerMDOwnerMD of the modifications handling function.
[in]columnIndexthe column to use in the nocde comparison.
Returns
SUCCESS or ERROR
Remarks
Required Library: mdlbltin.lib
GuiTreeModelP mdlTreeModel_create ( int  numCols)

Creates a GuiTreeModel with the specified number of columns.

A default root node is also created.

Parameters
[in]numColsindicates the number of columns.
Returns
A pointer to the new GuiTreeModel.
See also
mdlTreeModel_destroy mdlTreeModel_getRootNode
Remarks
Required Library: mdlbltin.lib
StatusInt mdlTreeModel_destroy ( GuiTreeModelP  pModel,
bool  bDestroyNodes 
)

Destroys a GuiTreeModel an optionally destroys the GuiTreeNodes contained within the GuiTreeModel.

Parameters
[in]pModelpoints to the GuiTreeModel
[in]bDestroyNodesindicates whether to destroy the GuiTreeNodes; will usually be set to true
Returns
SUCCESS, or MDLERR_ADDRNOTVALID if pModel is invalid
See also
mdlTreeModel_create
Remarks
Required Library: mdlbltin.lib
void mdlTreeModel_dump ( GuiTreeModelCP  pModel,
WCharCP  pComment,
TreeNodeFormatFuncP  nodeFormatter,
CallbackArgP  userArg 
)

Dumps the contents of the specified tree to stdout.

Parameters
[in]pModelthe GuiTreeModel to dump.
[in]pCommentcomment to print at top of report, or NULL
[in]nodeFormattera specialized node format function, or NULL to simply print address of node.
[in]userArgpassed to the users nodeFormatter function
Remarks
Required Library: mdlbltin.lib
StatusInt mdlTreeModel_empty ( GuiTreeModelP  pModel,
bool  bDestroyNodes 
)

Cleans up (reclaims) the memory that was occupied by the given tree model.

Optionally, the nodes of the tree are also cleaned up, including the root node.

Parameters
[in]pModelthe tree model to empty and remove from memory
[in]bDestroyNodesif true, the tree nodes are also destroyed, including the root
Returns
SUCCESS unless pModel does not point to a valid treeModel, then ERROR.
Remarks
Required Library: mdlbltin.lib
See also
mdlTreeModel_destroy mdlTreeModel_create
StatusInt mdlTreeModel_emptyDisplayList ( GuiTreeModelP  pModel)

Empties the display list based on the root node and its descendents.

Parameters
[in]pModelpoints to the GuiTreeModel.
Returns
SUCCESS, or MDLERR_ADDRNOTVALID if pModel is invalid
See also
mdlTreeModel_setRootNode
Remarks
Required Library: mdlbltin.lib
UserDataP mdlTreeModel_getAppData ( GuiTreeModelCP  pModel)

Returns a pointer to application data associated with the GuiTreeModel.

Parameters
[in]pModelthe GuiTreeModel to process.
Returns
A pointer to the application data associated with the GuiTreeModel.
See also
mdlTreeModel_setAppData
Remarks
Required Library: mdlbltin.lib
GuiTreeColumnP mdlTreeModel_getColumnAtIndex ( GuiTreeModelCP  pModel,
int  colIndex 
)

Returns a pointer to the GuiTreeColumn at the specified column index.

Parameters
[in]pModelpoints to the GuiTreeModel.
[in]colIndexindex of the column to get
Returns
A pointer to the GuiTreeColumn at the specified column index
See also
mdlTreeModel_getColumnById
Remarks
Required Library: mdlbltin.lib
GuiTreeColumnP mdlTreeModel_getColumnById ( GuiTreeModelCP  pModel,
int  colId 
)

Returns a pointer to the GuiTreeColumn with the specified column Id.

Parameters
[in]pModelpoints to the GuiTreeModel.
[in]colIdId of the column to get
Returns
A pointer to the GuiTreeColumn with the specified column Id.
See also
mdlTreeModel_getColumnAtIndex
Remarks
Required Library: mdlbltin.lib
GuiTreeColumnP mdlTreeModel_getColumnByName ( GuiTreeModelCP  pModel,
WCharCP  pwName 
)

Returns a pointer to the GuiTreeColumn with the specified name.

Parameters
[in]pModelpoints to the GuiTreeModel
[in]pwNamepoints to the name of the column to get
Returns
A pointer to the GuiTreeColumn with the specified column name
See also
mdlTreeModel_getColumnById
Remarks
Required Library: mdlbltin.lib
int mdlTreeModel_getColumnCount ( GuiTreeModelCP  pModel)

Returns the number of columns defined for this GuiTreeModel.

This count is set by the mdlTreeModel_create function.

Parameters
[in]pModelpoints to the GuiTreeModel.
Returns
the number of columns defined for this GuiTreeModel.
See also
mdlTreeModel_create
Remarks
Required Library: mdlbltin.lib
GuiTreeCellP mdlTreeModel_getDisplayCellAtIndexes ( GuiTreeModelCP  pModel,
int  rowIndex,
int  columnIndex 
)

Returns a pointer to the GuiTreeCell at a specified row index and column index.

Parameters
[in]pModelpoints to the GuiTreeModel.
[in]rowIndexindicates the row index of the display row containing the desired GuiTreeCell
[in]columnIndexindicates the column index within the GuiTreeNode of the desired GuiTreeCell
Returns
A pointer to the display GuiTreeCell at the specified row index and column index
See also
mdlTreeModel_getDisplayRowAtIndex mdlListRow_getCellAtIndex
Remarks
Required Library: mdlbltin.lib
GuiTreeNodeP mdlTreeModel_getDisplayRowAtIndex ( GuiTreeModelCP  pModel,
int  index 
)

Returns a pointer to the GuiTreeNode at a specified display row index.

Parameters
[in]pModelpoints to the GuiTreeModel.
[in]indexindicates the index of the display row to get
Returns
A pointer to the GuiTreeNode at the specified display row index
See also
mdlTreeModel_getDisplayRowCount mdlTreeModel_getDisplayRowIndex
Remarks
Required Library: mdlbltin.lib
int mdlTreeModel_getDisplayRowCount ( GuiTreeModelCP  pModel)

Returns the number of rows in the display list of a GuiTreeModel.

Parameters
[in]pModelpoints to the GuiTreeModel.
Returns
The number of rows in the display list
See also
mdlTreeModel_getDisplayRowAtIndex
Remarks
Required Library: mdlbltin.lib
int mdlTreeModel_getDisplayRowIndex ( GuiTreeModelCP  pModel,
GuiTreeNodeCP  pNode 
)

Returns the index of the specified GuiTreeNode within the display list of a GuiTreeModel.

Parameters
[in]pModelpoints to the GuiTreeModel.
[in]pNodepoints to the GuiTreeNode to get the index of
Returns
The index of the specified GuiTreeNode within the display list of a GuiTreeModel, or MDLERR_ADDRNOTVALID if pModel is invalid, or MDLERR_NOMATCH if pNode is not visible.
See also
mdlTreeModel_getDisplayRowAtIndex
Remarks
Required Library: mdlbltin.lib
GuiTreeNodeP mdlTreeModel_getFirstDisplayRow ( GuiTreeModelCP  pModel)

Returns a pointer to the first GuiTreeNode in the display list of a GuiTreeModel.

Parameters
[in]pModelpoints to the GuiTreeModel.
Returns
A pointer to the first GuiTreeNode in the display list of a GuiTreeModel, or NULL if pModel is invalid or the display list is empty.
See also
mdlTreeModel_getNextDisplayRow mdlTreeModel_getPrevDisplayRow mdlTreeModel_getLastDisplayRow
Remarks
Required Library: mdlbltin.lib
int mdlTreeModel_getId ( GuiTreeModelCP  pModel)

Returns the Id of a specified GuiTreeModel.

Parameters
[in]pModelpoints to the GuiTreeModel.
Returns
The Id of a specified GuiTreeModel, or ERROR if pModel is invalid
See also
mdlTreeModel_setId
Remarks
Required Library: mdlbltin.lib
GuiTreeNodeP mdlTreeModel_getLastDisplayRow ( GuiTreeModelCP  pModel)

Returns a pointer to the last GuiTreeNode in the display list of a GuiTreeModel.

Parameters
[in]pModelpoints to the GuiTreeModel.
Returns
A pointer to the last GuiTreeNode in the display list of a GuiTreeModel, or NULL if pModel is invalid or the display list is empty.
See also
mdlTreeModel_getFirstDisplayRow mdlTreeModel_getNextDisplayRow mdlTreeModel_getPrevDisplayRow
Remarks
Required Library: mdlbltin.lib
GuiTreeNodeP mdlTreeModel_getNextDisplayRow ( GuiTreeModelCP  pModel,
GuiTreeNodeCP  pNode 
)

Returns a pointer to the next GuiTreeNode after a specified GuiTreeNode in the display list of a GuiTreeModel.

Parameters
[in]pModelpoints to the GuiTreeModel.
[in]pNodespecifies the GuiTreeNode to get the next GuiTreeNode after. A value of NULL results in returning the first display row.
Returns
A pointer to the next GuiTreeNode in the display list after pNode, or NULL if pNode is the last display row of the GuiTreeModel
See also
mdlTreeModel_getFirstDisplayRow mdlTreeModel_getPrevDisplayRow mdlTreeModel_getLastDisplayRow
Remarks
Required Library: mdlbltin.lib
long mdlTreeModel_getNodeCount ( GuiTreeModelCP  pModel)

Counts the total number of nodes in the specified tree.

Parameters
[in]pModelthe GuiTreeModel to process.
Returns
Number of nodes contained in the GuiTreeModel pModel.
Remarks
Required Library: mdlbltin.lib
GuiTreeNodeP mdlTreeModel_getPrevDisplayRow ( GuiTreeModelCP  pModel,
GuiTreeNodeCP  pNode 
)

Returns a pointer to the previous GuiTreeNode before a specified GuiTreeNode in the display list of a GuiTreeModel.

Parameters
[in]pModelpoints to the GuiTreeModel.
[in]pNodespecifies the GuiTreeNode to get the previous GuiTreeNode before. A value of NULL results in returning the last display row.
Returns
A pointer to the previous GuiTreeNode in the display list before pNode, or NULL if pNode is the first display row of the GuiTreeModel
See also
mdlTreeModel_getFirstDisplayRow mdlTreeModel_getNextDisplayRow mdlTreeModel_getLastDisplayRow
Remarks
Required Library: mdlbltin.lib
GuiTreeNodeP mdlTreeModel_getRootNode ( GuiTreeModelCP  pModel)

Returns the root node defined for this GuiTreeNode.

If mdlTreeModel_setRootNode has not been called, the default root node is returned.

Parameters
[in]pModelpoints to the GuiTreeModel
Returns
A pointer to the root GuiTreeNode.
See also
mdlTreeModel_destroy mdlTreeModel_empty
Remarks
Required Library: mdlbltin.lib
StatusInt mdlTreeModel_reloadDisplayList ( GuiTreeModelP  pModel)

Empties and reloads the display list based on the root node and its descendents.

Parameters
[in]pModelpoints to the GuiTreeModel.
Returns
SUCCESS, or MDLERR_ADDRNOTVALID if pModel is invalid
See also
mdlTreeModel_setRootNode
Remarks
Required Library: mdlbltin.lib
StatusInt mdlTreeModel_search ( GuiTreeModelP  pModel,
MSValueDescrCP  pValueDescr,
InfoField *  pInfoFields,
int  columnIndex,
GuiTreeNodeP *  ppFoundNode 
)

Searches through the GuiTreeNodes within the GuiTreeModel for a specified value in a certain column.

Parameters
[in]pModelpoints to the GuiTreeModel.
[in]pValueDescrvalue of data to search for (if string, use value.charPFormat)
[in]pInfoFieldsInfoFields to search for
[in]columnIndexColumn to search in on
[out]ppFoundNodereturn ptr of found GuiTreeNode
Returns
SUCCESS, or MDLERR_ADDRNOTVALID if pModel is invalid, MDLERR_BADINDEX if columnIndex is invalid, MDLERR_NOMATCH if a child node with the specified value is not found
See also
mdlTreeNode_search mdlTreeColumn_setSearchFunction
Remarks
Required Library: mdlbltin.lib
StatusInt mdlTreeModel_searchUsingFunction ( GuiTreeModelP  pModel,
MSValueDescrCP  pValueDescr,
InfoField *  pInfoFields,
int  columnIndex,
TreeColumnSearchFuncP  pSearchFunc,
MdlDesc pSearchOwnerMD,
GuiTreeNodeP *  ppFoundNode 
)

Searches through the GuiTreeNodes within the GuiTreeModel for a specified value in a certain column using the specified search function for all columns, including secondary columns.

Parameters
[in]pModelpoints to the GuiTreeModel.
[in]pValueDescrvalue of data to search for (if string, use value.charPFormat)
[in]pInfoFieldsInfoFields to search for
[in]columnIndexColumn to search in on
[in]pSearchFuncspecifies to search function to use for all columns, including secondary columns.
[in]pSearchOwnerMDspecifies to search function's owner Mdl Descriptor.
[out]ppFoundNodereturn ptr of found GuiTreeNode
Returns
SUCCESS, or MDLERR_ADDRNOTVALID if pModel is invalid, MDLERR_BADINDEX if columnIndex is invalid, MDLERR_NOMATCH if a child node with the specified value is not found
See also
mdlTreeNode_search mdlTreeColumn_setSearchFunction
Remarks
Required Library: mdlbltin.lib
StatusInt mdlTreeModel_setAppData ( GuiTreeModelP  pModel,
UserDataP  pAppData 
)

Sets the pointer to application data to be associated with the GuiTreeModel.

Parameters
[in]pModelthe GuiTreeModel to process.
[in]pAppDatapoints to the application data to be associated with the GuiTreeModel.
Returns
SUCCESS, or MDLERR_ADDRNOTVALID if pModel is invalid
Remarks
The application data must be destroyed by the application.
See also
mdlTreeModel_getAppData
Remarks
Required Library: mdlbltin.lib
StatusInt mdlTreeModel_setDisplayRoot ( GuiTreeModelP  pModel,
bool  bDisplayRoot 
)

Sets whether to display the root node in the Gui Tree item.

Parameters
[in]pModelpoints to the GuiTreeModel.
[in]bDisplayRootindicates whether to display the root node in the Gui Tree item
Returns
SUCCESS, or MDLERR_ADDRNOTVALID if pModel is invalid
Remarks
Required Library: mdlbltin.lib
StatusInt mdlTreeModel_setId ( GuiTreeModelP  pModel,
int  id 
)

Sets the Id of a specified GuiTreeModel.

Parameters
[in]pModelpoints to the GuiTreeModel
[in]idNew Id of GuiTreeModel
Returns
SUCCESS, or MDLERR_ADDRNOTVALID if pModel is invalid
See also
mdlTreeModel_getId
Remarks
Required Library: mdlbltin.lib
StatusInt mdlTreeModel_setRootNode ( GuiTreeModelP  pModel,
GuiTreeNodeP  pNode,
bool  bDestroyPreviousRoot,
bool  bReloadDisplayList 
)

Resets the root node of the GuiTreeModel.

The previous root node and all of its children are optionally destroyed.

Parameters
[in]pModelpoints to the GuiTreeModel.
[in]pNodepoints to the the new root node
[in]bDestroyPreviousRootindicates whether to destroy the previous root node and its descendents
[in]bReloadDisplayListindicates whether to reload the display list based on the new root node and its descendents
Returns
SUCCESS, or MDLERR_ADDRNOTVALID if pModel is invalid
See also
mdlTreeModel_getRootNode
Remarks
Required Library: mdlbltin.lib
void mdlTreeModel_traverse ( GuiTreeModelP  pModel,
TreeNodeTraverseFuncP  traverseFunc,
MdlDesc traverseOwnerMD,
CallbackArgP  userArg 
)

Traverses through all nodes of the TreeModel, calling the traverse function.

Parameters
[in]pModelthe GuiTreeModel to traverse.
[in]traverseFunca specialized node traverse function.
[in]traverseOwnerMDOwnerMD of the traverse function.
[in]userArgpassed to the user's traverse function
Remarks
Required Library: mdlbltin.lib

Copyright © 2017 Bentley Systems, Incorporated. All rights reserved.