I love the smell of UnrealEd crashing in the morning. – tarquin

UE3:UIObject native functions (UDK)

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

Native functions[edit]

AddStyleSubscriber[edit]

native final function AddStyleSubscriber (UIStyleResolver Subscriber)

Adds the specified StyleResolver to the list of StyleSubscribers

Parameters:

  • StyleSubscriberId - the name to associate with this UIStyleResolver; used for differentiating styles from multiple UIStyleResolvers of the same class
  • Subscriber - the UIStyleResolver to add.

CanAcceptFocus[edit]

native function bool CanAcceptFocus (optional int PlayerIndex, optional bool bIncludeParentVisibility) const

Overrides: UIScreenObject.CanAcceptFocus

Determines whether this widget can become the focused control. In the case of this widget we don't want it to gain focus.

Parameters:

  • PlayerIndex - the index [into the Engine.GamePlayers array] for the player to check focus availability
  • bIncludeParentVisibility - indicates whether the widget should consider the visibility of its parent widgets when determining whether it is eligible to receive focus. Only needed when building navigation networks, where the widget might start out hidden (such as UITabPanel).

Returns:

TRUE if this widget (or any of its children) is capable of becoming the focused control.

ClearDefaultDataBinding[edit]

native final function ClearDefaultDataBinding (int BindingIndex)

Clears the reference to the bound data store, if applicable.

Parameters:

  • BindingIndex - indicates which data store binding to operate on.

FindStyleSubscriberIndex[edit]

native final function int FindStyleSubscriberIndex (const out UIStyleResolver Subscriber)

