UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
FGenericWindow Class Reference

#include <GenericWindow.h>

+ Inheritance diagram for FGenericWindow:

Public Member Functions

APPLICATIONCORE_API FGenericWindow ()
 
virtual APPLICATIONCORE_API ~FGenericWindow ()
 
virtual APPLICATIONCORE_API void ReshapeWindow (int32 X, int32 Y, int32 Width, int32 Height)
 
virtual APPLICATIONCORE_API bool GetFullScreenInfo (int32 &X, int32 &Y, int32 &Width, int32 &Height) const
 
virtual APPLICATIONCORE_API void MoveWindowTo (int32 X, int32 Y)
 
virtual APPLICATIONCORE_API void BringToFront (bool bForce=false)
 
virtual APPLICATIONCORE_API void HACK_ForceToFront ()
 
virtual APPLICATIONCORE_API void Destroy ()
 
virtual APPLICATIONCORE_API void Minimize ()
 
virtual APPLICATIONCORE_API void Maximize ()
 
virtual APPLICATIONCORE_API void Restore ()
 
virtual APPLICATIONCORE_API void Show ()
 
virtual APPLICATIONCORE_API void Hide ()
 
virtual APPLICATIONCORE_API void SetWindowMode (EWindowMode::Type InNewWindowMode)
 
virtual APPLICATIONCORE_API EWindowMode::Type GetWindowMode () const
 
virtual APPLICATIONCORE_API bool IsMaximized () const
 
virtual APPLICATIONCORE_API bool IsMinimized () const
 
virtual APPLICATIONCORE_API bool IsVisible () const
 
virtual APPLICATIONCORE_API bool GetRestoredDimensions (int32 &X, int32 &Y, int32 &Width, int32 &Height)
 
virtual APPLICATIONCORE_API void SetWindowFocus ()
 
virtual APPLICATIONCORE_API void SetOpacity (const float InOpacity)
 
virtual APPLICATIONCORE_API void Enable (bool bEnable)
 
virtual APPLICATIONCORE_API bool IsPointInWindow (int32 X, int32 Y) const
 
virtual APPLICATIONCORE_API int32 GetWindowBorderSize () const
 
virtual APPLICATIONCORE_API int32 GetWindowTitleBarSize () const
 
virtual APPLICATIONCORE_API voidGetOSWindowHandle () const
 
virtual APPLICATIONCORE_API bool IsForegroundWindow () const
 
virtual APPLICATIONCORE_API bool IsFullscreenSupported () const
 
virtual APPLICATIONCORE_API void SetText (const TCHAR *const Text)
 
virtual APPLICATIONCORE_API const FGenericWindowDefinitionGetDefinition () const
 
virtual APPLICATIONCORE_API bool IsDefinitionValid () const
 
virtual APPLICATIONCORE_API void AdjustCachedSize (FVector2D &Size) const
 
virtual APPLICATIONCORE_API float GetDPIScaleFactor () const
 
virtual APPLICATIONCORE_API void SetDPIScaleFactor (const float Factor)
 
virtual APPLICATIONCORE_API bool IsManualManageDPIChanges () const
 
virtual APPLICATIONCORE_API void SetManualManageDPIChanges (const bool bAutoHandle)
 
virtual APPLICATIONCORE_API void DrawAttention (const FWindowDrawAttentionParameters &Parameters)
 
virtual APPLICATIONCORE_API void SetNativeWindowButtonsVisibility (bool bVisible)
 

Protected Attributes

TSharedPtr< FGenericWindowDefinitionDefinition
 

Constructor & Destructor Documentation

◆ FGenericWindow()

FGenericWindow::FGenericWindow ( )

◆ ~FGenericWindow()

FGenericWindow::~FGenericWindow ( )
virtual

Member Function Documentation

◆ AdjustCachedSize()

void FGenericWindow::AdjustCachedSize ( FVector2D Size) const
virtual
Returns
Gives the native window a chance to adjust our stored window size before we cache it off

Reimplemented in FLinuxWindow, FNullWindow, and FWindowsWindow.

◆ BringToFront()

void FGenericWindow::BringToFront ( bool  bForce = false)
virtual

Native windows should implement BringToFront by making this window the top-most window (i.e. focused).

Reimplemented in FLinuxWindow, FMacWindow, FNullWindow, and FWindowsWindow.

◆ Destroy()

void FGenericWindow::Destroy ( )
virtual

Native windows should implement this function by asking the OS to destroy OS-specific resource associated with the window (e.g. Win32 window handle)

Reimplemented in FAndroidWindow, FLinuxWindow, FMacWindow, FNullWindow, and FWindowsWindow.

◆ DrawAttention()

