Torque3D Documentation / _generateds / GuiInspectorField

GuiInspectorField

Engine/source/gui/editor/inspector/field.h

The GuiInspectorField control is a representation of a single abstract field for a given ConsoleObject derived object.

More...

Public Types

Parent 

Public Friends

Public Functions

DECLARE_CATEGORY("Gui Editor" )
const char *
getData(U32 inspectObjectIndex)

Get value of the field we are inspecting.

Returns pointer to this InspectorField's edit ctrl.

Return the name of the field being edited.

Return the name of the console type that this field uses.

Return the inspector object that this field belongs to.

Return the name without the array index that may potentially be present.

const char *

Get the currently value of this control (not the actual field)

bool

Return true if all inspected objects have the same value for this field.

init(GuiInspector * inspector, GuiInspectorGroup * group)
bool

Called when this object is added to the scene.

onRender(Point2I offset, const RectI & updateRect)

Called when this control is to render itself.

Reset the field value to its default value based on default-constructed objects.

bool
resize(const Point2I & newPosition, const Point2I & newExtent)

Changes the size and/or position of this control.

Sets this control's caption text, usually set within setInspectorField, this is exposed in case someone wants to override the normal caption.

setData(const char * data, bool callbacks)

Set value of the field we are inspecting.

setFirstResponder(GuiControl * firstResponder)

Sets the first responder for child controls.

setHeightOverride(bool useOverride, U32 heightOverride)
setHLEnabled(bool enabled)
setSpecialEditField(bool isSpecialEditField)
setValue(const char * newValue)

Sets the value of this GuiInspectorField (not the actual field) This means the EditCtrl unless overridden.

Update the inspected field to match the value of this control.

bool

Update this controls value to reflect that of the inspected field.

bool

Called from within setData to allow child classes to perform their own verification.

Detailed Description

The GuiInspectorField control is a representation of a single abstract field for a given ConsoleObject derived object.

It handles creation getting and setting of it's fields data and editing control.

Creation of custom edit controls is done through this class and is dependent upon the dynamic console type, which may be defined to be custom for different types.

note:

GuiInspectorField controls must have a GuiInspectorGroup as their parent.

Public Types

typedef GuiControl Parent 

Public Friends

Protected Attributes

StringTableEntry mCallbackName 
StringTableEntry mCaption 

The text to display as the field name.

RectI mCaptionRect 
GuiControl * mEdit 
RectI mEditCtrlRect 
AbstractClassRep::Field * mField 
StringTableEntry mFieldArrayIndex 
String mFieldDocs 
U32 mHeightOverride 
bool mHighlighted 
GuiInspector * mInspector 

The GuiInspector that the group is in to which this field belongs.

GuiInspectorGroup * mParent 

The group to which this field belongs.

bool mSpecialEditField 
SimObject * mTargetObject 
bool mUseHeightOverride 
StringTableEntry mVariableName 

Protected Functions

_executeSelectedCallback()

Reimplemented by: afxGuiSubstitutionField, GuiInspectorCustomField, GuiInspectorDynamicField

_registerEditControl(GuiControl * ctrl)

_setFieldDocs(StringTableEntry docs)

Public Functions

GuiInspectorField()

GuiInspectorField(GuiInspector * inspector, GuiInspectorGroup * parent, AbstractClassRep::Field * field)

~GuiInspectorField()

constructEditControl()

Reimplemented by: afxGuiSubstitutionField, GuiInspectorTypeMenuBase, GuiInspectorTypeMaterialName, GuiInspectorTypeTerrainMaterialIndex, GuiInspectorTypeTerrainMaterialName, GuiInspectorTypeCheckBox, GuiInspectorTypeCommand, GuiInspectorTypeFileName, GuiInspectorTypeImageFileName, GuiInspectorTypeRectUV, GuiInspectorTypeEaseF, GuiInspectorTypePrefabFilename, GuiInspectorTypeShapeFilename, GuiInspectorTypeColor, GuiInspectorTypeS32, GuiInspectorTypeBitMask32Helper, GuiInspectorCustomField, GuiInspectorTypeCubemapAssetPtr, GuiInspectorTypeGameObjectAssetPtr, GuiInspectorTypeGUIAssetPtr, GuiInspectorTypeImageAssetPtr, GuiInspectorTypeMaterialAssetPtr, GuiInspectorTypeParticleAssetPtr, GuiInspectorTypeStateMachineAssetPtr, GuiInspectorTypeTerrainAssetPtr, GuiInspectorTypeTerrainMaterialAssetPtr

DECLARE_CATEGORY("Gui Editor" )

DECLARE_CONOBJECT(GuiInspectorField )

getArrayIndex()

getData(U32 inspectObjectIndex)

Get value of the field we are inspecting.

note:

The string returned by this method may be a transient string allocated internally by the console. For any non-transient needs, this string has to be copied to locally owned memory.

note:

