Discussion:
wxAuiManager: detecting dock / undock of panes?
Tobias Abt
2014-01-30 10:48:18 UTC
Permalink
Hi,


I need to detect if a pane is undocked or docked again.


Since the wxAuiManager has no events for it, I tried to derive my own class from the manager (as suggested in the Kirix forum). But the manager has only a few virtual functions and I only succeeded in making a "docked"-event (with ProcessDockResult).


I also tried to get the wxEVT_AUI_PANE_BUTTON event (simply changed one of the existing event macros in the sample to EVT_AUI_PANE_BUTTON), but this event never is received by my application.


Is there a (good) way to detect the docking and undocking of panes with the wxAuiManager?


Thanks and regards,

Tobi


---


wxWidgets: 3.0.0 rc2

Operating System: Windows 7
--
Please read http://www.wxwidgets.org/support/mlhowto.htm before posting.

To unsubscribe, send email to wx-users+***@googlegroups.com
or visit http://groups.google.com/group/wx-users
Eran Ifrah
2014-01-30 11:35:41 UTC
Permalink
Hi,

You can try and connect the event wxEVT_AUI_RENDER. In the handler check
for your pane:

void MyClass::OnRender(wxAuiManagerEvent& e) {
e.Skip();
wxAuiPaneInfo &pi = e.GetManager()->GetPane( "pane-name" );
if ( pi.IsOk() && pi.IsFloating() ) {
// do something
}
}

Eran
Post by Tobias Abt
Hi,
I need to detect if a pane is undocked or docked again.
Since the wxAuiManager has no events for it, I tried to derive my own
class from the manager (as suggested in the Kirix forum). But the manager
has only a few virtual functions and I only succeeded in making a
"docked"-event (with ProcessDockResult).
I also tried to get the wxEVT_AUI_PANE_BUTTON event (simply changed one of
the existing event macros in the sample to EVT_AUI_PANE_BUTTON), but this
event never is received by my application.
Is there a (good) way to detect the docking and undocking of panes with the wxAuiManager?
Thanks and regards,
Tobi
---
wxWidgets: 3.0.0 rc2
Operating System: Windows 7
--
Please read http://www.wxwidgets.org/support/mlhowto.htm before posting.
or visit http://groups.google.com/group/wx-users
--
Eran Ifrah
Author of codelite, a cross platform open source C/C++ IDE:
http://www.codelite.org
wxCrafter, a wxWidgets RAD: http://wxcrafter.codelite.org
--
Please read http://www.wxwidgets.org/support/mlhowto.htm before posting.

To unsubscribe, send email to wx-users+***@googlegroups.com
or visit http://groups.google.com/group/wx-users
Tobias Abt
2014-01-31 15:48:42 UTC
Permalink
Thanks, that did the trick (without the need to derive my own class). I only had to add a lock so my function is only called once :)


Regards,

Tobi


Von: wx-***@googlegroups.com [mailto:wx-***@googlegroups.com] Im Auftrag von Eran Ifrah
Gesendet: Donnerstag, 30. Januar 2014 12:36
An: wx-***@googlegroups.com
Betreff: Re: wxAuiManager: detecting dock / undock of panes?


Hi,


You can try and connect the event wxEVT_AUI_RENDER. In the handler check for your pane:


void MyClass::OnRender(wxAuiManagerEvent& e) {

e.Skip();
wxAuiPaneInfo &pi = e.GetManager()->GetPane( "pane-name" );

if ( pi.IsOk() && pi.IsFloating() ) {

// do something

}

}


Eran



On Thu, Jan 30, 2014 at 12:48 PM, Tobias Abt <***@vispiron.de <mailto:***@vispiron.de> > wrote:

Hi,


I need to detect if a pane is undocked or docked again.


Since the wxAuiManager has no events for it, I tried to derive my own class from the manager (as suggested in the Kirix forum). But the manager has only a few virtual functions and I only succeeded in making a "docked"-event (with ProcessDockResult).


I also tried to get the wxEVT_AUI_PANE_BUTTON event (simply changed one of the existing event macros in the sample to EVT_AUI_PANE_BUTTON), but this event never is received by my application.


Is there a (good) way to detect the docking and undocking of panes with the wxAuiManager?


Thanks and regards,

Tobi


---


wxWidgets: 3.0.0 rc2

Operating System: Windows 7
--
Please read http://www.wxwidgets.org/support/mlhowto.htm <http://www.wxwidgets.org/support/mlhowto.htm> before posting.

To unsubscribe, send email to wx-users+***@googlegroups.com <mailto:wx-users%***@googlegroups.com>
or visit http://groups.google.com/group/wx-users <http://groups.google.com/group/wx-users>
--
Eran Ifrah
Author of codelite, a cross platform open source C/C++ IDE: http://www.codelite.org <http://www.codelite.org>

wxCrafter, a wxWidgets RAD: http://wxcrafter.codelite.org <http://wxcrafter.codelite.org>
--
Please read http://www.wxwidgets.org/support/mlhowto.htm <http://www.wxwidgets.org/support/mlhowto.htm> before posting.

To unsubscribe, send email to wx-users+***@googlegroups.com <mailto:wx-users+***@googlegroups.com>
or visit http://groups.google.com/group/wx-users <http://groups.google.com/group/wx-users>
--
Please read http://www.wxwidgets.org/support/mlhowto.htm before posting.

To unsubscribe, send email to wx-users+***@googlegroups.com
or visit http://groups.google.com/group/wx-users
Loading...