Class ImRaii.IdDisposable
A wrapper around ID pushing.
Assembly: Dalamud.dll
public sealed class ImRaii.IdDisposable : IDisposable
Implements:
System.IDisposable
Properties
Count
Gets the number of IDs currently pushed using this disposable.
public int Count { get; }
Methods
Push(ImU8String, bool)
Push a numerical ID to the ID stack and pop it on leaving scope.
public ImRaii.IdDisposable Push(ImU8String id, bool enabled = true)
Returns
Dalamud.Interface.Utility.Raii.ImRaii.IdDisposable: A disposable object that counts the number of pushes and can be used to push further IDs. Use with using.
Parameters
| Type | Name | Description |
|---|---|---|
Dalamud.Bindings.ImGui.ImU8String | id | The ID. |
System.Boolean | enabled | If this is false, the id is not pushed. |
Remarks
If you need to keep IDs pushed longer than the current scope, use without using and use Dalamud.Interface.Utility.Raii.ImRaii.IdDisposable.PopUnsafe(int).
Push(int, bool)
Push a numerical ID to the ID stack and pop it on leaving scope.
public ImRaii.IdDisposable Push(int id, bool enabled = true)
Returns
Dalamud.Interface.Utility.Raii.ImRaii.IdDisposable: A disposable object that counts the number of pushes and can be used to push further IDs. Use with using.
Parameters
| Type | Name | Description |
|---|---|---|
System.Int32 | id | The ID. |
System.Boolean | enabled | If this is false, the id is not pushed. |
Remarks
If you need to keep IDs pushed longer than the current scope, use without using and use Dalamud.Interface.Utility.Raii.ImRaii.IdDisposable.PopUnsafe(int).
Push(nint, bool)
Push a numerical ID to the ID stack and pop it on leaving scope.
public ImRaii.IdDisposable Push(nint id, bool enabled = true)
Returns
Dalamud.Interface.Utility.Raii.ImRaii.IdDisposable: A disposable object that counts the number of pushes and can be used to push further IDs. Use with using.
Parameters
| Type | Name | Description |
|---|---|---|
System.IntPtr | id | The ID. |
System.Boolean | enabled | If this is false, the id is not pushed. |
Remarks
If you need to keep IDs pushed longer than the current scope, use without using and use Dalamud.Interface.Utility.Raii.ImRaii.IdDisposable.PopUnsafe(int).
Pop(int)
Pop a number of IDs from the ID stack.
public void Pop(int count = 1)
Parameters
| Type | Name | Description |
|---|---|---|
System.Int32 | count | The number of IDs to pop. This is clamped to the number of IDs pushed by this object. |
Dispose()
Pop all pushed IDs.
public void Dispose()
PopUnsafe(int)
Pop a number of IDs from the ID stack without using an IDisposable.
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 IDs across scopes, as much as possible.
Implements
System.IDisposable