UNPKG

@mori2003/jsimgui

Version:

JavaScript bindings for Dear ImGui.

1,224 lines 268 kB
/** * Base class for all struct bindings (except for ImVec2, ImVec4 and ImTextureRef). */ declare class StructBinding { /** * The native pointer to the struct. */ ptr: any; /** * Construct a new JavaScript class instance and allocate native memory. */ static New(): any; /** * Create a JavaScript class instance from a native pointer. */ static From(ptr: any): any; /** * Free the struct's native allocated memory. */ Drop(): void; } /** * 2D vector used to store positions, sizes etc. */ export declare class ImVec2 { x: number; y: number; constructor(x?: number, y?: number); static From(obj: { x: number; y: number; }): ImVec2; } /** * 4D vector used to store clipping rectangles, colors etc. */ export declare class ImVec4 { x: number; y: number; z: number; w: number; constructor(x?: number, y?: number, z?: number, w?: number); static From(obj: { x: number; y: number; z: number; w: number; }): ImVec4; } /** * ImTextureRef = higher-level identifier for a texture. * The identifier is valid even before the texture has been uploaded to the GPU/graphics system. * This is what gets passed to functions such as ImGui::Image(), ImDrawList::AddImage(). * This is what gets stored in draw commands (ImDrawCmd) to identify a texture during rendering. */ export declare class ImTextureRef { _TexID: ImTextureID; constructor(id: ImTextureID); static From(obj: { _TexID: ImTextureID; }): ImTextureRef; } /** * Default: 16-bit (for maximum compatibility with renderer backends) */ export type ImDrawIdx = number; /** * A unique ID used by widgets (typically the result of hashing a stack of string) */ export type ImGuiID = number; /** * 8-bit signed integer */ export type ImS8 = number; /** * 8-bit unsigned integer */ export type ImU8 = number; /** * 16-bit signed integer */ export type ImS16 = number; /** * 16-bit unsigned integer */ export type ImU16 = number; /** * 32-bit signed integer == int */ export type ImS32 = number; /** * 32-bit unsigned integer (often used to store packed colors) */ export type ImU32 = number; /** * 64-bit signed integer */ export type ImS64 = bigint; /** * 64-bit unsigned integer */ export type ImU64 = bigint; /** * -> enum ImGuiDir \/\/ Enum: A cardinal direction (Left, Right, Up, Down) */ export type ImGuiDir = number; /** * -> enum ImGuiKey \/\/ Enum: A key identifier (ImGuiKey_XXX or ImGuiMod_XXX value) */ export type ImGuiKey = number; /** * -> enum ImGuiMouseSource \/\/ Enum; A mouse input source identifier (Mouse, TouchScreen, Pen) */ export type ImGuiMouseSource = number; /** * -> enum ImGuiSortDirection \/\/ Enum: A sorting direction (ascending or descending) */ export type ImGuiSortDirection = ImU8; /** * -> enum ImGuiCol_ \/\/ Enum: A color identifier for styling */ export type ImGuiCol = number; /** * -> enum ImGuiCond_ \/\/ Enum: A condition for many Set*() functions */ export type ImGuiCond = number; /** * -> enum ImGuiDataType_ \/\/ Enum: A primary data type */ export type ImGuiDataType = number; /** * -> enum ImGuiMouseButton_ \/\/ Enum: A mouse button identifier (0=left, 1=right, 2=middle) */ export type ImGuiMouseButton = number; /** * -> enum ImGuiMouseCursor_ \/\/ Enum: A mouse cursor shape */ export type ImGuiMouseCursor = number; /** * -> enum ImGuiStyleVar_ \/\/ Enum: A variable identifier for styling */ export type ImGuiStyleVar = number; /** * -> enum ImGuiTableBgTarget_ \/\/ Enum: A color target for TableSetBgColor() */ export type ImGuiTableBgTarget = number; /** * -> enum ImDrawFlags_ \/\/ Flags: for ImDrawList functions */ export type ImDrawFlags = number; /** * -> enum ImDrawListFlags_ \/\/ Flags: for ImDrawList instance */ export type ImDrawListFlags = number; /** * -> enum ImDrawTextFlags_ \/\/ Internal, do not use! */ export type ImDrawTextFlags = number; /** * -> enum ImFontFlags_ \/\/ Flags: for ImFont */ export type ImFontFlags = number; /** * -> enum ImFontAtlasFlags_ \/\/ Flags: for ImFontAtlas */ export type ImFontAtlasFlags = number; /** * -> enum ImGuiBackendFlags_ \/\/ Flags: for io.BackendFlags */ export type ImGuiBackendFlags = number; /** * -> enum ImGuiButtonFlags_ \/\/ Flags: for InvisibleButton() */ export type ImGuiButtonFlags = number; /** * -> enum ImGuiChildFlags_ \/\/ Flags: for BeginChild() */ export type ImGuiChildFlags = number; /** * -> enum ImGuiColorEditFlags_ \/\/ Flags: for ColorEdit4(), ColorPicker4() etc. */ export type ImGuiColorEditFlags = number; /** * -> enum ImGuiConfigFlags_ \/\/ Flags: for io.ConfigFlags */ export type ImGuiConfigFlags = number; /** * -> enum ImGuiComboFlags_ \/\/ Flags: for BeginCombo() */ export type ImGuiComboFlags = number; /** * -> enum ImGuiDockNodeFlags_ \/\/ Flags: for DockSpace() */ export type ImGuiDockNodeFlags = number; /** * -> enum ImGuiDragDropFlags_ \/\/ Flags: for BeginDragDropSource(), AcceptDragDropPayload() */ export type ImGuiDragDropFlags = number; /** * -> enum ImGuiFocusedFlags_ \/\/ Flags: for IsWindowFocused() */ export type ImGuiFocusedFlags = number; /** * -> enum ImGuiHoveredFlags_ \/\/ Flags: for IsItemHovered(), IsWindowHovered() etc. */ export type ImGuiHoveredFlags = number; /** * -> enum ImGuiInputFlags_ \/\/ Flags: for Shortcut(), SetNextItemShortcut() */ export type ImGuiInputFlags = number; /** * -> enum ImGuiInputTextFlags_ \/\/ Flags: for InputText(), InputTextMultiline() */ export type ImGuiInputTextFlags = number; /** * -> enum ImGuiItemFlags_ \/\/ Flags: for PushItemFlag(), shared by all items */ export type ImGuiItemFlags = number; /** * -> ImGuiKey | ImGuiMod_XXX \/\/ Flags: for IsKeyChordPressed(), Shortcut() etc. an ImGuiKey optionally OR-ed with one or more ImGuiMod_XXX values. */ export type ImGuiKeyChord = number; /** * -> enum ImGuiListClipperFlags_\/\/ Flags: for ImGuiListClipper */ export type ImGuiListClipperFlags = number; /** * -> enum ImGuiPopupFlags_ \/\/ Flags: for OpenPopup*(), BeginPopupContext*(), IsPopupOpen() */ export type ImGuiPopupFlags = number; /** * -> enum ImGuiMultiSelectFlags_\/\/ Flags: for BeginMultiSelect() */ export type ImGuiMultiSelectFlags = number; /** * -> enum ImGuiSelectableFlags_ \/\/ Flags: for Selectable() */ export type ImGuiSelectableFlags = number; /** * -> enum ImGuiSliderFlags_ \/\/ Flags: for DragFloat(), DragInt(), SliderFloat(), SliderInt() etc. */ export type ImGuiSliderFlags = number; /** * -> enum ImGuiTabBarFlags_ \/\/ Flags: for BeginTabBar() */ export type ImGuiTabBarFlags = number; /** * -> enum ImGuiTabItemFlags_ \/\/ Flags: for BeginTabItem() */ export type ImGuiTabItemFlags = number; /** * -> enum ImGuiTableFlags_ \/\/ Flags: For BeginTable() */ export type ImGuiTableFlags = number; /** * -> enum ImGuiTableColumnFlags_\/\/ Flags: For TableSetupColumn() */ export type ImGuiTableColumnFlags = number; /** * -> enum ImGuiTableRowFlags_ \/\/ Flags: For TableNextRow() */ export type ImGuiTableRowFlags = number; /** * -> enum ImGuiTreeNodeFlags_ \/\/ Flags: for TreeNode(), TreeNodeEx(), CollapsingHeader() */ export type ImGuiTreeNodeFlags = number; /** * -> enum ImGuiViewportFlags_ \/\/ Flags: for ImGuiViewport */ export type ImGuiViewportFlags = number; /** * -> enum ImGuiWindowFlags_ \/\/ Flags: for Begin(), BeginChild() */ export type ImGuiWindowFlags = number; /** * A single decoded U32 character\/code point. We encode them as multi bytes UTF-8 when used in strings. */ export type ImWchar32 = number; /** * A single decoded U16 character\/code point. We encode them as multi bytes UTF-8 when used in strings. */ export type ImWchar16 = number; /** * Multi-Selection item index or identifier when using BeginMultiSelect() * - Used by SetNextItemSelectionUserData() + and inside ImGuiMultiSelectIO structure. * - Most users are likely to use this store an item INDEX but this may be used to store a POINTER\/ID as well. Read comments near ImGuiMultiSelectIO for details. */ export type ImGuiSelectionUserData = ImS64; /** * Callback function for ImGui::InputText() */ export type ImGuiInputTextCallback = (data: ImGuiInputTextCallbackData) => number; /** * Callback function for ImGui::SetNextWindowSizeConstraints() */ export type ImGuiSizeCallback = (data: ImGuiSizeCallbackData) => void; /** * Default: store up to 64-bits (any pointer or integer). A majority of backends are ok with that. */ export type ImTextureID = ImU64; export type ImDrawCallback = (parent_list: ImDrawList, cmd: ImDrawCmd) => void; /** * An opaque identifier to a rectangle in the atlas. -1 when invalid. * The rectangle may move and UV may be invalidated, use GetCustomRect() to retrieve it. */ export type ImFontAtlasRectId = number; export type ImWchar = number; export type ImTextureFormat = number; export type ImGuiFreeTypeLoaderFlags = number; /** * Data shared among multiple draw lists (typically owned by parent ImGui context, but you may create one yourself) */ export declare class ImDrawListSharedData extends StructBinding { } /** * Opaque storage for building a ImFontAtlas */ export declare class ImFontAtlasBuilder extends StructBinding { } /** * Opaque interface to a font loading backend (stb_truetype, FreeType etc.). */ export declare class ImFontLoader extends StructBinding { } /** * Dear ImGui context (opaque structure, unless including imgui_internal.h) */ export declare class ImGuiContext extends StructBinding { } /** * Sorting specifications for a table (often handling sort specs for a single column, occasionally more) * Obtained by calling TableGetSortSpecs(). * When 'SpecsDirty == true' you can sort your data. It will be true with sorting specs have changed since last call, or the first time. * Make sure to set 'SpecsDirty = false' after sorting, else you may wastefully sort your data every frame! */ export declare class ImGuiTableSortSpecs extends StructBinding { /** * Pointer to sort spec array. */ get Specs(): ImGuiTableColumnSortSpecs; set Specs(v: ImGuiTableColumnSortSpecs); /** * Sort spec count. Most often 1. May be > 1 when ImGuiTableFlags_SortMulti is enabled. May be == 0 when ImGuiTableFlags_SortTristate is enabled. */ get SpecsCount(): number; set SpecsCount(v: number); /** * Set to true when specs have changed since last time! Use this to sort again, then clear the flag. */ get SpecsDirty(): boolean; set SpecsDirty(v: boolean); } /** * Sorting specification for one column of a table (sizeof == 12 bytes) */ export declare class ImGuiTableColumnSortSpecs extends StructBinding { /** * User id of the column (if specified by a TableSetupColumn() call) */ get ColumnUserID(): ImGuiID; set ColumnUserID(v: ImGuiID); /** * Index of the column */ get ColumnIndex(): ImS16; set ColumnIndex(v: ImS16); /** * Index within parent ImGuiTableSortSpecs (always stored in order starting from 0, tables sorted on a single criteria will always have a 0 here) */ get SortOrder(): ImS16; set SortOrder(v: ImS16); /** * ImGuiSortDirection_Ascending or ImGuiSortDirection_Descending */ get SortDirection(): ImGuiSortDirection; set SortDirection(v: ImGuiSortDirection); } export declare class ImGuiStyle extends StructBinding { /** * Current base font size before external global factors are applied. Use PushFont(NULL, size) to modify. Use ImGui::GetFontSize() to obtain scaled value. */ get FontSizeBase(): number; set FontSizeBase(v: number); /** * Main global scale factor. May be set by application once, or exposed to end-user. */ get FontScaleMain(): number; set FontScaleMain(v: number); /** * Additional global scale factor from viewport\/monitor contents scale. When io.ConfigDpiScaleFonts is enabled, this is automatically overwritten when changing monitor DPI. */ get FontScaleDpi(): number; set FontScaleDpi(v: number); /** * Global alpha applies to everything in Dear ImGui. */ get Alpha(): number; set Alpha(v: number); /** * Additional alpha multiplier applied by BeginDisabled(). Multiply over current value of Alpha. */ get DisabledAlpha(): number; set DisabledAlpha(v: number); /** * Padding within a window. */ get WindowPadding(): ImVec2; set WindowPadding(v: ImVec2); /** * Radius of window corners rounding. Set to 0.0f to have rectangular windows. Large values tend to lead to variety of artifacts and are not recommended. */ get WindowRounding(): number; set WindowRounding(v: number); /** * Thickness of border around windows. Generally set to 0.0f or 1.0f. (Other values are not well tested and more CPU\/GPU costly). */ get WindowBorderSize(): number; set WindowBorderSize(v: number); /** * Hit-testing extent outside\/inside resizing border. Also extend determination of hovered window. Generally meaningfully larger than WindowBorderSize to make it easy to reach borders. */ get WindowBorderHoverPadding(): number; set WindowBorderHoverPadding(v: number); /** * Minimum window size. This is a global setting. If you want to constrain individual windows, use SetNextWindowSizeConstraints(). */ get WindowMinSize(): ImVec2; set WindowMinSize(v: ImVec2); /** * Alignment for title bar text. Defaults to (0.0f,0.5f) for left-aligned,vertically centered. */ get WindowTitleAlign(): ImVec2; set WindowTitleAlign(v: ImVec2); /** * Side of the collapsing\/docking button in the title bar (None\/Left\/Right). Defaults to ImGuiDir_Left. */ get WindowMenuButtonPosition(): ImGuiDir; set WindowMenuButtonPosition(v: ImGuiDir); /** * Radius of child window corners rounding. Set to 0.0f to have rectangular windows. */ get ChildRounding(): number; set ChildRounding(v: number); /** * Thickness of border around child windows. Generally set to 0.0f or 1.0f. (Other values are not well tested and more CPU\/GPU costly). */ get ChildBorderSize(): number; set ChildBorderSize(v: number); /** * Radius of popup window corners rounding. (Note that tooltip windows use WindowRounding) */ get PopupRounding(): number; set PopupRounding(v: number); /** * Thickness of border around popup\/tooltip windows. Generally set to 0.0f or 1.0f. (Other values are not well tested and more CPU\/GPU costly). */ get PopupBorderSize(): number; set PopupBorderSize(v: number); /** * Padding within a framed rectangle (used by most widgets). */ get FramePadding(): ImVec2; set FramePadding(v: ImVec2); /** * Radius of frame corners rounding. Set to 0.0f to have rectangular frame (used by most widgets). */ get FrameRounding(): number; set FrameRounding(v: number); /** * Thickness of border around frames. Generally set to 0.0f or 1.0f. (Other values are not well tested and more CPU\/GPU costly). */ get FrameBorderSize(): number; set FrameBorderSize(v: number); /** * Horizontal and vertical spacing between widgets\/lines. */ get ItemSpacing(): ImVec2; set ItemSpacing(v: ImVec2); /** * Horizontal and vertical spacing between within elements of a composed widget (e.g. a slider and its label). */ get ItemInnerSpacing(): ImVec2; set ItemInnerSpacing(v: ImVec2); /** * Padding within a table cell. Cellpadding.x is locked for entire table. CellPadding.y may be altered between different rows. */ get CellPadding(): ImVec2; set CellPadding(v: ImVec2); /** * Expand reactive bounding box for touch-based system where touch position is not accurate enough. Unfortunately we don't sort widgets so priority on overlap will always be given to the first widget. So don't grow this too much! */ get TouchExtraPadding(): ImVec2; set TouchExtraPadding(v: ImVec2); /** * Horizontal indentation when e.g. entering a tree node. Generally == (FontSize + FramePadding.x*2). */ get IndentSpacing(): number; set IndentSpacing(v: number); /** * Minimum horizontal spacing between two columns. Preferably > (FramePadding.x + 1). */ get ColumnsMinSpacing(): number; set ColumnsMinSpacing(v: number); /** * Width of the vertical scrollbar, Height of the horizontal scrollbar. */ get ScrollbarSize(): number; set ScrollbarSize(v: number); /** * Radius of grab corners for scrollbar. */ get ScrollbarRounding(): number; set ScrollbarRounding(v: number); /** * Padding of scrollbar grab within its frame (same for both axises). */ get ScrollbarPadding(): number; set ScrollbarPadding(v: number); /** * Minimum width\/height of a grab box for slider\/scrollbar. */ get GrabMinSize(): number; set GrabMinSize(v: number); /** * Radius of grabs corners rounding. Set to 0.0f to have rectangular slider grabs. */ get GrabRounding(): number; set GrabRounding(v: number); /** * The size in pixels of the dead-zone around zero on logarithmic sliders that cross zero. */ get LogSliderDeadzone(): number; set LogSliderDeadzone(v: number); /** * Thickness of border around Image() calls. */ get ImageBorderSize(): number; set ImageBorderSize(v: number); /** * Radius of upper corners of a tab. Set to 0.0f to have rectangular tabs. */ get TabRounding(): number; set TabRounding(v: number); /** * Thickness of border around tabs. */ get TabBorderSize(): number; set TabBorderSize(v: number); /** * Minimum tab width, to make tabs larger than their contents. TabBar buttons are not affected. */ get TabMinWidthBase(): number; set TabMinWidthBase(v: number); /** * Minimum tab width after shrinking, when using ImGuiTabBarFlags_FittingPolicyMixed policy. */ get TabMinWidthShrink(): number; set TabMinWidthShrink(v: number); /** * -1: always visible. 0.0f: visible when hovered. >0.0f: visible when hovered if minimum width. */ get TabCloseButtonMinWidthSelected(): number; set TabCloseButtonMinWidthSelected(v: number); /** * -1: always visible. 0.0f: visible when hovered. >0.0f: visible when hovered if minimum width. FLT_MAX: never show close button when unselected. */ get TabCloseButtonMinWidthUnselected(): number; set TabCloseButtonMinWidthUnselected(v: number); /** * Thickness of tab-bar separator, which takes on the tab active color to denote focus. */ get TabBarBorderSize(): number; set TabBarBorderSize(v: number); /** * Thickness of tab-bar overline, which highlights the selected tab-bar. */ get TabBarOverlineSize(): number; set TabBarOverlineSize(v: number); /** * Angle of angled headers (supported values range from -50.0f degrees to +50.0f degrees). */ get TableAngledHeadersAngle(): number; set TableAngledHeadersAngle(v: number); /** * Alignment of angled headers within the cell */ get TableAngledHeadersTextAlign(): ImVec2; set TableAngledHeadersTextAlign(v: ImVec2); /** * Default way to draw lines connecting TreeNode hierarchy. ImGuiTreeNodeFlags_DrawLinesNone or ImGuiTreeNodeFlags_DrawLinesFull or ImGuiTreeNodeFlags_DrawLinesToNodes. */ get TreeLinesFlags(): ImGuiTreeNodeFlags; set TreeLinesFlags(v: ImGuiTreeNodeFlags); /** * Thickness of outlines when using ImGuiTreeNodeFlags_DrawLines. */ get TreeLinesSize(): number; set TreeLinesSize(v: number); /** * Radius of lines connecting child nodes to the vertical line. */ get TreeLinesRounding(): number; set TreeLinesRounding(v: number); /** * Side of the color button in the ColorEdit4 widget (left\/right). Defaults to ImGuiDir_Right. */ get ColorButtonPosition(): ImGuiDir; set ColorButtonPosition(v: ImGuiDir); /** * Alignment of button text when button is larger than text. Defaults to (0.5f, 0.5f) (centered). */ get ButtonTextAlign(): ImVec2; set ButtonTextAlign(v: ImVec2); /** * Alignment of selectable text. Defaults to (0.0f, 0.0f) (top-left aligned). It's generally important to keep this left-aligned if you want to lay multiple items on a same line. */ get SelectableTextAlign(): ImVec2; set SelectableTextAlign(v: ImVec2); /** * Thickness of border in SeparatorText() */ get SeparatorTextBorderSize(): number; set SeparatorTextBorderSize(v: number); /** * Alignment of text within the separator. Defaults to (0.0f, 0.5f) (left aligned, center). */ get SeparatorTextAlign(): ImVec2; set SeparatorTextAlign(v: ImVec2); /** * Horizontal offset of text from each edge of the separator + spacing on other axis. Generally small values. .y is recommended to be == FramePadding.y. */ get SeparatorTextPadding(): ImVec2; set SeparatorTextPadding(v: ImVec2); /** * Apply to regular windows: amount which we enforce to keep visible when moving near edges of your screen. */ get DisplayWindowPadding(): ImVec2; set DisplayWindowPadding(v: ImVec2); /** * Apply to every windows, menus, popups, tooltips: amount where we avoid displaying contents. Adjust if you cannot see the edges of your screen (e.g. on a TV where scaling has not been configured). */ get DisplaySafeAreaPadding(): ImVec2; set DisplaySafeAreaPadding(v: ImVec2); /** * Docking node has their own CloseButton() to close all docked windows. */ get DockingNodeHasCloseButton(): boolean; set DockingNodeHasCloseButton(v: boolean); /** * Thickness of resizing border between docked windows */ get DockingSeparatorSize(): number; set DockingSeparatorSize(v: number); /** * Scale software rendered mouse cursor (when io.MouseDrawCursor is enabled). We apply per-monitor DPI scaling over this scale. May be removed later. */ get MouseCursorScale(): number; set MouseCursorScale(v: number); /** * Enable anti-aliased lines\/borders. Disable if you are really tight on CPU\/GPU. Latched at the beginning of the frame (copied to ImDrawList). */ get AntiAliasedLines(): boolean; set AntiAliasedLines(v: boolean); /** * Enable anti-aliased lines\/borders using textures where possible. Require backend to render with bilinear filtering (NOT point\/nearest filtering). Latched at the beginning of the frame (copied to ImDrawList). */ get AntiAliasedLinesUseTex(): boolean; set AntiAliasedLinesUseTex(v: boolean); /** * Enable anti-aliased edges around filled shapes (rounded rectangles, circles, etc.). Disable if you are really tight on CPU\/GPU. Latched at the beginning of the frame (copied to ImDrawList). */ get AntiAliasedFill(): boolean; set AntiAliasedFill(v: boolean); /** * Tessellation tolerance when using PathBezierCurveTo() without a specific number of segments. Decrease for highly tessellated curves (higher quality, more polygons), increase to reduce quality. */ get CurveTessellationTol(): number; set CurveTessellationTol(v: number); /** * Maximum error (in pixels) allowed when using AddCircle()\/AddCircleFilled() or drawing rounded corner rectangles with no explicit segment count specified. Decrease for higher quality but more geometry. */ get CircleTessellationMaxError(): number; set CircleTessellationMaxError(v: number); get Colors(): ImVec4[]; set Colors(v: ImVec4[]); /** * Delay for IsItemHovered(ImGuiHoveredFlags_Stationary). Time required to consider mouse stationary. */ get HoverStationaryDelay(): number; set HoverStationaryDelay(v: number); /** * Delay for IsItemHovered(ImGuiHoveredFlags_DelayShort). Usually used along with HoverStationaryDelay. */ get HoverDelayShort(): number; set HoverDelayShort(v: number); /** * Delay for IsItemHovered(ImGuiHoveredFlags_DelayNormal). " */ get HoverDelayNormal(): number; set HoverDelayNormal(v: number); /** * Default flags when using IsItemHovered(ImGuiHoveredFlags_ForTooltip) or BeginItemTooltip()\/SetItemTooltip() while using mouse. */ get HoverFlagsForTooltipMouse(): ImGuiHoveredFlags; set HoverFlagsForTooltipMouse(v: ImGuiHoveredFlags); /** * Default flags when using IsItemHovered(ImGuiHoveredFlags_ForTooltip) or BeginItemTooltip()\/SetItemTooltip() while using keyboard\/gamepad. */ get HoverFlagsForTooltipNav(): ImGuiHoveredFlags; set HoverFlagsForTooltipNav(v: ImGuiHoveredFlags); /** * Scale all spacing\/padding\/thickness values. Do not scale fonts. */ ScaleAllSizes(scale_factor: number): void; } export declare class ImGuiIO extends StructBinding { /** * = 0 \/\/ See ImGuiConfigFlags_ enum. Set by user\/application. Keyboard\/Gamepad navigation options, etc. */ get ConfigFlags(): ImGuiConfigFlags; set ConfigFlags(v: ImGuiConfigFlags); /** * = 0 \/\/ See ImGuiBackendFlags_ enum. Set by backend (imgui_impl_xxx files or custom backend) to communicate features supported by the backend. */ get BackendFlags(): ImGuiBackendFlags; set BackendFlags(v: ImGuiBackendFlags); /** * <unset> \/\/ Main display size, in pixels (== GetMainViewport()->Size). May change every frame. */ get DisplaySize(): ImVec2; set DisplaySize(v: ImVec2); /** * = (1, 1) \/\/ Main display density. For retina display where window coordinates are different from framebuffer coordinates. This will affect font density + will end up in ImDrawData::FramebufferScale. */ get DisplayFramebufferScale(): ImVec2; set DisplayFramebufferScale(v: ImVec2); /** * = 1.0f\/60.0f \/\/ Time elapsed since last frame, in seconds. May change every frame. */ get DeltaTime(): number; set DeltaTime(v: number); /** * = 5.0f \/\/ Minimum time between saving positions\/sizes to .ini file, in seconds. */ get IniSavingRate(): number; set IniSavingRate(v: number); /** * = "imgui.ini" \/\/ Path to .ini file (important: default "imgui.ini" is relative to current working dir!). Set NULL to disable automatic .ini loading\/saving or if you want to manually call LoadIniSettingsXXX() \/ SaveIniSettingsXXX() functions. */ get IniFilename(): string; set IniFilename(v: string); /** * = "imgui_log.txt"\/\/ Path to .log file (default parameter to ImGui::LogToFile when no file is specified). */ get LogFilename(): string; set LogFilename(v: string); /** * = NULL \/\/ Store your own data. */ get UserData(): any; set UserData(v: any); /** * <auto> \/\/ Font atlas: load, rasterize and pack one or more fonts into a single texture. */ get Fonts(): ImFontAtlas; set Fonts(v: ImFontAtlas); /** * = NULL \/\/ Font to use on NewFrame(). Use NULL to uses Fonts->Fonts[0]. */ get FontDefault(): ImFont; set FontDefault(v: ImFont); /** * = false \/\/ [OBSOLETE] Allow user scaling text of individual window with CTRL+Wheel. */ get FontAllowUserScaling(): boolean; set FontAllowUserScaling(v: boolean); /** * = false \/\/ Swap Activate<>Cancel (A<>B) buttons, matching typical "Nintendo\/Japanese style" gamepad layout. */ get ConfigNavSwapGamepadButtons(): boolean; set ConfigNavSwapGamepadButtons(v: boolean); /** * = false \/\/ Directional\/tabbing navigation teleports the mouse cursor. May be useful on TV\/console systems where moving a virtual mouse is difficult. Will update io.MousePos and set io.WantSetMousePos=true. */ get ConfigNavMoveSetMousePos(): boolean; set ConfigNavMoveSetMousePos(v: boolean); /** * = true \/\/ Sets io.WantCaptureKeyboard when io.NavActive is set. */ get ConfigNavCaptureKeyboard(): boolean; set ConfigNavCaptureKeyboard(v: boolean); /** * = true \/\/ Pressing Escape can clear focused item + navigation id\/highlight. Set to false if you want to always keep highlight on. */ get ConfigNavEscapeClearFocusItem(): boolean; set ConfigNavEscapeClearFocusItem(v: boolean); /** * = false \/\/ Pressing Escape can clear focused window as well (super set of io.ConfigNavEscapeClearFocusItem). */ get ConfigNavEscapeClearFocusWindow(): boolean; set ConfigNavEscapeClearFocusWindow(v: boolean); /** * = true \/\/ Using directional navigation key makes the cursor visible. Mouse click hides the cursor. */ get ConfigNavCursorVisibleAuto(): boolean; set ConfigNavCursorVisibleAuto(v: boolean); /** * = false \/\/ Navigation cursor is always visible. */ get ConfigNavCursorVisibleAlways(): boolean; set ConfigNavCursorVisibleAlways(v: boolean); /** * = false \/\/ Simplified docking mode: disable window splitting, so docking is limited to merging multiple windows together into tab-bars. */ get ConfigDockingNoSplit(): boolean; set ConfigDockingNoSplit(v: boolean); /** * = false \/\/ Enable docking with holding Shift key (reduce visual noise, allows dropping in wider space) */ get ConfigDockingWithShift(): boolean; set ConfigDockingWithShift(v: boolean); /** * = false \/\/ [BETA] [FIXME: This currently creates regression with auto-sizing and general overhead] Make every single floating window display within a docking node. */ get ConfigDockingAlwaysTabBar(): boolean; set ConfigDockingAlwaysTabBar(v: boolean); /** * = false \/\/ [BETA] Make window or viewport transparent when docking and only display docking boxes on the target viewport. Useful if rendering of multiple viewport cannot be synced. Best used with ConfigViewportsNoAutoMerge. */ get ConfigDockingTransparentPayload(): boolean; set ConfigDockingTransparentPayload(v: boolean); /** * = false; \/\/ Set to make all floating imgui windows always create their own viewport. Otherwise, they are merged into the main host viewports when overlapping it. May also set ImGuiViewportFlags_NoAutoMerge on individual viewport. */ get ConfigViewportsNoAutoMerge(): boolean; set ConfigViewportsNoAutoMerge(v: boolean); /** * = false \/\/ Disable default OS task bar icon flag for secondary viewports. When a viewport doesn't want a task bar icon, ImGuiViewportFlags_NoTaskBarIcon will be set on it. */ get ConfigViewportsNoTaskBarIcon(): boolean; set ConfigViewportsNoTaskBarIcon(v: boolean); /** * = true \/\/ Disable default OS window decoration flag for secondary viewports. When a viewport doesn't want window decorations, ImGuiViewportFlags_NoDecoration will be set on it. Enabling decoration can create subsequent issues at OS levels (e.g. minimum window size). */ get ConfigViewportsNoDecoration(): boolean; set ConfigViewportsNoDecoration(v: boolean); /** * = true \/\/ When false: set secondary viewports' ParentViewportId to main viewport ID by default. Expects the platform backend to setup a parent\/child relationship between the OS windows based on this value. Some backend may ignore this. Set to true if you want viewports to automatically be parent of main viewport, otherwise all viewports will be top-level OS windows. */ get ConfigViewportsNoDefaultParent(): boolean; set ConfigViewportsNoDefaultParent(v: boolean); /** * true \/\/ When a platform window is focused (e.g. using Alt+Tab, clicking Platform Title Bar), apply corresponding focus on imgui windows (may clear focus\/active id from imgui windows location in other platform windows). In principle this is better enabled but we provide an opt-out, because some Linux window managers tend to eagerly focus windows (e.g. on mouse hover, or even a simple window pos\/size change). */ get ConfigViewportsPlatformFocusSetsImGuiFocus(): boolean; set ConfigViewportsPlatformFocusSetsImGuiFocus(v: boolean); /** * = false \/\/ [EXPERIMENTAL] Automatically overwrite style.FontScaleDpi when Monitor DPI changes. This will scale fonts but _NOT_ scale sizes\/padding for now. */ get ConfigDpiScaleFonts(): boolean; set ConfigDpiScaleFonts(v: boolean); /** * = false \/\/ [EXPERIMENTAL] Scale Dear ImGui and Platform Windows when Monitor DPI changes. */ get ConfigDpiScaleViewports(): boolean; set ConfigDpiScaleViewports(v: boolean); /** * = false \/\/ Request ImGui to draw a mouse cursor for you (if you are on a platform without a mouse cursor). Cannot be easily renamed to 'io.ConfigXXX' because this is frequently used by backend implementations. */ get MouseDrawCursor(): boolean; set MouseDrawCursor(v: boolean); /** * = defined(__APPLE__) \/\/ Swap Cmd<>Ctrl keys + OS X style text editing cursor movement using Alt instead of Ctrl, Shortcuts using Cmd\/Super instead of Ctrl, Line\/Text Start and End using Cmd+Arrows instead of Home\/End, Double click selects by word instead of selecting whole text, Multi-selection in lists uses Cmd\/Super instead of Ctrl. */ get ConfigMacOSXBehaviors(): boolean; set ConfigMacOSXBehaviors(v: boolean); /** * = true \/\/ Enable input queue trickling: some types of events submitted during the same frame (e.g. button down + up) will be spread over multiple frames, improving interactions with low framerates. */ get ConfigInputTrickleEventQueue(): boolean; set ConfigInputTrickleEventQueue(v: boolean); /** * = true \/\/ Enable blinking cursor (optional as some users consider it to be distracting). */ get ConfigInputTextCursorBlink(): boolean; set ConfigInputTextCursorBlink(v: boolean); /** * = false \/\/ [BETA] Pressing Enter will keep item active and select contents (single-line only). */ get ConfigInputTextEnterKeepActive(): boolean; set ConfigInputTextEnterKeepActive(v: boolean); /** * = false \/\/ [BETA] Enable turning DragXXX widgets into text input with a simple mouse click-release (without moving). Not desirable on devices without a keyboard. */ get ConfigDragClickToInputText(): boolean; set ConfigDragClickToInputText(v: boolean); /** * = true \/\/ Enable resizing of windows from their edges and from the lower-left corner. This requires ImGuiBackendFlags_HasMouseCursors for better mouse cursor feedback. (This used to be a per-window ImGuiWindowFlags_ResizeFromAnySide flag) */ get ConfigWindowsResizeFromEdges(): boolean; set ConfigWindowsResizeFromEdges(v: boolean); /** * = false \/\/ Enable allowing to move windows only when clicking on their title bar. Does not apply to windows without a title bar. */ get ConfigWindowsMoveFromTitleBarOnly(): boolean; set ConfigWindowsMoveFromTitleBarOnly(v: boolean); /** * = false \/\/ [EXPERIMENTAL] CTRL+C copy the contents of focused window into the clipboard. Experimental because: (1) has known issues with nested Begin\/End pairs (2) text output quality varies (3) text output is in submission order rather than spatial order. */ get ConfigWindowsCopyContentsWithCtrlC(): boolean; set ConfigWindowsCopyContentsWithCtrlC(v: boolean); /** * = true \/\/ Enable scrolling page by page when clicking outside the scrollbar grab. When disabled, always scroll to clicked location. When enabled, Shift+Click scrolls to clicked location. */ get ConfigScrollbarScrollByPage(): boolean; set ConfigScrollbarScrollByPage(v: boolean); /** * = 60.0f \/\/ Timer (in seconds) to free transient windows\/tables memory buffers when unused. Set to -1.0f to disable. */ get ConfigMemoryCompactTimer(): number; set ConfigMemoryCompactTimer(v: number); /** * = 0.30f \/\/ Time for a double-click, in seconds. */ get MouseDoubleClickTime(): number; set MouseDoubleClickTime(v: number); /** * = 6.0f \/\/ Distance threshold to stay in to validate a double-click, in pixels. */ get MouseDoubleClickMaxDist(): number; set MouseDoubleClickMaxDist(v: number); /** * = 6.0f \/\/ Distance threshold before considering we are dragging. */ get MouseDragThreshold(): number; set MouseDragThreshold(v: number); /** * = 0.275f \/\/ When holding a key\/button, time before it starts repeating, in seconds (for buttons in Repeat mode, etc.). */ get KeyRepeatDelay(): number; set KeyRepeatDelay(v: number); /** * = 0.050f \/\/ When holding a key\/button, rate at which it repeats, in seconds. */ get KeyRepeatRate(): number; set KeyRepeatRate(v: number); /** * = true \/\/ Enable error recovery support. Some errors won't be detected and lead to direct crashes if recovery is disabled. */ get ConfigErrorRecovery(): boolean; set ConfigErrorRecovery(v: boolean); /** * = true \/\/ Enable asserts on recoverable error. By default call IM_ASSERT() when returning from a failing IM_ASSERT_USER_ERROR() */ get ConfigErrorRecoveryEnableAssert(): boolean; set ConfigErrorRecoveryEnableAssert(v: boolean); /** * = true \/\/ Enable debug log output on recoverable errors. */ get ConfigErrorRecoveryEnableDebugLog(): boolean; set ConfigErrorRecoveryEnableDebugLog(v: boolean); /** * = true \/\/ Enable tooltip on recoverable errors. The tooltip include a way to enable asserts if they were disabled. */ get ConfigErrorRecoveryEnableTooltip(): boolean; set ConfigErrorRecoveryEnableTooltip(v: boolean); /** * = false \/\/ Enable various tools calling IM_DEBUG_BREAK(). */ get ConfigDebugIsDebuggerPresent(): boolean; set ConfigDebugIsDebuggerPresent(v: boolean); /** * = true \/\/ Highlight and show an error message popup when multiple items have conflicting identifiers. */ get ConfigDebugHighlightIdConflicts(): boolean; set ConfigDebugHighlightIdConflicts(v: boolean); /** * true \/\/ Show "Item Picker" button in aforementioned popup. */ get ConfigDebugHighlightIdConflictsShowItemPicker(): boolean; set ConfigDebugHighlightIdConflictsShowItemPicker(v: boolean); /** * = false \/\/ First-time calls to Begin()\/BeginChild() will return false. NEEDS TO BE SET AT APPLICATION BOOT TIME if you don't want to miss windows. */ get ConfigDebugBeginReturnValueOnce(): boolean; set ConfigDebugBeginReturnValueOnce(v: boolean); /** * = false \/\/ Some calls to Begin()\/BeginChild() will return false. Will cycle through window depths then repeat. Suggested use: add "io.ConfigDebugBeginReturnValue = io.KeyShift" in your main loop then occasionally press SHIFT. Windows should be flickering while running. */ get ConfigDebugBeginReturnValueLoop(): boolean; set ConfigDebugBeginReturnValueLoop(v: boolean); /** * = false \/\/ Ignore io.AddFocusEvent(false), consequently not calling io.ClearInputKeys()\/io.ClearInputMouse() in input processing. */ get ConfigDebugIgnoreFocusLoss(): boolean; set ConfigDebugIgnoreFocusLoss(v: boolean); /** * = false \/\/ Save .ini data with extra comments (particularly helpful for Docking, but makes saving slower) */ get ConfigDebugIniSettings(): boolean; set ConfigDebugIniSettings(v: boolean); /** * = NULL */ get BackendPlatformName(): string; set BackendPlatformName(v: string); /** * = NULL */ get BackendRendererName(): string; set BackendRendererName(v: string); /** * = NULL \/\/ User data for platform backend */ get BackendPlatformUserData(): any; set BackendPlatformUserData(v: any); /** * = NULL \/\/ User data for renderer backend */ get BackendRendererUserData(): any; set BackendRendererUserData(v: any); /** * = NULL \/\/ User data for non C++ programming language backend */ get BackendLanguageUserData(): any; set BackendLanguageUserData(v: any); /** * Set when Dear ImGui will use mouse inputs, in this case do not dispatch them to your main game\/application (either way, always pass on mouse inputs to imgui). (e.g. unclicked mouse is hovering over an imgui window, widget is active, mouse was clicked over an imgui window, etc.). */ get WantCaptureMouse(): boolean; set WantCaptureMouse(v: boolean); /** * Set when Dear ImGui will use keyboard inputs, in this case do not dispatch them to your main game\/application (either way, always pass keyboard inputs to imgui). (e.g. InputText active, or an imgui window is focused and navigation is enabled, etc.). */ get WantCaptureKeyboard(): boolean; set WantCaptureKeyboard(v: boolean); /** * Mobile\/console: when set, you may display an on-screen keyboard. This is set by Dear ImGui when it wants textual keyboard input to happen (e.g. when a InputText widget is active). */ get WantTextInput(): boolean; set WantTextInput(v: boolean); /** * MousePos has been altered, backend should reposition mouse on next frame. Rarely used! Set only when io.ConfigNavMoveSetMousePos is enabled. */ get WantSetMousePos(): boolean; set WantSetMousePos(v: boolean); /** * When manual .ini load\/save is active (io.IniFilename == NULL), this will be set to notify your application that you can call SaveIniSettingsToMemory() and save yourself. Important: clear io.WantSaveIniSettings yourself after saving! */ get WantSaveIniSettings(): boolean; set WantSaveIniSettings(v: boolean); /** * Keyboard\/Gamepad navigation is currently allowed (will handle ImGuiKey_NavXXX events) = a window is focused and it doesn't use the ImGuiWindowFlags_NoNavInputs flag. */ get NavActive(): boolean; set NavActive(v: boolean); /** * Keyboard\/Gamepad navigation highlight is visible and allowed (will handle ImGuiKey_NavXXX events). */ get NavVisible(): boolean; set NavVisible(v: boolean); /** * Estimate of application framerate (rolling average over 60 frames, based on io.DeltaTime), in frame per second. Solely for convenience. Slow applications may not want to use a moving average or may want to reset underlying buffers occasionally. */ get Framerate(): number; set Framerate(v: number); /** * Vertices output during last call to Render() */ get MetricsRenderVertices(): number; set MetricsRenderVertices(v: number); /** * Indices output during last call to Render() = number of triangles * 3 */ get MetricsRenderIndices(): number; set MetricsRenderIndices(v: number); /** * Number of visible windows */ get MetricsRenderWindows(): number; set MetricsRenderWindows(v: number); /** * Number of active windows */ get MetricsActiveWindows(): number; set MetricsActiveWindows(v: number); /** * Mouse delta. Note that this is zero if either current or previous position are invalid (-FLT_MAX,-FLT_MAX), so a disappearing\/reappearing mouse won't have a huge delta. */ get MouseDelta(): ImVec2; set MouseDelta(v: ImVec2); /** * Parent UI context (needs to be set explicitly by parent). */ get Ctx(): ImGuiContext; set Ctx(v: ImGuiContext); /** * Mouse position, in pixels. Set to ImVec2(-FLT_MAX, -FLT_MAX) if mouse is unavailable (on another screen, etc.) */ get MousePos(): ImVec2; set MousePos(v: ImVec2); /** * Mouse wheel Vertical: 1 unit scrolls about 5 lines text. >0 scrolls Up, <0 scrolls Down. Hold SHIFT to turn vertical scroll into horizontal scroll. */ get MouseWheel(): number; set MouseWheel(v: number); /** * Mouse wheel Horizontal. >0 scrolls Left, <0 scrolls Right. Most users don't have a mouse with a horizontal wheel, may not be filled by all backends. */ get MouseWheelH(): number; set MouseWheelH(v: number); /** * Mouse actual input peripheral (Mouse\/TouchScreen\/Pen). */ get MouseSource(): ImGuiMouseSource; set MouseSource(v: ImGuiMouseSource); /** * (Optional) Modify using io.AddMouseViewportEvent(). With multi-viewports: viewport the OS mouse is hovering. If possible _IGNORING_ viewports with the ImGuiViewportFlags_NoInputs flag is much better (few backends can handle that). Set io.BackendFlags |= ImGuiBackendFlags_HasMouseHoveredViewport if you can provide this info. If you don't imgui will infer the value using the rectangles and last focused time of the viewports it knows about (ignoring other OS windows). */ get MouseHoveredViewport(): ImGuiID; set MouseHoveredViewport(v: ImGuiID); /** * Keyboard modifier down: Ctrl (non-macOS), Cmd (macOS) */ get KeyCtrl(): boolean; set KeyCtrl(v: boolean); /** * Keyboard modifier down: Shift */ get KeyShift(): boolean; set KeyShift(v: boolean); /** * Keyboard modifier down: Alt */ get KeyAlt(): boolean; set KeyAlt(v: boolean); /** * Keyboard modifier down: Windows\/Super (non-macOS), Ctrl (macOS) */ get KeySuper(): boolean; set KeySuper(v: boolean); /** * Key mods flags (any of ImGuiMod_Ctrl\/ImGuiMod_Shift\/ImGuiMod_Alt\/ImGuiMod_Super flags, same as io.KeyCtrl\/KeyShift\/KeyAlt\/KeySuper but merged into flags). Read-only, updated by NewFrame() */ get KeyMods(): ImGuiKeyChord; set KeyMods(v: ImGuiKeyChord); /** * Alternative to WantCaptureMouse: (WantCaptureMouse == true && WantCaptureMouseUnlessPopupClose == false) when a click over void is expected to close a popup. */ get WantCaptureMouseUnlessPopupClose(): boolean; set WantCaptureMouseUnlessPopupClose(v: boolean); /** * Previous mouse position (note that MouseDelta is not necessary == MousePos-MousePosPrev, in case either position is invalid) */ get MousePosPrev(): ImVec2; set MousePosPrev(v: ImVec2); /** * On a non-Mac system, holding SHIFT requests WheelY to perform the equivalent of a WheelX event. On a Mac system this is already enforced by the system. */ get MouseWheelRequestAxisSwap(): boolean; set MouseWheelRequestAxisSwap(v: boolean); /** * (OSX) Set to true when the current click was a Ctrl+click that spawned a simulated right click */ get MouseCtrlLeftAsRightClick(): boolean; set MouseCtrlLeftAsRightClick(v: boolean); /** * Touch\/Pen pressure (0.0f to 1.0f, should be >0.0f only when MouseDown[0] == true). Helper storage currently unused by Dear ImGui. */ get PenPressure(): number; set PenPressure(v: number); /** * Only modify via AddFocusEvent() */ get AppFocusLost(): boolean; set AppFocusLost(v: boolean); /** * Only modify via SetAppAcceptingEvents() */ get AppAcceptingEvents(): boolean; set AppAcceptingEvents(v: boolean); /** * For AddInputCharacterUTF16() */ get InputQueueSurrogate(): ImWchar16; set InputQueueSurrogate(v: ImWchar16); /** * Queue a new key down\/up event. Key should be "translated" (as in, generally ImGuiKey_A matches the key end-user would use to emit an 'A' character) */ AddKeyEvent(key: ImGuiKey, down: boolean): void; /** * Queue a new key down\/up event for analog values (e.g. ImGuiKey_Gamepad_ values). Dead-zones should be handled by the backend. */ AddKeyAnalogEvent(key: ImGuiKey, down: boolean, v: number): void; /** * Queue a mouse position update. Use -FLT_MAX,-FLT_MAX to signify no mouse (e.g. app not focused and not hovered) */ AddMousePosEvent(x: number, y: number): void; /** * Queue a mouse button change */ AddMouseButtonEvent(button: number, down: boolean): void; /** * Queue a mouse wheel update. wheel_y<0: scroll down, wheel_y>0: scroll up, wheel_x<0: scroll right, wheel_x>0: scroll left. */ AddMouseWheelEvent(wheel_x: number, wheel_y: number): void; /** * Queue a mouse source change (Mouse\/TouchScreen\/Pen) */ AddMouseSourceEvent(source: ImGuiMouseSource): void; /** * Queue a mouse hovered viewport. Requires backend to set ImGuiBackendFlags_HasMouseHoveredViewport to call this (for multi-viewport support). */ AddMouseViewportEvent(id: ImGuiID): void; /** * Queue a gain\/loss of focus for the application (generally based on OS\/platform focus of your window) */ AddFocusEvent(focused: boolean): void; /** * Queue a new character input */ AddInputCharacter(c: number): void; /** * Q