本文整理匯總了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 );
}
}
示例2: DestroyChildren
wxMDIParentFrame::~wxMDIParentFrame()
{
DestroyChildren();
// already deleted by DestroyChildren()
m_clientWindow = NULL ;
}
示例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);
}
示例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());
}
}
示例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;
}
}
示例6: SendDestroyEvent
// Destructor
wxWindowBeOS::~wxWindowBeOS()
{
SendDestroyEvent();
m_isBeingDeleted = TRUE;
DestroyChildren();
m_eventHandler = NULL;
}
示例7: Refresh
void wxGxDiscConnections::Refresh(void)
{
if(DestroyChildren())
LoadConnectionsStorage();
else
wxGxXMLConnectionStorage::Refresh();
}
示例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;
}
示例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;
}
示例10: GetOccupants
void QuadTreeNode::Merge()
{
if(m_hasChildren)
{
// Place all occupants at lower levels into this node
GetOccupants(m_pOccupants);
DestroyChildren();
}
}
示例11: DestroyChildren
void wxGxDiscConnection::Refresh(void)
{
#ifdef __WXGTK__
m_pWatcher->RemoveAll();
#endif
DestroyChildren();
m_bIsChildrenLoaded = false;
LoadChildren();
wxGIS_GXCATALOG_EVENT(ObjectRefreshed);
}
示例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]);
}
}
示例13: DestroyChildren
void wxDllWidget::UnloadWidget()
{
if ( m_widget )
{
DestroyChildren();
m_widget = NULL;
delete m_lib;
m_lib = NULL;
}
}
示例14: RemoveChild
wxMDIParentFrame::~wxMDIParentFrame()
{
// Make sure we delete the client window last of all
RemoveChild(m_clientWindow);
DestroyChildren();
delete m_clientWindow;
m_clientWindow = NULL;
}
示例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();
}