ezEngine  Release 25.03
ezGameStateWindow Class Reference

A window class that expands a little on ezWindow. Default type used by ezGameState to create a window. More...

#include <GameStateWindow.h>

Inheritance diagram for ezGameStateWindow:

Public Member Functions

 ezGameStateWindow (const ezWindowCreationDesc &windowdesc, ezDelegate< void()> onClickClose={})
 
void ResetOnClickClose (ezDelegate< void()> onClickClose)
 
- Public Member Functions inherited from ezWindowAndroid
virtual ezResult InitializeWindow () override
 Creates a new platform specific window with the current settings. More...
 
virtual void DestroyWindow () override
 Destroys the window.
 
virtual ezResult Resize (const ezSizeU32 &newWindowSize) override
 Tries to resize the window. Override OnResize to get the actual new window size.
 
virtual void ProcessWindowMessages () override
 Runs the platform specific message pump. More...
 
virtual ezWindowHandle GetNativeWindowHandle () const override
 Returns the platform specific window handle.
 
- Public Member Functions inherited from ezWindowPlatformShared
 ezWindowPlatformShared ()
 Creates empty window instance with standard settings. More...
 
 ~ezWindowPlatformShared ()
 Destroys the window if not already done.
 
const ezWindowCreationDescGetCreationDescription () const
 Returns the currently active description struct.
 
virtual ezSizeU32 GetClientAreaSize () const override
 Returns the size of the client area / ie. the window resolution.
 
virtual bool IsFullscreenWindow (bool bOnlyProperFullscreenMode=false) const override
 Returns whether the window covers an entire monitor. More...
 
virtual bool IsVisible () const override
 Whether the window can potentially be seen by the user. Windows that are minimized or hidden are not visible.
 
virtual void AddReference () override
 
virtual void RemoveReference () override
 
ezResult Initialize (const ezWindowCreationDesc &creationDescription)
 Creates a new platform specific window with the given settings. More...
 
bool IsInitialized () const
 Gets if the window is up and running.
 
virtual void OnWindowMove (const ezInt32 iNewPosX, const ezInt32 iNewPosY)
 Called when the window position is changed. Not possible on all OSes.
 
virtual void OnFocus (bool bHasFocus)
 Called when the window gets focus or loses focus.
 
virtual void OnVisibleChange (bool bVisible)
 Called when the window gets focus or loses focus.
 
ezStandardInputDeviceGetInputDevice () const
 Returns the input device that is attached to this window and typically provides mouse / keyboard input.
 

Private Member Functions

virtual void OnResize (const ezSizeU32 &newWindowSize) override
 Called on window resize messages. More...
 
virtual void OnClickClose () override
 Called when the close button of the window is clicked. Does nothing by default.
 

Additional Inherited Members

- Static Public Member Functions inherited from ezWindowPlatformShared
static ezUInt8 GetNextUnusedWindowNumber ()
 Returns a number that can be used as a window number in ezWindowCreationDesc. More...
 
- Protected Attributes inherited from ezWindowPlatformShared
ezWindowCreationDesc m_CreationDescription
 
bool m_bInitialized = false
 
bool m_bVisible = true
 
ezUniquePtr< ezStandardInputDevicem_pInputDevice
 
ezWindowInternalHandle m_hWindowHandle = ezWindowInternalHandle()
 
ezAtomicInteger32 m_iReferenceCount = 0
 
- Static Protected Attributes inherited from ezWindowPlatformShared
static ezUInt8 s_uiNextUnusedWindowNumber = 0
 increased every time an ezWindow is created, to be able to get a free window index easily
 

Detailed Description

A window class that expands a little on ezWindow. Default type used by ezGameState to create a window.

Member Function Documentation

◆ OnResize()

void ezGameStateWindow::OnResize ( const ezSizeU32 newWindowSize)
overrideprivatevirtual

Called on window resize messages.

Parameters
newWindowSizeNew window size in pixel.
See also
OnWindowMessage

Reimplemented from ezWindowAndroid.


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