-
-
Notifications
You must be signed in to change notification settings - Fork 10.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
…: ImGuiWindow, ImGuiInputTextCallbackData, ImGuiListClipper, ImGuiStackSizes This commit is a preparation toward adding ImGui apis with explicit context and making ImGui applications being able to use multiple context at the same time whatever their concurrency model. This commit modifies ImGuiInputTextCallback, ImGuiListClipper and ImGuiStackSize so those classes do not to depend on GImGui context anymore. About ImGuiInputTextCallback: - ImGuiInputTextCallback depends on ImGuiContext because it has a `InsertChars` method adding character to `g.InputTextState` - To make ImGuiInputTextCallback aware of which context to use, the appropriate context is given as argument of ImGuiInputTextCallback constructor. About ImGuiListClipper: - ImGuiListClipper apply to a context through its `Begin`, `End`, and `Step` method. - To make ImGuiListClipper aware of which context to use, the appropriate context is given as argument of ImGuiListClipper constructor. - Since the behavior is different than previously the class has been renamed ImGuiListClipperEx - In order to preserve backward compatibility, a subclass of ImGuiListClipperEx named ImGuiListClipper has been defined and forward the implicit context to ImGuiListClipperEx parent. About ImGuiTextFilter: - ImGuiTextFilter depends on the implicit context because the Draw(..) method call ImGui::InputText(...) - Instead from that commit the Draw(...) method takes an explicit context as first argument - Since the behavior is different than previously the class has been renamed ImGuiTextFilterEx - In order to preserve backward compatibility, a subclass of ImGuiTextFilterEx named ImGuiTextFilter has been defined. This subclass has a draw method override which and forward the implicit context to the parent class Draw(...) About ImGuiStackSizes: - ImGuiStackSizes was depending on ImGuiContext because of its `SetToCurrentState` and `CompareWithCurrentState` method - ImGuiStackSizes is an helper object use for comparing state of context. It does not necessarily need to compare the same context. For that reason, as opposed to previous classes it takes the context it wants to compare to as argument of its method. - For this occasion `SetToCurrentState` and `CompareWithCurrentState` have been renamed `SetToContextState` and `CompareWithContextState` to match the new method signature. ImGuiListClipper ImGuiInputTextCallbackData
- Loading branch information
1 parent
10ace22
commit c8ad25c
Showing
4 changed files
with
31 additions
and
23 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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