Class ImRaii.PlotStyleDisposable
A wrapper around style pushing.
Assembly: Dalamud.dll​
public sealed class ImRaii.PlotStyleDisposable : IDisposable
Implements:
System.IDisposable
Properties​
Count​
Gets the number of styles currently pushed using this disposable.
public int Count { get; }
Methods​
Push(ImPlotStyleVar, float, bool)​
Push a style variable to the style stack.
public ImRaii.PlotStyleDisposable Push(ImPlotStyleVar type, float value, bool condition)
Returns​
Dalamud.Interface.Utility.Raii.ImRaii.PlotStyleDisposable: 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.ImPlot.ImPlotStyleVar | 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.PlotStyleDisposable.PopUnsafe(int).
Push(ImPlotStyleVar, Vector2, bool)​
Push a style variable to the style stack.
public ImRaii.PlotStyleDisposable Push(ImPlotStyleVar type, Vector2 value, bool condition)
Returns​
Dalamud.Interface.Utility.Raii.ImRaii.PlotStyleDisposable: 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.ImPlot.ImPlotStyleVar | 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.PlotStyleDisposable.PopUnsafe(int).
Push(ImPlotStyleVar, float)​
Push a style variable to the style stack.
public ImRaii.PlotStyleDisposable Push(ImPlotStyleVar type, float value)
Returns​
Dalamud.Interface.Utility.Raii.ImRaii.PlotStyleDisposable: 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.ImPlot.ImPlotStyleVar | type | The type of style variable to change. |
System.Single | 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.PlotStyleDisposable.PopUnsafe(int).
Push(ImPlotStyleVar, Vector2)​
Push a style variable to the style stack.
public ImRaii.PlotStyleDisposable Push(ImPlotStyleVar type, Vector2 value)
Returns​
Dalamud.Interface.Utility.Raii.ImRaii.PlotStyleDisposable: 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.ImPlot.ImPlotStyleVar | 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.PlotStyleDisposable.PopUnsafe(int).
PlotDefaultStyle()​
Push styles that revert all current style changes made temporarily.
public static ImRaii.PlotStyleDisposable PlotDefaultStyle()
Returns​
Dalamud.Interface.Utility.Raii.ImRaii.PlotStyleDisposable: A disposable object that can be used to push further style variables and pops those style variables after leaving scope. Use with using.
PlotPushDefault(ImPlotStyleVar)​
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.PlotStyleDisposable PlotPushDefault(ImPlotStyleVar type)
Returns​
Dalamud.Interface.Utility.Raii.ImRaii.PlotStyleDisposable: 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.ImPlot.ImPlotStyleVar | 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.PlotStyleDisposable.PopUnsafe(int).
Pop(int)​
Pop a number of style variables.
public ImRaii.PlotStyleDisposable Pop(int num = 1)
Returns​
Dalamud.Interface.Utility.Raii.ImRaii.PlotStyleDisposable: 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(ImPlotStyleVar)​
public static Vector2 GetStyle(ImPlotStyleVar idx)
Returns​
System.Numerics.Vector2
Parameters​
| Type | Name |
|---|---|
Dalamud.Bindings.ImPlot.ImPlotStyleVar | idx |
Implements​
System.IDisposable