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

#include <LinuxWindow.h>

+ Inheritance diagram for FLinuxWindow:

Public Types

enum  NativeResizeDirection {
  ResizeSouthWest = 0 , ResizeSouth , ResizeSouthEast , ResizeEast ,
  ResizeNorthEast , ResizeNorth , ResizeNorthWest , ResizeWest ,
  InvalidDirection
}
 

Public Member Functions

APPLICATIONCORE_API ~FLinuxWindow ()
 
APPLICATIONCORE_API SDL_HWindow GetHWnd () const
 
APPLICATIONCORE_API void Initialize (class FLinuxApplication *const Application, const TSharedRef< FGenericWindowDefinition > &InDefinition, const TSharedPtr< FLinuxWindow > &InParent, const bool bShowImmediately)
 
APPLICATIONCORE_API bool IsRegularWindow () const
 
APPLICATIONCORE_API bool IsPopupMenuWindow () const
 
APPLICATIONCORE_API bool IsTooltipWindow () const
 
APPLICATIONCORE_API bool IsNotificationWindow () const
 
APPLICATIONCORE_API bool IsTopLevelWindow () const
 
APPLICATIONCORE_API bool IsModalWindow () const
 
APPLICATIONCORE_API bool IsDialogWindow () const
 
APPLICATIONCORE_API bool IsDragAndDropWindow () const
 
APPLICATIONCORE_API bool IsUtilityWindow () const
 
APPLICATIONCORE_API EWindowActivationPolicy GetActivationPolicy () const
 
APPLICATIONCORE_API bool IsFocusWhenFirstShown () const
 
APPLICATIONCORE_API const TSharedPtr< FLinuxWindow > & GetParent () const
 
APPLICATIONCORE_API uint32 GetID () const
 
APPLICATIONCORE_API void LogInfo ()
 
APPLICATIONCORE_API bool IsNativeMoving () const
 
APPLICATIONCORE_API bool BeginNativeMove ()
 
APPLICATIONCORE_API void AfterNativeMove ()
 
APPLICATIONCORE_API void EndNativeMove ()
 
APPLICATIONCORE_API bool IsNativeResizing () const
 
APPLICATIONCORE_API bool BeginNativeResize (NativeResizeDirection Direction)
 
APPLICATIONCORE_API void AfterNativeResize ()
 
APPLICATIONCORE_API void EndNativeResize ()
 
virtual APPLICATIONCORE_API void ReshapeWindow (int32 X, int32 Y, int32 Width, int32 Height) override
 
virtual voidGetOSWindowHandle () const override
 
virtual APPLICATIONCORE_API bool GetFullScreenInfo (int32 &X, int32 &Y, int32 &Width, int32 &Height) const override
 
virtual APPLICATIONCORE_API void MoveWindowTo (int32 X, int32 Y) override
 
virtual APPLICATIONCORE_API void BringToFront (bool bForce=false) override
 
virtual APPLICATIONCORE_API void Destroy () override
 
virtual APPLICATIONCORE_API void Minimize () override
 
virtual APPLICATIONCORE_API void Maximize () override
 
virtual APPLICATIONCORE_API void Restore () override
 
virtual APPLICATIONCORE_API void Show () override
 
virtual APPLICATIONCORE_API void Hide () override
 
virtual APPLICATIONCORE_API void SetWindowMode (EWindowMode::Type NewWindowMode) override
 
virtual EWindowMode::Type GetWindowMode () const override
 
virtual APPLICATIONCORE_API bool IsMaximized () const override
 
virtual APPLICATIONCORE_API bool IsVisible () const override
 
virtual APPLICATIONCORE_API bool IsMinimized () const override
 
virtual APPLICATIONCORE_API bool GetRestoredDimensions (int32 &X, int32 &Y, int32 &Width, int32 &Height) override
 
virtual APPLICATIONCORE_API void SetWindowFocus () override
 
virtual APPLICATIONCORE_API void SetOpacity (const float InOpacity) override
 
virtual APPLICATIONCORE_API void Enable (bool bEnable) override
 
virtual APPLICATIONCORE_API bool IsPointInWindow (int32 X, int32 Y) const override
 
virtual APPLICATIONCORE_API int32 GetWindowBorderSize () const override
 
virtual APPLICATIONCORE_API bool IsForegroundWindow () const override
 
virtual APPLICATIONCORE_API void SetText (const TCHAR *const Text) override
 
virtual APPLICATIONCORE_API void AdjustCachedSize (FVector2D &Size) const override
 
virtual float GetDPIScaleFactor () const override
 
virtual void SetDPIScaleFactor (float Value) override
 
APPLICATIONCORE_API void GetNativeBordersSize (int32 &OutLeftBorderWidth, int32 &OutTopBorderHeight) const
 
APPLICATIONCORE_API void CacheNativeProperties ()
 
- Public Member Functions inherited from FGenericWindow
APPLICATIONCORE_API FGenericWindow ()
 
