void wxDialogBase::ShowWindowModal () { int retval = ShowModal(); // wxWindowModalDialogEvent relies on GetReturnCode() returning correct // code. Rather than doing it manually in all ShowModal() overrides for // native dialogs (and getting accidentally broken again), set it here. // The worst that can happen is that it will be set twice to the same // value. SetReturnCode(retval); SendWindowModalDialogEvent ( wxEVT_WINDOW_MODAL_DIALOG_CLOSED ); }
void wxDialog::DoShowWindowModal() { // If someone wants to add support for this to wxOSX Carbon, here would // be the place to start: http://trac.wxwidgets.org/ticket/9459 // Unfortunately, supporting sheets in Carbon isn't as straightforward // as with Cocoa, so it will probably take some tweaking. m_modality = wxDIALOG_MODALITY_APP_MODAL; ShowModal(); SendWindowModalDialogEvent ( wxEVT_WINDOW_MODAL_DIALOG_CLOSED ); }
bool wxDialog::Show(bool show) { if ( m_modality == wxDIALOG_MODALITY_WINDOW_MODAL ) { if ( !wxWindow::Show(show) ) // nothing to do return false; } else { if ( !wxDialogBase::Show(show) ) // nothing to do return false; } if (show && CanDoLayoutAdaptation()) DoLayoutAdaptation(); if ( show ) // usually will result in TransferDataToWindow() being called InitDialog(); if ( !show ) { const int modalityOrig = m_modality; // complete the 'hiding' before we send the event m_modality = wxDIALOG_MODALITY_NONE; switch ( modalityOrig ) { case wxDIALOG_MODALITY_WINDOW_MODAL: EndWindowModal(); // OS X implementation method for cleanup SendWindowModalDialogEvent ( wxEVT_WINDOW_MODAL_DIALOG_CLOSED ); break; default: break; } } return true; }
void wxDialogBase::ShowWindowModal () { ShowModal(); SendWindowModalDialogEvent ( wxEVT_WINDOW_MODAL_DIALOG_CLOSED ); }
bool wxDialogBase::ShowWindowModal () { ShowModal(); SendWindowModalDialogEvent ( wxEVT_WINDOW_MODAL_DIALOG_CLOSED ); return true; }