parin.addons.microui.wrapper
High-level wrapper around the low-level core module. Provides helper functions that use a global context and follow D naming conventions.
Types 35
Used for getting the width of the text.
Used for getting the height of the text.
Used for drawing a frame.
The slice repeat mode type of microui.
A pool item.
Base structure for all render commands, containing type and size metadata.
Command to jump to another location in the command buffer.
Command to set a clipping rectangle.
Command to draw a rectangle with a given color.
Command to render text at a given position with a font and color. The text is a null-terminated string. Use str.ptr to access it.
Command to draw an icon inside a rectangle with a given color.
A union of all possible render commands.
A UI container holding commands.
A 9-slice definition for an atlas area, controlling how it is sampled and tiled.
Bitmask type for result flags.
Bitmask type for option flags.
Bitmask type for mouse button flags.
Flags representing which mouse buttons are pressed.
Bitmask type for keyboard key flags.
Functions 82
void readyUiCore(UiTextWidthFunc width, UiTextHeightFunc height, UiFont font = null, int fontScale = 1) @safe nothrow @nogcvoid drawControlFrame(UiId id, IRect rect, UiColor colorId, UiOptFlags opt, UiAtlas atlasId = UiAtlas.none) @safe nothrow @nogcUiResFlags button(IStr label, UiIcon icon = UiIcon.none, UiOptFlags opt = UiOptFlag.alignCenter) @safe nothrow @nogcUiResFlags textBox(Str buffer, ref Sz newlen, UiOptFlags opt = UiOptFlag.none) @safe nothrow @nogcMuResFlags textBox(Str buffer, ref IStr newslice, UiOptFlags opt = UiOptFlag.none) @safe nothrow @nogcMuResFlags textBox(Sz N = 128, IStr file = __FILE__, Sz line = __LINE__)(ref IStr newslice, UiOptFlags opt = UiOptFlag.none) @safe nothrow @nogcUiResFlags slider(ref float value, float low, float high, float step = 0.01f, IStr fmt = uiNumberFmt, UiOptFlags opt = UiOptFlag.alignCenter) @safe nothrow @nogcUiResFlags slider(ref int value, int low, int high, int step = 1, IStr fmt = uiNumberFmt, UiOptFlags opt = UiOptFlag.alignCenter) @safe nothrow @nogcUiResFlags number(ref float value, float step = 0.01f, IStr fmt = uiNumberFmt, UiOptFlags opt = UiOptFlag.alignCenter) @safe nothrow @nogcUiResFlags number(ref int value, int step = 1, IStr fmt = uiNumberFmt, UiOptFlags opt = UiOptFlag.alignCenter) @safe nothrow @nogcvoid members(T)(ref T data, int labelWidth, bool canShowPrivateMembers = false) @safe nothrow @nogcUiResFlags headerAndMembers(T)(ref T data, int labelWidth, IStr label = "", bool canShowPrivateMembers = false) @safe nothrow @nogcUiResFlags beginWindow(IStr title, IRect rect, UiOptFlags opt = UiOptFlag.none) @safe nothrow @nogcUiResFlags beginWindow(IStr title, int x, int y, int w, int h, UiOptFlags opt = UiOptFlag.none) @safe nothrow @nogcUiResFlags beginDMenu(ref IStr selection, const(IStr)[] items, IVec2 canvas, IStr label = "", Vec2 scale = Vec2(0.5f, 0.7f)) @safe nothrow @nogcvoid readyUi(UiFont font = null, int fontScale = 1) @trusted @safe nothrow @nogcInitializes the microui context and sets temporary text size functions. Value `font` should be a `FontId*`.void readyUi(int fontScale) @safe nothrow @nogcInitializes the microui context and sets temporary text size functions.void readyUi(FontId font, int fontScale = 1) @safe nothrow @nogcInitializes the microui context and sets temporary text size functions.void handleUiInput() @trusted @safe nothrow @nogcHandles input events and updates the microui context accordingly.Variables 3
UiContext uiContextuiNumberFmt = muNumberFmtFormat string used for numbers.
uiNumberFmtWithZero = muNumberFmtWithZeroFormat string used for numbers, with a zero at the end.