當前位置: 首頁>>代碼示例>>C++>>正文


C++ DestroyChildren函數代碼示例

本文整理匯總了C++中DestroyChildren函數的典型用法代碼示例。如果您正苦於以下問題:C++ DestroyChildren函數的具體用法?C++ DestroyChildren怎麽用?C++ DestroyChildren使用的例子?那麽, 這裏精選的函數代碼示例或許可以為您提供幫助。


在下文中一共展示了DestroyChildren函數的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C++代碼示例。

示例1: DestroyChildren

void wxTopLevelWindowMotif::PreDestroy()
{
#ifdef __VMS
#pragma message disable codcauunr
#endif
   if ( (GetWindowStyleFlag() & wxDIALOG_MODAL) != wxDIALOG_MODAL )
        wxModelessWindows.DeleteObject(this);
#ifdef __VMS
#pragma message enable codcauunr
#endif

    m_icons.m_icons.Empty();

    DestroyChildren();

    // MessageDialog and FileDialog do not have a client widget
    if( GetClientWidget() )
    {
        XtRemoveEventHandler( (Widget)GetClientWidget(),
                              ButtonPressMask | ButtonReleaseMask |
                              PointerMotionMask | KeyPressMask,
                              False,
                              wxTLWEventHandler,
                              (XtPointer)this );
    }
}
開發者ID:BackupTheBerlios,項目名稱:wxbeos-svn,代碼行數:26,代碼來源:toplevel.cpp

示例2: DestroyChildren

wxMDIParentFrame::~wxMDIParentFrame()
{
    DestroyChildren();

    // already deleted by DestroyChildren()
    m_clientWindow = NULL ;
}
開發者ID:beanhome,項目名稱:dev,代碼行數:7,代碼來源:mdi.cpp

示例3: SendDestroyEvent

// Destructor
wxWindowMGL::~wxWindowMGL()
{
    SendDestroyEvent();

    if ( gs_mouseCapture == this )
        ReleaseMouse();

    if (gs_activeFrame == this)
    {
        gs_activeFrame = NULL;
        // activate next frame in Z-order:
        if ( m_wnd->prev )
        {
            wxWindowMGL *win = (wxWindowMGL*)m_wnd->prev->userData;
            win->SetFocus();
        }
        else if ( m_wnd->next )
        {
            wxWindowMGL *win = (wxWindowMGL*)m_wnd->next->userData;
            win->SetFocus();
        }
    }

    if ( gs_focusedWindow == this )
        KillFocus();

    if ( gs_windowUnderMouse == this )
        gs_windowUnderMouse = NULL;

    DestroyChildren();

    if ( m_wnd )
        MGL_wmDestroyWindow(m_wnd);
}
開發者ID:esrrhs,項目名稱:fuck-music-player,代碼行數:35,代碼來源:window.cpp

示例4: SendDestroyEvent

wxWindowQt::~wxWindowQt()
{
    SendDestroyEvent();

    if ( s_capturedWindow == this )
        s_capturedWindow = NULL;

    DestroyChildren(); // This also destroys scrollbars

    delete m_qtPicture;
    delete m_qtPainter;

#if wxUSE_ACCEL
    m_qtShortcutHandler->deleteLater();
#endif

    // Delete only if the qt widget was created or assigned to this base class
    if (m_qtWindow)
    {
        wxLogDebug(wxT("wxWindow::~wxWindow %s m_qtWindow=%p"),
                   (const char*)GetName(), m_qtWindow);
        // Avoid sending further signals (i.e. if deleting the current page)
        m_qtWindow->blockSignals(true);
        // Reset the pointer to avoid handling pending event and signals
        QtStoreWindowPointer( GetHandle(), NULL );
        // Delete QWidget when control return to event loop (safer)
        m_qtWindow->deleteLater();
        m_qtWindow = NULL;
    }
    else
    {
        wxLogDebug(wxT("wxWindow::~wxWindow %s m_qtWindow is NULL"),
                   (const char*)GetName());
    }
}
開發者ID:vdm113,項目名稱:wxWidgets-ICC-patch,代碼行數:35,代碼來源:window.cpp

示例5: DestroyChildren

wxMDIParentFrame::~wxMDIParentFrame()
{
    // see comment in ~wxMDIChildFrame
#if wxUSE_TOOLBAR
    m_frameToolBar = NULL;
#endif
#if wxUSE_STATUSBAR
    m_frameStatusBar = NULL;
#endif // wxUSE_STATUSBAR

    DestroyChildren();

    if (m_windowMenu)
    {
        delete m_windowMenu;
        m_windowMenu = (wxMenu*) NULL;
    }

    // the MDI frame menubar is not automatically deleted by Windows unlike for
    // the normal frames
    if ( m_hMenu )
    {
        ::DestroyMenu((HMENU)m_hMenu);
        m_hMenu = (WXHMENU)NULL;
    }

    if ( m_clientWindow )
    {
        if ( m_clientWindow->MSWGetOldWndProc() )
            m_clientWindow->UnsubclassWin();

        m_clientWindow->SetHWND(0);
        delete m_clientWindow;
    }
}
開發者ID:HackLinux,項目名稱:chandler-1,代碼行數:35,代碼來源:mdi.cpp

示例6: SendDestroyEvent

// Destructor
wxWindowBeOS::~wxWindowBeOS()
{
    SendDestroyEvent();
    m_isBeingDeleted = TRUE;
    DestroyChildren();
    m_eventHandler = NULL;
}
開發者ID:BackupTheBerlios,項目名稱:wxbeos-svn,代碼行數:8,代碼來源:window.cpp

