Raven Engine v0.1
Loading...
Searching...
No Matches
Raven::UI::ScopedStyleStack Class Reference

RAII helper to push and pop multiple ImGui style variables in one go. Expects a list of pairs: (ImGuiStyleVar, Value). More...

#include <UI.h>

Public Member Functions

 ScopedStyleStack (const ScopedStyleStack &)=delete
ScopedStyleStack operator= (const ScopedStyleStack &)=delete
template<typename ValueType, typename... OtherStylePairs>
 ScopedStyleStack (ImGuiStyleVar firstStyleVar, ValueType firstValue, OtherStylePairs &&... otherStylePairs)
 Construct and push multiple style variables.
 ~ScopedStyleStack ()
 Pops all pushed style vars at destruction.

Detailed Description

RAII helper to push and pop multiple ImGui style variables in one go. Expects a list of pairs: (ImGuiStyleVar, Value).

Constructor & Destructor Documentation

◆ ScopedStyleStack() [1/2]

Raven::UI::ScopedStyleStack::ScopedStyleStack ( const ScopedStyleStack & )
delete

◆ ScopedStyleStack() [2/2]

template<typename ValueType, typename... OtherStylePairs>
Raven::UI::ScopedStyleStack::ScopedStyleStack ( ImGuiStyleVar firstStyleVar,
ValueType firstValue,
OtherStylePairs &&... otherStylePairs )
inline

Construct and push multiple style variables.

Template Parameters
ValueTypeType of the first style value.
OtherStylePairsVariadic template for remaining pairs.
Parameters
firstStyleVarFirst ImGuiStyleVar to push.
firstValueValue of the first style var.
otherStylePairsRemaining pairs of (ImGuiStyleVar, Value) (must be even count).

◆ ~ScopedStyleStack()

Raven::UI::ScopedStyleStack::~ScopedStyleStack ( )
inline

Pops all pushed style vars at destruction.

Member Function Documentation

◆ operator=()

ScopedStyleStack Raven::UI::ScopedStyleStack::operator= ( const ScopedStyleStack & )
delete

The documentation for this class was generated from the following file:
  • Framework/src/UI/UI.h