projects
/
wxWidgets.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Set minsize and implement DoGetBestSize
[wxWidgets.git]
/
src
/
mac
/
carbon
/
dialog.cpp
diff --git
a/src/mac/carbon/dialog.cpp
b/src/mac/carbon/dialog.cpp
index 95606e6db09f63989d5016c1c58efb54f83d1604..9ec4ef5220b13e90232794cb99f3004a20de2642 100644
(file)
--- a/
src/mac/carbon/dialog.cpp
+++ b/
src/mac/carbon/dialog.cpp
@@
-44,10
+44,9
@@
END_EVENT_TABLE()
#endif
#endif
-
wxDialog::wxDialog
()
+
void wxDialog::Init
()
{
{
- m_isShown = FALSE;
- SetBackgroundColour(wxSystemSettings::GetColour(wxSYS_COLOUR_3DFACE));
+ m_isModalStyle = false;
}
bool wxDialog::Create(wxWindow *parent, wxWindowID id,
}
bool wxDialog::Create(wxWindow *parent, wxWindowID id,
@@
-65,8
+64,6
@@
bool wxDialog::Create(wxWindow *parent, wxWindowID id,
if ( !wxTopLevelWindow::Create(parent, id, title, pos, size, style & ~(wxYES|wxOK|wxNO|wxCANCEL) , name) )
return FALSE;
if ( !wxTopLevelWindow::Create(parent, id, title, pos, size, style & ~(wxYES|wxOK|wxNO|wxCANCEL) , name) )
return FALSE;
- SetBackgroundColour(wxSystemSettings::GetColour(wxSYS_COLOUR_3DFACE));
-
return TRUE;
}
return TRUE;
}
@@
-74,7
+71,7
@@
void wxDialog::SetModal(bool flag)
{
if ( flag )
{
{
if ( flag )
{
- m_
windowStyle |= wxDIALOG_MODAL
;
+ m_
isModalStyle = true
;
wxModelessWindows.DeleteObject(this);
#if TARGET_CARBON
wxModelessWindows.DeleteObject(this);
#if TARGET_CARBON
@@
-83,7
+80,7
@@
void wxDialog::SetModal(bool flag)
}
else
{
}
else
{
- m_
windowStyle &= ~wxDIALOG_MODAL
;
+ m_
isModalStyle = false
;
wxModelessWindows.Append(this);
}
wxModelessWindows.Append(this);
}
@@
-116,7
+113,7
@@
void wxDialog::OnCharHook(wxKeyEvent& event)
bool wxDialog::IsModal() const
{
bool wxDialog::IsModal() const
{
- return
(GetWindowStyleFlag() & wxDIALOG_MODAL) != 0
;
+ return
m_isModalStyle
;
}
}
@@
-167,7
+164,7
@@
void wxDialog::DoShowModal()
wxModalDialogs.Append(this);
#if TARGET_CARBON
wxModalDialogs.Append(this);
#if TARGET_CARBON
-
//
BeginAppModalStateForWindow( (WindowRef) MacGetWindowRef()) ;
+ BeginAppModalStateForWindow( (WindowRef) MacGetWindowRef()) ;
#else
// TODO : test whether parent gets disabled
bool formerModal = s_macIsInModalLoop ;
#else
// TODO : test whether parent gets disabled
bool formerModal = s_macIsInModalLoop ;
@@
-180,7
+177,7
@@
void wxDialog::DoShowModal()
}
#if TARGET_CARBON
}
#if TARGET_CARBON
-
//
EndAppModalStateForWindow( (WindowRef) MacGetWindowRef() ) ;
+ EndAppModalStateForWindow( (WindowRef) MacGetWindowRef() ) ;
#else
// TODO probably reenable the parent window if any
s_macIsInModalLoop = formerModal ;
#else
// TODO probably reenable the parent window if any
s_macIsInModalLoop = formerModal ;