UNPKG

@mori2003/jsimgui

Version:

JavaScript bindings for Dear ImGui.

623 lines (622 loc) 28.1 kB
import { ReferenceStruct, ImVec2, ImVec4 } from "./imgui.js"; /** Special color used to indicate that a color should be deduced automatically. */ export type ImAxis = number; export type ImPlotProp = number; export type ImPlotFlags = number; export type ImPlotAxisFlags = number; export type ImPlotSubplotFlags = number; export type ImPlotLegendFlags = number; export type ImPlotMouseTextFlags = number; export type ImPlotDragToolFlags = number; export type ImPlotColormapScaleFlags = number; export type ImPlotItemFlags = number; export type ImPlotLineFlags = number; export type ImPlotScatterFlags = number; export type ImPlotBubblesFlags = number; export type ImPlotPolygonFlags = number; export type ImPlotStairsFlags = number; export type ImPlotShadedFlags = number; export type ImPlotBarsFlags = number; export type ImPlotBarGroupsFlags = number; export type ImPlotErrorBarsFlags = number; export type ImPlotStemsFlags = number; export type ImPlotInfLinesFlags = number; export type ImPlotPieChartFlags = number; export type ImPlotHeatmapFlags = number; export type ImPlotHistogramFlags = number; export type ImPlotDigitalFlags = number; export type ImPlotImageFlags = number; export type ImPlotTextFlags = number; export type ImPlotDummyFlags = number; export type ImPlotCond = number; export type ImPlotCol = number; export type ImPlotStyleVar = number; export type ImPlotScale = number; export type ImPlotMarker = number; export type ImPlotColormap = number; export type ImPlotLocation = number; export type ImPlotBin = number; /** * Axis indices. The values assigned may change; NEVER hardcode these. */ export declare const ImAxis: { readonly X1: 0; readonly X2: 1; readonly X3: 2; readonly Y1: 3; readonly Y2: 4; readonly Y3: 5; readonly COUNT: 6; }; export declare class ImPlotPoint { x: number; y: number; constructor(x: number, y: number); static From(obj: { x: number; y: number; }): ImPlotPoint; } export declare class ImPlotRange { Min: number; Max: number; constructor(_min: number, _max: number); } export declare class ImPlotContextPtr extends ReferenceStruct { } export declare class ImPlotStylePtr extends ReferenceStruct { } export declare class ImPlotInputMapPtr extends ReferenceStruct { } export declare class ImPlot { /** * Creates a new ImPlot context. Call this after ImGui::CreateContext. */ static CreateContext(): ImPlotContextPtr; /** * Destroys an ImPlot context. Call this before ImGui::DestroyContext. nullptr = destroy current context. */ static DestroyContext(ctx?: ImPlotContextPtr | null): void; /** * Returns the current ImPlot context. nullptr if no context has ben set. */ static GetCurrentContext(): ImPlotContextPtr; /** * Sets the current ImPlot context. */ static SetCurrentContext(ctx?: ImPlotContextPtr | null): void; /** Starts a 2D plotting context. If this function returns true, EndPlot() MUST * be called! You are encouraged to use the following convention: * * if (BeginPlot(...)) { * PlotLine(...); * ... * EndPlot(); * } * * Important notes: * * - #title_id must be unique to the current ImGui ID scope. If you need to avoid ID * collisions or don't want to display a title in the plot, use double hashes * (e.g. "MyPlot##HiddenIdText" or "##NoTitle"). * - #size is the **frame** size of the plot widget, not the plot area. The default * size of plots (i.e. when ImVec2(0,0)) can be modified in your ImPlotStyle. */ static BeginPlot(title_id: string, size?: ImVec2, flags?: ImPlotFlags): boolean; /** * Only call EndPlot() if BeginPlot() returns true! * Typically called at the end of an if statement conditioned on BeginPlot(). * See example above. */ static EndPlot(): void; /** * Starts a subdivided plotting context. If the function returns true, * EndSubplots() MUST be called! Call BeginPlot/EndPlot AT MOST [rows*cols] * times in between the beginning and end of the subplot context. Plots are * added in row major order. * * Example: * * if (BeginSubplots("My Subplot",2,3,ImVec2(800,400)) { * for (int i = 0; i < 6; ++i) { * if (BeginPlot(...)) { * ImPlot::PlotLine(...); * ... * EndPlot(); * } * } * EndSubplots(); * } * * Produces: * * [0] | [1] | [2] * ----|-----|---- * [3] | [4] | [5] * * Important notes: * * - #title_id must be unique to the current ImGui ID scope. If you need to avoid ID * collisions or don't want to display a title in the plot, use double hashes * (e.g. "MySubplot##HiddenIdText" or "##NoTitle"). * - #rows and #cols must be greater than 0. * - #size is the size of the entire grid of subplots, not the individual plots * - #row_ratios and #col_ratios must have AT LEAST #rows and #cols elements, * respectively. These are the sizes of the rows and columns expressed in ratios. * If the user adjusts the dimensions, the arrays are updated with new ratios. * * Important notes regarding BeginPlot from inside of BeginSubplots: * * - The #title_id parameter of _BeginPlot_ (see above) does NOT have to be * unique when called inside of a subplot context. Subplot IDs are hashed * for your convenience so you don't have call PushID or generate unique title * strings. Simply pass an empty string to BeginPlot unless you want to title * each subplot. * - The #size parameter of _BeginPlot_ (see above) is ignored when inside of a * subplot context. The actual size of the subplot will be based on the * #size value you pass to _BeginSubplots_ and #row/#col_ratios if provided. */ static BeginSubplots(title_id: string, rows: number, cols: number, size: ImVec2, flags?: ImPlotSubplotFlags, row_ratios?: number[], col_ratios?: number[]): boolean; /** * Only call EndSubplots() if BeginSubplots() returns true! Typically called at the end * of an if statement conditioned on BeginSubplots(). See example above. */ static EndSubplots(): void; /** * Enables an axis or sets the label and/or flags for an existing axis. Leave #label = nullptr for no label. */ static SetupAxis(axis: ImAxis, label: string, flags?: ImPlotAxisFlags): void; static SetupAxisLimits(axis: ImAxis, v_min: number, v_max: number, cond?: ImPlotCond): void; /** * Links an axis range limits to external values. Set to nullptr for no linkage. The pointer data must remain valid until EndPlot. */ static SetupAxisLinks(axis: ImAxis, link_min: number[], link_max: number[]): void; /** * Sets the format of numeric axis labels via formatter specifier (default="%g"). Formatted values will be double (i.e. use %f). */ static SetupAxisFormat(axis: ImAxis, fmt: string): void; /** * Sets an axis' ticks and optionally the labels. To keep the default ticks, set #keep_default=true. */ static SetupAxisTicks(axis: ImAxis, values: number[], n_ticks: number, labels?: string[], keep_default?: boolean): void; /** * Sets an axis' scale using built-in options. */ static SetupAxisScale(axis: ImAxis, scale: ImPlotScale): void; /** * Sets an axis' limits constraints. */ static SetupAxisLimitsConstraints(axis: ImAxis, v_min: number, v_max: number): void; /** * Sets an axis' zoom constraints. */ static SetupAxisZoomConstraints(axis: ImAxis, z_min: number, z_max: number): void; /** * Sets the label and/or flags for primary X and Y axes (shorthand for two calls to SetupAxis). */ static SetupAxes(x_label: string, y_label: string, x_flags?: ImPlotAxisFlags, y_flags?: ImPlotAxisFlags): void; /** * Sets the primary X and Y axes range limits. If ImPlotCond_Always is used, the axes limits will be locked (shorthand for two calls to SetupAxisLimits). */ static SetupAxesLimits(x_min: number, x_max: number, y_min: number, y_max: number, cond?: ImPlotCond): void; /** * Sets up the plot legend. This can also be called immediately after BeginSubplots when using ImPlotSubplotFlags_ShareItems. */ static SetupLegend(location: ImPlotLocation, flags?: ImPlotLegendFlags): void; /** * Set the location of the current plot's mouse position text (default = South|East). */ static SetupMouseText(location: ImPlotLocation, flags?: ImPlotMouseTextFlags): void; /** * Explicitly finalize plot setup. Once you call this, you cannot make anymore Setup calls for the current plot! * Note that calling this function is OPTIONAL; it will be called by the first subsequent setup-locking API call. */ static SetupFinish(): void; /** * Sets an upcoming axis range limits. If ImPlotCond_Always is used, the axes limits will be locked. */ static SetNextAxisLimits(axis: ImAxis, v_min: number, v_max: number, cond?: ImPlotCond): void; /** * Links an upcoming axis range limits to external values. Set to nullptr for no linkage. The pointer data must remain valid until EndPlot! */ static SetNextAxisLinks(axis: ImAxis, link_min: number[], link_max: number[]): void; /** * Set an upcoming axis to auto fit to its data. */ static SetNextAxisToFit(axis: ImAxis): void; /** * Sets the upcoming primary X and Y axes range limits. If ImPlotCond_Always is used, the axes limits will be locked (shorthand for two calls to SetupAxisLimits). */ static SetNextAxesLimits(x_min: number, x_max: number, y_min: number, y_max: number, cond?: ImPlotCond): void; /** * Sets all upcoming axes to auto fit to their data. */ static SetNextAxesToFit(): void; /** * Plots a standard 2D line plot. */ static PlotLine(label_id: string, values: number[], count: number, xscale: number, xstart: number): void; /** * Plots a standard 2D scatter plot. Default marker is ImPlotMarker_Circle. */ static PlotScatter(label_id: string, values: number[], count: number, xscale?: number, xstart?: number): void; /** * Plots a bubble graph. #szs are the radius of each bubble in plot units. */ static PlotBubbles(label_id: string, values: number[], szs: number[], count: number, xscale?: number, xstart?: number): void; /** * Plots a polygon. Points are specified in counter-clockwise order. If concave, make sure to set the Concave flag. */ static PlotPolygon(label_id: string, xs: number[], ys: number[], count: number): void; /** * Plots a a stairstep graph. The y value is continued constantly to the right from every x position, i.e. the interval [x[i], x[i+1]) has the value y[i] */ static PlotStairs(label_id: string, values: number[], count: number, xscale?: number, xstart?: number): void; /** * Plots a shaded (filled) region between two lines, or a line and a horizontal reference. Set yref to +/-INFINITY for infinite fill extents. */ static PlotShaded(label_id: string, values: number[], count: number, yref?: number, xscale?: number, xstart?: number): void; /** * Plots a bar graph. Vertical by default. #bar_size and #shift are in plot units. */ static PlotBars(label_id: string, values: number[], count: number, bar_size?: number, shift?: number): void; /** * Plots a group of bars. #values is a row-major matrix with #item_count rows and #group_count cols. #label_ids should have #item_count elements. */ static PlotBarGroups(label_ids: string[], values: number[], item_count: number, group_count: number, group_size?: number, shift?: number): void; /** * Plots vertical error bar. The label_id should be the same as the label_id of the associated line or bar plot. */ static PlotErrorBars(label_id: string, xs: number[], ys: number[], err: number[], count: number): void; /** * Plots stems. Vertical by default. */ static PlotStems(label_id: string, values: number[], count: number, ref?: number, scale?: number, start?: number): void; /** * Plots infinite vertical or horizontal lines (e.g. for references or asymptotes). */ static PlotInfLines(label_id: string, values: number[], count: number): void; /** * Plots a 2D heatmap chart. Values are expected to be in row-major order by default. Leave #scale_min and scale_max both at 0 for automatic color scaling, or set them to a predefined range. #label_fmt can be set to nullptr for no labels. */ static PlotHeatmap(label_id: string, values: number[], rows: number, cols: number, scale_min?: number, scale_max?: number, label_fmt?: string, bounds_min?: ImPlotPoint, bounds_max?: ImPlotPoint): void; /** * Plots a horizontal histogram. #bins can be a positive integer or an ImPlotBin_ method. If #range is left unspecified, the min/max of #values will be used as the range. * Otherwise, outlier values outside of the range are not binned. The largest bin count or density is returned. */ static PlotHistogram(label_id: string, values: number[], count: number, bins?: number, bar_scale?: number, range?: ImPlotRange): number; /** * Plots two dimensional, bivariate histogram as a heatmap. #x_bins and #y_bins can be a positive integer or an ImPlotBin. If #range is left unspecified, the min/max of * #xs an #ys will be used as the ranges. Otherwise, outlier values outside of range are not binned. The largest bin count or density is returned. */ static PlotHistogram2D(label_id: string, xs: number[], ys: number[], count: number, x_bins?: number, y_bins?: number, range?: ImPlotRect): number; /** * Plots digital data. Digital plots do not respond to y drag or zoom, and are always referenced to the bottom of the plot. */ static PlotDigital(label_id: string, xs: number[], ys: number[], count: number): void; /** * Plots an axis-aligned image. #bounds_min/bounds_max are in plot coordinates (y-up) and #uv0/uv1 are in texture coordinates (y-down). */ static PlotImage(label_id: string, tex_ref: ImTextureRef, bounds_min: ImPlotPoint, bounds_max: ImPlotPoint, uv0?: ImVec2, uv1?: ImVec2, tint_col?: ImVec4): void; /** * Plots a centered text label at point x,y with an optional pixel offset. Text color can be changed with ImPlot::PushStyleColor(ImPlotCol_InlayText, ...). */ static PlotText(text: string, x: number, y: number, pix_offset?: ImVec2): void; /** * Plots a dummy item (i.e. adds a legend entry colored by ImPlotCol_Line) */ static PlotDummy(label_id: string): void; /** * Shows an annotation callout at a chosen point. Clamping keeps annotations in the plot area. Annotations are always rendered on top. */ static Annotation(x: number, y: number, col: ImVec4, pix_offset: ImVec2, clamp: boolean, round?: boolean): void; /** * Shows a x-axis tag at the specified coordinate value. */ static TagX(x: number, col: ImVec4, round?: boolean): void; /** * Shows a y-axis tag at the specified coordinate value. */ static TagY(y: number, col: ImVec4, round?: boolean): void; /** * Select which axis/axes will be used for subsequent plot elements. */ static SetAxis(axis: ImAxis): void; /** * Select which axis/axes will be used for subsequent plot elements. */ static SetAxes(x_axis: ImAxis, y_axis: ImAxis): void; /** * Convert pixels to a position in the current plot's coordinate system. Passing IMPLOT_AUTO uses the current axes. */ static PixelsToPlotImVec2(pix: ImVec2, x_axis?: ImAxis, y_axis?: ImAxis): ImPlotPoint; /** * Convert pixels to a position in the current plot's coordinate system. Passing IMPLOT_AUTO uses the current axes. */ static PixelsToPlot(x: number, y: number, x_axis?: ImAxis, y_axis?: ImAxis): ImPlotPoint; /** * Convert a position in the current plot's coordinate system to pixels. Passing IMPLOT_AUTO uses the current axes. */ static PlotToPixelsImVec2(pix: ImVec2, x_axis?: ImAxis, y_axis?: ImAxis): ImVec2; /** * Convert a position in the current plot's coordinate system to pixels. Passing IMPLOT_AUTO uses the current axes. */ static PlotToPixels(x: number, y: number, x_axis?: ImAxis, y_axis?: ImAxis): ImVec2; /** * Get the current Plot position (top-left) in pixels. */ static GetPlotPos(): ImVec2; /** * Get the current Plot size in pixels. */ static GetPlotSize(): ImVec2; /** * Returns the mouse position in x,y coordinates of the current plot. Passing IMPLOT_AUTO uses the current axes. */ static GetPlotMousePos(x_axis?: ImAxis, y_axis?: ImAxis): ImPlotPoint; /** * Returns the current plot axis range. */ static GetPlotLimits(x_axis?: ImAxis, y_axis?: ImAxis): ImPlotRect; /** * Returns true if the plot area in the current plot is hovered. */ static IsPlotHovered(): boolean; /** * Returns true if the axis label area in the current plot is hovered. */ static IsAxisHovered(axis: ImAxis): boolean; /** * Returns true if the bounding frame of a subplot is hovered. */ static IsSubplotsHovered(): boolean; /** * Returns true if the current plot is being box selected. */ static IsPlotSelected(): boolean; /** * Returns the current plot box selection bounds. Passing IMPLOT_AUTO uses the current axes. */ static GetPlotSelection(x_axis?: ImAxis, y_axis?: ImAxis): ImPlotRect; /** * Cancels a the current plot box selection. */ static CancelPlotSelection(): void; /** * Hides or shows the next plot item (i.e. as if it were toggled from the legend). * Use ImPlotCond_Always if you need to forcefully set this every frame. */ static HideNextItem(hidden?: boolean, cond?: ImPlotCond): void; /** * Align axis padding over multiple plots in a single row or column. #group_id must * be unique. If this function returns true, EndAlignedPlots() must be called. */ static BeginAlignedPlots(group_id: string, vertical?: boolean): boolean; /** * Only call EndAlignedPlots() if BeginAlignedPlots() returns true! */ static EndAlignedPlots(): void; /** * Begin a popup for a legend entry. */ static BeginLegendPopup(label_id: string, mouse_button?: ImGuiMouseButton): boolean; /** * End a popup for a legend entry. */ static EndLegendPopup(): void; /** * Returns true if a plot item legend entry is hovered. */ static IsLegendEntryHovered(label_id: string): boolean; /** * Turns the current plot's plotting area into a drag and drop target. Don't forget to call EndDragDropTarget! */ static BeginDragDropTargetPlot(): boolean; /** * Turns the current plot's X-axis into a drag and drop target. Don't forget to call EndDragDropTarget! */ static BeginDragDropTargetAxis(axis: ImAxis): boolean; /** * Turns the current plot's legend into a drag and drop target. Don't forget to call EndDragDropTarget! */ static BeginDragDropTargetLegend(): boolean; /** * Ends a drag and drop target (currently just an alias for ImGui::EndDragDropTarget). */ static EndDragDropTarget(): void; /** * Turns the current plot's plotting area into a drag and drop source. You must hold Ctrl. Don't forget to call EndDragDropSource! */ static BeginDragDropSourcePlot(flags?: ImGuiDragDropFlags): boolean; /** * Turns the current plot's X-axis into a drag and drop source. You must hold Ctrl. Don't forget to call EndDragDropSource! */ static BeginDragDropSourceAxis(axis: ImAxis, flags?: ImGuiDragDropFlags): boolean; /** * Turns an item in the current plot's legend into drag and drop source. Don't forget to call EndDragDropSource! */ static BeginDragDropSourceItem(label_id: string, flags?: ImGuiDragDropFlags): boolean; /** * Ends a drag and drop source (currently just an alias for ImGui::EndDragDropSource). */ static EndDragDropSource(): void; /** * Provides access to plot style structure for permanent modifications to colors, sizes, etc. */ static GetStyle(): ImPlotStylePtr; /** * Style plot colors for current ImGui style (default). */ static StyleColorsAuto(dst?: ImPlotStylePtr | null): void; /** * Style plot colors for ImGui "Classic". */ static StyleColorsClassic(dst?: ImPlotStylePtr | null): void; /** * Style plot colors for ImGui "Dark". */ static StyleColorsDark(dst?: ImPlotStylePtr | null): void; /** * Style plot colors for ImGui "Light". */ static StyleColorsLight(dst?: ImPlotStylePtr | null): void; /** * Temporarily modify a style color. Don't forget to call PopStyleColor! */ static PushStyleColor(idx: ImPlotCol, col: ImU32): void; /** * Temporarily modify a style color. Don't forget to call PopStyleColor! */ static PushStyleColorImVec4(idx: ImPlotCol, col: ImVec4): void; /** * Undo temporary style color modification(s). Undo multiple pushes at once by increasing count. */ static PopStyleColor(count?: number): void; /** * Temporarily modify a style variable of float type. Don't forget to call PopStyleVar! */ static PushStyleVar(idx: ImPlotStyleVar, val: number): void; /** * Temporarily modify a style variable of int type. Don't forget to call PopStyleVar! */ static PushStyleVarInt(idx: ImPlotStyleVar, val: number): void; /** * Temporarily modify a style variable of ImVec2 type. Don't forget to call PopStyleVar! */ static PushStyleVarImVec2(idx: ImPlotStyleVar, val: ImVec2): void; /** * Undo temporary style variable modification(s). Undo multiple pushes at once by increasing count. */ static PopStyleVar(count?: number): void; /** * Gets the last item primary color (i.e. its legend icon color) */ static GetLastItemColor(): ImVec4; /** * Returns the null terminated string name for an ImPlotCol. */ static GetStyleColorName(idx: ImPlotCol): string; /** * Returns the null terminated string name for an ImPlotMarker. */ static GetMarkerName(idx: ImPlotMarker): string; /** * Returns the next marker and advances the marker for the current plot. You need to call this between Begin/EndPlot! */ static NextMarker(): ImPlotMarker; /** * Returns the number of available colormaps (i.e. the built-in + user-added count). */ static GetColormapCount(): number; /** * Returns a null terminated string name for a colormap given an index. Returns nullptr if index is invalid. */ static GetColormapName(cmap: ImPlotColormap): string; /** * Returns an index number for a colormap given a valid string name. Returns -1 if name is invalid. */ static GetColormapIndex(name: string): ImPlotColormap; /** * Temporarily switch to one of the built-in (i.e. ImPlotColormap_XXX) or user-added colormaps (i.e. a return value of AddColormap). Don't forget to call PopColormap! */ static PushColormap(cmap: ImPlotColormap): void; /** * Push a colormap by string name. Use built-in names such as "Default", "Deep", "Jet", etc. or a string you provided to AddColormap. Don't forget to call PopColormap! */ static PushColormapStr(name: string): void; /** * Undo temporary colormap modification(s). Undo multiple pushes at once by increasing count. */ static PopColormap(count?: number): void; /** * Returns the next color from the current colormap and advances the colormap for the current plot. * Can also be used with no return value to skip colors if desired. You need to call this between Begin/EndPlot! */ static NextColormapColor(): ImVec4; /** * Returns the size of a colormap. */ static GetColormapSize(cmap?: ImPlotColormap): number; /** * Returns a color from a colormap given an index >= 0 (modulo will be performed). */ static GetColormapColor(idx: number, cmap?: ImPlotColormap): ImVec4; /** * Sample a color from the current colormap given t between 0 and 1. */ static SampleColormap(t: number, cmap?: ImPlotColormap): ImVec4; /** * Shows a button with a colormap gradient background. */ static ColormapButton(label: string, size?: ImVec2, cmap?: ImPlotColormap): boolean; /** * When items in a plot sample their color from a colormap, the color is cached and does not change * unless explicitly overridden. Therefore, if you change the colormap after the item has already been plotted, * item colors will NOT update. If you need item colors to resample the new colormap, use this * function to bust the cached colors. If `plot_title_id` is `null`, every item in EVERY existing plot will be cache busted. * Otherwise, only the plot specified by `plot_title_id` will be busted. For the latter, this function must be * called in the same ImGui ID scope that the plot is in. You should rarely, if ever, need this function, * but it is available for applications that require runtime colormap swaps (e.g. Heatmaps demo). */ static BustColorCache(plot_title_id?: string): void; /** * Provides access to input mapping structure for permanent modifications to controls for pan, select, etc. */ static GetInputMap(): ImPlotInputMapPtr; /** * Default input mapping: pan = LMB drag, box select = RMB drag, fit = LMB double click, context menu = RMB click, zoom = scroll. */ static MapInputDefault(dst?: ImPlotInputMapPtr | null): void; /** * Reverse input mapping: pan = RMB drag, box select = LMB drag, fit = LMB double click, context menu = RMB click, zoom = scroll. */ static MapInputReverse(dst?: ImPlotInputMapPtr | null): void; /** * Render icons similar to those that appear in legends (nifty for data lists). */ static ItemIcon(col: ImVec4): void; /** * Render icons similar to those that appear in legends (nifty for data lists). */ static ItemIconImU32(col: ImU32): void; /** * Render icons similar to those that appear in legends (nifty for data lists). */ static ColormapIcon(cmap: ImPlotColormap): void; /** * Push clip rect for rendering to current plot area. The rect can be expanded or contracted by #expand pixels. Call between Begin/EndPlot. */ static PushPlotClipRect(expand?: number): void; /** * Pop plot clip rect. Call between Begin/EndPlot. */ static PopPlotClipRect(): void; /** * Shows ImPlot style selector dropdown menu. */ static ShowStyleSelector(label: string): boolean; /** * Shows ImPlot colormap selector dropdown menu. */ static ShowColormapSelector(label: string): boolean; /** * Shows ImPlot input map selector dropdown menu. */ static ShowInputMapSelector(label: string): boolean; /** * Shows ImPlot style editor block (not a window). */ static ShowStyleEditor(ref?: ImPlotStylePtr | null): void; /** * Add basic help/info block for end users (not a window). */ static ShowUserGuide(): void; /** * Shows ImPlot metrics/debug information window. */ static ShowMetricsWindow(p_popen?: [boolean] | null): void; /** * Shows the ImPlot demo window (add implot_demo.cpp to your sources!) */ static ShowDemoWindow(p_open?: [boolean] | null): void; }