|
Kemena3D
|
Wraps Dear ImGui initialisation, event forwarding, and widget calls. More...
#include <kguimanager.h>
Public Member Functions | |
| kGuiManager () | |
| Constructs an uninitialised GUI manager; call init() before use. | |
| virtual | ~kGuiManager () |
| Destroys the GUI manager, releasing any held ImGui resources. | |
| void | init (kRenderer *newRenderer) |
| Initialises ImGui with the given renderer's context and window. | |
| void | processEvent (kSystemEvent event) |
| Forwards a system event to ImGui for input processing. | |
| void | loadDefaultFontFromResource (kString resourceName) |
| Loads and sets the default ImGui font from a Windows resource. | |
| void | canvasStart () |
| Begins a new ImGui frame (call once per render frame). | |
| void | canvasEnd () |
| Renders all ImGui draw data and ends the frame. | |
| void | windowStart (kString title, bool *open=nullptr, ImGuiWindowFlags flags=0) |
| Begins an ImGui window. | |
| void | windowEnd () |
| Ends the current ImGui window. | |
| kVec2 | getWindowSize () |
| Returns the inner size of the current window in pixels. | |
| kVec2 | getWindowPos () |
| Returns the screen-space position of the current window. | |
| void | setNextWindowSize (kVec2 size, ImGuiCond cond=0) |
| Sets the size of the next window before it is created. | |
| void | setNextWindowPos (kVec2 pos, ImGuiCond cond=0, kVec2 pivot=kVec2(0, 0)) |
| Sets the position of the next window before it is created. | |
| void | setNextWindowContentSize (kVec2 size) |
| Sets the content size of the next window. | |
| void | setNextWindowCollapsed (bool collapsed, ImGuiCond cond=0) |
| Sets the collapsed state of the next window. | |
| void | setNextWindowFocus () |
| Gives input focus to the next window. | |
| void | setNextWindowBgAlpha (float alpha) |
| Sets the background transparency of the next window. | |
| bool | isWindowFocused (ImGuiFocusedFlags flags=0) |
| Returns whether the current window has keyboard focus. | |
| bool | isWindowHovered (ImGuiHoveredFlags flags=0) |
| Returns whether the mouse is hovering over the current window. | |
| kVec2 | getWindowContentRegionMin () |
| Returns the content region minimum bound in window-local coordinates. | |
| kVec2 | getWindowContentRegionMax () |
| Returns the content region maximum bound in window-local coordinates. | |
| kVec2 | getMainViewportCenter () |
| Returns the center of the main viewport in screen coordinates. | |
| bool | childStart (kString id, kVec2 size=kVec2(0, 0), ImGuiChildFlags childFlags=0, ImGuiWindowFlags windowFlags=0) |
| Begins a scrollable child region. | |
| void | childEnd () |
| Ends the current child region. Always call this after childStart(). | |
| void | dockSpaceStart (kString name) |
| Begins a full-window docking area. | |
| void | dockSpaceEnd () |
| Ends the current dockspace (no-op; kept for symmetry). | |
| bool | menuBar () |
| Begins the main menu bar. | |
| void | menuBarEnd () |
| Ends the main menu bar. | |
| bool | menu (kString text) |
| Begins a named menu. | |
| void | menuEnd () |
| Ends the current menu. | |
| bool | menuItem (kString text, kString shortcut="", bool selected=false, bool enabled=true) |
| Adds a clickable menu item. | |
| bool | menuItem (kString text, kString shortcut, bool *selected, bool enabled=true) |
| Adds a toggleable menu item backed by a bool. | |
| void | groupStart () |
| Begins a layout group. | |
| void | groupEnd () |
| Ends a layout group. | |
| void | beginDisabled (bool disabled=true) |
| Disables all user interaction and dims widgets. | |
| void | endDisabled () |
| Ends a disabled section opened with beginDisabled(). | |
| void | sameLine (float offsetFromStartX=0.0f, float spacing=-1.0f) |
| Places the next widget on the same line as the previous one. | |
| void | spacing () |
| Inserts a small vertical space. | |
| void | separator () |
| Draws a horizontal separator line. | |
| void | separatorText (kString text) |
| Draws a horizontal separator with a centred text label. | |
| void | newLine () |
| Inserts a blank line in the layout. | |
| void | indent (float indentW=0.0f) |
Moves the cursor right by indentW pixels. | |
| void | unindent (float indentW=0.0f) |
Moves the cursor left by indentW pixels. | |
| void | dummy (kVec2 size) |
| Inserts an invisible widget of a given size for layout spacing. | |
| void | setCursorPos (kVec2 pos) |
| Moves the cursor to an absolute position within the window. | |
| void | setCursorPosX (float x) |
| Sets the cursor X position. | |
| void | setCursorPosY (float y) |
| Sets the cursor Y position. | |
| kVec2 | getCursorPos () |
| Returns the cursor position relative to the window. | |
| float | getCursorPosX () |
| Returns the cursor X position. | |
| float | getCursorPosY () |
| Returns the cursor Y position. | |
| kVec2 | getCursorScreenPos () |
| Returns the cursor position in screen coordinates. | |
| void | setCursorScreenPos (kVec2 pos) |
| Moves the cursor to an absolute screen-space position. | |
| kVec2 | getContentRegionAvail () |
| Returns the available content region size in the current window. | |
| void | setNextItemWidth (float itemWidth) |
| Sets the width of the next widget. | |
| void | pushItemWidth (float itemWidth) |
| Pushes a width onto the item-width stack. | |
| void | popItemWidth () |
| Pops the last item width from the stack. | |
| float | calcItemWidth () |
| Returns the current item width calculated by ImGui. | |
| void | pushTextWrapPos (float wrapLocalPosX=0.0f) |
| Pushes a text wrap position onto the stack. | |
| void | popTextWrapPos () |
| Pops the last text wrap position. | |
| float | getFrameHeight () |
| Returns the height of a typical framed widget in pixels (FontSize + FramePadding * 2). | |
| float | getFrameHeightWithSpacing () |
| Returns the height of a framed widget plus item spacing (distance between two consecutive widget rows). | |
| void | pushId (kString id) |
| Pushes a kString ID onto the ID stack. | |
| void | pushId (int id) |
| Pushes an integer ID onto the ID stack. | |
| void | pushId (const void *ptr) |
| Pushes a pointer ID onto the ID stack. | |
| void | popId () |
| Pops the last ID from the ID stack. | |
| void | pushStyleColor (ImGuiCol idx, kVec4 color) |
| Pushes a colour override for an ImGui style element. | |
| void | pushStyleColor (ImGuiCol idx, ImU32 color) |
| Pushes a packed colour override. | |
| void | popStyleColor (int count=1) |
| Pops colour overrides from the style stack. | |
| void | pushStyleVar (ImGuiStyleVar idx, float val) |
| Pushes a float style variable override. | |
| void | pushStyleVar (ImGuiStyleVar idx, kVec2 val) |
| Pushes a kVec2 style variable override. | |
| void | popStyleVar (int count=1) |
| Pops style variable overrides from the stack. | |
| void | pushFont (ImFont *font) |
| Pushes a font onto the font stack. | |
| void | popFont () |
| Pops the last font from the font stack. | |
| float | getFontSize () |
| Returns the current scaled font size in pixels. | |
| void | text (kString text) |
| Renders a plain text kString. | |
| void | textColored (kVec4 color, kString text) |
| Renders coloured text. | |
| void | textDisabled (kString text) |
| Renders greyed-out (disabled) text. | |
| void | alignTextToFramePadding () |
| Vertically aligns the next widget so its baseline lines up with text. | |
| void | textWrapped (kString text) |
| Renders text that wraps at the wrap position. | |
| void | labelText (kString label, kString text) |
| Renders a label/value pair aligned to the value column. | |
| void | bulletText (kString text) |
| Renders text preceded by a bullet point. | |
| void | bullet () |
| Renders a bullet point without text. | |
| kVec2 | calcTextSize (kString text, bool hideTextAfterDoubleHash=false, float wrapWidth=-1.0f) |
| Returns the rendered size of a text kString. | |
| bool | button (kString text, kIvec2 size=kIvec2(0, 0)) |
| Renders a push-button. | |
| bool | smallButton (kString text) |
| Renders a small inline push-button. | |
| bool | invisibleButton (kString id, kVec2 size, ImGuiButtonFlags flags=0) |
| Renders an invisible hit-area button. | |
| bool | arrowButton (kString id, ImGuiDir dir) |
| Renders an arrow-shaped button. | |
| bool | radioButton (kString label, bool active) |
| Renders a radio button. | |
| bool | radioButton (kString label, int *v, int vButton) |
| Renders a radio button linked to an integer variable. | |
| bool | checkbox (kString text, bool *output) |
| Renders a checkbox. | |
| bool | checkboxFlags (kString label, int *flags, int flagsValue) |
| Renders a checkbox backed by integer flags (signed). | |
| bool | checkboxFlags (kString label, unsigned int *flags, unsigned int flagsValue) |
| Renders a checkbox backed by integer flags (unsigned). | |
| bool | inputText (kString label, kString &value, size_t maxLength=256, ImGuiInputTextFlags flags=0) |
| Renders a single-line text input field. | |
| bool | inputTextMultiline (kString label, kString &value, size_t maxLength=1024, kVec2 size=kVec2(0, 0), ImGuiInputTextFlags flags=0) |
| Renders a multi-line text input field. | |
| bool | inputTextWithHint (kString label, kString hint, kString &value, size_t maxLength=256, ImGuiInputTextFlags flags=0) |
| Renders a single-line text input with a placeholder hint. | |
| bool | inputFloat (kString label, float *v, float step=0.0f, float stepFast=0.0f, kString format="%.3f", ImGuiInputTextFlags flags=0) |
| Single float input. | |
| bool | inputFloat2 (kString label, float v[2], kString format="%.3f", ImGuiInputTextFlags flags=0) |
| Two-component float input. | |
| bool | inputFloat3 (kString label, float v[3], kString format="%.3f", ImGuiInputTextFlags flags=0) |
| Three-component float input. | |
| bool | inputFloat4 (kString label, float v[4], kString format="%.3f", ImGuiInputTextFlags flags=0) |
| Four-component float input. | |
| bool | inputInt (kString label, int *v, int step=1, int stepFast=100, ImGuiInputTextFlags flags=0) |
| Single integer input. | |
| bool | inputInt2 (kString label, int v[2], ImGuiInputTextFlags flags=0) |
| Two-component integer input. | |
| bool | inputInt3 (kString label, int v[3], ImGuiInputTextFlags flags=0) |
| Three-component integer input. | |
| bool | inputInt4 (kString label, int v[4], ImGuiInputTextFlags flags=0) |
| Four-component integer input. | |
| bool | inputDouble (kString label, double *v, double step=0.0, double stepFast=0.0, kString format="%.6f", ImGuiInputTextFlags flags=0) |
| Double-precision float input. | |
| bool | dragFloat (kString label, float *v, float speed=1.0f, float min=0.0f, float max=0.0f, kString format="%.3f", ImGuiSliderFlags flags=0) |
| Drag widget for a single float. | |
| bool | dragFloat2 (kString label, float v[2], float speed=1.0f, float min=0.0f, float max=0.0f, kString format="%.3f", ImGuiSliderFlags flags=0) |
| Drag widget for two floats. | |
| bool | dragFloat3 (kString label, float v[3], float speed=1.0f, float min=0.0f, float max=0.0f, kString format="%.3f", ImGuiSliderFlags flags=0) |
| Drag widget for three floats. | |
| bool | dragFloat4 (kString label, float v[4], float speed=1.0f, float min=0.0f, float max=0.0f, kString format="%.3f", ImGuiSliderFlags flags=0) |
| Drag widget for four floats. | |
| bool | dragInt (kString label, int *v, float speed=1.0f, int min=0, int max=0, kString format="%d", ImGuiSliderFlags flags=0) |
| Drag widget for a single integer. | |
| bool | dragInt2 (kString label, int v[2], float speed=1.0f, int min=0, int max=0, kString format="%d", ImGuiSliderFlags flags=0) |
| Drag widget for two integers. | |
| bool | dragInt3 (kString label, int v[3], float speed=1.0f, int min=0, int max=0, kString format="%d", ImGuiSliderFlags flags=0) |
| Drag widget for three integers. | |
| bool | dragInt4 (kString label, int v[4], float speed=1.0f, int min=0, int max=0, kString format="%d", ImGuiSliderFlags flags=0) |
| Drag widget for four integers. | |
| bool | dragFloatRange2 (kString label, float *vCurrentMin, float *vCurrentMax, float speed=1.0f, float min=0.0f, float max=0.0f, kString format="%.3f", kString formatMax="", ImGuiSliderFlags flags=0) |
| Drag widget for a float range (min + max pair). | |
| bool | dragIntRange2 (kString label, int *vCurrentMin, int *vCurrentMax, float speed=1.0f, int min=0, int max=0, kString format="%d", kString formatMax="", ImGuiSliderFlags flags=0) |
| Drag widget for an integer range (min + max pair). | |
| bool | sliderFloat (kString label, float *v, float min, float max, kString format="%.3f", ImGuiSliderFlags flags=0) |
| Horizontal slider for a single float. | |
| bool | sliderFloat2 (kString label, float v[2], float min, float max, kString format="%.3f", ImGuiSliderFlags flags=0) |
| Horizontal slider for two floats. | |
| bool | sliderFloat3 (kString label, float v[3], float min, float max, kString format="%.3f", ImGuiSliderFlags flags=0) |
| Horizontal slider for three floats. | |
| bool | sliderFloat4 (kString label, float v[4], float min, float max, kString format="%.3f", ImGuiSliderFlags flags=0) |
| Horizontal slider for four floats. | |
| bool | sliderAngle (kString label, float *vRad, float vDegreesMin=-360.0f, float vDegreesMax=360.0f, kString format="%.0f deg", ImGuiSliderFlags flags=0) |
| Horizontal slider that displays and edits an angle in degrees. | |
| bool | sliderInt (kString label, int *v, int min, int max, kString format="%d", ImGuiSliderFlags flags=0) |
| Horizontal slider for a single integer. | |
| bool | sliderInt2 (kString label, int v[2], int min, int max, kString format="%d", ImGuiSliderFlags flags=0) |
| Horizontal slider for two integers. | |
| bool | sliderInt3 (kString label, int v[3], int min, int max, kString format="%d", ImGuiSliderFlags flags=0) |
| Horizontal slider for three integers. | |
| bool | sliderInt4 (kString label, int v[4], int min, int max, kString format="%d", ImGuiSliderFlags flags=0) |
| Horizontal slider for four integers. | |
| bool | colorEdit3 (kString label, float col[3], ImGuiColorEditFlags flags=0) |
| RGB colour editor widget. | |
| bool | colorEdit4 (kString label, float col[4], ImGuiColorEditFlags flags=0) |
| RGBA colour editor widget. | |
| bool | colorPicker3 (kString label, float col[3], ImGuiColorEditFlags flags=0) |
| RGB colour picker widget. | |
| bool | colorPicker4 (kString label, float col[4], ImGuiColorEditFlags flags=0) |
| RGBA colour picker widget. | |
| bool | colorButton (kString descId, kVec4 col, ImGuiColorEditFlags flags=0, kVec2 size=kVec2(0, 0)) |
| Renders a small coloured square button. | |
| void | setColorEditOptions (ImGuiColorEditFlags flags) |
| Sets global colour edit display options. | |
| bool | combo (kString label, int *currentItem, std::vector< kString > items, int popupMaxHeightInItems=-1) |
| Drop-down combo box. | |
| bool | listBox (kString label, int *currentItem, std::vector< kString > items, int heightInItems=-1) |
| Scrollable list box. | |
| bool | selectable (kString label, bool selected=false, ImGuiSelectableFlags flags=0, kVec2 size=kVec2(0, 0)) |
| Selectable row (state passed by value). | |
| bool | selectable (kString label, bool *pSelected, ImGuiSelectableFlags flags=0, kVec2 size=kVec2(0, 0)) |
| Selectable row (state passed by pointer). | |
| bool | treeStart (kString label) |
| Begins a tree node (uses label as ID). | |
| bool | treeStartEx (kString id, kString label="", ImGuiTreeNodeFlags flags=0) |
| Begins a tree node with explicit ID and label. | |
| void | treeEnd () |
| Ends the current tree node (use when treeStart returned true). | |
| void | treePop () |
| Pops the tree indent regardless of whether the node is open. | |
| bool | collapsingHeader (kString label, ImGuiTreeNodeFlags flags=0) |
| Collapsible section header. | |
| bool | collapsingHeader (kString label, bool *visible, ImGuiTreeNodeFlags flags=0) |
| Collapsible section header with a close button. | |
| void | setNextItemOpen (bool isOpen, ImGuiCond cond=0) |
| Sets the open state of the next tree node. | |
| void | image (GLuint textureId, kVec2 size, kVec2 uv0=kVec2(0, 0), kVec2 uv1=kVec2(1, 1)) |
| Renders a GPU texture as an image widget. | |
| bool | imageButton (kString id, GLuint textureId, kVec2 size, kVec2 uv0=kVec2(0, 0), kVec2 uv1=kVec2(1, 1), kVec4 tint=kVec4(1, 1, 1, 1)) |
| Renders a GPU texture as a clickable image button. | |
| void | progressBar (float fraction, kVec2 size=kVec2(-FLT_MIN, 0), kString overlay="") |
| Renders a horizontal progress bar. | |
| void | setItemTooltip (kString text) |
| Sets a tooltip shown when the last item is hovered. | |
| void | beginTooltip () |
| Begins a custom tooltip popup. | |
| void | endTooltip () |
| Ends the current tooltip popup. | |
| void | openPopup (kString id, ImGuiPopupFlags flags=0) |
| Opens a named popup on the next frame. | |
| bool | popupStart (kString id, ImGuiWindowFlags flags=0) |
| Begins rendering a named popup. | |
| void | popupEnd () |
| Ends the current popup. | |
| bool | popupModal (kString name, bool *open=nullptr, ImGuiWindowFlags flags=0) |
| Begins a modal popup dialog. | |
| bool | popupContextItemStart (kString id="", ImGuiPopupFlags flags=ImGuiPopupFlags_MouseButtonRight) |
| Begins a context menu popup on right-click of the last item. | |
| bool | popupContextWindowStart (kString id="", ImGuiPopupFlags flags=ImGuiPopupFlags_MouseButtonRight) |
| Begins a context menu popup on right-click of the current window. | |
| bool | isPopupOpen (kString id, ImGuiPopupFlags flags=0) |
| Returns whether a named popup is currently open. | |
| void | closeCurrentPopup () |
| Closes the currently open popup. | |
| bool | tabBarStart (kString id, ImGuiTabBarFlags flags=0) |
| Begins a tab bar container. | |
| void | tabBarEnd () |
| Ends the current tab bar. | |
| bool | tabItemStart (kString label, bool *open=nullptr, ImGuiTabItemFlags flags=0) |
| Begins a tab item inside a tab bar. | |
| void | tabItemEnd () |
| Ends the current tab item. | |
| void | setTabItemClosed (kString tabOrDockedWindowLabel) |
| Marks a tab (or docked window) as closed programmatically. | |
| bool | tableStart (kString id, int columns, ImGuiTableFlags flags=0, kVec2 outerSize=kVec2(0, 0), float innerWidth=0.0f) |
| Begins a table layout. | |
| void | tableEnd () |
| Ends the current table. | |
| bool | tableNextColumn () |
| Advances to the next column in the current row. | |
| bool | tableSetColumnIndex (int columnN) |
| Sets the current column index explicitly. | |
| void | tableNextRow (ImGuiTableRowFlags rowFlags=0, float minRowHeight=0.0f) |
| Begins a new table row. | |
| void | tableSetupColumn (kString label, ImGuiTableColumnFlags flags=0, float initWidthOrWeight=0.0f) |
| Sets up a table column with optional flags and initial width. | |
| void | tableSetupScrollFreeze (int cols, int rows) |
| Freezes leading columns/rows so they remain visible while scrolling. | |
| void | tableHeadersRow () |
| Renders the header row using labels set by tableSetupColumn(). | |
| void | tableHeader (kString label) |
| Renders a single header cell. | |
| void | columnsStart (int count=1, kString id="", bool borders=true) |
| Begins a legacy multi-column layout. | |
| void | columnsEnd () |
| Resets to a single-column layout, ending the columns region. | |
| void | nextColumn () |
| Advances to the next column (wraps to the next row when needed). | |
| float | getColumnWidth (int columnIndex=-1) |
| Returns the width of a column in pixels. | |
| float | getScrollX () |
| Returns the current horizontal scroll position. | |
| float | getScrollY () |
| Returns the current vertical scroll position. | |
| void | setScrollX (float scrollX) |
| Sets the horizontal scroll position. | |
| void | setScrollY (float scrollY) |
| Sets the vertical scroll position. | |
| float | getScrollMaxX () |
| Returns the maximum horizontal scroll position. | |
| float | getScrollMaxY () |
| Returns the maximum vertical scroll position. | |
| void | setScrollHereX (float centerXRatio=0.5f) |
| Scrolls so the current item is visible horizontally. | |
| void | setScrollHereY (float centerYRatio=0.5f) |
| Scrolls so the current item is visible vertically. | |
| bool | isItemHovered (ImGuiHoveredFlags flags=0) |
| Returns whether the last widget is hovered. | |
| bool | isItemActive () |
| Returns whether the last widget is active (e.g. being dragged). | |
| bool | isItemFocused () |
| Returns whether the last widget has keyboard focus. | |
| bool | isItemClicked (ImGuiMouseButton mouseButton=0) |
| Returns whether the last widget was clicked. | |
| bool | isItemVisible () |
| Returns whether the last widget is visible in the clipping rectangle. | |
| bool | isItemEdited () |
| Returns whether the last widget's value was edited this frame. | |
| bool | isItemActivated () |
| Returns whether the last widget became active this frame. | |
| bool | isItemDeactivated () |
| Returns whether the last widget became inactive this frame. | |
| bool | isItemDeactivatedAfterEdit () |
| Returns whether the last widget became inactive after being edited. | |
| bool | isItemToggledOpen () |
| Returns whether the last tree node was toggled open. | |
| bool | isAnyItemHovered () |
| Returns whether any widget is currently hovered. | |
| bool | isAnyItemActive () |
| Returns whether any widget is currently active. | |
| bool | isAnyItemFocused () |
| Returns whether any widget currently has focus. | |
| kVec2 | getItemRectMin () |
| Returns the bounding box minimum of the last item (screen space). | |
| kVec2 | getItemRectMax () |
| Returns the bounding box maximum of the last item (screen space). | |
| kVec2 | getItemRectSize () |
| Returns the bounding box size of the last item. | |
| void | setNextItemAllowOverlap () |
| Allows the next item to overlap previously drawn items. Call this before the item that should allow overlap. | |
| bool | isMouseDown (ImGuiMouseButton button) |
| Returns whether a mouse button is held down. | |
| bool | isMouseClicked (ImGuiMouseButton button, bool repeat=false) |
| Returns whether a mouse button was clicked this frame. | |
| bool | isMouseReleased (ImGuiMouseButton button) |
| Returns whether a mouse button was released this frame. | |
| bool | isMouseDoubleClicked (ImGuiMouseButton button) |
| Returns whether a mouse button was double-clicked this frame. | |
| bool | isMouseHoveringRect (kVec2 rMin, kVec2 rMax, bool clip=true) |
| Returns whether the mouse is inside the given screen-space rectangle. | |
| kVec2 | getMousePos () |
| Returns the current mouse position in screen coordinates. | |
| kVec2 | getMouseDelta () |
| Returns the mouse position delta since the last frame. | |
| float | getMouseWheel () |
| Returns the vertical mouse wheel delta. | |
| bool | isKeyShift () |
| Returns true if the Shift modifier key is currently held. | |
| bool | isKeyCtrl () |
| Returns true if the Ctrl modifier key is currently held. | |
| bool | getWantTextInput () |
| Returns true if any ImGui widget currently wants text input. | |
| float | getDeltaTime () |
| Returns the time in seconds elapsed since the last frame. | |
| void | drawListAddImage (GLuint textureId, kVec2 pMin, kVec2 pMax, kVec2 uvMin=kVec2(0, 0), kVec2 uvMax=kVec2(1, 1), kVec4 tint=kVec4(1, 1, 1, 1)) |
| Draws a textured rectangle directly onto the window draw list. | |
| float | getTextLineHeight () |
| Returns the height of a single text line in pixels. | |
| void | textUnformatted (kString text) |
| Renders a raw string without label formatting. | |
| void | setClipboardText (kString text) |
| Sets the OS clipboard text. | |
| void | saveIniSettingsToDisk (kString filename) |
| Saves the current ImGui layout state to a .ini file. | |
| void | loadIniSettingsFromDisk (kString filename) |
| Loads ImGui layout state from a .ini file. | |
| void | loadIniSettingsFromMemory (const char *data, size_t size) |
| Loads ImGui layout state from an in-memory .ini blob. | |
| void | addSettingsHandler (ImGuiSettingsHandler handler) |
| Registers a custom .ini settings handler. | |
| void | destroy () |
| Shuts down ImGui and releases backend resources. | |
Wraps Dear ImGui initialisation, event forwarding, and widget calls.
Call init() once after the renderer is ready, then each frame:
| kemena::kGuiManager::kGuiManager | ( | ) |
Constructs an uninitialised GUI manager; call init() before use.
|
virtual |
Destroys the GUI manager, releasing any held ImGui resources.
| void kemena::kGuiManager::addSettingsHandler | ( | ImGuiSettingsHandler | handler | ) |
Registers a custom .ini settings handler.
| handler | Fully configured ImGuiSettingsHandler struct. |
| void kemena::kGuiManager::alignTextToFramePadding | ( | ) |
Vertically aligns the next widget so its baseline lines up with text.
| bool kemena::kGuiManager::arrowButton | ( | kString | id, |
| ImGuiDir | dir ) |
Renders an arrow-shaped button.
| id | Unique identifier. |
| dir | Arrow direction (ImGuiDir). |
| void kemena::kGuiManager::beginDisabled | ( | bool | disabled = true | ) |
Disables all user interaction and dims widgets.
| disabled | Pass true to enter disabled state (default). |
| void kemena::kGuiManager::beginTooltip | ( | ) |
Begins a custom tooltip popup.
| void kemena::kGuiManager::bullet | ( | ) |
Renders a bullet point without text.
| void kemena::kGuiManager::bulletText | ( | kString | text | ) |
Renders text preceded by a bullet point.
| text | Text. |

