Пример #1
0
void ShowWindowRecursively(wxWindowList& hiddenWindows)
{
  for(wxWindowList::iterator itr = hiddenWindows.begin(); itr != hiddenWindows.end(); ++itr) {
    wxWindow* win = (*itr);
    //Show is virtual, and dialog windows assume the window is just starting up when Show()
    //is called.  Make sure to call the base version
    win->wxWindow::Show(true);
    win->Raise();
    win->Update();
  }
  hiddenWindows.clear();
}
Пример #2
0
static bool findWindowRecursively( const wxWindowList& children, const wxWindow* wanted )
{
    for( wxWindowList::const_iterator it = children.begin();  it != children.end();  ++it )
    {
        const wxWindow* child = *it;

        if( wanted == child )
            return true;
        else
        {
            if( findWindowRecursively( child->GetChildren(), wanted ) )
                return true;
        }
    }

    return false;
}
Пример #3
0
void MDIWindowMenuEvtHandler::OnCloseAll(wxCommandEvent&)
{
    const wxWindowList list = m_target_wnd->GetChildren(); // make a copy of the window list

    for (wxWindowList::const_iterator i = list.begin();
         i != list.end();
         i++)
    {
        if (wxDynamicCast(*i, wxMDIChildFrame))
        {
            if (!(*i)->Close())
            {
                // Close was vetoed
                break;
            }
        }
    }
}