The three virtues of a programmer: Laziness, Impatience, and Hubris. – Larry Wall

UE3:UIList native functions (UT3)

From Unreal Wiki, The Unreal Engine Documentation Site
Jump to: navigation, search
UT3 Object >> UIRoot >> UIScreenObject >> UIObject >> UIList (native functions)
UIList native functions in other games:
UDK

Native functions[edit]

CalculateIndexFromCursorLocation[edit]

native function int CalculateIndexFromCursorLocation (optional bool bRequireValidIndex) const

Calculates the index of the element under the mouse or joystick cursor

Parameters:

  • bRequireValidIndex - specify FALSE to return the calculated index, regardless of whether the index is valid or not. Useful for e.g. drag-n-drop operations where you want to drop at the end of the list.

Returns:

the index [into the Items array] for the element under the mouse/joystick cursor, or INDEX_NONE if the mouse is not over a valid element.

CanSelectElement[edit]

native final function bool CanSelectElement (int ElementIndex)

Determines whether the specified list element can be selected.

Parameters:

  • ElementIndex - the index into the Items array for the element to query

Returns:

true if the specified element can enter the ELEMENT_Selected state. FALSE if the index specified is invalid or cannot be selected.

ClearBoundDataStores[edit]

native final function ClearBoundDataStores ()

Specified by: UIDataStoreSubscriber.ClearBoundDataStores

Notifies this subscriber to unbind itself from all bound data stores

FindItemIndex[edit]

native final function int FindItemIndex (string ItemValue, optional int CellIndex) const

Finds the index for the element with the specified text.

Parameters:

  • StringValue - the value to find
  • CellIndex - for lists which have linked columns or rows, indicates which column/row to check

Returns:

the index [into the Items array] for the element with the specified value, or INDEX_NONE if not found.

GetBoundDataStores[edit]

native final virtual function GetBoundDataStores (out array<UIDataStoreout_BoundDataStores)

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.

GetClientRegion[edit]

native function Object.Vector2D GetClientRegion () const

Returns the width and height of the bounding region for rendering the cells, taking into account whether the scrollbar and column header are displayed.

GetColumnWidth[edit]

native final function float GetColumnWidth (optional int ColumnIndex, optional bool bColHeader, optional bool bReturnUnformattedValue) const

Returns the width of the specified column.

Parameters:

  • ColumnIndex - the index for the column to get the width for. If the index is invalid, the list's configured CellWidth is returned instead.
  • bColHeader - specify TRUE to apply HeaderCellPadding instead of CellPadding.
  • bReturnUnformattedValue - specify TRUE to return a value determined by the size of a typical character from the font applied to the cell; otherwise, uses the cell string's calculated StringExtent, which will include any scaling that has been applied.

GetCurrentItem[edit]

native final function int GetCurrentItem () const

Returns the value of the element associated with the current list index

Returns:

the value of the element at Index; this is not necessarily an index into the UIList.Items array; rather, it is the value of the UIList.Items element located at Index

GetDataStoreBinding[edit]

native final virtual function string GetDataStoreBinding (optional int BindingIndex) const

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>

GetElementValue[edit]

native final function string GetElementValue (int ElementIndex, optional int CellIndex) const

Returns the text value for the specified element. (temporary)

Parameters:

  • ElementIndex - index [into the Items array] for the value to return.
  • CellIndex - for lists which have linked columns or rows, indicates which column/row to retrieve.

Returns:

the value of the specified element, or an empty string if that element doesn't have a text value.

GetItemCount[edit]

native function int GetItemCount () const

Returns the number of elements in the list.

Returns:

the number of elements in the list

GetMaxNumVisibleColumns[edit]

native final function int GetMaxNumVisibleColumns () const

Returns the maximum number of columns that can be displayed in the list, given its current size and configuration.

GetMaxNumVisibleRows[edit]

native final function int GetMaxNumVisibleRows () const

Returns the maximum number of rows that can be displayed in the list, given its current size and configuration.

GetMaxVisibleElementCount[edit]

native function int GetMaxVisibleElementCount () const

Returns the maximum number of elements that can be displayed by the list given its current size and configuration.

GetResizeColumn[edit]

native noexport function int GetResizeColumn (optional out const CellHitDetectionInfo ClickedCell) const

If the mouse is over a column boundary, returns the index of the column that would be resized, or INDEX_NONE if the mouse is not hovering over a column boundary.

Parameters:

  • ClickedCell - will be filled with information about which cells the cursor is currently over

Returns:

if the cursor is within ResizeBufferPixels of a column boundary, the index of the column the left of the cursor; INDEX_NONE otherwise.

Note: noexport to allow the C++ version of this function to have a slightly different signature.