void FGenericWindow::DrawAttention ( const FWindowDrawAttentionParameters Parameters)
virtual

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 window.

Parameters
ParametersThe parameters for drawing attention. Depending on the platform, not all parameters may be supported.

Reimplemented in FNullWindow, and FWindowsWindow.

◆ Enable()

void FGenericWindow::Enable ( bool  bEnable)
virtual

Enables or disables the window. If disabled the window receives no input

Parameters
bEnabletrue to enable the window, false to disable it.

Reimplemented in FLinuxWindow, FNullWindow, and FWindowsWindow.

◆ GetDefinition()

const FGenericWindowDefinition & FGenericWindow::GetDefinition ( ) const
virtual
Returns
The definition describing properties of the window

Reimplemented in FNullWindow.

◆ GetDPIScaleFactor()

float FGenericWindow::GetDPIScaleFactor ( ) const
virtual
Returns
ratio of pixels to SlateUnits in this window. E.g. DPIScale of 2.0 means there is a 2x2 pixel square for every 1x1 SlateUnit.

Reimplemented in FLinuxWindow, FMacWindow, FNullWindow, and FWindowsWindow.

◆ GetFullScreenInfo()

bool FGenericWindow::GetFullScreenInfo ( int32 X,
int32 Y,
int32 Width,
int32 Height 
) const
virtual

Returns the rectangle of the screen the window is associated with

Reimplemented in FAndroidWindow, FIOSWindow, FLinuxWindow, FMacWindow, FNullWindow, and FWindowsWindow.

◆ GetOSWindowHandle()

void * FGenericWindow::GetOSWindowHandle ( ) const
virtual

Gets the OS Window handle in the form of a void pointer for other API's

Reimplemented in FAndroidWindow, FIOSWindow, FLinuxWindow, FMacWindow, FNullWindow, and FWindowsWindow.

◆ GetRestoredDimensions()

bool FGenericWindow::GetRestoredDimensions ( int32 X,
int32 Y,
int32 Width,
int32 Height 
)
virtual

Populates the size and location of the window when it is restored. If the function fails, false is returned and X,Y,Width,Height will be undefined.

Returns
true when the size and location and successfully retrieved; false otherwise.

Reimplemented in FLinuxWindow, FMacWindow, FNullWindow, and FWindowsWindow.

◆ GetWindowBorderSize()

int32 FGenericWindow::GetWindowBorderSize ( ) const
virtual

Gets OS specific window border size. This is necessary because Win32 does not give control over this size.

Reimplemented in FLinuxWindow, FMacWindow, FNullWindow, and FWindowsWindow.

◆ GetWindowMode()

EWindowMode::Type FGenericWindow::GetWindowMode ( ) const
virtual
Returns
true if the native window is currently in fullscreen mode, false otherwise

Reimplemented in FAndroidWindow, FIOSWindow, FLinuxWindow, FMacWindow, FNullWindow, and FWindowsWindow.

◆ GetWindowTitleBarSize()

int32 FGenericWindow::GetWindowTitleBarSize ( ) const
virtual

Gets OS specific window title bar size

Reimplemented in FNullWindow, and FWindowsWindow.

◆ HACK_ForceToFront()

void FGenericWindow::HACK_ForceToFront ( )
virtual

@hack Force a window to front even if a different application is in front.

Reimplemented in FNullWindow, and FWindowsWindow.

◆ Hide()

void FGenericWindow::Hide ( )
virtual

Native window should hide itself

Reimplemented in FLinuxWindow, FMacWindow, FNullWindow, and FWindowsWindow.

◆ IsDefinitionValid()

bool FGenericWindow::IsDefinitionValid ( ) const
virtual
Returns
Returns true if the window definition is valid

Reimplemented in FNullWindow.

◆ IsForegroundWindow()

bool FGenericWindow::IsForegroundWindow ( ) const
virtual
Returns
true if the window is in the foreground

Reimplemented in FLinuxWindow, FMacWindow, FNullWindow, and FWindowsWindow.

◆ IsFullscreenSupported()

bool FGenericWindow::IsFullscreenSupported ( ) const
virtual
Returns
true if the window is in the foreground

Reimplemented in FNullWindow, and FWindowsWindow.

◆ IsManualManageDPIChanges()

bool FGenericWindow::IsManualManageDPIChanges ( ) const
virtual

determines whether or not this window does its own DPI management

Reimplemented in FNullWindow, and FWindowsWindow.

◆ IsMaximized()

bool FGenericWindow::IsMaximized ( ) const
virtual
Returns
true if the native window is maximized, false otherwise

Reimplemented in FLinuxWindow, FMacWindow, FNullWindow, and FWindowsWindow.

