Skip to main content
Version: 14.x (API 14) [Legacy]

Class ImRaii.ItemWidthDisposable

A wrapper around pushing item widths.

Assembly: Dalamud.dll
Declaration
public sealed class ImRaii.ItemWidthDisposable : IDisposable

Implements:
System.IDisposable

Properties

Count

Gets the number of item widths currently pushed using this disposable.

Declaration
public int Count { get; }

Methods

Push(float, bool)

Push an item width to the item width stack.

Declaration
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
TypeNameDescription
System.SinglewidthThe item width to push in pixels.
System.BooleanconditionIf 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.

Declaration
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
TypeNameDescription
System.SinglewidthThe 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.

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

Declaration
public void Dispose()

PopUnsafe(int)

Pop a number of item widths.

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 item widths across scopes, as much as possible.

Implements

  • System.IDisposable