Returns the index [into the StyleSubscriber's array] for the specified UIStyleResolver, or INDEX_NONE if Subscriber is NULL or is not found in the StyleSubscriber's array.

Parameters:

  • Subscriber - the subscriber to find
  • SubscriberId - if specified, it will only be considered a match if the SubscriberId associated with Subscriber matches this value.

FindStyleSubscriberIndexById[edit]

native final function int FindStyleSubscriberIndexById (name StyleSubscriberId)

Returns the index [into the StyleSubscriber's array] for the subscriber which has a StyleResolverTag that matches the specified value or INDEX_NONE if StyleSubscriberId is None or is not found in the StyleSubscriber's array.

Parameters:

  • StyleSubscriberId - the tag associated with the UIStyleResolver to find

GenerateSceneDataStoreMarkup[edit]

native function string GenerateSceneDataStoreMarkup (optional string Group) const

Generates a string which can be used to interact with temporary data in the scene data store specific to this widget.

Parameters:

  • Group - for now, doesn't matter, as only "ContextMenuItems" is supported

Returns:

a data store markup string which can be used to reference content specific to this widget in the scene's data store.

GenerateTransformMatrix[edit]

native final function Object.Matrix GenerateTransformMatrix (optional bool bIncludeParentTransforms) const

Generates a matrix which contains a translation for this widget's position (from 0,0 screen space) as well as the widget's current rotation, scale, etc.

Parameters:

  • bIncludeParentTransforms - if TRUE, the matrix will be relative to the parent widget's own transform matrix.

Returns:

a matrix containing the translation and rotation values of this widget.

Todo: ronp - we REALLY need to cache this baby and update it any time the widget's position, anchor, rotation, scale, or parent changes.

GetAnchorPosition[edit]

native final function Object.Vector GetAnchorPosition (optional bool bRelativeToWidget, optional bool bPixelSpace) const

Returns the current location of the anchor.

Parameters:

  • bRelativeToWidget - specify TRUE to return the anchor position relative to the widget's upper left corner. specify FALSE to return the anchor position relative to the viewport's origin.
  • bPixelSpace - specify TRUE to convert the anchor position into pixel space (only relevant if the widget is rotated)

Returns:

a vector representing the position of this widget's rotation anchor.

GetDefaultDataBinding[edit]

native final function string GetDefaultDataBinding (int BindingIndex) const

Returns the data binding's current value.

Parameters:

  • BindingIndex - indicates which data store binding to operate on.

GetDefaultDataStores[edit]

native final function GetDefaultDataStores (out array<UIDataStoreout_BoundDataStores)

Returns the data store providing the data for all default data bindings.

GetDockParameters[edit]

native final function bool GetDockParameters (UIRoot.EUIWidgetFace SourceFace, out UIScreenObject TargetWidget, out UIRoot.EUIWidgetFace TargetFace, out float TargetPadding) const

Retrieves the docking parameters for the specified face.

Parameters:

  • SourceFace - the face to retrieve docking parameters for
  • TargetWidget - receives the target widget value of the docking link for the specified face
  • TargetFace - receives the target face value of the docking link for the specified face
  • TargetPadding - receives the padding value of the docking link for the specified face.

Returns:

TRUE if the widget is docked on the specified face; FALSE otherwise.

GetPositionExtent[edit]

native final function float GetPositionExtent (UIRoot.EUIWidgetFace Face, optional bool bIncludeRotation, optional bool bIncludeOrigin) const

Gets the minimum or maximum value for the specified widget face position after rotation has been applied.

Parameters:

  • Face - the face to get the position for.
  • bIncludeRotation - Indicates whether the widget's rotation should be applied to the extent values.
  • bIncludeOrigin - specify TRUE to indicate that the viewport's origin should be included in the result (for retrieving absolute screen locations)

GetPositionExtents[edit]

native final function GetPositionExtents (out float MinX, out float MaxX, out float MinY, out float MaxY, optional bool bIncludeRotation, optional bool bIncludeOrigin) const

Gets the minimum and maximum values for the widget's face positions after rotation (if specified) has been applied.

Parameters:

  • MinX - The minimum x position of this widget.
  • MaxX - The maximum x position of this widget.
  • MinY - The minimum y position of this widget.
  • MaxY - The maximum y position of this widget.
  • bIncludeRotation - Indicates whether the widget's rotation should be applied to the extent values.
  • bIncludeOrigin - specify TRUE to indicate that the viewport's origin should be included in the result (for retrieving absolute screen locations)

GetRotationMatrix[edit]

native final function Object.Matrix GetRotationMatrix (optional bool bIncludeParentRotations) const

Returns this widget's current rotation matrix

Parameters:

  • bIncludeParentRotations - if TRUE, the matrix will be relative to the parent widget's own rotation matrix.

GetToolTipValue[edit]

native final function string GetToolTipValue ()

Returns the ToolTip data binding's current value after being resolved.

HasTransform[edit]

native final function bool HasTransform (optional bool bIncludeParentTransforms) const

Determines whether this widget has any tranformation applied to it.

Parameters:

  • bIncludeParentTransforms - specify TRUE to check whether this widget's parents are transformed if this one isn't.

IsContainedBy[edit]

native final function bool IsContainedBy (UIObject TestWidget)

Returns TRUE if TestWidget is in this widget's Owner chain.

IsDockedTo[edit]

native final function bool IsDockedTo (const UIScreenObject TargetWidget, optional UIRoot.EUIWidgetFace SourceFace, optional UIRoot.EUIWidgetFace TargetFace) const

Returns TRUE if this widget is docked to the specified widget.

Parameters:

  • TargetWidget - the widget to check for docking links to
  • SourceFace - if specified, returns TRUE only if the specified face is docked to TargetWidget
  • TargetFace - if specified, returns TRUE only if this widget is docked to the specified face on the target widget.

IsPrivateBehaviorSet[edit]

native final function bool IsPrivateBehaviorSet (int Behavior) const

Checks to see if the specified private behavior is set. Valid behavior flags are defined in UIRoot.uc, as consts which begin with PRIVATE_

Parameters:

  • Behavior - the flag of the private behavior that is being checked

Returns:

TRUE if the specified flag is set and FALSE if not.

NeedsActiveCursorUpdates[edit]

native final function bool NeedsActiveCursorUpdates () const

Returns the value of bEnableActiveCursorUpdates

NotifyValueChanged[edit]

native function NotifyValueChanged (optional int PlayerIndex, optional int NotifyFlags)

Called whenever the value of the UIObject is modified (for those UIObjects which can have values). Calls the OnValueChanged delegate.

Parameters:

  • 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.
  • NotifyFlags - optional parameter for individual widgets to use for passing additional information about the notification.

RemoveStyleSubscriber[edit]

native final function RemoveStyleSubscriber (UIStyleResolver Subscriber)

Removes the specified StyleResolver from the list of StyleSubscribers.

Parameters:

  • Subscriber - the subscriber to remove
  • SubscriberId - if specified, Subscriber will only be removed if its SubscriberId matches this value.

ResolveDefaultDataBinding[edit]

native final function bool ResolveDefaultDataBinding (int BindingIndex)

Resolves the data binding's markup string.

Parameters:

  • BindingIndex - indicates which data store binding to operate on.

Returns:

TRUE if a data store field was successfully resolved from the data binding

RotateWidget[edit]

native final function RotateWidget (Object.Rotator NewRotationAmount, optional bool bAccumulateRotation)

Rotates the widget around the current anchor position by the amount specified.

Parameters:

  • RotationDelta - amount to rotate the widget by in DEGREES.
  • bAccumulateRotation - if FALSE, set the widget's rotation to NewRotationAmount; if TRUE, increments the widget's rotation by NewRotationAmount

SetActiveCursorUpdate[edit]

native function SetActiveCursorUpdate (bool bShouldReceiveCursorUpdates)

Change the value of bEnableActiveCursorUpdates to the specified value.

SetAnchorPosition[edit]

native final function SetAnchorPosition (Object.Vector NewAnchorPosition, optional UIRoot.EPositionEvalType InputType)

Sets the location of the widget's rotation anchor, relative to the top-left of this widget's bounds.

Parameters:

  • AnchorPosition - New location for the widget's rotation anchor.
  • InputType - indicates which format the AnchorPos value is in

SetDefaultDataBinding[edit]

native final function SetDefaultDataBinding (string MarkupText, int BindingIndex)

Set the markup text for a default data binding to the value specified.

Parameters:

  • NewMarkupText - the new markup text for this widget, either a literal string or a data store markup string
  • BindingIndex - indicates which data store binding to operate on.

SetDockPadding[edit]

native function bool SetDockPadding (UIRoot.EUIWidgetFace SourceFace, float PaddingValue, optional UIRoot.EUIDockPaddingEvalType PaddingInputType, optional bool bModifyPaddingScaleType)

Sets the padding for the specified docking link.

Parameters:

  • SourceFace - the face of this widget to apply the changes to
  • Padding - the amount of padding to use for this docking set. Positive values will "push" this widget past the target face of the other widget, while negative values will "pull" this widget away from the target widget.
  • PaddingInputType - specifies how the Padding value should be interpreted.
  • bModifyPaddingScaleType - specify TRUE to change the DockPadding's ScaleType to the PaddingInputType.

Returns:

TRUE if the changes were successfully applied.

SetDockParameters[edit]

native final function bool SetDockParameters (UIRoot.EUIWidgetFace SourceFace, UIScreenObject Target, UIRoot.EUIWidgetFace TargetFace, float PaddingValue, optional UIRoot.EUIDockPaddingEvalType PaddingInputType, optional bool bModifyPaddingScaleType)

Combines SetDockTarget and SetDockPadding into a single function.

Parameters:

  • SourceFace - the face of this widget to apply the changes to
  • Target - the widget to dock to
  • TargetFace - the face on the Target widget that SourceFace will dock to
  • Padding - the amount of padding to use for this docking set. Positive values will "push" this widget past the target face of the other widget, while negative values will "pull" this widget away from the target widget.
  • PaddingInputType - specifies how the Padding value should be interpreted.
  • bModifyPaddingScaleType - specify TRUE to change the DockPadding's ScaleType to the PaddingInputType.

Returns:

TRUE if the changes were successfully applied.

SetDockTarget[edit]

native function bool SetDockTarget (UIRoot.EUIWidgetFace SourceFace, UIScreenObject Target, UIRoot.EUIWidgetFace TargetFace)

Sets the docking target for the specified face.

Parameters:

  • SourceFace - the face of this widget to apply the changes to
  • Target - the widget to dock to
  • TargetFace - the face on the Target widget that SourceFace will dock to

Returns:

TRUE if the changes were successfully applied.

SetForcedNavigationTarget[edit]

native final function bool SetForcedNavigationTarget (UIRoot.EUIWidgetFace Face, UIObject NavTarget, bool bIsNullOverride)

Sets the designer-specified navigation target for the specified face. When navigation links for the scene are rebuilt, the designer-specified navigation target will always override any auto-calculated targets. If the new value is different from the current value, requests the owning scene to update the navigation links for the entire scene.

Parameters:

  • Face - the face to set the navigation link for
  • NavTarget - the widget to set as the link for the specified face
  • bIsNullOverride - if NavTarget is NULL, specify TRUE to indicate that this face's nav target should not be automatically calculated.

Returns:

TRUE if the nav link was successfully set.

SetNavigationTarget[edit]

native final function bool SetNavigationTarget (UIRoot.EUIWidgetFace Face, UIObject NewNavTarget)

Sets the actual navigation target for the specified face. If the new value is different from the current value, requests the owning scene to update the navigation links for the entire scene.

Parameters:

  • Face - the face to set the navigation link for
  • NewNavTarget - the widget to set as the link for the specified face

Returns:

TRUE if the nav link was successfully set.

SetPrivateBehavior[edit]

native final function SetPrivateBehavior (int Behavior, bool Value, optional bool bRecurse)

Set the specified private behavior for this UIObject. Valid behavior flags are defined in UIRoot.uc, as consts which begin with PRIVATE_

Parameters:

  • Behavior - the flag of the private behavior that is being set
  • Value - whether the flag is being enabled or disabled
  • bRecurse - specify TRUE to apply the flag in all children of this widget as well.

SetWidgetStyleByName[edit]

native final function bool SetWidgetStyleByName (name StyleResolverTagToSet, name StyleFriendlyName)

Sets a style in the widget using the name of the style.

Parameters:

  • StyleResolverTagToSet - the tag associated with the UIStyleResolver to set
  • StyleFriendlyName - the name of the style to set the widget to

Returns:

TRUE if the style was successfully applied to this widget

UpdateRotationMatrix[edit]

native final function UpdateRotationMatrix ()

Updates the widget's rotation matrix based on the widget's current rotation.