|
UsoUIElements 0.1.0
Data Centric implimentation of Unity's UI Elements (UI Toolkit)
|
A custom two-pane split view control that extends Unity's TwoPaneSplitView with USO UI framework functionality. Provides enhanced styling, field validation, automatic pane creation, and integration with the USO UI system. More...
Public Member Functions | |
| UsoTwoPaneSplitView () | |
| Initializes a new instance of the UsoTwoPaneSplitView class with default settings. Creates a split view with USO framework integration and automatically initialized left and right panes. | |
| UsoTwoPaneSplitView (string fieldName) | |
| Initializes a new instance of the UsoTwoPaneSplitView class with the specified field name. Creates a split view with custom identification for binding and reference purposes. | |
| UsoTwoPaneSplitView (string fieldName, out UsoTwoPaneSplitView newField) | |
| Initializes a new instance of the UsoTwoPaneSplitView class with field name and returns a reference. Creates a split view with custom identification and provides an out parameter for immediate access. | |
| UsoLineItem | GetParentLineItem () |
| Retrieves the first ancestor UsoLineItem control in the visual tree hierarchy. This is useful for accessing parent container functionality and maintaining proper UI structure. | |
| void | InitElement (string fieldName=null) |
| Initializes the USO UI element with the specified field name and automatically creates the left and right panes. This method sets up the basic USO framework integration for the control and populates it with UsoVisualElement panes. | |
| void | SetFieldStatus (FieldStatusTypes fieldStatus) |
| Updates the field's status type, which affects its visual appearance and validation state. The status change is automatically reflected in the UI through the FieldStatus property. | |
| void | ShowFieldStatus (bool status) |
| Controls the visibility and functionality of the field status/validation system. When disabled, removes validation-related styling from the control. | |
| Public Member Functions inherited from GWG.UsoUIElements.IUsoUiElement | |
| void | AddToClassList (string className) |
| Adds the specified CSS class name to this element's class list. This method is inherited from Unity's VisualElement and enables dynamic styling modifications. | |
| void | ApplyBinding (string fieldBindingProp, string fieldBindingPath, BindingMode fieldBindingMode) |
| Applies data binding configuration to the specified property of this element using Unity's data binding system. Enables automatic synchronization between the UI element and data source properties. | |
| void | ClearBindings () |
| Removes all data binding configurations from this element. This method is inherited from Unity's VisualElement and provides cleanup functionality for data bindings. | |
| void | RemoveFromClassList (string className) |
| Removes the specified CSS class name from this element's class list. This method is inherited from Unity's VisualElement and provides dynamic styling capabilities. | |
Properties | |
| FieldStatusTypes | FieldStatus [get, private set] |
| Gets the current field status type, which determines the visual state and validation feedback. This property is automatically reflected in the UI through CSS class modifications. | |
| bool | FieldStatusEnabled [get, private set] |
| Gets or sets whether field status/validation functionality is enabled for this control. When enabled, adds validation CSS class for styling. When disabled, removes validation styling. | |
| VisualElement | LeftPane [get, set] |
| Gets or sets the left pane visual element of the split view. This pane is automatically created during initialization and can be used to add content to the left side. | |
| VisualElement | RightPane [get, set] |
| Gets or sets the right pane visual element of the split view. This pane is automatically created during initialization and can be used to add content to the right side. | |
Private Attributes | |
| FieldStatusTypes | _fieldStatus |
| Private backing field for the FieldStatus property. | |
| bool | _fieldStatusEnabled |
| Private backing field for the FieldStatusEnabled property. | |
Static Private Attributes | |
| const string | DefaultBindProp = "value" |
| Default binding property used when applying data bindings to this field. Currently set to "value" for potential future binding scenarios. | |
| const string | ElementStylesheet = "uso-object-field" |
| CSS class name applied to all UsoTwoPaneSplitView instances for styling purposes. Note: Currently uses "uso-object-field" class, which may be intended for a different control type. | |
| const string | ElementValidationClass = "uso-field-validation" |
| CSS class name applied when field validation/status functionality is enabled. | |
A custom two-pane split view control that extends Unity's TwoPaneSplitView with USO UI framework functionality. Provides enhanced styling, field validation, automatic pane creation, and integration with the USO UI system.
This control implements the IUsoUiElement interface to provide consistent behavior across the USO UI framework. It supports field status indicators, custom styling through CSS classes, and automatically creates left and right panes using UsoVisualElement instances. The control is designed for layouts that require resizable split-pane functionality with enhanced USO framework integration. The control automatically initializes with two UsoVisualElement panes that can be accessed through the LeftPane and RightPane properties for content management.
| GWG.UsoUIElements.UsoTwoPaneSplitView.UsoTwoPaneSplitView | ( | ) |
Initializes a new instance of the UsoTwoPaneSplitView class with default settings. Creates a split view with USO framework integration and automatically initialized left and right panes.
| GWG.UsoUIElements.UsoTwoPaneSplitView.UsoTwoPaneSplitView | ( | string | fieldName | ) |
Initializes a new instance of the UsoTwoPaneSplitView class with the specified field name. Creates a split view with custom identification for binding and reference purposes.
| fieldName | The name to assign to this split view element. |
| GWG.UsoUIElements.UsoTwoPaneSplitView.UsoTwoPaneSplitView | ( | string | fieldName, |
| out UsoTwoPaneSplitView | newField ) |
Initializes a new instance of the UsoTwoPaneSplitView class with field name and returns a reference. Creates a split view with custom identification and provides an out parameter for immediate access.
| fieldName | The name to assign to this split view element. |
| newField | Output parameter that receives a reference to the newly created split view. |
| UsoLineItem GWG.UsoUIElements.UsoTwoPaneSplitView.GetParentLineItem | ( | ) |
Retrieves the first ancestor UsoLineItem control in the visual tree hierarchy. This is useful for accessing parent container functionality and maintaining proper UI structure.
| void GWG.UsoUIElements.UsoTwoPaneSplitView.InitElement | ( | string | fieldName = null | ) |
Initializes the USO UI element with the specified field name and automatically creates the left and right panes. This method sets up the basic USO framework integration for the control and populates it with UsoVisualElement panes.
| fieldName | Optional name to assign to the element. If null, no name is set. |
The method automatically creates two UsoVisualElement instances and assigns them as LeftPane and RightPane for convenient content management. The panes are added to the split view hierarchy during initialization.
Implements GWG.UsoUIElements.IUsoUiElement.
| void GWG.UsoUIElements.UsoTwoPaneSplitView.SetFieldStatus | ( | FieldStatusTypes | fieldStatus | ) |
Updates the field's status type, which affects its visual appearance and validation state. The status change is automatically reflected in the UI through the FieldStatus property.
| fieldStatus | The new field status type to apply. |
Implements GWG.UsoUIElements.IUsoUiElement.
| void GWG.UsoUIElements.UsoTwoPaneSplitView.ShowFieldStatus | ( | bool | status | ) |
Controls the visibility and functionality of the field status/validation system. When disabled, removes validation-related styling from the control.
| status | True to enable field status functionality; false to disable it. |
Implements GWG.UsoUIElements.IUsoUiElement.
|
private |
Private backing field for the FieldStatus property.
|
private |
Private backing field for the FieldStatusEnabled property.
|
staticprivate |
Default binding property used when applying data bindings to this field. Currently set to "value" for potential future binding scenarios.
|
staticprivate |
CSS class name applied to all UsoTwoPaneSplitView instances for styling purposes. Note: Currently uses "uso-object-field" class, which may be intended for a different control type.
|
staticprivate |
CSS class name applied when field validation/status functionality is enabled.
|
getprivate set |
Gets the current field status type, which determines the visual state and validation feedback. This property is automatically reflected in the UI through CSS class modifications.
The current FieldStatusTypes value indicating the field's validation state.
Implements GWG.UsoUIElements.IUsoUiElement.
|
getprivate set |
Gets or sets whether field status/validation functionality is enabled for this control. When enabled, adds validation CSS class for styling. When disabled, removes validation styling.
True if field status functionality is enabled; otherwise, false. Default is false.
Implements GWG.UsoUIElements.IUsoUiElement.
|
getset |
Gets or sets the left pane visual element of the split view. This pane is automatically created during initialization and can be used to add content to the left side.
The UsoVisualElement that serves as the left pane container.
|
getset |
Gets or sets the right pane visual element of the split view. This pane is automatically created during initialization and can be used to add content to the right side.
The UsoVisualElement that serves as the right pane container.