]>
Commit | Line | Data |
---|---|---|
dfe1eee3 VZ |
1 | ///////////////////////////////////////////////////////////////////////////// |
2 | // Name: wx/dialog.h | |
3 | // Purpose: wxDialogBase class | |
4 | // Author: Vadim Zeitlin | |
5 | // Modified by: | |
6 | // Created: 29.06.99 | |
7 | // RCS-ID: $Id$ | |
8 | // Copyright: (c) Vadim Zeitlin | |
9 | // Licence: wxWindows licence | |
10 | ///////////////////////////////////////////////////////////////////////////// | |
11 | ||
34138703 JS |
12 | #ifndef _WX_DIALOG_H_BASE_ |
13 | #define _WX_DIALOG_H_BASE_ | |
c801d85f | 14 | |
1b68e0b5 RR |
15 | #ifdef __GNUG__ |
16 | #pragma interface "dialogbase.h" | |
17 | #endif | |
18 | ||
9f3a38fc | 19 | #include "wx/defs.h" |
7d9f12f3 VS |
20 | #include "wx/containr.h" |
21 | #include "wx/toplevel.h" | |
9f3a38fc | 22 | |
7d9f12f3 VS |
23 | // FIXME - temporary hack in absence of wxTLW !! |
24 | #ifndef wxTopLevelWindowNative | |
25 | #include "wx/panel.h" | |
c50f1fb9 | 26 | class WXDLLEXPORT wxDialogBase : public wxPanel |
7d9f12f3 VS |
27 | #else |
28 | class WXDLLEXPORT wxDialogBase : public wxTopLevelWindow | |
29 | #endif | |
c50f1fb9 | 30 | { |
dfe1eee3 | 31 | public: |
7d9f12f3 VS |
32 | wxDialogBase() { Init(); } |
33 | ~wxDialogBase() {} | |
34 | ||
35 | void Init(); | |
36 | ||
dfe1eee3 VZ |
37 | // the modal dialogs have a return code - usually the id of the last |
38 | // pressed button | |
39 | void SetReturnCode(int returnCode) { m_returnCode = returnCode; } | |
40 | int GetReturnCode() const { return m_returnCode; } | |
41 | ||
1e6feb95 | 42 | #if wxUSE_STATTEXT && wxUSE_TEXTCTRL |
92afa2b1 RR |
43 | // splits text up at newlines and places the |
44 | // lines into a vertical wxBoxSizer | |
45 | wxSizer *CreateTextSizer( const wxString &message ); | |
1e6feb95 | 46 | #endif // wxUSE_STATTEXT && wxUSE_TEXTCTRL |
92afa2b1 | 47 | |
1e6feb95 | 48 | #if wxUSE_BUTTON |
92afa2b1 RR |
49 | // places buttons into a horizontal wxBoxSizer |
50 | wxSizer *CreateButtonSizer( long flags ); | |
1e6feb95 | 51 | #endif // wxUSE_BUTTON |
dfe1eee3 | 52 | |
f6bcfd97 | 53 | protected: |
dfe1eee3 VZ |
54 | // the return code from modal dialog |
55 | int m_returnCode; | |
7d9f12f3 VS |
56 | |
57 | // FIXME - temporary hack in absence of wxTLW !! | |
58 | #ifdef wxTopLevelWindowNative | |
59 | DECLARE_EVENT_TABLE() | |
60 | WX_DECLARE_CONTROL_CONTAINER(); | |
61 | #endif | |
c50f1fb9 VZ |
62 | }; |
63 | ||
7d9f12f3 VS |
64 | |
65 | ||
2049ba38 | 66 | #if defined(__WXMSW__) |
c50f1fb9 | 67 | #include "wx/msw/dialog.h" |
2049ba38 | 68 | #elif defined(__WXMOTIF__) |
c50f1fb9 | 69 | #include "wx/motif/dialog.h" |
2049ba38 | 70 | #elif defined(__WXGTK__) |
c50f1fb9 | 71 | #include "wx/gtk/dialog.h" |
34138703 | 72 | #elif defined(__WXMAC__) |
c50f1fb9 | 73 | #include "wx/mac/dialog.h" |
1777b9bb DW |
74 | #elif defined(__WXPM__) |
75 | #include "wx/os2/dialog.h" | |
34138703 | 76 | #elif defined(__WXSTUBS__) |
c50f1fb9 | 77 | #include "wx/stubs/dialog.h" |
c801d85f KB |
78 | #endif |
79 | ||
80 | #endif | |
34138703 | 81 | // _WX_DIALOG_H_BASE_ |