engine
 
载入中...
搜索中...
未找到
类 | Public 成员函数 | 静态 Public 成员函数 | Public 属性 | Protected 成员函数 | Protected 属性 | 所有成员列表
SWindow类 参考

SWindow is a platform-agnostic representation of a top-level window. 更多...

#include <SWindow.h>

+ 类 SWindow 继承关系图:

类

struct  FMorpher
 Utility for animating the window size. 更多...
 

Public 成员函数

bool AcceptsInput () const
 
FArguments & ActivateWhenFirstShown (bool bActivateWhenFirstShown)
 Type of this window 更多...
 
EWindowActivationPolicy ActivationPolicy () const
 
void AddChildWindow (const TSharedRef< SWindow > &ChildWindow)
 Add ChildWindow as this window's child
 
SOverlay::FOverlaySlot & AddOverlaySlot (const int32 ZOrder=INDEX_NONE)
 Adds content to draw on top of the entire window 更多...
 
struct FPopupLayerSlot & AddPopupLayerSlot ()
 Return a new slot in the popup layer. 更多...
 
virtual bool Advanced_IsWindow () const override
 Is this widget derivative of SWindow
 
bool AppearsInTaskbar () const
 
void BeginFullWindowOverlayTransition ()
 Begins a transition from showing regular window content to overlay content During the transition we show both sets of content
 
void BringToFront (bool bForce=false)
 Bring the window to the front 更多...
 
void DestroyWindowImmediately ()
 Warning: use Request Destroy Window whenever possible! This method destroys the window immediately!
 
void DrawAttention (const FWindowDrawAttentionParameters &Parameters)
 Attempts to draw the user's attention to this window in whatever way is appropriate for the platform if this window is not the current active 更多...
 
void EnableWindow (bool bEnable)
 Enables or disables this window and all of its children 更多...
 
void EndFullWindowOverlayTransition ()
 Ends a transition from showing regular window content to overlay content When this is called content occluded by the full window overlay(if there is one) will be physically hidden
 
void FlashWindow ()
 Flashed the window, used for drawing attention to modal dialogs
 
TArray< TSharedRef< SWindow > > & GetChildWindows ()
 
const TArray< TSharedRef< SWindow > > & GetChildWindows () const
 
FSlateRect GetClientRectInScreen () const
 
FVector2D GetClientSizeInScreen () const
 
FSlateRect GetClippingRectangleInWindow () const
 
TSharedRef< const SWidget > GetContent () const
 Gets the widget content for this window 更多...
 
int32 GetCornerRadius ()
 
EWindowZone::Type GetCurrentWindowZone (FVector2D LocalMousePosition)
 Gets the current Window Zone that mouse position is over.
 
FVector2D GetDesiredSizeDesktopPixels () const
 
float GetDPIScaleFactor () const
 Returns the DPI scale factor of the native window
 
int32 GetExpectedMaxHeight () const
 
int32 GetExpectedMaxWidth () const
 
FSlateRect GetFullScreenInfo () const
 Returns the rectangle of the screen the window is associated with
 
FHittestGrid & GetHittestGrid ()
 Access the hittest acceleration data structure for this window. 更多...
 
FVector2D GetInitialDesiredPositionInScreen () const
 
FVector2D GetInitialDesiredSizeInScreen () const
 
FSlateLayoutTransform GetLocalToScreenTransform () const
 
FSlateLayoutTransform GetLocalToWindowTransform () const
 
FVector2D GetMorphTargetPosition () const
 
FSlateRect GetMorphTargetShape () const
 
FSlateRect GetNonMaximizedRectInScreen () const
 
FMargin GetNonMaximizedWindowBorderSize () const
 Returns the margins used for the window border if it's not maximized
 
FOnWindowActivatedEvent & GetOnWindowActivatedEvent ()
 Gets the multicast delegate executed when the window is deactivated
 
FOnWindowClosedEvent & GetOnWindowClosedEvent ()
 Gets the multicast delegate to execute right before the window is closed
 
FOnWindowDeactivatedEvent & GetOnWindowDeactivatedEvent ()
 Gets the multicast delegate executed when the window is deactivated
 
float GetOpacity () const
 
TSharedPtr< SWindow > GetParentWindow () const
 
FVector2D GetPositionInScreen () const
 
FSlateRect GetRectInScreen () const
 
FVector2D GetSizeInScreen () const
 
FWindowSizeLimits GetSizeLimits () const
 Optional constraints on min and max sizes that this window can be.
 
FText GetTitle () const
 Grabs the current window title 更多...
 
FOptionalSize GetTitleBarSize () const
 Returns the size of the title bar as a Slate size parameter. 更多...
 
TSharedPtr< SWindow > GetTopmostAncestor ()
 Look up the parent chain until we find the top-level window that owns this window
 
EWindowTransparency GetTransparencySupport () const
 
EWindowType GetType () const
 Grabs the window type 更多...
 
FVector2D GetViewportSize () const
 Returns the viewport size, taking into consideration if the window size should drive the viewport size
 
FMargin GetWindowBorderSize (bool bIncTitleBar=false) const
 Returns the margins used for the window border. 更多...
 
FGeometry GetWindowGeometryInScreen () const
 Get the Geometry that describes this window. 更多...
 
FGeometry GetWindowGeometryInWindow () const
 
EWindowMode::Type GetWindowMode () const
 
FVector2D GetWindowSizeFromClientSize (FVector2D InClientSize, TOptional< float > DPIScale=TOptional< float >())
 For a given client size, calculate the window size required to accommodate any potential non-OS borders and title bars 更多...
 
EVisibility GetWindowVisibility () const
 Windows that are not hittestable should not show up in the hittest grid.
 
void HACK_ForceToFront ()
 @hack Force a window to front even if a different application is in front.
 
bool HasActiveChildren () const
 Are any of our child windows active?
 
bool HasActiveParent () const
 Are any of our parent windows active?
 
bool HasCloseBox () const
 
bool HasFullWindowOverlayContent () const
 Checks to see if there is content assigned as a full window overlay 更多...
 
bool HasMaximizeBox () const
 
bool HasMinimizeBox () const
 
bool HasOSWindowBorder () const
 
bool HasOverlay () const
 Check whether we have a full window overlay, used to draw content over the entire window. 更多...
 
bool HasSizingFrame () const
 
void HideWindow ()
 Make the window invisible
 
void InitialMaximize ()
 Maximize the window if bInitiallyMaximized is set
 
void InitialMinimize ()
 Maximize the window if bInitiallyMinimized is set
 
bool IsActive () const
 Is this window active?
 
bool IsAutosized () const
 
bool IsDescendantOf (const TSharedPtr< SWindow > &ParentWindow) const
 Returns whether or not this window is a descendant of the specfied parent window 更多...
 
bool IsFocusedInitially () const
 
bool IsMorphing () const
 
bool IsMorphingSize () const
 
bool IsRegularWindow () const
 
bool IsScreenspaceMouseWithin (FVector2D ScreenspaceMouseCoordinate) const
 
bool IsTopmostWindow () const
 
bool IsUserSized () const
 
bool IsViewportSizeDrivenByWindow () const
 Returns whether or not the viewport and window size should be linked together. 更多...
 
bool IsVisible () const
 
bool IsWindowMaximized () const
 
bool IsWindowMinimized () const
 
void Maximize ()
 Windows functions
 
void MorphToPosition (const FCurveSequence &Sequence, const float TargetOpacity, const FVector2D &TargetPosition)
 Animate the window to TargetOpacity and TargetPosition over a short period of time
 
void MorphToShape (const FCurveSequence &Sequence, const float TargetOpacity, const FSlateRect &TargetShape)
 Animate the window to TargetOpacity and TargetShape over a short period of time
 
void MoveWindowTo (FVector2D NewPosition)
 Relocate the window to a screenspace position specified by NewPosition
 
void NotifyWindowBeingDestroyed ()
 Calls the OnWindowClosed delegate when this window is about to be closed
 
virtual FCursorReply OnCursorQuery (const FGeometry &MyGeometry, const FPointerEvent &CursorEvent) const override
 The system asks each widget under the mouse to provide a cursor. 更多...
 
