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 ); } }
wxMDIParentFrame::~wxMDIParentFrame() { DestroyChildren(); // already deleted by DestroyChildren() m_clientWindow = NULL ; }
// 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); }
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()); } }
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; } }
// Destructor wxWindowBeOS::~wxWindowBeOS() { SendDestroyEvent(); m_isBeingDeleted = TRUE; DestroyChildren(); m_eventHandler = NULL; }
void wxGxDiscConnections::Refresh(void) { if(DestroyChildren()) LoadConnectionsStorage(); else wxGxXMLConnectionStorage::Refresh(); }
// 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; }
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; }
void QuadTreeNode::Merge() { if(m_hasChildren) { // Place all occupants at lower levels into this node GetOccupants(m_pOccupants); DestroyChildren(); } }
void wxGxDiscConnection::Refresh(void) { #ifdef __WXGTK__ m_pWatcher->RemoveAll(); #endif DestroyChildren(); m_bIsChildrenLoaded = false; LoadChildren(); wxGIS_GXCATALOG_EVENT(ObjectRefreshed); }
void ImageBrowser::SetImages(const std::vector<std::string> &images) { DestroyChildren(); selectionImages.clear(); for (int i = 0; i < images.size(); i++) { NewSelectionImage(images[i]); } }
void wxDllWidget::UnloadWidget() { if ( m_widget ) { DestroyChildren(); m_widget = NULL; delete m_lib; m_lib = NULL; } }
wxMDIParentFrame::~wxMDIParentFrame() { // Make sure we delete the client window last of all RemoveChild(m_clientWindow); DestroyChildren(); delete m_clientWindow; m_clientWindow = NULL; }
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(); }
// Destructor wxWindowDFB::~wxWindowDFB() { SendDestroyEvent(); if ( gs_mouseCapture == this ) ReleaseMouse(); if ( gs_focusedWindow == this ) DFBKillFocus(); DestroyChildren(); }
bool ICtl_ribbon_toolbar::StdExecute(IStdParam& cmd) { if(cmd.extra1=="clear") { m_aItems.clear(); DestroyChildren(); } else if(cmd.extra1=="update") { this->Enable(!m_pGroup->flags.get(EvtBase::FLAG_DISABLE)); } return true; }
void QuadTreeNode::Merge() { // Merge all children into this node if(hasChildren) { for(unsigned int x = 0; x < 2; x++) for(unsigned int y = 0; y < 2; y++) children[x][y]->GetOccupants(occupants, this); DestroyChildren(); hasChildren = false; } }
wxNonOwnedWindow::~wxNonOwnedWindow() { SendDestroyEvent(); wxNonOwnedWindowImpl::RemoveAssociations(m_nowpeer) ; DestroyChildren(); wxDELETE(m_nowpeer); // avoid dangling refs if ( s_macDeactivateWindow == this ) s_macDeactivateWindow = NULL; }
wxControl::~wxControl() { SetLabel(wxEmptyString); m_isBeingDeleted = true; DestroyChildren(); uint16_t index; FormType* form = (FormType*)GetObjectFormIndex(index); if(form!=NULL && index!=frmInvalidObjectId) { FrmRemoveObject((FormType **)&form,index); } }
void P3DModelEditPanel::HideAll () { wxBoxSizer *TopSizer; TopSizer = (wxBoxSizer*)GetSizer(); TopSizer->Remove(0); TopSizer->Remove(1); DestroyChildren(); PlantModelTreeCtrl = NULL; }
void wxTopLevelWindowMotif::PreDestroy() { wxModelessWindows.DeleteObject(this); DestroyChildren(); // MessageDialog and FileDialog do not have a client widget if( GetClientWidget() ) { XtRemoveEventHandler( (Widget)GetClientWidget(), ButtonPressMask | ButtonReleaseMask | PointerMotionMask | KeyPressMask, False, wxTLWEventHandler, (XtPointer)this ); } }
wxMDIChildFrame::~wxMDIChildFrame() { // will be destroyed by DestroyChildren() but reset them before calling it // to avoid using dangling pointers if a callback comes in the meanwhile #if wxUSE_TOOLBAR m_frameToolBar = NULL; #endif #if wxUSE_STATUSBAR m_frameStatusBar = NULL; #endif // wxUSE_STATUSBAR DestroyChildren(); RemoveWindowMenu(NULL, m_hMenu); MSWDestroyWindow(); }
void ImageBrowser::ScanDirectory(const std::string &directory) { hasContent = false; DestroyChildren(); selectionImages.clear(); Entity *bg = new Entity(); bg->SetGraphic(new Sprite("", 128, 600)); bg->color = Color::black; bg->color.a = 0.75f; Add(bg); grid = new Entity(); Add(grid); ForEachFile(directory, "png", &ImageBrowser::FileCallback, (intptr_t)this); }
void BrushSizePanel::InvalidateContents() { if(loaded) { DestroyChildren(); SetSizer(nullptr); brushshapeSquareButton = brushshapeCircleButton = brushsize0Button = brushsize1Button = brushsize2Button = brushsize4Button = brushsize6Button = brushsize8Button = brushsize11Button = nullptr; loaded = false; } }
wxWindow::~wxWindow() { SendDestroyEvent(); #if wxUSE_SCROLLBAR // clear pointers to scrollbar before deleting the children: they are // children and so will be deleted by DestroyChildren() call below and if // any code using the scrollbars would be called in the process or from // ~wxWindowBase, the app would crash: m_scrollbarVert = m_scrollbarHorz = NULL; #endif // we have to destroy our children before we're destroyed because our // children suppose that we're of type wxWindow, not just wxWindowNative, // and so bad things may happen if they're deleted from the base class dtor // as by then we're not a wxWindow any longer and wxUniv-specific virtual // functions can't be called DestroyChildren(); }
void BrushToolPanel::InvalidateContents() { if(loaded) { DestroyChildren(); SetSizer(nullptr); optionalBorderButton = eraserButton = normalDoorButton = lockedDoorButton = magicDoorButton = questDoorButton = hatchDoorButton = windowDoorButton = pzBrushButton = nopvpBrushButton = nologBrushButton = pvpzoneBrushButton = nullptr; loaded = false; } }
wxNonOwnedWindow::~wxNonOwnedWindow() { SendDestroyEvent(); // destroy all children before we destroy the underlying DirectFB window, // so that if any of them does something with the TLW, it will still work: DestroyChildren(); // it's safe to delete the underlying DirectFB window now: wxDELETE(m_toPaint); if ( !m_dfbwin ) return; // remove the TLW from DFBWindowID->wxTLW map: DFBWindowID winid; if ( m_dfbwin->GetID(&winid) ) gs_dfbWindowsMap.erase(winid); m_dfbwin->Destroy(); m_dfbwin.Reset(); }
void QuadNode::Merge() { /* merge the children level in to this level and delete all the children node . */ if (!_isLeaf) { for (int i = 0; i < 4; i++) { _children[i]->GetObjectFromChildren(_objlist, this); } } DestroyChildren(); _isLeaf = true; }
wxMDIChildFrame::~wxMDIChildFrame() { // if we hadn't been created, there is nothing to destroy if ( !m_hWnd ) return; GetMDIParent()->RemoveMDIChild(this); // will be destroyed by DestroyChildren() but reset them before calling it // to avoid using dangling pointers if a callback comes in the meanwhile #if wxUSE_TOOLBAR m_frameToolBar = NULL; #endif #if wxUSE_STATUSBAR m_frameStatusBar = NULL; #endif // wxUSE_STATUSBAR DestroyChildren(); MDIRemoveWindowMenu(NULL, m_hMenu); MSWDestroyWindow(); }