virtual APPLICATIONCORE_API ~FGenericWindow ()
 
virtual APPLICATIONCORE_API void HACK_ForceToFront ()
 
virtual APPLICATIONCORE_API int32 GetWindowTitleBarSize () const
 
virtual APPLICATIONCORE_API bool IsFullscreenSupported () const
 
virtual APPLICATIONCORE_API const FGenericWindowDefinitionGetDefinition () const
 
virtual APPLICATIONCORE_API bool IsDefinitionValid () const
 
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)
 

Static Public Member Functions

static APPLICATIONCORE_API TSharedRef< FLinuxWindowMake ()
 

Additional Inherited Members

- Protected Attributes inherited from FGenericWindow
TSharedPtr< FGenericWindowDefinitionDefinition
 

Detailed Description

A platform specific implementation of FNativeWindow. Native Windows provide platform-specific backing for and are always owned by an SWindow.

Member Enumeration Documentation

◆ NativeResizeDirection

Enumerator
ResizeSouthWest 
ResizeSouth 
ResizeSouthEast 
ResizeEast 
ResizeNorthEast 
ResizeNorth 
ResizeNorthWest 
ResizeWest 
InvalidDirection 

Constructor & Destructor Documentation

◆ ~FLinuxWindow()

FLinuxWindow::~FLinuxWindow ( )

Member Function Documentation

◆ AdjustCachedSize()

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

Reimplemented from FGenericWindow.

◆ AfterNativeMove()

APPLICATIONCORE_API void FLinuxWindow::AfterNativeMove ( )

◆ AfterNativeResize()

APPLICATIONCORE_API void FLinuxWindow::AfterNativeResize ( )

◆ BeginNativeMove()

APPLICATIONCORE_API bool FLinuxWindow::BeginNativeMove ( )

◆ BeginNativeResize()

APPLICATIONCORE_API bool FLinuxWindow::BeginNativeResize ( NativeResizeDirection  Direction)

◆ BringToFront()

void FLinuxWindow::BringToFront ( bool  bForce = false)
overridevirtual

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

Parameters
bForceForces the window to the top of the Z order, even if that means stealing focus from other windows In general do not pass true for this. It is really only useful for some windows, like game windows where not forcing it to the front could cause mouse capture and mouse lock to happen but without the window visible

Reimplemented from FGenericWindow.

◆ CacheNativeProperties()

void FLinuxWindow::CacheNativeProperties ( )

Caches window properties that are too expensive to query all the time. (e.g. border sizes)

◆ Destroy()

void FLinuxWindow::Destroy ( )
overridevirtual

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 from FGenericWindow.

◆ Enable()

void FLinuxWindow::Enable ( bool  bEnable)
overridevirtual

Enables or disables this window. When disabled, a window will receive no input.

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

Reimplemented from FGenericWindow.

◆ EndNativeMove()

APPLICATIONCORE_API void FLinuxWindow::EndNativeMove ( )

◆ EndNativeResize()

APPLICATIONCORE_API void FLinuxWindow::EndNativeResize ( )

◆ GetActivationPolicy()

EWindowActivationPolicy FLinuxWindow::GetActivationPolicy ( ) const
Returns
the window activation policy used when showing the window

◆ GetDPIScaleFactor()

virtual float FLinuxWindow::GetDPIScaleFactor ( ) const
inlineoverridevirtual
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 from FGenericWindow.

◆ GetFullScreenInfo()

bool FLinuxWindow::GetFullScreenInfo ( int32 X,
int32 Y,
int32 Width,
int32 Height 
) const
overridevirtual

Returns the rectangle of the screen the window is associated with

Reimplemented from FGenericWindow.

◆ GetHWnd()

SDL_HWindow FLinuxWindow::GetHWnd ( ) const

◆ GetID()

uint32 FLinuxWindow::GetID ( ) const

Internal ID using for debugging

◆ GetNativeBordersSize()

void FLinuxWindow::GetNativeBordersSize ( int32 OutLeftBorderWidth,
int32 OutTopBorderHeight 
) const

Returns window border sizes (frame extents).

Parameters
BorderWidth- width of a vertical border (left side)
BorderHeight- height of a horizontal border (from the top)

◆ GetOSWindowHandle()

virtual void * FLinuxWindow::GetOSWindowHandle ( ) const
inlineoverridevirtual

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

Reimplemented from FGenericWindow.

◆ GetParent()

const TSharedPtr< FLinuxWindow > & FLinuxWindow::GetParent ( ) const

TODO: describe

◆ GetRestoredDimensions()

bool FLinuxWindow::GetRestoredDimensions ( int32 X,
int32 Y,
int32 Width,
int32 Height 
)
overridevirtual

Returns the size and location of the window when it is restored

Reimplemented from FGenericWindow.

◆ GetWindowBorderSize()

int32 FLinuxWindow::GetWindowBorderSize ( ) const
overridevirtual

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

Reimplemented from FGenericWindow.

