Base class for Slate applications. 更多...
#include <SlateApplicationBase.h>
被 FSlateApplication 继承.
Public 成员函数 | |
| virtual TSharedRef< SWindow > | AddWindow (TSharedRef< SWindow > InSlateWindow, const bool bShowImmediately=true)=0 |
| Associates a top level Slate Window with a native window and ensures that it is tracked properly by the application. 更多... | |
| virtual bool | AnyMenusVisible () const =0 |
| virtual void | ArrangeWindowToFrontVirtual (TArray< TSharedRef< SWindow > > &Windows, const TSharedRef< SWindow > &WindowToBringToFront)=0 |
| Reorders an array of windows so the specified window is "brought to the front" | |
| virtual FVector2D | CalculateTooltipWindowPosition (const FSlateRect &InAnchorRect, const FVector2D &InSize, bool bAutoAdjustForDPIScale) const =0 |
| Calculates the tooltip window position. 更多... | |
| DECLARE_EVENT_OneParam (FSlateApplicationBase, FOnInvalidateAllWidgets, bool) | |
| Gets a delegate that is invoked when a global invalidate of all widgets should occur | |
| virtual bool | FindPathToWidget (TSharedRef< const SWidget > InWidget, FWidgetPath &OutWidgetPath, EVisibility VisibilityFilter=EVisibility::Visible)=0 |
| Searches for the specified widget and generates a full path to it. 更多... | |
| virtual TSharedPtr< SWindow > | FindWidgetWindow (TSharedRef< const SWidget > InWidget) const =0 |
| Returns the window the provided widget is contained in 更多... | |
| virtual TSharedPtr< SWindow > | GetActiveTopLevelWindow () const =0 |
| Gets the active top-level window. 更多... | |
| virtual const FSlateBrush * | GetAppIcon () const =0 |
| Gets the global application icon. 更多... | |
| virtual float | GetApplicationScale () const =0 |
| Gets the ratio SlateUnit / ScreenPixel. 更多... | |
| void | GetCachedDisplayMetrics (FDisplayMetrics &OutDisplayMetrics) const |
| Gets the application's cached display metrics. 更多... | |
| virtual const double | GetCurrentTime () const =0 |
| Gets Slate's current cached real time. 更多... | |
| virtual FVector2D | GetCursorPos () const =0 |
| Gets the current position of the cursor. 更多... | |
| virtual FVector2D | GetCursorSize () const =0 |
| Gets the size of the cursor. 更多... | |
| void | GetDisplayMetrics (FDisplayMetrics &OutDisplayMetrics) |
| Gets the application's display metrics. 更多... | |
| virtual TSharedPtr< SWidget > | GetKeyboardFocusedWidget () const =0 |
| Gets the widget that currently has keyboard focus, if any. 更多... | |
| virtual FVector2D | GetLastCursorPos () const =0 |
| Gets the last known position of the cursor. 更多... | |
| virtual const TSharedPtr< GenericApplication > | GetPlatformApplication () const |
| Gets the platform application. 更多... | |
| virtual FSlateRect | GetPreferredWorkArea () const =0 |
| Gets the rectangle of the current preferred work area. 更多... | |
| FORCEINLINE FSlateRenderer * | GetRenderer () const |
| Gets the renderer being used to draw this application. 更多... | |
| virtual bool | GetSoftwareCursorAvailable () const =0 |
| Whether the software cursor is enabled for this application. 更多... | |
| virtual EVisibility | GetSoftwareCursorVis () const =0 |
| Gets the desired visibility of the software cursor 更多... | |
| virtual const TArray< TSharedRef< SWindow > > | GetTopLevelWindows () const =0 |
| Get a list of all top-level windows in the application, excluding virtual windows. 更多... | |
| virtual TSharedPtr< SWidget > | GetUserFocusedWidget (uint32 UserIndex) const =0 |
| virtual EWindowTransparency | GetWindowTransparencySupport () const =0 |
| Get the highest level of window transparency support currently enabled by this application 更多... | |
| virtual bool | HasAnyMouseCaptor () const =0 |
| Gets whether or not a widget has captured the mouse. 更多... | |
| virtual bool | HasFocusedDescendants (const TSharedRef< const SWidget > &Widget) const =0 |
| Checks whether the specified widget has any descendants which are currently focused. 更多... | |
| virtual bool | HasUserFocusedDescendants (const TSharedRef< const SWidget > &Widget, int32 UserIndex) const =0 |
| Checks whether the specified widget has any descendants which are currently focused for the specified user user. 更多... | |
| virtual bool | HasUserMouseCapture (int32 UserIndex) const =0 |
| Gets whether or not a widget has captured the mouse for a particular user. 更多... | |
| void | InvalidateAllWidgets (bool bClearResourcesImmediately) const |
| Notifies all invalidation panels that they should invalidate their contents Note: this is a very expensive call and should only be done in non-performance critical situations | |
| virtual bool | IsActive () const =0 |
| Whether the application is active. 更多... | |
| virtual bool | IsExternalUIOpened ()=0 |
| Checks whether an UI for external services such as Steam is open. 更多... | |
| bool | IsSlateAsleep () |
| Is Slate currently sleeping or not. 更多... | |
| virtual bool | IsWindowHousingInteractiveTooltip (const TSharedRef< const SWindow > &WindowToTest) const =0 |
| virtual FWidgetPath | LocateWindowUnderMouse (FVector2D ScreenspaceMouseCoordinate, const TArray< TSharedRef< SWindow > > &Windows, bool bIgnoreEnabledStatus=false, int32 UserIndex=INDEX_NONE)=0 |
| Given the screen-space coordinate of the mouse cursor, searches for a string of widgets that are under the mouse. 更多... | |
| virtual TSharedRef< SImage > | MakeImage (const TAttribute< const FSlateBrush * > &Image, const TAttribute< FSlateColor > &Color, const TAttribute< EVisibility > &Visibility) const =0 |
| Creates an image widget. 更多... | |
| virtual TSharedRef< IToolTip > | MakeToolTip (const FText &ToolTipText)=0 |
| Creates a tool tip with the specified text. 更多... | |
| virtual TSharedRef< IToolTip > | MakeToolTip (const TAttribute< FText > &ToolTipText)=0 |
| Creates a tool tip with the specified text. 更多... | |
| virtual TSharedRef< SWidget > | MakeWindowTitleBar (const FWindowTitleBarArgs &InArgs, TSharedPtr< IWindowTitleBar > &OutTitleBar) const =0 |
| Creates a title bar for the specified window. 更多... | |
| virtual TSharedRef< SWidget > | MakeWindowTitleBar (const TSharedRef< SWindow > &Window, const TSharedPtr< SWidget > &CenterContent, EHorizontalAlignment CenterContentAlignment, TSharedPtr< IWindowTitleBar > &OutTitleBar) const |
| Creates a title bar for the specified window. 更多... | |
| virtual void | RequestDestroyWindow (TSharedRef< SWindow > WindowToDestroy)=0 |
| Destroying windows has implications on some OSs (e.g. 更多... | |
| virtual void | SetAllUserFocus (const FWidgetPath &InFocusPath, const EFocusCause InCause)=0 |
| Sets the focus for all users to the specified widget. 更多... | |
| virtual void | SetAllUserFocusAllowingDescendantFocus (const FWidgetPath &InFocusPath, const EFocusCause InCause)=0 |
| Sets the focus for all users to the specified widget unless that user is focused on a descendant. 更多... | |
| virtual bool | SetKeyboardFocus (const FWidgetPath &InFocusPath, const EFocusCause InCause)=0 |
| Sets keyboard focus to the specified widget. 更多... | |
| virtual bool | SetUserFocus (const uint32 InUserIndex, const FWidgetPath &InFocusPath, const EFocusCause InCause)=0 |
| Sets user focus to the specified widget. 更多... | |
静态 Public 成员函数 | |
| static FSlateApplicationBase & | Get () |
| Returns the current instance of the application. 更多... | |
| static bool | IsInitialized () |
| Returns true if a Slate application instance is currently initialized and ready 更多... | |
Protected 成员函数 | |
| bool | AnyActiveTimersArePending () |
| Used to determine if any active timer handles are ready to fire. 更多... | |
| virtual bool | DoesWidgetHaveMouseCapture (const TSharedPtr< const SWidget > Widget) const =0 |
| Gets whether or not a particular widget has mouse capture. 更多... | |
| virtual bool | DoesWidgetHaveMouseCaptureByUser (const TSharedPtr< const SWidget > Widget, int32 UserIndex, TOptional< int32 > PointerIndex) const =0 |
| Gets whether or not a particular widget has mouse capture by a user. 更多... | |
| virtual TSharedPtr< SWidget > | GetMouseCaptorImpl () const =0 |
| Implementation of GetMouseCaptor which can be overridden without warnings. 更多... | |
| virtual TOptional< EFocusCause > | HasAnyUserFocus (const TSharedPtr< const SWidget > Widget) const =0 |
| Gets whether or not a particular widget has any users focus, and if so the type of focus (first one found). 更多... | |
| virtual TOptional< EFocusCause > | HasUserFocus (const TSharedPtr< const SWidget > Widget, int32 UserIndex) const =0 |
| Gets whether or not a particular widget has the specified users focus, and if so the type of focus. 更多... | |
| virtual bool | IsWidgetDirectlyHovered (const TSharedPtr< const SWidget > Widget) const =0 |
| Gets whether or not a particular widget is directly hovered. 更多... | |
| virtual FWidgetPath | LocateWidgetInWindow (FVector2D ScreenspaceMouseCoordinate, const TSharedRef< SWindow > &Window, bool bIgnoreEnabledStatus, int32 UserIndex) const =0 |
| Given a window, locate a widget under the cursor in it; returns an invalid path if cursor is not over this window. | |
| virtual bool | ShowUserFocus (const TSharedPtr< const SWidget > Widget) const =0 |
| Gets whether or not a particular widget should show user focus. 更多... | |
Protected 属性 | |
| FCriticalSection | ActiveTimerCS |
| Critical section for active timer registration as it can be called from the movie thread and the game thread | |
| FOnInvalidateAllWidgets | OnInvalidateAllWidgetsEvent |
| multicast delegate to broadcast when a global invalidate is requested | |
友元 | |
| class | FHitTesting |
| class | SWidget |
Base class for Slate applications.
This class currently serves a temporary workaround for solving SlateCore dependencies to FSlateApplication. It should probably be removed once FSlateApplication has been refactored into SlateCore.
|
pure virtual |
Associates a top level Slate Window with a native window and ensures that it is tracked properly by the application.
Calling this method will cause the window to be displayed (unless specified otherwise), so be sure to associate content with the window object you're passing in first!
| InSlateWindow | A SlateWindow to which to add a native window. |
| bShowImmediately | true to show the window, false if you're going to call ShowWindow() yourself later. |
|
protected |
Used to determine if any active timer handles are ready to fire.
Means we need to tick slate even if no user interaction.
|
pure virtual |
|
pure virtual |
Calculates the tooltip window position.
| InAnchorRect | The current(suggested) window position and size of an area which may not be covered by the popup. |
| InSize | The size of the tooltip window. |
|
protectedpure virtual |
Gets whether or not a particular widget has mouse capture.
|
protectedpure virtual |
Gets whether or not a particular widget has mouse capture by a user.
|
pure virtual |
Searches for the specified widget and generates a full path to it.
Note: this is a relatively slow operation!
| InWidget | Widget to generate a path to |
| OutWidgetPath | The generated widget path |
| VisibilityFilter | Widgets must have this type of visibility to be included the path |
|
pure virtual |
Returns the window the provided widget is contained in
| InWidget | Widget to find the window for |
|
inlinestatic |
Returns the current instance of the application.
The application should have been initialized before this method is called
|
pure virtual |
Gets the active top-level window.
|
pure virtual |
Gets the global application icon.
|
pure virtual |
Gets the ratio SlateUnit / ScreenPixel.
| void FSlateApplicationBase::GetCachedDisplayMetrics | ( | FDisplayMetrics & | OutDisplayMetrics | ) | const |
Gets the application's cached display metrics.
| OutDisplayMetrics | Will contain the display metrics. |
|
pure virtual |
Gets Slate's current cached real time.
This time value is updated every frame right before we tick widgets and is the recommended time value to use for UI animations and transitions, as opposed to calling FPlatformTime::Seconds() (which is generally slower)
|
pure virtual |
Gets the current position of the cursor.
|
pure virtual |
Gets the size of the cursor.
| void FSlateApplicationBase::GetDisplayMetrics | ( | FDisplayMetrics & | OutDisplayMetrics | ) |
Gets the application's display metrics.
| OutDisplayMetrics | Will contain the display metrics. |
|
pure virtual |
Gets the widget that currently has keyboard focus, if any.
|
pure virtual |
Gets the last known position of the cursor.
|
protectedpure virtual |
Implementation of GetMouseCaptor which can be overridden without warnings.
|
inlinevirtual |
Gets the platform application.
|
pure virtual |
Gets the rectangle of the current preferred work area.
|
inline |
Gets the renderer being used to draw this application.
|
pure virtual |
Whether the software cursor is enabled for this application.
|
pure virtual |
Gets the desired visibility of the software cursor
|
pure virtual |
Get a list of all top-level windows in the application, excluding virtual windows.
|
pure virtual |
|
pure virtual |
Get the highest level of window transparency support currently enabled by this application
|
pure virtual |
Gets whether or not a widget has captured the mouse.
|
protectedpure virtual |
Gets whether or not a particular widget has any users focus, and if so the type of focus (first one found).
|
pure virtual |
Checks whether the specified widget has any descendants which are currently focused.
| Widget | The widget to check. |
|
protectedpure virtual |
Gets whether or not a particular widget has the specified users focus, and if so the type of focus.
|
pure virtual |
Checks whether the specified widget has any descendants which are currently focused for the specified user user.
| Widget | The widget to check. |
| InUserIndex | Index of the user that we want to check for. |
|
pure virtual |
Gets whether or not a widget has captured the mouse for a particular user.
|
pure virtual |
Whether the application is active.
|
pure virtual |
Checks whether an UI for external services such as Steam is open.
|
inlinestatic |
Returns true if a Slate application instance is currently initialized and ready
| bool FSlateApplicationBase::IsSlateAsleep | ( | ) |
Is Slate currently sleeping or not.
|
protectedpure virtual |
Gets whether or not a particular widget is directly hovered.
Directly hovered means that the widget is directly under the pointer, is not true for ancestors tho they are Hovered.
|
pure virtual |
|
pure virtual |
Given the screen-space coordinate of the mouse cursor, searches for a string of widgets that are under the mouse.
The widgets will be returned with the associated geometry. The first item will always be the top-level window while the last item will be the leaf-most widget.
|
pure virtual |
Creates an image widget.
|
pure virtual |
Creates a tool tip with the specified text.
| ToolTipText | The text to assign to the tool tip. |
|
pure virtual |
Creates a tool tip with the specified text.
| ToolTipText | The text attribute to assign to the tool tip. |
|
pure virtual |
Creates a title bar for the specified window.
| InArgs | The creation arguments for the titlebar |
| OutTitleBar | Will hold a pointer to the title bar's interface. |
|
virtual |
Creates a title bar for the specified window.
| Window | The window to create the title bar for. |
| CenterContent | Optional content for the title bar's center (will override window title). |
| CenterContentAlignment | The horizontal alignment of the center content. |
| OutTitleBar | Will hold a pointer to the title bar's interface. |
|
pure virtual |
Destroying windows has implications on some OSs (e.g.
destroying Win32 HWNDs can cause events to be lost).
Slate strictly controls when windows are destroyed.
| WindowToDestroy | The window to queue for destruction. |
|
pure virtual |
Sets the focus for all users to the specified widget.
The widget must be allowed to receive focus.
| InWidget | WidgetPath to the Widget to being focused. |
| InCause | The reason that focus is changing. |
|
pure virtual |
Sets the focus for all users to the specified widget unless that user is focused on a descendant.
The widget must be allowed to receive focus.
| InWidget | WidgetPath to the Widget to being focused. |
| InCause | The reason that focus is changing. |
|
pure virtual |
Sets keyboard focus to the specified widget.
The widget must be allowed to receive keyboard focus.
| InWidget | WidgetPath to the Widget to being focused |
| InCause | The reason that keyboard focus is changing |
|
pure virtual |
Sets user focus to the specified widget.
The widget must be allowed to receive focus.
| InUserIndex | Index of the user that we want to change the focus of. |
| InWidget | WidgetPath to the Widget to being focused. |
| InCause | The reason that focus is changing. |
|
protectedpure virtual |
Gets whether or not a particular widget should show user focus.
|
friend |