![]() |
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... | |
| std::string | GetClipboardText () const |
| Get clipboard text content. 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... | |
| std::string | GetMonitorName (int monitor) const |
| Get the human-readable, UTF-8 encoded name of the primary monitor. More... | |
| Vector2 | GetPosition () const |
| Get window position XY on monitor. More... | |
| Vector2 | GetScaleDPI () const |
| Get window scale DPI factor. More... | |
| int | GetScreenHeight () const |
| Get current screen height. More... | |
| int | GetScreenWidth () const |
| Get current screen width. More... | |
| double | GetTime () const |
| Returns elapsed time in seconds since InitWindow() More... | |
| void | Init (int width, int height, const std::string &title) |
| 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 & | SetClipboardText (const std::string &text) |
| Set clipboard text content. More... | |
| Window & | SetIcon (::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 (int x, int y) |
| Set window position on screen. 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 247 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 255 of file Window.hpp.
|
inline |
Get clipboard text content.
Definition at line 298 of file Window.hpp.
|
inline |
Returns current FPS.
Definition at line 321 of file Window.hpp.
|
inline |
Returns time in seconds for last frame drawn.
Definition at line 328 of file Window.hpp.
|
inline |
Get native window handle.
Definition at line 240 of file Window.hpp.
|
inline |
Get the human-readable, UTF-8 encoded name of the primary monitor.
Definition at line 291 of file Window.hpp.
|
inline |
Get window position XY on monitor.
Definition at line 277 of file Window.hpp.
|
inline |
Get window scale DPI factor.
Definition at line 284 of file Window.hpp.
|
inline |
Get current screen height.
Definition at line 270 of file Window.hpp.
|
inline |
Get current screen width.
Definition at line 263 of file Window.hpp.
|
inline |
Returns elapsed time in seconds since InitWindow()
Definition at line 335 of file Window.hpp.
|
inline |
Definition at line 60 of file Window.hpp.
Referenced by Window().
|
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.
|
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 168 of file Window.hpp.
|
inline |
Set window state: minimized, if resizable (only PLATFORM_DESKTOP)
Definition at line 176 of file Window.hpp.
|
inline |
Set window state: not minimized/maximized (only PLATFORM_DESKTOP)
Definition at line 184 of file Window.hpp.
|
inline |
Set clipboard text content.
Definition at line 305 of file Window.hpp.
Set icon for window.
Definition at line 192 of file Window.hpp.
|
inline |
Set window minimum dimensions.
Definition at line 224 of file Window.hpp.
|
inline |
Set monitor for the current window.
Definition at line 216 of file Window.hpp.
|
inline |
Set window position on screen.
Definition at line 208 of file Window.hpp.
|
inline |
Set window dimensions.
Definition at line 232 of file Window.hpp.
|
inline |
Set window configuration state using flags.
Definition at line 144 of file Window.hpp.
|
inline |
Set target FPS (maximum)
Definition at line 313 of file Window.hpp.
|
inline |
Set title for window.
Definition at line 200 of file Window.hpp.
|
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.
1.8.17