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

Class ImRaii.FontDisposable

A wrapper around pushing fonts.

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

Implements:
System.IDisposable

Properties

Count

Gets the number of fonts currently pushed using this disposable.

Declaration
public int Count { get; }

Methods

DefaultFont()

Push the default font if any other font is currently pushed.

Declaration
public static ImRaii.FontDisposable DefaultFont()
Returns

Dalamud.Interface.Utility.Raii.ImRaii.FontDisposable: A disposable object that can be used to push further fonts and pops those fonts after leaving scope. Use with using.

Push(ImFontPtr, bool)

Push a font to the font stack.

Declaration
public ImRaii.FontDisposable Push(ImFontPtr font, bool condition = true)
Returns

Dalamud.Interface.Utility.Raii.ImRaii.FontDisposable: A disposable object that can be used to push further fonts and pops those fonts after leaving scope. Use with using.

Parameters
TypeNameDescription
Dalamud.Bindings.ImGui.ImFontPtrfontThe font to push.
System.BooleanconditionIf this is false, the font is not pushed.
Remarks

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

Pop(int)

Pop a number of fonts.

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

Dispose()

Pop all pushed fonts.

Declaration
public void Dispose()

PopUnsafe(int)

Pop a number of fonts.

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

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

Implements

  • System.IDisposable