MCPcopy Create free account
hub / github.com/TorqueGameEngines/Torque3D / inspectGroup

Method inspectGroup

Engine/source/gui/editor/inspector/group.cpp:229–511  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

227//-----------------------------------------------------------------------------
228
229bool GuiInspectorGroup::inspectGroup()
230{
231 // We can't inspect a group without a target!
232 if( !mParent || !mParent->getNumInspectObjects() )
233 return false;
234
235 // to prevent crazy resizing, we'll just freeze our stack for a sec..
236 mStack->freeze(true);
237
238 bool bNoGroup = false;
239
240 // Un-grouped fields are all sorted into the 'general' group
241 if ( dStricmp( mCaption, "General" ) == 0 )
242 bNoGroup = true;
243
244 // Just delete all fields and recreate them (like the dynamicGroup)
245 // because that makes creating controls for array fields a lot easier
246 clearFields();
247
248 bool bNewItems = false;
249 bool bMakingArray = false;
250 GuiStackControl *pArrayStack = NULL;
251 GuiRolloutCtrl *pArrayRollout = NULL;
252 bool bGrabItems = false;
253
254 AbstractClassRep* commonAncestorClass = findCommonAncestorClass();
255 AbstractClassRep::FieldList& fieldList = commonAncestorClass->mFieldList;
256 for( AbstractClassRep::FieldList::iterator itr = fieldList.begin();
257 itr != fieldList.end(); ++ itr )
258 {
259 AbstractClassRep::Field* field = &( *itr );
260 if( field->type == AbstractClassRep::StartGroupFieldType )
261 {
262 // If we're dealing with general fields, always set grabItems to true (to skip them)
263 if( bNoGroup == true )
264 bGrabItems = true;
265 else if( dStricmp( field->pGroupname, mCaption ) == 0 )
266 bGrabItems = true;
267 continue;
268 }
269 else if ( field->type == AbstractClassRep::EndGroupFieldType )
270 {
271 // If we're dealing with general fields, always set grabItems to false (to grab them)
272 if( bNoGroup == true )
273 bGrabItems = false;
274 else if( dStricmp( field->pGroupname, mCaption ) == 0 )
275 bGrabItems = false;
276 continue;
277 }
278
279 // Skip field if it has the HideInInspectors flag set.
280
281 if( field->flag.test( AbstractClassRep::FIELD_HideInInspectors ) )
282 continue;
283
284 if( ( bGrabItems == true || ( bNoGroup == true && bGrabItems == false ) ) && itr->type != AbstractClassRep::DeprecatedFieldType )
285 {
286 if( bNoGroup == true && bGrabItems == true )

Callers 2

loadVarsMethod · 0.45
updateMethod · 0.45

Calls 15

dStricmpFunction · 0.85
dSprintfFunction · 0.85
freezeMethod · 0.80
setControlProfileMethod · 0.80
instantCollapseMethod · 0.80
updatePanesMethod · 0.80
findObjectFunction · 0.50
beginMethod · 0.45
endMethod · 0.45
testMethod · 0.45
setCaptionMethod · 0.45
registerObjectMethod · 0.45

Tested by 2

loadVarsMethod · 0.36
updateMethod · 0.36