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

Class ImRaii.DisabledDisposable

A wrapper around disabled state.

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

Implements:
System.IDisposable

Properties​

Count​

Gets the number of disabled states currently pushed using this disposable.

Declaration
public int Count { get; }

Fields​

GlobalCount​

The global count of disabled pushes to reenable.

Declaration
public static int GlobalCount

Methods​

Push(bool)​

Push a disabled state onto the stack.

Declaration
public ImRaii.DisabledDisposable Push(bool condition)
Returns​

Dalamud.Interface.Utility.Raii.ImRaii.DisabledDisposable: A disposable object that can be used to push further disabled states for whatever reason and pop them on leaving scope. Use with using.

Parameters​
TypeNameDescription
System.BooleanconditionWhether to actually push a disabled state.
Remarks​

If you need to keep a disabled state pushed longer than the current scope, use without using and use Dalamud.Interface.Utility.Raii.ImRaii.DisabledDisposable.PopUnsafe(int).

Push()​

Push a disabled state onto the stack.

Declaration
public ImRaii.DisabledDisposable Push()
Returns​

Dalamud.Interface.Utility.Raii.ImRaii.DisabledDisposable: A disposable object that can be used to push further disabled states for whatever reason and pop them on leaving scope. Use with using.

Remarks​

If you need to keep a disabled state pushed longer than the current scope, use without using and use Dalamud.Interface.Utility.Raii.ImRaii.DisabledDisposable.PopUnsafe(int).

Pop(int)​

Pop a number of disabled states.

Declaration
public void Pop(int num = 1)
Parameters​
TypeNameDescription
System.Int32numThe number of disabled states to pop. This is clamped to the number of disabled states pushed by this object.

Dispose()​

Pop all disabled states.

Declaration
public void Dispose()

PopUnsafe(int)​

Pop a number of disabled states.

Declaration
public static void PopUnsafe(int num = 1)
Parameters​
TypeNameDescription
System.Int32numThe number of disabled states to pop. The number is not checked against the disabled stack.
Remarks​

Avoid using this function, and disabled states across scopes, as much as possible.

Implements​

  • System.IDisposable