Renders a push-button.
| text | Label text. |
| size | Button size in pixels (0 = auto). |


| float kemena::kGuiManager::calcItemWidth | ( | ) |
Returns the current item width calculated by ImGui.
| kVec2 kemena::kGuiManager::calcTextSize | ( | kString | text, |
| bool | hideTextAfterDoubleHash = false, | ||
| float | wrapWidth = -1.0f ) |
Returns the rendered size of a text kString.
| text | Text to measure. |
| hideTextAfterDoubleHash | If true, text after "##" is not measured. |
| wrapWidth | Wrap width (-1 = no wrap). |

| void kemena::kGuiManager::canvasEnd | ( | ) |
Renders all ImGui draw data and ends the frame.
| void kemena::kGuiManager::canvasStart | ( | ) |
Begins a new ImGui frame (call once per render frame).
| bool kemena::kGuiManager::checkbox | ( | kString | text, |
| bool * | output ) |
Renders a checkbox.
| text | Checkbox label. |
| output | Pointer to the bool state. |

| bool kemena::kGuiManager::checkboxFlags | ( | kString | label, |
| int * | flags, | ||
| int | flagsValue ) |
Renders a checkbox backed by integer flags (signed).
| label | Checkbox label. |
| flags | Pointer to the flags integer. |
| flagsValue | Bit mask this checkbox controls. |
| bool kemena::kGuiManager::checkboxFlags | ( | kString | label, |
| unsigned int * | flags, | ||
| unsigned int | flagsValue ) |
Renders a checkbox backed by integer flags (unsigned).
| label | Checkbox label. |
| flags | Pointer to the flags integer. |
| flagsValue | Bit mask this checkbox controls. |
| void kemena::kGuiManager::childEnd | ( | ) |
Ends the current child region. Always call this after childStart().
| bool kemena::kGuiManager::childStart | ( | kString | id, |
| kVec2 | size = kVec2(0, 0), | ||
| ImGuiChildFlags | childFlags = 0, | ||
| ImGuiWindowFlags | windowFlags = 0 ) |
Begins a scrollable child region.
| id | Unique identifier. |
| size | Size in pixels (0 = fill remaining; negative = remaining minus value). |
| childFlags | ImGuiChildFlags (e.g. ImGuiChildFlags_Borders). |
| windowFlags | ImGuiWindowFlags. |
| void kemena::kGuiManager::closeCurrentPopup | ( | ) |
Closes the currently open popup.
| bool kemena::kGuiManager::collapsingHeader | ( | kString | label, |
| bool * | visible, | ||
| ImGuiTreeNodeFlags | flags = 0 ) |
Collapsible section header with a close button.
| label | Label text. |
| visible | Pointer to the visibility bool. |
| flags | ImGuiTreeNodeFlags. |
| bool kemena::kGuiManager::collapsingHeader | ( | kString | label, |
| ImGuiTreeNodeFlags | flags = 0 ) |
Collapsible section header.
| label | Label text. |
| flags | ImGuiTreeNodeFlags. |
| bool kemena::kGuiManager::colorButton | ( | kString | descId, |
| kVec4 | col, | ||
| ImGuiColorEditFlags | flags = 0, | ||
| kVec2 | size = kVec2(0, 0) ) |
Renders a small coloured square button.
| descId | Unique identifier / tooltip. |
| col | Button colour. |
| flags | ImGuiColorEditFlags. |
| size | Button size (0 = default). |
| bool kemena::kGuiManager::colorEdit3 | ( | kString | label, |
| float | col[3], | ||
| ImGuiColorEditFlags | flags = 0 ) |
RGB colour editor widget.
| bool kemena::kGuiManager::colorEdit4 | ( | kString | label, |
| float | col[4], | ||
| ImGuiColorEditFlags | flags = 0 ) |
RGBA colour editor widget.
| bool kemena::kGuiManager::colorPicker3 | ( | kString | label, |
| float | col[3], | ||
| ImGuiColorEditFlags | flags = 0 ) |
RGB colour picker widget.
| bool kemena::kGuiManager::colorPicker4 | ( | kString | label, |
| float | col[4], | ||
| ImGuiColorEditFlags | flags = 0 ) |
RGBA colour picker widget.
| void kemena::kGuiManager::columnsEnd | ( | ) |
Resets to a single-column layout, ending the columns region.
| void kemena::kGuiManager::columnsStart | ( | int | count = 1, |
| kString | id = "", | ||
| bool | borders = true ) |
Begins a legacy multi-column layout.
| count | Number of columns (1 = resets to single-column). |
| id | Optional unique identifier. |
| borders | Whether to draw column border lines. |
| bool kemena::kGuiManager::combo | ( | kString | label, |
| int * | currentItem, | ||
| std::vector< kString > | items, | ||
| int | popupMaxHeightInItems = -1 ) |
Drop-down combo box.
| label | Widget label. |
| currentItem | Pointer to the selected index. |
| items | List of option strings. |
| popupMaxHeightInItems | Maximum visible items in the popup (-1 = auto). |
| void kemena::kGuiManager::destroy | ( | ) |
Shuts down ImGui and releases backend resources.
| void kemena::kGuiManager::dockSpaceEnd | ( | ) |
Ends the current dockspace (no-op; kept for symmetry).
| void kemena::kGuiManager::dockSpaceStart | ( | kString | name | ) |
Begins a full-window docking area.
| name | Unique dockspace identifier. |
| bool kemena::kGuiManager::dragFloat | ( | kString | label, |
| float * | v, | ||
| float | speed = 1.0f, | ||
| float | min = 0.0f, | ||
| float | max = 0.0f, | ||
| kString | format = "%.3f", | ||
| ImGuiSliderFlags | flags = 0 ) |
Drag widget for a single float.
| bool kemena::kGuiManager::dragFloat2 | ( | kString | label, |
| float | v[2], | ||
| float | speed = 1.0f, | ||
| float | min = 0.0f, | ||
| float | max = 0.0f, | ||
| kString | format = "%.3f", | ||
| ImGuiSliderFlags | flags = 0 ) |
Drag widget for two floats.
| bool kemena::kGuiManager::dragFloat3 | ( | kString | label, |
| float | v[3], | ||
| float | speed = 1.0f, | ||
| float | min = 0.0f, | ||
| float | max = 0.0f, | ||
| kString | format = "%.3f", | ||
| ImGuiSliderFlags | flags = 0 ) |
Drag widget for three floats.
| bool kemena::kGuiManager::dragFloat4 | ( | kString | label, |
| float | v[4], | ||
| float | speed = 1.0f, | ||
| float | min = 0.0f, | ||
| float | max = 0.0f, | ||
| kString | format = "%.3f", | ||
| ImGuiSliderFlags | flags = 0 ) |
Drag widget for four floats.
| bool kemena::kGuiManager::dragFloatRange2 | ( | kString | label, |
| float * | vCurrentMin, | ||
| float * | vCurrentMax, | ||
| float | speed = 1.0f, | ||
| float | min = 0.0f, | ||
| float | max = 0.0f, | ||
| kString | format = "%.3f", | ||
| kString | formatMax = "", | ||
| ImGuiSliderFlags | flags = 0 ) |
Drag widget for a float range (min + max pair).
| bool kemena::kGuiManager::dragInt | ( | kString | label, |
| int * | v, | ||
| float | speed = 1.0f, | ||
| int | min = 0, | ||
| int | max = 0, | ||
| kString | format = "%d", | ||
| ImGuiSliderFlags | flags = 0 ) |
Drag widget for a single integer.
| bool kemena::kGuiManager::dragInt2 | ( | kString | label, |
| int | v[2], | ||
| float | speed = 1.0f, | ||
| int | min = 0, | ||
| int | max = 0, | ||
| kString | format = "%d", | ||
| ImGuiSliderFlags | flags = 0 ) |
Drag widget for two integers.
| bool kemena::kGuiManager::dragInt3 | ( | kString | label, |
| int | v[3], | ||
| float | speed = 1.0f, | ||
| int | min = 0, | ||
| int | max = 0, | ||
| kString | format = "%d", | ||
| ImGuiSliderFlags | flags = 0 ) |
Drag widget for three integers.
| bool kemena::kGuiManager::dragInt4 | ( | kString | label, |
| int | v[4], | ||
| float | speed = 1.0f, | ||
| int | min = 0, | ||
| int | max = 0, | ||
| kString | format = "%d", | ||
| ImGuiSliderFlags | flags = 0 ) |
Drag widget for four integers.
| bool kemena::kGuiManager::dragIntRange2 | ( | kString | label, |
| int * | vCurrentMin, | ||
| int * | vCurrentMax, | ||
| float | speed = 1.0f, | ||
| int | min = 0, | ||
| int | max = 0, | ||
| kString | format = "%d", | ||
| kString | formatMax = "", | ||
| ImGuiSliderFlags | flags = 0 ) |
Drag widget for an integer range (min + max pair).
| void kemena::kGuiManager::drawListAddImage | ( | GLuint | textureId, |
| kVec2 | pMin, | ||
| kVec2 | pMax, | ||
| kVec2 | uvMin = kVec2(0, 0), | ||
| kVec2 | uvMax = kVec2(1, 1), | ||
| kVec4 | tint = kVec4(1, 1, 1, 1) ) |
Draws a textured rectangle directly onto the window draw list.
| textureId | GPU texture handle. |
| pMin | Top-left corner in screen coordinates. |
| pMax | Bottom-right corner in screen coordinates. |
| uvMin | Top-left UV coordinate. |
| uvMax | Bottom-right UV coordinate. |
| tint | Tint color (default white = no tint). |
| void kemena::kGuiManager::dummy | ( | kVec2 | size | ) |
Inserts an invisible widget of a given size for layout spacing.
| size | Size in pixels. |
| void kemena::kGuiManager::endDisabled | ( | ) |
Ends a disabled section opened with beginDisabled().
| void kemena::kGuiManager::endTooltip | ( | ) |
Ends the current tooltip popup.
| float kemena::kGuiManager::getColumnWidth | ( | int | columnIndex = -1 | ) |
Returns the width of a column in pixels.
| columnIndex | Column index (-1 = current column). |
| kVec2 kemena::kGuiManager::getContentRegionAvail | ( | ) |
Returns the available content region size in the current window.
| kVec2 kemena::kGuiManager::getCursorPos | ( | ) |
Returns the cursor position relative to the window.
| float kemena::kGuiManager::getCursorPosX | ( | ) |
Returns the cursor X position.
| float kemena::kGuiManager::getCursorPosY | ( | ) |
Returns the cursor Y position.
| kVec2 kemena::kGuiManager::getCursorScreenPos | ( | ) |
Returns the cursor position in screen coordinates.
| float kemena::kGuiManager::getDeltaTime | ( | ) |
Returns the time in seconds elapsed since the last frame.
| float kemena::kGuiManager::getFontSize | ( | ) |
Returns the current scaled font size in pixels.
| float kemena::kGuiManager::getFrameHeight | ( | ) |
Returns the height of a typical framed widget in pixels (FontSize + FramePadding * 2).
| float kemena::kGuiManager::getFrameHeightWithSpacing | ( | ) |
Returns the height of a framed widget plus item spacing (distance between two consecutive widget rows).
| kVec2 kemena::kGuiManager::getItemRectMax | ( | ) |
Returns the bounding box maximum of the last item (screen space).
| kVec2 kemena::kGuiManager::getItemRectMin | ( | ) |
Returns the bounding box minimum of the last item (screen space).
| kVec2 kemena::kGuiManager::getItemRectSize | ( | ) |
Returns the bounding box size of the last item.
| kVec2 kemena::kGuiManager::getMainViewportCenter | ( | ) |
Returns the center of the main viewport in screen coordinates.
| kVec2 kemena::kGuiManager::getMouseDelta | ( | ) |
Returns the mouse position delta since the last frame.
| kVec2 kemena::kGuiManager::getMousePos | ( | ) |
Returns the current mouse position in screen coordinates.
| float kemena::kGuiManager::getMouseWheel | ( | ) |
Returns the vertical mouse wheel delta.
| float kemena::kGuiManager::getScrollMaxX | ( | ) |
Returns the maximum horizontal scroll position.
| float kemena::kGuiManager::getScrollMaxY | ( | ) |
Returns the maximum vertical scroll position.
| float kemena::kGuiManager::getScrollX | ( | ) |
Returns the current horizontal scroll position.
| float kemena::kGuiManager::getScrollY | ( | ) |
Returns the current vertical scroll position.
| float kemena::kGuiManager::getTextLineHeight | ( | ) |
Returns the height of a single text line in pixels.
| bool kemena::kGuiManager::getWantTextInput | ( | ) |
Returns true if any ImGui widget currently wants text input.
| kVec2 kemena::kGuiManager::getWindowContentRegionMax | ( | ) |
Returns the content region maximum bound in window-local coordinates.
| kVec2 kemena::kGuiManager::getWindowContentRegionMin | ( | ) |
Returns the content region minimum bound in window-local coordinates.
| kVec2 kemena::kGuiManager::getWindowPos | ( | ) |
Returns the screen-space position of the current window.
| kVec2 kemena::kGuiManager::getWindowSize | ( | ) |
Returns the inner size of the current window in pixels.
| void kemena::kGuiManager::groupEnd | ( | ) |
Ends a layout group.
| void kemena::kGuiManager::groupStart | ( | ) |
Begins a layout group.
| void kemena::kGuiManager::image | ( | GLuint | textureId, |
| kVec2 | size, | ||
| kVec2 | uv0 = kVec2(0, 0), | ||
| kVec2 | uv1 = kVec2(1, 1) ) |
Renders a GPU texture as an image widget.
| textureId | GPU texture handle. |
| size | Display size in pixels. |
| uv0 | Top-left UV coordinate. |
| uv1 | Bottom-right UV coordinate. |
| bool kemena::kGuiManager::imageButton | ( | kString | id, |
| GLuint | textureId, | ||
| kVec2 | size, | ||
| kVec2 | uv0 = kVec2(0, 0), | ||
| kVec2 | uv1 = kVec2(1, 1), | ||
| kVec4 | tint = kVec4(1, 1, 1, 1) ) |
Renders a GPU texture as a clickable image button.
| id | Unique identifier. |
| textureId | GPU texture handle. |
| size | Display size in pixels. |
| uv0 | Top-left UV coordinate. |
| uv1 | Bottom-right UV coordinate. |
| tint | Tint color multiplied over the image (default white = no tint). |
| void kemena::kGuiManager::indent | ( | float | indentW = 0.0f | ) |
Moves the cursor right by indentW pixels.
| indentW | Indent width (0 = use style default). |
| void kemena::kGuiManager::init | ( | kRenderer * | newRenderer | ) |
Initialises ImGui with the given renderer's context and window.
| newRenderer | Renderer whose SDL window and driver context are used. |
| bool kemena::kGuiManager::inputDouble | ( | kString | label, |
| double * | v, | ||
| double | step = 0.0, | ||
| double | stepFast = 0.0, | ||
| kString | format = "%.6f", | ||
| ImGuiInputTextFlags | flags = 0 ) |
Double-precision float input.
| bool kemena::kGuiManager::inputFloat | ( | kString | label, |
| float * | v, | ||
| float | step = 0.0f, | ||
| float | stepFast = 0.0f, | ||
| kString | format = "%.3f", | ||
| ImGuiInputTextFlags | flags = 0 ) |
Single float input.
| bool kemena::kGuiManager::inputFloat2 | ( | kString | label, |
| float | v[2], | ||
| kString | format = "%.3f", | ||
| ImGuiInputTextFlags | flags = 0 ) |
Two-component float input.
| bool kemena::kGuiManager::inputFloat3 | ( | kString | label, |
| float | v[3], | ||
| kString | format = "%.3f", | ||
| ImGuiInputTextFlags | flags = 0 ) |
Three-component float input.
| bool kemena::kGuiManager::inputFloat4 | ( | kString | label, |
| float | v[4], | ||
| kString | format = "%.3f", | ||
| ImGuiInputTextFlags | flags = 0 ) |
Four-component float input.
| bool kemena::kGuiManager::inputInt | ( | kString | label, |
| int * | v, | ||
| int | step = 1, | ||
| int | stepFast = 100, | ||
| ImGuiInputTextFlags | flags = 0 ) |
Single integer input.
| bool kemena::kGuiManager::inputInt2 | ( | kString | label, |
| int | v[2], | ||
| ImGuiInputTextFlags | flags = 0 ) |
Two-component integer input.
| bool kemena::kGuiManager::inputInt3 | ( | kString | label, |
| int | v[3], | ||
| ImGuiInputTextFlags | flags = 0 ) |
Three-component integer input.
| bool kemena::kGuiManager::inputInt4 | ( | kString | label, |
| int | v[4], | ||
| ImGuiInputTextFlags | flags = 0 ) |
Four-component integer input.
| bool kemena::kGuiManager::inputText | ( | kString | label, |
| kString & | value, | ||
| size_t | maxLength = 256, | ||
| ImGuiInputTextFlags | flags = 0 ) |
Renders a single-line text input field.
| label | Field label. |
| value | Reference to the kString being edited. |
| maxLength | Maximum character count (default 256). |
| flags | ImGuiInputTextFlags. |
| bool kemena::kGuiManager::inputTextMultiline | ( | kString | label, |
| kString & | value, | ||
| size_t | maxLength = 1024, | ||
| kVec2 | size = kVec2(0, 0), | ||
| ImGuiInputTextFlags | flags = 0 ) |
Renders a multi-line text input field.
| label | Field label. |
| value | Reference to the kString being edited. |
| maxLength | Maximum character count. |
| size | Widget size (0 = auto). |
| flags | ImGuiInputTextFlags. |
| bool kemena::kGuiManager::inputTextWithHint | ( | kString | label, |
| kString | hint, | ||
| kString & | value, | ||
| size_t | maxLength = 256, | ||
| ImGuiInputTextFlags | flags = 0 ) |
Renders a single-line text input with a placeholder hint.
| label | Field label. |
| hint | Greyed placeholder text shown when empty. |
| value | Reference to the kString being edited. |
| maxLength | Maximum character count. |
| flags | ImGuiInputTextFlags. |
Renders an invisible hit-area button.
| id | Unique identifier. |
| size | Button size. |
| flags | ImGuiButtonFlags. |
| bool kemena::kGuiManager::isAnyItemActive | ( | ) |
Returns whether any widget is currently active.
| bool kemena::kGuiManager::isAnyItemFocused | ( | ) |
Returns whether any widget currently has focus.
| bool kemena::kGuiManager::isAnyItemHovered | ( | ) |
Returns whether any widget is currently hovered.
| bool kemena::kGuiManager::isItemActivated | ( | ) |
Returns whether the last widget became active this frame.
| bool kemena::kGuiManager::isItemActive | ( | ) |
Returns whether the last widget is active (e.g. being dragged).
| bool kemena::kGuiManager::isItemClicked | ( | ImGuiMouseButton | mouseButton = 0 | ) |
Returns whether the last widget was clicked.
| mouseButton | Mouse button index. |
| bool kemena::kGuiManager::isItemDeactivated | ( | ) |
Returns whether the last widget became inactive this frame.
| bool kemena::kGuiManager::isItemDeactivatedAfterEdit | ( | ) |
Returns whether the last widget became inactive after being edited.
| bool kemena::kGuiManager::isItemEdited | ( | ) |
Returns whether the last widget's value was edited this frame.
| bool kemena::kGuiManager::isItemFocused | ( | ) |
Returns whether the last widget has keyboard focus.
| bool kemena::kGuiManager::isItemHovered | ( | ImGuiHoveredFlags | flags = 0 | ) |
Returns whether the last widget is hovered.
| flags | ImGuiHoveredFlags. |
| bool kemena::kGuiManager::isItemToggledOpen | ( | ) |
Returns whether the last tree node was toggled open.
| bool kemena::kGuiManager::isItemVisible | ( | ) |
Returns whether the last widget is visible in the clipping rectangle.
| bool kemena::kGuiManager::isKeyCtrl | ( | ) |
Returns true if the Ctrl modifier key is currently held.
| bool kemena::kGuiManager::isKeyShift | ( | ) |
Returns true if the Shift modifier key is currently held.
| bool kemena::kGuiManager::isMouseClicked | ( | ImGuiMouseButton | button, |
| bool | repeat = false ) |
Returns whether a mouse button was clicked this frame.
| button | Button. |
| repeat | Enable repeat. |

