UE3:UIEditBox (UDK)
Object >> UIRoot >> UIScreenObject >> UIObject >> UIEditBox |
- Package:
- Engine
- Implemented interfaces:
- UIDataStorePublisher
- Known classes within UIEditBox:
- UIComp_DrawStringEditbox, UIEditboxString
- Direct subclasses:
- UINumericEditBox, UTUIEditBox
- This class in other games:
This is an auto-generated page and may need human attention. Please remove the {{autogenerated}} tag if the page seems reasonably complete or replace it with the {{expand}} tag if the page is not yet complete. |
This basic widget allows the user to type text into an input field.
Todo: add property to control whether change notifications are sent while the user is typing text (vs. only when the user presses enter or something).
Properties
Property group 'Components'
BackgroundImageComponent
Type: UIComp_DrawImage
Modifiers: editinline, const
Component for rendering the background image
Default value: UIComp_DrawImage'EditboxBackgroundTemplate'
StringRenderComponent
Type: UIComp_DrawStringEditbox
Modifiers: editinline, const, noclear
Renders the text for this editbox
Default value: UIComp_DrawStringEditbox'EditboxStringRenderer'
Property group 'Data'
bPasswordMode
Type: bool
If enabled, the * character will be rendered instead of the actual text.
bReadOnly
Type: bool
Modifiers: private
specifies whether the text in this editbox can be changed by user input
CharacterSet
Type: UIRoot.EEditBoxCharacterSet
Controls which type of characters are allowed in this editbox
DataSource
Type: UIRoot.UIDataStoreBinding
Modifiers: private
The name of the data source that this editbox's value will be associated with.
Todo: explain this a bit more
InitialValue
Type: string
Modifiers: localized
The initial value to display in the editbox's text field
Default value: "Initial Editbox Value"
MaxCharacters
Type: int
the maximum number of characters that can be entered into the editbox
Default values
Property | Value | ||||||
---|---|---|---|---|---|---|---|
bSupportsPrimaryStyle | False | ||||||
DefaultStates[2] | Class'Engine.UIState_Focused' | ||||||
DefaultStates[3] | Class'Engine.UIState_Active' | ||||||
DefaultStates[4] | Class'Engine.UIState_Pressed' | ||||||
PrimaryStyle |
|
Subobjects
EditboxBackgroundTemplate
Class: Engine.UIComp_DrawImage
Property | Value |
---|---|
StyleResolverTag | 'Background Image Style' |
EditboxStringRenderer
Class: Engine.UIComp_DrawStringEditbox
Property | Value | ||||
---|---|---|---|---|---|
bIgnoreMarkup | True | ||||
StringCaret |
|
WidgetEventComponent
Class: Engine.UIComp_Event
Inherits from: UIObject.WidgetEventComponent
No new values.
Delegates
OnSubmitText
Called when the user presses enter (or any other action bound to UIKey_SubmitText) while this editbox has focus.
Parameters:
- Sender - the editbox that is submitting text
- PlayerIndex - the index of the player that generated the call to SetValue; used as the PlayerIndex when activating UIEvents; if not specified, the value of GetBestPlayerIndex() is used instead.
Returns:
- if TRUE, the editbox will clear the existing value of its textbox.
Functions
Native functions
CalculateCaretPositionFromCursorLocation
Calculates the character position for the point under the mouse or joystick cursor
Parameters:
- PlayerIndex - the index of the player that generated the call to this method; if not specified, the value of GetBestPlayerIndex() is used instead.
Returns:
- the index into the editbox's value string for character under the mouse/joystick cursor. If the cursor is within the "client region" of the editbox but not over a character (for example, if the string is very short and the mouse is hovering towards the right side of the region), then the length of the editbox's value string is returend. Otherwise, returns INDEX_NONE,
ClearBoundDataStores
Specified by: UIDataStoreSubscriber.ClearBoundDataStores
Notifies this subscriber to unbind itself from all bound data stores
GetBoundDataStores
Specified by: UIDataStoreSubscriber.GetBoundDataStores
Retrieves the list of data stores bound by this subscriber.
Parameters:
- out_BoundDataStores - receives the array of data stores that subscriber is bound to.
GetDataStoreBinding
Specified by: UIDataStoreSubscriber.GetDataStoreBinding
Retrieves the markup string corresponding to the data store that this object is bound to.
Parameters:
- BindingIndex - optional parameter for indicating which data store binding is being requested for those objects which have multiple data store bindings. How this parameter is used is up to the class which implements this interface, but typically the "primary" data store will be index 0.
Returns:
- a datastore markup string which resolves to the datastore field that this object is bound to, in the format: <DataStoreTag:DataFieldTag>
GetValue
Gets the text that is currently in this editbox
Parameters:
- bReturnUserText - if TRUE, returns the text typed into the editbox by the user; if FALSE, returns the resolved value of this editbox's data store binding.
NotifyDataStoreValueUpdated
Specified by: UIDataStoreSubscriber.NotifyDataStoreValueUpdated
Handler for the UIDataStore.OnDataStoreValueUpdated delegate. Used by data stores to indicate that some data provided by the data has changed. Subscribers should use this function to refresh any data store values being displayed with the updated value. notify subscribers when they should refresh their values from this data store.
Parameters:
- SourceDataStore - the data store that generated the refresh notification; useful for subscribers with multiple data store bindings, to tell which data store sent the notification.
- PropertyTag - the tag associated with the data field that was updated; Subscribers can use this tag to determine whether there is any need to refresh their data values.
- SourceProvider - for data stores which contain nested providers, the provider that contains the data which changed.
- ArrayIndex - for collection fields, indicates which element was changed. value of INDEX_NONE indicates not an array or that the entire array was updated.
RefreshSubscriberValue
Specified by: UIDataStoreSubscriber.RefreshSubscriberValue
Resolves this subscriber's data store binding and updates the subscriber with the current value from the data store.
Returns:
- TRUE if this subscriber successfully resolved and applied the updated value.
SaveSubscriberValue
Specified by: UIDataStorePublisher.SaveSubscriberValue
Resolves this subscriber's data store binding and publishes this subscriber's value to the appropriate data store.
Parameters:
- out_BoundDataStores - contains the array of data stores that widgets have saved values to. Each widget that implements this method should add its resolved data store to this array after data values have been published. Once SaveSubscriberValue has been called on all widgets in a scene, OnCommit will be called on all data stores in this array.
- BindingIndex - optional parameter for indicating which data store binding is being requested for those objects which have multiple data store bindings. How this parameter is used is up to the class which implements this interface, but typically the "primary" data store will be index 0.
Returns:
- TRUE if the value was successfully published to the data store.
SetDataStoreBinding
Specified by: UIDataStoreSubscriber.SetDataStoreBinding
Sets the data store binding for this object to the text specified.
Parameters:
- MarkupText - a markup string which resolves to data exposed by a data store. The expected format is: <DataStoreTag:DataFieldTag>
- BindingIndex - optional parameter for indicating which data store binding is being requested for those objects which have multiple data store bindings. How this parameter is used is up to the class which implements this interface, but typically the "primary" data store will be index 0.
SetValue
Change the value of this editbox at runtime.
Parameters:
- NewText - the new text that should be displayed in the label
- PlayerIndex - the index of the player that generated the call to SetValue; used as the PlayerIndex when activating UIEvents
- bSkipNotification - specify TRUE to prevent the OnValueChanged delegate from being called.
Events
Initialized
Overrides: UIScreenObject.Initialized
Called once this screen object has been completely initialized, before it has activated its InitialState or called Initialize on its children. This event is only called the first time a widget is initialized. If reparented, for example, the widget would already be initialized so the Initialized event would not be called.
Other instance functions
IgnoreMarkup
Changes whether this editbox's string should process markup
Parameters:
- bShouldIgnoreMarkup - if TRUE, markup will not be processed by this editbox's string
Note: does not update any existing text contained by the editbox.
IsReadOnly
Returns:
- TRUE if this editbox is readonly
SetBackgroundImage
Changes the background image for this editbox.
Parameters:
- NewImage - the new surface to use for this UIImage
SetReadOnly
Changes whether this editbox is read-only.
Parameters:
- bShouldBeReadOnly - TRUE if the editbox should be read-only.