C# Class FlatRedBall.Glue.ElementRuntime

Inheritance: PositionedObject, IVisible, IClickable
Mostra file Open project: vchelaru/FlatRedBall Class Usage Examples

Public Properties

Property Type Description
AfterVariableApply EventHandler
BeforeVariableApply EventHandler

Private Properties

Property Type Description
CastAndTranslateValueToSet object
ConvertAbsoluteToRelative string
CreateCustomVariableContainer void
CreateCustomVariableContainers void
CreateFlatRedBallTypeNos object
CreateLayerObject object
CreateNamedObjectElementRuntime void
CreateObjectBasedOnExtension object
DetachAndMoveParentToOrigin void
GetElementFromName ElementRuntime
GetHasFieldOrProperty void
GetLayerForNos Graphics.Layer
GetObjectToSetOnAndParent void
GetReferencedFileFromName FlatRedBall.Glue.SaveClasses.ReferencedFileSave
GetStateInIElement FlatRedBall.Glue.SaveClasses.StateSave
GetWhatToAttachToForNewNos void
InstantiateLists void
IsVariableExposed bool
LoadEmbeddedNamedObjects void
LoadEntityObject ElementRuntime
LoadFileObject object
LoadNamedObjects void
LoadReferencedFiles void
RefreshContainedElements void
RefreshFromFileValues void
RefreshNamedObject void
RefreshNamedObjectPositionedObjectValues void
SetCustomVariableWithNoSourceObject void
SetCustomVariables void
SetFieldOrPropertyCustomVariable PositionedObject
SetInstanceVariablesOnNamedObjects void
SetTunneledVariable void
SetVariablesForNamedObject void
SetVariablesOnElementRuntime void

Public Methods

Method Description
Activity ( ) : void
ConvertIfOverriding ( CustomVariable cv, object valueToSetTo ) : object
Destroy ( ) : void
ElementRuntime ( IElement elementSave, Layer layerProvidedByContainer, NamedObjectSave namedObjectSave, EventHandler onBeforeVariableSet, EventHandler onAfterVariableSet ) : System
GetContainedElementRuntime ( NamedObjectSave namedObjectSave ) : ElementRuntime
GetContainedElementRuntime ( string name ) : ElementRuntime
GetCustomVariable ( string variableName, VariableGetType variableGetType = VariableGetType.DefinedInIElement ) : CustomVariable
GetReferencedFileSaveRuntime ( string unqualifiedName ) : object
GetSourceElementAndVariableName ( CustomVariable cv, ElementRuntime &sourceElement, string &variableName ) : void
GetStateRecursively ( string stateName, string category = null ) : StateSave
GetStateSaveFromCustomVariableValue ( CustomVariable cv, object valueToSetTo ) : StateSave
HasCursorOver ( Cursor cursor ) : bool
IsMouseOver ( Cursor cursor, Layer layer ) : bool
LoadReferencedFileSave ( ReferencedFileSave r ) : object
LoadReferencedFileSave ( ReferencedFileSave r, bool isBeingAccessed, IElement container ) : object
RefreshVariables ( ) : void
SetCustomVariable ( CustomVariable cv ) : void
SetCustomVariable ( CustomVariable cv, IElement container, object valueToSetTo, bool attachAndUnattach, VariableSettingOptions settingOptions = VariableSettingOptions.TreatAbsoluteAsRelativeIfAttached ) : void
SetCustomVariableValue ( string name, object value ) : void
SetState ( StateSave stateToSet, IElement container ) : void
SetState ( StateSave stateToSet, bool refreshPositionedObjectValues, IElement container ) : void
SetState ( string stateName ) : void
SetState ( string stateName, bool refreshPositionedObjectValues ) : void
SetStateFromCustomVariable ( CustomVariable cv, IElement container, object valueToSetTo ) : void
ShouldElementRuntimeBeCreatedForNos ( NamedObjectSave n, IElement container ) : bool
TryGetCurrentCustomVariableValue ( string name, object &value ) : bool

Private Methods

Method Description
CastAndTranslateValueToSet ( CustomVariable cv, object valueToSetTo ) : object
ConvertAbsoluteToRelative ( string absoluteName ) : string
CreateCustomVariableContainer ( CustomVariable cv ) : void

This method populates the mCustomVariables list with default valued variables. These can later get set in SetCustomVariable, but they need to exist so that plugins like the script parser know whether something is a custom variable or not.

