コード例 #1
0
ファイル: wxutils.cpp プロジェクト: macduff/passwordsafe
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
ファイル: wxgui.cpp プロジェクト: tchv71/StartPP
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;
            }
        }
    }
}