|
UsoUIElements 0.1.0
Data Centric implimentation of Unity's UI Elements (UI Toolkit)
|
A custom toolbar search field control that extends Unity's BindableElement with specialized search functionality and USO UI framework integration. Provides enhanced search capabilities, value change notifications, integrated clear functionality, and horizontal layout optimization for toolbar contexts. More...
Public Member Functions | |
| UsoToolbarSearchField () | |
| Initializes a new instance of the UsoToolbarSearchField class with integrated text field and clear button functionality. Creates a complete search interface with horizontal layout, flexible sizing, and automatic value synchronization. | |
| void | SetValueWithoutNotify (string newValue) |
| Sets the search field's value without triggering value change notifications. This method provides direct value assignment for scenarios where change events should not be fired. | |
Properties | |
| UsoTextField | textfield [get, set] |
| Gets or sets the internal UsoTextField component that provides the text input functionality. This text field handles the actual text input, editing, and user interaction for the search field. | |
| string INotifyValueChanged< string >. | value [get, set] |
| Explicit implementation of the INotifyValueChanged<string>.value property. Provides standardized value access for Unity's binding and notification systems. | |
| string | value [get, set] |
| Gets or sets the current search value of the toolbar search field. Setting this property updates the internal text field without triggering change notifications. | |
Private Attributes | |
| string | _value |
| Private backing field for the search field's current value. Used to track the current search text and coordinate value changes between internal components. | |
A custom toolbar search field control that extends Unity's BindableElement with specialized search functionality and USO UI framework integration. Provides enhanced search capabilities, value change notifications, integrated clear functionality, and horizontal layout optimization for toolbar contexts.
This control implements the INotifyValueChanged<string> interface to provide standardized value change notification behavior. It combines a UsoTextField for text input with a UsoToolbarButton for clear functionality, creating a complete search experience. The control is specifically designed for toolbar integration with flexible layout properties, automatic sizing, and centered alignment. It features automatic value synchronization between the internal text field and the search field's value property, ensuring consistent state management and change notifications. The integrated clear button provides immediate search reset capability with appropriate styling and click handling for enhanced user experience within toolbar contexts. The control maintains USO framework styling consistency while providing specialized search field behavior.
| GWG.UsoUIElements.UsoToolbarSearchField.UsoToolbarSearchField | ( | ) |
Initializes a new instance of the UsoToolbarSearchField class with integrated text field and clear button functionality. Creates a complete search interface with horizontal layout, flexible sizing, and automatic value synchronization.
The constructor performs comprehensive setup including:
| void GWG.UsoUIElements.UsoToolbarSearchField.SetValueWithoutNotify | ( | string | newValue | ) |
Sets the search field's value without triggering value change notifications. This method provides direct value assignment for scenarios where change events should not be fired.
| newValue | The new search value to assign to the field. |
This method is useful for programmatic value updates where change notifications are not desired, such as during initialization, data loading, or when responding to external value changes. It ensures both the internal backing field and the text field display the correct value.
|
private |
Private backing field for the search field's current value. Used to track the current search text and coordinate value changes between internal components.
|
getset |
Gets or sets the internal UsoTextField component that provides the text input functionality. This text field handles the actual text input, editing, and user interaction for the search field.
The UsoTextField instance used for text input operations.
This property provides access to the underlying text field component for advanced configuration, event handling, or styling operations that may be needed beyond the standard search field functionality.
|
getsetprivate |
Explicit implementation of the INotifyValueChanged<string>.value property. Provides standardized value access for Unity's binding and notification systems.
The current search text value for binding and notification purposes.
This explicit interface implementation ensures compatibility with Unity's value change notification system while maintaining the public value property for direct access. The getter returns the current value, while the setter uses SetValueWithoutNotify to prevent notification loops.
|
getset |
Gets or sets the current search value of the toolbar search field. Setting this property updates the internal text field without triggering change notifications.
The current search text as a string.
This property provides the primary interface for getting and setting the search field's value. When setting the value, it uses SetValueWithoutNotify to prevent recursive change notifications while ensuring the internal text field displays the correct value.