diff --git a/bindings/imgui_bundle/imgui/__init__.pyi b/bindings/imgui_bundle/imgui/__init__.pyi index 61ca70b2..bf328e75 100644 --- a/bindings/imgui_bundle/imgui/__init__.pyi +++ b/bindings/imgui_bundle/imgui/__init__.pyi @@ -342,7 +342,7 @@ ImVec4Like = Union[ImVec4, Tuple[int | float, int | float, int | float, int | fl ################################################## # // Autogenerated code below! Do not edit! #################### #################### -# dear imgui, v1.91.5 +# dear imgui, v1.91.7 WIP # (headers) # Help: @@ -1414,6 +1414,7 @@ def text_link_open_url(label: str, url: Optional[str] = None) -> None: # - Read about ImTextureID here: https://github.com/ocornut/imgui/wiki/Image-Loading-and-Displaying-Examples # - 'uv0' and 'uv1' are texture coordinates. Read about them from the same link above. # - Note that Image() may add +2.0 to provided size if a border is visible, ImageButton() adds style.FramePadding*2.0 to provided size. +# - ImageButton() draws a background based on regular Button() color + optionally an inner background if specified. # IMGUI_API void Image(ImTextureID user_texture_id, const ImVec2& image_size, const ImVec2& uv0 = ImVec2(0, 0), const ImVec2& uv1 = ImVec2(1, 1), const ImVec4& tint_col = ImVec4(1, 1, 1, 1), const ImVec4& border_col = ImVec4(0, 0, 0, 0)); /* original C++ signature */ def image( user_texture_id: ImTextureID, @@ -1991,6 +1992,7 @@ def is_item_toggled_selection() -> bool: # Widgets: List Boxes # - This is essentially a thin wrapper to using BeginChild/EndChild with the ImGuiChildFlags_FrameStyle flag for stylistic changes + displaying a label. +# - If you don't need a label you can probably simply use BeginChild() with the ImGuiChildFlags_FrameStyle flag for the same result. # - You can submit contents and manage your selection state however you want it, by creating e.g. Selectable() or any other items. # - The simplified/old ListBox() api are helpers over BeginListBox()/EndListBox() which are kept available for convenience purpose. This is analoguous to how Combos are created. # - Choose frame width: size.x > 0.0: custom / size.x < 0.0 or -FLT_MIN: right-align / size.x = 0.0 (default): use current ItemWidth @@ -3288,27 +3290,33 @@ class InputTextFlags_(enum.Enum): enum.auto() ) # (= 1 << 16) # 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(). + # Elide display / Alignment + # ImGuiInputTextFlags_ElideLeft = 1 << 17, /* original C++ signature */ + elide_left = ( + enum.auto() + ) # (= 1 << 17) # When text doesn't fit, elide left side to ensure right side stays visible. Useful for path/filenames. Single-line only! + # Callback features - # ImGuiInputTextFlags_CallbackCompletion = 1 << 17, /* original C++ signature */ - callback_completion = enum.auto() # (= 1 << 17) # Callback on pressing TAB (for completion handling) - # ImGuiInputTextFlags_CallbackHistory = 1 << 18, /* original C++ signature */ - callback_history = enum.auto() # (= 1 << 18) # Callback on pressing Up/Down arrows (for history handling) - # ImGuiInputTextFlags_CallbackAlways = 1 << 19, /* original C++ signature */ + # ImGuiInputTextFlags_CallbackCompletion = 1 << 18, /* original C++ signature */ + callback_completion = enum.auto() # (= 1 << 18) # Callback on pressing TAB (for completion handling) + # ImGuiInputTextFlags_CallbackHistory = 1 << 19, /* original C++ signature */ + callback_history = enum.auto() # (= 1 << 19) # Callback on pressing Up/Down arrows (for history handling) + # ImGuiInputTextFlags_CallbackAlways = 1 << 20, /* original C++ signature */ callback_always = ( enum.auto() - ) # (= 1 << 19) # Callback on each iteration. User code may query cursor position, modify text buffer. - # ImGuiInputTextFlags_CallbackCharFilter = 1 << 20, /* original C++ signature */ + ) # (= 1 << 20) # Callback on each iteration. User code may query cursor position, modify text buffer. + # ImGuiInputTextFlags_CallbackCharFilter = 1 << 21, /* original C++ signature */ callback_char_filter = ( enum.auto() - ) # (= 1 << 20) # Callback on character inputs to replace or discard them. Modify 'EventChar' to replace or discard, or return 1 in callback to discard. - # ImGuiInputTextFlags_CallbackResize = 1 << 21, /* original C++ signature */ + ) # (= 1 << 21) # Callback on character inputs to replace or discard them. Modify 'EventChar' to replace or discard, or return 1 in callback to discard. + # ImGuiInputTextFlags_CallbackResize = 1 << 22, /* original C++ signature */ callback_resize = ( enum.auto() - ) # (= 1 << 21) # 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) - # ImGuiInputTextFlags_CallbackEdit = 1 << 22, /* original C++ signature */ + ) # (= 1 << 22) # 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) + # ImGuiInputTextFlags_CallbackEdit = 1 << 23, /* original C++ signature */ callback_edit = ( enum.auto() - ) # (= 1 << 22) # Callback on any edit (note that InputText() already returns True on edit, the callback is useful mainly to manipulate the underlying buffer while focus is active) + ) # (= 1 << 23) # Callback on any edit (note that InputText() already returns True on edit, the callback is useful mainly to manipulate the underlying buffer while focus is active) # Obsolete names # ImGuiInputTextFlags_AlwaysInsertMode = ImGuiInputTextFlags_AlwaysOverwrite // [renamed in 1.82] name was not matching behavior @@ -4719,6 +4727,10 @@ class SliderFlags_(enum.Enum): clamp_zero_range = ( enum.auto() ) # (= 1 << 10) # Clamp even if min==max==0.0. Otherwise due to legacy reason DragXXX functions don't clamp with those values. When your clamping limits are dynamic you almost always want to use it. + # ImGuiSliderFlags_NoSpeedTweaks = 1 << 11, /* original C++ signature */ + no_speed_tweaks = ( + enum.auto() + ) # (= 1 << 11) # Disable keyboard modifiers altering tweak speed. Useful if you want to alter tweak speed yourself based on your own logic. # ImGuiSliderFlags_AlwaysClamp = ImGuiSliderFlags_ClampOnInput | ImGuiSliderFlags_ClampZeroRange, /* original C++ signature */ always_clamp = enum.auto() # (= SliderFlags_ClampOnInput | SliderFlags_ClampZeroRange) # ImGuiSliderFlags_InvalidMask_ = 0x7000000F, /* original C++ signature */ @@ -8589,6 +8601,7 @@ class IO: # (the imgui_impl_xxxx backend files are setting those up for you) # ------------------------------------------------------------------ + # Nowadays those would be stored in ImGuiPlatformIO but we are leaving them here for legacy reasons. # Optional: Platform/Renderer backend name (informational only! will be displayed in About Window) + User data for backend/wrappers to store their own stuff. # const char* BackendPlatformName; /* original C++ signature */ backend_platform_name: str # = None # (const) @@ -9317,7 +9330,8 @@ class ListClipper: # - Add '#define IMGUI_DEFINE_MATH_OPERATORS' before including this file (or in imconfig.h) to access courtesy maths operators for ImVec2 and ImVec4. # Helpers macros to generate 32-bit encoded colors -# User can declare their own format by #defining the 5 _SHIFT/_MASK macros in their imconfig file. +# - User can declare their own format by #defining the 5 _SHIFT/_MASK macros in their imconfig file. +# - Any setting other than the default will need custom backend support. The only standard backend that supports anything else than the default is DirectX9. class ImColor: """Helper: ImColor() implicitly converts colors to either ImU32 (packed 4x1 byte) or ImVec4 (4x1 float) @@ -9931,9 +9945,11 @@ class ImDrawList: # const char* _OwnerName; /* original C++ signature */ _owner_name: str # Pointer to owner window's name for debugging # (const) - # ImDrawList(ImDrawListSharedData* shared_data) { memset(this, 0, sizeof(*this)); _Data = shared_data; } /* original C++ signature */ + # IMGUI_API ImDrawList(ImDrawListSharedData* shared_data); /* original C++ signature */ def __init__(self, shared_data: ImDrawListSharedData) -> None: - """If you want to create ImDrawList instances, pass them ImGui::GetDrawListSharedData() or create and use your own ImDrawListSharedData (so you can use ImDrawList without ImGui)""" + """If you want to create ImDrawList instances, pass them ImGui::GetDrawListSharedData(). + (advanced: you may create and use your own ImDrawListSharedData so you can use ImDrawList without ImGui, but that's more involved) + """ pass # IMGUI_API void PushClipRect(const ImVec2& clip_rect_min, const ImVec2& clip_rect_max, bool intersect_with_current_clip_rect = false); /* original C++ signature */ def push_clip_rect( @@ -10395,11 +10411,9 @@ class ImFontConfig: # int OversampleV; /* original C++ signature */ oversample_v: int # 1 // Rasterize at higher quality for sub-pixel positioning. This is not really useful as we don't use sub-pixel positions on the Y axis. # bool PixelSnapH; /* original C++ signature */ - pixel_snap_h: bool # False // Align every glyph to pixel boundary. Useful e.g. if you are merging a non-pixel aligned font with the default font. If enabled, you can set OversampleH/V to 1. + pixel_snap_h: bool # False // Align every glyph AdvanceX to pixel boundaries. Useful e.g. if you are merging a non-pixel aligned font with the default font. If enabled, you can set OversampleH/V to 1. # ImVec2 GlyphExtraSpacing; /* original C++ signature */ - glyph_extra_spacing: ( - ImVec2 # 0, 0 // Extra spacing (in pixels) between glyphs. Only X axis is supported for now. - ) + glyph_extra_spacing: ImVec2 # 0, 0 // Extra spacing (in pixels) between glyphs when rendered: essentially add to glyph->AdvanceX. Only X axis is supported for now. # ImVec2 GlyphOffset; /* original C++ signature */ glyph_offset: ImVec2 # 0, 0 // Offset all glyphs from this font input. # float GlyphMinAdvanceX; /* original C++ signature */ @@ -10415,7 +10429,7 @@ class ImFontConfig: # float RasterizerDensity; /* original C++ signature */ rasterizer_density: float # 1.0 // DPI scale for rasterization, not altering other font metrics: make it easy to swap between e.g. a 100% and a 400% fonts for a zooming display. IMPORTANT: If you increase this it is expected that you increase font scale accordingly, otherwise quality may look lowered. # ImWchar EllipsisChar; /* original C++ signature */ - ellipsis_char: ImWchar # -1 // Explicitly specify unicode codepoint of ellipsis character. When fonts are being merged first specified ellipsis will be used. + ellipsis_char: ImWchar # 0 // Explicitly specify unicode codepoint of ellipsis character. When fonts are being merged first specified ellipsis will be used. # [Internal] # ImFont* DstFont; /* original C++ signature */ @@ -10531,21 +10545,23 @@ class ImFontGlyphRangesBuilder: class ImFontAtlasCustomRect: """See ImFontAtlas::AddCustomRectXXX functions.""" - # unsigned short Width, /* original C++ signature */ - width: int # Input // Desired rectangle dimension - # Height; /* original C++ signature */ - height: int # Input // Desired rectangle dimension # unsigned short X, /* original C++ signature */ x: int # Output // Packed position in Atlas # Y; /* original C++ signature */ y: int # Output // Packed position in Atlas + + # [Internal] + # unsigned short Width, /* original C++ signature */ + width: int # Input // Desired rectangle dimension + # Height; /* original C++ signature */ + height: int # Input // Desired rectangle dimension # float GlyphAdvanceX; /* original C++ signature */ glyph_advance_x: float # Input // For custom font glyphs only: glyph xadvance # ImVec2 GlyphOffset; /* original C++ signature */ glyph_offset: ImVec2 # Input // For custom font glyphs only: glyph display offset # ImFont* Font; /* original C++ signature */ font: ImFont # Input // For custom font glyphs only: target font - # ImFontAtlasCustomRect() { Width = Height = 0; X = Y = 0xFFFF; GlyphID = 0; GlyphColored = 0; GlyphAdvanceX = 0.0f; GlyphOffset = ImVec2(0, 0); Font = NULL; } /* original C++ signature */ + # ImFontAtlasCustomRect() { X = Y = 0xFFFF; Width = Height = 0; GlyphID = 0; GlyphColored = 0; GlyphAdvanceX = 0.0f; GlyphOffset = ImVec2(0, 0); Font = NULL; } /* original C++ signature */ def __init__(self) -> None: pass # bool IsPacked() const { return X != 0xFFFF; } /* original C++ signature */ @@ -10764,7 +10780,7 @@ class ImFontAtlas: # int TexDesiredWidth; /* original C++ signature */ tex_desired_width: int # Texture width desired by user before Build(). Must be a power-of-two. If have many glyphs your graphics API have texture size restrictions you may want to increase texture width to decrease height. # int TexGlyphPadding; /* original C++ signature */ - tex_glyph_padding: int # Padding between glyphs within texture in pixels. Defaults to 1. If your rendering method doesn't rely on bilinear filtering you may set this to 0 (will also need to set AntiAliasedLinesUseTex = False). + tex_glyph_padding: int # FIXME: Should be called "TexPackPadding". Padding between glyphs within texture in pixels. Defaults to 1. If your rendering method doesn't rely on bilinear filtering you may set this to 0 (will also need to set AntiAliasedLinesUseTex = False). # bool Locked; /* original C++ signature */ locked: bool # Marked as Locked by ImGui::NewFrame() so attempt to modify the atlas will assert. # void* UserData; /* original C++ signature */ @@ -10812,7 +10828,7 @@ class ImFont: ImFontAtlas automatically loads a default embedded font for you when you call GetTexDataAsAlpha8() or GetTexDataAsRGBA32(). """ - # Members: Hot ~20/24 bytes (for CalcTextSize) + # [Internal] Members: Hot ~20/24 bytes (for CalcTextSize) # ImVector IndexAdvanceX; /* original C++ signature */ index_advance_x: ImVector_float # 12-16 // out // // Sparse. Glyphs->AdvanceX in a directly indexable way (cache-friendly for CalcTextSize functions which only this info, and are often bottleneck in large UI). # float FallbackAdvanceX; /* original C++ signature */ @@ -10820,7 +10836,7 @@ class ImFont: # float FontSize; /* original C++ signature */ font_size: float # 4 // in // // Height of characters/line, set during loading (don't change after loading) - # Members: Hot ~28/40 bytes (for CalcTextSize + render loop) + # [Internal] Members: Hot ~28/40 bytes (for RenderText loop) # ImVector IndexLookup; /* original C++ signature */ index_lookup: ImVector_ImWchar # 12-16 // out // // Sparse. Index glyphs by Unicode code-point. # ImVector Glyphs; /* original C++ signature */ @@ -10828,19 +10844,20 @@ class ImFont: # const ImFontGlyph* FallbackGlyph; /* original C++ signature */ fallback_glyph: ImFontGlyph # 4-8 // out // = FindGlyph(FontFallbackChar) # (const) - # Members: Cold ~32/40 bytes + # [Internal] Members: Cold ~32/40 bytes + # Conceptually ConfigData[] is the list of font sources merged to create this font. # ImFontAtlas* ContainerAtlas; /* original C++ signature */ container_atlas: ImFontAtlas # 4-8 // out // // What we has been loaded into # const ImFontConfig* ConfigData; /* original C++ signature */ - config_data: ImFontConfig # 4-8 // in // // Pointer within ContainerAtlas->ConfigData # (const) + config_data: ImFontConfig # 4-8 // in // // Pointer within ContainerAtlas->ConfigData to ConfigDataCount instances # (const) # short ConfigDataCount; /* original C++ signature */ config_data_count: int # 2 // in // ~ 1 // Number of ImFontConfig involved in creating this font. Bigger than 1 when merging multiple font sources into one ImFont. - # ImWchar FallbackChar; /* original C++ signature */ - fallback_char: ImWchar # 2 // out // = FFFD/'?' // Character used if a glyph isn't found. - # ImWchar EllipsisChar; /* original C++ signature */ - ellipsis_char: ImWchar # 2 // out // = '...'/'.'// Character used for ellipsis rendering. # short EllipsisCharCount; /* original C++ signature */ ellipsis_char_count: int # 1 // out // 1 or 3 + # ImWchar EllipsisChar; /* original C++ signature */ + ellipsis_char: ImWchar # 2-4 // out // = '...'/'.'// Character used for ellipsis rendering. + # ImWchar FallbackChar; /* original C++ signature */ + fallback_char: ImWchar # 2-4 // out // = FFFD/'?' // Character used if a glyph isn't found. # float EllipsisWidth; /* original C++ signature */ ellipsis_width: float # 4 // out // Width # float EllipsisCharStep; /* original C++ signature */ diff --git a/bindings/imgui_bundle/imgui/internal.pyi b/bindings/imgui_bundle/imgui/internal.pyi index a6b509fe..0b186d8b 100644 --- a/bindings/imgui_bundle/imgui/internal.pyi +++ b/bindings/imgui_bundle/imgui/internal.pyi @@ -79,7 +79,7 @@ KeyRoutingIndex = int ################################################## # // Autogenerated code below! Do not edit! #################### #################### -# dear imgui, v1.91.5 +# dear imgui, v1.91.7 WIP # (internal structures/api) # You may use this file to debug, understand or extend Dear ImGui features but we don't provide any guarantee of forward compatibility. @@ -141,6 +141,7 @@ KeyRoutingIndex = int # [/ADAPT_IMGUI_BUNDLE] # Enable SSE intrinsics if available +# Emscripten has partial SSE 4.2 support where _mm_crc32_u32 is not available. See https://emscripten.org/docs/porting/simd.html#id11 and #8213 # Visual Studio warnings @@ -798,11 +799,15 @@ def im_lower_bound(in_begin: StoragePair, in_end: StoragePair, key: ID) -> Stora class ImDrawListSharedData: """Data shared between all ImDrawList instances - You may want to create your own instance of this if you want to use ImDrawList completely without ImGui. In that case, watch out for future changes to this structure. + Conceptually this could have been called e.g. ImDrawListSharedContext + Typically one ImGui context would create and maintain one of this. + You may want to create your own instance of you try to ImDrawList completely without ImGui. In that case, watch out for future changes to this structure. """ # ImVec2 TexUvWhitePixel; /* original C++ signature */ tex_uv_white_pixel: ImVec2 # UV of white pixel in the atlas + # const ImVec4* TexUvLines; /* original C++ signature */ + tex_uv_lines: ImVec4 # UV of anti-aliased lines in the atlas # (const) # ImFont* Font; /* original C++ signature */ font: ImFont # Current/default font (optional, for simplified AddText overload) # float FontSize; /* original C++ signature */ @@ -817,20 +822,16 @@ class ImDrawListSharedData: clip_rect_fullscreen: ImVec4 # Value for PushClipRectFullscreen() # ImDrawListFlags InitialFlags; /* original C++ signature */ initial_flags: ImDrawListFlags # Initial flags at the beginning of the frame (it is possible to alter flags on a per-drawlist basis afterwards) - # ImVector TempBuffer; /* original C++ signature */ - # [Internal] Temp write buffer - temp_buffer: ImVector_ImVec2 + temp_buffer: ImVector_ImVec2 # Temporary write buffer - # [Internal] Lookup tables + # Lookup tables # float ArcFastRadiusCutoff; /* original C++ signature */ arc_fast_radius_cutoff: float # Cutoff radius after which arc drawing will fallback to slower PathArcTo() # ImU8 CircleSegmentCounts[64]; /* original C++ signature */ circle_segment_counts: ( np.ndarray ) # ndarray[type=ImU8, size=64] # Precomputed segment count for given radius before we calculate it dynamically (to avoid calculation overhead) - # const ImVec4* TexUvLines; /* original C++ signature */ - tex_uv_lines: ImVec4 # UV of anti-aliased lines in the atlas # (const) # ImDrawListSharedData(); /* original C++ signature */ def __init__(self) -> None: @@ -1420,10 +1421,16 @@ class InputTextState: # ImGuiContext* Ctx; /* original C++ signature */ ctx: Context # parent UI context (needs to be set explicitly by parent). + # ImGuiInputTextFlags Flags; /* original C++ signature */ + flags: ( + InputTextFlags # copy of InputText() flags. may be used to check if e.g. ImGuiInputTextFlags_Password is set. + ) # ImGuiID ID; /* original C++ signature */ id_: ID # widget id owning the text state # int TextLen; /* original C++ signature */ text_len: int # UTF-8 length of the string in TextA (in bytes) + # const char* TextSrc; /* original C++ signature */ + text_src: str # == TextA.Data unless read-only, in which case == buf passed to InputText(). Field only set and valid _inside_ the call InputText() call. # (const) # ImVector TextA; /* original C++ signature */ text_a: ImVector_char # main UTF8 buffer. TextA.Size is a buffer size! Should always be >= buf_size passed by user (and of course >= CurLenA + 1). # ImVector TextToRevertTo; /* original C++ signature */ @@ -1446,16 +1453,12 @@ class InputTextState: ) # bool Edited; /* original C++ signature */ edited: bool # edited this frame - # ImGuiInputTextFlags Flags; /* original C++ signature */ - flags: ( - InputTextFlags # copy of InputText() flags. may be used to check if e.g. ImGuiInputTextFlags_Password is set. - ) - # bool ReloadUserBuf; /* original C++ signature */ - reload_user_buf: ( + # bool WantReloadUserBuf; /* original C++ signature */ + want_reload_user_buf: ( bool # force a reload of user buf so it may be modified externally. may be automatic in future version. ) # int ReloadSelectionStart; /* original C++ signature */ - reload_selection_start: int # POSITIONS ARE IN IMWCHAR units *NOT* UTF-8 this is why this is not exposed yet. + reload_selection_start: int # int ReloadSelectionEnd; /* original C++ signature */ reload_selection_end: int @@ -2710,6 +2713,7 @@ class DockNodeFlagsPrivate_(enum.Enum): docked_windows_in_focus_route = ( enum.auto() ) # (= 1 << 18) # // Any docked window will be automatically be focus-route chained (window->ParentWindowForFocusRoute set to this) so Shortcut() in this window can run when any docked window is focused. + # Disable docking/undocking actions in this dockspace or individual node (existing docked nodes will be preserved) # Those are not exposed in public because the desirable sharing/inheriting/copy-flag-on-split behaviors are quite difficult to design and understand. # The two public flags ImGuiDockNodeFlags_NoDockingOverCentralNode/ImGuiDockNodeFlags_NoDockingSplit don't have those issues. @@ -2733,6 +2737,7 @@ class DockNodeFlagsPrivate_(enum.Enum): no_docking = ( enum.auto() ) # (= DockNodeFlags_NoDockingOverMe | DockNodeFlags_NoDockingOverOther | DockNodeFlags_NoDockingOverEmpty | DockNodeFlags_NoDockingSplit | DockNodeFlags_NoDockingSplitOther) + # Masks # ImGuiDockNodeFlags_SharedFlagsInheritMask_ = ~0, /* original C++ signature */ shared_flags_inherit_mask_ = enum.auto() # (= ~0) @@ -3164,6 +3169,8 @@ class LocEntry: # ----------------------------------------------------------------------------- class DebugLogFlags_(enum.Enum): + """See IMGUI_DEBUG_LOG() and IMGUI_DEBUG_LOG_XXX() macros.""" + # Event types # ImGuiDebugLogFlags_None = 0, /* original C++ signature */ none = enum.auto() # (= 0) @@ -3183,17 +3190,19 @@ class DebugLogFlags_(enum.Enum): event_selection = enum.auto() # (= 1 << 6) # ImGuiDebugLogFlags_EventIO = 1 << 7, /* original C++ signature */ event_io = enum.auto() # (= 1 << 7) - # ImGuiDebugLogFlags_EventInputRouting = 1 << 8, /* original C++ signature */ - event_input_routing = enum.auto() # (= 1 << 8) - # ImGuiDebugLogFlags_EventDocking = 1 << 9, /* original C++ signature */ - event_docking = enum.auto() # (= 1 << 9) - # ImGuiDebugLogFlags_EventViewport = 1 << 10, /* original C++ signature */ - event_viewport = enum.auto() # (= 1 << 10) - - # ImGuiDebugLogFlags_EventMask_ = ImGuiDebugLogFlags_EventError | ImGuiDebugLogFlags_EventActiveId | ImGuiDebugLogFlags_EventFocus | ImGuiDebugLogFlags_EventPopup | ImGuiDebugLogFlags_EventNav | ImGuiDebugLogFlags_EventClipper | ImGuiDebugLogFlags_EventSelection | ImGuiDebugLogFlags_EventIO | ImGuiDebugLogFlags_EventInputRouting | ImGuiDebugLogFlags_EventDocking | ImGuiDebugLogFlags_EventViewport, /* original C++ signature */ + # ImGuiDebugLogFlags_EventFont = 1 << 8, /* original C++ signature */ + event_font = enum.auto() # (= 1 << 8) + # ImGuiDebugLogFlags_EventInputRouting = 1 << 9, /* original C++ signature */ + event_input_routing = enum.auto() # (= 1 << 9) + # ImGuiDebugLogFlags_EventDocking = 1 << 10, /* original C++ signature */ + event_docking = enum.auto() # (= 1 << 10) + # ImGuiDebugLogFlags_EventViewport = 1 << 11, /* original C++ signature */ + event_viewport = enum.auto() # (= 1 << 11) + + # ImGuiDebugLogFlags_EventMask_ = ImGuiDebugLogFlags_EventError | ImGuiDebugLogFlags_EventActiveId | ImGuiDebugLogFlags_EventFocus | ImGuiDebugLogFlags_EventPopup | ImGuiDebugLogFlags_EventNav | ImGuiDebugLogFlags_EventClipper | ImGuiDebugLogFlags_EventSelection | ImGuiDebugLogFlags_EventIO | ImGuiDebugLogFlags_EventFont | ImGuiDebugLogFlags_EventInputRouting | ImGuiDebugLogFlags_EventDocking | ImGuiDebugLogFlags_EventViewport, /* original C++ signature */ event_mask_ = ( enum.auto() - ) # (= DebugLogFlags_EventError | DebugLogFlags_EventActiveId | DebugLogFlags_EventFocus | DebugLogFlags_EventPopup | DebugLogFlags_EventNav | DebugLogFlags_EventClipper | DebugLogFlags_EventSelection | DebugLogFlags_EventIO | DebugLogFlags_EventInputRouting | DebugLogFlags_EventDocking | DebugLogFlags_EventViewport) + ) # (= DebugLogFlags_EventError | DebugLogFlags_EventActiveId | DebugLogFlags_EventFocus | DebugLogFlags_EventPopup | DebugLogFlags_EventNav | DebugLogFlags_EventClipper | DebugLogFlags_EventSelection | DebugLogFlags_EventIO | DebugLogFlags_EventFont | DebugLogFlags_EventInputRouting | DebugLogFlags_EventDocking | DebugLogFlags_EventViewport) # ImGuiDebugLogFlags_OutputToTTY = 1 << 20, /* original C++ signature */ output_to_tty = enum.auto() # (= 1 << 20) # Also send output to TTY # ImGuiDebugLogFlags_OutputToTestEngine = 1 << 21, /* original C++ signature */ @@ -3516,6 +3525,8 @@ class Context: active_id_previous_frame_has_been_edited_before: bool # ImGuiWindow* ActiveIdPreviousFrameWindow; /* original C++ signature */ active_id_previous_frame_window: Window + # ImGuiDataTypeStorage ActiveIdValueOnActivation; /* original C++ signature */ + active_id_value_on_activation: DataTypeStorage # Backup of initial value at the time of activation. ONLY SET BY SPECIFIC WIDGETS: DragXXX and SliderXXX. # ImGuiID LastActiveId; /* original C++ signature */ last_active_id: ID # Store the last non-zero ActiveId, useful for animation. # float LastActiveIdTimer; /* original C++ signature */ @@ -5209,14 +5220,17 @@ class TableSettings: # No guarantee of forward compatibility here! # ----------------------------------------------------------------------------- -# IMGUI_API ImGuiIO& GetIOEx(ImGuiContext* ctx); /* original C++ signature */ +# Windows +# We should always have a CurrentWindow in the stack (there is an implicit "Debug" window) +# If this ever crashes because g.CurrentWindow is None, it means that either: +# - ImGui::NewFrame() has never been called, which is illegal. +# - You are calling ImGui functions after ImGui::EndFrame()/ImGui::Render() and before the next ImGui::NewFrame(), which is also illegal. +# IMGUI_API ImGuiIO& GetIOEx(ImGuiContext* ctx); /* original C++ signature */ def get_io_ex(ctx: Context) -> IO: - """Windows - We should always have a CurrentWindow in the stack (there is an implicit "Debug" window) - If this ever crashes because g.CurrentWindow is None, it means that either: - - ImGui::NewFrame() has never been called, which is illegal. - - You are calling ImGui functions after ImGui::EndFrame()/ImGui::Render() and before the next ImGui::NewFrame(), which is also illegal. - """ + pass + +# IMGUI_API ImGuiPlatformIO& GetPlatformIOEx(ImGuiContext* ctx); /* original C++ signature */ +def get_platform_io_ex(ctx: Context) -> PlatformIO: pass # inline ImGuiWindow* GetCurrentWindowRead() { ImGuiContext& g = *GImGui; return g.CurrentWindow; } /* original C++ signature */ @@ -6927,10 +6941,10 @@ def button_ex(label: str, size_arg: Optional[ImVec2Like] = None, flags: ButtonFl def arrow_button_ex(str_id: str, dir: Dir, size_arg: ImVec2Like, flags: ButtonFlags = 0) -> bool: pass -# IMGUI_API bool ImageButtonEx(ImGuiID id, ImTextureID texture_id, const ImVec2& image_size, const ImVec2& uv0, const ImVec2& uv1, const ImVec4& bg_col, const ImVec4& tint_col, ImGuiButtonFlags flags = 0); /* original C++ signature */ +# IMGUI_API bool ImageButtonEx(ImGuiID id, ImTextureID user_texture_id, const ImVec2& image_size, const ImVec2& uv0, const ImVec2& uv1, const ImVec4& bg_col, const ImVec4& tint_col, ImGuiButtonFlags flags = 0); /* original C++ signature */ def image_button_ex( id_: ID, - texture_id: ImTextureID, + user_texture_id: ImTextureID, image_size: ImVec2Like, uv0: ImVec2Like, uv1: ImVec2Like, @@ -6971,9 +6985,15 @@ def collapse_button(id_: ID, pos: ImVec2Like, dock_node: DockNode) -> bool: def scrollbar(axis: Axis) -> None: pass -# IMGUI_API bool ScrollbarEx(const ImRect& bb, ImGuiID id, ImGuiAxis axis, ImS64* p_scroll_v, ImS64 avail_v, ImS64 contents_v, ImDrawFlags flags); /* original C++ signature */ +# IMGUI_API bool ScrollbarEx(const ImRect& bb, ImGuiID id, ImGuiAxis axis, ImS64* p_scroll_v, ImS64 avail_v, ImS64 contents_v, ImDrawFlags draw_rounding_flags = 0); /* original C++ signature */ def scrollbar_ex( - bb: ImRect, id_: ID, axis: Axis, p_scroll_v: ImS64, avail_v: ImS64, contents_v: ImS64, flags: ImDrawFlags + bb: ImRect, + id_: ID, + axis: Axis, + p_scroll_v: ImS64, + avail_v: ImS64, + contents_v: ImS64, + draw_rounding_flags: ImDrawFlags = 0, ) -> bool: pass @@ -7344,7 +7364,9 @@ def debug_render_viewport_thumbnail(draw_list: ImDrawList, viewport: ViewportP, # ----------------------------------------------------------------------------- class ImFontBuilderIO: - """This structure is likely to evolve as we add support for incremental atlas updates""" + """This structure is likely to evolve as we add support for incremental atlas updates. + Conceptually this could be in ImGuiPlatformIO, but we are far from ready to make this public. + """ # ImFontBuilderIO(); /* original C++ signature */ def __init__(self) -> None: diff --git a/external/imgui/bindings/pybind_imgui.cpp b/external/imgui/bindings/pybind_imgui.cpp index 0de8b916..9c52db8f 100644 --- a/external/imgui/bindings/pybind_imgui.cpp +++ b/external/imgui/bindings/pybind_imgui.cpp @@ -3094,6 +3094,7 @@ void py_init_module_imgui_main(nb::module_& m) .value("display_empty_ref_val", ImGuiInputTextFlags_DisplayEmptyRefVal, "InputFloat(), InputInt(), InputScalar() etc. only: when value is zero, do not display it. Generally used with ImGuiInputTextFlags_ParseEmptyRefVal.") .value("no_horizontal_scroll", ImGuiInputTextFlags_NoHorizontalScroll, "Disable following the cursor horizontally") .value("no_undo_redo", ImGuiInputTextFlags_NoUndoRedo, "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().") + .value("elide_left", ImGuiInputTextFlags_ElideLeft, "When text doesn't fit, elide left side to ensure right side stays visible. Useful for path/filenames. Single-line only!") .value("callback_completion", ImGuiInputTextFlags_CallbackCompletion, "Callback on pressing TAB (for completion handling)") .value("callback_history", ImGuiInputTextFlags_CallbackHistory, "Callback on pressing Up/Down arrows (for history handling)") .value("callback_always", ImGuiInputTextFlags_CallbackAlways, "Callback on each iteration. User code may query cursor position, modify text buffer.") @@ -3659,6 +3660,7 @@ void py_init_module_imgui_main(nb::module_& m) .value("wrap_around", ImGuiSliderFlags_WrapAround, "Enable wrapping around from max to min and from min to max. Only supported by DragXXX() functions for now.") .value("clamp_on_input", ImGuiSliderFlags_ClampOnInput, "Clamp value to min/max bounds when input manually with CTRL+Click. By default CTRL+Click allows going out of bounds.") .value("clamp_zero_range", ImGuiSliderFlags_ClampZeroRange, "Clamp even if min==max==0.0. Otherwise due to legacy reason DragXXX functions don't clamp with those values. When your clamping limits are dynamic you almost always want to use it.") + .value("no_speed_tweaks", ImGuiSliderFlags_NoSpeedTweaks, "Disable keyboard modifiers altering tweak speed. Useful if you want to alter tweak speed yourself based on your own logic.") .value("always_clamp", ImGuiSliderFlags_AlwaysClamp, "") .value("invalid_mask_", ImGuiSliderFlags_InvalidMask_, "[Internal] We treat using those bits as being potentially a 'float power' argument from the previous API that has got miscast to this enum, and will trigger an assert if needed."); @@ -6817,7 +6819,7 @@ void py_init_module_imgui_main(nb::module_& m) .def_ro("_owner_name", &ImDrawList::_OwnerName, "Pointer to owner window's name for debugging") .def(nb::init(), nb::arg("shared_data"), - "If you want to create ImDrawList instances, pass them ImGui::GetDrawListSharedData() or create and use your own ImDrawListSharedData (so you can use ImDrawList without ImGui)") + " If you want to create ImDrawList instances, pass them ImGui::GetDrawListSharedData().\n (advanced: you may create and use your own ImDrawListSharedData so you can use ImDrawList without ImGui, but that's more involved)") .def("push_clip_rect", &ImDrawList::PushClipRect, nb::arg("clip_rect_min"), nb::arg("clip_rect_max"), nb::arg("intersect_with_current_clip_rect") = false, @@ -7126,8 +7128,8 @@ void py_init_module_imgui_main(nb::module_& m) .def_rw("size_pixels", &ImFontConfig::SizePixels, "// Size in pixels for rasterizer (more or less maps to the resulting font height).") .def_rw("oversample_h", &ImFontConfig::OversampleH, "2 // Rasterize at higher quality for sub-pixel positioning. Note the difference between 2 and 3 is minimal. You can reduce this to 1 for large glyphs save memory. Read https://github.com/nothings/stb/blob/master/tests/oversample/README.md for details.") .def_rw("oversample_v", &ImFontConfig::OversampleV, "1 // Rasterize at higher quality for sub-pixel positioning. This is not really useful as we don't use sub-pixel positions on the Y axis.") - .def_rw("pixel_snap_h", &ImFontConfig::PixelSnapH, "False // Align every glyph to pixel boundary. Useful e.g. if you are merging a non-pixel aligned font with the default font. If enabled, you can set OversampleH/V to 1.") - .def_rw("glyph_extra_spacing", &ImFontConfig::GlyphExtraSpacing, "0, 0 // Extra spacing (in pixels) between glyphs. Only X axis is supported for now.") + .def_rw("pixel_snap_h", &ImFontConfig::PixelSnapH, "False // Align every glyph AdvanceX to pixel boundaries. Useful e.g. if you are merging a non-pixel aligned font with the default font. If enabled, you can set OversampleH/V to 1.") + .def_rw("glyph_extra_spacing", &ImFontConfig::GlyphExtraSpacing, "0, 0 // Extra spacing (in pixels) between glyphs when rendered: essentially add to glyph->AdvanceX. Only X axis is supported for now.") .def_rw("glyph_offset", &ImFontConfig::GlyphOffset, "0, 0 // Offset all glyphs from this font input.") .def_rw("glyph_min_advance_x", &ImFontConfig::GlyphMinAdvanceX, "0 // Minimum AdvanceX for glyphs, set Min to align font icons, set both Min/Max to enforce mono-space font") .def_rw("glyph_max_advance_x", &ImFontConfig::GlyphMaxAdvanceX, "FLT_MAX // Maximum AdvanceX for glyphs") @@ -7135,7 +7137,7 @@ void py_init_module_imgui_main(nb::module_& m) .def_rw("font_builder_flags", &ImFontConfig::FontBuilderFlags, "0 // Settings for custom font builder. THIS IS BUILDER IMPLEMENTATION DEPENDENT. Leave as zero if unsure.") .def_rw("rasterizer_multiply", &ImFontConfig::RasterizerMultiply, "1.0 // Linearly brighten (>1.0) or darken (<1.0) font output. Brightening small fonts may be a good workaround to make them more readable. This is a silly thing we may remove in the future.") .def_rw("rasterizer_density", &ImFontConfig::RasterizerDensity, "1.0 // DPI scale for rasterization, not altering other font metrics: make it easy to swap between e.g. a 100% and a 400% fonts for a zooming display. IMPORTANT: If you increase this it is expected that you increase font scale accordingly, otherwise quality may look lowered.") - .def_rw("ellipsis_char", &ImFontConfig::EllipsisChar, "-1 // Explicitly specify unicode codepoint of ellipsis character. When fonts are being merged first specified ellipsis will be used.") + .def_rw("ellipsis_char", &ImFontConfig::EllipsisChar, "0 // Explicitly specify unicode codepoint of ellipsis character. When fonts are being merged first specified ellipsis will be used.") .def_rw("dst_font", &ImFontConfig::DstFont, "") .def(nb::init<>()) ; @@ -7226,10 +7228,10 @@ void py_init_module_imgui_main(nb::module_& m) auto pyClassImFontAtlasCustomRect = nb::class_ (m, "ImFontAtlasCustomRect", "See ImFontAtlas::AddCustomRectXXX functions.") - .def_rw("width", &ImFontAtlasCustomRect::Width, "Input // Desired rectangle dimension") - .def_rw("height", &ImFontAtlasCustomRect::Height, "Input // Desired rectangle dimension") .def_rw("x", &ImFontAtlasCustomRect::X, "Output // Packed position in Atlas") .def_rw("y", &ImFontAtlasCustomRect::Y, "Output // Packed position in Atlas") + .def_rw("width", &ImFontAtlasCustomRect::Width, "Input // Desired rectangle dimension") + .def_rw("height", &ImFontAtlasCustomRect::Height, "Input // Desired rectangle dimension") .def_rw("glyph_advance_x", &ImFontAtlasCustomRect::GlyphAdvanceX, "Input // For custom font glyphs only: glyph xadvance") .def_rw("glyph_offset", &ImFontAtlasCustomRect::GlyphOffset, "Input // For custom font glyphs only: glyph display offset") .def_rw("font", &ImFontAtlasCustomRect::Font, "Input // For custom font glyphs only: target font") @@ -7336,7 +7338,7 @@ void py_init_module_imgui_main(nb::module_& m) .def_rw("flags", &ImFontAtlas::Flags, "Build flags (see ImFontAtlasFlags_)") .def_rw("tex_id", &ImFontAtlas::TexID, "User data to refer to the texture once it has been uploaded to user's graphic systems. It is passed back to you during rendering via the ImDrawCmd structure.") .def_rw("tex_desired_width", &ImFontAtlas::TexDesiredWidth, "Texture width desired by user before Build(). Must be a power-of-two. If have many glyphs your graphics API have texture size restrictions you may want to increase texture width to decrease height.") - .def_rw("tex_glyph_padding", &ImFontAtlas::TexGlyphPadding, "Padding between glyphs within texture in pixels. Defaults to 1. If your rendering method doesn't rely on bilinear filtering you may set this to 0 (will also need to set AntiAliasedLinesUseTex = False).") + .def_rw("tex_glyph_padding", &ImFontAtlas::TexGlyphPadding, "FIXME: Should be called \"TexPackPadding\". Padding between glyphs within texture in pixels. Defaults to 1. If your rendering method doesn't rely on bilinear filtering you may set this to 0 (will also need to set AntiAliasedLinesUseTex = False).") .def_rw("locked", &ImFontAtlas::Locked, "Marked as Locked by ImGui::NewFrame() so attempt to modify the atlas will assert.") .def_rw("user_data", &ImFontAtlas::UserData, "Store your own atlas related user-data (if e.g. you have multiple font atlas).") .def_rw("tex_ready", &ImFontAtlas::TexReady, "Set when texture was built matching current font input") @@ -7365,11 +7367,11 @@ void py_init_module_imgui_main(nb::module_& m) .def_rw("glyphs", &ImFont::Glyphs, "12-16 // out // // All glyphs.") .def_ro("fallback_glyph", &ImFont::FallbackGlyph, "4-8 // out // = FindGlyph(FontFallbackChar)") .def_rw("container_atlas", &ImFont::ContainerAtlas, "4-8 // out // // What we has been loaded into") - .def_ro("config_data", &ImFont::ConfigData, "4-8 // in // // Pointer within ContainerAtlas->ConfigData") + .def_ro("config_data", &ImFont::ConfigData, "4-8 // in // // Pointer within ContainerAtlas->ConfigData to ConfigDataCount instances") .def_rw("config_data_count", &ImFont::ConfigDataCount, "2 // in // ~ 1 // Number of ImFontConfig involved in creating this font. Bigger than 1 when merging multiple font sources into one ImFont.") - .def_rw("fallback_char", &ImFont::FallbackChar, "2 // out // = FFFD/'?' // Character used if a glyph isn't found.") - .def_rw("ellipsis_char", &ImFont::EllipsisChar, "2 // out // = '...'/'.'// Character used for ellipsis rendering.") .def_rw("ellipsis_char_count", &ImFont::EllipsisCharCount, "1 // out // 1 or 3") + .def_rw("ellipsis_char", &ImFont::EllipsisChar, "2-4 // out // = '...'/'.'// Character used for ellipsis rendering.") + .def_rw("fallback_char", &ImFont::FallbackChar, "2-4 // out // = FFFD/'?' // Character used if a glyph isn't found.") .def_rw("ellipsis_width", &ImFont::EllipsisWidth, "4 // out // Width") .def_rw("ellipsis_char_step", &ImFont::EllipsisCharStep, "4 // out // Step between characters when EllipsisCount > 0") .def_rw("dirty_lookup_tables", &ImFont::DirtyLookupTables, "1 // out //") diff --git a/external/imgui/bindings/pybind_imgui_internal.cpp b/external/imgui/bindings/pybind_imgui_internal.cpp index 5071f12c..7352a708 100644 --- a/external/imgui/bindings/pybind_imgui_internal.cpp +++ b/external/imgui/bindings/pybind_imgui_internal.cpp @@ -548,8 +548,9 @@ void py_init_module_imgui_internal(nb::module_& m) auto pyClassImDrawListSharedData = nb::class_ - (m, "ImDrawListSharedData", " Data shared between all ImDrawList instances\n You may want to create your own instance of this if you want to use ImDrawList completely without ImGui. In that case, watch out for future changes to this structure.") + (m, "ImDrawListSharedData", " Data shared between all ImDrawList instances\n Conceptually this could have been called e.g. ImDrawListSharedContext\n Typically one ImGui context would create and maintain one of this.\n You may want to create your own instance of you try to ImDrawList completely without ImGui. In that case, watch out for future changes to this structure.") .def_rw("tex_uv_white_pixel", &ImDrawListSharedData::TexUvWhitePixel, "UV of white pixel in the atlas") + .def_ro("tex_uv_lines", &ImDrawListSharedData::TexUvLines, "UV of anti-aliased lines in the atlas") .def_rw("font", &ImDrawListSharedData::Font, "Current/default font (optional, for simplified AddText overload)") .def_rw("font_size", &ImDrawListSharedData::FontSize, "Current/default font size (optional, for simplified AddText overload)") .def_rw("font_scale", &ImDrawListSharedData::FontScale, "Current/default font scale (== FontSize / Font->FontSize)") @@ -557,7 +558,7 @@ void py_init_module_imgui_internal(nb::module_& m) .def_rw("circle_segment_max_error", &ImDrawListSharedData::CircleSegmentMaxError, "Number of circle segments to use per pixel of radius for AddCircle() etc") .def_rw("clip_rect_fullscreen", &ImDrawListSharedData::ClipRectFullscreen, "Value for PushClipRectFullscreen()") .def_rw("initial_flags", &ImDrawListSharedData::InitialFlags, "Initial flags at the beginning of the frame (it is possible to alter flags on a per-drawlist basis afterwards)") - .def_rw("temp_buffer", &ImDrawListSharedData::TempBuffer, "[Internal] Temp write buffer") + .def_rw("temp_buffer", &ImDrawListSharedData::TempBuffer, "Temporary write buffer") .def_rw("arc_fast_radius_cutoff", &ImDrawListSharedData::ArcFastRadiusCutoff, "Cutoff radius after which arc drawing will fallback to slower PathArcTo()") .def_prop_ro("circle_segment_counts", [](ImDrawListSharedData &self) -> nb::ndarray, nb::c_contig> @@ -565,7 +566,6 @@ void py_init_module_imgui_internal(nb::module_& m) return self.CircleSegmentCounts; }, "Precomputed segment count for given radius before we calculate it dynamically (to avoid calculation overhead)") - .def_ro("tex_uv_lines", &ImDrawListSharedData::TexUvLines, "UV of anti-aliased lines in the atlas") .def(nb::init<>()) .def("set_circle_tessellation_max_error", &ImDrawListSharedData::SetCircleTessellationMaxError, @@ -952,8 +952,10 @@ void py_init_module_imgui_internal(nb::module_& m) nb::class_ (m, "InputTextState", " Internal state of the currently focused/edited text input box\n For a given item ID, access with ImGui::GetInputTextState()") .def_rw("ctx", &ImGuiInputTextState::Ctx, "parent UI context (needs to be set explicitly by parent).") + .def_rw("flags", &ImGuiInputTextState::Flags, "copy of InputText() flags. may be used to check if e.g. ImGuiInputTextFlags_Password is set.") .def_rw("id_", &ImGuiInputTextState::ID, "widget id owning the text state") .def_rw("text_len", &ImGuiInputTextState::TextLen, "UTF-8 length of the string in TextA (in bytes)") + .def_ro("text_src", &ImGuiInputTextState::TextSrc, "== TextA.Data unless read-only, in which case == buf passed to InputText(). Field only set and valid _inside_ the call InputText() call.") .def_rw("text_a", &ImGuiInputTextState::TextA, "main UTF8 buffer. TextA.Size is a buffer size! Should always be >= buf_size passed by user (and of course >= CurLenA + 1).") .def_rw("text_to_revert_to", &ImGuiInputTextState::TextToRevertTo, "value to revert to when pressing Escape = backup of end-user buffer at the time of focus (in UTF-8, unaltered)") .def_rw("callback_text_backup", &ImGuiInputTextState::CallbackTextBackup, "temporary storage for callback to support automatic reconcile of undo-stack") @@ -963,9 +965,8 @@ void py_init_module_imgui_internal(nb::module_& m) .def_rw("cursor_follow", &ImGuiInputTextState::CursorFollow, "set when we want scrolling to follow the current cursor position (not always!)") .def_rw("selected_all_mouse_lock", &ImGuiInputTextState::SelectedAllMouseLock, "after a double-click to select all, we ignore further mouse drags to update selection") .def_rw("edited", &ImGuiInputTextState::Edited, "edited this frame") - .def_rw("flags", &ImGuiInputTextState::Flags, "copy of InputText() flags. may be used to check if e.g. ImGuiInputTextFlags_Password is set.") - .def_rw("reload_user_buf", &ImGuiInputTextState::ReloadUserBuf, "force a reload of user buf so it may be modified externally. may be automatic in future version.") - .def_rw("reload_selection_start", &ImGuiInputTextState::ReloadSelectionStart, "POSITIONS ARE IN IMWCHAR units *NOT* UTF-8 this is why this is not exposed yet.") + .def_rw("want_reload_user_buf", &ImGuiInputTextState::WantReloadUserBuf, "force a reload of user buf so it may be modified externally. may be automatic in future version.") + .def_rw("reload_selection_start", &ImGuiInputTextState::ReloadSelectionStart, "") .def_rw("reload_selection_end", &ImGuiInputTextState::ReloadSelectionEnd, "") .def(nb::init<>()) .def("clear_text", @@ -1994,7 +1995,7 @@ void py_init_module_imgui_internal(nb::module_& m) auto pyEnumDebugLogFlags_ = - nb::enum_(m, "DebugLogFlags_", nb::is_arithmetic(), "") + nb::enum_(m, "DebugLogFlags_", nb::is_arithmetic(), "See IMGUI_DEBUG_LOG() and IMGUI_DEBUG_LOG_XXX() macros.") .value("none", ImGuiDebugLogFlags_None, "") .value("event_error", ImGuiDebugLogFlags_EventError, "Error submitted by IM_ASSERT_USER_ERROR()") .value("event_active_id", ImGuiDebugLogFlags_EventActiveId, "") @@ -2004,6 +2005,7 @@ void py_init_module_imgui_internal(nb::module_& m) .value("event_clipper", ImGuiDebugLogFlags_EventClipper, "") .value("event_selection", ImGuiDebugLogFlags_EventSelection, "") .value("event_io", ImGuiDebugLogFlags_EventIO, "") + .value("event_font", ImGuiDebugLogFlags_EventFont, "") .value("event_input_routing", ImGuiDebugLogFlags_EventInputRouting, "") .value("event_docking", ImGuiDebugLogFlags_EventDocking, "") .value("event_viewport", ImGuiDebugLogFlags_EventViewport, "") @@ -2208,6 +2210,7 @@ void py_init_module_imgui_internal(nb::module_& m) .def_rw("active_id_previous_frame_is_alive", &ImGuiContext::ActiveIdPreviousFrameIsAlive, "") .def_rw("active_id_previous_frame_has_been_edited_before", &ImGuiContext::ActiveIdPreviousFrameHasBeenEditedBefore, "") .def_rw("active_id_previous_frame_window", &ImGuiContext::ActiveIdPreviousFrameWindow, "") + .def_rw("active_id_value_on_activation", &ImGuiContext::ActiveIdValueOnActivation, "Backup of initial value at the time of activation. ONLY SET BY SPECIFIC WIDGETS: DragXXX and SliderXXX.") .def_rw("last_active_id", &ImGuiContext::LastActiveId, "Store the last non-zero ActiveId, useful for animation.") .def_rw("last_active_id_timer", &ImGuiContext::LastActiveIdTimer, "Store the last non-zero ActiveId timer since the beginning of activation, useful for animation.") .def_rw("last_key_mods_change_time", &ImGuiContext::LastKeyModsChangeTime, "Record the last time key mods changed (affect repeat delay when using shortcut logic)") @@ -3090,7 +3093,11 @@ void py_init_module_imgui_internal(nb::module_& m) m.def("get_io_ex", ImGui::GetIOEx, nb::arg("ctx"), - " Windows\n We should always have a CurrentWindow in the stack (there is an implicit \"Debug\" window)\n If this ever crashes because g.CurrentWindow is None, it means that either:\n - ImGui::NewFrame() has never been called, which is illegal.\n - You are calling ImGui functions after ImGui::EndFrame()/ImGui::Render() and before the next ImGui::NewFrame(), which is also illegal.", + nb::rv_policy::reference); + + m.def("get_platform_io_ex", + ImGui::GetPlatformIOEx, + nb::arg("ctx"), nb::rv_policy::reference); m.def("get_current_window_read", @@ -4540,7 +4547,7 @@ void py_init_module_imgui_internal(nb::module_& m) ImGui::ArrowButtonEx, nb::arg("str_id"), nb::arg("dir"), nb::arg("size_arg"), nb::arg("flags") = 0); m.def("image_button_ex", - ImGui::ImageButtonEx, nb::arg("id_"), nb::arg("texture_id"), nb::arg("image_size"), nb::arg("uv0"), nb::arg("uv1"), nb::arg("bg_col"), nb::arg("tint_col"), nb::arg("flags") = 0); + ImGui::ImageButtonEx, nb::arg("id_"), nb::arg("user_texture_id"), nb::arg("image_size"), nb::arg("uv0"), nb::arg("uv1"), nb::arg("bg_col"), nb::arg("tint_col"), nb::arg("flags") = 0); m.def("separator_ex", ImGui::SeparatorEx, nb::arg("flags"), nb::arg("thickness") = 1.0f); @@ -4564,7 +4571,7 @@ void py_init_module_imgui_internal(nb::module_& m) ImGui::Scrollbar, nb::arg("axis")); m.def("scrollbar_ex", - ImGui::ScrollbarEx, nb::arg("bb"), nb::arg("id_"), nb::arg("axis"), nb::arg("p_scroll_v"), nb::arg("avail_v"), nb::arg("contents_v"), nb::arg("flags")); + ImGui::ScrollbarEx, nb::arg("bb"), nb::arg("id_"), nb::arg("axis"), nb::arg("p_scroll_v"), nb::arg("avail_v"), nb::arg("contents_v"), nb::arg("draw_rounding_flags") = 0); m.def("get_window_scrollbar_rect", ImGui::GetWindowScrollbarRect, nb::arg("window"), nb::arg("axis")); @@ -4854,7 +4861,7 @@ void py_init_module_imgui_internal(nb::module_& m) auto pyClassImFontBuilderIO = nb::class_ - (m, "ImFontBuilderIO", "This structure is likely to evolve as we add support for incremental atlas updates") + (m, "ImFontBuilderIO", " This structure is likely to evolve as we add support for incremental atlas updates.\n Conceptually this could be in ImGuiPlatformIO, but we are far from ready to make this public.") .def(nb::init<>()) // implicit default constructor ; diff --git a/external/imgui/imgui b/external/imgui/imgui index 21606611..2b95af15 160000 --- a/external/imgui/imgui +++ b/external/imgui/imgui @@ -1 +1 @@ -Subproject commit 216066119500a2f4b46f0271c7b94ab286376500 +Subproject commit 2b95af15fa975da2fe33f751fedb603cf5f599c9 diff --git a/external/imgui_test_engine/imgui_test_engine b/external/imgui_test_engine/imgui_test_engine index 4d45290c..ee8fed23 160000 --- a/external/imgui_test_engine/imgui_test_engine +++ b/external/imgui_test_engine/imgui_test_engine @@ -1 +1 @@ -Subproject commit 4d45290c1ec53d1bd12a8b7555a5c4dd6cd69749 +Subproject commit ee8fed23dde8b31ced664f386cb25d22a493ae49