示例7: Refresh

void wxGxDiscConnections::Refresh(void)
{
    if(DestroyChildren())
        LoadConnectionsStorage();
    else
        wxGxXMLConnectionStorage::Refresh();
}
開發者ID:sergiosvieira,項目名稱:wxgis,代碼行數:7,代碼來源:gxdiscconnections.cpp

示例8: SendDestroyEvent

// Destructor
wxWindowX11::~wxWindowX11()
{
    SendDestroyEvent();

    if (g_captureWindow == this)
        g_captureWindow = NULL;

    m_isBeingDeleted = TRUE;

    DestroyChildren();

    if (m_clientWindow != m_mainWindow)
    {
        // Destroy the cleint window
        Window xwindow = (Window) m_clientWindow;
        wxDeleteClientWindowFromTable( xwindow );
        XDestroyWindow( wxGlobalDisplay(), xwindow );
        m_clientWindow = NULL;
    }

    // Destroy the window
    Window xwindow = (Window) m_mainWindow;
    wxDeleteWindowFromTable( xwindow );
    XDestroyWindow( wxGlobalDisplay(), xwindow );
    m_mainWindow = NULL;
}
開發者ID:gitrider,項目名稱:wxsj2,代碼行數:27,代碼來源:window.cpp

示例9: DestroyChildren

wxMDIClientWindow::~wxMDIClientWindow()
{
    // By the time this destructor is called, the child frames will have been
    // deleted and removed from the notebook/client window.
    DestroyChildren();

    m_mainWidget = (WXWidget) 0;
}
開發者ID:BackupTheBerlios,項目名稱:wxbeos-svn,代碼行數:8,代碼來源:mdi.cpp

示例10: GetOccupants

	void QuadTreeNode::Merge()
	{
		if(m_hasChildren)
		{
			// Place all occupants at lower levels into this node
			GetOccupants(m_pOccupants);

			DestroyChildren();
		}
	}
開發者ID:TehPwns,項目名稱:LTBL,代碼行數:10,代碼來源:QuadTreeNode.cpp

示例11: DestroyChildren

void wxGxDiscConnection::Refresh(void)
{
#ifdef __WXGTK__
    m_pWatcher->RemoveAll();
#endif
	DestroyChildren();
    m_bIsChildrenLoaded = false;
	LoadChildren();
    wxGIS_GXCATALOG_EVENT(ObjectRefreshed);
}
開發者ID:Mileslee,項目名稱:wxgis,代碼行數:10,代碼來源:gxdiscconnection.cpp

示例12: DestroyChildren

	void ImageBrowser::SetImages(const std::vector<std::string> &images)
	{
		DestroyChildren();
		selectionImages.clear();

		for (int i = 0; i < images.size(); i++)
		{
			NewSelectionImage(images[i]);
		}
	}
開發者ID:SystexPro,項目名稱:Monocle-Engine,代碼行數:10,代碼來源:ImageBrowser.cpp

示例13: DestroyChildren

void wxDllWidget::UnloadWidget()
{
    if ( m_widget )
    {
        DestroyChildren();
        m_widget = NULL;
        delete m_lib;
        m_lib = NULL;
    }
}
開發者ID:2015E8007361074,項目名稱:wxPython,代碼行數:10,代碼來源:dllwidget.cpp

示例14: RemoveChild

wxMDIParentFrame::~wxMDIParentFrame()
{
    // Make sure we delete the client window last of all
    RemoveChild(m_clientWindow);

    DestroyChildren();

    delete m_clientWindow;
    m_clientWindow = NULL;
}
開發者ID:BackupTheBerlios,項目名稱:wxbeos-svn,代碼行數:10,代碼來源:mdi.cpp

示例15: SetSizer

void ToolBar::ReCreateButtons()
{
   // SetSizer(NULL) detaches mHSizer and deletes it.
   // Do not use Detach() here, as that attempts to detach mHSizer from itself!
   SetSizer( NULL );

   // Get rid of any children we may have
   DestroyChildren();

   // Create the main sizer
   wxBoxSizer *ms = new wxBoxSizer( wxHORIZONTAL );

   // Create the grabber and add it to the main sizer
   mGrabber = new Grabber( this, mType );
   ms->Add( mGrabber, 0, wxEXPAND | wxALIGN_LEFT | wxALIGN_TOP | wxRIGHT, 1 );

   // Use a box sizer for laying out controls
   mHSizer = new wxBoxSizer( wxHORIZONTAL );
   ms->Add( mHSizer, 1, wxEXPAND );

   // (Re)Establish dock state
   SetDocked( GetDock(), false );

   // Go add all the rest of the gadgets
   Populate();

   // Add some space for the resize border
   if( IsResizable() )
   {
      mSpacer = ms->Add( RWIDTH, 1 );
   }

   // Set the sizer
   SetSizerAndFit( ms );

   // Recalculate the height to be a multiple of toolbarSingle
   const int tbs = toolbarSingle + toolbarGap;
   wxSize sz = GetSize();
   sz.y = ( ( ( sz.y + tbs ) / tbs ) * tbs ) - 1;

   // Set the true AND minimum sizes and do final layout
   if(IsResizable())
   {
      sz.SetWidth(GetMinToolbarWidth());
      SetMinSize(sz);
      sz.SetWidth(GetInitialWidth());
      SetSize(sz);
   }
   else
   {
      SetInitialSize(sz);
   }
   Layout();
}
開發者ID:JordanGraves,項目名稱:TabMagic,代碼行數:54,代碼來源:ToolBar.cpp


注:本文中的DestroyChildren函數示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。