]>
Commit | Line | Data |
---|---|---|
e5b50758 WS |
1 | ///////////////////////////////////////////////////////////////////////////// |
2 | // Name: wx/msgdlgg.h | |
3 | // Purpose: common header and base class for wxMessageDialog | |
4 | // Author: wxWidgets Team | |
5 | // Modified by: | |
6 | // Created: | |
7 | // RCS-ID: $Id$ | |
8 | // Copyright: (c) wxWidgets | |
9 | // Licence: wxWindows licence | |
10 | ///////////////////////////////////////////////////////////////////////////// | |
11 | ||
34138703 JS |
12 | #ifndef _WX_MSGDLG_H_BASE_ |
13 | #define _WX_MSGDLG_H_BASE_ | |
c801d85f | 14 | |
13a7abf9 VS |
15 | #include "wx/setup.h" |
16 | ||
e421922f VZ |
17 | #if wxUSE_MSGDLG |
18 | ||
e5b50758 WS |
19 | class WXDLLEXPORT wxMessageDialogBase |
20 | { | |
21 | protected: | |
22 | // common validation of wxMessageDialog style | |
23 | void SetMessageDialogStyle(long style) | |
24 | { | |
25 | wxASSERT_MSG( ((style & wxYES_NO) == wxYES_NO) || ((style & wxYES_NO) == 0), | |
26 | _T("wxYES and wxNO may only be used together in wxMessageDialog") ); | |
27 | ||
28 | wxASSERT_MSG( (style & wxID_OK) != wxID_OK, | |
29 | _T("wxMessageBox: Did you mean wxOK (and not wxID_OK)?") ); | |
30 | ||
31 | m_dialogStyle = style; | |
32 | } | |
33 | inline long GetMessageDialogStyle() const | |
34 | { | |
35 | return m_dialogStyle; | |
36 | } | |
37 | ||
38 | private: | |
39 | long m_dialogStyle; | |
40 | }; | |
41 | ||
a685a06c DE |
42 | #if defined(__WX_COMPILING_MSGDLGG_CPP__) |
43 | #include "wx/generic/msgdlgg.h" | |
44 | #elif defined(__WXUNIVERSAL__) || defined(__WXGPE__) | |
21709999 | 45 | #include "wx/generic/msgdlgg.h" |
4055ed82 | 46 | #elif defined(__WXPALMOS__) |
ffecfa5a | 47 | #include "wx/palmos/msgdlg.h" |
21709999 | 48 | #elif defined(__WXMSW__) |
c801d85f | 49 | #include "wx/msw/msgdlg.h" |
2049ba38 | 50 | #elif defined(__WXMOTIF__) |
bf6c2b35 | 51 | #include "wx/motif/msgdlg.h" |
13a7abf9 VS |
52 | #elif defined(__WXGTK__) && defined(__WXGTK20__) |
53 | #include "wx/gtk/msgdlg.h" | |
2049ba38 | 54 | #elif defined(__WXGTK__) |
92afa2b1 | 55 | #include "wx/generic/msgdlgg.h" |
34138703 | 56 | #elif defined(__WXMAC__) |
17dff81c | 57 | #include "wx/mac/msgdlg.h" |
0201182b DE |
58 | #elif defined(__WXCOCOA__) |
59 | #include "wx/generic/msgdlgg.h" | |
1777b9bb DW |
60 | #elif defined(__WXPM__) |
61 | #include "wx/os2/msgdlg.h" | |
c801d85f KB |
62 | #endif |
63 | ||
e421922f VZ |
64 | // ---------------------------------------------------------------------------- |
65 | // wxMessageBox: the simplest way to use wxMessageDialog | |
66 | // ---------------------------------------------------------------------------- | |
67 | ||
68 | int WXDLLEXPORT wxMessageBox(const wxString& message, | |
e5b50758 WS |
69 | const wxString& caption = wxMessageBoxCaptionStr, |
70 | long style = wxOK | wxCENTRE, | |
71 | wxWindow *parent = NULL, | |
72 | int x = wxDefaultCoord, int y = wxDefaultCoord); | |
e421922f VZ |
73 | |
74 | #endif // wxUSE_MSGDLG | |
75 | ||
c801d85f | 76 | #endif |
34138703 | 77 | // _WX_MSGDLG_H_BASE_ |