MCPcopy Create free account
hub / github.com/GarageGames/Torque3D / buildVisibleTree

Method buildVisibleTree

Engine/source/gui/controls/guiTreeViewCtrl.cpp:1245–1281  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1243//------------------------------------------------------------------------------
1244
1245void GuiTreeViewCtrl::buildVisibleTree(bool bForceFullUpdate)
1246{
1247 // Recursion Prevention.
1248 if( mFlags.test( BuildingVisTree ) )
1249 return;
1250 mFlags.set( BuildingVisTree, true );
1251
1252 if( mDebug )
1253 Con::printf( "Rebuilding visible tree" );
1254
1255 mMaxWidth = 0;
1256 mVisibleItems.clear();
1257
1258 // If we're filtering, force a full update.
1259
1260 if( !mFilterText.isEmpty() )
1261 bForceFullUpdate = true;
1262
1263 // Update the flags.
1264 mFlags.clear(RebuildVisible);
1265
1266 // build the root items
1267 Item *traverse = mRoot;
1268 while(traverse)
1269 {
1270 _buildItem(traverse, 0, bForceFullUpdate);
1271 traverse = traverse->mNext;
1272 }
1273
1274 // adjust the GuiArrayCtrl
1275 mCellSize.set( mMaxWidth + mTextOffset, mItemHeight );
1276 setSize(Point2I(1, mVisibleItems.size()));
1277 syncSelection();
1278
1279 // Done Recursing.
1280 mFlags.clear( BuildingVisTree );
1281}
1282
1283//------------------------------------------------------------------------------
1284

Callers 15

forestEditorGui.csFile · 0.80
ForestEditorGuiFunction · 0.80
ForestEditBrushTreeFunction · 0.80
main.csFile · 0.80
MeshRoadEditorGuiFunction · 0.80
RoadEditorGuiFunction · 0.80
EditorGui.ed.csFile · 0.80
EditorGuiFunction · 0.80
ESelectObjectsWindowFunction · 0.80
menuHandlers.ed.csFile · 0.80
TerrainMaterialDlgFunction · 0.80
RiverEditorGuiFunction · 0.80

Calls 7

printfFunction · 0.85
Point2IClass · 0.50
testMethod · 0.45
setMethod · 0.45
clearMethod · 0.45
isEmptyMethod · 0.45
sizeMethod · 0.45

Tested by

no test coverage detected