Better conditions within dialogs sample.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@27922 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -480,6 +480,7 @@ void MyFrame::ChooseFontGeneric(wxCommandEvent& WXUNUSED(event) )
|
|||||||
}
|
}
|
||||||
#endif // USE_FONTDLG_GENERIC
|
#endif // USE_FONTDLG_GENERIC
|
||||||
|
|
||||||
|
#if wxUSE_LOG_DIALOG
|
||||||
void MyFrame::LogDialog(wxCommandEvent& WXUNUSED(event))
|
void MyFrame::LogDialog(wxCommandEvent& WXUNUSED(event))
|
||||||
{
|
{
|
||||||
// calling wxYield() (as ~wxBusyCursor does) shouldn't result in messages
|
// calling wxYield() (as ~wxBusyCursor does) shouldn't result in messages
|
||||||
@@ -501,6 +502,7 @@ void MyFrame::LogDialog(wxCommandEvent& WXUNUSED(event))
|
|||||||
|
|
||||||
wxLogMessage(wxT("And this is the same dialog but with only one message."));
|
wxLogMessage(wxT("And this is the same dialog but with only one message."));
|
||||||
}
|
}
|
||||||
|
#endif // wxUSE_LOG_DIALOG
|
||||||
|
|
||||||
void MyFrame::MessageBox(wxCommandEvent& WXUNUSED(event) )
|
void MyFrame::MessageBox(wxCommandEvent& WXUNUSED(event) )
|
||||||
{
|
{
|
||||||
@@ -576,8 +578,7 @@ void MyFrame::TextEntry(wxCommandEvent& WXUNUSED(event))
|
|||||||
|
|
||||||
if (dialog.ShowModal() == wxID_OK)
|
if (dialog.ShowModal() == wxID_OK)
|
||||||
{
|
{
|
||||||
wxMessageDialog dialog2(this, dialog.GetValue(), _T("Got string"));
|
wxMessageBox(dialog.GetValue(), _T("Got string"), wxOK | wxICON_INFORMATION, this);
|
||||||
dialog2.ShowModal();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif // wxUSE_TEXTDLG
|
#endif // wxUSE_TEXTDLG
|
||||||
@@ -1137,6 +1138,8 @@ void MyCanvas::OnPaint(wxPaintEvent& WXUNUSED(event) )
|
|||||||
dc.DrawText(_T("wxWidgets common dialogs test application"), 10, 10);
|
dc.DrawText(_T("wxWidgets common dialogs test application"), 10, 10);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if USE_MODAL_PRESENTATION
|
||||||
|
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
// MyModelessDialog
|
// MyModelessDialog
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
@@ -1233,3 +1236,6 @@ void MyModalDialog::OnButton(wxCommandEvent& event)
|
|||||||
event.Skip();
|
event.Skip();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#endif // USE_MODAL_PRESENTATION
|
||||||
|
|
||||||
|
@@ -54,6 +54,8 @@ public:
|
|||||||
wxColour m_canvasTextColour;
|
wxColour m_canvasTextColour;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
#if USE_MODAL_PRESENTATION
|
||||||
|
|
||||||
// A custom modeless dialog
|
// A custom modeless dialog
|
||||||
class MyModelessDialog : public wxDialog
|
class MyModelessDialog : public wxDialog
|
||||||
{
|
{
|
||||||
@@ -83,6 +85,8 @@ private:
|
|||||||
DECLARE_EVENT_TABLE()
|
DECLARE_EVENT_TABLE()
|
||||||
};
|
};
|
||||||
|
|
||||||
|
#endif // USE_MODAL_PRESENTATION
|
||||||
|
|
||||||
// Define a new frame type
|
// Define a new frame type
|
||||||
class MyFrame: public wxFrame
|
class MyFrame: public wxFrame
|
||||||
{
|
{
|
||||||
|
Reference in New Issue
Block a user