Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ocornut master (24/07) #4

Merged
merged 270 commits into from
Jul 24, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
270 commits
Select commit Hold shift + click to select a range
6f7b5d0
Version 1.90.8
ocornut Jun 6, 2024
7260bb5
Version 1.90.9 WIP
ocornut Jun 7, 2024
d46a0aa
Internals: renamed HoveredIdDisabled to HoveredIdIsDisabled for consi…
ocornut Jun 10, 2024
a47bfb1
Examples: GLFW+Vulkan: handle swap chain resize even without Vulkan r…
ocornut Jun 10, 2024
7538ca6
Examples: SDL+Vulkan: handle swap chain resize even without Vulkan re…
ocornut Jun 10, 2024
22d65c7
Removed old nested structure: renaming ImGuiStorage::ImGuiStoragePair…
ocornut Jun 10, 2024
8caf7af
Internals: made ImLowerBound() accessible in internals + take a span.…
ocornut Jun 10, 2024
b902fa4
IO: do not disable io.ConfigWindowsResizeFromEdges when ImGuiBackendF…
ocornut Jun 11, 2024
1b9593e
Style: (Breaking) renamed ImGuiCol_TabActive -> ImGuiCol_TabSelected,…
ocornut Jun 18, 2024
21bda2e
TabBar, Style: added ImGuiTabBarFlags_DrawSelectedOverline and ImGuiC…
ocornut Jun 18, 2024
32a037c
Drag and Drop: BeginDragDropSource() with ImGuiDragDropFlags_SourceEx…
ocornut Jun 19, 2024
8c517fe
Drag and Drop: Fixes an issue when elapsing payload would be based on…
ocornut Jun 19, 2024
37c243b
Internals: added ImGuiContext::ContextName optionally used by debug l…
ocornut Jun 20, 2024
413c056
Drag and Drop: comments, debug log entries.
ocornut Jun 20, 2024
5070945
Drag and Drop: BeginDragDropSource() with ImGuiDragDropFlags_SourceEx…
ocornut Jun 20, 2024
8c318dc
Drag and Drop: (Breaking) renamed ImGuiDragDropFlags_SourceAutoExpire…
ocornut Jun 20, 2024
77d9f80
Drag and Drop: Added ImGuiDragDropFlags_PayloadNoCrossContext and ImG…
ocornut Jun 20, 2024
7e7c97a
Ignore .ini file with other suffixes.
ocornut Jun 20, 2024
21581cf
Fixed build warning.
ocornut Jun 21, 2024
8067d05
IO: added ClearInputMouse(). made ClearInputKeys() not clear mouse da…
ocornut Jun 21, 2024
e397107
IO: added ImGuiConfigFlags_NoKeyboard for consistency and convenience…
ocornut Jun 21, 2024
7f20a4b
Nav: CTRL+Tab overlay display context name if any.
ocornut Jun 21, 2024
2c8cc58
Internals: storing HoveredWindowBeforeClear for use by multi-context …
ocornut Jun 21, 2024
755bf2b
(Breaking) Move ImGuiWindowFlags_NavFlattened to ImGuiChildFlags_NavF…
cfillion Jun 12, 2024
48e7e7b
Backends: SDL3: Follow SDL3 removal of keysym field in SDL_KeyboardEv…
evilnose Jun 23, 2024
aab2713
Demo: Style Editor: clarify how _CalcCircleAutoSegmentCount() doesn't…
ocornut Jun 24, 2024
a18fb40
Backends: Vulkan: Remove Volk/ from volk.h #include directives (#7722…
martin-ejdestig Jun 22, 2024
eb1cc4b
Metrics/Debugger: Browsing a Storage perform hover lookup on identifier.
ocornut Jun 26, 2024
32f9dfc
Viewports: Backported 'void* ImGuiViewport::PlatformHandle' from dock…
ocornut Jun 26, 2024
7c24769
Backends: SDL3: Update for SDL_StartTextInput()/SDL_StopTextInput() A…
ocornut Jun 26, 2024
22b36be
Examples: undo adding SDL3 example to Visual Studio sln.
ocornut Jun 26, 2024
0c2650e
Backends: OSX: build fix. Amend 32f9dfc
ocornut Jun 26, 2024
dbffb70
ImGuiStorage: tweak impl for BuildSortByKey().
ocornut Jun 26, 2024
fbb903e
Inputs: fixed using Shortcut() or SetNextItemShortcut() within a disa…
ocornut Jun 27, 2024
953d40c
Tables: moved TableGetHoveredColumn() to public API. (#7715, #3740)
ocornut Jun 27, 2024
77d582f
Windows: BeginChild(): fixed a glitch when during a resize of a child…
ocornut Jun 27, 2024
0582f76
Nav: store NavJustMovedToIsTabbing + shuffle a few nav related fields.
ocornut Jun 27, 2024
404af57
Backends: OpenGL2, OpenGL3: ImGui_ImplOpenGL3_NewFrame() recreates fo…
ocornut Jun 28, 2024
c7df9c7
Backends: Win32: Fixed warning with old MinGW/GCC versions.
ocornut Jun 28, 2024
0403096
Drags: added ImGuisliderFlags_WrapAround flag for DragInt(), DragFloa…
ocornut Jun 28, 2024
372eebb
Fix typo, rename ImGuisliderFlags_WrapAround flag to ImGuiSliderFlags…
kevincoghlan Jun 28, 2024
c47928f
Checkbox: minor tidying up to simplify work on multi-select branch.
ocornut Jun 28, 2024
f2c07ed
Backends: Allegro5: Correctly handle unstable bit in version checks (…
connorjclark Jun 30, 2024
751bbf3
Backends: SDLRenderer3: Update for SDL_RenderGeometryRaw() API changes.
ocornut Jul 1, 2024
ccf3ee6
Backends: SDL3: update for SDL_SetTextInputRect() -> SDL_SetTextInput…
maxortner01 Jun 30, 2024
6721691
Examples: SDL3: Remove use of SDL_HINT_IME_NATIVE_UI.
ocornut Jul 1, 2024
dd5c30d
Disabled: Reworked 1.90.8 behavior of Begin() not inheriting current …
ocornut Jul 1, 2024
50a0f18
imgui_freetype: fixed divide by zero while handling FT_PIXEL_MODE_BGR…
ocornut Jul 1, 2024
c554c40
IO: do not claim io.WantCaptureMouse=true on the mouse release frame …
ocornut Jul 1, 2024
cb16be3
Version 1.90.9
ocornut Jul 1, 2024
84cc72f
Version 1.91.0 WIP
ocornut Jul 1, 2024
12f9251
Backends: SDL3: Update for API changes: SDLK_x renames and SDLK_KP_x …
ocornut Jul 2, 2024
a489585
Backends: SDL3: Updated comments (IME seems fixed in SDL3). Added SDL…
ocornut Jul 2, 2024
a627943
Debug Tools: Added IMGUI_DEBUG_LOG(), ImGui::DebugLog() in public API…
ocornut Jul 2, 2024
7e0b3b9
Debug Log: Added "Configure Outputs.." button. (#5855)
ocornut Jul 2, 2024
ae708e3
Backends: SDL3: add default case to fix warnings. (#7763)
ocornut Jul 2, 2024
0250dc9
Demo: changed style editor inline block to its own window.
ocornut Jul 2, 2024
8f36798
IO: added io.PlatformOpenInShellFn handler to open a link/folder/file…
ocornut Jul 2, 2024
fb799bb
(Breaking) IO, IME: renamed platform IME hook io.SetPlatformImeDataFn…
ocornut Jul 2, 2024
ddd4c9d
Commented out obsolete ImGuiModFlags and ImGuiModFlags_XXX values (re…
ocornut Jul 2, 2024
43925b9
Build fix for non Windows platforms.
ocornut Jul 2, 2024
dadf9cd
IO: disable default io.PlatformOpenInShellFn() implementation on iPho…
ocornut Jul 2, 2024
0f63d3e
Internals: added FontScale storage.
ocornut Jul 2, 2024
5496050
Added TextLink(), TextLinkOpenURL() hyperlink widgets. (#7660)
ocornut Jul 2, 2024
05a4f28
Internals: added FontScale storage (amend 0f63d3e).
ocornut Jul 2, 2024
380b355
Backends: GLFW,SDL2: Added ioPlatformOpenInShellFn handler for web/Em…
ocornut Jul 2, 2024
0ebf49b
IO: amend PlatformOpenInShellFn specs to return a bool. (#7660)
ocornut Jul 2, 2024
0a73c6e
Misc tweaks, comments.
ocornut Jul 3, 2024
2d0baaa
TreeNode: rename/rework ImGuiNavTreeNodeData system to be usable by m…
ocornut Jul 3, 2024
1ec1f7a
Fixed Unix version of PlatformOpenInShellFn_DefaultImpl. (#7772, #7660)
cfillion Jul 6, 2024
6b6026b
DemosFix typo in help text in demo Tables/Borders (#7780)
hevrard Jul 8, 2024
9504068
Backends: Win32: fixed ImGuiMod_Super being mapped to VK_APPS instead…
Aemony Jul 4, 2024
6816789
Backends: GLFW+Emscripten: (Breaking) Renamed ImGui_ImplGlfw_InstallE…
ypujante Jul 8, 2024
2937339
Backends: GLFW+Emscripten: Added support for GLFW3 contrib port. (#7647)
ypujante Jul 8, 2024
a8e96ae
Backends: GLFW+Emscripten: Fixed build (#7647)
ocornut Jul 8, 2024
c3c90b4
Examples: SDL3+OpenGL: Update for API changes: SDL_GL_DeleteContext()…
ocornut Jul 11, 2024
126569a
Fix definition check (#7793)
cheyao Jul 14, 2024
df3a743
Backends: SDL3: Update for API changes: SDL_GetProperty() change to S…
wermipls Jul 15, 2024
9c2f600
Backends: SDL3: fixed typo leading to PlatformHandleRaw not being set…
ocornut Jul 15, 2024
ac7d6fb
Internals: Added TreeNodeIsOpen() to facilitate discoverability. (#75…
ocornut Jul 9, 2024
bc9e5b6
Added ImGuiDataType_Bool for convenience.
ocornut Jul 15, 2024
46691d1
Demo: Reworked "Property Editor" demo in a manner that more ressemble…
ocornut Jul 15, 2024
7e0800e
Added PushItemFlag(), PopItemFlag(), ImGuiItemFlags.
ocornut Jul 15, 2024
b4ca869
(Breaking) Obsoleted PushButtonRepeat()/PopButtonRepeat() in favor of…
ocornut Jul 15, 2024
0de88a9
Added ImGuiItemFlags_AutoClosePopups as a replacement for internal's …
ocornut Jul 15, 2024
3de7513
(Breaking) Renamed ImGuiSelectableFlags_DontClosePopups to ImGuiSelec…
ocornut Jul 15, 2024
0e4dcfa
Obsoleted PushTabStop()/PopTabStop() in favor of using new PushItemFl…
ocornut Jul 15, 2024
9c1f922
Fixed pvs-studio warning.
ocornut Jul 16, 2024
4247f19
Demo: Property Editor: rearrange code + replace use of bool to proper…
ocornut Jul 17, 2024
67e9aa4
Demo: Property Editor: add basic filter.
ocornut Jul 17, 2024
669021b
Style: close button and collapse/window-menu button hover highlight m…
ocornut Jul 17, 2024
74a1854
Nav, Demo: comments.
ocornut Jul 17, 2024
8bab3ea
Clipper: added SeekCursorForItem() function, for use when using ImGui…
ocornut Jul 17, 2024
7c6d4ff
TreeNode: Internals: facilitate dissociating item ID from storage ID …
ocornut Jul 17, 2024
070c046
Internals: rename recently added TreeNodeIsOpen() -> TreeNodeGetOpen(…
ocornut Jul 17, 2024
c2d21ab
Backends: SDL3: Update for API changes: SDL_GetClipboardText() string…
ocornut Jul 18, 2024
554db6b
MultiSelect: WIP range-select (#1861) (rebased six millions times)
ocornut Feb 1, 2019
8947c35
MultiSelect: Removed SelectableSpacing as I'm not sure it is of use f…
ocornut Dec 9, 2020
57da880
MultiSelect: Added IMGUI_HAS_MULTI_SELECT define. Fixed right-click t…
ocornut Apr 15, 2019
17c4c21
MultiSelect: Demo sharing selection helper code. Fixed static analyze…
ocornut Dec 21, 2019
4afbfd5
MultiSelect: Renamed SetNextItemMultiSelectData() to SetNextItemSelec…
ocornut Jan 14, 2020
9c7183d
MultiSelect: Transition to use FocusScope bits merged in master.
ocornut Jan 13, 2020
7abda17
MultiSelect: Fix for TreeNode following merge of 011d4755. Demo: basi…
ocornut Mar 11, 2020
9aeebd2
MultiSelect: Fixed CTRL+A not testing focus scope id. Fixed CTRL+A no…
ocornut Mar 20, 2020
0479b18
MultiSelect: Comments. Tweak demo.
ocornut Apr 1, 2020
3ba3f0d
MultiSelect: Fix Selectable() ambiguous return value, clarify need to…
ocornut Apr 1, 2020
00c4b8f
MultiSelect: Fix testing key mods from after the nav request (remove …
ocornut Apr 2, 2020
b9721c1
MultiSelect: Temporary fix/work-around for child/popup to not inherit…
ocornut Aug 20, 2020
ad5d3c9
MultiSelect: Fixed issue with Ctrl+click on TreeNode + amend demo to …
ocornut Jun 17, 2022
919cac1
MultiSelect: Demo: Add a simpler version.
ocornut Apr 11, 2023
19086c1
MultiSelect: Added ImGuiMultiSelectFlags_ClearOnEscape (unsure of bes…
ocornut Apr 11, 2023
b91ae12
MultiSelect: Demo: Added pointer indirection and indent level.
ocornut Apr 11, 2023
35bbadc
MultiSelect: Added ImGuiMultiSelectFlags_ClearOnClickWindowVoid. + De…
ocornut Apr 11, 2023
a05700e
MultiSelect: Enter doesn't alter selection (unlike Space).
ocornut Apr 12, 2023
78cb166
MultiSelect: Shallow tweaks/refactors.
ocornut Apr 12, 2023
815c61b
MultiSelect: Fixed needing to set RangeSrcPassedBy when not using cli…
ocornut Apr 12, 2023
d2f208a
MultiSelect: made SetNextItemSelectionData() optional to allow disjoi…
ocornut May 20, 2023
85954c8
MultiSelect: Enter can alter selection if current item is not selected.
ocornut May 20, 2023
5d71314
MultiSelect: removed DragDropActive/preserve_existing_selection logic…
ocornut May 22, 2023
11bcae1
MultiSelect: refactor before introducing persistant state pool and to…
ocornut May 23, 2023
35b5ebc
MultiSelect: (Breaking) Rename ImGuiMultiSelectData to ImGuiMultiSele…
ocornut May 24, 2023
c61ada2
MultiSelect: Demo tweak. Removed multi-scope from Advanced (too messy…
ocornut May 24, 2023
a39f9e7
MultiSelect: Internals rename of IO fields to avoid ambiguity with io…
ocornut Jun 1, 2023
a83326b
MultiSelect: (Breaking) Renamed 'RangeSrc -> 'RangeSrcItem', "RangeDs…
ocornut Jun 2, 2023
ccf43d6
MultiSelect: (Breaking) Renamed 'RangeValue' -> 'RangeSelected' + ame…
ocornut Jun 2, 2023
6ef70a9
MultiSelect: Remove ImGuiMultiSelectFlags_NoUnselect because I curren…
ocornut Jun 8, 2023
1ea9ca7
MultiSelect: Remove the need for using IsItemToggledSelection(). Upda…
ocornut Jun 29, 2023
961b81c
MultiSelect: Tidying up/simpllifying MultiSelectItemFooter().
ocornut Jun 30, 2023
387fc13
MultiSelect: Clarify and better enforce lifetime of BeginMultiSelect(…
ocornut Jun 7, 2023
564dde0
MultiSelect: Demo: first-draft of user-side deletion idioms.
ocornut Jun 2, 2023
9223ffc
MultiSelect: (Breaking) BeginMultiSelect() doesn't need two last para…
ocornut Jun 2, 2023
df1eeb9
MultiSelect: Maintain NavIdSelected for user. Simplify deletion demo.
ocornut Jun 2, 2023
c003570
MultiSelect: Further simplication of user code to support Deletion.
ocornut Jun 2, 2023
e3616e1
MultiSelect: Demo: Delete items from menu.
ocornut Jun 7, 2023
ab9326f
MultiSelect: Fixed right-click handling in MultiSelectItemFooter() wh…
ocornut Jun 7, 2023
0cf3763
MultiSelect: Cleanup unused comments/code.
ocornut Jun 8, 2023
847b1dd
MultiSelect: (Breaking) Fix + Rename ImGuiMultiSelectFlags_NoMultiSel…
ocornut Aug 4, 2023
140a2f0
MultiSelect: Comments, tweaks.
ocornut Aug 7, 2023
e82b49d
MultiSelect: (Breaking) Use ImGuiSelectionUserData (= ImS64) instead …
ocornut Aug 7, 2023
c9eb371
MultiSelect: move HasSelectionData to ImGuiItemFlags to facilitate co…
ocornut Aug 7, 2023
6821401
MultiSelect: Tweak debug log to print decimal+hex values for item data.
ocornut Aug 8, 2023
af83a3e
MultiSelect: clear selection when leaving a scope with a nav directio…
ocornut Aug 15, 2023
ff95fdb
MultiSelect: (Breaking) RequestSetRange's parameter are RangeFirstIte…
ocornut Aug 21, 2023
c375380
MultiSelect: Demo: rework ExampleSelection names to map better to typ…
ocornut Aug 22, 2023
6ddc5f3
MultiSelect: Demo: added simpler demo using Clipper. Clarify RangeSrc…
ocornut Aug 23, 2023
8fe6b31
MultiSelect: (Breaking) Removed RangeSrcPassedBy in favor of favoring…
ocornut Aug 23, 2023
8c1f659
MultiSelect: Demo: rework ExampleSelection with an ExampleSelectionAd…
ocornut Aug 23, 2023
530155d
MultiSelect: Demo: Remove UserDataToIndex from ExampleSelectionAdapter.
ocornut Sep 1, 2023
fa516c3
MultiSelect: Demo: Make ExampleSelection use ImGuiID. More self-expla…
ocornut Aug 28, 2023
e1d2109
MultiSelect: Demo: Deletion: Rework ApplyDeletionPreLoop to use adapt…
ocornut Aug 23, 2023
ba698df
MultiSelect: Demo: Deletion: Various renames to clarify. Use adapter …
ocornut Aug 28, 2023
dce02f5
Demo: Dual List Box: Added a dual list box (6648)
ocornut Aug 23, 2023
a6f43df
MultiSelect: ImGuiMultiSelectIO's field are not used during loop anym…
ocornut Aug 29, 2023
9da4efe
MultiSelect: moved RequestClear output so it'll match request list ve…
ocornut Aug 29, 2023
5628dda
MultiSelect: move shared logic to MultiSelectItemHeader().
ocornut Aug 31, 2023
82de6c4
MultiSelect: Added ImGuiMultiSelectFlags_SelectOnClickRelease to allo…
ocornut Aug 31, 2023
d18e57e
Demo: Assets Browser: Added assets browser demo.
ocornut Aug 31, 2023
88df590
Demo: Assets Browser: store items, sorting, type overlay.
ocornut Sep 1, 2023
2765fdb
MultiSelect: removed seemingly unnecessary block in BeginMultiSelect().
ocornut Sep 20, 2023
c3998b7
MultiSelect: clarified purpose and use of IsItemToggledSelection(). A…
ocornut Sep 21, 2023
a6adfb2
MultiSelect: added missing call on Shutdown(). Better reuse selection…
ocornut Sep 22, 2023
6feff6f
MultiSelect: (Breaking) io contains a ImVector<ImGuiSelectionRequest>…
ocornut Sep 22, 2023
c527cba
MultiSelect: we don't need to ever write to EndIO.RangeSrcItem as thi…
ocornut Sep 22, 2023
5941edd
MultiSelect: added support for recovery in ErrorCheckEndWindowRecover().
ocornut Sep 22, 2023
33fc61a
MultiSelect: use a single ImGuiMultiSelectIO buffer.
ocornut Sep 22, 2023
3d41994
MultiSelect: simplify clearing ImGuiMultiSelectTempData.
ocornut Sep 27, 2023
bf01795
Demo: Assets Browser: add hit spacing, requierd for box-select patterns.
ocornut Sep 25, 2023
90305c5
MultiSelect: (breaking) renamed ImGuiMultiSelectFlags_ClearOnClickWin…
ocornut Sep 25, 2023
f904a66
MultiSelect: Box-Select: added support for ImGuiMultiSelectFlags_BoxS…
ocornut Aug 29, 2023
aa4d64b
MultiSelect: Box-Select: added scroll support.
ocornut Sep 26, 2023
b747d6f
MultiSelect: Demo: rework and move selection adapter inside ExampleSe…
ocornut Oct 6, 2023
0af6fbb
MultiSelect: added support for nested/stacked BeginMultiSelect().
ocornut Oct 26, 2023
e028234
MultiSelect: remove ImGuiSelectionRequest/ImGuiMultiSelectIO details …
ocornut Dec 1, 2023
0f633c1
MultiSelect: move demo's ExampleSelection to main api as a convenient…
ocornut Dec 1, 2023
51fe0bf
MultiSelect: reworked comments in imgui.h now that we have our own se…
ocornut Dec 5, 2023
750e239
MultiSelect: Demo: Assets Browser: added deletion support. Store ID i…
ocornut Dec 6, 2023
7546a2d
MultiSelect: Demo: Assets Browser: track scrolling target so we can r…
ocornut Dec 12, 2023
1ac469b
MultiSelect: Box-Select: Fixed holes when using with clipper (in 1D l…
ocornut Dec 20, 2023
1539176
MultiSelect: Box-Select: Added ImGuiMultiSelectFlags_BoxSelect2d supp…
ocornut Dec 20, 2023
75bac1a
MultiSelect: Box-Select: Refactor into its own structure, designed fo…
ocornut Dec 20, 2023
5d9de14
MultiSelect: Box-Select: Refactor: Renames.
ocornut Dec 20, 2023
907268a
MultiSelect: Box-Select: Fixed scrolling on high framerates.
ocornut Dec 20, 2023
f3d77d8
MultiSelect: Box-Select: Further refactor to extra mode code away fro…
ocornut Dec 20, 2023
6c4bf8e
MultiSelect: Fixed ImGuiSelectionBasicStorage::ApplyRequests() incorr…
ocornut Dec 21, 2023
d439f59
MultiSelect: Comments + Assets Browser : Tweak colors.
ocornut Dec 21, 2023
8312c75
MultiSelect: Added ImGuiMultiSelectFlags_NoRangeSelect. Fixed ImGuiMu…
ocornut Jan 4, 2024
3141d87
MultiSelect: Box-Select: Fixed CTRL+drag from void clearing items.
ocornut Jan 4, 2024
9337151
MultiSelect: Box-Select: Fixed initial drag from not claiming hovered…
ocornut Jan 4, 2024
b13a78e
MultiSelect: Fixed ImGuiMultiSelectFlags_SelectOnClickRelease over tr…
ocornut Jan 12, 2024
f36a03c
MultiSelect: (Breaking) merge ImGuiSelectionRequestType_Clear and ImG…
ocornut Mar 6, 2024
dbc67bb
MultiSelect: Simplified ImGuiSelectionBasicStorage by using a single …
ocornut Mar 6, 2024
2111e35
MultiSelect: Comments + tweaked location for widgets to test ImGuiIte…
ocornut Mar 6, 2024
a639346
MultiSelect: Demo: make various child windows resizable, with synched…
ocornut Mar 7, 2024
e7a734f
MultiSelect: added ImGuiMultiSelectFlags_NoAutoSelect, ImGuiMultiSele…
ocornut Mar 7, 2024
0be238e
MultiSelect: Box-Select: fix preventing focus. amend determination of…
ocornut Apr 18, 2024
955210a
MultiSelect: Demo: use Shortcut().
ocornut May 23, 2024
9435a31
RangeSelect/MultiSelect: (Breaking) Added current_selection_size to B…
ocornut Dec 19, 2023
65ebc05
MultiSelect: Box-Select: minor refactor, tidying up.
ocornut May 29, 2024
dc0a168
MultiSelect: Box-Select: when dragging from void, first hit item sets…
ocornut May 29, 2024
81548cb
MultiSelect: added GetMultiSelectState() + store LastSelectionSize as…
ocornut May 29, 2024
1113f13
MultiSelect: Box-Select: fixed "when dragging from void" implementati…
ocornut May 31, 2024
2f56df4
MultiSelect: (breaking) renamed ImGuiSelectionBasicStorage::AdapterDa…
ocornut May 30, 2024
7bbbbea
MultiSelect: Box-Select: fixes for checkboxes support. Comments.
ocornut May 31, 2024
f6b5caf
MultiSelect: (breaking) renamed ImGuiMultiSelectFlags_BoxSelect -> Im…
ocornut May 31, 2024
443b034
MultiSelect: mark parent child window as navigable into, with highlig…
ocornut Jun 4, 2024
ab995d3
MultiSelect: (breaking) Added 'items_count' parameter to BeginMultiSe…
ocornut Jun 5, 2024
c94cf6f
MultiSelect: added ImGuiSelectionBasicStorage::GetStorageIdFromIndex(…
ocornut Jun 5, 2024
f9caf44
MultiSelect: fixed ImGuiSelectionBasicStorage::Swap() helper.
ocornut Jun 5, 2024
db4898c
MultiSelect: added ImGuiSelectionExternalStorage helper. Simplify boo…
ocornut Jun 5, 2024
c3d7aa2
MultiSelect: comments, header tweaks., simplication (some of it on wi…
ocornut Jun 6, 2024
e1fd250
MultiSelect: ImGuiSelectionBasicStorage: added GetNextSelectedItem() …
ocornut Jun 11, 2024
e61612a
MultiSelect: ImGuiSelectionBasicStorage: rework to accept massive sel…
ocornut Jun 11, 2024
2af3b2a
MultiSelect: ImGuiSelectionBasicStorage: simplify by removing compact…
ocornut Jun 11, 2024
c07864f
MultiSelect: ImGuiSelectionBasicStorage: move function bodies to cpp …
ocornut Jun 11, 2024
f472f17
Demo: Assets Browser: added a way to disable sorting and hide sorting…
ocornut Jun 11, 2024
3ac367f
MultiSelect: ImGuiSelectionBasicStorage: (breaking) rework GetNextSel…
ocornut Jun 26, 2024
df66432
MultiSelect: provide RangeDirection to allow selection handler to han…
ocornut Jun 26, 2024
c523468
MultiSelect: ImGuiSelectionBasicStorage: added PreserveOrder, maintai…
ocornut Jun 26, 2024
a8a1f29
MultiSelect: (breaking) renamed ImGuiMultiSelectFlags_BoxSelect -> Im…
ocornut Jun 26, 2024
529c73b
MultiSelect: Shift+Tab doesn't enable Shift select on landing item.
ocornut Jun 27, 2024
3f34c83
MultiSelect: added ImGuiMultiSelectFlags_NoAutoClearOnReselect + twea…
ocornut Jun 28, 2024
d411c90
MultiSelect: minor tidying up.
ocornut Jun 28, 2024
7d4de84
MultiSelect: added courtesy ImGuiMultiSelectFlags_NavWrapX flag so we…
ocornut Jun 28, 2024
2697cfe
MultiSelect: Box-Select: uses SetActiveIdUsingAllKeyboardKeys() to av…
ocornut Jun 28, 2024
1b63522
MultiSelect: Box-Select: handle Esc to disable box-select.
ocornut Jun 28, 2024
7814518
MultiSelect: ImGuiSelectionBasicStorage: optimized for smaller insert…
ocornut Jul 1, 2024
2688562
MultiSelect: Better document how TreeNode() is not trivially usable yet.
ocornut Jul 18, 2024
02c31a8
MultiSelect: added Changelog for the feature. Removed IMGUI_HAS_MULTI…
ocornut Jul 1, 2024
d7e605d
Merge branch 'features/range_select'
ocornut Jul 18, 2024
2546d0a
Demo: moved ExampleTreeNode, ExampleMemberInfo above in the demo file…
ocornut Jul 19, 2024
57eea67
Demo: moved some fields inside a struct.
ocornut Jul 19, 2024
168ef39
Demo: moved menu bar code to its own function.
ocornut Jul 19, 2024
b6e313b
MultiSelect: using ImGuiMultiSelectFlags_NoRangeSelect ensure never h…
ocornut Jul 19, 2024
f9cda1f
Inputs: added SetItemKeyOwner(ImGuiKey key) in public API. (#456, #26…
ocornut Jul 19, 2024
eb72b5a
Backends: SDL3: Update for API changes: SDL_GetGamepads() memory owne…
ocornut Jul 22, 2024
da36336
TabBar, Style: added style option for the size of the Tab-Bar Overlin…
DctrNoob Jul 22, 2024
fd99494
Added a comment hinting at how to set IMGUI_API for shared librairies…
ocornut Jul 22, 2024
c3dca77
Demo: rework Property Editor.
ocornut Jul 22, 2024
97ff9bd
Nav: fixed c licking window decorations (e.g. resize borders) from lo…
ocornut Jul 22, 2024
605c8d7
Demo: Property Editor: using ImGuiChildFlags_NavFlattened now that a …
ocornut Jul 22, 2024
fe09ebb
Backends: OpenGL3: Fixed unsupported option warning with apple clang …
cheyao Jul 22, 2024
4d8c56c
Internals, TreeNode: indent all render block into its own scope (aim …
ocornut Jul 24, 2024
1230b44
Internals, TreeNode, Selectable: tweak span_all_columns paths for cla…
ocornut Jul 24, 2024
97c6f40
CollapsingHeader: left-side outer extend matches right-side one (move…
ocornut Jul 24, 2024
b67b375
Debug Log: fixed incorrect checkbox layout when partially clipped., d…
ocornut Jul 24, 2024
e3da939
Groups, Tables: fixed EndGroup() failing to correctly capture current…
ocornut Jul 24, 2024
79b77d9
MultiSelect: sequential SetRange merging not generally handled by box…
ocornut Jul 24, 2024
a285835
MultiSelect: add internal MultiSelectAddSetAll() helper.
ocornut Jul 24, 2024
237165a
MultiSelect: fixed an issue caused by previous commit.
ocornut Jul 24, 2024
1192b6f
Merge branch 'master' of https://github.com/ocornut/imgui into ocornu…
Ciachociech Jul 24, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@

## Dear ImGui artifacts
imgui.ini
imgui*.ini

## General build artifacts
*.o
Expand Down
4 changes: 2 additions & 2 deletions backends/imgui_impl_allegro5.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,8 @@
#ifdef _WIN32
#include <allegro5/allegro_windows.h>
#endif
#define ALLEGRO_HAS_CLIPBOARD (ALLEGRO_VERSION_INT >= ((5 << 24) | (1 << 16) | (12 << 8))) // Clipboard only supported from Allegro 5.1.12
#define ALLEGRO_HAS_DRAW_INDEXED_PRIM (ALLEGRO_VERSION_INT >= ((5 << 24) | (2 << 16) | ( 5 << 8))) // DX9 implementation of al_draw_indexed_prim() got fixed in Allegro 5.2.5
#define ALLEGRO_HAS_CLIPBOARD ((ALLEGRO_VERSION_INT & ~ALLEGRO_UNSTABLE_BIT) >= ((5 << 24) | (1 << 16) | (12 << 8))) // Clipboard only supported from Allegro 5.1.12
#define ALLEGRO_HAS_DRAW_INDEXED_PRIM ((ALLEGRO_VERSION_INT & ~ALLEGRO_UNSTABLE_BIT) >= ((5 << 24) | (2 << 16) | ( 5 << 8))) // DX9 implementation of al_draw_indexed_prim() got fixed in Allegro 5.2.5

// Visual Studio warnings
#ifdef _MSC_VER
Expand Down
77 changes: 52 additions & 25 deletions backends/imgui_impl_glfw.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,9 @@

// CHANGELOG
// (minor and older changes stripped away, please see git history for details)
// 2024-07-08: *BREAKING* Renamed ImGui_ImplGlfw_InstallEmscriptenCanvasResizeCallback to ImGui_ImplGlfw_InstallEmscriptenCallbacks(), added GLFWWindow* parameter.
// 2024-07-08: Emscripten: Added support for GLFW3 contrib port (GLFW 3.4.0 features + bug fixes): to enable, replace -sUSE_GLFW=3 with --use-port=contrib.glfw3 (requires emscripten 3.1.59+) (https://github.com/pongasoft/emscripten-glfw)
// 2024-07-02: Emscripten: Added io.PlatformOpenInShellFn() handler for Emscripten versions.
// 2023-12-19: Emscripten: Added ImGui_ImplGlfw_InstallEmscriptenCanvasResizeCallback() to register canvas selector and auto-resize GLFW window.
// 2023-10-05: Inputs: Added support for extra ImGuiKey values: F13 to F24 function keys.
// 2023-07-18: Inputs: Revert ignoring mouse data on GLFW_CURSOR_DISABLED as it can be used differently. User may set ImGuiConfigFLags_NoMouse if desired. (#5625, #6609)
Expand Down Expand Up @@ -100,6 +103,11 @@
#ifdef __EMSCRIPTEN__
#include <emscripten.h>
#include <emscripten/html5.h>
#ifdef EMSCRIPTEN_USE_PORT_CONTRIB_GLFW3
#include <GLFW/emscripten_glfw3.h>
#else
#define EMSCRIPTEN_USE_EMBEDDED_GLFW3
#endif
#endif

// We gather version tests as define in order to easily see which features are version-dependent.
Expand Down Expand Up @@ -131,7 +139,7 @@ struct ImGui_ImplGlfw_Data
ImVec2 LastValidMousePos;
bool InstalledCallbacks;
bool CallbacksChainForAllWindows;
#ifdef __EMSCRIPTEN__
#ifdef EMSCRIPTEN_USE_EMBEDDED_GLFW3
const char* CanvasSelector;
#endif

Expand All @@ -145,7 +153,7 @@ struct ImGui_ImplGlfw_Data
GLFWcharfun PrevUserCallbackChar;
GLFWmonitorfun PrevUserCallbackMonitor;
#ifdef _WIN32
WNDPROC GlfwWndProc;
WNDPROC PrevWndProc;
#endif

ImGui_ImplGlfw_Data() { memset((void*)this, 0, sizeof(*this)); }
Expand Down Expand Up @@ -335,7 +343,7 @@ void ImGui_ImplGlfw_ScrollCallback(GLFWwindow* window, double xoffset, double yo
if (bd->PrevUserCallbackScroll != nullptr && ImGui_ImplGlfw_ShouldChainCallback(window))
bd->PrevUserCallbackScroll(window, xoffset, yoffset);

#ifdef __EMSCRIPTEN__
#ifdef EMSCRIPTEN_USE_EMBEDDED_GLFW3
// Ignore GLFW events: will be processed in ImGui_ImplEmscripten_WheelCallback().
return;
#endif
Expand All @@ -346,7 +354,7 @@ void ImGui_ImplGlfw_ScrollCallback(GLFWwindow* window, double xoffset, double yo

static int ImGui_ImplGlfw_TranslateUntranslatedKey(int key, int scancode)
{
#if GLFW_HAS_GETKEYNAME && !defined(__EMSCRIPTEN__)
#if GLFW_HAS_GETKEYNAME && !defined(EMSCRIPTEN_USE_EMBEDDED_GLFW3)
// GLFW 3.1+ attempts to "untranslate" keys, which goes the opposite of what every other framework does, making using lettered shortcuts difficult.
// (It had reasons to do so: namely GLFW is/was more likely to be used for WASD-type game controls rather than lettered shortcuts, but IHMO the 3.1 change could have been done differently)
// See https://github.com/glfw/glfw/issues/1502 for details.
Expand All @@ -357,7 +365,7 @@ static int ImGui_ImplGlfw_TranslateUntranslatedKey(int key, int scancode)
GLFWerrorfun prev_error_callback = glfwSetErrorCallback(nullptr);
const char* key_name = glfwGetKeyName(key, scancode);
glfwSetErrorCallback(prev_error_callback);
#if GLFW_HAS_GETERROR && !defined(__EMSCRIPTEN__) // Eat errors (see #5908)
#if GLFW_HAS_GETERROR && !defined(EMSCRIPTEN_USE_EMBEDDED_GLFW3) // Eat errors (see #5908)
(void)glfwGetError(nullptr);
#endif
if (key_name && key_name[0] != 0 && key_name[1] == 0)
Expand Down Expand Up @@ -454,7 +462,7 @@ void ImGui_ImplGlfw_MonitorCallback(GLFWmonitor*, int)
// Unused in 'master' branch but 'docking' branch will use this, so we declare it ahead of it so if you have to install callbacks you can install this one too.
}

#ifdef __EMSCRIPTEN__
#ifdef EMSCRIPTEN_USE_EMBEDDED_GLFW3
static EM_BOOL ImGui_ImplEmscripten_WheelCallback(int, const EmscriptenWheelEvent* ev, void*)
{
// Mimic Emscripten_HandleWheel() in SDL.
Expand Down Expand Up @@ -497,7 +505,7 @@ static LRESULT CALLBACK ImGui_ImplGlfw_WndProc(HWND hWnd, UINT msg, WPARAM wPara
ImGui::GetIO().AddMouseSourceEvent(GetMouseSourceFromMessageExtraInfo());
break;
}
return ::CallWindowProcW(bd->GlfwWndProc, hWnd, msg, wParam, lParam);
return ::CallWindowProcW(bd->PrevWndProc, hWnd, msg, wParam, lParam);
}
#endif

Expand Down Expand Up @@ -553,6 +561,10 @@ void ImGui_ImplGlfw_SetCallbacksChainForAllWindows(bool chain_for_all_windows)
bd->CallbacksChainForAllWindows = chain_for_all_windows;
}

#ifdef __EMSCRIPTEN__
EM_JS(void, ImGui_ImplGlfw_EmscriptenOpenURL, (char const* url), { url = url ? UTF8ToString(url) : null; if (url) window.open(url, '_blank'); });
#endif

static bool ImGui_ImplGlfw_Init(GLFWwindow* window, bool install_callbacks, GlfwClientApi client_api)
{
ImGuiIO& io = ImGui::GetIO();
Expand All @@ -573,6 +585,9 @@ static bool ImGui_ImplGlfw_Init(GLFWwindow* window, bool install_callbacks, Glfw
io.SetClipboardTextFn = ImGui_ImplGlfw_SetClipboardText;
io.GetClipboardTextFn = ImGui_ImplGlfw_GetClipboardText;
io.ClipboardUserData = bd->Window;
#ifdef __EMSCRIPTEN__
io.PlatformOpenInShellFn = [](ImGuiContext*, const char* url) { ImGui_ImplGlfw_EmscriptenOpenURL(url); return true; };
#endif

// Create mouse cursors
// (By design, on X11 cursors are user configurable and some cursors may be missing. When a cursor doesn't exist,
Expand Down Expand Up @@ -603,15 +618,10 @@ static bool ImGui_ImplGlfw_Init(GLFWwindow* window, bool install_callbacks, Glfw
// Chain GLFW callbacks: our callbacks will call the user's previously installed callbacks, if any.
if (install_callbacks)
ImGui_ImplGlfw_InstallCallbacks(window);
// Register Emscripten Wheel callback to workaround issue in Emscripten GLFW Emulation (#6096)
// We intentionally do not check 'if (install_callbacks)' here, as some users may set it to false and call GLFW callback themselves.
// FIXME: May break chaining in case user registered their own Emscripten callback?
#ifdef __EMSCRIPTEN__
emscripten_set_wheel_callback(EMSCRIPTEN_EVENT_TARGET_DOCUMENT, nullptr, false, ImGui_ImplEmscripten_WheelCallback);
#endif

// Set platform dependent data in viewport
ImGuiViewport* main_viewport = ImGui::GetMainViewport();
main_viewport->PlatformHandle = (void*)bd->Window;
#ifdef _WIN32
main_viewport->PlatformHandleRaw = glfwGetWin32Window(bd->Window);
#elif defined(__APPLE__)
Expand All @@ -622,8 +632,8 @@ static bool ImGui_ImplGlfw_Init(GLFWwindow* window, bool install_callbacks, Glfw

// Windows: register a WndProc hook so we can intercept some messages.
#ifdef _WIN32
bd->GlfwWndProc = (WNDPROC)::GetWindowLongPtrW((HWND)main_viewport->PlatformHandleRaw, GWLP_WNDPROC);
IM_ASSERT(bd->GlfwWndProc != nullptr);
bd->PrevWndProc = (WNDPROC)::GetWindowLongPtrW((HWND)main_viewport->PlatformHandleRaw, GWLP_WNDPROC);
IM_ASSERT(bd->PrevWndProc != nullptr);
::SetWindowLongPtrW((HWND)main_viewport->PlatformHandleRaw, GWLP_WNDPROC, (LONG_PTR)ImGui_ImplGlfw_WndProc);
#endif

Expand Down Expand Up @@ -654,18 +664,19 @@ void ImGui_ImplGlfw_Shutdown()

if (bd->InstalledCallbacks)
ImGui_ImplGlfw_RestoreCallbacks(bd->Window);
#ifdef __EMSCRIPTEN__
emscripten_set_wheel_callback(EMSCRIPTEN_EVENT_TARGET_DOCUMENT, nullptr, false, nullptr);
#ifdef EMSCRIPTEN_USE_EMBEDDED_GLFW3
if (bd->CanvasSelector)
emscripten_set_wheel_callback(bd->CanvasSelector, nullptr, false, nullptr);
#endif

for (ImGuiMouseCursor cursor_n = 0; cursor_n < ImGuiMouseCursor_COUNT; cursor_n++)
glfwDestroyCursor(bd->MouseCursors[cursor_n]);

// Windows: register a WndProc hook so we can intercept some messages.
// Windows: restore our WndProc hook
#ifdef _WIN32
ImGuiViewport* main_viewport = ImGui::GetMainViewport();
::SetWindowLongPtrW((HWND)main_viewport->PlatformHandleRaw, GWLP_WNDPROC, (LONG_PTR)bd->GlfwWndProc);
bd->GlfwWndProc = nullptr;
::SetWindowLongPtrW((HWND)main_viewport->PlatformHandleRaw, GWLP_WNDPROC, (LONG_PTR)bd->PrevWndProc);
bd->PrevWndProc = nullptr;
#endif

io.BackendPlatformName = nullptr;
Expand All @@ -682,7 +693,7 @@ static void ImGui_ImplGlfw_UpdateMouseData()
// (those braces are here to reduce diff with multi-viewports support in 'docking' branch)
{
GLFWwindow* window = bd->Window;
#ifdef __EMSCRIPTEN__
#ifdef EMSCRIPTEN_USE_EMBEDDED_GLFW3
const bool is_window_focused = true;
#else
const bool is_window_focused = glfwGetWindowAttrib(window, GLFW_FOCUSED) != 0;
Expand Down Expand Up @@ -740,7 +751,7 @@ static void ImGui_ImplGlfw_UpdateGamepads()
return;

io.BackendFlags &= ~ImGuiBackendFlags_HasGamepad;
#if GLFW_HAS_GAMEPAD_API && !defined(__EMSCRIPTEN__)
#if GLFW_HAS_GAMEPAD_API && !defined(EMSCRIPTEN_USE_EMBEDDED_GLFW3)
GLFWgamepadstate gamepad;
if (!glfwGetGamepadState(GLFW_JOYSTICK_1, &gamepad))
return;
Expand Down Expand Up @@ -814,7 +825,7 @@ void ImGui_ImplGlfw_NewFrame()
ImGui_ImplGlfw_UpdateGamepads();
}

#ifdef __EMSCRIPTEN__
#ifdef EMSCRIPTEN_USE_EMBEDDED_GLFW3
static EM_BOOL ImGui_ImplGlfw_OnCanvasSizeChange(int event_type, const EmscriptenUiEvent* event, void* user_data)
{
ImGui_ImplGlfw_Data* bd = (ImGui_ImplGlfw_Data*)user_data;
Expand All @@ -835,7 +846,7 @@ static EM_BOOL ImGui_ImplEmscripten_FullscreenChangeCallback(int event_type, con

// 'canvas_selector' is a CSS selector. The event listener is applied to the first element that matches the query.
// STRING MUST PERSIST FOR THE APPLICATION DURATION. PLEASE USE A STRING LITERAL OR ENSURE POINTER WILL STAY VALID.
void ImGui_ImplGlfw_InstallEmscriptenCanvasResizeCallback(const char* canvas_selector)
void ImGui_ImplGlfw_InstallEmscriptenCallbacks(GLFWwindow*, const char* canvas_selector)
{
IM_ASSERT(canvas_selector != nullptr);
ImGui_ImplGlfw_Data* bd = ImGui_ImplGlfw_GetBackendData();
Expand All @@ -847,8 +858,24 @@ void ImGui_ImplGlfw_InstallEmscriptenCanvasResizeCallback(const char* canvas_sel

// Change the size of the GLFW window according to the size of the canvas
ImGui_ImplGlfw_OnCanvasSizeChange(EMSCRIPTEN_EVENT_RESIZE, {}, bd);

// Register Emscripten Wheel callback to workaround issue in Emscripten GLFW Emulation (#6096)
// We intentionally do not check 'if (install_callbacks)' here, as some users may set it to false and call GLFW callback themselves.
// FIXME: May break chaining in case user registered their own Emscripten callback?
emscripten_set_wheel_callback(bd->CanvasSelector, nullptr, false, ImGui_ImplEmscripten_WheelCallback);
}
#endif
#elif defined(EMSCRIPTEN_USE_PORT_CONTRIB_GLFW3)
// When using --use-port=contrib.glfw3 for the GLFW implementation, you can override the behavior of this call
// by invoking emscripten_glfw_make_canvas_resizable afterward.
// See https://github.com/pongasoft/emscripten-glfw/blob/master/docs/Usage.md#how-to-make-the-canvas-resizable-by-the-user for an explanation
void ImGui_ImplGlfw_InstallEmscriptenCallbacks(GLFWwindow* window, const char* canvas_selector)
{
GLFWwindow* w = (GLFWwindow*)(EM_ASM_INT({ return Module.glfwGetWindow(UTF8ToString($0)); }, canvas_selector));
IM_ASSERT(window == w); // Sanity check
IM_UNUSED(w);
emscripten_glfw_make_canvas_resizable(window, "window", nullptr);
}
#endif // #ifdef EMSCRIPTEN_USE_PORT_CONTRIB_GLFW3

//-----------------------------------------------------------------------------

Expand Down
5 changes: 3 additions & 2 deletions backends/imgui_impl_glfw.h
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,10 @@ IMGUI_IMPL_API bool ImGui_ImplGlfw_InitForOther(GLFWwindow* window, bool ins
IMGUI_IMPL_API void ImGui_ImplGlfw_Shutdown();
IMGUI_IMPL_API void ImGui_ImplGlfw_NewFrame();

// Emscripten related initialization phase methods
// Emscripten related initialization phase methods (call after ImGui_ImplGlfw_InitForOpenGL)
#ifdef __EMSCRIPTEN__
IMGUI_IMPL_API void ImGui_ImplGlfw_InstallEmscriptenCanvasResizeCallback(const char* canvas_selector);
IMGUI_IMPL_API void ImGui_ImplGlfw_InstallEmscriptenCallbacks(GLFWwindow* window, const char* canvas_selector);
//static inline void ImGui_ImplGlfw_InstallEmscriptenCanvasResizeCallback(const char* canvas_selector) { ImGui_ImplGlfw_InstallEmscriptenCallbacks(nullptr, canvas_selector); } } // Renamed in 1.91.0
#endif

// GLFW callbacks install
Expand Down
3 changes: 3 additions & 0 deletions backends/imgui_impl_opengl2.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@

// CHANGELOG
// (minor and older changes stripped away, please see git history for details)
// 2024-06-28: OpenGL: ImGui_ImplOpenGL2_NewFrame() recreates font texture if it has been destroyed by ImGui_ImplOpenGL2_DestroyFontsTexture(). (#7748)
// 2022-10-11: Using 'nullptr' instead of 'NULL' as per our switch to C++11.
// 2021-12-08: OpenGL: Fixed mishandling of the ImDrawCmd::IdxOffset field! This is an old bug but it never had an effect until some internal rendering changes in 1.86.
// 2021-06-29: Reorganized backend to pull data from a single structure to facilitate usage with multiple-contexts (all g_XXXX access changed to bd->XXXX).
Expand Down Expand Up @@ -113,6 +114,8 @@ void ImGui_ImplOpenGL2_NewFrame()

if (!bd->FontTexture)
ImGui_ImplOpenGL2_CreateDeviceObjects();
if (!bd->FontTexture)
ImGui_ImplOpenGL2_CreateFontsTexture();
}

static void ImGui_ImplOpenGL2_SetupRenderState(ImDrawData* draw_data, int fb_width, int fb_height)
Expand Down
4 changes: 4 additions & 0 deletions backends/imgui_impl_opengl3.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@

// CHANGELOG
// (minor and older changes stripped away, please see git history for details)
// 2024-06-28: OpenGL: ImGui_ImplOpenGL3_NewFrame() recreates font texture if it has been destroyed by ImGui_ImplOpenGL3_DestroyFontsTexture(). (#7748)
// 2024-05-07: OpenGL: Update loader for Linux to support EGL/GLVND. (#7562)
// 2024-04-16: OpenGL: Detect ES3 contexts on desktop based on version string, to e.g. avoid calling glPolygonMode() on them. (#7447)
// 2024-01-09: OpenGL: Update GL3W based imgui_impl_opengl3_loader.h to load "libGL.so" and variants, fixing regression on distros missing a symlink.
Expand Down Expand Up @@ -123,6 +124,7 @@
// Clang/GCC warnings with -Weverything
#if defined(__clang__)
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wunknown-warning-option" // warning: ignore unknown flags
#pragma clang diagnostic ignored "-Wold-style-cast" // warning: use of old-style cast
#pragma clang diagnostic ignored "-Wsign-conversion" // warning: implicit conversion changes signedness
#pragma clang diagnostic ignored "-Wunused-macros" // warning: macro is not used
Expand Down Expand Up @@ -402,6 +404,8 @@ void ImGui_ImplOpenGL3_NewFrame()

if (!bd->ShaderHandle)
ImGui_ImplOpenGL3_CreateDeviceObjects();
if (!bd->FontTexture)
ImGui_ImplOpenGL3_CreateFontsTexture();
}

static void ImGui_ImplOpenGL3_SetupRenderState(ImDrawData* draw_data, int fb_width, int fb_height, GLuint vertex_array_object)
Expand Down
9 changes: 7 additions & 2 deletions backends/imgui_impl_osx.mm
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@

// CHANGELOG
// (minor and older changes stripped away, please see git history for details)
// 2024-07-02: Update for io.SetPlatformImeDataFn() -> io.PlatformSetImeDataFn() renaming in main library.
// 2023-10-05: Inputs: Added support for extra ImGuiKey values: F13 to F20 function keys. Stopped mapping F13 into PrintScreen.
// 2023-04-09: Inputs: Added support for io.AddMouseSourceEvent() to discriminate ImGuiMouseSource_Mouse/ImGuiMouseSource_Pen.
// 2023-02-01: Fixed scroll wheel scaling for devices emitting events with hasPreciseScrollingDeltas==false (e.g. non-Apple mices).
Expand Down Expand Up @@ -80,6 +81,7 @@
KeyEventResponder* KeyEventResponder;
NSTextInputContext* InputContext;
id Monitor;
NSWindow* Window;

ImGui_ImplOSX_Data() { memset(this, 0, sizeof(*this)); }
};
Expand Down Expand Up @@ -133,7 +135,7 @@ - (void)setImePosX:(float)posX imePosY:(float)posY

- (void)updateImePosWithView:(NSView *)view
{
NSWindow *window = view.window;
NSWindow* window = view.window;
if (!window)
return;
NSRect contentRect = [window contentRectForFrameRect:window.frame];
Expand Down Expand Up @@ -402,6 +404,9 @@ bool ImGui_ImplOSX_Init(NSView* view)
//io.BackendFlags |= ImGuiBackendFlags_HasSetMousePos; // We can honor io.WantSetMousePos requests (optional, rarely used)

bd->Observer = [ImGuiObserver new];
bd->Window = view.window ?: NSApp.orderedWindows.firstObject;
ImGuiViewport* main_viewport = ImGui::GetMainViewport();
main_viewport->PlatformHandle = main_viewport->PlatformHandleRaw = (__bridge_retained void*)bd->Window;

// Load cursors. Some of them are undocumented.
bd->MouseCursorHidden = false;
Expand Down Expand Up @@ -460,7 +465,7 @@ bool ImGui_ImplOSX_Init(NSView* view)
[view addSubview:bd->KeyEventResponder];
ImGui_ImplOSX_AddTrackingArea(view);

io.SetPlatformImeDataFn = [](ImGuiViewport* viewport, ImGuiPlatformImeData* data) -> void
io.PlatformSetImeDataFn = [](ImGuiContext*, ImGuiViewport* viewport, ImGuiPlatformImeData* data) -> void
{
ImGui_ImplOSX_Data* bd = ImGui_ImplOSX_GetBackendData();
if (data->WantVisible)
Expand Down
Loading