Class ImRaii.ItemWidthDisposable
A wrapper around pushing item widths.
Assembly: Dalamud.dll
public sealed class ImRaii.ItemWidthDisposable : IDisposable
Implements:
System.IDisposable
Properties
Count
Gets the number of item widths currently pushed using this disposable.
public int Count { get; }
Methods
Push(float, bool)
Push an item width to the item width stack.
public ImRaii.ItemWidthDisposable Push(float width, bool condition)
Returns
Dalamud.Interface.Utility.Raii.ImRaii.ItemWidthDisposable: A disposable object that can be used to push further item widths and pops those item widths after leaving scope. Use with using.
Parameters
| Type | Name | Description |
|---|---|---|
System.Single | width | The item width to push in pixels. |
System.Boolean | condition | If this is false, the item width is not pushed. |
Remarks
If you need to keep item widths pushed longer than the current scope, use without using and use Dalamud.Interface.Utility.Raii.ImRaii.ItemWidthDisposable.PopUnsafe(int).
Push(float)
Push an item width to the item width stack.
public ImRaii.ItemWidthDisposable Push(float width)
Returns
Dalamud.Interface.Utility.Raii.ImRaii.ItemWidthDisposable: A disposable object that can be used to push further item widths and pops those item widths after leaving scope. Use with using.
Parameters
| Type | Name | Description |
|---|---|---|
System.Single | width | The item width to push in pixels. |
Remarks
If you need to keep item widths pushed longer than the current scope, use without using and use Dalamud.Interface.Utility.Raii.ImRaii.ItemWidthDisposable.PopUnsafe(int).
Pop(int)
Pop a number of item widths.
public void Pop(int num = 1)
Parameters
| Type | Name | Description |
|---|---|---|
System.Int32 | num | The number of item widths to pop. This is clamped to the number of item widths pushed by this object. |
Dispose()
Pop all pushed item widths.
public void Dispose()
PopUnsafe(int)
Pop a number of item widths.
public static void PopUnsafe(int num = 1)
Parameters
| Type | Name | Description |
|---|---|---|
System.Int32 | num | The number of item widths to pop. The number is not checked against the item width stack. |
Remarks
Avoid using this function, and item widths across scopes, as much as possible.
Implements
System.IDisposable