CreateCustomVariableContainers ( IElement elementSave ) : void
CreateFlatRedBallTypeNos ( NamedObjectSave namedObjectSave, PositionedObjectList listToPopulate, Layer layerToPutOn ) : object
CreateLayerObject ( NamedObjectSave namedObjectSave, object returnObject ) : object
CreateNamedObjectElementRuntime ( IElement elementSave, Layer layerProvidedByContainer, List namedObjectSaveList, PositionedObjectList listToPopulate, PositionedObject parentElementRuntime ) : void
CreateObjectBasedOnExtension ( NamedObjectSave objectToLoad, IElement elementSave, Layer layerToPutOn, PositionedObjectList listToPopulate, string extension ) : object
DetachAndMoveParentToOrigin ( PositionedObject asPositionedObject, PositionedObject parent, Vector3 &oldParentPosition, Matrix &oldParentRotation ) : void
GetElementFromName ( string name ) : ElementRuntime
GetHasFieldOrProperty ( string variableName, object objectToSetOn, PropertyInfo &property, FieldInfo &field, bool &hasFieldOrProperty ) : void
GetLayerForNos ( Layer layerProvidedByContainer, NamedObjectSave n ) : Graphics.Layer
GetObjectToSetOnAndParent ( ElementRuntime sourceElement, object &objectToSetOn, PositionedObject &parent ) : void
GetReferencedFileFromName ( object valueToSetTo ) : ReferencedFileSave
GetStateInIElement ( string stateName, IElement element, string category = null ) : StateSave
GetWhatToAttachToForNewNos ( PositionedObject parentElementRuntime, NamedObjectSave n, Object newObject, PositionedObject &attachTo, float &parentZToSet ) : void
InstantiateLists ( ) : void
IsVariableExposed ( CustomVariableInNamedObject cvino, NamedObjectSave n ) : bool
LoadEmbeddedNamedObjects ( IElement element, Layer layerProvidedByContainer ) : void
LoadEntityObject ( NamedObjectSave n, Layer layerToPutOn, PositionedObjectList listToPopulate ) : ElementRuntime
LoadFileObject ( NamedObjectSave objectToLoad, IElement elementSave, Layer layerToPutOn, PositionedObjectList listToPopulate ) : object
LoadNamedObjects ( IElement elementSave ) : void
LoadReferencedFiles ( IElement elementSave ) : void
RefreshContainedElements ( ) : void
RefreshFromFileValues ( ElementRuntime elementRuntime ) : void
RefreshNamedObject ( NamedObjectSave n ) : void
RefreshNamedObjectPositionedObjectValues ( ) : void
SetCustomVariableWithNoSourceObject ( CustomVariable cv, object valueToSetTo ) : void
SetCustomVariables ( IElement elementSave ) : void
SetFieldOrPropertyCustomVariable ( CustomVariable cv, object valueToSetTo, bool attachAndUnattach, IElement container, ElementRuntime sourceElement, object objectToSetOn, PositionedObject parent, PropertyInfo property, FieldInfo field ) : PositionedObject
SetInstanceVariablesOnNamedObjects ( ) : void
SetTunneledVariable ( object valueToSetTo, bool attachAndUnattach, object untranslated, string variableName, object objectToSetOn, IElement container, NamedObjectSave nos ) : void
SetVariablesForNamedObject ( object newlyCreatedElementRuntime, NamedObjectSave n ) : void
SetVariablesOnElementRuntime ( ElementRuntime elementRuntime ) : void

Method Details

Activity() public method

public Activity ( ) : void
return void

ConvertIfOverriding() public static method

public static ConvertIfOverriding ( CustomVariable cv, object valueToSetTo ) : object
cv FlatRedBall.Glue.SaveClasses.CustomVariable
valueToSetTo object
return object

Destroy() public method

public Destroy ( ) : void
return void

ElementRuntime() public method

public ElementRuntime ( IElement elementSave, Layer layerProvidedByContainer, NamedObjectSave namedObjectSave, EventHandler onBeforeVariableSet, EventHandler onAfterVariableSet ) : System
elementSave IElement
layerProvidedByContainer Layer
namedObjectSave FlatRedBall.Glue.SaveClasses.NamedObjectSave
onBeforeVariableSet EventHandler
onAfterVariableSet EventHandler
return System

GetContainedElementRuntime() public method

public GetContainedElementRuntime ( NamedObjectSave namedObjectSave ) : ElementRuntime
namedObjectSave FlatRedBall.Glue.SaveClasses.NamedObjectSave
return ElementRuntime

GetContainedElementRuntime() public method

public GetContainedElementRuntime ( string name ) : ElementRuntime
name string
return ElementRuntime

