Class ImRaii.StyleDisposable
A wrapper around style pushing.
Assembly: Dalamud.dll​
public sealed class ImRaii.StyleDisposable : IDisposable
Implements:
System.IDisposable
Properties​
Count​
Gets the number of styles currently pushed using this disposable.
public int Count { get; }
Methods​
Push(ImGuiStyleVar, float, bool)​
Push a style variable to the style stack.
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​
| Type | Name | Description |
|---|---|---|
Dalamud.Bindings.ImGui.ImGuiStyleVar | type | The type of style variable to change. |
System.Single | value | The value to change it to. |
System.Boolean | condition | If 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.
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​
| Type | Name | Description |
|---|---|---|
Dalamud.Bindings.ImGui.ImGuiStyleVar | type | The type of style variable to change. |
System.Numerics.Vector2 | value | The value to change it to. |
System.Boolean | condition | If 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)​
public ImRaii.StyleDisposable Push(ImGuiStyleVar type, float value)
Returns​
Dalamud.Interface.Utility.Raii.ImRaii.StyleDisposable
Parameters​
| Type | Name |
|---|---|
Dalamud.Bindings.ImGui.ImGuiStyleVar | type |
System.Single | value |
Push(ImGuiStyleVar, Vector2)​
Push a style variable to the style stack.
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​
| Type | Name | Description |
|---|---|---|
Dalamud.Bindings.ImGui.ImGuiStyleVar | type | The type of style variable to change. |
System.Numerics.Vector2 | value | The 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.
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.
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​
| Type | Name | Description |
|---|---|---|
Dalamud.Bindings.ImGui.ImGuiStyleVar | type | The 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.
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​
| Type | Name | Description |
|---|---|---|
System.Int32 | num | The number of style variables to pop. This is clamped to the number of style variables pushed by this object. |
Dispose()​
Pop all pushed styles.
public void Dispose()
PopUnsafe(int)​
Pop a number of style variables.
public static void PopUnsafe(int num = 1)
Parameters​
| Type | Name | Description |
|---|---|---|
System.Int32 | num | The 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)​
public static Vector2 GetStyle(ImGuiStyleVar idx)
Returns​
System.Numerics.Vector2
Parameters​
| Type | Name |
|---|---|
Dalamud.Bindings.ImGui.ImGuiStyleVar | idx |
Implements​
System.IDisposable