![]() |
raylib-cpp
C++ object-oriented wrapper library for raylib.
|
Window and Graphics Device Functions. More...
Public Member Functions | |
| Window (int width=800, int height=450, const std::string &title="raylib", bool lateInit=false) | |
| Initialize window and OpenGL context. More... | |
| ~Window () | |
| Window & | BeginDrawing () |
| Setup canvas (framebuffer) to start drawing. More... | |
| Window & | ClearState (unsigned int flag) |
| Clear window configuration state flags. More... | |
| void | Close () |
| Close window and unload OpenGL context. More... | |
| Window & | EndDrawing () |
| End canvas drawing and swap buffers (double buffering) More... | |
| int | GetFPS () const |
| Returns current FPS. More... | |
| float | GetFrameTime () const |
| Returns time in seconds for last frame drawn. More... | |
| void * | GetHandle () const |
| Get native window handle. More... | |
| int | GetHeight () const |
| Get current screen height. More... | |
| inline ::Vector2 | GetPosition () const |
| Get window position XY on monitor. More... | |
| inline ::Vector2 | GetScaleDPI () const |
| Get window scale DPI factor. More... | |
| inline ::Vector2 | GetSize () |
| Get the screen's width and height. More... | |
| double | GetTime () const |
| Returns elapsed time in seconds since InitWindow() More... | |
| int | GetWidth () const |
| Get current screen width. More... | |
| void | Init (int width=800, int height=450, const std::string &title="raylib") |
| bool | IsCursorOnScreen () const |
| Check if cursor is on the current screen. More... | |
| bool | IsFocused () const |
| Check if window is currently focused. More... | |
| bool | IsFullscreen () const |
| Check if window is currently fullscreen. More... | |
| bool | IsHidden () const |
| Check if window is currently hidden. More... | |
| bool | IsMaximized () const |
| Check if window is currently minimized. More... | |
| bool | IsMinimized () const |
| Check if window is currently minimized. More... | |
| bool | IsResized () const |
| Check if window has been resized last frame. More... | |
| bool | IsState (unsigned int flag) const |
| Check if one specific window flag is enabled. More... | |
| Window & | Maximize () |
| Set window state: maximized, if resizable (only PLATFORM_DESKTOP) More... | |
| Window & | Minimize () |
| Set window state: minimized, if resizable (only PLATFORM_DESKTOP) More... | |
| Window & | Restore () |
| Set window state: not minimized/maximized (only PLATFORM_DESKTOP) More... | |
| Window & | SetFullscreen (bool fullscreen) |
| Set whether or not the application should be fullscreen. More... | |
| Window & | SetIcon (const ::Image &image) |
| Set icon for window. More... | |
| Window & | SetMinSize (int width, int height) |
| Set window minimum dimensions. More... | |
| Window & | SetMonitor (int monitor) |
| Set monitor for the current window. More... | |
| Window & | SetPosition (const ::Vector2 &position) |
| Set window position on screen. More... | |
| Window & | SetPosition (int x, int y) |
| Set window position on screen. More... | |
| Window & | SetSize (const ::Vector2 &size) |
| Set window dimensions. More... | |
| Window & | SetSize (int width, int height) |
| Set window dimensions. More... | |
| Window & | SetState (unsigned int flag) |
| Set window configuration state using flags. More... | |
| Window & | SetTargetFPS (int fps) |
| Set target FPS (maximum) More... | |
| Window & | SetTitle (const std::string &title) |
| Set title for window. More... | |
| bool | ShouldClose () const |
| Check if KEY_ESCAPE pressed or Close icon pressed. More... | |
| Window & | ToggleFullscreen () |
| Toggle window state: fullscreen/windowed. More... | |
Static Public Member Functions | |
| static bool | IsReady () |
| Check if window has been initialized successfully. More... | |
Window and Graphics Device Functions.
Definition at line 44 of file Window.hpp.
|
inline |
|
inline |
Definition at line 56 of file Window.hpp.
References Close().
|
inline |
Setup canvas (framebuffer) to start drawing.
Definition at line 285 of file Window.hpp.
|
inline |
Clear window configuration state flags.
Definition at line 152 of file Window.hpp.
|
inline |
Close window and unload OpenGL context.
Definition at line 74 of file Window.hpp.
Referenced by ~Window().
|
inline |
End canvas drawing and swap buffers (double buffering)
Definition at line 293 of file Window.hpp.
|
inline |
Returns current FPS.
Definition at line 337 of file Window.hpp.
|
inline |
Returns time in seconds for last frame drawn.
Definition at line 344 of file Window.hpp.
|
inline |
Get native window handle.
Definition at line 278 of file Window.hpp.
|
inline |
|
inline |
Get window position XY on monitor.
Definition at line 315 of file Window.hpp.
|
inline |
Get window scale DPI factor.
Definition at line 322 of file Window.hpp.
|
inline |
Get the screen's width and height.
Definition at line 271 of file Window.hpp.
References GetHeight(), and GetWidth().
|
inline |
Returns elapsed time in seconds since InitWindow()
Definition at line 351 of file Window.hpp.
|
inline |
|
inline |
|
inline |
Check if cursor is on the current screen.
Definition at line 81 of file Window.hpp.
|
inline |
Check if window is currently focused.
Definition at line 123 of file Window.hpp.
|
inline |
Check if window is currently fullscreen.
Definition at line 95 of file Window.hpp.
Referenced by SetFullscreen().
|
inline |
Check if window is currently hidden.
Definition at line 102 of file Window.hpp.
|
inline |
Check if window is currently minimized.
Definition at line 116 of file Window.hpp.
|
inline |
Check if window is currently minimized.
Definition at line 109 of file Window.hpp.
|
inlinestatic |
Check if window has been initialized successfully.
Definition at line 88 of file Window.hpp.
|
inline |
Check if window has been resized last frame.
Definition at line 130 of file Window.hpp.
|
inline |
Check if one specific window flag is enabled.
Definition at line 137 of file Window.hpp.
|
inline |
Set window state: maximized, if resizable (only PLATFORM_DESKTOP)
Definition at line 185 of file Window.hpp.
|
inline |
Set window state: minimized, if resizable (only PLATFORM_DESKTOP)
Definition at line 193 of file Window.hpp.
|
inline |
Set window state: not minimized/maximized (only PLATFORM_DESKTOP)
Definition at line 201 of file Window.hpp.
|
inline |
Set whether or not the application should be fullscreen.
Definition at line 168 of file Window.hpp.
References IsFullscreen(), and ToggleFullscreen().
Set icon for window.
Definition at line 209 of file Window.hpp.
|
inline |
Set window minimum dimensions.
Definition at line 248 of file Window.hpp.
|
inline |
Set monitor for the current window.
Definition at line 240 of file Window.hpp.
|
inline |
Set window position on screen.
Definition at line 225 of file Window.hpp.
Referenced by SetPosition().
|
inline |
|
inline |
Set window configuration state using flags.
Definition at line 144 of file Window.hpp.
|
inline |
Set target FPS (maximum)
Definition at line 329 of file Window.hpp.
|
inline |
Set title for window.
Definition at line 217 of file Window.hpp.
References raylib::SetWindowTitle().
|
inline |
Check if KEY_ESCAPE pressed or Close icon pressed.
Definition at line 67 of file Window.hpp.
|
inline |
Toggle window state: fullscreen/windowed.
Definition at line 160 of file Window.hpp.
Referenced by SetFullscreen().
1.8.17