| bool kemena::kGuiManager::isMouseDoubleClicked | ( | ImGuiMouseButton | button | ) |
Returns whether a mouse button was double-clicked this frame.
| button | Button. |

| bool kemena::kGuiManager::isMouseDown | ( | ImGuiMouseButton | button | ) |
Returns whether a mouse button is held down.
| button | ImGuiMouseButton. |

Returns whether the mouse is inside the given screen-space rectangle.
| rMin | Top-left corner. |
| rMax | Bottom-right corner. |
| clip | Whether to clip by the current window's rect. |
| bool kemena::kGuiManager::isMouseReleased | ( | ImGuiMouseButton | button | ) |
Returns whether a mouse button was released this frame.
| button | Button. |

| bool kemena::kGuiManager::isPopupOpen | ( | kString | id, |
| ImGuiPopupFlags | flags = 0 ) |
Returns whether a named popup is currently open.
| id | Popup identifier. |
| flags | ImGuiPopupFlags. |
| bool kemena::kGuiManager::isWindowFocused | ( | ImGuiFocusedFlags | flags = 0 | ) |
Returns whether the current window has keyboard focus.
| flags | ImGuiFocusedFlags. |
| bool kemena::kGuiManager::isWindowHovered | ( | ImGuiHoveredFlags | flags = 0 | ) |
Returns whether the mouse is hovering over the current window.
| flags | ImGuiHoveredFlags. |
Renders a label/value pair aligned to the value column.
| label | Column label. |
| text | Value text. |