This method always returns the value of the field in the first inspected object.

Reimplemented by: afxGuiSubstitutionField, GuiInspectorCustomField, GuiInspectorDynamicField, GuiInspectorVariableField

getEditCtrl()

Returns pointer to this InspectorField's edit ctrl.

getFieldName()

Return the name of the field being edited.

Reimplemented by: GuiInspectorCustomField, GuiInspectorDynamicField

getFieldType()

Return the name of the console type that this field uses.

getInspector()

Return the inspector object that this field belongs to.

getRawFieldName()

Return the name without the array index that may potentially be present.

Reimplemented by: GuiInspectorDynamicField

getTargetObject()

getValue()

Get the currently value of this control (not the actual field)

Reimplemented by: GuiInspectorTypeCheckBox, GuiInspectorTypeBitMask32, GuiInspectorVariableField

hasSameValueInAllObjects()

Return true if all inspected objects have the same value for this field.

init(GuiInspector * inspector, GuiInspectorGroup * group)

onAdd()

Reimplemented from: GuiControl

Reimplemented by: afxGuiSubstitutionField, GuiInspectorTypeBitMask32, GuiInspectorCustomField, GuiInspectorDynamicField, GuiInspectorVariableField

onMouseDown(const GuiEvent & event)

Reimplemented from: GuiControl

onRender(Point2I offset, const RectI & updateRect)

Reimplemented from: GuiControl

onRightMouseUp(const GuiEvent & event)

Reimplemented from: GuiControl

resetData()

Reset the field value to its default value based on default-constructed objects.

note:

If multiple objects are inspected, this will take the default value from the first object and set all fields to this value.

resize(const Point2I & newPosition, const Point2I & newExtent)

Reimplemented from: GuiControl

Reimplemented by: GuiInspectorTypeFileName, GuiInspectorTypeEaseF, GuiInspectorTypeColor, GuiInspectorTypeBitMask32, GuiInspectorTypeBitMask32Helper

setCaption(StringTableEntry caption)

Sets this control's caption text, usually set within setInspectorField, this is exposed in case someone wants to override the normal caption.

setData(const char * data, bool callbacks)

Set value of the field we are inspecting.

Reimplemented by: afxGuiSubstitutionField, GuiInspectorCustomField, GuiInspectorDynamicField, GuiInspectorVariableField

setDocs(String docs)

setEditControl(GuiControl * editCtrl)

setFirstResponder(GuiControl * firstResponder)

Reimplemented from: GuiControl

setHeightOverride(bool useOverride, U32 heightOverride)

setHLEnabled(bool enabled)

setInspectorField(AbstractClassRep::Field * field, StringTableEntry caption, const char * arrayIndex)

Reimplemented by: GuiInspectorCustomField, GuiInspectorDynamicField

setInspectorProfile()

Chooses and sets the GuiControlProfile.

setSpecialEditCallbackName(String callName)

setSpecialEditField(bool isSpecialEditField)

setSpecialEditVariableName(String varName)

setTargetObject(SimObject * obj)

setValue(const char * newValue)

Sets the value of this GuiInspectorField (not the actual field) This means the EditCtrl unless overridden.

Reimplemented by: afxGuiSubstitutionField, GuiInspectorCustomField, GuiInspectorVariableField, GuiInspectorTypeCommand, GuiInspectorTypeMenuBase, GuiInspectorTypeCheckBox, GuiInspectorTypeColorI, GuiInspectorTypeColorF, GuiInspectorTypeS32, GuiInspectorTypeBitMask32, GuiInspectorTypeBitMask32Helper

updateData()

Update the inspected field to match the value of this control.

Reimplemented by: GuiInspectorTypeBitMask32, GuiInspectorVariableField

updateRects()

Reimplemented by: GuiInspectorTypeMaterialName, GuiInspectorTypeFileName, GuiInspectorTypeRectUV, GuiInspectorTypeEaseF, GuiInspectorTypeShapeFilename, GuiInspectorTypeColor, GuiInspectorTypeBitMask32, GuiInspectorTypeBitMask32Helper, GuiInspectorDynamicField, GuiInspectorTypeCubemapAssetPtr, GuiInspectorTypeGameObjectAssetPtr, GuiInspectorTypeGUIAssetPtr, GuiInspectorTypeImageAssetPtr, GuiInspectorTypeMaterialAssetPtr, GuiInspectorTypeParticleAssetPtr, GuiInspectorTypeStateMachineAssetPtr, GuiInspectorTypeTerrainAssetPtr, GuiInspectorTypeTerrainMaterialAssetPtr

updateValue()

Update this controls value to reflect that of the inspected field.

Reimplemented by: afxGuiSubstitutionField, GuiInspectorTypeFileName, GuiInspectorCustomField, GuiInspectorVariableField

verifyData(StringTableEntry data)

Called from within setData to allow child classes to perform their own verification.

Reimplemented by: GuiInspectorTypeName