virtual bool OnIsActiveChanged (const FWindowActivateEvent &ActivateEvent)
 The system will call this method to notify the window that it has been places in the foreground or background.
 
virtual TSharedPtr< FPopupLayer > OnVisualizePopup (const TSharedRef< SWidget > &PopupContent) override
 Visualize a new pop-up if possible. 更多...
 
int32 PaintWindow (double CurrentTime, float DeltaTime, FSlateWindowElementList &OutDrawElements, const FWidgetStyle &InWidgetStyle, bool bParentEnabled)
 Paint the window and all of its contents. 更多...
 
bool RemoveDescendantWindow (const TSharedRef< SWindow > &DescendantToRemove)
 Remove DescendantToRemove from this window's children or their children.
 
void RemoveOverlaySlot (const TSharedRef< SWidget > &InContent)
 Removes a widget that is being drawn over the entire window 更多...
 
void RemovePopupLayerSlot (const TSharedRef< SWidget > &WidgetToRemove)
 Counterpart to AddPopupLayerSlot
 
void RequestDestroyWindow ()
 Request that this window be destroyed. 更多...
 
void ReshapeWindow (FVector2D NewPosition, FVector2D NewSize)
 Relocate the window to a screenspace position specified by NewPosition and resize it to NewSize
 
void Resize (FVector2D NewClientSize)
 Resize the window to be dpi scaled NewClientSize immediately 更多...
 
void SetAsModalWindow ()
 Set modal window related flags - called by Slate app code during FSlateApplication::AddModalWindow()
 
void SetCachedScreenPosition (FVector2D NewPosition)
 Sets the actual screen position of the window. 更多...
 
void SetCachedSize (FVector2D NewSize)
 Sets the actual size of the window. 更多...
 
void SetContent (TSharedRef< SWidget > InContent)
 Sets the widget content for this window 更多...
 
void SetDPIScaleFactor (const float Factor)
 Overrides the DPI scale factor of the native window
 
void SetFullWindowOverlayContent (TSharedPtr< SWidget > InContent)
 Sets a widget to use as a full window overlay, or clears an existing widget if set. 更多...
 
void SetIndependentViewportSize (const FVector2D &VP)
 Sets the viewport size independently of the window size, if non-zero.
 
void SetManualManageDPIChanges (const bool bManualDPI)
 Will inform the native window that we need to handle any DPI changes from within the application
 
void SetMirrorWindow (bool bSetMirrorWindow)
 Set mirror window flag
 
void SetNativeWindow (TSharedRef< FGenericWindow > InNativeWindow)
 Sets the native OS window associated with this SWindow 更多...
 
void SetNativeWindowButtonsVisibility (bool bVisible)
 Shows or hides native window buttons on platforms that use them
 
void SetOnWindowClosed (const FOnWindowClosed &InDelegate)
 Sets the delegate to execute right before the window is closed
 
void SetOnWindowMoved (const FOnWindowMoved &InDelegate)
 Sets the delegate to execute right after the window has been moved
 
void SetOnWorldSwitchHack (FOnSwitchWorldHack &InOnWorldSwitchHack)
 Sets the delegate to call when switching worlds in before ticking,drawing, or sending messages to widgets in this window
 
void SetOpacity (const float InOpacity)
 Sets the opacity of this window 更多...
 
void SetRequestDestroyWindowOverride (const FRequestDestroyWindowOverride &InDelegate)
 Sets the delegate to override RequestDestroyWindow
 
void SetSizingRule (ESizingRule InSizingRule)
 Should this window automatically derive its size based on its content or be user-drive?
 
void SetTitle (const FText &InTitle)
 Sets the current window title 更多...
 
void SetViewportSizeDrivenByWindow (bool bDrivenByWindow)
 Sets whether or not the viewport size should be driven by the window's size. 更多...
 
void SetWidgetToFocusOnActivate (TSharedPtr< SWidget > InWidget)
 Sets a widget that should become focused when this window is next activated 更多...
 
void SetWindowMode (EWindowMode::Type WindowMode)
 Toggle window between window modes (fullscreen, windowed, etc)
 
void ShowWindow ()
 Make the window visible
 
bool SizeWillChangeOften () const
 
virtual bool SupportsKeyboardFocus () const override
 Checks to see if this widget supports keyboard focus. 更多...
 
 SWindow ()
 When should this window be activated upon being shown? 更多...
 
int32 SwitchWorlds (int32 WorldId) const
 Hack to switch worlds 更多...
 
virtual void Tick (const FGeometry &AllottedGeometry, const double InCurrentTime, const float InDeltaTime) override
 Ticks this widget with Geometry. 更多...
 
virtual FString ToString () const override
 
void UpdateMorphTargetPosition (const FVector2D &TargetPosition)
 Set a new morph position and force the morph to run for at least one frame in order to reach that target
 
void UpdateMorphTargetShape (const FSlateRect &TargetShape)
 Set a new morph shape and force the morph to run for at least one frame in order to reach that target
 
- Public 成员函数 继承自 SCompoundWidget
virtual FChildren * GetChildren () override
 Every widget that has children must implement this method. 更多...
 
FLinearColor GetColorAndOpacity () const
 Gets the widget's color.
 
const FVector2D GetContentScale () const
 Returns the size scaling factor for this widget. 更多...
 
virtual FSlateColor GetForegroundColor () const override
 
virtual void OnArrangeChildren (const FGeometry &AllottedGeometry, FArrangedChildren &ArrangedChildren) const override
 Compute the Geometry of all the children and add populate the ArrangedChildren list with their values. 更多...
 
virtual int32 OnPaint (const FPaintArgs &Args, const FGeometry &AllottedGeometry, const FSlateRect &MyCullingRect, FSlateWindowElementList &OutDrawElements, int32 LayerId, const FWidgetStyle &InWidgetStyle, bool bParentEnabled) const override
 The widget should respond by populating the OutDrawElements array with FDrawElements that represent it and any of its children. 更多...
 
void SetColorAndOpacity (const TAttribute< FLinearColor > &InColorAndOpacity)
 Sets the widget's color. 更多...
 
void SetContentScale (const TAttribute< FVector2D > &InContentScale)
 Sets the content scale for this widget. 更多...
 
void SetForegroundColor (const TAttribute< FSlateColor > &InForegroundColor)
 Sets the widget's foreground color. 更多...
 
virtual void SetVisibility (TAttribute< EVisibility > InVisibility) override final
 
- Public 成员函数 继承自 SWidget
template<typename MetaDataType >
void AddMetadata (const TSharedRef< MetaDataType > &AddMe)
 Add metadata to this widget. 更多...
 
virtual bool Advanced_IsWindow () const
 Is this widget derivative of SWindow
 
void ArrangeChildren (const FGeometry &AllottedGeometry, FArrangedChildren &ArrangedChildren) const
 Non-virtual entry point for arrange children. 更多...
 
FORCEINLINE void CacheVolatility ()
 Recalculates volatility of the widget and caches the result. 更多...
 
FSlateRect CalculateCullingAndClippingRules (const FGeometry &AllottedGeometry, const FSlateRect &MyCullingRect, bool &bClipToBounds, bool &bAlwaysClip, bool &bIntersectClipBounds) const
 Calculates what if any clipping state changes need to happen when drawing this widget. 更多...
 
void Construct (const TAttribute< FText > &InToolTipText, const TSharedPtr< IToolTip > &InToolTip, const TAttribute< TOptional< EMouseCursor::Type > > &InCursor, const TAttribute< bool > &InEnabledState, const TAttribute< EVisibility > &InVisibility, const float InRenderOpacity, const TAttribute< TOptional< FSlateRenderTransform > > &InTransform, const TAttribute< FVector2D > &InTransformPivot, const FName &InTag, const bool InForceVolatile, const EWidgetClipping InClipping, const EFlowDirectionPreference InFlowPreference, const TOptional< FAccessibleWidgetData > &InAccessibleData, const TArray< TSharedRef< ISlateMetaData > > &InMetaData)
 Construct a SWidget based on initial parameters.
 
void EnableToolTipForceField (const bool bEnableForceField)
 Sets whether this widget is a "tool tip force field". 更多...
 