GetRowHeight[edit]

native virtual function float GetRowHeight (optional int RowIndex, optional bool bColHeader, optional bool bReturnUnformattedValue) const

Returns the width of the specified row.

Parameters:

  • RowIndex - the index for the row to get the width for. If the index is invalid, the list's configured RowHeight is returned instead.
  • bColHeader - specify TRUE to apply HeaderCellPadding instead of CellPadding.
  • bReturnUnformattedValue - specify TRUE to return a value determined by the size of a typical character from the font applied to the cell; otherwise, uses the cell string's calculated StringExtent, which will include any scaling that has been applied.

GetSelectedItems[edit]

native final function array<intGetSelectedItems () const

Returns the items that are currently selected.

Returns:

an array of values that represent indexes into the data source's data array for the list elements that are selected. these indexes are NOT indexes into the UIList.Items array; rather, they are the values of the UIList.Items elements which correspond to the selected items

GetTotalColumnCount[edit]

native final function int GetTotalColumnCount () const

Returns the total number of columns in this list.

GetTotalRowCount[edit]

native final function int GetTotalRowCount () const

Returns the total number of rows in this list.

IsElementAutoSizingEnabled[edit]

native final function bool IsElementAutoSizingEnabled () const

Returns whether element size is determined by the elements themselves. For lists with linked columns, returns whether the item height is autosized; for lists with linked rows, returns whether item width is autosized.

IsElementEnabled[edit]

native final function bool IsElementEnabled (int ElementIndex)

Determines whether the specified list element is disabled by the data source bound to this list.

Parameters:

  • ElementIndex - the index into the Items array for the element to retrieve the menu state for.

IsHotTrackingEnabled[edit]

native final function bool IsHotTrackingEnabled () const

Returns the value of bUpdateItemUnderCursor.

NotifyDataStoreValueUpdated[edit]

native final virtual function NotifyDataStoreValueUpdated (UIDataStore SourceDataStore, bool bValuesInvalidated, name PropertyTag, UIDataProvider SourceProvider, int ArrayIndex)

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[edit]

native final virtual function bool RefreshSubscriberValue (optional int BindingIndex)

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.

RemoveElement[edit]

native function int RemoveElement (int ElementToRemove)

Removes the specified element from the list.

Parameters:

  • ElementToRemove - the element to remove from the list

Returns:

the index [into the Items array] for the element that was removed, or INDEX_NONE if the element wasn't part of the list.

SaveSubscriberValue[edit]

native virtual function bool SaveSubscriberValue (out array<UIDataStoreout_BoundDataStores, optional int BindingIndex)

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.

ScrollVertical[edit]

native final function bool ScrollVertical (UIScrollbar Sender, float PositionChange, optional bool bPositionMaxed)

Handler for vertical scrolling activity PositionChange should be a number of nudge values by which the slider was moved The nudge value in the UIList slider is equal to one list Item.

Parameters:

  • Sender - the scrollbar that generated the event.
  • PositionChange - indicates how many items to scroll the list by
  • bPositionMaxed - indicates that the scrollbar's marker has reached its farthest available position, unused in this function

SetColumnCount[edit]

native final function SetColumnCount (int NewColumnCount)

Changes the list's ColumnCount to the value specified.

SetDataStoreBinding[edit]

native final virtual function SetDataStoreBinding (string MarkupText, optional int BindingIndex)

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.

SetHotTracking[edit]

native final function SetHotTracking (bool bShouldUpdateItemUnderCursor)

Change the value of bUpdateItemUnderCursor to the specified value.

SetIndex[edit]

native final virtual function bool SetIndex (int NewIndex, optional bool bClampValue, optional bool bSkipNotification)

Sets the list's index to the value specified and activates the appropriate notification events.

Parameters:

  • NewIndex - An index into the Items array that should become the new Index for the list.
  • bClampValue - if TRUE, NewIndex will be clamped to a valid value in the range of 0 -> ItemCount - 1
  • bSkipNotification - if TRUE, no events are generated as a result of updating the list's index.

Returns:

TRUE if the list's Index was successfully changed.

SetRowCount[edit]

native final function SetRowCount (int NewRowCount)

Changes the list's RowCount to the value specified.

SetTopIndex[edit]

native final virtual function bool SetTopIndex (int NewTopIndex, optional bool bClampValue)

Changes the list's first visible item to the element at the index specified.

Parameters:

  • NewTopIndex - an index into the Items array that should become the new first visible item.
  • bClampValue - if TRUE, NewTopIndex will be clamped to a valid value in the range of 0 - ItemCount - 1

Returns:

TRUE if the list's TopIndex was successfully changed.