You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
# - This is essentially a thin wrapper to using BeginChild/EndChild with the ImGuiChildFlags_FrameStyle flag for stylistic changes + displaying a label.
1995
+
# - If you don't need a label you can probably simply use BeginChild() with the ImGuiChildFlags_FrameStyle flag for the same result.
1994
1996
# - You can submit contents and manage your selection state however you want it, by creating e.g. Selectable() or any other items.
1995
1997
# - 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.
1996
1998
# - 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):
3288
3290
enum.auto()
3289
3291
) # (= 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().
3290
3292
3293
+
# Elide display / Alignment
3294
+
# ImGuiInputTextFlags_ElideLeft = 1 << 17, /* original C++ signature */
3295
+
elide_left = (
3296
+
enum.auto()
3297
+
) # (= 1 << 17) # When text doesn't fit, elide left side to ensure right side stays visible. Useful for path/filenames. Single-line only!
3298
+
3291
3299
# Callback features
3292
-
# ImGuiInputTextFlags_CallbackCompletion = 1 << 17, /* original C++ signature */
# ImGuiInputTextFlags_CallbackHistory = 1 << 19, /* original C++ signature */
3303
+
callback_history = enum.auto() # (= 1 << 19) # Callback on pressing Up/Down arrows (for history handling)
3304
+
# ImGuiInputTextFlags_CallbackAlways = 1 << 20, /* original C++ signature */
3297
3305
callback_always = (
3298
3306
enum.auto()
3299
-
) # (= 1 << 19) # Callback on each iteration. User code may query cursor position, modify text buffer.
3300
-
# ImGuiInputTextFlags_CallbackCharFilter = 1 << 20, /* original C++ signature */
3307
+
) # (= 1 << 20) # Callback on each iteration. User code may query cursor position, modify text buffer.
3308
+
# ImGuiInputTextFlags_CallbackCharFilter = 1 << 21, /* original C++ signature */
3301
3309
callback_char_filter = (
3302
3310
enum.auto()
3303
-
) # (= 1 << 20) # Callback on character inputs to replace or discard them. Modify 'EventChar' to replace or discard, or return 1 in callback to discard.
3304
-
# ImGuiInputTextFlags_CallbackResize = 1 << 21, /* original C++ signature */
3311
+
) # (= 1 << 21) # Callback on character inputs to replace or discard them. Modify 'EventChar' to replace or discard, or return 1 in callback to discard.
3312
+
# ImGuiInputTextFlags_CallbackResize = 1 << 22, /* original C++ signature */
3305
3313
callback_resize = (
3306
3314
enum.auto()
3307
-
) # (= 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)
3308
-
# ImGuiInputTextFlags_CallbackEdit = 1 << 22, /* original C++ signature */
3315
+
) # (= 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)
3316
+
# ImGuiInputTextFlags_CallbackEdit = 1 << 23, /* original C++ signature */
3309
3317
callback_edit = (
3310
3318
enum.auto()
3311
-
) # (= 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)
3319
+
) # (= 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)
3312
3320
3313
3321
# Obsolete names
3314
3322
# ImGuiInputTextFlags_AlwaysInsertMode = ImGuiInputTextFlags_AlwaysOverwrite // [renamed in 1.82] name was not matching behavior
@@ -4719,6 +4727,10 @@ class SliderFlags_(enum.Enum):
4719
4727
clamp_zero_range = (
4720
4728
enum.auto()
4721
4729
) # (= 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.
4730
+
# ImGuiSliderFlags_NoSpeedTweaks = 1 << 11, /* original C++ signature */
4731
+
no_speed_tweaks = (
4732
+
enum.auto()
4733
+
) # (= 1 << 11) # Disable keyboard modifiers altering tweak speed. Useful if you want to alter tweak speed yourself based on your own logic.
4722
4734
# ImGuiSliderFlags_AlwaysClamp = ImGuiSliderFlags_ClampOnInput | ImGuiSliderFlags_ClampZeroRange, /* original C++ signature */
# Nowadays those would be stored in ImGuiPlatformIO but we are leaving them here for legacy reasons.
8592
8605
# Optional: Platform/Renderer backend name (informational only! will be displayed in About Window) + User data for backend/wrappers to store their own stuff.
8593
8606
# const char* BackendPlatformName; /* original C++ signature */
8594
8607
backend_platform_name: str # = None # (const)
@@ -9317,7 +9330,8 @@ class ListClipper:
9317
9330
# - Add '#define IMGUI_DEFINE_MATH_OPERATORS' before including this file (or in imconfig.h) to access courtesy maths operators for ImVec2 and ImVec4.
9318
9331
9319
9332
# Helpers macros to generate 32-bit encoded colors
9320
-
# User can declare their own format by #defining the 5 _SHIFT/_MASK macros in their imconfig file.
9333
+
# - User can declare their own format by #defining the 5 _SHIFT/_MASK macros in their imconfig file.
9334
+
# - Any setting other than the default will need custom backend support. The only standard backend that supports anything else than the default is DirectX9.
9321
9335
9322
9336
class ImColor:
9323
9337
"""Helper: ImColor() implicitly converts colors to either ImU32 (packed 4x1 byte) or ImVec4 (4x1 float)
@@ -9931,9 +9945,11 @@ class ImDrawList:
9931
9945
# const char* _OwnerName; /* original C++ signature */
9932
9946
_owner_name: str # Pointer to owner window's name for debugging # (const)
9933
9947
9934
-
# ImDrawList(ImDrawListSharedData* shared_data) { memset(this, 0, sizeof(*this)); _Data = shared_data; } /* original C++ signature */
9948
+
# IMGUI_API ImDrawList(ImDrawListSharedData* shared_data); /* original C++ signature */
"""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)"""
9950
+
"""If you want to create ImDrawList instances, pass them ImGui::GetDrawListSharedData().
9951
+
(advanced: you may create and use your own ImDrawListSharedData so you can use ImDrawList without ImGui, but that's more involved)
9952
+
"""
9937
9953
pass
9938
9954
# IMGUI_API void PushClipRect(const ImVec2& clip_rect_min, const ImVec2& clip_rect_max, bool intersect_with_current_clip_rect = false); /* original C++ signature */
9939
9955
def push_clip_rect(
@@ -10395,11 +10411,9 @@ class ImFontConfig:
10395
10411
# int OversampleV; /* original C++ signature */
10396
10412
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.
10397
10413
# bool PixelSnapH; /* original C++ signature */
10398
-
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.
10414
+
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.
10399
10415
# ImVec2 GlyphExtraSpacing; /* original C++ signature */
10400
-
glyph_extra_spacing: (
10401
-
ImVec2 # 0, 0 // Extra spacing (in pixels) between glyphs. Only X axis is supported for now.
10402
-
)
10416
+
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.
10403
10417
# ImVec2 GlyphOffset; /* original C++ signature */
10404
10418
glyph_offset: ImVec2 # 0, 0 // Offset all glyphs from this font input.
10405
10419
# float GlyphMinAdvanceX; /* original C++ signature */
@@ -10415,7 +10429,7 @@ class ImFontConfig:
10415
10429
# float RasterizerDensity; /* original C++ signature */
10416
10430
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.
10417
10431
# ImWchar EllipsisChar; /* original C++ signature */
10418
-
ellipsis_char: ImWchar # -1 // Explicitly specify unicode codepoint of ellipsis character. When fonts are being merged first specified ellipsis will be used.
10432
+
ellipsis_char: ImWchar # 0 // Explicitly specify unicode codepoint of ellipsis character. When fonts are being merged first specified ellipsis will be used.
10419
10433
10420
10434
# [Internal]
10421
10435
# ImFont* DstFont; /* original C++ signature */
@@ -10531,21 +10545,23 @@ class ImFontGlyphRangesBuilder:
# unsigned short Width, /* original C++ signature */
10535
-
width: int # Input // Desired rectangle dimension
10536
-
# Height; /* original C++ signature */
10537
-
height: int # Input // Desired rectangle dimension
10538
10548
# unsigned short X, /* original C++ signature */
10539
10549
x: int # Output // Packed position in Atlas
10540
10550
# Y; /* original C++ signature */
10541
10551
y: int # Output // Packed position in Atlas
10552
+
10553
+
# [Internal]
10554
+
# unsigned short Width, /* original C++ signature */
10555
+
width: int # Input // Desired rectangle dimension
10556
+
# Height; /* original C++ signature */
10557
+
height: int # Input // Desired rectangle dimension
10542
10558
# float GlyphAdvanceX; /* original C++ signature */
10543
10559
glyph_advance_x: float # Input // For custom font glyphs only: glyph xadvance
10544
10560
# ImVec2 GlyphOffset; /* original C++ signature */
10545
10561
glyph_offset: ImVec2 # Input // For custom font glyphs only: glyph display offset
10546
10562
# ImFont* Font; /* original C++ signature */
10547
10563
font: ImFont # Input // For custom font glyphs only: target font
10548
-
# ImFontAtlasCustomRect() { Width = Height = 0; X = Y = 0xFFFF; GlyphID = 0; GlyphColored = 0; GlyphAdvanceX = 0.0f; GlyphOffset = ImVec2(0, 0); Font = NULL; } /* original C++ signature */
10564
+
# ImFontAtlasCustomRect() { X = Y = 0xFFFF; Width = Height = 0; GlyphID = 0; GlyphColored = 0; GlyphAdvanceX = 0.0f; GlyphOffset = ImVec2(0, 0); Font = NULL; } /* original C++ signature */
10549
10565
def __init__(self) -> None:
10550
10566
pass
10551
10567
# bool IsPacked() const { return X != 0xFFFF; } /* original C++ signature */
@@ -10764,7 +10780,7 @@ class ImFontAtlas:
10764
10780
# int TexDesiredWidth; /* original C++ signature */
10765
10781
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.
10766
10782
# int TexGlyphPadding; /* original C++ signature */
10767
-
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).
10783
+
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).
10768
10784
# bool Locked; /* original C++ signature */
10769
10785
locked: bool # Marked as Locked by ImGui::NewFrame() so attempt to modify the atlas will assert.
10770
10786
# void* UserData; /* original C++ signature */
@@ -10812,35 +10828,36 @@ class ImFont:
10812
10828
ImFontAtlas automatically loads a default embedded font for you when you call GetTexDataAsAlpha8() or GetTexDataAsRGBA32().
10813
10829
"""
10814
10830
10815
-
# Members: Hot ~20/24 bytes (for CalcTextSize)
10831
+
# [Internal] Members: Hot ~20/24 bytes (for CalcTextSize)
10816
10832
# ImVector<float> IndexAdvanceX; /* original C++ signature */
10817
10833
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).
10818
10834
# float FallbackAdvanceX; /* original C++ signature */
10819
10835
fallback_advance_x: float # 4 // out // = FallbackGlyph->AdvanceX
10820
10836
# float FontSize; /* original C++ signature */
10821
10837
font_size: float # 4 // in // // Height of characters/line, set during loading (don't change after loading)
10822
10838
10823
-
# Members: Hot ~28/40 bytes (for CalcTextSize + render loop)
10839
+
# [Internal] Members: Hot ~28/40 bytes (for RenderText loop)
10824
10840
# ImVector<ImWchar> IndexLookup; /* original C++ signature */
10825
10841
index_lookup: ImVector_ImWchar # 12-16 // out // // Sparse. Index glyphs by Unicode code-point.
10826
10842
# ImVector<ImFontGlyph> Glyphs; /* original C++ signature */
10827
10843
glyphs: ImVector_ImFontGlyph # 12-16 // out // // All glyphs.
10828
10844
# const ImFontGlyph* FallbackGlyph; /* original C++ signature */
# Conceptually ConfigData[] is the list of font sources merged to create this font.
10832
10849
# ImFontAtlas* ContainerAtlas; /* original C++ signature */
10833
10850
container_atlas: ImFontAtlas # 4-8 // out // // What we has been loaded into
10834
10851
# const ImFontConfig* ConfigData; /* original C++ signature */
10835
-
config_data: ImFontConfig # 4-8 // in // // Pointer within ContainerAtlas->ConfigData # (const)
10852
+
config_data: ImFontConfig # 4-8 // in // // Pointer within ContainerAtlas->ConfigData to ConfigDataCount instances # (const)
10836
10853
# short ConfigDataCount; /* original C++ signature */
10837
10854
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.
10838
-
# ImWchar FallbackChar; /* original C++ signature */
10839
-
fallback_char: ImWchar # 2 // out // = FFFD/'?' // Character used if a glyph isn't found.
10840
-
# ImWchar EllipsisChar; /* original C++ signature */
10841
-
ellipsis_char: ImWchar # 2 // out // = '...'/'.'// Character used for ellipsis rendering.
10842
10855
# short EllipsisCharCount; /* original C++ signature */
10843
10856
ellipsis_char_count: int # 1 // out // 1 or 3
10857
+
# ImWchar EllipsisChar; /* original C++ signature */
10858
+
ellipsis_char: ImWchar # 2-4 // out // = '...'/'.'// Character used for ellipsis rendering.
10859
+
# ImWchar FallbackChar; /* original C++ signature */
10860
+
fallback_char: ImWchar # 2-4 // out // = FFFD/'?' // Character used if a glyph isn't found.
10844
10861
# float EllipsisWidth; /* original C++ signature */
10845
10862
ellipsis_width: float # 4 // out // Width
10846
10863
# float EllipsisCharStep; /* original C++ signature */
0 commit comments