| bool kemena::kGuiManager::listBox | ( | kString | label, |
| int * | currentItem, | ||
| std::vector< kString > | items, | ||
| int | heightInItems = -1 ) |
Scrollable list box.
| label | Widget label. |
| currentItem | Pointer to the selected index. |
| items | List of option strings. |
| heightInItems | Visible row count (-1 = auto). |
| void kemena::kGuiManager::loadDefaultFontFromResource | ( | kString | resourceName | ) |
Loads and sets the default ImGui font from a Windows resource.
| resourceName | Resource identifier for the .ttf font data. |
| void kemena::kGuiManager::loadIniSettingsFromDisk | ( | kString | filename | ) |
Loads ImGui layout state from a .ini file.
| filename | Path to the .ini file. |
| void kemena::kGuiManager::loadIniSettingsFromMemory | ( | const char * | data, |
| size_t | size ) |
Loads ImGui layout state from an in-memory .ini blob.
| data | Pointer to the ini text data. |
| size | Number of bytes to read. |
| bool kemena::kGuiManager::menu | ( | kString | text | ) |
Begins a named menu.
| text | Menu label. |

| bool kemena::kGuiManager::menuBar | ( | ) |
Begins the main menu bar.
| void kemena::kGuiManager::menuBarEnd | ( | ) |
Ends the main menu bar.
| void kemena::kGuiManager::menuEnd | ( | ) |
Ends the current menu.
| bool kemena::kGuiManager::menuItem | ( | kString | text, |
| kString | shortcut, | ||
| bool * | selected, | ||
| bool | enabled = true ) |
Adds a toggleable menu item backed by a bool.
| text | Item label. |
| shortcut | Shortcut hint. |
| selected | Pointer to the toggle state. |
| enabled | Whether the item is interactive. |

