UNPKG

@mori2003/jsimgui

Version:

JavaScript bindings for Dear ImGui.

821 lines 164 kB
/** * A class that wraps an underlying exported C++ struct/class. This will be inherited by * all struct/class bindings. */ declare class StructBinding { /** * The underlying C++ struct/class. */ _ptr: any; /** * Create a new instance of an underlying C++ struct/class. * * @param name The name of the Emscripten exported C++ struct/class. */ constructor(name: string); /** * Wrap a new C++ struct/class into a JavaScript wrapper. This is used by the generated bindings * code when for example a function returns a new struct/class. * * @param ptr An instance of the underlying C++ struct/class. * @returns The JavaScript wrapped object. */ static wrap(ptr: any): any; } /** TODO: Add comment */ export type ImDrawIdx = number; /** TODO: Add comment */ export type ImGuiID = number; /** TODO: Add comment */ export type ImS8 = number; /** TODO: Add comment */ export type ImU8 = number; /** TODO: Add comment */ export type ImS16 = number; /** TODO: Add comment */ export type ImU16 = number; /** TODO: Add comment */ export type ImS32 = number; /** TODO: Add comment */ export type ImU32 = number; /** TODO: Add comment */ export type ImS64 = BigInt; /** TODO: Add comment */ export type ImU64 = BigInt; /** TODO: Add comment */ export type ImGuiDir = number; /** TODO: Add comment */ export type ImGuiKey = number; /** TODO: Add comment */ export type ImGuiMouseSource = number; /** TODO: Add comment */ export type ImGuiSortDirection = number; /** TODO: Add comment */ export type ImGuiCol = number; /** TODO: Add comment */ export type ImGuiCond = number; /** TODO: Add comment */ export type ImGuiDataType = number; /** TODO: Add comment */ export type ImGuiMouseButton = number; /** TODO: Add comment */ export type ImGuiMouseCursor = number; /** TODO: Add comment */ export type ImGuiStyleVar = number; /** TODO: Add comment */ export type ImGuiTableBgTarget = number; /** TODO: Add comment */ export type ImDrawFlags = number; /** TODO: Add comment */ export type ImDrawListFlags = number; /** TODO: Add comment */ export type ImFontFlags = number; /** TODO: Add comment */ export type ImFontAtlasFlags = number; /** TODO: Add comment */ export type ImGuiBackendFlags = number; /** TODO: Add comment */ export type ImGuiButtonFlags = number; /** TODO: Add comment */ export type ImGuiChildFlags = number; /** TODO: Add comment */ export type ImGuiColorEditFlags = number; /** TODO: Add comment */ export type ImGuiConfigFlags = number; /** TODO: Add comment */ export type ImGuiComboFlags = number; /** TODO: Add comment */ export type ImGuiDockNodeFlags = number; /** TODO: Add comment */ export type ImGuiDragDropFlags = number; /** TODO: Add comment */ export type ImGuiFocusedFlags = number; /** TODO: Add comment */ export type ImGuiHoveredFlags = number; /** TODO: Add comment */ export type ImGuiInputFlags = number; /** TODO: Add comment */ export type ImGuiInputTextFlags = number; /** TODO: Add comment */ export type ImGuiItemFlags = number; /** TODO: Add comment */ export type ImGuiKeyChord = number; /** TODO: Add comment */ export type ImGuiPopupFlags = number; /** TODO: Add comment */ export type ImGuiMultiSelectFlags = number; /** TODO: Add comment */ export type ImGuiSelectableFlags = number; /** TODO: Add comment */ export type ImGuiSliderFlags = number; /** TODO: Add comment */ export type ImGuiTabBarFlags = number; /** TODO: Add comment */ export type ImGuiTabItemFlags = number; /** TODO: Add comment */ export type ImGuiTableFlags = number; /** TODO: Add comment */ export type ImGuiTableColumnFlags = number; /** TODO: Add comment */ export type ImGuiTableRowFlags = number; /** TODO: Add comment */ export type ImGuiTreeNodeFlags = number; /** TODO: Add comment */ export type ImGuiViewportFlags = number; /** TODO: Add comment */ export type ImGuiWindowFlags = number; /** TODO: Add comment */ export type ImWchar32 = number; /** TODO: Add comment */ export type ImWchar16 = number; /** TODO: Add comment */ export type ImWchar = number; /** TODO: Add comment */ export type ImGuiSelectionUserData = BigInt; /** TODO: Add comment */ export type ImTextureID = BigInt; /** TODO: Add comment */ export type ImFontAtlasRectId = 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 { constructor(); } /** Dear ImGui context (opaque structure, unless including imgui_internal.h) */ export declare class ImGuiContext extends StructBinding { constructor(); } /** 2D vector used to store positions, sizes etc. */ export declare class ImVec2 extends StructBinding { constructor(x?: number, y?: number); get x(): number; set x(v: number); get y(): number; set y(v: number); } /** 4D vector used to store clipping rectangles, colors etc. */ export declare class ImVec4 extends StructBinding { constructor(x?: number, y?: number, z?: number, w?: number); get x(): number; set x(v: number); get y(): number; set y(v: number); get z(): number; set z(v: number); get w(): number; set w(v: number); } /** ImTextureRef = higher-level identifier for a texture. */ export declare class ImTextureRef extends StructBinding { constructor(id: ImTextureID); /** _OR_ Low-level backend texture identifier, if already uploaded or created by user\/app. Generally provided to e.g. ImGui::Image() calls. */ get _TexID(): ImTextureID; set _TexID(v: ImTextureID); /** == (_TexData ? _TexData->TexID : _TexID) \/\/ Implemented below in the file. */ GetTexID(): ImTextureID; } /** Sorting specifications for a table (often handling sort specs for a single column, occasionally more) */ export declare class ImGuiTableSortSpecs extends StructBinding { constructor(); } /** Sorting specification for one column of a table (sizeof == 12 bytes) */ export declare class ImGuiTableColumnSortSpecs extends StructBinding { constructor(); } /** Runtime data for styling/colors. */ export declare class ImGuiStyle extends StructBinding { constructor(); /** 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); /** 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); /** -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); /** 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); /** 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; } /** Main configuration and I/O between your application and ImGui. */ export declare class ImGuiIO extends StructBinding { constructor(); /** = 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); /** <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); /** = false \/\/ Disable default OS parenting to main viewport for secondary viewports. By default, viewports are marked with ParentViewportId = <main_viewport>, expecting the platform backend to setup a parent\/child relationship between the OS windows (some backend may ignore this). Set to true if you want the default to be 0, then all viewports will be top-level OS windows. */ get ConfigViewportsNoDefaultParent(): boolean; set ConfigViewportsNoDefaultParent(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); /** 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: Control */ 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: Cmd\/Super\/Windows */ 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); /** 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; /** Queue a new character input from a UTF-16 character, it can be a surrogate */ AddInputCharacterUTF16(c: ImWchar16): void; /** Queue a new characters input from a UTF-8 string */ AddInputCharactersUTF8(str: string): void; /** Set master flag for accepting key\/mouse\/text events (default to true). Useful if you have native dialog boxes that are interrupting your application loop\/refresh, and you want to disable events being queued while your app is frozen. */ SetAppAcceptingEvents(accepting_events: boolean): void; /** Clear all incoming events. */ ClearEventsQueue(): void; /** Clear current keyboard\/gamepad state + current frame text input buffer. Equivalent to releasing all keys\/buttons. */ ClearInputKeys(): void; /** Clear current mouse state. */ ClearInputMouse(): void; } /** Main IO structure returned by BeginMultiSelect()\/EndMultiSelect(). */ export declare class ImGuiMultiSelectIO extends StructBinding { constructor(); } /** Draw command list */ export declare class ImDrawList extends StructBinding { constructor(); } /** All draw data to render a Dear ImGui frame */ export declare class ImDrawData extends StructBinding { constructor(); } /** A font input\/source (we may rename this to ImFontSource in the future) */ export declare class ImFontConfig extends StructBinding { constructor(); } /** Load and rasterize multiple TTF\/OTF fonts into a same texture. The font atlas will build a single texture holding: */ export declare class ImFontAtlas extends StructBinding { constructor(); } /** Font runtime data for a given size */ export declare class ImFontBaked extends StructBinding { constructor(); } /** Font runtime data and rendering */ export declare class ImFont extends StructBinding { constructor(); } export declare const ImGui: Readonly<{ /** Flags for ImGui::Begin() */ WindowFlags: { None: number; /** Disable title-bar */ NoTitleBar: number; /** Disable user resizing with the lower-right grip */ NoResize: number; /** Disable user moving the window */ NoMove: number; /** Disable scrollbars (window can still scroll with mouse or programmatically) */ NoScrollbar: number; /** Disable user vertically scrolling with mouse wheel. On child window, mouse wheel will be forwarded to the parent unless NoScrollbar is also set. */ NoScrollWithMouse: number; /** Disable user collapsing window by double-clicking on it. Also referred to as Window Menu Button (e.g. within a docking node). */ NoCollapse: number; /** Resize every window to its content every frame */ AlwaysAutoResize: number; /** Disable drawing background color (WindowBg, etc.) and outside border. Similar as using SetNextWindowBgAlpha(0.0f). */ NoBackground: number; /** Never load\/save settings in .ini file */ NoSavedSettings: number; /** Disable catching mouse, hovering test with pass through. */ NoMouseInputs: number; /** Has a menu-bar */ MenuBar: number; /** Allow horizontal scrollbar to appear (off by default). You may use SetNextWindowContentSize(ImVec2(width,0.0f)); prior to calling Begin() to specify width. Read code in imgui_demo in the "Horizontal Scrolling" section. */ HorizontalScrollbar: number; /** Disable taking focus when transitioning from hidden to visible state */ NoFocusOnAppearing: number; /** Disable bringing window to front when taking focus (e.g. clicking on it or programmatically giving it focus) */ NoBringToFrontOnFocus: number; /** Always show vertical scrollbar (even if ContentSize.y < Size.y) */ AlwaysVerticalScrollbar: number; /** Always show horizontal scrollbar (even if ContentSize.x < Size.x) */ AlwaysHorizontalScrollbar: number; /** No keyboard\/gamepad navigation within the window */ NoNavInputs: number; /** No focusing toward this window with keyboard\/gamepad navigation (e.g. skipped by CTRL+TAB) */ NoNavFocus: number; /** Display a dot next to the title. When used in a tab\/docking context, tab is selected when clicking the X + closure is not assumed (will wait for user to stop submitting the tab). Otherwise closure is assumed when pressing the X, so if you keep submitting the tab may reappear at end of tab bar. */ UnsavedDocument: number; /** Disable docking of this window */ NoDocking: number; NoNav: number; NoDecoration: number; NoInputs: number; }; /** Flags for ImGui::BeginChild() */ ChildFlags: { None: number; /** Show an outer border and enable WindowPadding. (IMPORTANT: this is always == 1 == true for legacy reason) */ Borders: number; /** Pad with style.WindowPadding even if no border are drawn (no padding by default for non-bordered child windows because it makes more sense) */ AlwaysUseWindowPadding: number; /** Allow resize from right border (layout direction). Enable .ini saving (unless ImGuiWindowFlags_NoSavedSettings passed to window flags) */ ResizeX: number; /** Allow resize from bottom border (layout direction). " */ ResizeY: number; /** Enable auto-resizing width. Read "IMPORTANT: Size measurement" details above. */ AutoResizeX: number; /** Enable auto-resizing height. Read "IMPORTANT: Size measurement" details above. */ AutoResizeY: number; /** Combined with AutoResizeX\/AutoResizeY. Always measure size even when child is hidden, always return true, always disable clipping optimization! NOT RECOMMENDED. */ AlwaysAutoResize: number; /** Style the child window like a framed item: use FrameBg, FrameRounding, FrameBorderSize, FramePadding instead of ChildBg, ChildRounding, ChildBorderSize, WindowPadding. */ FrameStyle: number; /** [BETA] Share focus scope, allow keyboard\/gamepad navigation to cross over parent border to this child or between sibling child windows. */ NavFlattened: number; }; /** Flags for ImGui::PushItemFlag() */ ItemFlags: { /** (Default) */ None: number; /** false \/\/ Disable keyboard tabbing. This is a "lighter" version of ImGuiItemFlags_NoNav. */ NoTabStop: number; /** false \/\/ Disable any form of focusing (keyboard\/gamepad directional navigation and SetKeyboardFocusHere() calls). */ NoNav: number; /** false \/\/ Disable item being a candidate for default focus (e.g. used by title bar items). */ NoNavDefaultFocus: number; /** false \/\/ Any button-like behavior will have repeat mode enabled (based on io.KeyRepeatDelay and io.KeyRepeatRate values). Note that you can also call IsItemActive() after any button to tell if it is being held. */ ButtonRepeat: number; /** true \/\/ MenuItem()\/Selectable() automatically close their parent popup window. */ AutoClosePopups: number; /** false \/\/ Allow submitting an item with the same identifier as an item already submitted this frame without triggering a warning tooltip if io.ConfigDebugHighlightIdConflicts is set. */ AllowDuplicateId: number; }; /** Flags for ImGui::InputText() */ InputTextFlags: { None: number; /** Allow 0123456789.+-*\/ */ CharsDecimal: number; /** Allow 0123456789ABCDEFabcdef */ CharsHexadecimal: number; /** Allow 0123456789.+-*\/eE (Scientific notation input) */ CharsScientific: number; /** Turn a..z into A..Z */ CharsUppercase: number; /** Filter out spaces, tabs */ CharsNoBlank: number; /** Pressing TAB input a '\t' character into the text field */ AllowTabInput: number; /** Return 'true' when Enter is pressed (as opposed to every time the value was modified). Consider using IsItemDeactivatedAfterEdit() instead! */ EnterReturnsTrue: number; /** Escape key clears content if not empty, and deactivate otherwise (contrast to default behavior of Escape to revert) */ EscapeClearsAll: number; /** In multi-line mode, validate with Enter, add new line with Ctrl+Enter (default is opposite: validate with Ctrl+Enter, add line with Enter). */ CtrlEnterForNewLine: number; /** Read-only mode */ ReadOnly: number; /** Password mode, display all characters as '*', disable copy */ Password: number; /** Overwrite mode */ AlwaysOverwrite: number; /** Select entire text when first taking mouse focus */ AutoSelectAll: number; /** InputFloat(), InputInt(), InputScalar() etc. only: parse empty string as zero value. */ ParseEmptyRefVal: number; /** InputFloat(), InputInt(), InputScalar() etc. only: when value is zero, do not display it. Generally used with ImGuiInputTextFlags_ParseEmptyRefVal. */ DisplayEmptyRefVal: number; /** Disable following the cursor horizontally */ NoHorizontalScroll: number; /** Disable undo\/redo. Note that input text owns the text data while active, if you want to provide your own undo\/redo stack you need e.g. to call ClearActiveID(). */ NoUndoRedo: number; /** When text doesn't fit, elide left side to ensure right side stays visible. Useful for path\/filenames. Single-line only! */ ElideLeft: number; /** Callback on pressing TAB (for completion handling) */ CallbackCompletion: number; /** Callback on pressing Up\/Down arrows (for history handling) */ CallbackHistory: number; /** Callback on each iteration. User code may query cursor position, modify text buffer. */ CallbackAlways: number; /** Callback on character inputs to replace or discard them. Modify 'EventChar' to replace or discard, or return 1 in callback to discard. */ CallbackCharFilter: number; /** Callback on buffer capacity changes request (beyond 'buf_size' parameter value), allowing the string to grow. Notify when the string wants to be resized (for string types which hold a cache of their Size). You will be provided a new BufSize in the callback and NEED to honor it. (see misc\/cpp\/imgui_stdlib.h for an example of using this) */ CallbackResize: number; /** Callback on any edit. Note that InputText() already returns true on edit + you can always use IsItemEdited(). The callback is useful to manipulate the underlying buffer while focus is active. */ CallbackEdit: number; }; /** Flags for ImGui::TreeNodeEx(), ImGui::CollapsingHeader*() */ TreeNodeFlags: { None: number; /** Draw as selected */ Selected: number; /** Draw frame with background (e.g. for CollapsingHeader) */ Framed: number; /*