yaze 0.3.2
Link to the Past ROM Editor
 
Loading...
Searching...
No Matches
yaze::gui::StyledChild Class Reference

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
 
StyledChildoperator= (const StyledChild &)=delete
 

Private Attributes

int color_count_
 
int var_count_
 
bool is_open_
 

Detailed Description

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.

Constructor & Destructor Documentation

◆ StyledChild() [1/2]

yaze::gui::StyledChild::StyledChild ( const char * id,
const ImVec2 & size,
const StyledChildConfig & config,
bool has_border = false,
ImGuiWindowFlags flags = 0 )
inline

◆ ~StyledChild()

yaze::gui::StyledChild::~StyledChild ( )
inline

Definition at line 278 of file style_guard.h.

References color_count_, and var_count_.

◆ StyledChild() [2/2]

yaze::gui::StyledChild::StyledChild ( const StyledChild & )
delete

Member Function Documentation

◆ operator bool()

yaze::gui::StyledChild::operator bool ( ) const
inlineexplicit

Definition at line 284 of file style_guard.h.

References is_open_.

◆ operator=()

StyledChild & yaze::gui::StyledChild::operator= ( const StyledChild & )
delete

Member Data Documentation

◆ color_count_

int yaze::gui::StyledChild::color_count_
private

Definition at line 290 of file style_guard.h.

Referenced by StyledChild(), and ~StyledChild().

◆ var_count_

int yaze::gui::StyledChild::var_count_
private

Definition at line 291 of file style_guard.h.

Referenced by StyledChild(), and ~StyledChild().

◆ is_open_

bool yaze::gui::StyledChild::is_open_
private

Definition at line 292 of file style_guard.h.

Referenced by operator bool(), and StyledChild().


The documentation for this class was generated from the following file: