RAII guard for ImGui child windows with optional styling. More...
#include <style_guard.h>
Public Member Functions | |
| StyledChild (const char *id, const ImVec2 &size, const StyledChildConfig &config, bool has_border=false, ImGuiWindowFlags flags=0) | |
| ~StyledChild () | |
| operator bool () const | |
| StyledChild (const StyledChild &)=delete | |
| StyledChild & | operator= (const StyledChild &)=delete |
Private Attributes | |
| int | color_count_ |
| int | var_count_ |
| bool | is_open_ |
RAII guard for ImGui child windows with optional styling.
Replaces the common pattern of PushStyleColor(ChildBg) + BeginChild + EndChild + PopStyleColor.
Usage: StyledChild child("##list", {0, 200}, {.bg = dark_bg}, true); if (child) { // draw contents }
Definition at line 253 of file style_guard.h.
|
inline |
Definition at line 255 of file style_guard.h.
References yaze::gui::StyledChildConfig::bg, yaze::gui::StyledChildConfig::border, yaze::gui::StyledChildConfig::border_size, color_count_, is_open_, yaze::gui::StyledChildConfig::rounding, and var_count_.
|
inline |
Definition at line 278 of file style_guard.h.
References color_count_, and var_count_.
|
delete |
|
inlineexplicit |
Definition at line 284 of file style_guard.h.
References is_open_.
|
delete |
|
private |
Definition at line 290 of file style_guard.h.
Referenced by StyledChild(), and ~StyledChild().
|
private |
Definition at line 291 of file style_guard.h.
Referenced by StyledChild(), and ~StyledChild().
|
private |
Definition at line 292 of file style_guard.h.
Referenced by operator bool(), and StyledChild().