Skip to main content
Version: 15.x (API 15) [Current]

Class ImRaii.StyleDisposable

A wrapper around style pushing.

Assembly: Dalamud.dll​
Declaration
public sealed class ImRaii.StyleDisposable : IDisposable

Implements:
System.IDisposable

Properties​

Count​

Gets the number of styles currently pushed using this disposable.

Declaration
public int Count { get; }

Methods​

Push(ImGuiStyleVar, float, bool)​

Push a style variable to the style stack.

Declaration
public ImRaii.StyleDisposable Push(ImGuiStyleVar type, float value, bool condition)
Returns​

Dalamud.Interface.Utility.Raii.ImRaii.StyleDisposable: A disposable object that can be used to push further style variables and pops those style variables after leaving scope. Use with using.

Parameters​
TypeNameDescription
Dalamud.Bindings.ImGui.ImGuiStyleVartypeThe type of style variable to change.
System.SinglevalueThe value to change it to.
System.BooleanconditionIf this is false, the style is not pushed.
Remarks​

If you need to keep styles pushed longer than the current scope, use without using and use Dalamud.Interface.Utility.Raii.ImRaii.StyleDisposable.PopUnsafe(int).

Push(ImGuiStyleVar, Vector2, bool)​

Push a style variable to the style stack.

Declaration
public ImRaii.StyleDisposable Push(ImGuiStyleVar type, Vector2 value, bool condition)
Returns​

Dalamud.Interface.Utility.Raii.ImRaii.StyleDisposable: A disposable object that can be used to push further style variables and pops those style variables after leaving scope. Use with using.

Parameters​
TypeNameDescription
Dalamud.Bindings.ImGui.ImGuiStyleVartypeThe type of style variable to change.
System.Numerics.Vector2valueThe value to change it to.
System.BooleanconditionIf this is false, the style is not pushed.
Remarks​

If you need to keep styles pushed longer than the current scope, use without using and use Dalamud.Interface.Utility.Raii.ImRaii.StyleDisposable.PopUnsafe(int).

Push(ImGuiStyleVar, float)​

Declaration
public ImRaii.StyleDisposable Push(ImGuiStyleVar type, float value)
Returns​

Dalamud.Interface.Utility.Raii.ImRaii.StyleDisposable

Parameters​
TypeName
Dalamud.Bindings.ImGui.ImGuiStyleVartype
System.Singlevalue

Push(ImGuiStyleVar, Vector2)​

Push a style variable to the style stack.

Declaration
public ImRaii.StyleDisposable Push(ImGuiStyleVar type, Vector2 value)
Returns​

Dalamud.Interface.Utility.Raii.ImRaii.StyleDisposable: A disposable object that can be used to push further style variables and pops those style variables after leaving scope. Use with using.

Parameters​
TypeNameDescription
Dalamud.Bindings.ImGui.ImGuiStyleVartypeThe type of style variable to change.
System.Numerics.Vector2valueThe value to change it to.
Remarks​

If you need to keep styles pushed longer than the current scope, use without using and use Dalamud.Interface.Utility.Raii.ImRaii.StyleDisposable.PopUnsafe(int).

PushDefaultStyle()​

Push styles that revert all current style changes made temporarily.

Declaration
public static ImRaii.StyleDisposable PushDefaultStyle()
Returns​

Dalamud.Interface.Utility.Raii.ImRaii.StyleDisposable: A disposable object that can be used to push further style variables and pops those style variables after leaving scope. Use with using.

PushDefault(ImGuiStyleVar)​

Push the default value, i.e. the value as if nothing was ever pushed to this, of a style variable to the style stack.

Declaration
public ImRaii.StyleDisposable PushDefault(ImGuiStyleVar type)
Returns​

Dalamud.Interface.Utility.Raii.ImRaii.StyleDisposable: A disposable object that can be used to push further style variables and pops those style variables after leaving scope. Use with using.

Parameters​
TypeNameDescription
Dalamud.Bindings.ImGui.ImGuiStyleVartypeThe type of style variable to return to its default value.
Remarks​

If you need to keep styles pushed longer than the current scope, use without using and use Dalamud.Interface.Utility.Raii.ImRaii.StyleDisposable.PopUnsafe(int).

Pop(int)​

Pop a number of style variables.

Declaration
public ImRaii.StyleDisposable Pop(int num = 1)
Returns​

Dalamud.Interface.Utility.Raii.ImRaii.StyleDisposable: A disposable object that can be used to push further style variables and pops those style variables after leaving scope. Use with using.

Parameters​
TypeNameDescription
System.Int32numThe number of style variables to pop. This is clamped to the number of style variables pushed by this object.

Dispose()​

Pop all pushed styles.

Declaration
public void Dispose()

PopUnsafe(int)​

Pop a number of style variables.

Declaration
public static void PopUnsafe(int num = 1)
Parameters​
TypeNameDescription
System.Int32numThe number of style variables to pop. The number is not checked against the style stack.
Remarks​

Avoid using this function, and styles across scopes, as much as possible.

GetStyle(ImGuiStyleVar)​

Declaration
public static Vector2 GetStyle(ImGuiStyleVar idx)
Returns​

System.Numerics.Vector2

Parameters​
TypeName
Dalamud.Bindings.ImGui.ImGuiStyleVaridx

Implements​

  • System.IDisposable