Gah - a solution with more questions. – EntropicLqd

UE3:UIComp_ListElementSorter (UDK)

From Unreal Wiki, The Unreal Engine Documentation Site
Jump to: navigation, search
UDK Object >> Component >> UIComponent >> UIComp_ListComponentBase >> UIComp_ListElementSorter
Package: 
Engine
Within class: 
UIList
This class in other games:
UT3

Handles information about a collection of list elements are sorted. Responsible for invoking the UISortableItem on each element to allow the element to perform the comparison.

Properties[edit]

Property group 'Interaction'[edit]

bAllowCompoundSorting[edit]

Type: bool

Indicates whether sorting by multiple columns is allowed in this list

Default value: True

bReversePrimarySorting[edit]

Type: bool

indicates that the primary sort column should be sorted in reverse order

bReverseSecondarySorting[edit]

Type: bool

indicates that the secondary sort column should be sorted in reverse order

InitialSecondarySortColumn[edit]

Type: int

the index of the column (or row) to use for performing the initial secondary sorting of the list's elements when SecondarySortColumn is INDEX_NONE

Default value: -1

InitialSortColumn[edit]

Type: int

the index of the column (or row) to use for sorting the list's elements when SortColumn is INDEX_NONE

Default value: -1

PrimarySortColumn[edit]

Type: int

Modifiers: editconst, transient, const

the index of the column (or row) being used for sorting the list's items

Default value: -1

SecondarySortColumn[edit]

Type: int

Modifiers: editconst, transient, const

the index of the column (or row) of the previous SortColumn

Default value: -1

Structs[edit]

UIListSortingParameters[edit]

Modifiers: native, transient

Contains parameters for a list sorting operation.

int PrimaryIndex 
the index of the column/row that should be used for first-pass sorting
int SecondaryIndex 
the index of the column/row that should be used when first pass sorting encounters two identical elements
bool bReversePrimarySorting 
indicates that the elements should be sorted in reverse for first-pass
bool bReverseSecondarySorting 
indicates that the elements should be sorted in reverse for second-pass
bool bCaseSensitive 
indicates that sorting should be case sensitive
bool bIntSortPrimary 
indicates that the strings should be converted into integers for sorting purposes
bool bIntSortSecondary 
bool bFloatSortPrimary 
indicates that the strings should be converted into floats for sorting purposes
bool bFloatSortSecondary 

Delegates[edit]

OverrideListSort[edit]

delegate bool OverrideListSort (UIList Sender, name CollectionFieldName, const out UIListSortingParameters SortParameters, out array<intOrderedIndices)

Provides a hook for unrealscript to manage the sorting for this list.

Parameters:

  • Sender - the list that contains this sort component.
  • CollectionDataFieldName - the name of the collection data field corresponding to the list data being sorted.
  • SortParameters - the parameters to use for sorting PrimaryIndex: the index [into the list schema's array of cells] for the cell which the user desires to perform primary sorting with. SecondaryIndex: the index [into the list schema's array of cells] for the cell which the user desires to perform secondary sorting with. Not guaranteed to be a valid value; Comparison should be performed using the value of the field indicated by PrimarySortIndex, then when these values are identical, the value of the cell field indicated by SecondarySortIndex should be used.
  • OrderedIndices - receives the sorted list of indices for the owning list's Items array.

Returns:

TRUE to indicate that custom sorting was performed (or to prevent sorting). Custom sorting is not required; return FALSE to have the list use its default sorting method.

Native functions[edit]

ResetSortColumns[edit]

native final function ResetSortColumns (optional bool bResort)

Resets the PrimarySortColumn and SecondarySortColumn to the Initial* values.

Parameters:

  • bResort - specify TRUE to re-sort the list's elements after resetting the sort columns.

ResortItems[edit]

native final function bool ResortItems (optional bool bCaseSensitive)

Sorts the owning list's items without modifying any sorting parameters.

Parameters:

  • bCaseSensitive - specify TRUE to perform case-sensitive comparison

Returns:

TRUE if the items were sorted successfully.

SortItems[edit]

native final function bool SortItems (int ColumnIndex, optional bool bSecondarySort, optional bool bCaseSensitive)

Sorts the owning list's items using the parameters specified.

Parameters:

  • ColumnIndex - the column (when CellLinkType is LINKED_Columns) or row (when CellLinkType is LINKED_Rows) to use for sorting. Specify INDEX_NONE to clear sorting.
  • bSecondarySort - specify TRUE to set ColumnIndex as the SecondarySortColumn. If FALSE, resets the value of SecondarySortColumn
  • bCaseSensitive - specify TRUE to perform case-sensitive comparison

Returns:

TRUE if the items were sorted successfully.