Closed MSallermann closed 2 years ago
Merging #598 (7a1d50e) into develop (945e3d5) will decrease coverage by
0.00%
. The diff coverage is0.00%
.
@@ Coverage Diff @@
## develop #598 +/- ##
===========================================
- Coverage 48.00% 47.99% -0.01%
===========================================
Files 72 72
Lines 11249 11251 +2
===========================================
Hits 5400 5400
- Misses 5849 5851 +2
In order to determine whether any windows are docked into the right-side dock-space, one could use the imgui-internal APIs:
for( const auto * w : spirit_widgets )
{
if( w->imgui_window_ptr )
{
if( w->imgui_window_ptr->DockNode )
{
ImGuiDockNode * node = w->imgui_window_ptr->DockNode;
ImGuiDockNode * parent = node->ParentNode;
while( parent )
{
node = parent;
parent = node->ParentNode;
}
if( node->ID == id_dockspace_right )
fmt::print( "{} is docked in the sidebar\n", w->title );
}
}
}
for which the WidgetBase
needs to store its window-pointer, imgui_window_ptr = ImGui::GetCurrentWindow();
.
I currently don't see any way to get the same information without using the internal APIs in both classes... 😕
For some reason, it also seems that the evaluation of node->ParentNode->ID
only works inside the MainWindow::draw
function. If placed into WidgetBase::show
, there does not seem to be a parent for windows docked into the sidebar.
Implemented a few of the feature-parity points from issue #600.
Uses the imgui docking branch to enhance the imgui version of spirit.