FORCEINLINE void ForceVolatile (bool bForce)
 Should this widget always appear as volatile for any layout caching host widget. 更多...
 
template<typename MetaDataType >
TArray< TSharedRef< MetaDataType > > GetAllMetaData () const
 Get all metadata of the type provided. 更多...
 
virtual FChildren * GetChildren ()=0
 Every widget that has children must implement this method. 更多...
 
FORCEINLINE EWidgetClipping GetClipping () const
 
FName GetCreatedInLocation () const
 
FORCEINLINE FMargin GetCullingBoundsExtension () const
 
const TOptional< FSlateClippingState > & GetCurrentClippingState () const
 Returns the clipping state to clip this widget against its parent
 
FVector2D GetDesiredSize () const
 
EFlowDirectionPreference GetFlowDirectionPreference () const
 Gets the desired flow direction for the layout.
 
virtual FSlateColor GetForegroundColor () const
 
template<typename MetaDataType >
TSharedPtr< MetaDataType > GetMetaData () const
 Get the metadata of the type provided. 更多...
 
const FGeometry & GetPaintSpaceGeometry () const
 Gets the last geometry used to Tick the widget. 更多...
 
virtual FString GetReadableLocation () const
 
virtual float GetRelativeLayoutScale (const int32 ChildIndex, float LayoutScaleMultiplier) const
 What is the Child's scale relative to this widget.
 
FORCEINLINE float GetRenderOpacity () const
 
FORCEINLINE const TOptional< FSlateRenderTransform > & GetRenderTransform () const
 
FORCEINLINE FVector2D GetRenderTransformPivot () const
 
virtual FName GetTag () const
 
const FGeometry & GetTickSpaceGeometry () const
 Gets the last geometry used to Tick the widget. 更多...
 
virtual TSharedPtr< IToolTip > GetToolTip ()
 
FName GetType () const
 
FString GetTypeAsString () const
 
FORCEINLINE EVisibility GetVisibility () const
 
virtual EWindowZone::Type GetWindowZoneOverride () const
 Called when the mouse is moved over the widget's window, to determine if we should report whether OS-specific features should be active at this location (such as a title bar grip, system menu, etc.) Usually you should not need to override this function. 更多...
 
bool HasActiveTimers () const
 Does this widget have any active timers?
 
TOptional< EFocusCause > HasAnyUserFocus () const
 Gets whether or not any users have this widget focused, and if so the type of focus (first one found). 更多...
 
bool HasAnyUserFocusOrFocusedDescendants () const
 
bool HasFocusedDescendants () const
 
virtual bool HasKeyboardFocus () const
 Checks to see if this widget currently has the keyboard focus 更多...
 
bool HasMouseCapture () const
 Checks to see if this widget is the current mouse captor 更多...
 
bool HasMouseCaptureByUser (int32 UserIndex, TOptional< int32 > PointerIndex=TOptional< int32 >()) const
 Checks to see if this widget has mouse capture from the provided user. 更多...
 
bool HasToolTipForceField () const
 
TOptional< EFocusCause > HasUserFocus (int32 UserIndex) const
 Gets whether or not the specified users has this widget focused, and if so the type of focus. 更多...
 
bool HasUserFocusedDescendants (int32 UserIndex) const
 Gets whether or not the specified users has this widget or any descendant focused. 更多...
 
void Invalidate (EInvalidateWidgetReason InvalidateReason)
 Invalidates the widget from the view of a layout caching widget that may own this widget. 更多...
 
virtual bool IsDirectlyHovered () const
 
FORCEINLINE bool IsEnabled () const
 
virtual bool IsHovered () const
 
virtual bool IsInteractable () const
 
FORCEINLINE bool IsVolatile () const
 Whether or not a widget is volatile and will update every frame without being invalidated
 
FORCEINLINE bool IsVolatileIndirectly () const
 This widget is volatile because its parent or some ancestor is volatile
 
virtual FReply OnAnalogValueChanged (const FGeometry &MyGeometry, const FAnalogInputEvent &InAnalogInputEvent)
 Called when an analog value changes on a button that supports analog 更多...
 
virtual FCursorReply OnCursorQuery (const FGeometry &MyGeometry, const FPointerEvent &CursorEvent) const
 The system asks each widget under the mouse to provide a cursor. 更多...
 
virtual FReply OnDragDetected (const FGeometry &MyGeometry, const FPointerEvent &MouseEvent)
 Called when Slate detects that a widget started to be dragged. 更多...
 
virtual void OnDragEnter (const FGeometry &MyGeometry, const FDragDropEvent &DragDropEvent)
 Called during drag and drop when the drag enters a widget. 更多...
 
virtual void OnDragLeave (const FDragDropEvent &DragDropEvent)
 Called during drag and drop when the drag leaves a widget. 更多...
 
virtual FReply OnDragOver (const FGeometry &MyGeometry, const FDragDropEvent &DragDropEvent)
 Called during drag and drop when the the mouse is being dragged over a widget. 更多...
 
virtual FReply OnDrop (const FGeometry &MyGeometry, const FDragDropEvent &DragDropEvent)
 Called when the user is dropping something onto a widget; terminates drag and drop. 更多...
 
virtual void OnFinishedKeyInput ()
 All the key (keyboard, gamepay, joystick, etc.) input from this frame has been routed. 更多...
 
virtual void OnFinishedPointerInput ()
 All the pointer (mouse, touch, stylus, etc.) events from this frame have been routed. 更多...
 
virtual void OnFocusChanging (const FWeakWidgetPath &PreviousFocusPath, const FWidgetPath &NewWidgetPath)
 Called whenever a focus path is changing on all the widgets within the old and new focus paths
 
virtual void OnFocusChanging (const FWeakWidgetPath &PreviousFocusPath, const FWidgetPath &NewWidgetPath, const FFocusEvent &InFocusEvent)
 Called whenever a focus path is changing on all the widgets within the old and new focus paths
 
virtual void OnFocusLost (const FFocusEvent &InFocusEvent)
 Called when this widget loses focus. 更多...
 
virtual FReply OnFocusReceived (const FGeometry &MyGeometry, const FFocusEvent &InFocusEvent)
 Called when focus is given to this widget. 更多...
 
virtual FReply OnKeyChar (const FGeometry &MyGeometry, const FCharacterEvent &InCharacterEvent)
 Called after a character is entered while this widget has keyboard focus 更多...
 
virtual FReply OnKeyDown (const FGeometry &MyGeometry, const FKeyEvent &InKeyEvent)
 Called after a key is pressed when this widget has focus (this event bubbles if not handled) 更多...
 
virtual FReply OnKeyUp (const FGeometry &MyGeometry, const FKeyEvent &InKeyEvent)
 Called after a key is released when this widget has focus 更多...
 
virtual TOptional< TSharedRef< SWidget > > OnMapCursor (const FCursorReply &CursorReply) const
 After OnCursorQuery has specified a cursor type the system asks each widget under the mouse to map that cursor to a widget. 更多...
 
virtual FReply OnMotionDetected (const FGeometry &MyGeometry, const FMotionEvent &InMotionEvent)
 Called when motion is detected (controller or device) e.g. 更多...
 
virtual FReply OnMouseButtonDoubleClick (const FGeometry &InMyGeometry, const FPointerEvent &InMouseEvent)
 Called when a mouse button is double clicked. 更多...
 
virtual FReply OnMouseButtonDown (const FGeometry &MyGeometry, const FPointerEvent &MouseEvent)
 The system calls this method to notify the widget that a mouse button was pressed within it. 更多...
 
virtual FReply OnMouseButtonUp (const FGeometry &MyGeometry, const FPointerEvent &MouseEvent)
 The system calls this method to notify the widget that a mouse button was release within it. 更多...
 
virtual void OnMouseCaptureLost (const FCaptureLostEvent &CaptureLostEvent)
 Called when this widget had captured the mouse, but that capture has been revoked for some reason.
 
virtual void OnMouseEnter (const FGeometry &MyGeometry, const FPointerEvent &MouseEvent)
 The system will use this event to notify a widget that the cursor has entered it. 更多...
 
