Empeld
Empeld plugin documentation.
pluginbase.Objects.UI2.IUI2Widget Interface Reference

A widget in the UI2 control More...

Public Member Functions

GetAttribute< T > (string key, T @default=default(T))
 Gets an attribute, trying to convert to type, or defaults on failure More...
 
IEnumerable< IUI2WidgetEnumerateAll ()
 Enumerate through all children widgets, not including self More...
 
bool SetProperty (string key, object val, bool throwOnError=true)
 Sets a property or field on the widget. Converts type if necessary. More...
 
GetProperty< T > (string key)
 Get a property (or field) on the widget, converting it to type T Throws on error More...
 
object GetProperty (string key)
 Get property on field, leaving it the type of the property Throws on error More...
 
bool HasProperty (string key)
 Checks if the widget has the property More...
 
void AttachEvent (string key, Action action)
 Attach an event to a widget event More...
 

Properties

string Type [get]
 String type of the widget More...
 
IReadOnlyDictionary< string, object > Attributes [get]
 All attributes associated with the widget This is often anything that has been set in the UIML (including standard properties like id) This will NOT reflect any dynamic changes that have been made to the widget More...
 
IEnumerable< IUI2WidgetChildren [get]
 Gets immediate children of the widget control More...
 

Detailed Description

A widget in the UI2 control

Member Function Documentation

◆ AttachEvent()

void pluginbase.Objects.UI2.IUI2Widget.AttachEvent ( string  key,
Action  action 
)

Attach an event to a widget event

Parameters
keyKey.
actionAction.

◆ EnumerateAll()

IEnumerable<IUI2Widget> pluginbase.Objects.UI2.IUI2Widget.EnumerateAll ( )

Enumerate through all children widgets, not including self

Returns
The all.

◆ GetAttribute< T >()

T pluginbase.Objects.UI2.IUI2Widget.GetAttribute< T > ( string  key,
T @  default = default(T) 
)

Gets an attribute, trying to convert to type, or defaults on failure

Returns
The property.
Parameters
keyKey.
defaultDefault.
Template Parameters
TThe 1st type parameter.

◆ GetProperty()

object pluginbase.Objects.UI2.IUI2Widget.GetProperty ( string  key)

Get property on field, leaving it the type of the property Throws on error

Returns
The property.
Parameters
keyKey.

◆ GetProperty< T >()

Get a property (or field) on the widget, converting it to type T Throws on error

Returns
The property.
Parameters
keyKey.
Template Parameters
TThe 1st type parameter.

◆ HasProperty()

bool pluginbase.Objects.UI2.IUI2Widget.HasProperty ( string  key)

Checks if the widget has the property

Returns
true, if property was hased, false otherwise.
Parameters
keyKey.

◆ SetProperty()

bool pluginbase.Objects.UI2.IUI2Widget.SetProperty ( string  key,
object  val,
bool  throwOnError = true 
)

Sets a property or field on the widget. Converts type if necessary.

Returns
true, if property was set, false otherwise.
Parameters
keyName of property to set.
valValue of property to set.
throwOnErrorIf set to true will throw on error.

Property Documentation

◆ Attributes

IReadOnlyDictionary<string, object> pluginbase.Objects.UI2.IUI2Widget.Attributes
get

All attributes associated with the widget This is often anything that has been set in the UIML (including standard properties like id) This will NOT reflect any dynamic changes that have been made to the widget

The attributes.

◆ Children

IEnumerable<IUI2Widget> pluginbase.Objects.UI2.IUI2Widget.Children
get

Gets immediate children of the widget control

The children.

◆ Type

string pluginbase.Objects.UI2.IUI2Widget.Type
get

String type of the widget

The type.


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