#endif
-wxDialog::wxDialog()
+void wxDialog::Init()
{
- m_isShown = FALSE;
+ m_isModalStyle = false;
}
bool wxDialog::Create(wxWindow *parent, wxWindowID id,
if ( !wxTopLevelWindow::Create(parent, id, title, pos, size, style & ~(wxYES|wxOK|wxNO|wxCANCEL) , name) )
return FALSE;
- SetBackgroundColour(wxSystemSettings::GetColour(wxSYS_COLOUR_3DFACE));
-
return TRUE;
}
{
if ( flag )
{
- m_windowStyle |= wxDIALOG_MODAL;
+ m_isModalStyle = true;
wxModelessWindows.DeleteObject(this);
#if TARGET_CARBON
}
else
{
- m_windowStyle &= ~wxDIALOG_MODAL;
+ m_isModalStyle = false;
wxModelessWindows.Append(this);
}
bool wxDialog::IsModal() const
{
- return (GetWindowStyleFlag() & wxDIALOG_MODAL) != 0;
+ return m_isModalStyle;
}
wxModalDialogs.Append(this);
#if TARGET_CARBON
-// BeginAppModalStateForWindow( (WindowRef) MacGetWindowRef()) ;
+ BeginAppModalStateForWindow( (WindowRef) MacGetWindowRef()) ;
#else
// TODO : test whether parent gets disabled
bool formerModal = s_macIsInModalLoop ;
}
#if TARGET_CARBON
-// EndAppModalStateForWindow( (WindowRef) MacGetWindowRef() ) ;
+ EndAppModalStateForWindow( (WindowRef) MacGetWindowRef() ) ;
#else
// TODO probably reenable the parent window if any
s_macIsInModalLoop = formerModal ;