]>
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 | |
65571936 | 9 | // Licence: wxWindows licence |
dfe1eee3 VZ |
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 | |
acf2ac37 RR |
23 | class WXDLLEXPORT wxSizer; |
24 | class WXDLLEXPORT wxStdDialogButtonSizer; | |
25 | ||
8b5ef6cf VZ |
26 | #define wxDIALOG_NO_PARENT 0x0001 // Don't make owned by apps top window |
27 | ||
568883a4 | 28 | #ifdef __WXWINCE__ |
af2799b7 WS |
29 | # ifdef __SMARTPHONE__ |
30 | # define wxDEFAULT_DIALOG_STYLE (wxMAXIMIZE | wxCAPTION) | |
31 | # else | |
32 | # define wxDEFAULT_DIALOG_STYLE (0) | |
33 | # endif | |
568883a4 | 34 | #else // !__WXWINCE__ |
af2799b7 | 35 | # define wxDEFAULT_DIALOG_STYLE (wxSYSTEM_MENU | wxCAPTION | wxCLOSE_BOX) |
568883a4 | 36 | #endif |
8b5ef6cf | 37 | |
0cc1d4ff MB |
38 | WXDLLEXPORT_DATA(extern const wxChar*) wxDialogNameStr; |
39 | ||
7d9f12f3 | 40 | class WXDLLEXPORT wxDialogBase : public wxTopLevelWindow |
c50f1fb9 | 41 | { |
dfe1eee3 | 42 | public: |
6463b9f5 | 43 | wxDialogBase() { Init(); } |
82c9f85c VZ |
44 | virtual ~wxDialogBase() { } |
45 | ||
7d9f12f3 | 46 | void Init(); |
82c9f85c | 47 | |
dfe1eee3 VZ |
48 | // the modal dialogs have a return code - usually the id of the last |
49 | // pressed button | |
50 | void SetReturnCode(int returnCode) { m_returnCode = returnCode; } | |
51 | int GetReturnCode() const { return m_returnCode; } | |
52 | ||
d7260478 | 53 | #if wxUSE_STATTEXT // && wxUSE_TEXTCTRL |
92afa2b1 RR |
54 | // splits text up at newlines and places the |
55 | // lines into a vertical wxBoxSizer | |
56 | wxSizer *CreateTextSizer( const wxString &message ); | |
d7260478 | 57 | #endif // wxUSE_STATTEXT // && wxUSE_TEXTCTRL |
82c9f85c | 58 | |
1e6feb95 | 59 | #if wxUSE_BUTTON |
92afa2b1 RR |
60 | // places buttons into a horizontal wxBoxSizer |
61 | wxSizer *CreateButtonSizer( long flags ); | |
acf2ac37 | 62 | wxStdDialogButtonSizer *CreateStdDialogButtonSizer( long flags ); |
1e6feb95 | 63 | #endif // wxUSE_BUTTON |
dfe1eee3 | 64 | |
f6bcfd97 | 65 | protected: |
dfe1eee3 VZ |
66 | // the return code from modal dialog |
67 | int m_returnCode; | |
7d9f12f3 | 68 | |
fc7a2a60 | 69 | DECLARE_NO_COPY_CLASS(wxDialogBase) |
7d9f12f3 VS |
70 | DECLARE_EVENT_TABLE() |
71 | WX_DECLARE_CONTROL_CONTAINER(); | |
c50f1fb9 VZ |
72 | }; |
73 | ||
7d9f12f3 | 74 | |
c67d6888 | 75 | #if defined(__WXUNIVERSAL__) && !defined(__WXMICROWIN__) |
0e0de6b8 VS |
76 | #include "wx/univ/dialog.h" |
77 | #else | |
4055ed82 | 78 | #if defined(__WXPALMOS__) |
ffecfa5a JS |
79 | #include "wx/palmos/dialog.h" |
80 | #elif defined(__WXMSW__) | |
0e0de6b8 VS |
81 | #include "wx/msw/dialog.h" |
82 | #elif defined(__WXMOTIF__) | |
83 | #include "wx/motif/dialog.h" | |
84 | #elif defined(__WXGTK__) | |
85 | #include "wx/gtk/dialog.h" | |
86 | #elif defined(__WXMAC__) | |
87 | #include "wx/mac/dialog.h" | |
e64df9bc DE |
88 | #elif defined(__WXCOCOA__) |
89 | #include "wx/cocoa/dialog.h" | |
0e0de6b8 VS |
90 | #elif defined(__WXPM__) |
91 | #include "wx/os2/dialog.h" | |
0e0de6b8 | 92 | #endif |
c801d85f KB |
93 | #endif |
94 | ||
95 | #endif | |
34138703 | 96 | // _WX_DIALOG_H_BASE_ |