MCPcopy Create free account
hub / github.com/SpartanJ/eepp / traverseTree

Method traverseTree

src/eepp/ui/uitreeview.cpp:74–88  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

72}
73
74void UITreeView::traverseTree( TreeViewCallback callback ) const {
75 if ( !getModel() )
76 return;
77 Lock l( const_cast<Model*>( getModel() )->resourceMutex() );
78 TraverseTreeVars v{
79 std::move( callback ), *getModel(), 0, getHeaderHeight(), -1, getRowHeight(),
80 };
81 int rootCount = v.model.rowCount();
82 for ( int rootIndex = 0; rootIndex < rootCount; ++rootIndex ) {
83 IterationDecision decision =
84 traverseIndex( v, v.model.index( rootIndex, v.model.treeColumn(), ModelIndex() ) );
85 if ( decision == IterationDecision::Break || decision == IterationDecision::Stop )
86 break;
87 }
88}
89
90void UITreeView::createOrUpdateColumns( bool resetColumnData ) {
91 if ( !getModel() ) {

Callers

nothing calls this directly

Calls 5

getModelFunction · 0.85
ModelIndexFunction · 0.85
rowCountMethod · 0.45
indexMethod · 0.45
treeColumnMethod · 0.45

Tested by

no test coverage detected