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 | |
bool | doodle::create_window () noexcept |
Create a default window. More... | |
bool | doodle::create_window (const std::string &title) noexcept |
Create a default window with a custom window title. More... | |
bool | doodle::create_window (int desired_width, int desired_height) noexcept |
Create a window with a desired screen size. More... | |
bool | doodle::create_window (const std::string &title, int desired_width, int desired_height) noexcept |
Create a window with a custom window title and a desired screen size. More... | |
bool | doodle::create_window (const std::string &title, int desired_width, int desired_height, int screen_x, int screen_y) noexcept |
Create a window with a custom window title and a desired screen size. More... | |
bool | doodle::is_window_closed () noexcept |
Is the window closed? More... | |
void | doodle::update_window () noexcept |
Update the doodle application. More... | |
void | doodle::close_window () noexcept |
Programmatically close the window. More... | |
void | doodle::set_window_title (const std::string &new_title) noexcept |
Set a new title for the window. More... | |
bool | doodle::is_full_screen () noexcept |
Is the window a fullscreen window? More... | |
void | doodle::toggle_full_screen () noexcept |
Switch back and forth between fullscreen and windowed mode. More... | |
void | doodle::set_callback_window_resized (std::function< void(int, int)> &&callback) noexcept |
The provided callback function is called whenever the window is resized by the user. More... | |
void | doodle::set_callback_window_closed (std::function< void(void)> &&callback) noexcept |
The provided callback function will be called when the user uses the OS to close the window. More... | |
void | doodle::set_callback_window_focus_changed (std::function< void(bool)> &&callback) noexcept |
THe provided callback function will be called when the window gains or loses focus. More... | |
void | doodle::show_cursor (bool show_it=true) noexcept |
This function will allow you to hide or show the mouse cursor. More... | |
EVENT_HOOK void | on_window_resized (int new_width, int new_height) |
The declaration of the optional on_window_resized function to implement in your doodle program. More... | |
EVENT_HOOK void | on_window_closed () |
The declaration of the optional on_window_closed function to implement in your doodle program. More... | |
EVENT_HOOK void | on_window_focus_changed (bool is_focused) |
The declaration of the optional on_window_focus_changed function to implement in your doodle program. More... | |
Variables | |
bool | doodle::WindowIsFocused |
Confirms if the window a doodle program is in is "focused," meaning that the doodle will accept mouse or keyboard input. This variable is "true" if the window is focused and "false" if not. More... | |