|
Raylib C++
1.0.0
Encapsulates the raylib library
|
Encapsulation of the raylib functions to create a Window. More...
#include <RlWindow.hpp>

Public Member Functions | |
| RlWindow () | |
| ~RlWindow () | |
| Destroy the RlWindow. More... | |
| void | createWindow (const std::string &title, int width, int height, int fps=60) |
| Create a window with the given title, width and height. More... | |
| bool | isOpen () |
| Check if the window is open. More... | |
| bool | isReady () |
| Check if window has been initialized successfully. More... | |
| bool | isFullScreen () |
| Check if window is currently fullscreen. More... | |
| bool | isHidden () |
| Check if window is currently hidden (only PLATFORM_DESKTOP) More... | |
| bool | isMinimized () |
| Check if window is currently minimized (only PLATFORM_DESKTOP) More... | |
| bool | isMaximized () |
| Check if window is currently maximized (only PLATFORM_DESKTOP) More... | |
| bool | isFocused () |
| Check if window is currently focused (only PLATFORM_DESKTOP) More... | |
| bool | isResized () |
| Check if window has been resized last frame. More... | |
| bool | hasState (const ConfigFlags &flag) |
| Check if one specific window flag is enabled. More... | |
| void | setState (unsigned int flags) |
| Set window configuration state using flags. More... | |
| void | setConfigFlags (unsigned int flags) |
| Set window configuration state using flags. More... | |
| void | clearState (unsigned int flags) |
| Clear window configuration state flags. More... | |
| void | toggleFullscreen () |
| Toggle window state: fullscreen/windowed (only PLATFORM_DESKTOP) More... | |
| void | maximize () |
| Set window state: maximized, if resizable (only PLATFORM_DESKTOP) More... | |
| void | minimize () |
| Set window state: minimized, if resizable (only PLATFORM_DESKTOP) More... | |
| void | restore () |
| Set window state: not minimized/maximized (only PLATFORM_DESKTOP) More... | |
| void | setIcon (const image::RlImage &image) |
| Set icon for window (only PLATFORM_DESKTOP) More... | |
| void | setTitle (const std::string &title) |
| Set title for window (only PLATFORM_DESKTOP) More... | |
| void | setPosition (int x, int y) |
| Set window position on screen (only PLATFORM_DESKTOP) More... | |
| void | setMonitor (int monitor) |
| Set monitor for the current window (fullscreen mode) More... | |
| void | setMinSize (int width, int height) |
| Set window minimum dimensions (for FLAG_WINDOW_RESIZABLE) More... | |
| void | setSize (int width, int height) |
| Set window dimensions. More... | |
| void | takeScreenshot (const std::string &fileName) |
| Take a screenshot of the current window. More... | |
| const std::string & | getTitle () const |
| Get the window title. More... | |
| const int & | getWidth () const |
| Get the window width. More... | |
| const int & | getHeight () const |
| Get the window height. More... | |
| const int & | getMinWidth () const |
| Get the window minimum width. More... | |
| const int & | getMinHeight () const |
| Get the window minimum height. More... | |
| const bool & | isIsCreated () const |
| Check if the window is created. More... | |
| raylib::RlCamera & | getCamera () |
| Get the window mutable RlCamera. More... | |
| const raylib::RlCamera & | getCamera () const |
| Get the window immutable RlCamera. More... | |
| void | setCamera (const RlCamera &camera) |
| Set the window RlCamera. More... | |
| void | setIsOpen (const bool &isOpen) |
| Set if the window should be closed. More... | |
Static Public Member Functions | |
| static std::shared_ptr< RlWindow > & | getInstance () |
| Get the singleton instance of the RlWindow. More... | |
Encapsulation of the raylib functions to create a Window.
| raylib::window::RlWindow::RlWindow | ( | ) |
| raylib::window::RlWindow::~RlWindow | ( | ) |
Destroy the RlWindow.
| void raylib::window::RlWindow::clearState | ( | unsigned int | flags | ) |
Clear window configuration state flags.
| flags | the flags to clear ( |
| void raylib::window::RlWindow::createWindow | ( | const std::string & | title, |
| int | width, | ||
| int | height, | ||
| int | fps = 60 |
||
| ) |
Create a window with the given title, width and height.
| title | the title of the window |
| height | the height of the window |
| width | the width of the window |
| fps | the frame rate limit of the window |
| WindowException | if the window has already been created |

| const raylib::RlCamera & raylib::window::RlWindow::getCamera | ( | ) |
| const raylib::RlCamera& raylib::window::RlWindow::getCamera | ( | ) | const |
| const int & raylib::window::RlWindow::getHeight | ( | ) | const |
Get the window height.
|
static |
| const int & raylib::window::RlWindow::getMinHeight | ( | ) | const |
Get the window minimum height.
| const int & raylib::window::RlWindow::getMinWidth | ( | ) | const |
Get the window minimum width.
| const std::string & raylib::window::RlWindow::getTitle | ( | ) | const |
Get the window title.
| const int & raylib::window::RlWindow::getWidth | ( | ) | const |
Get the window width.
| bool raylib::window::RlWindow::hasState | ( | const ConfigFlags & | flag | ) |
Check if one specific window flag is enabled.
| flag | the flag to check ( |
| bool raylib::window::RlWindow::isFocused | ( | ) |
Check if window is currently focused (only PLATFORM_DESKTOP)
| bool raylib::window::RlWindow::isFullScreen | ( | ) |
Check if window is currently fullscreen.
| bool raylib::window::RlWindow::isHidden | ( | ) |
Check if window is currently hidden (only PLATFORM_DESKTOP)
| const bool & raylib::window::RlWindow::isIsCreated | ( | ) | const |
Check if the window is created.
| bool raylib::window::RlWindow::isMaximized | ( | ) |
Check if window is currently maximized (only PLATFORM_DESKTOP)
| bool raylib::window::RlWindow::isMinimized | ( | ) |
Check if window is currently minimized (only PLATFORM_DESKTOP)
| bool raylib::window::RlWindow::isOpen | ( | ) |
Check if the window is open.
| bool raylib::window::RlWindow::isReady | ( | ) |
Check if window has been initialized successfully.
| bool raylib::window::RlWindow::isResized | ( | ) |
Check if window has been resized last frame.
| void raylib::window::RlWindow::maximize | ( | ) |
Set window state: maximized, if resizable (only PLATFORM_DESKTOP)
| void raylib::window::RlWindow::minimize | ( | ) |
Set window state: minimized, if resizable (only PLATFORM_DESKTOP)
| void raylib::window::RlWindow::restore | ( | ) |
Set window state: not minimized/maximized (only PLATFORM_DESKTOP)
| void raylib::window::RlWindow::setCamera | ( | const RlCamera & | camera | ) |
| void raylib::window::RlWindow::setConfigFlags | ( | unsigned int | flags | ) |
Set window configuration state using flags.
| flags | the flags to set ( |
| void raylib::window::RlWindow::setIcon | ( | const image::RlImage & | image | ) |
Set icon for window (only PLATFORM_DESKTOP)
| image | the image to set as icon |

| void raylib::window::RlWindow::setIsOpen | ( | const bool & | isOpen | ) |
Set if the window should be closed.
| isOpen | false if the window should be closed, true otherwise |
| void raylib::window::RlWindow::setMinSize | ( | int | width, |
| int | height | ||
| ) |
Set window minimum dimensions (for FLAG_WINDOW_RESIZABLE)
| width | the minimum width |
| height | the minimum height |
| void raylib::window::RlWindow::setMonitor | ( | int | monitor | ) |
Set monitor for the current window (fullscreen mode)
| monitor | the monitor to set |
| void raylib::window::RlWindow::setPosition | ( | int | x, |
| int | y | ||
| ) |
Set window position on screen (only PLATFORM_DESKTOP)
| x | the x position |
| y | the y position |
| void raylib::window::RlWindow::setSize | ( | int | width, |
| int | height | ||
| ) |
Set window dimensions.
| width | the width |
| height | the height |
| void raylib::window::RlWindow::setState | ( | unsigned int | flags | ) |
Set window configuration state using flags.
| flags | the flags to set ( |
| void raylib::window::RlWindow::setTitle | ( | const std::string & | title | ) |
Set title for window (only PLATFORM_DESKTOP)
| title | the title to set |
| void raylib::window::RlWindow::takeScreenshot | ( | const std::string & | fileName | ) |
Take a screenshot of the current window.
| fileName | the file name to save the screenshot |
| void raylib::window::RlWindow::toggleFullscreen | ( | ) |
Toggle window state: fullscreen/windowed (only PLATFORM_DESKTOP)
1.8.17