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

UE3:UIScrollFrame (UT3)

From Unreal Wiki, The Unreal Engine Documentation Site
Jump to: navigation, search
UT3 Object >> UIRoot >> UIScreenObject >> UIObject >> UIContainer >> UIScrollFrame
Package: 
Engine
Direct subclass:
UTUIStatsList
This class in other games:
UDK

This widget defines a region in which its child widgets can be placed. If any of its children lay outside of its defined region then a scroll bar will be made visible to allow the region to be scrolled to the outside widgets.

Copyright 1998-2007 Epic Games, Inc. All Rights Reserved

Properties[edit]

Property group 'Image'[edit]

StaticBackgroundImage[edit]

Type: UIComp_DrawImage

Modifiers: editinline, const

Component for rendering the background image. If given a value, this image will not move when the user scrolls, whereas the background image for the client panel will.

Property group 'UIScrollFrame'[edit]

HorizontalClientRegion[edit]

Type: UIRoot.UIScreenValue_Extent

Modifiers: editinline, editconst, private, transient

The horizontal extent of the region which contains this widget's children. If this region is greater than the horizontal extent of this scrollframe, the horizontal scrollbar will be made visible.

VerticalClientRegion[edit]

Type: UIRoot.UIScreenValue_Extent

Modifiers: editinline, editconst, private, transient

The vertical extent of the region which contains this widget's children. If this region is greater than the vertical extent of this scrollframe, the vertical scrollbar will be made visible.

Default value:

Member Value
Orientation UIORIENT_Vertical

Internal variables[edit]

bRecalculateClientRegion[edit]

Type: bool

Modifiers: private, const, transient

indicates that the client region is out of date and needs to be recalculated

bRefreshScrollbars[edit]

Type: bool

Modifiers: private, const, transient

indicates when the scrollbars need to be updated

ClientRegionPosition[edit]

Type: Object.Vector2D

Modifiers: private, transient

Represents the position of the client region with respect to this scrollframe. Values are from 0.0 - 1.0, where 0,0 means that the top-left of the client region is at the top-left corner of this widget, and a value of 1,1 means that the bottom-right of the client region is at the top-left corner of this widget.

FrameBounds[edit]

Type: float

Array size: 4 (EUIWidgetFace.UIFACE_MAX)

Modifiers: private, transient

caches the value of the frame's bounding region extent (includes any rotation)

ScrollbarHorizontal[edit]

Type: UIScrollbar

Modifiers: duplicatetransient, const, private

A scrollbar widget that allows the entire RegionExtent to be scrolled to for the horizontal dimension.

Default value: UIScrollbar'Engine.Default__UIScrollFrame:HorzScrollbarTemplate'

ScrollbarVertical[edit]

Type: UIScrollbar

Modifiers: duplicatetransient, const, private

A scrollbar widget that allows the entire RegionExtent to be scrolled to for the horizontal dimension.

Default value: UIScrollbar'Engine.Default__UIScrollFrame:VertScrollbarTemplate'

Default values[edit]

Property Value
bSupportsPrimaryStyle False
PrimaryStyle
Member Value
DefaultStyleTag 'DefaultImageStyle'
RequiredStyleClass Class'Engine.UIStyle_Image'

Subobjects[edit]

WidgetEventComponent[edit]

Class: Engine.UIComp_Event

Inherits from: UIContainer.WidgetEventComponent

No new values.

Functions[edit]

Native functions[edit]

GetClientRegionPosition[edit]

native final function float GetClientRegionPosition (UIRoot.EUIOrientation Orientation) const

Gets the position of either the left or top side of the client region.

Parameters:

  • Orientation - specify UIORIENT_Horizontal to retrieve the position of the left side; specify UIORIENT_Vertical to retrieve the position of the top side.

Returns:

the position of the client region, in canvas coordinates relative to the top left corner of this widget.

GetClientRegionPositionVector[edit]

native final function Object.Vector2D GetClientRegionPositionVector () const

Gets the position of the upper-left corner of the client region.

Returns:

the position of the client region, in canvas coordinates relative to the top left corner of this widget.

GetClientRegionSize[edit]

native final function float GetClientRegionSize (UIRoot.EUIOrientation Orientation) const

Returns the size of a single orientation of the client region, in pixels.

Parameters:

  • Orientation - specify UIORIENT_Horizontal to retrieve the width of the client region or UIORIENT_Vertical to get the height of the client region.

Returns:

the width or height of the client region, in pixels.

GetClientRegionSizeVector[edit]

native final function Object.Vector2D GetClientRegionSizeVector () const

