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

#include <MacWindow.h>

+ Inheritance diagram for FMacWindow:

Public Member Functions

 ~FMacWindow ()
 
FCocoaWindowGetWindowHandle () const
 
void Initialize (class FMacApplication *const Application, const TSharedRef< FGenericWindowDefinition > &InDefinition, const TSharedPtr< FMacWindow > &InParent, const bool bShowImmediately)
 
void OnDisplayReconfiguration (CGDirectDisplayID Display, CGDisplayChangeSummaryFlags Flags)
 
void OnWindowDidChangeScreen ()
 
virtual void ReshapeWindow (int32 X, int32 Y, int32 Width, int32 Height) override
 
virtual bool GetFullScreenInfo (int32 &X, int32 &Y, int32 &Width, int32 &Height) const override
 
virtual void MoveWindowTo (int32 X, int32 Y) override
 
virtual void BringToFront (bool bForce=false) override
 
virtual void Destroy () override
 
virtual void Minimize () override
 
virtual void Maximize () override
 
virtual void Restore () override
 
virtual void Show () override
 
virtual void Hide () override
 
virtual void SetWindowMode (EWindowMode::Type NewWindowMode) override
 
virtual EWindowMode::Type GetWindowMode () const override
 
virtual bool IsMaximized () const override
 
virtual bool IsMinimized () const override
 
virtual bool IsVisible () const override
 
virtual bool GetRestoredDimensions (int32 &X, int32 &Y, int32 &Width, int32 &Height) override
 
virtual void SetWindowFocus () override
 
virtual void SetOpacity (const float InOpacity) override
 
virtual bool IsPointInWindow (int32 X, int32 Y) const override
 
virtual int32 GetWindowBorderSize () const override
 
virtual voidGetOSWindowHandle () const override
 
virtual bool IsForegroundWindow () const override
 
virtual void SetText (const TCHAR *const Text) override
 
virtual float GetDPIScaleFactor () const override
 
virtual void SetNativeWindowButtonsVisibility (bool bVisible)
 
bool IsRegularWindow () const
 
- Public Member Functions inherited from FGenericWindow
APPLICATIONCORE_API FGenericWindow ()
 
virtual APPLICATIONCORE_API ~FGenericWindow ()
 
virtual APPLICATIONCORE_API void HACK_ForceToFront ()
 
virtual APPLICATIONCORE_API void Enable (bool bEnable)
 
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 void AdjustCachedSize (FVector2D &Size) 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)
 
- Public Member Functions inherited from TSharedFromThis< FMacWindow >
TSharedRef< FMacWindow, Mode > AsShared ()
 
TSharedRef< FMacWindow const, Mode > AsShared () const
 
TSharedRef< SubobjectType, Mode > AsSharedSubobject (SubobjectType *SubobjectPtr) const
 
TWeakPtr< FMacWindow, Mode > AsWeak ()
 
TWeakPtr< FMacWindow const, Mode > AsWeak () const
 
TWeakPtr< SubobjectType, Mode > AsWeakSubobject (SubobjectType *SubobjectPtr) const
 
void UpdateWeakReferenceInternal (TSharedPtr< SharedPtrType, SharedPtrMode > const *InSharedPtr, OtherType *InObject) const
 
void UpdateWeakReferenceInternal (TSharedRef< SharedRefType, SharedPtrMode > const *InSharedRef, OtherType *InObject) const
 
UE_FORCEINLINE_HINT bool DoesSharedInstanceExist () const
 

Static Public Member Functions

static TSharedRef< FMacWindowMake ()
 

Public Attributes

int32 PositionX
 
int32 PositionY
 

Additional Inherited Members

- Protected Member Functions inherited from TSharedFromThis< FMacWindow >
 TSharedFromThis ()
 
 TSharedFromThis (TSharedFromThis const &)
 
UE_FORCEINLINE_HINT TSharedFromThisoperator= (TSharedFromThis const &)
 
 ~TSharedFromThis ()
 
