I'm trying to build a menu that the user can use to bring back dead AUI windows...windows that have been shut down. Got the menu figured out, but it would be nice if the check was accurate in that it's checked when the window is visible and not when it isn't.
The only way I can keep track of this is if I know when the window is closed.
Looked in the documentation on the wxAUI stuff (which is absolutely terrible, all kinds of missing classes and calls) and found nothing on how to do this. Looking in the header (framemanager.h) I found support for wxAuiManagerEvent. I tried connecting my managed window's event handler to the PANE_CLOSE event but I was never informed of pane closure. I did this through the EVT_AUI_PANE_CLOSE() macro.
So, since that magic didn't work, what is the black magic incantation that only those with the uber-gnostic knowledge to use this thing know which will allow me to be informed when panes are closed by the user outside my menu?
Thanks.
AUI pane closure - getting informed Topic is solved
-
- Ultimate wxWidgets Guru
- Posts: 536
- Joined: Fri Jan 07, 2005 3:44 pm
- Location: Finland
- Contact:
Try connecting through the frame manager:
HTH
Code: Select all
your_frame_mngr.Connect ( ... );
Visual C++ 9.0 / Windows XP Pro SP3 / wxWidgets 2.9.0 (SVN) | Colligere
You may also get wxAuiPaneInfo for required pane from your wxAuiManager and use IsShown() member:
Code: Select all
wxAuiPaneInfo& thePane = aui_mgr.GetPane(paneName);
if( thePane.IsOk() && thePane.IsShown() )
{ // hide?
}
else {// show it
}
For those searching for answers later, it's more than just calling connect:vdell wrote:Try connecting through the frame manager:
HTHCode: Select all
your_frame_mngr.Connect ( ... );
Code: Select all
aui_manager.Connect(wxEVT_AUI_PANE_CLOSE, wxAuiManagerEventHandler(application_frame::impl::on_aui_event), 0, this);