OpenEnroth 73e68f7
Loading...
Searching...
No Matches
Public Member Functions | Private Member Functions | Private Attributes | Friends | List of all members
GameWindowHandler Class Reference

#include <GameWindowHandler.h>

Inheritance diagram for GameWindowHandler:
PlatformEventFilter PlatformApplicationAware

Public Member Functions

 GameWindowHandler ()
 
virtual ~GameWindowHandler ()
 
void UpdateWindowFromConfig (const GameConfig *config)
 
void UpdateConfigFromWindow (GameConfig *config)
 
std::tuple< int, Pointi, SizeiGetWindowConfigPosition (const GameConfig *config)
 
std::tuple< int, Pointi, SizeiGetWindowRelativePosition (Pointi *position=nullptr)
 
- Public Member Functions inherited from PlatformEventFilter
 PlatformEventFilter (std::initializer_list< PlatformEventType > eventTypes)
 
 PlatformEventFilter (PlatformEventWildcard eventTypes)
 
virtual bool event (const PlatformEvent *event)
 
const std::vector< PlatformEventTypeeventTypes () const
 

Private Member Functions

Pointi MapToRender (Pointi position)
 
void OnMouseLeftClick (Pointi position)
 
void OnMouseRightClick (Pointi position)
 
void OnMouseLeftUp ()
 
void OnMouseRightUp ()
 
void OnMouseLeftDoubleClick (Pointi position)
 
void OnMouseRightDoubleClick (Pointi position)
 
void OnMouseMove (Pointi position, bool left_button, bool right_button)
 
void OnScreenshot ()
 
void OnToggleBorderless ()
 
void OnToggleFullscreen ()
 
void OnToggleResizable ()
 
void OnCycleFilter ()
 
void OnMouseGrabToggle ()
 
void OnKey (PlatformKey key)
 
bool OnChar (PlatformKey key, int c)
 
void OnFocus ()
 
void OnFocusLost ()
 
void OnPaint ()
 
void OnActivated ()
 
void OnDeactivated ()
 
void handleKeyPress (PlatformKey key, PlatformModifiers mods, bool isAutoRepeat)
 
void handleKeyRelease (PlatformKey key)
 
virtual bool keyPressEvent (const PlatformKeyEvent *event) override
 
virtual bool keyReleaseEvent (const PlatformKeyEvent *event) override
 
virtual bool mouseMoveEvent (const PlatformMouseEvent *event) override
 
virtual bool mousePressEvent (const PlatformMouseEvent *event) override
 
virtual bool mouseReleaseEvent (const PlatformMouseEvent *event) override
 
virtual bool wheelEvent (const PlatformWheelEvent *event) override
 
virtual bool moveEvent (const PlatformMoveEvent *event) override
 
virtual bool resizeEvent (const PlatformResizeEvent *event) override
 
virtual bool activationEvent (const PlatformWindowEvent *event) override
 
virtual bool closeEvent (const PlatformWindowEvent *event) override
 
virtual bool gamepadConnectionEvent (const PlatformGamepadEvent *event) override
 
virtual bool gamepadKeyPressEvent (const PlatformGamepadKeyEvent *event) override
 
virtual bool gamepadKeyReleaseEvent (const PlatformGamepadKeyEvent *event) override
 
virtual bool gamepadAxisEvent (const PlatformGamepadAxisEvent *event) override
 
- Private Member Functions inherited from PlatformApplicationAware
 ~PlatformApplicationAware ()=default
 
PlatformApplicationapplication () const
 
template<class T >
T * component () const
 
virtual void installNotify ()
 
virtual void removeNotify ()
 

Private Attributes

std::shared_ptr< Io::Mousemouse = nullptr
 
bool _closing = false
 

Friends

class PlatformIntrospection
 

Additional Inherited Members

- Protected Member Functions inherited from PlatformEventFilter
virtual bool keyPressEvent (const PlatformKeyEvent *event)
 
virtual bool keyReleaseEvent (const PlatformKeyEvent *event)
 
virtual bool mouseMoveEvent (const PlatformMouseEvent *event)
 
virtual bool mousePressEvent (const PlatformMouseEvent *event)
 
virtual bool mouseReleaseEvent (const PlatformMouseEvent *event)
 
virtual bool wheelEvent (const PlatformWheelEvent *event)
 
virtual bool moveEvent (const PlatformMoveEvent *event)
 
virtual bool resizeEvent (const PlatformResizeEvent *event)
 
virtual bool activationEvent (const PlatformWindowEvent *event)
 
virtual bool closeEvent (const PlatformWindowEvent *event)
 
virtual bool gamepadConnectionEvent (const PlatformGamepadEvent *event)
 
virtual bool gamepadKeyPressEvent (const PlatformGamepadKeyEvent *event)
 
virtual bool gamepadKeyReleaseEvent (const PlatformGamepadKeyEvent *event)
 
virtual bool gamepadAxisEvent (const PlatformGamepadAxisEvent *event)
 
virtual bool nativeEvent (const PlatformNativeEvent *event)
 
virtual bool textInputEvent (const PlatformTextInputEvent *event)
 

Constructor & Destructor Documentation

◆ GameWindowHandler()

GameWindowHandler::GameWindowHandler ( )

◆ ~GameWindowHandler()

GameWindowHandler::~GameWindowHandler ( )
virtual

Member Function Documentation

◆ activationEvent()

bool GameWindowHandler::activationEvent ( const PlatformWindowEvent event)
overrideprivatevirtual

Reimplemented from PlatformEventFilter.

◆ closeEvent()

bool GameWindowHandler::closeEvent ( const PlatformWindowEvent event)
overrideprivatevirtual

Reimplemented from PlatformEventFilter.

◆ gamepadAxisEvent()

bool GameWindowHandler::gamepadAxisEvent ( const PlatformGamepadAxisEvent event)
overrideprivatevirtual

Reimplemented from PlatformEventFilter.

◆ gamepadConnectionEvent()

bool GameWindowHandler::gamepadConnectionEvent ( const PlatformGamepadEvent event)
overrideprivatevirtual

Reimplemented from PlatformEventFilter.

◆ gamepadKeyPressEvent()

bool GameWindowHandler::gamepadKeyPressEvent ( const PlatformGamepadKeyEvent event)
overrideprivatevirtual

Reimplemented from PlatformEventFilter.

◆ gamepadKeyReleaseEvent()

bool GameWindowHandler::gamepadKeyReleaseEvent ( const PlatformGamepadKeyEvent event)
overrideprivatevirtual

Reimplemented from PlatformEventFilter.

◆ GetWindowConfigPosition()

std::tuple< int, Pointi, Sizei > GameWindowHandler::GetWindowConfigPosition ( const GameConfig config)

◆ GetWindowRelativePosition()

std::tuple< int, Pointi, Sizei > GameWindowHandler::GetWindowRelativePosition ( Pointi position = nullptr)

◆ handleKeyPress()

void GameWindowHandler::handleKeyPress ( PlatformKey  key,
PlatformModifiers  mods,
bool  isAutoRepeat 
)
private

◆ handleKeyRelease()

void GameWindowHandler::handleKeyRelease ( PlatformKey  key)
private

◆ keyPressEvent()

bool GameWindowHandler::keyPressEvent ( const PlatformKeyEvent event)
overrideprivatevirtual

Reimplemented from PlatformEventFilter.

◆ keyReleaseEvent()

bool GameWindowHandler::keyReleaseEvent ( const PlatformKeyEvent event)
overrideprivatevirtual

Reimplemented from PlatformEventFilter.

◆ MapToRender()

Pointi GameWindowHandler::MapToRender ( Pointi  position)
private

◆ mouseMoveEvent()

bool GameWindowHandler::mouseMoveEvent ( const PlatformMouseEvent event)
overrideprivatevirtual

Reimplemented from PlatformEventFilter.

◆ mousePressEvent()

bool GameWindowHandler::mousePressEvent ( const PlatformMouseEvent event)
overrideprivatevirtual

Reimplemented from PlatformEventFilter.

◆ mouseReleaseEvent()

bool GameWindowHandler::mouseReleaseEvent ( const PlatformMouseEvent event)
overrideprivatevirtual

Reimplemented from PlatformEventFilter.

◆ moveEvent()

bool GameWindowHandler::moveEvent ( const PlatformMoveEvent event)
overrideprivatevirtual

Reimplemented from PlatformEventFilter.

◆ OnActivated()

void GameWindowHandler::OnActivated ( )
private

◆ OnChar()

bool GameWindowHandler::OnChar ( PlatformKey  key,
int  c 
)
private

◆ OnCycleFilter()

void GameWindowHandler::OnCycleFilter ( )
private

◆ OnDeactivated()

void GameWindowHandler::OnDeactivated ( )
private

◆ OnFocus()

void GameWindowHandler::OnFocus ( )
private

◆ OnFocusLost()

void GameWindowHandler::OnFocusLost ( )
private

◆ OnKey()

void GameWindowHandler::OnKey ( PlatformKey  key)
private

◆ OnMouseGrabToggle()

void GameWindowHandler::OnMouseGrabToggle ( )
private

◆ OnMouseLeftClick()

void GameWindowHandler::OnMouseLeftClick ( Pointi  position)
private

◆ OnMouseLeftDoubleClick()

void GameWindowHandler::OnMouseLeftDoubleClick ( Pointi  position)
private

◆ OnMouseLeftUp()

void GameWindowHandler::OnMouseLeftUp ( )
private

◆ OnMouseMove()

void GameWindowHandler::OnMouseMove ( Pointi  position,
bool  left_button,
bool  right_button 
)
private

◆ OnMouseRightClick()

void GameWindowHandler::OnMouseRightClick ( Pointi  position)
private

◆ OnMouseRightDoubleClick()

void GameWindowHandler::OnMouseRightDoubleClick ( Pointi  position)
private

◆ OnMouseRightUp()

void GameWindowHandler::OnMouseRightUp ( )
private

◆ OnPaint()

void GameWindowHandler::OnPaint ( )
private

◆ OnScreenshot()

void GameWindowHandler::OnScreenshot ( )
private

◆ OnToggleBorderless()

void GameWindowHandler::OnToggleBorderless ( )
private

◆ OnToggleFullscreen()

void GameWindowHandler::OnToggleFullscreen ( )
private

◆ OnToggleResizable()

void GameWindowHandler::OnToggleResizable ( )
private

◆ resizeEvent()

bool GameWindowHandler::resizeEvent ( const PlatformResizeEvent event)
overrideprivatevirtual

Reimplemented from PlatformEventFilter.

◆ UpdateConfigFromWindow()

void GameWindowHandler::UpdateConfigFromWindow ( GameConfig config)

◆ UpdateWindowFromConfig()

void GameWindowHandler::UpdateWindowFromConfig ( const GameConfig config)

◆ wheelEvent()

bool GameWindowHandler::wheelEvent ( const PlatformWheelEvent event)
overrideprivatevirtual

Reimplemented from PlatformEventFilter.

Friends And Related Function Documentation

◆ PlatformIntrospection

friend class PlatformIntrospection
friend

Member Data Documentation

◆ _closing

bool GameWindowHandler::_closing = false
private

◆ mouse

std::shared_ptr<Io::Mouse> GameWindowHandler::mouse = nullptr
private

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