Skip to content

Switch to faster ImGuiColorTextEdit fork, required upgrade to ImGui 1.92.8 / C++17#157

Draft
timlehr wants to merge 2 commits into
OpenTimelineIO:mainfrom
timlehr:tlehr/switchTextFork
Draft

Switch to faster ImGuiColorTextEdit fork, required upgrade to ImGui 1.92.8 / C++17#157
timlehr wants to merge 2 commits into
OpenTimelineIO:mainfrom
timlehr:tlehr/switchTextFork

Conversation

@timlehr
Copy link
Copy Markdown
Collaborator

@timlehr timlehr commented May 15, 2026

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=false to 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.

@timlehr timlehr requested a review from jminor May 15, 2026 21:20
@timlehr timlehr force-pushed the tlehr/switchTextFork branch from ea80d0d to 1ef54aa Compare May 15, 2026 21:28
timlehr added 2 commits May 15, 2026 14:32
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>
@timlehr timlehr force-pushed the tlehr/switchTextFork branch from 1ef54aa to cd1b672 Compare May 15, 2026 21:32
@timlehr timlehr added the devdays26 ASWF Dev Days 2026 label May 15, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

devdays26 ASWF Dev Days 2026

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Switch to new fork of ImGuiColorTextEdit

1 participant