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.

aliasUiId = MuId

The control ID type of microui.

aliasUiFont = MuFont

The font type of microui.

The texture type of microui.

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.

Layout state used to position UI controls within a container.

A UI container holding commands.

A 9-slice definition for an atlas area, controlling how it is sampled and tiled.

UI style settings including font, sizes, spacing, and colors.

The UI context.

The command kind.

aliasUiClip = MuClip

The clipping kind.

The color kind.

aliasUiIcon = MuIcon

The icon kind.

The atlas area kind.

Bitmask type for result flags.

Result flags indicating the outcome of a control interaction.

Bitmask type for option flags.

Option flags controlling control and window behaviour.

Bitmask type for mouse button flags.

Flags representing which mouse buttons are pressed.

Bitmask type for keyboard key flags.

Flags representing which keys are currently held down.

Used by the members function to hide data.

Used by the members function to show data in a specific way.

Functions 82

fnUiStyle * uiStyle() ref @safe nothrow @nogc
fnvoid readyUiCore(UiFont font = null, int fontScale = 1) @safe nothrow @nogc
fnvoid readyUiCore(UiTextWidthFunc width, UiTextHeightFunc height, UiFont font = null, int fontScale = 1) @safe nothrow @nogc
fnvoid beginUiCore() @safe nothrow @nogc
fnvoid endUiCore() @safe nothrow @nogc
fnvoid setUifocus(UiId id) @safe nothrow @nogc
fnUiId getUiId(const(void) * data, Sz size) @safe nothrow @nogc
fnUiId getUiId(IStr str) @safe nothrow @nogc
fnvoid pushUiId(const(void) * data, Sz size) @safe nothrow @nogc
fnvoid pushUiId(IStr str) @safe nothrow @nogc
fnvoid popUiId() @safe nothrow @nogc
fnvoid pushUiClipRect(IRect rect) @safe nothrow @nogc
fnvoid popUiClipRect() @safe nothrow @nogc
fnIRect getUiClipRect() @safe nothrow @nogc
fnUiClip checkUiClipRect(IRect rect) @safe nothrow @nogc
fnUiContainer * getCurrentUiContainer() @safe nothrow @nogc
fnUiContainer * getUiContainer(IStr name) @safe nothrow @nogc
fnvoid bringUiContainerToFront(UiContainer * cnt) @safe nothrow @nogc
fnint readyUiPool(UiPoolItem * items, Sz len, UiId id) @safe nothrow @nogc
fnint getFromUiPool(UiPoolItem * items, Sz len, UiId id) @safe nothrow @nogc
fnvoid updateUiPool(UiPoolItem * items, Sz idx) @safe nothrow @nogc
fnvoid uiInputMouseMove(int x, int y) @safe nothrow @nogc
fnvoid uiInputMouseDown(int x, int y, UiMouseFlags input) @safe nothrow @nogc
fnvoid uiInputMouseUp(int x, int y, UiMouseFlags input) @safe nothrow @nogc
fnvoid uiInputScroll(int x, int y) @safe nothrow @nogc
fnvoid uiInputKeyDown(UiKeyFlags input) @safe nothrow @nogc
fnvoid uiInputKeyUp(UiKeyFlags input) @safe nothrow @nogc
fnvoid uiInputText(IStr text) @safe nothrow @nogc
fnUiCommandData * pushUiCommand(UiCommand type, Sz size) @safe nothrow @nogc
fnbool nextUiCommand(UiCommandData * * cmd) @safe nothrow @nogc
fnvoid setUiClipRect(IRect rect) @safe nothrow @nogc
fnvoid drawUiRect(IRect rect, Rgba color, UiAtlas id = UiAtlas.none) @safe nothrow @nogc
fnvoid drawUibox(IRect rect, Rgba color) @safe nothrow @nogc
fnvoid drawUiText(UiFont font, IStr str, IVec2 point, Rgba color) @safe nothrow @nogc
fnvoid drawUiIcon(UiIcon id, IRect rect, Rgba color) @safe nothrow @nogc
fnvoid beginColumn() @safe nothrow @nogc
fnvoid endColumn() @safe nothrow @nogc
fnvoid row(int height, const(int)[] widths...) @safe nothrow @nogc
fnvoid setLayoutWidth(int width) @safe nothrow @nogc
fnvoid setLayoutHeight(int height) @safe nothrow @nogc
fnvoid setNextLayout(IRect rect, bool relative) @safe nothrow @nogc
fnIRect nextLayout() @safe nothrow @nogc
fnvoid drawControlFrame(UiId id, IRect rect, UiColor colorId, UiOptFlags opt, UiAtlas atlasId = UiAtlas.none) @safe nothrow @nogc
fnvoid drawControlText(IStr text, IRect rect, UiColor colorId, UiOptFlags opt) @safe nothrow @nogc
fnbool isUiMouseOver(IRect rect) @safe nothrow @nogc
fnvoid updateControl(UiId id, IRect rect, UiOptFlags opt) @safe nothrow @nogc
fnvoid text(IStr text) @safe nothrow @nogc
fnvoid label(IStr text) @safe nothrow @nogc
fnUiResFlags button(IStr label, UiIcon icon = UiIcon.none, UiOptFlags opt = UiOptFlag.alignCenter) @safe nothrow @nogc
fnUiResFlags checkbox(ref bool state, IStr label = "") @safe nothrow @nogc
fnUiResFlags textBox(Str buffer, ref Sz newlen, UiOptFlags opt = UiOptFlag.none) @safe nothrow @nogc
fnMuResFlags textBox(Str buffer, ref IStr newslice, UiOptFlags opt = UiOptFlag.none) @safe nothrow @nogc
fnMuResFlags textBox(Sz N = 128, IStr file = __FILE__, Sz line = __LINE__)(ref IStr newslice, UiOptFlags opt = UiOptFlag.none) @safe nothrow @nogc
fnUiResFlags slider(ref float value, float low, float high, float step = 0.01f, IStr fmt = uiNumberFmt, UiOptFlags opt = UiOptFlag.alignCenter) @safe nothrow @nogc
fnUiResFlags slider(ref int value, int low, int high, int step = 1, IStr fmt = uiNumberFmt, UiOptFlags opt = UiOptFlag.alignCenter) @safe nothrow @nogc
fnUiResFlags number(ref float value, float step = 0.01f, IStr fmt = uiNumberFmt, UiOptFlags opt = UiOptFlag.alignCenter) @safe nothrow @nogc
fnUiResFlags number(ref int value, int step = 1, IStr fmt = uiNumberFmt, UiOptFlags opt = UiOptFlag.alignCenter) @safe nothrow @nogc
fnUiResFlags header(IStr label, UiOptFlags opt = UiOptFlag.none) @safe nothrow @nogc
fnvoid members(T)(ref T data, int labelWidth, bool canShowPrivateMembers = false) @safe nothrow @nogc
fnUiResFlags headerAndMembers(T)(ref T data, int labelWidth, IStr label = "", bool canShowPrivateMembers = false) @safe nothrow @nogc
fnUiResFlags beginTreeNode(IStr label, UiOptFlags opt = UiOptFlag.none) @safe nothrow @nogc
fnvoid endTreeNode() @safe nothrow @nogc
fnUiResFlags beginWindow(IStr title, IRect rect, UiOptFlags opt = UiOptFlag.none) @safe nothrow @nogc
fnUiResFlags beginWindow(IStr title, int x, int y, int w, int h, UiOptFlags opt = UiOptFlag.none) @safe nothrow @nogc
fnvoid endWindow() @safe nothrow @nogc
fnvoid openPopup(IStr name) @safe nothrow @nogc
fnUiResFlags beginPopup(IStr name) @safe nothrow @nogc
fnvoid endPopup() @safe nothrow @nogc
fnvoid beginPanel(IStr name, UiOptFlags opt = UiOptFlag.none) @safe nothrow @nogc
fnvoid endPanel() @safe nothrow @nogc
fnvoid openDMenu() @safe nothrow @nogc
fnUiResFlags beginDMenu(ref IStr selection, const(IStr)[] items, IVec2 canvas, IStr label = "", Vec2 scale = Vec2(0.5f, 0.7f)) @safe nothrow @nogc
fnvoid endDMenu() @safe nothrow @nogc
fnint tempMuUiTextWidthFunc(UiFont font, IStr str) @trusted @safe nothrow @nogc
fnint tempMuUiTextHeightFunc(UiFont font) @trusted @safe nothrow @nogc
fnvoid 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*`.
fnvoid readyUi(int fontScale) @safe nothrow @nogcInitializes the microui context and sets temporary text size functions.
fnvoid readyUi(FontId font, int fontScale = 1) @safe nothrow @nogcInitializes the microui context and sets temporary text size functions.
fnvoid handleUiInput() @trusted @safe nothrow @nogcHandles input events and updates the microui context accordingly.
fnvoid drawUiState() @trusted @safe nothrow @nogcDraws the microui context to the screen.
fnvoid beginUiFrame() @safe nothrow @nogcBegins input handling and UI processing.
fnvoid endUiFrame() @safe nothrow @nogcEnds UI processing and performs drawing.

Variables 3

varUiContext uiContext
enumvaruiNumberFmt = muNumberFmt

Format string used for numbers.

enumvaruiNumberFmtWithZero = muNumberFmtWithZero

Format string used for numbers, with a zero at the end.