could you consider adding a callback in the wxAuiManager to signal the underlying window that a Pane has been (de)activated?
Something like:
- Code: Select all
class wxAuiManager {
...
virtual void OnPaneActivated (wxWindow*, bool activate) { }
void SetActivePane (wxWindow*);
};
This would be called from SetActivePane (that would become a method).
For instance (I'm just typing, I didn't check if it compiles, but the change is straitforward):
- Code: Select all
void wxAuiManager::SetActivePane(wxWindow* active_pane)
{
int i, pane_count;
for (i = 0, pane_count = m_panes.GetCount(); i < pane_count; ++i)
{
wxAuiPaneInfo& pane = m_panes.Item(i);
if (pane.window == active_pane) {
if (! (pane.state & wxAuiPaneInfo::optionActive)) {
pane.state |= wxAuiPaneInfo::optionActive;
OnPaneActivated (active_pane, true);
}
}
else if (pane.state & wxAuiPaneInfo::optionActive) {
pane.state &= ~wxAuiPaneInfo::optionActive;
OnPaneActivated (active_pane, false);
}
}
}
Unless ther is already another way to know when a Pane is activated?
Thanks.
Best regards,
Antoine