virtual void OnMouseLeave (const FPointerEvent &MouseEvent)
 The system will use this event to notify a widget that the cursor has left it. 更多...
 
virtual FReply OnMouseMove (const FGeometry &MyGeometry, const FPointerEvent &MouseEvent)
 The system calls this method to notify the widget that a mouse moved within it. 更多...
 
virtual FReply OnMouseWheel (const FGeometry &MyGeometry, const FPointerEvent &MouseEvent)
 Called when the mouse wheel is spun. 更多...
 
virtual FNavigationReply OnNavigation (const FGeometry &MyGeometry, const FNavigationEvent &InNavigationEvent)
 Called when navigation is requested e.g. 更多...
 
virtual FReply OnPreviewKeyDown (const FGeometry &MyGeometry, const FKeyEvent &InKeyEvent)
 Called after a key is pressed when this widget or a child of this widget has focus If a widget handles this event, OnKeyDown will not be passed to the focused widget. 更多...
 
virtual FReply OnPreviewMouseButtonDown (const FGeometry &MyGeometry, const FPointerEvent &MouseEvent)
 Just like OnMouseButtonDown, but tunnels instead of bubbling. 更多...
 
virtual FPopupMethodReply OnQueryPopupMethod () const
 Popups can manifest in a NEW OS WINDOW or via an OVERLAY in an existing window. 更多...
 
virtual TOptional< bool > OnQueryShowFocus (const EFocusCause InFocusCause) const
 Called to determine if we should render the focus brush. 更多...
 
virtual void OnToolTipClosing ()
 Called when a tooltip displayed from this widget is being closed
 
virtual FReply OnTouchEnded (const FGeometry &MyGeometry, const FPointerEvent &InTouchEvent)
 Called when a touchpad touch is ended (finger lifted) 更多...
 
virtual FReply OnTouchFirstMove (const FGeometry &MyGeometry, const FPointerEvent &TouchEvent)
 Called when a touchpad touch first moves after TouchStarted 更多...
 
virtual FReply OnTouchForceChanged (const FGeometry &MyGeometry, const FPointerEvent &TouchEvent)
 Called when a touchpad touch force changes 更多...
 
virtual FReply OnTouchGesture (const FGeometry &MyGeometry, const FPointerEvent &GestureEvent)
 Called when the user performs a gesture on trackpad. 更多...
 
virtual FReply OnTouchMoved (const FGeometry &MyGeometry, const FPointerEvent &InTouchEvent)
 Called when a touchpad touch is moved (finger moved) 更多...
 
virtual FReply OnTouchStarted (const FGeometry &MyGeometry, const FPointerEvent &InTouchEvent)
 Called when a touchpad touch is started (finger down) 更多...
 
virtual TSharedPtr< FPopupLayer > OnVisualizePopup (const TSharedRef< SWidget > &PopupContent)
 Visualize a new pop-up if possible. 更多...
 
virtual bool OnVisualizeTooltip (const TSharedPtr< SWidget > &TooltipContent)
 Called when Slate wants to visualize tooltip. 更多...
 
