Class ImRaii.DisabledDisposable
A wrapper around disabled state.
Assembly: Dalamud.dll
public sealed class ImRaii.DisabledDisposable : IDisposable
Implements:
System.IDisposable
Properties
Count
Gets the number of disabled states currently pushed using this disposable.
public int Count { get; }
Fields
GlobalCount
The global count of disabled pushes to reenable.
public static int GlobalCount
Methods
Push(bool)
Push a disabled state onto the stack.
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
| Type | Name | Description |
|---|---|---|
System.Boolean | condition | Whether 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.
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.
public void Pop(int num = 1)
Parameters
| Type | Name | Description |
|---|---|---|
System.Int32 | num | The number of disabled states to pop. This is clamped to the number of disabled states pushed by this object. |
Dispose()
Pop all disabled states.
public void Dispose()
PopUnsafe(int)
Pop a number of disabled states.
public static void PopUnsafe(int num = 1)
Parameters
| Type | Name | Description |
|---|---|---|
System.Int32 | num | The 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