|
@@ -425,6 +425,7 @@ U32 GuiTreeViewCtrl::Item::getDisplayTextLength()
|
|
|
|
|
|
StringTableEntry name = obj->getName();
|
|
StringTableEntry name = obj->getName();
|
|
StringTableEntry internalName = obj->getInternalName();
|
|
StringTableEntry internalName = obj->getInternalName();
|
|
|
|
+ StringTableEntry typeHint = obj->getTypeHint();
|
|
StringTableEntry className = obj->getClassName();
|
|
StringTableEntry className = obj->getClassName();
|
|
|
|
|
|
if( showInternalNameOnly() )
|
|
if( showInternalNameOnly() )
|
|
@@ -466,6 +467,11 @@ U32 GuiTreeViewCtrl::Item::getDisplayTextLength()
|
|
if( internalName && internalName[ 0 ] )
|
|
if( internalName && internalName[ 0 ] )
|
|
len += dStrlen( internalName ) + 3; // ' [<internalname>]'
|
|
len += dStrlen( internalName ) + 3; // ' [<internalname>]'
|
|
}
|
|
}
|
|
|
|
+ if ( mState.test(ShowTypeHint) )
|
|
|
|
+ {
|
|
|
|
+ if (typeHint && typeHint[0])
|
|
|
|
+ len += dStrlen(typeHint) + 3;
|
|
|
|
+ }
|
|
if( mState.test( Marked ) )
|
|
if( mState.test( Marked ) )
|
|
{
|
|
{
|
|
len += 1; // '*<name>'
|
|
len += 1; // '*<name>'
|
|
@@ -502,8 +508,10 @@ void GuiTreeViewCtrl::Item::getDisplayText(U32 bufLen, char *buf)
|
|
{
|
|
{
|
|
const char* pObjName = pObject->getName();
|
|
const char* pObjName = pObject->getName();
|
|
const char* pInternalName = pObject->getInternalName();
|
|
const char* pInternalName = pObject->getInternalName();
|
|
|
|
+ const char* pTypeHint = pObject->getTypeHint();
|
|
|
|
|
|
bool hasInternalName = pInternalName && pInternalName[0];
|
|
bool hasInternalName = pInternalName && pInternalName[0];
|
|
|
|
+ bool hasTypeHint = pTypeHint && pTypeHint[0];
|
|
bool hasObjectName = pObjName && pObjName[0];
|
|
bool hasObjectName = pObjName && pObjName[0];
|
|
|
|
|
|
const char* pClassName = pObject->getClassName();
|
|
const char* pClassName = pObject->getClassName();
|
|
@@ -566,6 +574,14 @@ void GuiTreeViewCtrl::Item::getDisplayText(U32 bufLen, char *buf)
|
|
else
|
|
else
|
|
dSprintf(ptr, len, " [%s]", pInternalName);
|
|
dSprintf(ptr, len, " [%s]", pInternalName);
|
|
}
|
|
}
|
|
|
|
+ if (hasTypeHint && mState.test(ShowTypeHint))
|
|
|
|
+ {
|
|
|
|
+ if (mState.test(Item::Marked))
|
|
|
|
+ dSprintf(ptr, len, " *<%s>", pTypeHint);
|
|
|
|
+ else
|
|
|
|
+ dSprintf(ptr, len, " <%s>", pTypeHint);
|
|
|
|
+
|
|
|
|
+ }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
else
|
|
else
|
|
@@ -835,6 +851,7 @@ GuiTreeViewCtrl::GuiTreeViewCtrl()
|
|
mShowClassNames = true;
|
|
mShowClassNames = true;
|
|
mShowObjectNames = true;
|
|
mShowObjectNames = true;
|
|
mShowInternalNames = true;
|
|
mShowInternalNames = true;
|
|
|
|
+ mShowTypeHints = false;
|
|
mShowClassNameForUnnamedObjects = false;
|
|
mShowClassNameForUnnamedObjects = false;
|
|
mFlags.set(RebuildVisible);
|
|
mFlags.set(RebuildVisible);
|
|
|
|
|
|
@@ -894,7 +911,10 @@ void GuiTreeViewCtrl::initPersistFields()
|
|
addField( "showObjectNames", TypeBool, Offset( mShowObjectNames, GuiTreeViewCtrl ),
|
|
addField( "showObjectNames", TypeBool, Offset( mShowObjectNames, GuiTreeViewCtrl ),
|
|
"If true, item text labels for objects will include object names." );
|
|
"If true, item text labels for objects will include object names." );
|
|
addField( "showInternalNames", TypeBool, Offset( mShowInternalNames, GuiTreeViewCtrl ),
|
|
addField( "showInternalNames", TypeBool, Offset( mShowInternalNames, GuiTreeViewCtrl ),
|
|
- "If true, item text labels for obje ts will include internal names." );
|
|
|
|
|
|
+ "If true, item text labels for objets will include internal names." );
|
|
|
|
+ addField("showTypeHints", TypeBool, Offset(mShowTypeHints, GuiTreeViewCtrl),
|
|
|
|
+ "If true, item text labels for objets will include TypeHints.");
|
|
|
|
+
|
|
addField( "showClassNameForUnnamedObjects", TypeBool, Offset( mShowClassNameForUnnamedObjects, GuiTreeViewCtrl ),
|
|
addField( "showClassNameForUnnamedObjects", TypeBool, Offset( mShowClassNameForUnnamedObjects, GuiTreeViewCtrl ),
|
|
"If true, class names will be used as object names for unnamed objects." );
|
|
"If true, class names will be used as object names for unnamed objects." );
|
|
addField( "compareToObjectID", TypeBool, Offset(mCompareToObjectID, GuiTreeViewCtrl));
|
|
addField( "compareToObjectID", TypeBool, Offset(mCompareToObjectID, GuiTreeViewCtrl));
|
|
@@ -1794,6 +1814,7 @@ bool GuiTreeViewCtrl::onAdd()
|
|
mShowClassNames = false;
|
|
mShowClassNames = false;
|
|
mShowObjectNames = false;
|
|
mShowObjectNames = false;
|
|
mShowInternalNames = true;
|
|
mShowInternalNames = true;
|
|
|
|
+ mShowTypeHints = false;
|
|
}
|
|
}
|
|
|
|
|
|
const char* objectNamesOnly = getDataField( sObjectNamesOnly, NULL );
|
|
const char* objectNamesOnly = getDataField( sObjectNamesOnly, NULL );
|
|
@@ -1803,6 +1824,7 @@ bool GuiTreeViewCtrl::onAdd()
|
|
mShowClassNames = false;
|
|
mShowClassNames = false;
|
|
mShowObjectNames = true;
|
|
mShowObjectNames = true;
|
|
mShowInternalNames = false;
|
|
mShowInternalNames = false;
|
|
|
|
+ mShowTypeHints = false;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
@@ -4109,6 +4131,10 @@ GuiTreeViewCtrl::Item* GuiTreeViewCtrl::addInspectorDataItem(Item *parent, SimOb
|
|
item->mState.clear( Item::ShowInternalName );
|
|
item->mState.clear( Item::ShowInternalName );
|
|
else
|
|
else
|
|
item->mState.set( Item::ShowInternalName );
|
|
item->mState.set( Item::ShowInternalName );
|
|
|
|
+ if (!mShowTypeHints)
|
|
|
|
+ item->mState.clear(Item::ShowTypeHint);
|
|
|
|
+ else
|
|
|
|
+ item->mState.set(Item::ShowTypeHint);
|
|
if( mShowClassNameForUnnamedObjects )
|
|
if( mShowClassNameForUnnamedObjects )
|
|
item->mState.set( Item::ShowClassNameForUnnamed );
|
|
item->mState.set( Item::ShowClassNameForUnnamed );
|
|
|
|
|