| bool kemena::kGuiManager::menuItem | ( | kString | text, |
| kString | shortcut = "", | ||
| bool | selected = false, | ||
| bool | enabled = true ) |
Adds a clickable menu item.
| text | Item label. |
| shortcut | Shortcut hint displayed on the right (display only). |
| selected | Whether the item appears checked. |
| enabled | Whether the item is interactive. |

| void kemena::kGuiManager::newLine | ( | ) |
Inserts a blank line in the layout.
| void kemena::kGuiManager::nextColumn | ( | ) |
Advances to the next column (wraps to the next row when needed).
| void kemena::kGuiManager::openPopup | ( | kString | id, |
| ImGuiPopupFlags | flags = 0 ) |
Opens a named popup on the next frame.
| id | Popup identifier. |
| flags | ImGuiPopupFlags. |
| void kemena::kGuiManager::popFont | ( | ) |
Pops the last font from the font stack.
| void kemena::kGuiManager::popId | ( | ) |
Pops the last ID from the ID stack.
| void kemena::kGuiManager::popItemWidth | ( | ) |
Pops the last item width from the stack.
| void kemena::kGuiManager::popStyleColor | ( | int | count = 1 | ) |
Pops colour overrides from the style stack.
| count | Number of colour entries to pop (default 1). |
| void kemena::kGuiManager::popStyleVar | ( | int | count = 1 | ) |
Pops style variable overrides from the stack.
| count | Number of entries to pop (default 1). |
| void kemena::kGuiManager::popTextWrapPos | ( | ) |
Pops the last text wrap position.
| bool kemena::kGuiManager::popupContextItemStart | ( | kString | id = "", |
| ImGuiPopupFlags | flags = ImGuiPopupFlags_MouseButtonRight ) |
Begins a context menu popup on right-click of the last item.
| id | Popup identifier. |
| flags | ImGuiPopupFlags. |
| bool kemena::kGuiManager::popupContextWindowStart | ( | kString | id = "", |
| ImGuiPopupFlags | flags = ImGuiPopupFlags_MouseButtonRight ) |
Begins a context menu popup on right-click of the current window.
| id | Popup identifier. |
| flags | ImGuiPopupFlags. |
| void kemena::kGuiManager::popupEnd | ( | ) |
Ends the current popup.
| bool kemena::kGuiManager::popupModal | ( | kString | name, |
| bool * | open = nullptr, | ||
| ImGuiWindowFlags | flags = 0 ) |
Begins a modal popup dialog.
| name | Dialog title. |
| open | Optional pointer to the open/close bool. |
| flags | ImGuiWindowFlags. |
| bool kemena::kGuiManager::popupStart | ( | kString | id, |
| ImGuiWindowFlags | flags = 0 ) |
Begins rendering a named popup.
| id | Popup identifier. |
| flags | ImGuiWindowFlags. |
| void kemena::kGuiManager::processEvent | ( | kSystemEvent | event | ) |
Forwards a system event to ImGui for input processing.
| event | Engine event struct wrapping the underlying SDL event. |
| void kemena::kGuiManager::progressBar | ( | float | fraction, |
| kVec2 | size = kVec2(-FLT_MIN, 0), | ||
| kString | overlay = "" ) |
Renders a horizontal progress bar.
| fraction | Value in [0, 1] representing progress. |
| size | Bar size (-FLT_MIN width = fill available). |
| overlay | Optional text drawn over the bar. |
| void kemena::kGuiManager::pushFont | ( | ImFont * | font | ) |
Pushes a font onto the font stack.
| font | ImFont pointer loaded via ImGui::GetIO().Fonts. |
| void kemena::kGuiManager::pushId | ( | const void * | ptr | ) |
Pushes a pointer ID onto the ID stack.
| ptr | Pointer used as ID. |
| void kemena::kGuiManager::pushId | ( | int | id | ) |
Pushes an integer ID onto the ID stack.
| id | Integer ID. |
| void kemena::kGuiManager::pushId | ( | kString | id | ) |
| void kemena::kGuiManager::pushItemWidth | ( | float | itemWidth | ) |
Pushes a width onto the item-width stack.
| itemWidth | Width in pixels. |
| void kemena::kGuiManager::pushStyleColor | ( | ImGuiCol | idx, |
| ImU32 | color ) |
Pushes a packed colour override.
| idx | ImGuiCol element. |
| color | Packed ABGR colour. |
| void kemena::kGuiManager::pushStyleColor | ( | ImGuiCol | idx, |
| kVec4 | color ) |
Pushes a colour override for an ImGui style element.
| idx | ImGuiCol element to override. |
| color | RGBA colour. |
| void kemena::kGuiManager::pushStyleVar | ( | ImGuiStyleVar | idx, |
| float | val ) |
Pushes a float style variable override.
| idx | ImGuiStyleVar to override. |
| val | New value. |
| void kemena::kGuiManager::pushStyleVar | ( | ImGuiStyleVar | idx, |
| kVec2 | val ) |
Pushes a kVec2 style variable override.
| idx | ImGuiStyleVar to override. |
| val | New value. |
| void kemena::kGuiManager::pushTextWrapPos | ( | float | wrapLocalPosX = 0.0f | ) |
Pushes a text wrap position onto the stack.
| wrapLocalPosX | X position to wrap at (0 = wrap at window right). |
| bool kemena::kGuiManager::radioButton | ( | kString | label, |
| bool | active ) |
Renders a radio button.
| label | Button label. |
| active | Whether this button is currently selected. |
| bool kemena::kGuiManager::radioButton | ( | kString | label, |
| int * | v, | ||
| int | vButton ) |
Renders a radio button linked to an integer variable.
| label | Button label. |
| v | Pointer to the current selection value. |
| vButton | Value this button represents. |
| void kemena::kGuiManager::sameLine | ( | float | offsetFromStartX = 0.0f, |
| float | spacing = -1.0f ) |
Places the next widget on the same line as the previous one.
| offsetFromStartX | Horizontal offset from the left edge (0 = auto). |
| spacing | Spacing override (-1 = default). |

