Commit Graph

9307 Commits

Author SHA1 Message Date
ocornut
6d46458895 ImStrv: fixes in DebugHookIdInfo(). 2025-09-08 18:50:06 +02:00
ocornut
72803b9ad4 ImStrv: fix in ShowIDStackToolWindow(), Font section. Font loading. 2025-09-08 18:50:06 +02:00
ocornut
2215b5edc5 ImStrv: made length() returns an int as it simplify the most common case (of passing %.*s to printf) 2025-09-08 18:50:06 +02:00
ocornut
28255a12d9 ImStrv: allow constructing from two null pointers. 2025-09-08 18:50:06 +02:00
ocornut
c57bc1abc4 ImStrv: Combo(), ListBox(): maybe seems better to not introducte the ImStrv [] versions?
As 1) user is unlikely to store that on their end. 2) nowadays with lambdas isn't an easy user-side conversion.
Then we limit explosion of an already messy API.
2025-09-08 18:50:06 +02:00
ocornut
198d9d3dc3 ImStrv: convert Combo()/ListBox() to use ImStrv in their getters.
Didn't convert Combo() "const char* items_separated_by_zeros" as this doesn't translate well when used via a ImStrv constructor, may actually aim to obsolete.
Fixed for shadowing local variable warning on 2025/06/25.
2025-09-08 18:50:06 +02:00
ocornut
6351a0e9ad ImStrv: Fixed BeginCombo() with ImGuiComboFlags_CustomPreview + fixes for latest (amended). 2025-09-08 18:50:06 +02:00
ocornut
c8a9034f41 ImStrv: add needed disambiguishing functions for const char* now being ambiguous. (5079)
amended for gcc/clang warnings
amended to facilitate merge with docking
2025-09-08 18:50:06 +02:00
ocornut
7fa392b0d3 ImStrv: backtracked for now on supporting ImStrv for format strings.
It's widely incomplete and slow, requires a printf function taking non-zero-terminated format string to work.
Might do it eventually but it's much less a problem than labels. Format string are more frequently inlined in code and tend to be small, so existing solutions at call site can work better for now.
2025-09-08 18:44:45 +02:00
ocornut
0513adbd8d ImStrv: Fixed various compile errors/warnings. 2025-09-08 18:44:45 +02:00
璀境石
ea2e7e3ae8 ImStrv: enhanced VS debugger .natvis support. build fixes. (5333, 5906) 2025-09-08 18:44:45 +02:00
ocornut
88acc48d1c ImStrv: standardized code doing format copy, optimized ImStrStr 2025-09-08 18:44:44 +02:00
ocornut
ef931dd672 ImStrv: moved double char* function signatures under #ifndef IMGUI_DISABLE_OBSOLETE_FUNCTIONS blocks. 2025-09-08 18:44:44 +02:00
ocornut
3a555c166a ImStrv: changed ImStrv xxx=NULL args to an explicit xxx=ImStrv()
This is mostly for the benefit of cimgui parser, ideally we would do without.
2025-09-08 18:44:44 +02:00
ocornut
5279cab385 ImStrv: Step 2 - change ImStrv typedef to struct, perform all other logic conversion.
Squashed commits (initially a commit from rokups + many rework by ocornut. keeping them separate commits made rebasing unnecessarily tricking so merged from 2024/02)
ImStrv: many fixes (see details), added imconfig class extension example, added natvis description.
ImStrv: rework toward ensuring End is always set to constant can be compile time calculated
ImStrv: using length(), fix ambiguous empty() function, fix altered behaviors, removed unused operators.
ImStrv: various tweaks and fixes. removed ImGuiTextRange from ImGuiTextFilter, fix test engine hooks, removed constructor only used twice.
2025-09-08 18:44:44 +02:00
Rokas Kupstys
96610ae3b4 ImStrv: Step 1 - change string type to ImStrv in API. (REBASED)
(last rebase amend 2024/12/11)
2025-09-08 18:26:09 +02:00
ocornut
2841c5135d Backends: OpenGL3: add GL_NEAREST and samplers functions in loader. 2025-09-08 17:24:39 +02:00
ocornut
bf52f4a83c Backends: OpenGL3: added HasBindSampler storage for readability and consistency. 2025-09-08 17:23:48 +02:00
ocornut
14e076c5bb Backends: Internal renaming of samplers. 2025-09-08 16:02:23 +02:00
ocornut
ea8a5a9e17 DrawList: made AddCallback() assert when passing a null callback. 2025-09-08 15:20:18 +02:00
ocornut
230418a75d InputText: Word-Wrap: attempt to track cursor while resizing frame/parent. (#3237, #952, #1062, #7363) 2025-09-08 11:56:22 +02:00
ocornut
16415aa39f InputText: Word-Wrap: added custom implementation for Home/End that is word-wrap friendly. (#3237, #952, #1062, #7363) 2025-09-08 11:56:22 +02:00
ocornut
985723ed94 InputText: Word-Wrap: mouse clicks on word-wrapping points set cursor side correctly. (#3237, #952, #1062, #7363) 2025-09-08 11:56:22 +02:00
ocornut
a82f66a9b0 InputText: Word-Wrap: added ImGuiInputTextFlags_WordWrap support. (#3237, #952, #1062, #7363) 2025-09-08 11:56:20 +02:00
ocornut
e422a38e4c InputText: internals: expose LineCount, GetPreferredOffsetX(). 2025-09-08 11:54:34 +02:00
ocornut
11fff1ccf5 ImFont::RenderText() takes ImDrawTextFlags_CpuFineClip instead of bool cpu_fine_clip + forward ImDrawTextFlags to word-wrap code.
(for #3237, #952, #1062, #7363)
2025-09-08 11:54:33 +02:00
ocornut
3cc7d1c81a InputText: InputTextCalcTextSize() uses ImFontCalcTextSizeEx().
(for #3237, #952, #1062, #7363)
2025-09-08 11:54:33 +02:00
ocornut
56189cd814 Internals: added ImDrawTextFlags_StopOnNewLine support to ImFontCalcTextSizeEx(), ImDrawTextFlags_WrapKeepTrailingBlanks to ImTextCalcWordWrapNextLineStart().
(for #3237, #952, #1062, #7363)
2025-09-08 11:54:33 +02:00
ocornut
a9945899c6 stb_textedit: extracted stb_textedit_move_line_start()/stb_textedit_move_line_end(), adding STB_TEXTEDIT_MOVELINESTART,STB_TEXTEDIT_MOVELINEEND support. (#3237, #952, #1062, #7363) 2025-09-08 11:54:33 +02:00
ocornut
bc6478f651 Internals: added ImDrawTextFlags_WrapKeepTrailingBlanks required for text-edit style word-wrapping.
(for #3237, #952, #1062, #7363)
2025-09-08 11:54:33 +02:00
ocornut
34ab6c8a89 Internals: extracted ImFont::CalcTextSizeA() into ImFontCalcTextSizeEx() so we can make change to its signature.
(for #3237, #952, #1062, #7363)
2025-09-08 11:54:33 +02:00
ocornut
c63b5bd8fb Internals: extracted ImFont::CalcWordWrapPosition() into ImFontCalcWordWrapPositionEx() so we can make change to its signature.
(for #3237, #952, #1062, #7363)
2025-09-08 11:54:33 +02:00
ocornut
8a35ce0e98 CalcWordWrapPosition() breaks on \n instead of relying on caller to do it + expose ImTextCalcWordWrapNextLineStart(). (#3237, #952, #1062, #7363)
Should be functional no-op, fingers crossed. Breaking on \n allows caller to count lines reliably.
2025-09-08 11:54:32 +02:00
yaz0r
f77f68a5ed CI: Windows: update to 1.4.326 + pull Vulkan from KhronosGroup's Vulkan-Headers and Vulkan-Loader. (#8925, #8778) 2025-09-08 11:42:28 +02:00
fgungor
bed08daede Backends: SDLGPU3: fixed double assignment. (#8924) 2025-09-08 11:32:38 +02:00
fdsa
09ebcf1779 Docs: fixed mismatched parentheses & other small changes. (#8922) 2025-09-08 11:30:14 +02:00
ocornut
02af06ea5f Backends: Vulkan: rewrite pColorAttachmentFormats deep-copy to avoid issues when calling multiple times. (#8282, #8110) 2025-09-04 18:14:28 +02:00
ocornut
026d47cd35 Backends: Vulkan: store pColorAttachmentFormats deep-copy into an ImVector. (#8282, #8110) 2025-09-04 18:05:58 +02:00
ocornut
c63714822f Backends: Vulkan: reorder InitInfo fields. 2025-09-04 18:05:15 +02:00
ocornut
26aa81a8b1 Backends: Vulkan: misc amends (makes ImGui_ImplVulkan_MainPipelineCreateInfo::PipelineRenderingCreateInfo consistent with InitInfo). (#8110, #8111, #8053) 2025-09-04 18:05:15 +02:00
ocornut
1ecc34a0b1 Backends: Vulkan: misc amends (e.g. changelog, coding style). (8110, 8111, 8053)
# Conflicts:
#	backends/imgui_impl_vulkan.cpp
2025-09-04 18:04:20 +02:00
ocornut
ee03cef14f Backends: Vulkan: revert using a struct for ImGui_ImplVulkan_CreatePipeline() for now. (#8110, #8111, #8053) 2025-09-04 18:00:05 +02:00
Ronan Cailleau
e51d93e2f5 Backends: Vulkan: added ImGui_ImplVulkan_CreateMainPipeline(). (#8110, #8111, #8053)
- Added ImGui_ImplVulkan_CreateMainPipeline(...) to explicitly re-create the main window pipeline (when some of its properties are changed).
- Does not implicitly use ImGui_ImplVulkan_InitInfo::PipelineRenderingCreateInfo, but a function parameter.
- The main window pipeline is created only if possible during ImGui_ImplVulkan_Init(...) (if a render pass or rendering info are given), else it should be created with ImGui_ImplVulkan_ReCreateMainPipeline(...)
- ImGui_ImplVulkan_CreatePipeline now takes a struct rather than (too) many parameters (and returns the created pipeline).
2025-09-04 18:00:05 +02:00
ocornut
7d33524042 InputText: fixed an issue where using Escape with ImGuiInputTextFlags_EscapeClearsAll. (#8915, #8273)
Regression test: "widgets_inputtext_temp_buffer_2"
2025-09-04 13:16:05 +02:00
ocornut
605a751571 InputText, InputInt, InputFloat: fixed an issue where using Escape to revert would not write back the reverted value. (#8915, #8273)
Revealed by 00f12b9a0
Regression test: "widgets_inputtext_temp_buffer_2"
2025-09-04 13:16:04 +02:00
ocornut
b7cb3d93a4 Comments about using MSVC SAL for printf annotation. (#8871) 2025-09-03 19:39:55 +02:00
ocornut
20160ff1d5 Fonts: fixed merging a font and specifying a font target in DstFont that's not the last added font (regression in 1.92). (#8912) 2025-09-03 19:36:02 +02:00
ocornut
3766d40394 Nav: fixed Ctrl+Tab window appearing as empty when the sole active and focused window has the ImGuiWindowFlags_NoNavFocus flag. (#8914) 2025-09-03 17:50:10 +02:00
Ян Ли
0dd3c845eb Docs: add missing anchor in FAQ.md (#8913) 2025-09-03 09:17:23 +02:00
ocornut
8dc457fda2 Internals: added indent, shallow tweaks + unused context pointer to InputTextCalcTextLenAndLineCount() to reduce noise in wip patch.
Visualize this commit with white-space changes disabled.
2025-09-02 15:39:22 +02:00