]>
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 | |
12028905 | 15 | #if defined(__GNUG__) && !defined(NO_GCC_PRAGMA) |
1b68e0b5 RR |
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 | |
0cc1d4ff MB |
23 | WXDLLEXPORT_DATA(extern const wxChar*) wxDialogNameStr; |
24 | ||
7d9f12f3 | 25 | class WXDLLEXPORT wxDialogBase : public wxTopLevelWindow |
c50f1fb9 | 26 | { |
dfe1eee3 | 27 | public: |
6463b9f5 | 28 | wxDialogBase() { Init(); } |
82c9f85c VZ |
29 | virtual ~wxDialogBase() { } |
30 | ||
7d9f12f3 | 31 | void Init(); |
82c9f85c | 32 | |
dfe1eee3 VZ |
33 | // the modal dialogs have a return code - usually the id of the last |
34 | // pressed button | |
35 | void SetReturnCode(int returnCode) { m_returnCode = returnCode; } | |
36 | int GetReturnCode() const { return m_returnCode; } | |
37 | ||
d7260478 | 38 | #if wxUSE_STATTEXT // && wxUSE_TEXTCTRL |
92afa2b1 RR |
39 | // splits text up at newlines and places the |
40 | // lines into a vertical wxBoxSizer | |
41 | wxSizer *CreateTextSizer( const wxString &message ); | |
d7260478 | 42 | #endif // wxUSE_STATTEXT // && wxUSE_TEXTCTRL |
82c9f85c | 43 | |
1e6feb95 | 44 | #if wxUSE_BUTTON |
92afa2b1 RR |
45 | // places buttons into a horizontal wxBoxSizer |
46 | wxSizer *CreateButtonSizer( long flags ); | |
1e6feb95 | 47 | #endif // wxUSE_BUTTON |
dfe1eee3 | 48 | |
f6bcfd97 | 49 | protected: |
dfe1eee3 VZ |
50 | // the return code from modal dialog |
51 | int m_returnCode; | |
7d9f12f3 | 52 | |
fc7a2a60 | 53 | DECLARE_NO_COPY_CLASS(wxDialogBase) |
7d9f12f3 VS |
54 | DECLARE_EVENT_TABLE() |
55 | WX_DECLARE_CONTROL_CONTAINER(); | |
c50f1fb9 VZ |
56 | }; |
57 | ||
7d9f12f3 | 58 | |
c67d6888 | 59 | #if defined(__WXUNIVERSAL__) && !defined(__WXMICROWIN__) |
0e0de6b8 VS |
60 | #include "wx/univ/dialog.h" |
61 | #else | |
62 | #if defined(__WXMSW__) | |
63 | #include "wx/msw/dialog.h" | |
64 | #elif defined(__WXMOTIF__) | |
65 | #include "wx/motif/dialog.h" | |
66 | #elif defined(__WXGTK__) | |
67 | #include "wx/gtk/dialog.h" | |
68 | #elif defined(__WXMAC__) | |
69 | #include "wx/mac/dialog.h" | |
e64df9bc DE |
70 | #elif defined(__WXCOCOA__) |
71 | #include "wx/cocoa/dialog.h" | |
0e0de6b8 VS |
72 | #elif defined(__WXPM__) |
73 | #include "wx/os2/dialog.h" | |
0e0de6b8 | 74 | #endif |
c801d85f KB |
75 | #endif |
76 | ||
77 | #endif | |
34138703 | 78 | // _WX_DIALOG_H_BASE_ |