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

Class ImRaii.IdDisposable

A wrapper around ID pushing.

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

Implements:
System.IDisposable

Properties​

Count​

Gets the number of IDs currently pushed using this disposable.

Declaration
public int Count { get; }

Methods​

Push(ImU8String, bool)​

Push a numerical ID to the ID stack and pop it on leaving scope.

Declaration
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​
TypeNameDescription
Dalamud.Bindings.ImGui.ImU8StringidThe ID.
System.BooleanenabledIf 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.

Declaration
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​
TypeNameDescription
System.Int32idThe ID.
System.BooleanenabledIf 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.

Declaration
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​
TypeNameDescription
System.IntPtridThe ID.
System.BooleanenabledIf 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.

Declaration
public void Pop(int count = 1)
Parameters​
TypeNameDescription
System.Int32countThe number of IDs to pop. This is clamped to the number of IDs pushed by this object.

Dispose()​

Pop all pushed IDs.

Declaration
public void Dispose()

PopUnsafe(int)​

Pop a number of IDs from the ID stack without using an IDisposable.

Declaration
public static void PopUnsafe(int num = 1)
Parameters​
TypeNameDescription
System.Int32numThe 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