| void kemena::kGuiManager::saveIniSettingsToDisk | ( | kString | filename | ) |
Saves the current ImGui layout state to a .ini file.
| filename | Path to the .ini file. |
| bool kemena::kGuiManager::selectable | ( | kString | label, |
| bool * | pSelected, | ||
| ImGuiSelectableFlags | flags = 0, | ||
| kVec2 | size = kVec2(0, 0) ) |
Selectable row (state passed by pointer).
| label | Row label. |
| pSelected | Pointer to the selection bool. |
| flags | ImGuiSelectableFlags. |
| size | Row size. |
| bool kemena::kGuiManager::selectable | ( | kString | label, |
| bool | selected = false, | ||
| ImGuiSelectableFlags | flags = 0, | ||
| kVec2 | size = kVec2(0, 0) ) |
Selectable row (state passed by value).
| label | Row label. |
| selected | Whether this row is currently selected. |
| flags | ImGuiSelectableFlags. |
| size | Row size (0 = fill available). |
| void kemena::kGuiManager::separator | ( | ) |
Draws a horizontal separator line.
| void kemena::kGuiManager::separatorText | ( | kString | text | ) |
Draws a horizontal separator with a centred text label.
| text | Label to display. |

| void kemena::kGuiManager::setClipboardText | ( | kString | text | ) |
Sets the OS clipboard text.
| text | Text to place in the clipboard. |

