Class TabExtensions
Namespace: Aspid.FastTools.UIElements
Assembly: Aspid.FastTools.dll
Provides extension methods for Tab.
public static class TabExtensions
Inheritance
Methods
AddClosed<T>(T, Action<Tab>)
Subscribes to the closed event.
public static T AddClosed<T>(this T element, Action<Tab> value) where T : Tab
Parameters
element T
The element to modify.
value Action<Tab>
The callback to subscribe.
Returns
T
The element, for chaining.
Type Parameters
T
The element type.
AddClosing<T>(T, Func<bool>)
Subscribes to the closing event.
public static T AddClosing<T>(this T element, Func<bool> value) where T : Tab
Parameters
element T
The element to modify.
The callback to subscribe; it returns false to cancel the closing.
Returns
T
The element, for chaining.
Type Parameters
T
The element type.
Remarks
When several callbacks are subscribed, Unity runs all of them and uses only the result of the last one.
AddSelected<T>(T, Action<Tab>)
Subscribes to the selected event.
public static T AddSelected<T>(this T element, Action<Tab> value) where T : Tab
Parameters
element T
The element to modify.
value Action<Tab>
The callback to subscribe.
Returns
T
The element, for chaining.
Type Parameters
T
The element type.
RemoveClosed<T>(T, Action<Tab>)
Unsubscribes from the closed event.
public static T RemoveClosed<T>(this T element, Action<Tab> value) where T : Tab
Parameters
element T
The element to modify.
value Action<Tab>
The callback to remove.
Returns
T
The element, for chaining.
Type Parameters
T
The element type.
RemoveClosing<T>(T, Func<bool>)
Unsubscribes from the closing event.
public static T RemoveClosing<T>(this T element, Func<bool> value) where T : Tab
Parameters
element T
The element to modify.
The callback to remove.
Returns
T
The element, for chaining.
Type Parameters
T
The element type.
RemoveSelected<T>(T, Action<Tab>)
Unsubscribes from the selected event.
public static T RemoveSelected<T>(this T element, Action<Tab> value) where T : Tab
Parameters
element T
The element to modify.
value Action<Tab>
The callback to remove.
Returns
T
The element, for chaining.
Type Parameters
T
The element type.
SetCloseable<T>(T, bool)
Sets closeable.
public static T SetCloseable<T>(this T element, bool value) where T : Tab
Parameters
element T
The element to modify.
value bool
When true, the header shows a close button.
Returns
T
The element, for chaining.
Type Parameters
T
The element type.
SetIconImage<T>(T, Background)
Sets iconImage.
public static T SetIconImage<T>(this T element, Background value) where T : Tab
Parameters
element T
The element to modify.
value Background
The header icon to set.
Returns
T
The element, for chaining.
Type Parameters
T
The element type.
SetLabel<T>(T, string)
Sets label.
public static T SetLabel<T>(this T element, string value) where T : Tab
Parameters
element T
The element to modify.
value string
The header text to set.
Returns
T
The element, for chaining.
Type Parameters
T
The element type.