]> git.saurik.com Git - wxWidgets.git/blob - include/wx/dialog.h
make it non mach-o carbon savvy
[wxWidgets.git] / include / wx / dialog.h
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
12 #ifndef _WX_DIALOG_H_BASE_
13 #define _WX_DIALOG_H_BASE_
14
15 #if defined(__GNUG__) && !defined(NO_GCC_PRAGMA)
16 #pragma interface "dialogbase.h"
17 #endif
18
19 #include "wx/defs.h"
20 #include "wx/containr.h"
21 #include "wx/toplevel.h"
22
23 #define wxDIALOG_NO_PARENT 0x0001 // Don't make owned by apps top window
24
25 #ifdef __WXWINCE__
26 #define wxDEFAULT_DIALOG_STYLE (0)
27 #else // !__WXWINCE__
28 #define wxDEFAULT_DIALOG_STYLE (wxSYSTEM_MENU | wxCAPTION | wxCLOSE_BOX)
29 #endif
30
31 WXDLLEXPORT_DATA(extern const wxChar*) wxDialogNameStr;
32
33 class WXDLLEXPORT wxDialogBase : public wxTopLevelWindow
34 {
35 public:
36 wxDialogBase() { Init(); }
37 virtual ~wxDialogBase() { }
38
39 void Init();
40
41 // the modal dialogs have a return code - usually the id of the last
42 // pressed button
43 void SetReturnCode(int returnCode) { m_returnCode = returnCode; }
44 int GetReturnCode() const { return m_returnCode; }
45
46 #if wxUSE_STATTEXT // && wxUSE_TEXTCTRL
47 // splits text up at newlines and places the
48 // lines into a vertical wxBoxSizer
49 wxSizer *CreateTextSizer( const wxString &message );
50 #endif // wxUSE_STATTEXT // && wxUSE_TEXTCTRL
51
52 #if wxUSE_BUTTON
53 // places buttons into a horizontal wxBoxSizer
54 wxSizer *CreateButtonSizer( long flags );
55 #endif // wxUSE_BUTTON
56
57 protected:
58 // the return code from modal dialog
59 int m_returnCode;
60
61 DECLARE_NO_COPY_CLASS(wxDialogBase)
62 DECLARE_EVENT_TABLE()
63 WX_DECLARE_CONTROL_CONTAINER();
64 };
65
66
67 #if defined(__WXUNIVERSAL__) && !defined(__WXMICROWIN__)
68 #include "wx/univ/dialog.h"
69 #else
70 #if defined(__WXMSW__)
71 #include "wx/msw/dialog.h"
72 #elif defined(__WXMOTIF__)
73 #include "wx/motif/dialog.h"
74 #elif defined(__WXGTK__)
75 #include "wx/gtk/dialog.h"
76 #elif defined(__WXMAC__)
77 #include "wx/mac/dialog.h"
78 #elif defined(__WXCOCOA__)
79 #include "wx/cocoa/dialog.h"
80 #elif defined(__WXPM__)
81 #include "wx/os2/dialog.h"
82 #endif
83 #endif
84
85 #endif
86 // _WX_DIALOG_H_BASE_