Always snap to grid

UE3:UIComp_ListPresenterBase (UDK)

From Unreal Wiki, The Unreal Engine Documentation Site
Revision as of 06:48, 17 January 2010 by Wormbo (Talk | contribs) (1 revision: class descriptions for UDK January update (part 5))

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search
UDK Object >> Component >> UIComponent >> UIComp_ListComponentBase >> UIComp_ListPresenterBase
Package: 
Engine
Within class: 
UIList
Direct subclass:
UIComp_ListPresenter

Base class for components which handle list element rendering, formatting, and data management.

Resonsible for how the data associated with this list is presented. Updates the list's operating parameters (CellHeight, CellWidth, etc.) according to the presentation type for the data contained by this list.

Routes render messages from the list to the individual elements, adding any additional data necessary for the element to understand how to render itself. For example, a listdata component might add that the element being rendered is the currently selected element, so that the element can adjust the way it renders itself accordingly. For a tree-type list, the listdata component might add whether the element being drawn is currently open, has children, etc.

Properties[edit]

bReapplyFormatting[edit]

Type: bool

Modifiers: transient

set to indicate that the cells in this list needs to recalculate their extents

Structs[edit]

UIListItemDataBinding[edit]

Modifiers: native

UIListElementCellProvider DataSourceProvider 
The data provider that contains the data for this list element
name DataSourceTag 
The name of the field from DataSourceProvider that contains the array of data corresponding to this list element
int DataSourceIndex 
The index into the array [DataSourceTag] in DataSourceProvider that this list element represents.

Native functions[edit]

CalculateAutoSizeColumnWidth[edit]

native final noexportheader function CalculateAutoSizeColumnWidth (int ColIndex, out float out_ColWidth, out float out_StylePadding, optional bool bReturnUnformattedValue)

Wrapper for determining the optimal size of a single column in the list. Only relevant for lists which have a CellLinkType of LINKED_None or LINKED_Rows.

Parameters:

  • ColIndex - the index for the column to get the width for. If the index is invalid, returns the width of the list's schema cells instead, which do not necessarily use the same font.
  • out_ColWidth - receives the width of the column
  • out_StylePadding - receives the value for an optional padding amount applied by the cell's style.
  • 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.

Note: noexport because it is pure virtual natively

CalculateAutoSizeRowHeight[edit]

native final noexportheader function CalculateAutoSizeRowHeight (int RowIndex, out float out_RowHeight, out float out_StylePadding, optional bool bReturnUnformattedValue)

Wrapper for determining the optimal size of a single row in the list. Only relevant for lists which have a CellLinkType of LINKED_None or LINKED_Columns.

Parameters:

  • RowIndex - the index for the row to get the height for. If the index is invalid, returns the height of the list's schema cells instead, which do not necessarily use the same font.
  • out_RowHeight - receives the height of the row
  • out_StylePadding - receives the value for an optional padding amount applied by the cell's style.
  • 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.

Note: noexport because it is pure virtual natively

EnableColumnHeaderRendering[edit]

virtual native final function EnableColumnHeaderRendering (bool bShouldRenderColHeaders)

Changes whether this list renders colum headers or not. Only applicable if the owning list's CellLinkType is LINKED_Columns

GetCellSchemaProvider[edit]

native final function UIListElementCellProvider GetCellSchemaProvider () const

Returns the object that provides the cell schema for this component's owner list (usually the class default object for the class of the owning list's list element provider)

GetElementValue[edit]

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

Returns the text value for the specified element.

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.

Note: noexport because it is pure virtual natively

GetMaxElementsPerPage[edit]

native final noexportheader function int GetMaxElementsPerPage () const

Wrapper for retrieving the current value of MaxElementsPerPage

GetSchemaCellCount[edit]

native final noexportheader function int GetSchemaCellCount () const

Returns:

the number of cells in the list's schema

GetSchemaCellPosition[edit]

native final noexportheader function float GetSchemaCellPosition (int SchemaCellIndex) const

Retrieves the position of the left or top of the cell specified. For lists with linked columns, SchemaCellIndex would correspond to the column; for cells with linked rows, it would represent the row index.

Parameters:

  • SchemaCellIndex - the index of the schema cell to get the position for

Returns:

the position for the specified cell, in screen space absolute pixels relative to 0,0, or -1 if the cell index is invalid.

GetSchemaCellSize[edit]

native final noexport function float GetSchemaCellSize (int SchemaCellIndex, optional UIRoot.EUIExtentEvalType EvalType) const

Determine the size of the schema cell at the specified index.

Parameters:

  • SchemaCellIndex - the index of the schema cell to get the size for
  • EvalType - the desired format to return the size in.

Returns:

the size of the schema cell at the specified index in the desired format, or -1 if the index is invalid.

SetMaxElementsPerPage[edit]

native final noexportheader function SetMaxElementsPerPage (int NewMaxVisibleElements)

Wrapper for setting the maximum number of elements that will be displayed by the list at once.

Parameters:

  • NewMaxVisibleElements - the maximum number of elements to show at a time. 0 to disable.

SetSchemaCellSize[edit]

native final noexport function bool SetSchemaCellSize (int SchemaCellIndex, float NewCellSize, optional UIRoot.EUIExtentEvalType EvalType)

Change the size of the schema cell at the specified index.

Parameters:

  • SchemaCellIndex - the index of the schema cell to set the size for
  • NewCellSize - the new size for the cell
  • EvalType - indicates how to evalute the input value

Returns:

TRUE if the size was updated successfully; FALSE if the size was not changed or the index was invalid.

ShouldAdjustListBounds[edit]

native final function bool ShouldAdjustListBounds (UIRoot.EUIOrientation Orientation) const

Returns whether the list's bounds will be adjusted for the specified orientation considering the list's configured autosize and cell link type values.

Parameters:

  • Orientation - the orientation to check auto-sizing for

ShouldRenderColumnHeaders[edit]

virtual native final function bool ShouldRenderColumnHeaders () const

Returns whether this list should render column headers