Switch to faster ImGuiColorTextEdit fork, required upgrade to ImGui 1.92.8 / C++17#157
Draft
timlehr wants to merge 2 commits into
Draft
Switch to faster ImGuiColorTextEdit fork, required upgrade to ImGui 1.92.8 / C++17#157timlehr wants to merge 2 commits into
timlehr wants to merge 2 commits into
Conversation
ea80d0d to
1ef54aa
Compare
Important: This commit cannot build standalone. It requires the TextEditor fork switch in the next commit due to API incompatibilities between ImGui v1.92.8 and the currently used ImGuiColorTextEdit fork by Josh Minor. The old fork uses ImGui::GetKeyIndex() which was removed in v1.91.0. These two commits are separated for review purposes (dependency upgrade vs. fork switch), but must be merged together. Updated ImGui and ImPlot libraries to latest versions to support the newer ImGuiColorTextEdit fork. This required an upgrade to C++17 for the Imgui target too. Note: Added ConfigDebugHighlightIdConflicts=false to disable ID conflict warnings introduced in ImGui v1.91.2. These are pre-existing issues with the UI from before the upgrade, not caused by the update itself. We should address the root causes in a separate MR. Changes: - ImGui: v2023 → v1.92.8-docking (b61e563, May 2026) - ImPlot: Feb 2023 → v1.0 (524f9fc) - C++ standard: 14 → 17 (required for new library versions) API changes required for ImGui v1.92.8: - SetItemAllowOverlap() → SetNextItemAllowOverlap() (moved before widget) - ImGuiSelectableFlags_AllowItemOverlap → ImGuiSelectableFlags_AllowOverlap API changes required for ImPlot v1.0: - Removed ImPlotFlags_NoChild (no longer exists) - SetNextLineStyle() → ImPlotSpec struct - DragPoint() color parameter updated Disclosure: I used Claude Sonnet 4.5 to help with the porting process. Signed-off-by: Tim Lehr <tim.lehr@disneyanimation.com>
Addresses OpenTimelineIO#155. Switched from Joshs fork to goossens' fork of ImGuiColorTextEdit for better performance with larger OTIO files, which were not highlighted at a satisfactory speed before. One downside: this implementation drops the special highlighting of the "OTIO_SCHEMA" string found in the original code. The old fork used regex patterns to highlight the string. The new fork requires a custom tokenizer wrapper to achieve this, which I figured is too much overhead for minimal benefit. Added TODO comment documenting the decision and implementation approach for future reference. This commit completes the dependency upgrade started in the previous commit. The two commits are separated for review purposes (dependency upgrade vs. fork switch), but the first commit requires this one to build successfully. Submodule changes: - URL: github.com/jminor/ImGuiColorTextEdit → github.com/goossens/ImGuiColorTextEdit - Commit: 7dec5d8 (Nov 2022) → a74fb09 (May 2026, master branch) API migrations in inspector.cpp: - OTIOLanguageDef() → OTIOLanguage() (LanguageDefinition → Language class) - SetReadOnly() → SetReadOnlyEnabled() - SetLanguageDefinition() → SetLanguage() - SetErrorMarkers() → ClearMarkers() + AddMarker() - Render(title, false, size) → Render(title, size) - IsTextChanged() → CanUndo() - Added palette initialization to fix static initialization order bug - Removed global otioLangDef variable Disclosure: I used Claude Sonnet 4.5 to help with the porting process. Signed-off-by: Tim Lehr <tim.lehr@disneyanimation.com>
1ef54aa to
cd1b672
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #155.
Summary
This PR switches from @jminor ImGuiColorTextEdit the to goossens fork. The result is drastically improved highlighting performance. You can see it in the example below where the new fork manages to highlight even very large files in real time.
One minor drawback: the implementation removes the special highlighting applied to
"OTIO_SCHEMA", since the architecture in the new fork would require us to add another tokenizer just to add highlighting to this one keyword (or fork the fork yet again). I personally deemed the cost-benefit not worth it until we add more special schema highlighting cases.Since the new fork requires a newer baseline for ImGui in order to work without extra modifications, I took the time to make the minimal changes necessary to upgrade Raven to use the latest ImGui, ImPlot and C++ 17 (required by the new fork). I initially wanted to make a separate PR for this, but I didn't want to fix incompatibilities in Joshs ImGuiColorTextEdit fork with the newer ImGui library, only to replace it right after. A nice side effect of the upgrade: I noticed that on my Mac with a Retina display, the app now renders significantly sharper with the latest ImGui version. Text is a lot crisper.
Known issues
The upgrade to a newer ImGui highlighted an issue with the current way the widgets are used. I added
ConfigDebugHighlightIdConflicts=falseto disable ID conflict warnings introduced with ImGui v1.91.2 onwards. I filed a separate issue to address these (#158).Before
raven_current.mov
After
raven_new.mov
Code Assist disclosure
I used Claude Sonnet 4.5 to help me with the upgrade process, therefore I will put this MR in Draft for now until we figured out our guidelines on AI assisted contributions.