- Static Protected Member Functions inherited from TSharedFromThis< FMacWindow >
static UE_FORCEINLINE_HINT TSharedRef< OtherType, Mode > SharedThis (OtherType *ThisPtr)
 
static UE_FORCEINLINE_HINT TSharedRef< OtherType const, Mode > SharedThis (const OtherType *ThisPtr)
 
- Protected Attributes inherited from FGenericWindow
TSharedPtr< FGenericWindowDefinitionDefinition
 

Detailed Description

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

Constructor & Destructor Documentation

◆ ~FMacWindow()

FMacWindow::~FMacWindow ( )

Member Function Documentation

◆ BringToFront()

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

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

Reimplemented from FGenericWindow.

◆ Destroy()

void FMacWindow::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.

◆ GetDPIScaleFactor()

float FMacWindow::GetDPIScaleFactor ( ) const
overridevirtual
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 FMacWindow::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.

◆ GetOSWindowHandle()

virtual void * FMacWindow::GetOSWindowHandle ( ) const
inlineoverridevirtual

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

Reimplemented from FGenericWindow.

◆ GetRestoredDimensions()

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

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

◆ GetWindowBorderSize()

int32 FMacWindow::GetWindowBorderSize ( ) const
overridevirtual

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

Reimplemented from FGenericWindow.

◆ GetWindowHandle()

FCocoaWindow * FMacWindow::GetWindowHandle ( ) const

◆ GetWindowMode()

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

Reimplemented from FGenericWindow.

◆ Hide()

void FMacWindow::Hide ( )
overridevirtual

Native window should hide itself

Reimplemented from FGenericWindow.

◆ Initialize()

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

◆ IsForegroundWindow()

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

Reimplemented from FGenericWindow.

◆ IsMaximized()

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

Reimplemented from FGenericWindow.

◆ IsMinimized()

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

Reimplemented from FGenericWindow.

◆ IsPointInWindow()

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

Reimplemented from FGenericWindow.

◆ IsRegularWindow()

bool FMacWindow::IsRegularWindow ( ) const

◆ IsVisible()

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

Reimplemented from FGenericWindow.

◆ Make()

TSharedRef< FMacWindow > FMacWindow::Make ( )
static

◆ Maximize()

void FMacWindow::Maximize ( )
overridevirtual

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

Reimplemented from FGenericWindow.

◆ Minimize()

void FMacWindow::Minimize ( )
overridevirtual

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

Reimplemented from FGenericWindow.

◆ MoveWindowTo()

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

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

Reimplemented from FGenericWindow.

◆ OnDisplayReconfiguration()

void FMacWindow::OnDisplayReconfiguration ( CGDirectDisplayID  Display,
CGDisplayChangeSummaryFlags  Flags 
)

◆ OnWindowDidChangeScreen()

void FMacWindow::OnWindowDidChangeScreen ( )

◆ ReshapeWindow()

void FMacWindow::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 FMacWindow::Restore ( )
overridevirtual

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

Reimplemented from FGenericWindow.

◆ SetNativeWindowButtonsVisibility()

void FMacWindow::SetNativeWindowButtonsVisibility ( bool  bVisible)
virtual

Shows or hides native window buttons on platforms that use them

Reimplemented from FGenericWindow.

◆ SetOpacity()

void FMacWindow::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 FMacWindow::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 FMacWindow::SetWindowFocus ( )
overridevirtual

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

◆ SetWindowMode()

void FMacWindow::SetWindowMode ( EWindowMode::Type  InNewWindowMode)
overridevirtual

Toggle native window between fullscreen and normal mode

Reimplemented from FGenericWindow.

◆ Show()

void FMacWindow::Show ( )
overridevirtual

Native window should make itself visible

Reimplemented from FGenericWindow.

Member Data Documentation

◆ PositionX

int32 FMacWindow::PositionX

◆ PositionY

int32 FMacWindow::PositionY

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