1 /////////////////////////////////////////////////////////////////////////////
3 // Purpose: wxDialogBase class
4 // Author: Vadim Zeitlin
8 // Copyright: (c) Vadim Zeitlin
9 // Licence: wxWindows licence
10 /////////////////////////////////////////////////////////////////////////////
12 #ifndef _WX_DIALOG_H_BASE_
13 #define _WX_DIALOG_H_BASE_
15 #if defined(__GNUG__) && !defined(NO_GCC_PRAGMA)
16 #pragma interface "dialogbase.h"
20 #include "wx/containr.h"
21 #include "wx/toplevel.h"
23 class WXDLLEXPORT wxSizer
;
24 class WXDLLEXPORT wxStdDialogButtonSizer
;
26 #define wxDIALOG_NO_PARENT 0x0001 // Don't make owned by apps top window
29 # ifdef __SMARTPHONE__
30 # define wxDEFAULT_DIALOG_STYLE (wxMAXIMIZE | wxCAPTION)
32 # define wxDEFAULT_DIALOG_STYLE (0)
35 # define wxDEFAULT_DIALOG_STYLE (wxSYSTEM_MENU | wxCAPTION | wxCLOSE_BOX)
38 WXDLLEXPORT_DATA(extern const wxChar
*) wxDialogNameStr
;
40 class WXDLLEXPORT wxDialogBase
: public wxTopLevelWindow
43 wxDialogBase() { Init(); }
44 virtual ~wxDialogBase() { }
48 // the modal dialogs have a return code - usually the id of the last
50 void SetReturnCode(int returnCode
) { m_returnCode
= returnCode
; }
51 int GetReturnCode() const { return m_returnCode
; }
53 #if wxUSE_STATTEXT // && wxUSE_TEXTCTRL
54 // splits text up at newlines and places the
55 // lines into a vertical wxBoxSizer
56 wxSizer
*CreateTextSizer( const wxString
&message
);
57 #endif // wxUSE_STATTEXT // && wxUSE_TEXTCTRL
60 // places buttons into a horizontal wxBoxSizer
61 wxSizer
*CreateButtonSizer( long flags
);
62 wxStdDialogButtonSizer
*CreateStdDialogButtonSizer( long flags
);
63 #endif // wxUSE_BUTTON
66 // the return code from modal dialog
69 DECLARE_NO_COPY_CLASS(wxDialogBase
)
71 WX_DECLARE_CONTROL_CONTAINER();
75 #if defined(__WXUNIVERSAL__) && !defined(__WXMICROWIN__)
76 #include "wx/univ/dialog.h"
78 #if defined(__WXPALMOS__)
79 #include "wx/palmos/dialog.h"
80 #elif defined(__WXMSW__)
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"
88 #elif defined(__WXCOCOA__)
89 #include "wx/cocoa/dialog.h"
90 #elif defined(__WXPM__)
91 #include "wx/os2/dialog.h"