parin.joka.microui
Rxi's tiny immediate-mode UI library, but with Joka specific changes.
Types 36
The control ID type of microui.
The font type of microui.
The texture type of microui.
The slice repeat mode type of microui.
The clipping kind.
The command kind.
The color kind.
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 for getting the width of the text.
Used for getting the height of the text.
Used for drawing a frame.
A static stack.
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 draw an icon inside a rectangle with a given color.
A union of all possible render commands. The type and base fields are always valid, as all commands begin with a MuCommand and MuBaseCommand. Use type to determine the active command variant.
MuCommand typeMuBaseCommand baseMuJumpCommand jumpMuClipCommand clipMuRectCommand rectMuTextCommand textMuIconCommand iconA UI container holding commands.
MuCommandData * headMuCommandData * tailIRect rectIRect bodyIVec2 contentSizeIVec2 scrollint zIndexbool openA 9-slice definition for an atlas area, controlling how it is sampled and tiled.
UI style settings including font, sizes, spacing, and colors.
MuFont fontMuTexture textureIVec2 sizeint paddingint spacingint indentint borderint titleHeightint scrollbarSizeint scrollbarSpeedint scrollbarKeySpeedint thumbSizeint fontScaleStaticArray!(Rgba, MuColor.max + 1) colorsStaticArray!(MuSlice, MuAtlas.max + 1) slicesStaticArray!(IRect, MuIcon.max + 1) iconAtlasAreasUsed by the members function to hide data.
Used by the members function to show data in a specific way.
this(float low, float high, float step = float.nan)Constructs a member with a slider range and optional step size.this(float step)Constructs a member with only a step size.The UI context.
MuTextWidthFunc textWidthMuTextHeightFunc textHeightMuDrawFrameFunc drawFrameMuStyle _styleMuStyle * styleMuId hoverMuId focusMuId lastIdIRect lastRectint lastZIndexbool updatedFocusint frameMuContainer * hoverRootMuContainer * nextHoverRootMuContainer * scrollTargetchar[muMaxFmt] numberEditBufferMuId numberEditbool isExpectingEnduint buttonCounterMuKeyFlags dragWindowKeyMuKeyFlags resizeWindowKeyMuStack!(char, muCommandListSize) commandListMuStack!(MuContainer *, muRootListSize) rootListMuStack!(MuContainer *, muContainerStackSize) containerStackStaticArray!(MuPoolItem, muContainerPoolSize) containerPoolStaticArray!(MuContainer, muContainerPoolSize) containersStaticArray!(MuPoolItem, muTreeNodePoolSize) treeNodePoolIVec2 mousePosIVec2 lastMousePosIVec2 mouseDeltaIVec2 scrollDeltaMuMouseFlags mouseDownMuMouseFlags mousePressedMuKeyFlags keyDownMuKeyFlags keyPressedchar[muInputTextSize] inputTextDataStr inputTextSlicevoid applyDefaultStyle()void applySolarizedDarkStyle()void applyGruvboxDarkStyle()void readyWithFuncs(MuTextWidthFunc width, MuTextHeightFunc height, MuFont font, int fontScale = 1)void begin()void end() @trustedvoid drawControlFrame(MuId id, IRect rect, MuColor colorId, MuOptFlags opt, MuAtlas atlasId = MuAtlas.none) @trustedvoid drawControlText(IStr str, IRect rect, MuColor colorId, MuOptFlags opt)void drawControlTextLegacy(IStrz str, IRect rect, MuColor colorId, MuOptFlags opt)void updateControl(MuId id, IRect rect, MuOptFlags opt, bool isDragOrResizeControl = false, MuMouseFlags action = MuMouseFlag.left)void scrollbarY(MuContainer * cnt, IRect * b, IVec2 cs) @trustedvoid scrollbarX(MuContainer * cnt, IRect * b, IVec2 cs) @trustedvoid text(IStr str) @trustedIt handles both D strings and C strings, so you can also pass null-terminated buffers directly.void textLegacy(IStrz str)void labelLegacy(IStrz str)MuResFlags button(IStr str, MuIcon icon = MuIcon.none, MuOptFlags opt = MuOptFlag.alignCenter) @trustedMuResFlags buttonLegacy(IStr str, MuIcon icon, MuOptFlags opt) @trustedMuResFlags checkbox(ref bool state, IStr str = "") @trustedMuResFlags checkboxLegacy(bool * state, IStr str) @trustedMuResFlags textBoxRaw(Str buf, MuId id, IRect r, ref Sz newlen, MuOptFlags opt) @trustedMuResFlags textBoxRawLegacy(Strz buf, Sz bufsz, MuId id, IRect r, Sz * newlen, MuOptFlags opt) @trustedMuResFlags textBox(Str buf, ref Sz newlen, MuOptFlags opt = MuOptFlag.none) @trustedMuResFlags textBox(Str buf, ref IStr newslice, MuOptFlags opt = MuOptFlag.none) @trustedMuResFlags textBoxLegacy(Strz buf, Sz bufsz, Sz * newlen, MuOptFlags opt) @trustedMuResFlags textBox(Sz N = 128, IStr file = __FILE__, Sz line = __LINE__)(ref IStr newslice, MuOptFlags opt = MuOptFlag.none)MuResFlags slider(ref float value, float low, float high, float step = 0.01f, IStr fmt = muNumberFmt, MuOptFlags opt = MuOptFlag.alignCenter) @trustedMuResFlags sliderLegacy(float * value, float low, float high, float step, IStr fmt, MuOptFlags opt, bool isFmtFloatAnInt) @trustedMuResFlags slider(ref int value, int low, int high, int step = 1, IStr fmt = muNumberFmt, MuOptFlags opt = MuOptFlag.alignCenter) @trustedMuResFlags sliderLegacy(int * value, int low, int high, int step, IStr fmt, MuOptFlags opt, bool isFmtFloatAnInt) @trustedMuResFlags number(ref float value, float step = 0.01f, IStr fmt = muNumberFmt, MuOptFlags opt = MuOptFlag.alignCenter) @trustedMuResFlags numberLegacy(float * value, float step, IStr fmt, MuOptFlags opt, bool isFmtFloatAnInt) @trustedMuResFlags number(ref int value, int step = 1, IStr fmt = muNumberFmt, MuOptFlags opt = MuOptFlag.alignCenter) @trustedMuResFlags numberLegacy(int * value, int step, IStr fmt, MuOptFlags opt, bool isFmtFloatAnInt) @trustedMuResFlags header(IStr label, MuOptFlags opt = MuOptFlag.none) @trustedMuResFlags beginTreeNode(IStr label, MuOptFlags opt = MuOptFlag.none) @trustedvoid endTreeNode() @trustedMuResFlags beginWindow(IStr title, IRect rect, MuOptFlags opt = MuOptFlag.none) @trustedMuResFlags beginWindow(IStr title, int x, int y, int w, int h, MuOptFlags opt = MuOptFlag.none)void endWindow() @trustedMuResFlags beginPopup(IStr name)void beginPanel(IStr name, MuOptFlags opt = MuOptFlag.none) @trustedvoid endPanel() @trustedvoid openDmenu()MuResFlags beginDmenu(ref IStr selection, const(IStr)[] items, IVec2 canvas, IStr str = "", Vec2 scale = Vec2(0.5f, 0.7f)) @trustedvoid members(T)(ref T data, int labelWidth, bool canShowPrivateMembers = false)MuResFlags headerAndMembers(T)(ref T data, int labelWidth, IStr label = "", bool canShowPrivateMembers = false)void beginColumn() @trustedvoid endColumn() @trustedvoid row(int height, const(int)[] widths...) @trustedvoid rowLegacy(int items, const(int) * widths, int height) @trustedvoid setLayoutWidth(int width) @trustedvoid setLayoutHeight(int height) @trustedvoid setNextLayout(IRect r, bool relative) @trustedIRect nextLayout() @trustedvoid inputMouseMove(int x, int y)void inputMouseDown(int x, int y, MuMouseFlags btn)void inputMouseUp(int x, int y, MuMouseFlags btn)void inputScroll(int x, int y)void inputKeyDown(MuKeyFlags key)void inputKeyUp(MuKeyFlags key)int poolInit(MuPoolItem * items, Sz len, MuId id) @trustedint poolGet(MuPoolItem * items, Sz len, MuId id) @trustedvoid poolUpdate(MuPoolItem * items, Sz idx) @trustedMuCommandData * pushCommand(MuCommand type, Sz size) @trustedbool nextCommand(MuCommandData * * cmd) @trustedMuId getIdFromStr(IStr str) @trustedvoid pushIdFromStr(IStr str) @trustedvoid popId()void pushClipRect(IRect rect)void popClipRect()MuContainer * getContainer(IStr name) @trustedvoid bringToFront(MuContainer * cnt)this(MuTextWidthFunc width, MuTextHeightFunc height, MuFont font, int fontScale = 1)Functions 15
MuLayout * _getLayout(MuContext * ctx)void _popContainer(MuContext * ctx)bool _inHoverRoot(MuContext * ctx)MuResFlags _numberTextbox(MuContext * ctx, float * value, IRect r, MuId id)void _scrollbars(MuContext * ctx, MuContainer * cnt, IRect * body)void _beginRootContainer(MuContext * ctx, MuContainer * cnt)void defaultMuDrawFrame(MuContext * ctx, IRect rect, MuColor colorId, MuAtlas atlasId = MuAtlas.none)int tempMuTextWidthFunc(MuFont font, IStr str)int tempMuTextHeightFunc(MuFont font)Variables 19
muVersion = "2.02"Version of the original microui C library.
muCommandSize = 1024Size of the command, in bytes. Commands include extra space for strings. See muMaxStrSize.
muCommandListSize = 256 * muCommandSizeSize of the command list, in bytes. Commands include extra space for strings. See muMaxStrSize.
muRootListSize = 32Maximum number of root containers (windows).
muContainerStackSize = 32Max depth for container stack.
muClipStackSize = 32Max depth for clipping region stack.
muIdStackSize = 32Max depth for ID stack.
muLayoutStackSize = 16Max depth for layout stack.
muContainerPoolSize = 48Number of reusable containers.
muTreeNodePoolSize = 48Number of reusable tree nodes.
muInputTextSize = 1024Maximum length of input text buffers.
muMaxWidths = 16Maximum number of columns per layout row.
muNumberFmt = "{}"Format string used for numbers.
muNumberFmtWithZero = "{}\0"Format string used for numbers, with a zero at the end.
muMaxFmt = 127Max length of any formatted string.
muMaxStrSize = (cast(int) muCommandSize) - (cast(int) MuTextCommand.sizeof)Maximum length of command strings.
relative = 1absolute = 2unclippedRect = IRect(0, 0, 0x1000000, 0x1000000)