| void kemena::kGuiManager::setColorEditOptions | ( | ImGuiColorEditFlags | flags | ) |
Sets global colour edit display options.
| flags | ImGuiColorEditFlags combination. |
| void kemena::kGuiManager::setCursorPos | ( | kVec2 | pos | ) |
Moves the cursor to an absolute position within the window.
| pos | Position relative to the window content region. |
| void kemena::kGuiManager::setCursorPosX | ( | float | x | ) |
Sets the cursor X position.
| x | X offset in pixels. |
| void kemena::kGuiManager::setCursorPosY | ( | float | y | ) |
Sets the cursor Y position.
| y | Y offset in pixels. |
| void kemena::kGuiManager::setCursorScreenPos | ( | kVec2 | pos | ) |
Moves the cursor to an absolute screen-space position.
| pos | Absolute screen-space coordinates. |
| void kemena::kGuiManager::setItemTooltip | ( | kString | text | ) |
Sets a tooltip shown when the last item is hovered.
| text | Tooltip text. |

| void kemena::kGuiManager::setNextItemAllowOverlap | ( | ) |
Allows the next item to overlap previously drawn items. Call this before the item that should allow overlap.
| void kemena::kGuiManager::setNextItemOpen | ( | bool | isOpen, |
| ImGuiCond | cond = 0 ) |
Sets the open state of the next tree node.
| isOpen | Whether the node should be open. |
| cond | Condition flag. |
| void kemena::kGuiManager::setNextItemWidth | ( | float | itemWidth | ) |
Sets the width of the next widget.
| itemWidth | Width in pixels (negative values right-align). |
| void kemena::kGuiManager::setNextWindowBgAlpha | ( | float | alpha | ) |
Sets the background transparency of the next window.
| alpha | Alpha value in [0, 1]. |
| void kemena::kGuiManager::setNextWindowCollapsed | ( | bool | collapsed, |
| ImGuiCond | cond = 0 ) |
Sets the collapsed state of the next window.
| collapsed | true to start collapsed. |
| cond | Condition flag. |
| void kemena::kGuiManager::setNextWindowContentSize | ( | kVec2 | size | ) |
Sets the content size of the next window.
| size | Content region size in pixels. |
| void kemena::kGuiManager::setNextWindowFocus | ( | ) |
Gives input focus to the next window.
| void kemena::kGuiManager::setNextWindowPos | ( | kVec2 | pos, |
| ImGuiCond | cond = 0, | ||
| kVec2 | pivot = kVec2(0, 0) ) |
Sets the position of the next window before it is created.
| pos | Desired screen-space position. |
| cond | Condition flag. |
| pivot | Normalised pivot point within the window. |
| void kemena::kGuiManager::setNextWindowSize | ( | kVec2 | size, |
| ImGuiCond | cond = 0 ) |
Sets the size of the next window before it is created.
| size | Desired window size in pixels. |
| cond | Condition flag (ImGuiCond). |
| void kemena::kGuiManager::setScrollHereX | ( | float | centerXRatio = 0.5f | ) |
Scrolls so the current item is visible horizontally.
| centerXRatio | 0 = left edge, 0.5 = centre, 1 = right edge. |
| void kemena::kGuiManager::setScrollHereY | ( | float | centerYRatio = 0.5f | ) |
Scrolls so the current item is visible vertically.
| centerYRatio | 0 = top edge, 0.5 = centre, 1 = bottom edge. |
| void kemena::kGuiManager::setScrollX | ( | float | scrollX | ) |
Sets the horizontal scroll position.
| scrollX | Target position. |
| void kemena::kGuiManager::setScrollY | ( | float | scrollY | ) |
Sets the vertical scroll position.
| scrollY | Target position. |
| void kemena::kGuiManager::setTabItemClosed | ( | kString | tabOrDockedWindowLabel | ) |
Marks a tab (or docked window) as closed programmatically.
| tabOrDockedWindowLabel | Label of the tab or window to close. |
| bool kemena::kGuiManager::sliderAngle | ( | kString | label, |
| float * | vRad, | ||
| float | vDegreesMin = -360.0f, | ||
| float | vDegreesMax = 360.0f, | ||
| kString | format = "%.0f deg", | ||
| ImGuiSliderFlags | flags = 0 ) |
Horizontal slider that displays and edits an angle in degrees.
| bool kemena::kGuiManager::sliderFloat | ( | kString | label, |
| float * | v, | ||
| float | min, | ||
| float | max, | ||
| kString | format = "%.3f", | ||
| ImGuiSliderFlags | flags = 0 ) |
Horizontal slider for a single float.
| bool kemena::kGuiManager::sliderFloat2 | ( | kString | label, |
| float | v[2], | ||
| float | min, | ||
| float | max, | ||
| kString | format = "%.3f", | ||
| ImGuiSliderFlags | flags = 0 ) |
Horizontal slider for two floats.
| bool kemena::kGuiManager::sliderFloat3 | ( | kString | label, |
| float | v[3], | ||
| float | min, | ||
| float | max, | ||
| kString | format = "%.3f", | ||
| ImGuiSliderFlags | flags = 0 ) |
Horizontal slider for three floats.
| bool kemena::kGuiManager::sliderFloat4 | ( | kString | label, |
| float | v[4], | ||
| float | min, | ||
| float | max, | ||
| kString | format = "%.3f", | ||
| ImGuiSliderFlags | flags = 0 ) |
Horizontal slider for four floats.
| bool kemena::kGuiManager::sliderInt | ( | kString | label, |
| int * | v, | ||
| int | min, | ||
| int | max, | ||
| kString | format = "%d", | ||
| ImGuiSliderFlags | flags = 0 ) |
Horizontal slider for a single integer.
| bool kemena::kGuiManager::sliderInt2 | ( | kString | label, |
| int | v[2], | ||
| int | min, | ||
| int | max, | ||
| kString | format = "%d", | ||
| ImGuiSliderFlags | flags = 0 ) |
Horizontal slider for two integers.
| bool kemena::kGuiManager::sliderInt3 | ( | kString | label, |
| int | v[3], | ||
| int | min, | ||
| int | max, | ||
| kString | format = "%d", | ||
| ImGuiSliderFlags | flags = 0 ) |
Horizontal slider for three integers.
| bool kemena::kGuiManager::sliderInt4 | ( | kString | label, |
| int | v[4], | ||
| int | min, | ||
| int | max, | ||
| kString | format = "%d", | ||
| ImGuiSliderFlags | flags = 0 ) |
Horizontal slider for four integers.
| bool kemena::kGuiManager::smallButton | ( | kString | text | ) |
Renders a small inline push-button.
| text | Label text. |

