doodle
0.2
Intended to support teaching C++, doodle is a simple library that helps make a window and makes it easy to do some drawing.
|
Go to the source code of this file.
Namespaces | |
doodle | |
Functions | |
std::string | doodle::to_string (MouseButtons button) noexcept |
Convert MouseButtons enum to std::string. More... | |
std::string | doodle::to_string (KeyboardButtons button) noexcept |
Convert KeboardButtons enum to std::string. More... | |
std::wstring | doodle::to_wstring (MouseButtons button) noexcept |
Convert MouseButtons enum to std::wstring. More... | |
std::wstring | doodle::to_wstring (KeyboardButtons button) noexcept |
Convert KeboardButtons enum to std::wstring. More... | |
int | doodle::get_mouse_x () noexcept |
Get the mouse's X position relative to the currently set doodle::FrameOfReference. More... | |
int | doodle::get_mouse_y () noexcept |
Get the mouse's Y position relative to the currently set doodle::FrameOfReference. More... | |
int | doodle::get_previous_mouse_x () noexcept |
Get the previous mouse's X position relative to the currently set doodle::FrameOfReference. More... | |
int | doodle::get_previous_mouse_y () noexcept |
Get the previous mouse's Y position relative to the currently set doodle::FrameOfReference. More... | |
void | doodle::set_callback_key_pressed (std::function< void(KeyboardButtons)> &&callback) noexcept |
The provided callback function is called once every time a key is pressed. More... | |
void | doodle::set_callback_key_released (std::function< void(KeyboardButtons)> &&callback) noexcept |
The provided callback function is called once every time a key is released. More... | |
void | doodle::set_callback_mouse_moved (std::function< void(int, int)> &&callback) noexcept |
The provided callback function is called every time the mouse moves. More... | |
void | doodle::set_callback_mouse_pressed (std::function< void(MouseButtons)> &&callback) noexcept |
The provided callback is called whenever a mouse button is pressed. More... | |
void | doodle::set_callback_mouse_released (std::function< void(MouseButtons)> &&callback) noexcept |
The provided callback is called whenever a mouse button is released. More... | |
void | doodle::set_callback_mouse_wheel (std::function< void(int)> &&callback) noexcept |
The provided callback is called whenever the mouse wheel is scrolled. More... | |
EVENT_HOOK void | on_key_pressed (doodle::KeyboardButtons button) |
The declaration of the optional on_key_pressed function to implement in your doodle program. More... | |
EVENT_HOOK void | on_key_released (doodle::KeyboardButtons button) |
The declaration of the optional on_key_released function to implement in your doodle program. More... | |
EVENT_HOOK void | on_mouse_moved (int mouse_x, int mouse_y) |
The declaration of the optional on_mouse_moved function to implement in your doodle program. More... | |
EVENT_HOOK void | on_mouse_pressed (doodle::MouseButtons button) |
The declaration of the optional on_mouse_pressed function to implement in your doodle program. More... | |
EVENT_HOOK void | on_mouse_released (doodle::MouseButtons button) |
The declaration of the optional on_mouse_released function to implement in your doodle program. More... | |
EVENT_HOOK void | on_mouse_wheel (int scroll_amount) |
The declaration of the optional on_mouse_wheel function to implement in your doodle program. More... | |
Variables | |
bool | doodle::MouseIsPressed |
The boolean system variable MouseIsPressed is true if the mouse is pressed and false if not. More... | |
bool | doodle::KeyIsPressed |
The boolean system variable KeyIsPressed is true if any key is pressed and false if no keys are pressed. More... | |
KeyboardButtons | doodle::Key |
The system variable key always contains the value of the most recent key on the keyboard that was typed. More... | |
MouseButtons | doodle::MouseButton |
doodle automatically tracks if the mouse button is pressed and which button is pressed. The value of the system variable MouseButton is either LEFT, RIGHT, or CENTER depending on which button was pressed last. More... | |