◆ GetWindowMode()

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

Reimplemented from FGenericWindow.

◆ Hide()

void FLinuxWindow::Hide ( )
overridevirtual

Native window should hide itself

Reimplemented from FGenericWindow.

◆ Initialize()

void FLinuxWindow::Initialize ( class FLinuxApplication *const  Application,
const TSharedRef< FGenericWindowDefinition > &  InDefinition,
const TSharedPtr< FLinuxWindow > &  InParent,
const bool  bShowImmediately 
)

◆ IsDialogWindow()

bool FLinuxWindow::IsDialogWindow ( ) const

TODO: describe

◆ IsDragAndDropWindow()

bool FLinuxWindow::IsDragAndDropWindow ( ) const

TODO: describe

◆ IsFocusWhenFirstShown()

bool FLinuxWindow::IsFocusWhenFirstShown ( ) const

TODO: describe

◆ IsForegroundWindow()

bool FLinuxWindow::IsForegroundWindow ( ) const
overridevirtual
Returns
true if the window is in the foreground

Reimplemented from FGenericWindow.

◆ IsMaximized()

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

Reimplemented from FGenericWindow.

◆ IsMinimized()

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

Reimplemented from FGenericWindow.

◆ IsModalWindow()

bool FLinuxWindow::IsModalWindow ( ) const
Returns
true if this is a modal window

◆ IsNativeMoving()

APPLICATIONCORE_API bool FLinuxWindow::IsNativeMoving ( ) const

◆ IsNativeResizing()

APPLICATIONCORE_API bool FLinuxWindow::IsNativeResizing ( ) const

◆ IsNotificationWindow()

bool FLinuxWindow::IsNotificationWindow ( ) const

TODO: describe

◆ IsPointInWindow()

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

Reimplemented from FGenericWindow.

◆ IsPopupMenuWindow()

bool FLinuxWindow::IsPopupMenuWindow ( ) const

TODO: describe

◆ IsRegularWindow()

bool FLinuxWindow::IsRegularWindow ( ) const

TODO: describe

◆ IsTooltipWindow()

bool FLinuxWindow::IsTooltipWindow ( ) const

TODO: describe

◆ IsTopLevelWindow()

bool FLinuxWindow::IsTopLevelWindow ( ) const

TODO: describe

◆ IsUtilityWindow()

bool FLinuxWindow::IsUtilityWindow ( ) const

TODO: describe

◆ IsVisible()

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

Reimplemented from FGenericWindow.

◆ LogInfo()

void FLinuxWindow::LogInfo ( )

Debugging function - dumps window info to log

◆ Make()

TSharedRef< FLinuxWindow > FLinuxWindow::Make ( )
static

Create a new SDLWindow.

Parameters
SlateWindowsList of all top level Slate windows. This function will add the owner window to this list.
OwnerWindowThe SlateWindow for which we are crating a backing Win32Window
InHInstanceWin32 application instance handle
InParentParent Win32 window; usually NULL.
bShowImmediatelyTrue to show this window as soon as its initialized

◆ Maximize()

void FLinuxWindow::Maximize ( )
overridevirtual

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

Reimplemented from FGenericWindow.

◆ Minimize()

void FLinuxWindow::Minimize ( )
overridevirtual

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

Reimplemented from FGenericWindow.

◆ MoveWindowTo()

void FLinuxWindow::MoveWindowTo ( int32  X,
int32  Y 
)
overridevirtual

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

Reimplemented from FGenericWindow.

◆ ReshapeWindow()

void FLinuxWindow::ReshapeWindow ( int32  X,
int32  Y,
int32  Width,
int32  Height 
)
overridevirtual

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 from FGenericWindow.

◆ Restore()

void FLinuxWindow::Restore ( )
overridevirtual

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

Reimplemented from FGenericWindow.

◆ SetDPIScaleFactor()

virtual void FLinuxWindow::SetDPIScaleFactor ( float  Factor)
inlineoverridevirtual

sets a new DPI scale factor

Reimplemented from FGenericWindow.

◆ SetOpacity()

void FLinuxWindow::SetOpacity ( const float  InOpacity)
overridevirtual

Sets the opacity of this window

Parameters
InOpacityThe new window opacity represented as a floating point scalar

Reimplemented from FGenericWindow.

◆ SetText()

void FLinuxWindow::SetText ( const TCHAR *const  Text)
overridevirtual

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 from FGenericWindow.

◆ SetWindowFocus()

void FLinuxWindow::SetWindowFocus ( )
overridevirtual

Sets focus on the native window

Reimplemented from FGenericWindow.

◆ SetWindowMode()

void FLinuxWindow::SetWindowMode ( EWindowMode::Type  NewWindowMode)
overridevirtual

Toggle native window between fullscreen and normal mode

Reimplemented from FGenericWindow.

◆ Show()

void FLinuxWindow::Show ( )
overridevirtual

Native window should make itself visible

Reimplemented from FGenericWindow.


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