Returns the size of the client region, in pixels.

Returns:

the size of the client region, in pixels.

GetClipRegion[edit]

native function GetClipRegion (out float MinX, out float MinY, out float MaxX, out float MaxY) const

Returns a vector containing the size of the region (in pixels) available for rendering inside this scrollframe, taking account whether the scrollbars are visible.

GetVisibleRegionPercentage[edit]

native final function float GetVisibleRegionPercentage (UIRoot.EUIOrientation Orientation) const

Returns the percentage of the client region that is visible within the scrollframe's bounds.

Parameters:

  • Orientation - specifies whether to return the vertical or horizontal percentage.

Returns:

a value from 0.0 to 1.0 representing the percentage of the client region that can be visible at once.

ReapplyFormatting[edit]

native final function ReapplyFormatting (optional bool bImmediately)

Sets the flag indicating that the client region needs to be recalculated. Does not necessarily trigger a scene update.

Parameters:

  • bImmediately - specify TRUE to immediately recalculate the client region instead of batching up and waiting until the next scene update.

RefreshScrollbars[edit]

native final function RefreshScrollbars (optional bool bImmediately)

Sets the flag indicating that the scrollbars need to be re-resolved. Does not necessarily trigger a scene update.

Parameters:

  • bImmediately - specify TRUE to resolve the scrollbars immediately instead of batching until the next scene update.

ScrollRegion[edit]

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

Scrolls all of the child widgets by the specified amount in the specified direction.

Parameters:

  • Sender - the scrollbar that generated the event.
  • PositionChange - indicates the amount that the scrollbar has travelled.
  • bPositionMaxed - indicates that the scrollbar's marker has reached its farthest available position, used to achieve pixel exact scrolling

SetClientRegionPosition[edit]

native final function bool SetClientRegionPosition (UIRoot.EUIOrientation Orientation, float NewPosition)

Changes the position of the client region and synchronizes the scrollbars to the new position.

Parameters:

  • Orientation - specify UIORIENT_Horizontal to set the position of the left side; specify UIORIENT_Vertical to set the position of the top side.
  • NewPosition - the position to move the client region to, in pixels.

Returns:

TRUE if the client region was moved successfully.

SetClientRegionPositionVector[edit]

native final function bool SetClientRegionPositionVector (Object.Vector2D NewPosition)

Changes the position of the client region and synchronizes the scrollbars to the new position.

Parameters:

  • NewPosition - the position to move the client region to, in pixels.

Returns:

TRUE if the client region was moved successfully.

Events[edit]

AddedChild[edit]

event AddedChild (UIScreenObject WidgetOwner, UIObject NewChild)

Overrides: UIScreenObject.AddedChild

Called immediately after a child has been added to this screen object. Sets up NotifyPositionChanged delegate in the added child

Parameters:

  • WidgetOwner - the screen object that the NewChild was added as a child for
  • NewChild - the widget that was added

RemovedChild[edit]

event RemovedChild (UIScreenObject WidgetOwner, UIObject OldChild, optional array<UIObjectExclusionSet)

Overrides: UIScreenObject.RemovedChild

Called immediately after a child has been removed from this screen object. Clears the NotifyPositionChanged delegate in the removed child

Parameters:

  • WidgetOwner - the screen object that the widget was removed from.
  • OldChild - the widget that was removed
  • ExclusionSet - used to indicate that multiple widgets are being removed in one batch; useful for preventing references between the widgets being removed from being severed. NOTE: If a value is specified, OldChild will ALWAYS be part of the ExclusionSet, since it is being removed.

ScrollZoneClicked[edit]

private event ScrollZoneClicked (UIScrollbar Sender, float PositionPerc, int PlayerIndex)

Handler for the scrollbars' OnClickedScrollZone delegate. Scrolls the client region by a full page.

Parameters:

  • Sender - the scrollbar that was clicked.
  • PositionPerc - a value from 0.0 - 1.0, representing the location of the click within the region between the increment and decrement buttons. Values closer to 0.0 means that the user clicked near the decrement button; values closer to 1.0 are nearer the increment button.
  • PlayerIndex - index of the player that generated the scrollzone click.

Other instance functions[edit]

OnApplyScrolling[edit]

function OnApplyScrolling (UIAction_ApplyScrolling Action)

Handler for the ApplyScrolling action.

OnChildRepositioned[edit]

final function OnChildRepositioned (UIScreenObject Sender)

Handler for NotifyPositionChanged delegate for children of this panel. Sets the flag indicating that the panel should recalculate the client region.

Parameters:

  • Sender - Child widget which has been repositioned