Open pkulchenko opened 9 years ago
This might be a non dynamic notebook, as the old aui notebook didn't show the hint when splitting notebooks?
@tomkulaga, no, the current implementation of the notebook shows the position hint when splitting or repositioning tabs. It also shows the hint over the tab backgrounds when merging tabs, which the dynamic branch doesn't do.
It seems to be caused by the notebook's manager for which the hint flags are not defined in the wxAuiNotebook::Init
method.
This patch allows to see the hint but it breaks the hint positioning in the dynamic behavior. It needs more meditation...
@@ -91,6 +91,7 @@
m_mgr.SetManagedWindow(this);
m_mgr.SetDockSizeConstraint(1.0, 1.0); // no dock size constraint
SetWindowStyleFlag(style);
+ m_mgr.SetFlag(wxAUI_MGR_TRANSPARENT_HINT | wxAUI_MGR_HINT_FADE | wxAUI_MGR_NO_VENETIAN_BLINDS_FADE, true);
}
I've got this code running below and it DOES show hints when splitting notebooks. It hints if I split the notebook and want to dock it into itself or elsewhere.
I haven't looked deeply into the code, I'm experimenting with AUI for a project and this has been my scratchpad.
On the AuiDemo I don't see the hints, but for my code I do.
Above patch from @Kinaou works for me - though it seems 'SetWindowStyleFlag' is actually stripping these flags, so I wonder if its not something that should rather be fixed within 'SetWindowStyleFlag' - also we should maybe double check that 'SetWindowStyleFlag' doesn't strip anything else that should be set for notebooks.
Thoughts?
@mjmacleod, @Kinaou, the patch from @Kinaou works for me as well, as the hint is now shown, but it's shown not as I'd expect it to be (although the patch didn't purport to fix those aspects, they were just not visible previously):
Welcome to wxAUI
tab and try to join it back, the hint is only over that new container and not over the container it was separated from.I can open a ticket for the first two issues.
In wxAuiNotebook::SetWindowStyleFlag()
, le mask used by m_mgr.SetFlags()
is too restrictive. '0x3FFFFFF' seems to be the correct value to filter all the values of the enum wxAuiManagerOption
.
Furthermore, in the 'auidemo', the actions of the 'auimanager' of a pure 'auinotebook' seem to affect the main 'auimanager'. Yet, all the actions done on in a pure 'auinotebook' should be confined in it. Removing a tab from a pure 'auinotebook' to be put in a 'new aui' (logical 'auinotebook') environment is not possible (should it be?). It would be necessary either to confine the events propagation inside the pure 'auinotebook' or ensure in the management of the 'auimanager' that the actions made by the pure 'auinotebook' have no impact outside of it (especially the flag 'activepane' which is defined on several tabs outside the notebook and generate warnings).
Thia can be seen in Auidemo sample (Windows, commit a7976ec):
wxAuiNotebook
by going toView | Create wxAuiNotebook
.The correct behavior can be seen in the demo for other (non-notebook) tabs, so this appears to be
wxAuiNotebook
-specific issue.