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 47
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 set of 4 integer margins for left, top, right, and bottom.
A part of a 9-slice with source and target rectangles for drawing.
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.
The old name of the beginUiFrame function.
The old name of the endUiFrame function.
Functions 82
void readyUiCore(UiFont font = null, int fontScale = 1)void readyUiCore(UiTextWidthFunc width, UiTextHeightFunc height, UiFont font = null, int fontScale = 1)void beginUiCore()void endUiCore()void setUifocus(UiId id)void popUiId()void pushUiClipRect(IRect rect)void popUiClipRect()IRect getUiClipRect()UiClip checkUiClipRect(IRect rect)UiContainer * getUiContainer(IStr name)void bringUiContainerToFront(UiContainer * cnt)int readyUiPool(UiPoolItem * items, Sz len, UiId id)int getFromUiPool(UiPoolItem * items, Sz len, UiId id)void updateUiPool(UiPoolItem * items, Sz idx)void uiInputMouseMove(int x, int y)void uiInputMouseDown(int x, int y, UiMouseFlags input)void uiInputMouseUp(int x, int y, UiMouseFlags input)void uiInputScroll(int x, int y)void uiInputKeyDown(UiKeyFlags input)void uiInputKeyUp(UiKeyFlags input)void uiInputText(IStr text)UiCommandData * pushUiCommand(UiCommand type, Sz size)bool nextUiCommand(UiCommandData * * cmd)void setUiClipRect(IRect rect)void drawUiRect(IRect rect, Rgba color, UiAtlas id = UiAtlas.none)void drawUiText(UiFont font, IStr str, IVec2 point, Rgba color)void drawUiIcon(UiIcon id, IRect rect, Rgba color)void beginColumn()void endColumn()void row(int height, const(int)[] widths...)void setLayoutWidth(int width)void setLayoutHeight(int height)void setNextLayout(IRect rect, bool relative)IRect nextLayout()void drawControlFrame(UiId id, IRect rect, UiColor colorId, UiOptFlags opt, UiAtlas atlasId = UiAtlas.none)void drawControlText(IStr text, IRect rect, UiColor colorId, UiOptFlags opt)bool isUiMouseOver(IRect rect)void updateControl(UiId id, IRect rect, UiOptFlags opt)UiResFlags button(IStr label, UiIcon icon = UiIcon.none, UiOptFlags opt = UiOptFlag.alignCenter)UiResFlags checkbox(ref bool state, IStr label = "")UiResFlags textBox(Str buffer, ref Sz newlen, UiOptFlags opt = UiOptFlag.none)MuResFlags textBox(Str buffer, ref IStr newslice, UiOptFlags opt = UiOptFlag.none)MuResFlags textBox(Sz N = 128, IStr file = __FILE__, Sz line = __LINE__)(ref IStr newslice, UiOptFlags opt = UiOptFlag.none)UiResFlags slider(ref float value, float low, float high, float step = 0.01f, IStr fmt = uiNumberFmt, UiOptFlags opt = UiOptFlag.alignCenter)UiResFlags slider(ref int value, int low, int high, int step = 1, IStr fmt = uiNumberFmt, UiOptFlags opt = UiOptFlag.alignCenter)UiResFlags number(ref float value, float step = 0.01f, IStr fmt = uiNumberFmt, UiOptFlags opt = UiOptFlag.alignCenter)UiResFlags number(ref int value, int step = 1, IStr fmt = uiNumberFmt, UiOptFlags opt = UiOptFlag.alignCenter)UiResFlags header(IStr label, UiOptFlags opt = UiOptFlag.none)void members(T)(ref T data, int labelWidth, bool canShowPrivateMembers = false)UiResFlags headerAndMembers(T)(ref T data, int labelWidth, IStr label = "", bool canShowPrivateMembers = false)UiResFlags beginTreeNode(IStr label, UiOptFlags opt = UiOptFlag.none)void endTreeNode()UiResFlags beginWindow(IStr title, IRect rect, UiOptFlags opt = UiOptFlag.none)UiResFlags beginWindow(IStr title, int x, int y, int w, int h, UiOptFlags opt = UiOptFlag.none)void endWindow()UiResFlags beginPopup(IStr name)void endPopup()void beginPanel(IStr name, UiOptFlags opt = UiOptFlag.none)void endPanel()void openDMenu()UiResFlags beginDMenu(ref IStr selection, const(IStr)[] items, IVec2 canvas, IStr label = "", Vec2 scale = Vec2(0.5f, 0.7f))void endDMenu()void readyUi(UiFont font = null, int fontScale = 1) @trustedInitializes the microui context and sets temporary text size functions. Value `font` should be a `FontId*`.void readyUi(int fontScale)Initializes the microui context and sets temporary text size functions.Variables 3
UiContext uiContextuiNumberFmt = muNumberFmtFormat string used for numbers.
uiNumberFmtWithZero = muNumberFmtWithZeroFormat string used for numbers, with a zero at the end.