GetCustomVariable() public method

public GetCustomVariable ( string variableName, VariableGetType variableGetType = VariableGetType.DefinedInIElement ) : CustomVariable
variableName string
variableGetType VariableGetType
return FlatRedBall.Glue.SaveClasses.CustomVariable

GetReferencedFileSaveRuntime() public method

public GetReferencedFileSaveRuntime ( string unqualifiedName ) : object
unqualifiedName string
return object

GetSourceElementAndVariableName() public method

public GetSourceElementAndVariableName ( CustomVariable cv, ElementRuntime &sourceElement, string &variableName ) : void
cv FlatRedBall.Glue.SaveClasses.CustomVariable
sourceElement ElementRuntime
variableName string
return void

GetStateRecursively() public method

public GetStateRecursively ( string stateName, string category = null ) : StateSave
stateName string
category string
return FlatRedBall.Glue.SaveClasses.StateSave

GetStateSaveFromCustomVariableValue() public method

public GetStateSaveFromCustomVariableValue ( CustomVariable cv, object valueToSetTo ) : StateSave
cv FlatRedBall.Glue.SaveClasses.CustomVariable
valueToSetTo object
return FlatRedBall.Glue.SaveClasses.StateSave

HasCursorOver() public method

public HasCursorOver ( Cursor cursor ) : bool
cursor FlatRedBall.Gui.Cursor
return bool

IsMouseOver() public method

public IsMouseOver ( Cursor cursor, Layer layer ) : bool
cursor FlatRedBall.Gui.Cursor
layer Layer
return bool

LoadReferencedFileSave() public method

public LoadReferencedFileSave ( ReferencedFileSave r ) : object
r FlatRedBall.Glue.SaveClasses.ReferencedFileSave
return object

LoadReferencedFileSave() public method

public LoadReferencedFileSave ( ReferencedFileSave r, bool isBeingAccessed, IElement container ) : object
r FlatRedBall.Glue.SaveClasses.ReferencedFileSave
isBeingAccessed bool
container IElement
return object

RefreshVariables() public method

public RefreshVariables ( ) : void
return void

SetCustomVariable() public method

public SetCustomVariable ( CustomVariable cv ) : void
cv FlatRedBall.Glue.SaveClasses.CustomVariable
return void

SetCustomVariable() public method

public SetCustomVariable ( CustomVariable cv, IElement container, object valueToSetTo, bool attachAndUnattach, VariableSettingOptions settingOptions = VariableSettingOptions.TreatAbsoluteAsRelativeIfAttached ) : void
cv FlatRedBall.Glue.SaveClasses.CustomVariable
container IElement
valueToSetTo object
attachAndUnattach bool
settingOptions VariableSettingOptions
return void

SetCustomVariableValue() public method

public SetCustomVariableValue ( string name, object value ) : void
name string
value object
return void

SetState() public method

public SetState ( StateSave stateToSet, IElement container ) : void
stateToSet FlatRedBall.Glue.SaveClasses.StateSave
container IElement
return void

SetState() public method

public SetState ( StateSave stateToSet, bool refreshPositionedObjectValues, IElement container ) : void
stateToSet FlatRedBall.Glue.SaveClasses.StateSave
refreshPositionedObjectValues bool
container IElement
return void

SetState() public method

public SetState ( string stateName ) : void
stateName string
return void

SetState() public method

public SetState ( string stateName, bool refreshPositionedObjectValues ) : void
stateName string
refreshPositionedObjectValues bool
return void

SetStateFromCustomVariable() public method

public SetStateFromCustomVariable ( CustomVariable cv, IElement container, object valueToSetTo ) : void
cv FlatRedBall.Glue.SaveClasses.CustomVariable
container IElement
valueToSetTo object
return void

ShouldElementRuntimeBeCreatedForNos() public static method

public static ShouldElementRuntimeBeCreatedForNos ( NamedObjectSave n, IElement container ) : bool
n FlatRedBall.Glue.SaveClasses.NamedObjectSave
container IElement
return bool

TryGetCurrentCustomVariableValue() public method

public TryGetCurrentCustomVariableValue ( string name, object &value ) : bool
name string
value object
return bool

Property Details

AfterVariableApply public_oe property

Event which gets raised after each variable is applied on the runtime object. This can be handled to apply after variable set events.
public EventHandler AfterVariableApply
return EventHandler

BeforeVariableApply public_oe property

Event which gets raised after each variable is applied on the runtime object. This can be handled to apply after variable set events.
public EventHandler BeforeVariableApply
return EventHandler