XII Release 0.1.0
Loading...
Searching...
No Matches
xiiGameStateWindow Class Reference

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

#include <GameStateWindow.h>

Inheritance diagram for xiiGameStateWindow:
[legend]

Public Member Functions

 xiiGameStateWindow (const xiiWindowCreationDescription &windowdesc, xiiDelegate< void()> onClickClose={})
 
void ResetOnClickClose (xiiDelegate< void()> onClickClose)
 
- Public Member Functions inherited from xiiWindow
 xiiWindow ()
 Creates empty window instance with standard settings.
 
virtual ~xiiWindow ()
 Destroys the window if not already done.
 
const xiiWindowCreationDescriptionGetCreationDescription () const
 Returns the currently active description struct.
 
virtual xiiSizeU32 GetClientAreaSize () const override
 Returns the size of the client area / ie. the window resolution.
 
virtual xiiWindowHandle GetNativeWindowHandle () const override
 Returns the platform specific window handle.
 
virtual bool IsFullscreenWindow (bool bOnlyProperFullscreenMode=false) const override
 Returns whether the window covers an entire monitor.
 
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
 
virtual void ProcessWindowMessages () override
 Runs the platform specific message pump.
 
xiiResult Initialize ()
 Creates a new platform specific window with the current settings.
 
xiiResult Initialize (const xiiWindowCreationDescription &creationDescription)
 Creates a new platform specific window with the given settings.
 
bool IsInitialized () const
 Gets if the window is up and running.
 
xiiResult Destroy ()
 Destroys the window.
 
xiiResult Resize (const xiiSizeU32 &newWindowSize)
 Tries to resize the window. Override OnResize to get the actual new window size.
 
virtual void OnWindowMove (const xiiInt32 iNewPosX, const xiiInt32 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.
 
xiiStandardInputDevice * GetInputDevice () const
 Returns the input device that is attached to this window and typically provides mouse / keyboard input.
 

Private Member Functions

virtual void OnResize (const xiiSizeU32 &newWindowSize) override
 Called on window resize messages.
 
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 xiiWindow
static xiiUInt8 GetNextUnusedWindowNumber ()
 Returns a number that can be used as a window number in xiiWindowCreationDescription.
 
- Protected Attributes inherited from xiiWindow
xiiWindowCreationDescription m_CreationDescription
 

Detailed Description

A window class that expands a little on xiiWindow. Default type used by xiiGameState to create a window.

Member Function Documentation

◆ OnClickClose()

void xiiGameStateWindow::OnClickClose ( )
overrideprivatevirtual

Called when the close button of the window is clicked. Does nothing by default.

Reimplemented from xiiWindow.

◆ OnResize()

void xiiGameStateWindow::OnResize ( const xiiSizeU32 & newWindowSize)
overrideprivatevirtual

Called on window resize messages.

Parameters
newWindowSizeNew window size in pixel.
See also
OnWindowMessage

Reimplemented from xiiWindow.


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