bool wxDialog::Show(bool show) { if (show && CanDoLayoutAdaptation()) DoLayoutAdaptation(); return wxTopLevelWindowPalm::Show (show); }
/// Do fit, and adjust to screen size if necessary void wxWizard::DoWizardLayout() { if ( wxSystemSettings::GetScreenType() > wxSYS_SCREEN_PDA ) { if (CanDoLayoutAdaptation()) DoLayoutAdaptation(); else GetSizer()->SetSizeHints(this); if ( m_posWizard == wxDefaultPosition ) CentreOnScreen(); } SetLayoutAdaptationDone(true); }
bool wxDialog::Show( bool bShow ) { if ( bShow == IsShown() ) return false; if (!bShow && m_modalData ) { // we need to do this before calling wxDialogBase version because if we // had disabled other app windows, they must be reenabled right now as // if they stay disabled Windows will activate another window (one // which is enabled, anyhow) when we're hidden in the base class Show() // and we will lose activation m_modalData->ExitLoop(); #if 0 wxDELETE(m_pWindowDisabler); #endif } if (bShow) { if (CanDoLayoutAdaptation()) DoLayoutAdaptation(); // this usually will result in TransferDataToWindow() being called // which will change the controls values so do it before showing as // otherwise we could have some flicker InitDialog(); } wxDialogBase::Show(bShow); wxString title = GetTitle(); if (!title.empty()) ::WinSetWindowText((HWND)GetHwnd(), title.c_str()); if ( bShow ) { // dialogs don't get WM_SIZE message after creation unlike most (all?) // other windows and so could start their life not laid out correctly // if we didn't call Layout() from here // // NB: normally we should call it just the first time but doing it // every time is simpler than keeping a flag Layout(); } return true; } // end of wxDialog::Show
bool wxDialog::Show( bool show ) { if( !wxWindowBase::Show( show ) ) return false; if ( !show && IsModal() ) EndModal(wxID_CANCEL); m_isShown = show; if (show) { if (CanDoLayoutAdaptation()) DoLayoutAdaptation(); // this usually will result in TransferDataToWindow() being called // which will change the controls values so do it before showing as // otherwise we could have some flicker InitDialog(); } if (show) { #if !wxUSE_INVISIBLE_RESIZE XtMapWidget(XtParent((Widget) m_mainWidget)); #else XtManageChild((Widget)m_mainWidget) ; #endif XRaiseWindow( XtDisplay( (Widget)m_mainWidget ), XtWindow( (Widget)m_mainWidget) ); } else { #if !wxUSE_INVISIBLE_RESIZE XtUnmapWidget(XtParent((Widget) m_mainWidget)); #else XtUnmanageChild((Widget)m_mainWidget) ; #endif XFlush(XtDisplay((Widget)m_mainWidget)); XSync(XtDisplay((Widget)m_mainWidget), False); } return true; }
bool wxDialog::Show( bool show ) { if (!show && IsModal()) { EndModal( wxID_CANCEL ); } if (show && CanDoLayoutAdaptation()) DoLayoutAdaptation(); bool ret = wxDialogBase::Show(show); if (show) InitDialog(); return ret; }
bool wxDialog::Show(bool show) { if ( show == IsShown() ) return false; if ( !show && m_modalData ) { // we need to do this before calling wxDialogBase version because if we // had disabled other app windows, they must be reenabled right now as // if they stay disabled Windows will activate another window (one // which is enabled, anyhow) when we're hidden in the base class Show() // and we will lose activation m_modalData->ExitLoop(); } if ( show ) { if (CanDoLayoutAdaptation()) DoLayoutAdaptation(); // this usually will result in TransferDataToWindow() being called // which will change the controls values so do it before showing as // otherwise we could have some flicker InitDialog(); } wxDialogBase::Show(show); if ( show ) { // dialogs don't get WM_SIZE message from ::ShowWindow() for some // reason so generate it ourselves for consistency with frames and // dialogs in other ports // // NB: normally we should call it just the first time but doing it // every time is simpler than keeping a flag const wxSize size = GetClientSize(); ::SendMessage(GetHwnd(), WM_SIZE, SIZE_RESTORED, MAKELPARAM(size.x, size.y)); } return true; }
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; }
bool wxDialog::Show(bool show) { if ( !show ) { // if we had disabled other app windows, reenable them back now because // if they stay disabled Windows will activate another window (one // which is enabled, anyhow) and we will lose activation wxDELETE(m_windowDisabler); if ( IsModal() ) EndModal(wxID_CANCEL); } if (show && CanDoLayoutAdaptation()) DoLayoutAdaptation(); bool ret = wxDialogBase::Show(show); if ( show ) InitDialog(); return ret; }