◆ IsMinimized()

bool FGenericWindow::IsMinimized ( ) const
virtual
Returns
true if the native window is minimized, false otherwise

Reimplemented in FLinuxWindow, FMacWindow, FNullWindow, and FWindowsWindow.

◆ IsPointInWindow()

bool FGenericWindow::IsPointInWindow ( int32  X,
int32  Y 
) const
virtual
Returns
true if native window exists underneath the coordinates

Reimplemented in FLinuxWindow, FMacWindow, FNullWindow, and FWindowsWindow.

◆ IsVisible()

bool FGenericWindow::IsVisible ( ) const
virtual
Returns
true if the native window is visible, false otherwise

Reimplemented in FLinuxWindow, FMacWindow, FNullWindow, and FWindowsWindow.

◆ Maximize()

void FGenericWindow::Maximize ( )
virtual

Native window should implement this function by performing the equivalent of the Win32 maximize operation

Reimplemented in FLinuxWindow, FMacWindow, FNullWindow, and FWindowsWindow.

◆ Minimize()

void FGenericWindow::Minimize ( )
virtual

Native window should implement this function by performing the equivalent of the Win32 minimize-to-taskbar operation

Reimplemented in FLinuxWindow, FMacWindow, FNullWindow, and FWindowsWindow.

◆ MoveWindowTo()

void FGenericWindow::MoveWindowTo ( int32  X,
int32  Y 
)
virtual

Native windows should implement MoveWindowTo by relocating the platform-specific window to (X,Y).

Reimplemented in FLinuxWindow, FMacWindow, FNullWindow, and FWindowsWindow.

◆ ReshapeWindow()

void FGenericWindow::ReshapeWindow ( int32  X,
int32  Y,
int32  Width,
int32  Height 
)
virtual

Native windows should implement ReshapeWindow by changing the platform-specific window to be located at (X,Y) and be the dimensions Width x Height.

Reimplemented in FLinuxWindow, FMacWindow, FNullWindow, and FWindowsWindow.

◆ Restore()

void FGenericWindow::Restore ( )
virtual

Native window should implement this function by performing the equivalent of the Win32 restore operation

Reimplemented in FLinuxWindow, FMacWindow, FNullWindow, and FWindowsWindow.

◆ SetDPIScaleFactor()

void FGenericWindow::SetDPIScaleFactor ( const float  Factor)
virtual

sets a new DPI scale factor

Reimplemented in FLinuxWindow, FNullWindow, and FWindowsWindow.

◆ SetManualManageDPIChanges()

void FGenericWindow::SetManualManageDPIChanges ( const bool  bAutoHandle)
virtual

call with a true argument if this window need to do its custom size management in response to DPI variations

Reimplemented in FNullWindow, and FWindowsWindow.

◆ SetNativeWindowButtonsVisibility()

void FGenericWindow::SetNativeWindowButtonsVisibility ( bool  bVisible)
virtual

Shows or hides native window buttons on platforms that use them

Reimplemented in FMacWindow, and FNullWindow.

◆ SetOpacity()

void FGenericWindow::SetOpacity ( const float  InOpacity)
virtual

Sets the opacity of this window

Parameters
InOpacityThe new window opacity represented as a floating point scalar

Reimplemented in FLinuxWindow, FMacWindow, FNullWindow, and FWindowsWindow.

◆ SetText()

void FGenericWindow::SetText ( const TCHAR *const  Text)
virtual

Sets the window text - usually the title but can also be text content for things like controls

Parameters
TextThe window's title or content text

Reimplemented in FLinuxWindow, FMacWindow, FNullWindow, and FWindowsWindow.

◆ SetWindowFocus()

void FGenericWindow::SetWindowFocus ( )
virtual

Native windows should implement SetWindowFocus to let the OS know that a window has taken focus.
Slate handles focus on a per widget basis internally but the OS still needs to know what window has focus for proper message routing

Reimplemented in FLinuxWindow, FMacWindow, FNullWindow, and FWindowsWindow.

◆ SetWindowMode()

void FGenericWindow::SetWindowMode ( EWindowMode::Type  InNewWindowMode)
virtual

Toggle native window between fullscreen and normal mode

Reimplemented in FAndroidWindow, FNullWindow, FLinuxWindow, FMacWindow, and FWindowsWindow.

◆ Show()

void FGenericWindow::Show ( )
virtual

Native window should make itself visible

Reimplemented in FLinuxWindow, FMacWindow, FNullWindow, and FWindowsWindow.

Member Data Documentation

◆ Definition

TSharedPtr< FGenericWindowDefinition > FGenericWindow::Definition
protected

The documentation for this class was generated from the following files: