ShishGL
1.0
A simple modular cross-platform graphics library
CursorLocator.hpp
Go to the documentation of this file.
1
/*============================================================================*/
2
#ifndef SHISHGL_CURSOR_LOCATOR_HPP
3
#define SHISHGL_CURSOR_LOCATOR_HPP
4
/*============================================================================*/
5
#include "
UIWindow.hpp
"
6
/*============================================================================*/
7
namespace
ShishGL
{
8
9
class
CursorLocator
:
public
UIWindow {
10
public
:
11
12
explicit
CursorLocator
(
const
Viewport& viewport)
13
: UIWindow(viewport) {
14
SubscriptionManager::subscribe(EventSystem::SystemEvents,
this
);
15
}
16
17
protected
:
18
19
bool
onMouseMove
(MouseEvent& event)
override
{
20
UIWindow::setPos(event.where());
21
return
true
;
22
}
23
24
};
25
26
}
27
/*============================================================================*/
28
#endif //SHISHGL_CURSOR_LOCATOR_HPP
29
/*============================================================================*/
ShishGL::CursorLocator
Definition:
CursorLocator.hpp:9
ShishGL::CursorLocator::onMouseMove
bool onMouseMove(MouseEvent &event) override
Definition:
CursorLocator.hpp:19
ShishGL
Definition:
CursorLocator.hpp:7
UIWindow.hpp
ShishGL::CursorLocator::CursorLocator
CursorLocator(const Viewport &viewport)
Definition:
CursorLocator.hpp:12
include
ShishGL
DebugUtilities
CursorLocator.hpp
Generated by
1.8.20