Tatooine
gl
include
tatooine
gl
mouse.h
Go to the documentation of this file.
1
#ifndef TATOOINE_GL_MOUSE_H
2
#define TATOOINE_GL_MOUSE_H
3
//==============================================================================
4
#include <string>
5
//==============================================================================
6
namespace
tatooine::gl
{
7
//==============================================================================
8
enum class
button
{
9
left
,
10
right
,
11
middle
,
12
wheel_up
,
13
wheel_down
,
14
wheel_left
,
15
wheel_right
,
16
unknown
17
};
18
19
auto
to_string
(
button
b) -> std::string;
20
21
struct
button_listener
{
22
virtual
void
on_button_pressed
(
button
/*b*/
) {}
23
virtual
void
on_button_released
(
button
/*b*/
) {}
24
virtual
void
on_wheel_up
() {}
25
virtual
void
on_wheel_down
() {}
26
virtual
void
on_wheel_left
() {}
27
virtual
void
on_wheel_right
() {}
28
};
29
//==============================================================================
30
}
// namespace tatooine::gl
31
//==============================================================================
32
#endif
tatooine::gl
Definition:
ansiformat.h:6
tatooine::gl::button
button
Definition:
mouse.h:8
tatooine::gl::button::wheel_left
@ wheel_left
tatooine::gl::button::wheel_up
@ wheel_up
tatooine::gl::button::middle
@ middle
tatooine::gl::button::wheel_right
@ wheel_right
tatooine::gl::button::right
@ right
tatooine::gl::button::left
@ left
tatooine::gl::button::wheel_down
@ wheel_down
tatooine::gl::button::unknown
@ unknown
tatooine::gl::to_string
auto to_string(key const k) -> std::string
tatooine::gl::button_listener
Definition:
mouse.h:21
tatooine::gl::button_listener::on_button_released
virtual void on_button_released(button)
Definition:
mouse.h:23
tatooine::gl::button_listener::on_wheel_right
virtual void on_wheel_right()
Definition:
mouse.h:27
tatooine::gl::button_listener::on_wheel_up
virtual void on_wheel_up()
Definition:
mouse.h:24
tatooine::gl::button_listener::on_wheel_left
virtual void on_wheel_left()
Definition:
mouse.h:26
tatooine::gl::button_listener::on_button_pressed
virtual void on_button_pressed(button)
Definition:
mouse.h:22
tatooine::gl::button_listener::on_wheel_down
virtual void on_wheel_down()
Definition:
mouse.h:25
Generated by
1.9.5