| void kemena::kGuiManager::spacing | ( | ) |
Inserts a small vertical space.

| void kemena::kGuiManager::tabBarEnd | ( | ) |
Ends the current tab bar.
| bool kemena::kGuiManager::tabBarStart | ( | kString | id, |
| ImGuiTabBarFlags | flags = 0 ) |
Begins a tab bar container.
| id | Unique identifier. |
| flags | ImGuiTabBarFlags. |
| void kemena::kGuiManager::tabItemEnd | ( | ) |
Ends the current tab item.
| bool kemena::kGuiManager::tabItemStart | ( | kString | label, |
| bool * | open = nullptr, | ||
| ImGuiTabItemFlags | flags = 0 ) |
Begins a tab item inside a tab bar.
| label | Item label. |
| open | Optional pointer to a bool controlling the close button. |
| flags | ImGuiTabItemFlags. |
| void kemena::kGuiManager::tableEnd | ( | ) |
Ends the current table.
| void kemena::kGuiManager::tableHeader | ( | kString | label | ) |
Renders a single header cell.
| label | Header cell label. |
| void kemena::kGuiManager::tableHeadersRow | ( | ) |
Renders the header row using labels set by tableSetupColumn().
| bool kemena::kGuiManager::tableNextColumn | ( | ) |
Advances to the next column in the current row.
| void kemena::kGuiManager::tableNextRow | ( | ImGuiTableRowFlags | rowFlags = 0, |
| float | minRowHeight = 0.0f ) |
Begins a new table row.
| rowFlags | ImGuiTableRowFlags. |
| minRowHeight | Minimum row height in pixels. |
| bool kemena::kGuiManager::tableSetColumnIndex | ( | int | columnN | ) |
Sets the current column index explicitly.
| columnN | Zero-based column index. |
| void kemena::kGuiManager::tableSetupColumn | ( | kString | label, |
| ImGuiTableColumnFlags | flags = 0, | ||
| float | initWidthOrWeight = 0.0f ) |
Sets up a table column with optional flags and initial width.
| label | Column header label. |
| flags | ImGuiTableColumnFlags. |
| initWidthOrWeight | Initial width (fixed) or weight (stretch). |
| void kemena::kGuiManager::tableSetupScrollFreeze | ( | int | cols, |
| int | rows ) |
Freezes leading columns/rows so they remain visible while scrolling.
| cols | Number of columns to freeze. |
| rows | Number of rows to freeze. |
| bool kemena::kGuiManager::tableStart | ( | kString | id, |
| int | columns, | ||
| ImGuiTableFlags | flags = 0, | ||
| kVec2 | outerSize = kVec2(0, 0), | ||
| float | innerWidth = 0.0f ) |
Begins a table layout.
| id | Unique identifier. |
| columns | Number of columns. |
| flags | ImGuiTableFlags. |
| outerSize | Outer size constraint (0 = auto). |
| innerWidth | Inner horizontal scrolling width. |
| void kemena::kGuiManager::text | ( | kString | text | ) |
Renders a plain text kString.
| text | Text to display. |


Renders coloured text.
| color | RGBA text colour. |
| text | Text to display. |

| void kemena::kGuiManager::textDisabled | ( | kString | text | ) |
Renders greyed-out (disabled) text.
| text | Text to display. |

| void kemena::kGuiManager::textUnformatted | ( | kString | text | ) |
Renders a raw string without label formatting.

| void kemena::kGuiManager::textWrapped | ( | kString | text | ) |
Renders text that wraps at the wrap position.
| text | Text. |

| void kemena::kGuiManager::treeEnd | ( | ) |
Ends the current tree node (use when treeStart returned true).
| void kemena::kGuiManager::treePop | ( | ) |
Pops the tree indent regardless of whether the node is open.
| bool kemena::kGuiManager::treeStart | ( | kString | label | ) |
Begins a tree node (uses label as ID).
| label | Node label. |
| bool kemena::kGuiManager::treeStartEx | ( | kString | id, |
| kString | label = "", | ||
| ImGuiTreeNodeFlags | flags = 0 ) |
Begins a tree node with explicit ID and label.
| id | Unique ID kString. |
| label | Display label (empty = use id). |
| flags | ImGuiTreeNodeFlags. |
| void kemena::kGuiManager::unindent | ( | float | indentW = 0.0f | ) |
Moves the cursor left by indentW pixels.
| indentW | Unindent width (0 = use style default). |
| void kemena::kGuiManager::windowEnd | ( | ) |
Ends the current ImGui window.
| void kemena::kGuiManager::windowStart | ( | kString | title, |
| bool * | open = nullptr, | ||
| ImGuiWindowFlags | flags = 0 ) |
Begins an ImGui window.
| title | Window title bar text. |
| open | Optional pointer to a bool controlling visibility; nullptr to ignore. |
| flags | ImGuiWindowFlags combination. |