int32 Paint (const FPaintArgs &Args, const FGeometry &AllottedGeometry, const FSlateRect &MyCullingRect, FSlateWindowElementList &OutDrawElements, int32 LayerId, const FWidgetStyle &InWidgetStyle, bool bParentEnabled) const
 Called to tell a widget to paint itself (and it's children). 更多...
 
TSharedRef< FActiveTimerHandle > RegisterActiveTimer (float TickPeriod, FWidgetActiveTimerDelegate TickFunction)
 Registers an "active timer" delegate that will execute at some regular interval. 更多...
 
FORCEINLINE void SetClipping (EWidgetClipping InClipping)
 Sets the clipping to bounds rules for this widget.
 
FORCEINLINE void SetCullingBoundsExtension (const FMargin &InCullingBoundsExtension)
 Sets an additional culling padding that is added to a widget to give more leeway when culling widgets. 更多...
 
void SetCursor (const TAttribute< TOptional< EMouseCursor::Type > > &InCursor)
 Set the cursor that should appear when this widget is hovered
 
void SetDebugInfo (const ANSICHAR *InType, const ANSICHAR *InFile, int32 OnLine, size_t InAllocSize)
 Used by Slate to set the runtime debug info about this widget.
 
void SetEnabled (const TAttribute< bool > &InEnabledState)
 Sets the enabled state of this widget 更多...
 
void SetFlowDirectionPreference (EFlowDirectionPreference InFlowDirectionPreference)
 Sets how content should flow in this panel, based on the current culture. 更多...
 
void SetOnMouseButtonDown (FPointerEventHandler EventHandler)
 See OnMouseButtonDown event
 
void SetOnMouseButtonUp (FPointerEventHandler EventHandler)
 See OnMouseButtonUp event
 
void SetOnMouseDoubleClick (FPointerEventHandler EventHandler)
 See OnMouseDoubleClick event
 
void SetOnMouseEnter (FNoReplyPointerEventHandler EventHandler)
 See OnMouseEnter event
 
void SetOnMouseLeave (FSimpleNoReplyPointerEventHandler EventHandler)
 See OnMouseLeave event
 
void SetOnMouseMove (FPointerEventHandler EventHandler)
 See OnMouseMove event
 
FORCEINLINE void SetRenderOpacity (float InRenderOpacity)
 
FORCEINLINE void SetRenderTransform (TAttribute< TOptional< FSlateRenderTransform > > InTransform)
 
FORCEINLINE void SetRenderTransformPivot (TAttribute< FVector2D > InTransformPivot)
 
void SetToolTip (const TSharedPtr< IToolTip > &InToolTip)
 Set the tool tip that should appear when this widget is hovered. 更多...
 
void SetToolTipText (const TAttribute< FText > &ToolTipText)
 Set the tool tip that should appear when this widget is hovered. 更多...
 
virtual void SetVisibility (TAttribute< EVisibility > InVisibility)
 
void SlatePrepass ()
 DEPRECATED version of SlatePrepass that assumes no scaling beyond AppScale
 
void SlatePrepass (float InLayoutScaleMultiplier)
 Descends to leaf-most widgets in the hierarchy and gathers desired sizes on the way up. 更多...
 
virtual bool SupportsKeyboardFocus () const
 Checks to see if this widget supports keyboard focus. 更多...
 
virtual void Tick (const FGeometry &AllottedGeometry, const double InCurrentTime, const float InDeltaTime)
 Ticks this widget with Geometry. 更多...
 
virtual FString ToString () const
 
void UnRegisterActiveTimer (const TSharedRef< FActiveTimerHandle > &ActiveTimerHandle)
 Unregisters an active timer handle. 更多...
 
- Public 成员函数 继承自 TSharedFromThis< SWidget >
TSharedRef< SWidget, Mode > AsShared ()
 Provides access to a shared reference to this object. 更多...
 
TSharedRef< SWidget const, Mode > AsShared () const
 Provides access to a shared reference to this object (const.) Note that is only valid to call this after a shared reference (or shared pointer) to the object has already been created. 更多...
 
FORCEINLINE bool DoesSharedInstanceExist () const
 Checks whether our referenced instance is valid (ie, whether it's safe to call AsShared). 更多...
 
FORCEINLINE void UpdateWeakReferenceInternal (TSharedPtr< SharedPtrType, Mode > const *InSharedPtr, OtherType *InObject) const
 INTERNAL USE ONLY – Do not call this method. 更多...
 
FORCEINLINE void UpdateWeakReferenceInternal (TSharedRef< SharedRefType, Mode > const *InSharedRef, OtherType *InObject) const
 INTERNAL USE ONLY – Do not call this method. 更多...
 

静态 Public 成员函数

static FVector2D ComputeWindowSizeForContent (FVector2D ContentSize)
 
static TSharedRef< SWindow > MakeCursorDecorator ()
 Make cursor decorator window 更多...
 
static TSharedRef< SWindow > MakeNotificationWindow ()
 Make a notification window 更多...
 
static TSharedRef< SWindow > MakeToolTipWindow ()
 Make a tool tip window 更多...
 

Public 属性

EWindowZone::Type MoveResizeZone
 Used to store the zone where the mouse down event occurred during move / drag
 

Protected 成员函数

virtual EHorizontalAlignment GetTitleAlignment ()
 Returns the alignment type for the titlebar's title text.
 
virtual TSharedRef< SWidget > MakeWindowTitleBar (const TSharedRef< SWindow > &Window, const TSharedPtr< SWidget > &CenterContent, EHorizontalAlignment CenterContentAlignment)
 Returns swindow title bar widgets.
 
void StartMorph ()
 Kick off a morph to whatever the target shape happens to be.
 
EActiveTimerReturnType TriggerPlayMorphSequence (double InCurrentTime, float InDeltaTime)
 One-off active timer to trigger a the morph sequence to play
 
- Protected 成员函数 继承自 SCompoundWidget
virtual FVector2D ComputeDesiredSize (float) const override
 Compute the ideal size necessary to display this widget. 更多...
 
 SCompoundWidget ()
 Disallow public construction
 
- Protected 成员函数 继承自 SWidget
FORCEINLINE bool Advanced_InvalidateVolatility ()
 Recalculates and caches volatility and returns 'true' if the volatility changed.
 
virtual void CacheDesiredSize (float InLayoutScaleMultiplier)
 The system calls this method. 更多...
 
virtual FVector2D ComputeDesiredSize (float LayoutScaleMultiplier) const =0
 Compute the ideal size necessary to display this widget. 更多...
 
EFlowDirection ComputeFlowDirection () const
 Establishes a new flow direction potentially, if this widget has a particular preference for it and all its children.
 
virtual bool ComputeVolatility () const
 Recomputes the volatility of the widget. 更多...
 
bool FindChildGeometries (const FGeometry &MyGeometry, const TSet< TSharedRef< SWidget > > &WidgetsToFind, TMap< TSharedRef< SWidget >, FArrangedWidget > &OutResult) const
 Find the geometry of a descendant widget. 更多...
 
void FindChildGeometries_Helper (const FGeometry &MyGeometry, const TSet< TSharedRef< SWidget > > &WidgetsToFind, TMap< TSharedRef< SWidget >, FArrangedWidget > &OutResult) const
 Actual implementation of FindChildGeometries. 更多...
 
FGeometry FindChildGeometry (const FGeometry &MyGeometry, TSharedRef< SWidget > WidgetToFind) const
 Find the geometry of a descendant widget. 更多...
 
virtual const FSlateBrush * GetFocusBrush () const
 
void InvalidateChildRemovedFromTree (SWidget &Child)
 Called when a child is removed from the tree parent's widget tree either by removing it from a slot. 更多...
 
virtual void OnClippingChanged ()
 Called when clipping is changed. 更多...
 
void OnMouseCaptureLost ()
 Called when this widget had captured the mouse, but that capture has been revoked for some reason.
 
template<typename TargetValueType , typename SourceValueType >
bool SetAttribute (TAttribute< TargetValueType > &TargetValue, const TAttribute< SourceValueType > &SourceValue, EInvalidateWidgetReason BaseInvalidationReason)
 Performs the attribute assignment and invalidates the widget minimally based on what actually changed. 更多...
 
bool ShouldBeEnabled (bool InParentEnabled) const
 Determines if this widget should be enabled. 更多...
 
 SWidget ()
 Hidden default constructor. 更多...
 
virtual ~SWidget ()
 Dtor ensures that active timer handles are UnRegistered with the SlateApplication.
 
- Protected 成员函数 继承自 TSharedFromThis< SWidget >
FORCEINLINE TSharedFromThis & operator= (TSharedFromThis const &)
 Hidden stub assignment operator
 
 TSharedFromThis ()
 Hidden stub constructor
 
 TSharedFromThis (TSharedFromThis const &)
 Hidden stub copy constructor
 
 ~TSharedFromThis ()
 Hidden destructor
 

Protected 属性

EAutoCenter AutoCenterRule
 How to auto center the window
 
bool bAllowFastUpdate: 1
 True if this window allows global invalidation of its contents
 
bool bCreateTitleBar: 1
 True if this window has a title bar
 
bool bDragAnywhere
 When true, grabbing anywhere on the window will allow it to be dragged.
 
bool bFocusWhenFirstShown: 1
 Focus this window immediately as it is shown
 
bool bHasCloseButton: 1
 True if this window displays an enabled close button on the toolbar area
 
bool bHasEverBeenShown: 1
 True if this window has been shown yet
 
bool bHasMaximizeButton: 1
 True if this window displays an enabled maximize button on the toolbar area
 
bool bHasMinimizeButton: 1
 True if this window displays an enabled minimize button on the toolbar area
 
bool bHasOSWindowBorder: 1
 True if this window displays the os window border instead of drawing one in slate
 
bool bHasSizingFrame: 1
 True if this window displays thick edge that can be used to resize the window
 
bool bInitiallyMaximized: 1
 true if this window is maximized when its created
 
bool bInitiallyMinimized: 1
 true if this window is minimized when its created
 
bool bIsHDR: 1
 True if the window is being displayed on a HDR capable monitor
 
bool bIsMirrorWindow: 1
 True if the window is a mirror window for HMD content
 
bool bIsModalWindow: 1
 True if the window is modal
 
bool bIsPopupWindow: 1
 True if this is a pop up window
 
bool bIsTopmostWindow: 1
 True if this is a topmost window
 
bool bShouldPreserveAspectRatio: 1
 True if the window should preserve its aspect ratio when resized by user
 
bool bShouldShowWindowContentDuringOverlay
 Whether or not we should show content of the window which could be occluded by full screen window content. 更多...
 
bool bSizeWillChangeOften: 1
 True if we expect the size of this window to change often, such as if its animated, or if it recycled for tool-tips, and we'd like to avoid costly GPU buffer resizes when that happens. 更多...
 
bool bVirtualWindow: 1
 True if this window is virtual and not directly rendered by slate application or the OS.
 
TArray< TSharedRef< SWindow > > ChildWindows
 Child windows of this window
 
int32 ExpectedMaxHeight
 The expected maximum height of the window. 更多...
 
int32 ExpectedMaxWidth
 The expected maximum width of the window. 更多...
 
TSharedPtr< SWidget > FullWindowOverlayWidget
 Full window overlay widget
 
TUniquePtr< FHittestGrid > HittestGrid
 Each window has its own hittest grid for accelerated widget picking.
 
FVector2D InitialDesiredScreenPosition
 Initial desired position of the window's content in screen space
 
FVector2D InitialDesiredSize
 Initial desired size of the window's content in screen space
 
TSharedPtr< FGenericWindow > NativeWindow
 The native window that is backing this Slate Window
 
FOnWindowActivated OnWindowActivated
 Invoked when the window has been activated.
 
FOnWindowClosed OnWindowClosed
 Invoked when the window is about to be closed.
 
FOnWindowDeactivated OnWindowDeactivated
 Invoked when the window has been deactivated.
 
FOnWindowMoved OnWindowMoved
 Invoked when the window is moved
 
FOnSwitchWorldHack OnWorldSwitchHack
 World switch delegate
 
float Opacity
 Current opacity of the window
 
TWeakPtr< SWindow > ParentWindowPtr
 When not null, this window will always appear on top of the parent and be closed when the parent is closed.
 
TSharedPtr< class SPopupLayer > PopupLayer
 This layer provides mechanism for tooltips, drag-drop decorators, and popups without creating a new window.
 
FVector2D PreFullscreenPosition
 The position of the window before entering fullscreen
 
FRequestDestroyWindowOverride RequestDestroyWindowOverride
 Invoked when the window is requested to be destroyed.
 
FVector2D ScreenPosition
 Position of the window's content in screen space
 
FVector2D Size
 Size of the window's content area in screen space
 
FWindowSizeLimits SizeLimits
 Min and Max values for Width and Height; all optional.
 
ESizingRule SizingRule
 How to size the window
 
TAttribute< FText > Title
 Title of the window, displayed in the title bar as well as potentially in the task bar (Windows platform)
 
float TitleBarSize
 Size of this window's title bar. 更多...
 
EWindowTransparency TransparencySupport
 Transparency setting for this window
 
EWindowType Type
 Type of the window
 
TWeakPtr< ISlateViewport > Viewport
 Pointer to the viewport registered with this window if any
 
FVector2D ViewportSize
 Size of the viewport. 更多...
 
TWeakPtr< SWidget > WidgetFocusedOnDeactivate
 Widget that had keyboard focus when this window was last de-activated, if any. 更多...
 
TWeakPtr< SWidget > WidgetToFocusOnActivate
 Widget to transfer keyboard focus to when this window becomes active, if any. 更多...
 
EWindowActivationPolicy WindowActivationPolicy
 When should the window be activated upon being shown
 
TSharedPtr< SOverlay > WindowOverlay
 Window overlay widget
 
EWindowZone::Type WindowZone
 Cached "zone" the cursor was over in the window the last time that someone called GetCurrentWindowZone()
 
- Protected 属性 继承自 SCompoundWidget
FSimpleSlot ChildSlot
 The slot that contains this widget's descendants.
 
TAttribute< FLinearColor > ColorAndOpacity
 The color and opacity to apply to this widget and all its descendants.
 
TAttribute< FVector2D > ContentScale
 The layout scale to apply to this widget's contents; useful for animation.
 
TAttribute< FSlateColor > ForegroundColor
 Optional foreground color that will be inherited by all of this widget's contents
 
- Protected 属性 继承自 SWidget
uint8 bCanHaveChildren: 1
 Can the widget ever support children? This will be false on SLeafWidgets, rather than setting this directly, you should probably inherit from SLeafWidget.
 
uint8 bCanSupportFocus: 1
 Can the widget ever support keyboard focus
 
uint8 bClippingProxy: 1
 Some widgets might be a complex hierarchy of child widgets you never see. 更多...
 
uint8 bIsHovered: 1
 Is this widget hovered?
 
uint8 bVolatilityAlwaysInvalidatesPrepass: 1
 if this widget should always invalidate the prepass step when volatile
 
EWidgetClipping Clipping
 Set to true if all content of the widget should clip to the bounds of this widget.
 
FName CreatedInLocation
 Full file path (and line) in which this widget was created
 
FMargin CullingBoundsExtension
 Can be used to enlarge the culling bounds of this widget (pre-intersection), this can be useful if you've got children that you know are using rendering transforms to render outside their standard bounds, if that happens it's possible the parent might be culled before the descendant widget is entirely off screen. 更多...
 
TAttribute< TOptional< EMouseCursor::Type > > Cursor
 The cursor to show when the mouse is hovering over this widget.
 
TAttribute< bool > EnabledState
 Whether or not this widget is enabled
 
TArray< TSharedRef< ISlateMetaData > > MetaData
 Metadata associated with this widget
 
float RenderOpacity
 The opacity of the widget. 更多...
 
TAttribute< TOptional< FSlateRenderTransform > > RenderTransform
 Render transform of this widget. 更多...
 
TAttribute< FVector2D > RenderTransformPivot
 Render transform pivot of this widget (in normalized local space)
 
FName Tag
 Tag for this widget
 
FName TypeOfWidget
 Debugging information on the type of widget we're creating for the Widget Reflector.
 
TAttribute< EVisibility > Visibility
 Is this widget visible, hidden or collapsed
 

额外继承的成员函数

- 静态 Protected 成员函数 继承自 SWidget
static const TAttribute< EVisibility > & AccessWidgetVisibilityAttribute (const TSharedRef< SWidget > &Widget)
 Protected static helper to allow widgets to access the visibility attribute of other widgets directly 更多...
 
static int32 FindChildUnderMouse (const FArrangedChildren &Children, const FPointerEvent &MouseEvent)
 
static int32 FindChildUnderPosition (const FArrangedChildren &Children, const FVector2D &ArrangedSpacePosition)
 
- 静态 Protected 成员函数 继承自 TSharedFromThis< SWidget >
static FORCEINLINE TSharedRef< OtherType const, Mode > SharedThis (const OtherType *ThisPtr)
 Provides access to a shared reference to an object, given the object's 'this' pointer. 更多...
 
static FORCEINLINE TSharedRef< OtherType, Mode > SharedThis (OtherType *ThisPtr)
 Provides access to a shared reference to an object, given the object's 'this' pointer. 更多...
 

详细描述

SWindow is a platform-agnostic representation of a top-level window.

构造及析构函数说明

◆ SWindow()

SWindow::SWindow ( )

When should this window be activated upon being shown?

Use the default os look for the border of the window Does this window have a close button? Can this window be maximized? Can this window be minimized? Should this window preserve its aspect ratio when resized by user? The smallest width this window can be in Desktop Pixel Units. The smallest height this window can be in Desktop Pixel Units. The biggest width this window can be in Desktop Pixel Units. The biggest height this window can be in Desktop Pixel Units. True if we should initially create a traditional title bar area. If false, the user must embed the title area content into the window manually, taking into account platform-specific considerations! Has no effect for certain types of windows (popups, tool-tips, etc.) If the window appears off screen or is too large to safely fit this flag will force realistic constraints on the window and bring it back into view. The padding around the edges of the window applied to it's content. The margin around the edges of the window that will be detected as places the user can grab to resize the window. true if this window will self handle any eventual DPI adjustments Default constructor. Use SNew(SWindow) instead.

成员函数说明

◆ AcceptsInput()

bool SWindow::AcceptsInput ( ) const
返回
true if the window accepts input; false if the window is non-interactive

◆ ActivateWhenFirstShown()

FArguments & SWindow::ActivateWhenFirstShown ( bool  bActivateWhenFirstShown)
inline

Type of this window

Style used to draw this window Title of the window When true, the window can be dragged from anywhere. The windows auto-centering mode. If set to anything other than None, then the ScreenPosition value will be ignored Screen-space position where the window should be initially located. What the initial size of the window should be. If the initial ClientSize and ScreenPosition arguments should be automatically adjusted to account for DPI scale Should this window support transparency The initial opacity of the window Is the window initially maximized Is the window initially minimized How the window should be sized True if this should be a 'pop-up' window True if this window should always be on top of all other windows Should this window be focused immediately after it is shown?

◆ ActivationPolicy()

EWindowActivationPolicy SWindow::ActivationPolicy ( ) const
返回
the window activation policy used when showing the window

◆ AddOverlaySlot()

SOverlay::FOverlaySlot & SWindow::AddOverlaySlot ( const int32  ZOrder = INDEX_NONE)

Adds content to draw on top of the entire window

参数
InZOrderZ-order to use for this widget
返回
The added overlay slot so that it can be configured and populated

◆ AddPopupLayerSlot()

struct FPopupLayerSlot & SWindow::AddPopupLayerSlot ( )

Return a new slot in the popup layer.

Assumes that the window has a popup layer.

◆ AppearsInTaskbar()

bool SWindow::AppearsInTaskbar ( ) const
返回
should this window show up in the taskbar

◆ BringToFront()

void SWindow::BringToFront ( bool  bForce = false)

Bring the window to the front

参数
bForceForces the window to the top of the Z order, even if that means stealing focus from other windows In general do not pass force in. It can be useful for some window types, like game windows where not forcing it to the front would cause mouse capture and mouse lock to happen but without the window visible

◆ ComputeWindowSizeForContent()

static FVector2D SWindow::ComputeWindowSizeForContent ( FVector2D  ContentSize)
static
参数
ContentSizeThe size of content that we want to accommodate
返回
The size of the window necessary to accommodate the given content

◆ DrawAttention()

void SWindow::DrawAttention ( const FWindowDrawAttentionParameters &  Parameters)

Attempts to draw the user's attention to this window in whatever way is appropriate for the platform if this window is not the current active

参数
ParametersThe parameters for bouncing. Depending on the platform, not all parameters may be supported.

◆ EnableWindow()

void SWindow::EnableWindow ( bool  bEnable)

Enables or disables this window and all of its children

参数
bEnabletrue to enable this window and its children false to diable this window and its children

◆ GetChildWindows() [1/2]

TArray< TSharedRef< SWindow > > & SWindow::GetChildWindows ( )
返回
the list of this window's child windows

◆ GetChildWindows() [2/2]

const TArray< TSharedRef< SWindow > > & SWindow::GetChildWindows ( ) const
返回
the list of this window's child windows

◆ GetClientRectInScreen()

FSlateRect SWindow::GetClientRectInScreen ( ) const
返回
Rectangle of the window's usable client area in screen space.

◆ GetClientSizeInScreen()

FVector2D SWindow::GetClientSizeInScreen ( ) const
返回
the size of the window's usable client area.

◆ GetClippingRectangleInWindow()

FSlateRect SWindow::GetClippingRectangleInWindow ( ) const
返回
a clipping rectangle that represents this window in Window Space (i.e. always starts at 0,0)

◆ GetContent()

TSharedRef< const SWidget > SWindow::GetContent ( ) const

Gets the widget content for this window

返回
The widget content for this window

◆ GetCornerRadius()

int32 SWindow::GetCornerRadius ( )
返回
Gets the radius of the corner rounding of the window.

◆ GetDesiredSizeDesktopPixels()

FVector2D SWindow::GetDesiredSizeDesktopPixels ( ) const
返回
the desired size in desktop pixels

◆ GetExpectedMaxHeight()

int32 SWindow::GetExpectedMaxHeight ( ) const
inline
返回
Returns the configured expected maximum height of the window, or INDEX_NONE if not specified. Can be used to optimize performance for window size animation

◆ GetExpectedMaxWidth()

int32 SWindow::GetExpectedMaxWidth ( ) const
inline
返回
Returns the configured expected maximum width of the window, or INDEX_NONE if not specified. Can be used to optimize performance for window size animation

◆ GetHittestGrid()

FHittestGrid & SWindow::GetHittestGrid ( )

Access the hittest acceleration data structure for this window.

The grid is filled out every time the window is painted.

参见
FHittestGrid for more details.

◆ GetInitialDesiredPositionInScreen()

FVector2D SWindow::GetInitialDesiredPositionInScreen ( ) const
返回
The initially desired size of the slate window

◆ GetInitialDesiredSizeInScreen()

FVector2D SWindow::GetInitialDesiredSizeInScreen ( ) const
返回
The initially desired screen position of the slate window

◆ GetLocalToScreenTransform()

FSlateLayoutTransform SWindow::GetLocalToScreenTransform ( ) const
返回
the transform from local space to screen space (desktop space).

◆ GetLocalToWindowTransform()

FSlateLayoutTransform SWindow::GetLocalToWindowTransform ( ) const
返回
the transform from local space to window space, which is basically desktop space without the offset. Essentially contains the DPI scale.

◆ GetMorphTargetPosition()

FVector2D SWindow::GetMorphTargetPosition ( ) const
返回
Returns the currently set morph target position

◆ GetMorphTargetShape()

FSlateRect SWindow::GetMorphTargetShape ( ) const
返回
Returns the currently set morph target shape

◆ GetNonMaximizedRectInScreen()

FSlateRect SWindow::GetNonMaximizedRectInScreen ( ) const
返回
the rectangle of the window for its non-maximized state

◆ GetOpacity()

float SWindow::GetOpacity ( ) const
返回
the window's current opacity

◆ GetParentWindow()

TSharedPtr< SWindow > SWindow::GetParentWindow ( ) const
返回
the parent of this window; Invalid shared pointer if this window is not a child

◆ GetPositionInScreen()

FVector2D SWindow::GetPositionInScreen ( ) const
返回
The position of the window in screen space

◆ GetRectInScreen()

FSlateRect SWindow::GetRectInScreen ( ) const
返回
Rectangle that this window occupies in screen space

◆ GetSizeInScreen()

FVector2D SWindow::GetSizeInScreen ( ) const
返回
the size of the window in screen pixels

◆ GetTitle()

FText SWindow::GetTitle ( ) const
inline

Grabs the current window title

返回
The window's title

◆ GetTitleBarSize()

FOptionalSize SWindow::GetTitleBarSize ( ) const

Returns the size of the title bar as a Slate size parameter.

Does not take into account application scale!

返回
Title bar size

◆ GetTransparencySupport()

EWindowTransparency SWindow::GetTransparencySupport ( ) const
返回
the level of transparency supported by this window

◆ GetType()

EWindowType SWindow::GetType ( ) const
inline

Grabs the window type

返回
The window's type

◆ GetWindowBorderSize()

FMargin SWindow::GetWindowBorderSize ( bool  bIncTitleBar = false) const

Returns the margins used for the window border.

This varies based on whether it's maximized or not.

◆ GetWindowGeometryInScreen()

FGeometry SWindow::GetWindowGeometryInScreen ( ) const

Get the Geometry that describes this window.

Windows in Slate are unique in that they know their own geometry.

◆ GetWindowGeometryInWindow()

FGeometry SWindow::GetWindowGeometryInWindow ( ) const
返回
The geometry of the window in window space (i.e. position and AbsolutePosition are 0)

◆ GetWindowMode()

EWindowMode::Type SWindow::GetWindowMode ( ) const
inline
返回
The current window mode (fullscreen, windowed, etc)

◆ GetWindowSizeFromClientSize()

FVector2D SWindow::GetWindowSizeFromClientSize ( FVector2D  InClientSize,
TOptional< float >  DPIScale = TOptional< float >() 
)

For a given client size, calculate the window size required to accommodate any potential non-OS borders and title bars

参数
InClientSizeClient size with DPI scaling already applied
DPIScaleScale that will be applied for border and title. When not supplied detects DPIScale using native or initial position.

◆ HasCloseBox()

bool SWindow::HasCloseBox ( ) const
返回
true if this window has a close button/box on the titlebar area

◆ HasFullWindowOverlayContent()

bool SWindow::HasFullWindowOverlayContent ( ) const

Checks to see if there is content assigned as a full window overlay

返回
True if there is an overlay widget assigned

◆ HasMaximizeBox()

bool SWindow::HasMaximizeBox ( ) const
返回
true if this window has a maximize button/box on the titlebar area

◆ HasMinimizeBox()

bool SWindow::HasMinimizeBox ( ) const
返回
true if this window has a minimize button/box on the titlebar area

◆ HasOSWindowBorder()

bool SWindow::HasOSWindowBorder ( ) const
inline
返回
true if the window is using the os window border instead of a slate created one

◆ HasOverlay()

bool SWindow::HasOverlay ( ) const

Check whether we have a full window overlay, used to draw content over the entire window.

返回
true if the window has an overlay

◆ HasSizingFrame()

bool SWindow::HasSizingFrame ( ) const
返回
true if this is a user-sized window with a thick edge

◆ IsAutosized()

bool SWindow::IsAutosized ( ) const
返回
true if the window is sized by the windows content

◆ IsDescendantOf()

bool SWindow::IsDescendantOf ( const TSharedPtr< SWindow > &  ParentWindow) const

Returns whether or not this window is a descendant of the specfied parent window

参数
ParentWindowThe window to check
返回
true if the window is a child of ParentWindow, false otherwise.

◆ IsFocusedInitially()

bool SWindow::IsFocusedInitially ( ) const
inline
返回
true if this window will be focused when it is first shown

◆ IsMorphing()

bool SWindow::IsMorphing ( ) const
返回
Returns true if the window is currently morphing to a new position, shape and/or opacity

◆ IsMorphingSize()

bool SWindow::IsMorphingSize ( ) const
返回
Returns true if the window is currently morphing and is morphing by size

◆ IsRegularWindow()

bool SWindow::IsRegularWindow ( ) const
返回
true if this is a vanilla window, or one being used for some special purpose: e.g. tooltip or menu

◆ IsScreenspaceMouseWithin()

bool SWindow::IsScreenspaceMouseWithin ( FVector2D  ScreenspaceMouseCoordinate) const
返回
true if mouse coordinates is within this window

◆ IsTopmostWindow()

bool SWindow::IsTopmostWindow ( ) const
返回
true if the window should be on top of all other windows; false otherwise

◆ IsUserSized()

bool SWindow::IsUserSized ( ) const
返回
true if the user decides the size of the window

◆ IsViewportSizeDrivenByWindow()

bool SWindow::IsViewportSizeDrivenByWindow ( ) const
inline

Returns whether or not the viewport and window size should be linked together.

If false, the two can be independent in cases where it is needed (e.g. mirror mode window drawing)

◆ IsVisible()

bool SWindow::IsVisible ( ) const
返回
true if the window is visible, false otherwise

◆ IsWindowMaximized()

bool SWindow::IsWindowMaximized ( ) const
返回
true if the window is maximized, false otherwise

◆ IsWindowMinimized()

bool SWindow::IsWindowMinimized ( ) const
返回
true of the window is minimized (iconic), false otherwise

◆ MakeCursorDecorator()

static TSharedRef< SWindow > SWindow::MakeCursorDecorator ( )
static

Make cursor decorator window

返回
The new SWindow

◆ MakeNotificationWindow()

static TSharedRef< SWindow > SWindow::MakeNotificationWindow ( )
static

Make a notification window

返回
The new SWindow

◆ MakeToolTipWindow()

static TSharedRef< SWindow > SWindow::MakeToolTipWindow ( )
static

Make a tool tip window

返回
The new SWindow

◆ OnCursorQuery()

virtual FCursorReply SWindow::OnCursorQuery ( const FGeometry &  MyGeometry,
const FPointerEvent &  CursorEvent 
) const
overridevirtual

The system asks each widget under the mouse to provide a cursor.

This event is bubbled.

返回
FCursorReply::Unhandled() if the event is not handled; return FCursorReply::Cursor() otherwise.

重载 SWidget .

◆ OnVisualizePopup()

virtual TSharedPtr< FPopupLayer > SWindow::OnVisualizePopup ( const TSharedRef< SWidget > &  PopupContent)
overridevirtual

Visualize a new pop-up if possible.

If it's not possible for this widget to host the pop-up content you'll get back an invalid pointer to the layer. The returned FPopupLayer allows you to remove the pop-up when you're done with it

参数
PopupContentThe widget to try and host overlaid on top of the widget.
返回
a valid FPopupLayer if this widget supported hosting it. You can call Remove() on this to destroy the pop-up.

重载 SWidget .

◆ PaintWindow()

int32 SWindow::PaintWindow ( double  CurrentTime,
float  DeltaTime,
FSlateWindowElementList &  OutDrawElements,
const FWidgetStyle &  InWidgetStyle,
bool  bParentEnabled 
)

Paint the window and all of its contents.

Not the same as Paint().

◆ RemoveOverlaySlot()

void SWindow::RemoveOverlaySlot ( const TSharedRef< SWidget > &  InContent)

Removes a widget that is being drawn over the entire window

参数
InContentThe widget to remove

◆ RequestDestroyWindow()

void SWindow::RequestDestroyWindow ( )

Request that this window be destroyed.

The window is not destroyed immediately. Instead it is placed in a queue for destruction on next Tick

◆ Resize()

void SWindow::Resize ( FVector2D  NewClientSize)

Resize the window to be dpi scaled NewClientSize immediately

参数
NewClientSizeClient size with DPI scaling already applied that does not include border or title bars.

◆ SetCachedScreenPosition()

void SWindow::SetCachedScreenPosition ( FVector2D  NewPosition)

Sets the actual screen position of the window.

THIS SHOULD ONLY BE CALLED BY THE OS

◆ SetCachedSize()

void SWindow::SetCachedSize ( FVector2D  NewSize)

Sets the actual size of the window.

THIS SHOULD ONLY BE CALLED BY THE OS

◆ SetContent()

void SWindow::SetContent ( TSharedRef< SWidget >  InContent)

Sets the widget content for this window

参数
InContentThe widget to use as content for this window

◆ SetFullWindowOverlayContent()

void SWindow::SetFullWindowOverlayContent ( TSharedPtr< SWidget >  InContent)

Sets a widget to use as a full window overlay, or clears an existing widget if set.

When set, this widget will be drawn on top of all other window content.

参数
InContentThe widget to use for full window overlay content, or nullptr for no overlay

◆ SetNativeWindow()

void SWindow::SetNativeWindow ( TSharedRef< FGenericWindow >  InNativeWindow)

Sets the native OS window associated with this SWindow

参数
InNativeWindowThe native window

◆ SetOpacity()

void SWindow::SetOpacity ( const float  InOpacity)

Sets the opacity of this window

参数
InOpacityThe new window opacity represented as a floating point scalar

◆ SetTitle()

void SWindow::SetTitle ( const FText &  InTitle)
inline

Sets the current window title

参数
InTitleThe new title of the window

◆ SetViewportSizeDrivenByWindow()

void SWindow::SetViewportSizeDrivenByWindow ( bool  bDrivenByWindow)
inline

Sets whether or not the viewport size should be driven by the window's size.

If true, the two will be the same. If false, an independent viewport size can be specified with SetIndependentViewportSize

◆ SetWidgetToFocusOnActivate()

void SWindow::SetWidgetToFocusOnActivate ( TSharedPtr< SWidget >  InWidget)
inline

Sets a widget that should become focused when this window is next activated

参数
InWidgetThe widget to set focus to when this window is activated

◆ SizeWillChangeOften()

bool SWindow::SizeWillChangeOften ( ) const
inline
返回
True if we expect the window size to change frequently. See description of bSizeWillChangeOften member variable.

◆ SupportsKeyboardFocus()

virtual bool SWindow::SupportsKeyboardFocus ( ) const
overridevirtual

Checks to see if this widget supports keyboard focus.

Override this in derived classes.

返回
True if this widget can take keyboard focus

重载 SWidget .

◆ SwitchWorlds()

int32 SWindow::SwitchWorlds ( int32  WorldId) const

Hack to switch worlds

参数
WorldIdUser ID for a world that should be restored or -1 if no restore
TheID of the world restore later

◆ Tick()

virtual void SWindow::Tick ( const FGeometry &  AllottedGeometry,
const double  InCurrentTime,
const float  InDeltaTime 
)
overridevirtual

Ticks this widget with Geometry.

Override in derived classes, but always call the parent implementation.

参数
AllottedGeometryThe space allotted for this widget
InCurrentTimeCurrent absolute real time
InDeltaTimeReal time passed since last tick

重载 SWidget .

◆ ToString()

virtual FString SWindow::ToString ( ) const
overridevirtual
返回
A String representation of the widget

重载 SWidget .

类成员变量说明

◆ bShouldShowWindowContentDuringOverlay

bool SWindow::bShouldShowWindowContentDuringOverlay
protected

Whether or not we should show content of the window which could be occluded by full screen window content.

This is used to hide content when there is a full screen overlay occluding it

◆ bSizeWillChangeOften

bool SWindow::bSizeWillChangeOften
protected

True if we expect the size of this window to change often, such as if its animated, or if it recycled for tool-tips, and we'd like to avoid costly GPU buffer resizes when that happens.

Enabling this may incur memory overhead or other platform-specific side effects

◆ ExpectedMaxHeight

int32 SWindow::ExpectedMaxHeight
protected

The expected maximum height of the window.

May be used for performance optimization when bSizeWillChangeOften is set.

◆ ExpectedMaxWidth

int32 SWindow::ExpectedMaxWidth
protected

The expected maximum width of the window.

May be used for performance optimization when bSizeWillChangeOften is set.

◆ TitleBarSize

float SWindow::TitleBarSize
protected

Size of this window's title bar.

Can be zero. Set at construction and should not be changed afterwards.

◆ ViewportSize

FVector2D SWindow::ViewportSize
protected

Size of the viewport.

If (0,0) then it is equal to Size

◆ WidgetFocusedOnDeactivate

TWeakPtr< SWidget > SWindow::WidgetFocusedOnDeactivate
protected

Widget that had keyboard focus when this window was last de-activated, if any.

This is used to restore focus to a widget after the window regains focus.

◆ WidgetToFocusOnActivate

TWeakPtr< SWidget > SWindow::WidgetToFocusOnActivate
protected

Widget to transfer keyboard focus to when this window becomes active, if any.

This is used to restore focus to a widget after a popup has been dismissed.


该类的文档由以下文件生成: