Interface IPanelPropertyContainer
Represents a panel that contains properties.
Namespace: Evergine.Editor.Extension
Assembly: Evergine.Editor.Extension.dll
Syntax
public interface IPanelPropertyContainer
Properties
Properties
Gets the list of IPropertyInfo elements in the container.
Declaration
IEnumerable<IPropertyInfo> Properties { get; }
Property Value
Type | Description |
---|---|
IEnumerable<IPropertyInfo> |
Methods
Add(MemberInfo)
Adds a property for the specified member of the instance associated with this panel.
Declaration
void Add(MemberInfo member)
Parameters
Type | Name | Description |
---|---|---|
MemberInfo | member | The member. |
Add(MemberInfo, object)
Adds a property for the specified member of the instance as a parameter.
Declaration
void Add(MemberInfo member, object instance)
Parameters
Type | Name | Description |
---|---|---|
MemberInfo | member | The member. |
object | instance | The instance. |
AddBoolean(string, string, bool, Func<bool>, Action<bool>, string)
Adds a boolean property to this panel container.
Declaration
IPropertyInfo AddBoolean(string id, string name, bool defaultValue = false, Func<bool> getValue = null, Action<bool> setValue = null, string tooltip = null)
Parameters
Type | Name | Description |
---|---|---|
string | id | The property ID. |
string | name | The property's name. |
bool | defaultValue | The default value. |
Func<bool> | getValue | The function that retrieves the value. |
Action<bool> | setValue | The action that sets the value. |
string | tooltip | The property description. |
Returns
Type | Description |
---|---|
IPropertyInfo | The added property. |
AddButton(string, string, Action)
Adds a button to this panel container.
Declaration
IPropertyInfo AddButton(string id, string text, Action action)
Parameters
Type | Name | Description |
---|---|---|
string | id | The property ID. |
string | text | The button text. |
Action | action | The action to be executed when the button is clicked. |
Returns
Type | Description |
---|---|
IPropertyInfo | The added property. |
AddButton(string, string, Func<string, Task>)
Adds a button to this panel container.
Declaration
IPropertyInfo AddButton(string id, string text, Func<string, Task> action)
Parameters
Type | Name | Description |
---|---|---|
string | id | The property id. |
string | text | The button text. |
Func<string, Task> | action | The action to be executed when the button is clicked. |
Returns
Type | Description |
---|---|
IPropertyInfo | The added property. |
AddButton(string, string, Func<Task>)
Adds a button to this panel container.
Declaration
IPropertyInfo AddButton(string id, string text, Func<Task> action)
Parameters
Type | Name | Description |
---|---|---|
string | id | The property id. |
string | text | The button text. |
Func<Task> | action | The action to be executed when the button is clicked. |
Returns
Type | Description |
---|---|
IPropertyInfo | The added property. |
AddColor(string, string, Color, Func<Color>, Action<Color>, string)
Adds a color property to this panel container.
Declaration
IPropertyInfo AddColor(string id, string name, Color defaultValue = default, Func<Color> getValue = null, Action<Color> setValue = null, string tooltip = null)
Parameters
Type | Name | Description |
---|---|---|
string | id | The property ID. |
string | name | The property name. |
Color | defaultValue | The default value. |
Func<Color> | getValue | The function to get the value. |
Action<Color> | setValue | The action to set the value. |
string | tooltip | The property description. |
Returns
Type | Description |
---|---|
IPropertyInfo | The added property. |
AddEnum(string, string, Type, Func<Enum>, Action<Enum>, Enum[], string)
Adds an Enum property to this panel container.
Declaration
IPropertyInfo AddEnum(string id, string name, Type enumType, Func<Enum> getValue = null, Action<Enum> setValue = null, Enum[] excluded = null, string tooltip = null)
Parameters
Type | Name | Description |
---|---|---|
string | id | The property id. |
string | name | The property name. |
Type | enumType | The enum type. |
Func<Enum> | getValue | The get value function. |
Action<Enum> | setValue | The set value action. |
Enum[] | excluded | The list of excluded values. |
string | tooltip | The property description. |
Returns
Type | Description |
---|---|
IPropertyInfo | The added property. |
AddEnum<TEnum>(string, string, Func<TEnum>, Action<TEnum>, TEnum[], string)
Adds an enum property to this panel container.
Declaration
IPropertyInfo AddEnum<TEnum>(string id, string name, Func<TEnum> getValue = null, Action<TEnum> setValue = null, TEnum[] excluded = null, string tooltip = null) where TEnum : Enum
Parameters
Type | Name | Description |
---|---|---|
string | id | The property ID. |
string | name | The property name. |
Func<TEnum> | getValue | The function to get the value. |
Action<TEnum> | setValue | The action to set the value. |
TEnum[] | excluded | The list of excluded values. |
string | tooltip | The property description. |
Returns
Type | Description |
---|---|
IPropertyInfo | The added property. |
Type Parameters
Name | Description |
---|---|
TEnum | The enum type. |
AddInteger(string, string, byte, byte, byte, byte, byte, Func<byte>, Action<byte>, bool, string)
Adds an integer property to this panel container.
Declaration
INumericPropertyInfo AddInteger(string id, string name, byte minValue = 0, byte maxValue = 255, byte desiredChange = 0, byte desiredLargeChange = 0, byte defaultValue = 0, Func<byte> getValue = null, Action<byte> setValue = null, bool asSlider = false, string tooltip = null)
Parameters
Type | Name | Description |
---|---|---|
string | id | The property ID. |
string | name | The property name. |
byte | minValue | The minimum value. |
byte | maxValue | The maximum value. |
byte | desiredChange | The desired change value. |
byte | desiredLargeChange | The desired large change value. |
byte | defaultValue | The default value. |
Func<byte> | getValue | The get value function. |
Action<byte> | setValue | The set value action. |
bool | asSlider | A value indicating whether the property must be shown as a slider. |
string | tooltip | The property description. |
Returns
Type | Description |
---|---|
INumericPropertyInfo | The added property. |
AddInteger(string, string, int, int, int, int, int, Func<int>, Action<int>, bool, string)
Adds an integer property to this panel container.
Declaration
INumericPropertyInfo AddInteger(string id, string name, int minValue = -2147483648, int maxValue = 2147483647, int desiredChange = 0, int desiredLargeChange = 0, int defaultValue = 0, Func<int> getValue = null, Action<int> setValue = null, bool asSlider = false, string tooltip = null)
Parameters
Type | Name | Description |
---|---|---|
string | id | The property id. |
string | name | The property name. |
int | minValue | The minimum value. |
int | maxValue | The maximum value. |
int | desiredChange | The desired change value. |
int | desiredLargeChange | The desired large change value. |
int | defaultValue | The default value. |
Func<int> | getValue | The get value function. |
Action<int> | setValue | The set value action. |
bool | asSlider | A value indicating whether the property must be shown as a slider. |
string | tooltip | The property description. |
Returns
Type | Description |
---|---|
INumericPropertyInfo | The added property. |
AddInteger(string, string, long, long, long, long, long, Func<long>, Action<long>, bool, string)
Adds an integer property to this panel container.
Declaration
INumericPropertyInfo AddInteger(string id, string name, long minValue = -9223372036854775808, long maxValue = 9223372036854775807, long desiredChange = 0, long desiredLargeChange = 0, long defaultValue = 0, Func<long> getValue = null, Action<long> setValue = null, bool asSlider = false, string tooltip = null)
Parameters
Type | Name | Description |
---|---|---|
string | id | The property id. |
string | name | The property name. |
long | minValue | The minimum value. |
long | maxValue | The maximum value. |
long | desiredChange | The desired change value. |
long | desiredLargeChange | The desired large change value. |
long | defaultValue | The default value. |
Func<long> | getValue | The get value function. |
Action<long> | setValue | The set value action. |
bool | asSlider | A value indicating whether the property must be shown as a slider. |
string | tooltip | The property description. |
Returns
Type | Description |
---|---|
INumericPropertyInfo | The added property. |
AddLabel(string, string)
Adds a label property to this panel container.
Declaration
IPropertyInfo AddLabel(string id, string text)
Parameters
Type | Name | Description |
---|---|---|
string | id | The property ID. |
string | text | The label text. |
Returns
Type | Description |
---|---|
IPropertyInfo | The added property. |
AddList(string, string, Func<IEnumerable<string>>, Action<IEnumerable<string>>, string)
Adds a list property to this panel container.
Declaration
IPropertyInfo AddList(string id, string name, Func<IEnumerable<string>> getValue = null, Action<IEnumerable<string>> setValue = null, string tooltip = null)
Parameters
Type | Name | Description |
---|---|---|
string | id | The property ID. |
string | name | The property name. |
Func<IEnumerable<string>> | getValue | The get value function. |
Action<IEnumerable<string>> | setValue | The set value action. |
string | tooltip | The property description. |
Returns
Type | Description |
---|---|
IPropertyInfo | The added property. |
AddLoadable(string, string, Type, Func<ILoadable>, Action<ILoadable>, Func<Guid, Lazy<ILoadable>, bool>, string)
Adds a loadable property to this panel container.
Declaration
IPropertyInfo AddLoadable(string id, string name, Type loadableType, Func<ILoadable> getValue, Action<ILoadable> setValue, Func<Guid, Lazy<ILoadable>, bool> assetsFilter = null, string tooltip = null)
Parameters
Type | Name | Description |
---|---|---|
string | id | The property id. |
string | name | The property name. |
Type | loadableType | The type of ILoadable. |
Func<ILoadable> | getValue | The get-value function. |
Action<ILoadable> | setValue | The set-value action. |
Func<Guid, Lazy<ILoadable>, bool> | assetsFilter | A filter for available loadables. The second func argument loads the asset when the Lazy is created and unloads it after the assets are filtered. |
string | tooltip | The property description. |
Returns
Type | Description |
---|---|
IPropertyInfo | The added property. |
AddLoadable<TLoadable>(string, string, Func<TLoadable>, Action<TLoadable>, Func<Guid, Lazy<TLoadable>, bool>, string)
Adds a loadable property to this panel container.
Declaration
IPropertyInfo AddLoadable<TLoadable>(string id, string name, Func<TLoadable> getValue, Action<TLoadable> setValue, Func<Guid, Lazy<TLoadable>, bool> assetsFilter = null, string tooltip = null) where TLoadable : ILoadable
Parameters
Type | Name | Description |
---|---|---|
string | id | The property ID. |
string | name | The property name. |
Func<TLoadable> | getValue | The function to get the value. |
Action<TLoadable> | setValue | The action to set the value. |
Func<Guid, Lazy<TLoadable>, bool> | assetsFilter | A filter for available loadables. The second function argument loads the asset when the Lazy is created and unloads it after filtering the assets. |
string | tooltip | The property description. |
Returns
Type | Description |
---|---|
IPropertyInfo | The added property. |
Type Parameters
Name | Description |
---|---|
TLoadable | The type of ILoadable. |
AddNumeric(string, string, double, double, double, double, double, Func<double>, Action<double>, bool, string)
Adds a numeric property to this panel container.
Declaration
INumericPropertyInfo AddNumeric(string id, string name, double minValue = -1.7976931348623157E+308, double maxValue = 1.7976931348623157E+308, double desiredChange = 0, double desiredLargeChange = 0, double defaultValue = 0, Func<double> getValue = null, Action<double> setValue = null, bool asSlider = false, string tooltip = null)
Parameters
Type | Name | Description |
---|---|---|
string | id | The property id. |
string | name | The property name. |
double | minValue | The minimum value. |
double | maxValue | The maximum value. |
double | desiredChange | The desired change value. |
double | desiredLargeChange | The desired large change value. |
double | defaultValue | The default value. |
Func<double> | getValue | The get value function. |
Action<double> | setValue | The set value action. |
bool | asSlider | A value indicating whether the property must be shown as a slider. |
string | tooltip | The property description. |
Returns
Type | Description |
---|---|
INumericPropertyInfo | The added property. |
AddNumeric(string, string, float, float, float, float, float, Func<float>, Action<float>, bool, string)
Adds a numeric property to this panel container.
Declaration
INumericPropertyInfo AddNumeric(string id, string name, float minValue = -3.4028235E+38, float maxValue = 3.4028235E+38, float desiredChange = 0, float desiredLargeChange = 0, float defaultValue = 0, Func<float> getValue = null, Action<float> setValue = null, bool asSlider = false, string tooltip = null)
Parameters
Type | Name | Description |
---|---|---|
string | id | The property id. |
string | name | The property name. |
float | minValue | The minimum value. |
float | maxValue | The maximum value. |
float | desiredChange | The desired change value. |
float | desiredLargeChange | The desired large change value. |
float | defaultValue | The default value. |
Func<float> | getValue | The get value function. |
Action<float> | setValue | The set value action. |
bool | asSlider | A value indicating whether the property must be shown as a slider. |
string | tooltip | The property description. |
Returns
Type | Description |
---|---|
INumericPropertyInfo | The added property. |
AddSelector(string, string, IEnumerable<float>, Func<float>, Action<float>, string)
Adds a selector property to this panel container.
Declaration
IPropertyInfo AddSelector(string id, string name, IEnumerable<float> options, Func<float> getValue = null, Action<float> setValue = null, string tooltip = null)
Parameters
Type | Name | Description |
---|---|---|
string | id | The property ID. |
string | name | The property name. |
IEnumerable<float> | options | The options. |
Func<float> | getValue | The function to get the value. |
Action<float> | setValue | The action to set the value. |
string | tooltip | The property description. |
Returns
Type | Description |
---|---|
IPropertyInfo | The added property. |
AddSelector(string, string, IEnumerable<string>, Func<string>, Action<string>, string)
Adds a selector property to this panel container.
Declaration
IPropertyInfo AddSelector(string id, string name, IEnumerable<string> options, Func<string> getValue = null, Action<string> setValue = null, string tooltip = null)
Parameters
Type | Name | Description |
---|---|---|
string | id | The property id. |
string | name | The property name. |
IEnumerable<string> | options | The options. |
Func<string> | getValue | The function to get the value. |
Action<string> | setValue | The action to set the value. |
string | tooltip | The property description. |
Returns
Type | Description |
---|---|
IPropertyInfo | The added property. |
AddSubPanel(string, string)
Adds a subpanel property to this panel container.
Declaration
ISubPanelPropertyInfo AddSubPanel(string id, string text)
Parameters
Type | Name | Description |
---|---|---|
string | id | The property ID. |
string | text | The label text. |
Returns
Type | Description |
---|---|
ISubPanelPropertyInfo | The added property. |
AddText(string, string, string, Func<string>, Action<string>, string)
Adds a text property to this panel container.
Declaration
IPropertyInfo AddText(string id, string name, string defaultValue = null, Func<string> getValue = null, Action<string> setValue = null, string tooltip = null)
Parameters
Type | Name | Description |
---|---|---|
string | id | The property id. |
string | name | The property name. |
string | defaultValue | The default value. |
Func<string> | getValue | The function to get the value. |
Action<string> | setValue | The action to set the value. |
string | tooltip | The property description. |
Returns
Type | Description |
---|---|
IPropertyInfo | The added property. |
AddTimespan(string, string, TimeSpan?, TimeSpan?, TimeSpan?, Func<TimeSpan>, Action<TimeSpan>, string)
Adds a timespan property to this panel container.
Declaration
IPropertyInfo AddTimespan(string id, string name, TimeSpan? minValue = null, TimeSpan? maxValue = null, TimeSpan? defaultValue = null, Func<TimeSpan> getValue = null, Action<TimeSpan> setValue = null, string tooltip = null)
Parameters
Type | Name | Description |
---|---|---|
string | id | The property id. |
string | name | The property name. |
TimeSpan? | minValue | The minimum value. |
TimeSpan? | maxValue | The maximum value. |
TimeSpan? | defaultValue | The default value. |
Func<TimeSpan> | getValue | The get value function. |
Action<TimeSpan> | setValue | The set value action. |
string | tooltip | The property description. |
Returns
Type | Description |
---|---|
IPropertyInfo | The added property. |
AddVector2(string, string, float, float, float, float, Vector2, Func<Vector2>, Action<Vector2>, string)
Adds a Vector2 property to this panel container.
Declaration
IPropertyInfo AddVector2(string id, string name, float minX = -3.4028235E+38, float maxX = 3.4028235E+38, float minY = -3.4028235E+38, float maxY = 3.4028235E+38, Vector2 defaultValue = default, Func<Vector2> getValue = null, Action<Vector2> setValue = null, string tooltip = null)
Parameters
Type | Name | Description |
---|---|---|
string | id | The property ID. |
string | name | The property name. |
float | minX | The minimum value for X. |
float | maxX | The maximum value for X. |
float | minY | The minimum value for Y. |
float | maxY | The maximum value for Y. |
Vector2 | defaultValue | The default value. |
Func<Vector2> | getValue | The get value function. |
Action<Vector2> | setValue | The set value action. |
string | tooltip | The property description. |
Returns
Type | Description |
---|---|
IPropertyInfo | The added property. |
AddVector3(string, string, Vector3, Func<Vector3>, Action<Vector3>, string)
Adds a Vector3 property to this panel container.
Declaration
IPropertyInfo AddVector3(string id, string name, Vector3 defaultValue = default, Func<Vector3> getValue = null, Action<Vector3> setValue = null, string tooltip = null)
Parameters
Type | Name | Description |
---|---|---|
string | id | The property ID. |
string | name | The property name. |
Vector3 | defaultValue | The default value. |
Func<Vector3> | getValue | The function to get the value. |
Action<Vector3> | setValue | The action to set the value. |
string | tooltip | The property description. |
Returns
Type | Description |
---|---|
IPropertyInfo | The added property. |
AddVector4(string, string, Vector4, Func<Vector4>, Action<Vector4>, string)
Adds a Vector4 property to this panel container.
Declaration
IPropertyInfo AddVector4(string id, string name, Vector4 defaultValue = default, Func<Vector4> getValue = null, Action<Vector4> setValue = null, string tooltip = null)
Parameters
Type | Name | Description |
---|---|---|
string | id | The property ID. |
string | name | The property name. |
Vector4 | defaultValue | The default value. |
Func<Vector4> | getValue | The function to get the value. |
Action<Vector4> | setValue | The action to set the value. |
string | tooltip | The property description. |
Returns
Type | Description |
---|---|
IPropertyInfo | The added property. |
Find(string)
Searches for the property that matches the given id.
Declaration
IPropertyInfo Find(string id)
Parameters
Type | Name | Description |
---|---|---|
string | id | The property id. |
Returns
Type | Description |
---|---|
IPropertyInfo | The IPropertyInfo that matches the given id, if found; otherwise, returns null. |
Find<TPropertyType>(PropertyEditor<TPropertyType>)
Searches for the property that matches the given editor.
Declaration
IPropertyInfo Find<TPropertyType>(PropertyEditor<TPropertyType> editor)
Parameters
Type | Name | Description |
---|---|---|
PropertyEditor<TPropertyType> | editor | The property editor. |
Returns
Type | Description |
---|---|
IPropertyInfo | The IPropertyInfo that matches the given id, if found; otherwise, returns null. |
Type Parameters
Name | Description |
---|---|
TPropertyType | The property editor value type. |
InvalidateLayout()
Invalidates the current panel layout, allowing the generation of a new panel layout the next time the GenerateUI method of PanelEditor and PropertyEditor is called.
Declaration
void InvalidateLayout()
Remove(string)
Removes the property that matches the given id.
Declaration
bool Remove(string id)
Parameters
Type | Name | Description |
---|---|---|
string | id | The property id. |
Returns
Type | Description |
---|---|
bool |
|
Events
PropertyUpdated
Occurs when the value of a property changes.
Declaration
event EventHandler<string> PropertyUpdated
Event Type
Type | Description |
---|---|
EventHandler<string> |