RAII wrapper for Canvas (ImGui-style) More...
#include <canvas.h>

Public Member Functions | |
| ScopedCanvas (const std::string &id, ImVec2 canvas_size=ImVec2(0, 0)) | |
| Construct and begin a new canvas (legacy constructor without renderer) | |
| ScopedCanvas (gfx::IRenderer *renderer, const std::string &id, ImVec2 canvas_size=ImVec2(0, 0)) | |
| Construct and begin a new canvas (with optional renderer) | |
| ScopedCanvas (Canvas &canvas) | |
| Wrap existing canvas with RAII. | |
| ~ScopedCanvas () | |
| Destructor automatically calls End() | |
| ScopedCanvas (const ScopedCanvas &)=delete | |
| ScopedCanvas & | operator= (const ScopedCanvas &)=delete |
| ScopedCanvas (ScopedCanvas &&other) noexcept | |
| Canvas * | operator-> () |
| Arrow operator for clean syntax: scoped->DrawBitmap(...) | |
| const Canvas * | operator-> () const |
| Canvas & | operator* () |
| Dereference operator for direct access: (*scoped).DrawBitmap(...) | |
| const Canvas & | operator* () const |
| Canvas * | get () |
| Get underlying canvas. | |
| const Canvas * | get () const |
Private Attributes | |
| Canvas * | canvas_ |
| bool | owned_ |
| bool | active_ |
RAII wrapper for Canvas (ImGui-style)
Automatically calls Begin() on construction and End() on destruction, preventing forgotten End() calls and ensuring proper cleanup.
Usage:
Or wrap existing canvas:
|
inlineexplicit |
Construct and begin a new canvas (legacy constructor without renderer)
Definition at line 508 of file canvas.h.
References yaze::gui::Canvas::Begin(), and canvas_.

|
inlineexplicit |
Construct and begin a new canvas (with optional renderer)
Definition at line 516 of file canvas.h.
References yaze::gui::Canvas::Begin(), and canvas_.

|
inlineexplicit |
Wrap existing canvas with RAII.
Definition at line 524 of file canvas.h.
References yaze::gui::Canvas::Begin(), and canvas_.

|
inline |
|
delete |
|
inlinenoexcept |
|
delete |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
private |
Definition at line 570 of file canvas.h.
Referenced by get(), get(), operator*(), operator*(), operator->(), operator->(), ScopedCanvas(), ScopedCanvas(), ScopedCanvas(), and ~ScopedCanvas().
|
private |
Definition at line 571 of file canvas.h.
Referenced by ~ScopedCanvas().
|
private |
Definition at line 572 of file canvas.h.
Referenced by ~ScopedCanvas().