]> git.saurik.com Git - wxWidgets.git/blob - include/wx/dialog.h
added missing consts
[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 #ifdef __GNUG__
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 // FIXME - temporary hack in absence of wxTLW !!
24 #ifndef wxTopLevelWindowNative
25 #include "wx/panel.h"
26 class WXDLLEXPORT wxDialogBase : public wxPanel
27 #else
28 class WXDLLEXPORT wxDialogBase : public wxTopLevelWindow
29 #endif
30 {
31 public:
32 wxDialogBase() { Init(); }
33 virtual ~wxDialogBase() { }
34
35 void Init();
36
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
42 #if wxUSE_STATTEXT && wxUSE_TEXTCTRL
43 // splits text up at newlines and places the
44 // lines into a vertical wxBoxSizer
45 wxSizer *CreateTextSizer( const wxString &message );
46 #endif // wxUSE_STATTEXT && wxUSE_TEXTCTRL
47
48 #if wxUSE_BUTTON
49 // places buttons into a horizontal wxBoxSizer
50 wxSizer *CreateButtonSizer( long flags );
51 #endif // wxUSE_BUTTON
52
53 protected:
54 // the return code from modal dialog
55 int m_returnCode;
56
57 // FIXME - temporary hack in absence of wxTLW !!
58 #ifdef wxTopLevelWindowNative
59 DECLARE_EVENT_TABLE()
60 WX_DECLARE_CONTROL_CONTAINER();
61 #endif
62 };
63
64
65 #if defined(__WXUNIVERSAL__) && !defined(__WXMICROWIN__)
66 #include "wx/univ/dialog.h"
67 #else
68 #if defined(__WXMSW__)
69 #include "wx/msw/dialog.h"
70 #elif defined(__WXMOTIF__)
71 #include "wx/motif/dialog.h"
72 #elif defined(__WXGTK__)
73 #include "wx/gtk/dialog.h"
74 #elif defined(__WXMAC__)
75 #include "wx/mac/dialog.h"
76 #elif defined(__WXPM__)
77 #include "wx/os2/dialog.h"
78 #elif defined(__WXSTUBS__)
79 #include "wx/stubs/dialog.h"
80 #endif
81 #endif
82
83 #endif
84 // _WX_DIALOG_H_BASE_