Kirix Support Forums

Request for change

Please post all general questions, comments, bug reports, and any other wxAUI feedback here.

Request for change

Postby Antoine on Wed Nov 15, 2006 5:56 pm

Hi Ben,

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
Antoine
Registered User
 
Posts: 7
Joined: Mon Nov 06, 2006 6:16 pm
Location: Paris - France

Return to wxAUI Questions, Thoughts & Feedback