Empeld
Empeld plugin documentation.
pluginbase.Objects.UI.IBuiControl Interface Reference

The control returned to the plugin to be operated on and retrieve information from More...

Public Member Functions

bool HasInvoke (string name)
 Determines whether this instance has a method that can be invoked given a name More...
 
void Invoke (string name, params object[] args)
 Invoke the specified method name with optional arguments More...
 
dynamic GetDynamic ()
 Gets a dynamic version of the controller, invokeable directly More...
 
void AddCallback (string name, BuiCallbackDelegate method)
 Add a callback, by name, that the BUI script can call More...
 
void AddCallback (IDictionary< string, BuiCallbackDelegate > methods)
 Add a list of methods that the script can call More...
 
void AddCallback< T > (T cls)
 Add all methods in a class labeled with the BuiCallback Attribute More...
 
GetValue< T > (string name, T defaultValue=default(T), bool throwOnError=false)
 Get a value of a property from the controller More...
 
void SetValue< T > (string name, T value, bool throwOnError=true)
 Sets the value of a property on the controller More...
 
bool HasValue (string name)
 Determines whether this instance has a property of the given name More...
 
void Destroy ()
 Destroy the control More...
 

Detailed Description

The control returned to the plugin to be operated on and retrieve information from

Member Function Documentation

◆ AddCallback() [1/2]

void pluginbase.Objects.UI.IBuiControl.AddCallback ( string  name,
BuiCallbackDelegate  method 
)

Add a callback, by name, that the BUI script can call

Parameters
nameName.
methodMethod.

◆ AddCallback() [2/2]

void pluginbase.Objects.UI.IBuiControl.AddCallback ( IDictionary< string, BuiCallbackDelegate methods)

Add a list of methods that the script can call

Parameters
methodsMethods.

◆ AddCallback< T >()

Add all methods in a class labeled with the BuiCallback Attribute

Parameters
clsClass instance
Template Parameters
TThe 1st type parameter.
Type Constraints
T :class 

◆ Destroy()

void pluginbase.Objects.UI.IBuiControl.Destroy ( )

Destroy the control

◆ GetDynamic()

dynamic pluginbase.Objects.UI.IBuiControl.GetDynamic ( )

Gets a dynamic version of the controller, invokeable directly

Returns
The dynamic controller

◆ GetValue< T >()

T pluginbase.Objects.UI.IBuiControl.GetValue< T > ( string  name,
defaultValue = default(T),
bool  throwOnError = false 
)

Get a value of a property from the controller

Returns
The value.
Parameters
nameName of the property
defaultValueDefault value if we cant get the property value
throwOnErrorIf set to true throw on error.
Template Parameters
TThe type of the property

◆ HasInvoke()

bool pluginbase.Objects.UI.IBuiControl.HasInvoke ( string  name)

Determines whether this instance has a method that can be invoked given a name

Returns
true if this instance has invoke the specified name; otherwise, false.
Parameters
nameName.

◆ HasValue()

bool pluginbase.Objects.UI.IBuiControl.HasValue ( string  name)

Determines whether this instance has a property of the given name

Returns
true if this instance has value the specified name; otherwise, false.
Parameters
nameName.

◆ Invoke()

void pluginbase.Objects.UI.IBuiControl.Invoke ( string  name,
params object []  args 
)

Invoke the specified method name with optional arguments

Parameters
nameName.
argsArguments.

◆ SetValue< T >()

void pluginbase.Objects.UI.IBuiControl.SetValue< T > ( string  name,
value,
bool  throwOnError = true 
)

Sets the value of a property on the controller

Parameters
nameName of the property
valueValue
throwOnErrorIf set to true throw on error.
Template Parameters
TThe type of the value

The documentation for this interface was generated from the following file: