This class override base TreeListViewInfo and add a dirty flag to the ViewInfo.MaxIndent property.
Doing so can greatly improve the performance of TreeList operations.
Public Member Functions |
|
MaxTreeListViewInfo (TreeList treeList) | |
Constructor. |
|
void | SetMaxColumnIndentDirty () |
Mark the max column indent to "dirty".
|
|
override void | CalcMaxIndents () |
Override the base CalcMaxIndents by first
check if the max indent is already calculated. |
MaxCustomControls::MaxTreeListViewInfo::MaxTreeListViewInfo | ( | TreeList | treeList | ) | [inline] |
Constructor.
treeList | The tree list. |
void MaxCustomControls::MaxTreeListViewInfo::SetMaxColumnIndentDirty | ( | ) | [inline] |
Mark the max column indent to "dirty".
This function could be called when the collapse/expand state of a node gets changed or the traversal list get changed.
override void MaxCustomControls::MaxTreeListViewInfo::CalcMaxIndents | ( | ) | [inline] |
Override the base CalcMaxIndents by first check if the max indent is already calculated.
With the dirty flag we avoided duplicate calculation. This is useful becuase the time complexity of base.CalcMaxIndents() is O(n), where n is the number of nodes.