// 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; }
// 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); }
wxDialog::~wxDialog() { SendDestroyEvent(); // if the dialog is modal, this will end its event loop Show(false); delete m_eventLoop; if (m_mainWidget) { XtRemoveEventHandler((Widget) m_mainWidget, ExposureMask, False, wxUniversalRepaintProc, (XtPointer) this); } m_modalShowing = false; #if !wxUSE_INVISIBLE_RESIZE if (m_mainWidget) { XtUnmapWidget((Widget) m_mainWidget); } #endif PreDestroy(); if ( m_mainWidget ) { wxDeleteWindowFromTable( (Widget)m_mainWidget ); XtDestroyWidget( (Widget)m_mainWidget ); } }
wxDialog::~wxDialog() { SendDestroyEvent(); // if the dialog is modal, this will end its event loop Show(false); }
wxDialog::~wxDialog() { SendDestroyEvent(); // this will also reenable all the other windows for a modal dialog Show(false); } // end of wxDialog::~wxDialog
// Destructor wxWindowBeOS::~wxWindowBeOS() { SendDestroyEvent(); m_isBeingDeleted = TRUE; DestroyChildren(); m_eventHandler = NULL; }
wxRadioBox::~wxRadioBox() { SendDestroyEvent(); // Unsubclass all the radio buttons and remove their soon-to-be-invalid // HWNDs from the global map. Notice that we need to unsubclass because // otherwise we'd need the entries in gs_boxFromButton for the buttons // being deleted to handle the messages generated during their destruction. #if defined(__INTEL_COMPILER) && 1 /* VDM auto patch */ # pragma ivdep # pragma swp # pragma unroll # pragma prefetch # if 0 # pragma simd noassert # endif #endif /* VDM auto patch */ for ( size_t item = 0; item < m_radioButtons->GetCount(); item++ ) { HWND hwnd = m_radioButtons->Get(item); wxSetWindowProc(hwnd, reinterpret_cast<WNDPROC>(s_wndprocRadioBtn)); gs_boxFromButton.erase(hwnd); } delete m_radioButtons; if ( m_dummyHwnd ) DestroyWindow((HWND)m_dummyHwnd); delete[] m_radioWidth; delete[] m_radioHeight; }
wxRadioBox::~wxRadioBox() { SendDestroyEvent(); wxRadioButton *next, *current; current = m_radioButtonCycle->NextInCycle(); if (current != NULL) { #if defined(__INTEL_COMPILER) && 1 /* VDM auto patch */ # pragma ivdep # pragma swp # pragma unroll # pragma prefetch # if 0 # pragma simd noassert # endif #endif /* VDM auto patch */ while (current != m_radioButtonCycle) { next = current->NextInCycle(); delete current; current = next; } delete current; } }
wxTopLevelWindowMSW::~wxTopLevelWindowMSW() { delete m_menuSystem; SendDestroyEvent(); #if defined(__SMARTPHONE__) || defined(__POCKETPC__) SHACTIVATEINFO* info = (SHACTIVATEINFO*) m_activateInfo; delete info; m_activateInfo = NULL; #endif // after destroying an owned window, Windows activates the next top level // window in Z order but it may be different from our owner (to reproduce // this simply Alt-TAB to another application and back before closing the // owned frame) whereas we always want to yield activation to our parent if ( HasFlag(wxFRAME_FLOAT_ON_PARENT) ) { wxWindow *parent = GetParent(); if ( parent ) { ::BringWindowToTop(GetHwndOf(parent)); } } }
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()); } }
wxTopLevelWindowGTK::~wxTopLevelWindowGTK() { if ( m_netFrameExtentsTimerId ) { // Don't let the timer callback fire as the window pointer passed to it // will become invalid very soon. g_source_remove(m_netFrameExtentsTimerId); } if (m_grabbed) { wxFAIL_MSG(wxT("Window still grabbed")); RemoveGrab(); } SendDestroyEvent(); // it may also be GtkScrolledWindow in the case of an MDI child if (GTK_IS_WINDOW(m_widget)) { gtk_window_set_focus( GTK_WINDOW(m_widget), NULL ); } if (g_activeFrame == this) g_activeFrame = NULL; if (g_lastActiveFrame == this) g_lastActiveFrame = NULL; }
void PrefabSelector::onRadiantShutdown() { rMessage() << "PrefabSelector shutting down." << std::endl; // Destroy the window SendDestroyEvent(); InstancePtr().reset(); }
virtual ~TreeCtrlComboPopup() { if (!m_isBeingDeleted) { wxMessageBox("error wxTreeCtrl::Destroy() was not called"); } SendDestroyEvent(); }
wxRadioBox::~wxRadioBox() { SendDestroyEvent(); delete m_radioButtons; if ( m_dummyHwnd ) DestroyWindow((HWND)m_dummyHwnd); delete[] m_radioWidth; delete[] m_radioHeight; }
void ParticlesChooser::onRadiantShutdown() { rMessage() << "ParticlesChooser shutting down." << std::endl; _preview.reset(); // Destroy the window SendDestroyEvent(); getInstancePtr().reset(); }
void LightInspector::onRadiantShutdown() { if (IsShownOnScreen()) { Hide(); } // Destroy the window SendDestroyEvent(); InstancePtr().reset(); }
// Destructor wxWindowDFB::~wxWindowDFB() { SendDestroyEvent(); if ( gs_mouseCapture == this ) ReleaseMouse(); if ( gs_focusedWindow == this ) DFBKillFocus(); DestroyChildren(); }
wxFrame::~wxFrame() { SendDestroyEvent(); if (m_clientArea) { XtRemoveEventHandler((Widget) m_clientArea, ExposureMask, False, wxUniversalRepaintProc, (XtPointer) this); } if (GetMainWidget()) Show(false); if (m_frameMenuBar) { m_frameMenuBar->DestroyMenuBar(); wxDELETE(m_frameMenuBar); } wxDELETE(m_frameStatusBar); PreDestroy(); Widget frameShell = (Widget)GetShellWidget(); if( frameShell ) XtRemoveEventHandler( frameShell, StructureNotifyMask, False, (XtEventHandler)wxFrameMapProc, (XtPointer)this ); if( m_clientArea ) { wxDeleteWindowFromTable( (Widget)m_clientArea ); XtDestroyWidget( (Widget)m_clientArea ); } if( m_workArea ) { XtVaSetValues( (Widget)m_mainWidget, XmNworkWindow, (Widget)NULL, NULL ); wxDeleteWindowFromTable( (Widget)m_workArea ); XtDestroyWidget( (Widget)m_workArea ); } if( m_mainWidget ) XtDestroyWidget( (Widget)m_mainWidget ); if( frameShell ) XtDestroyWidget( frameShell ); }
void ModelSelector::onRadiantShutdown() { rMessage() << "ModelSelector shutting down." << std::endl; // Model references are kept by this class, release them before shutting down _treeView.reset(); _treeStore.reset(NULL); _treeStoreWithSkins.reset(NULL); // Destroy the window SendDestroyEvent(); InstancePtr().reset(); }
void PatchInspector::onRadiantShutdown() { rMessage() << "PatchInspector shutting down." << std::endl; if (IsShownOnScreen()) { Hide(); } // Destroy the window SendDestroyEvent(); InstancePtr().reset(); }
wxNonOwnedWindow::~wxNonOwnedWindow() { SendDestroyEvent(); wxNonOwnedWindowImpl::RemoveAssociations(m_nowpeer) ; DestroyChildren(); wxDELETE(m_nowpeer); // avoid dangling refs if ( s_macDeactivateWindow == this ) s_macDeactivateWindow = NULL; }
wxControl::~wxControl() { SendDestroyEvent(); SetLabel(wxEmptyString); DestroyChildren(); uint16_t index; FormType* form = (FormType*)GetObjectFormIndex(index); if(form!=NULL && index!=frmInvalidObjectId) { FrmRemoveObject((FormType **)&form,index); } }
wxTopLevelWindowMSW::~wxTopLevelWindowMSW() { delete m_menuSystem; SendDestroyEvent(); // after destroying an owned window, Windows activates the next top level // window in Z order but it may be different from our owner (to reproduce // this simply Alt-TAB to another application and back before closing the // owned frame) whereas we always want to yield activation to our parent if ( HasFlag(wxFRAME_FLOAT_ON_PARENT) ) { wxWindow *parent = GetParent(); if ( parent ) { ::BringWindowToTop(GetHwndOf(parent)); } } }
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(); }
wxRadioBox::~wxRadioBox() { SendDestroyEvent(); wxRadioButton *next, *current; current = m_radioButtonCycle->NextInCycle(); if (current != NULL) { while (current != m_radioButtonCycle) { next = current->NextInCycle(); delete current; current = next; } delete current; } }
wxTopLevelWindowGTK::~wxTopLevelWindowGTK() { if (m_grabbed) { wxASSERT_MSG( false, wxT("Window still grabbed")); RemoveGrab(); } SendDestroyEvent(); // it may also be GtkScrolledWindow in the case of an MDI child if (GTK_IS_WINDOW(m_widget)) { gtk_window_set_focus( GTK_WINDOW(m_widget), NULL ); } if (g_activeFrame == this) g_activeFrame = NULL; if (g_lastActiveFrame == this) g_lastActiveFrame = NULL; }
wxRadioBox::~wxRadioBox() { SendDestroyEvent(); // Unsubclass all the radio buttons and remove their soon-to-be-invalid // HWNDs from the global map. Notice that we need to unsubclass because // otherwise we'd need the entries in gs_boxFromButton for the buttons // being deleted to handle the messages generated during their destruction. for ( size_t item = 0; item < m_radioButtons->GetCount(); item++ ) { HWND hwnd = m_radioButtons->Get(item); wxSetWindowProc(hwnd, reinterpret_cast<WNDPROC>(s_wndprocRadioBtn)); gs_boxFromButton.erase(hwnd); } delete m_radioButtons; if ( m_dummyHwnd ) DestroyWindow((HWND)m_dummyHwnd); }
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(); }
wxRadioBox::~wxRadioBox() { SendDestroyEvent(); if (m_hWnd) wxRemoveHandleAssociation(this); if (m_ahRadioButtons) { for (unsigned int i = 0; i < m_nNoItems; i++) { wxWindow* pWin = wxFindWinFromHandle((WXHWND)m_ahRadioButtons[i]); wxRemoveHandleAssociation(pWin); ::WinDestroyWindow((HWND)m_ahRadioButtons[i]); } delete[] m_ahRadioButtons; } if (m_pnRadioWidth) delete[] m_pnRadioWidth; if (m_pnRadioHeight) delete[] m_pnRadioHeight; } // end of wxRadioBox::~wxRadioBox
wxTopLevelWindowGTK::~wxTopLevelWindowGTK() { if ( m_netFrameExtentsTimerId ) { // Don't let the timer callback fire as the window pointer passed to it // will become invalid very soon. g_source_remove(m_netFrameExtentsTimerId); } #if wxUSE_LIBHILDON || wxUSE_LIBHILDON2 // it can also be a (standard) dialog if ( HILDON_IS_WINDOW(m_widget) ) { hildon_program_remove_window(wxTheApp->GetHildonProgram(), HILDON_WINDOW(m_widget)); } #endif // wxUSE_LIBHILDON || wxUSE_LIBHILDON2 if (m_grabbed) { wxFAIL_MSG(wxT("Window still grabbed")); RemoveGrab(); } SendDestroyEvent(); // it may also be GtkScrolledWindow in the case of an MDI child if (GTK_IS_WINDOW(m_widget)) { gtk_window_set_focus( GTK_WINDOW(m_widget), NULL ); } if (g_activeFrame == this) g_activeFrame = NULL; if (g_lastActiveFrame == this) g_lastActiveFrame = NULL; }