]> git.saurik.com Git - wxWidgets.git/blame - include/wx/dialog.h
reSWIGged
[wxWidgets.git] / include / wx / dialog.h
CommitLineData
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
8b5ef6cf
VZ
23#define wxDIALOG_NO_PARENT 0x0001 // Don't make owned by apps top window
24
568883a4
RR
25#ifdef __WXWINCE__
26 #define wxDEFAULT_DIALOG_STYLE (0)
27#else // !__WXWINCE__
28 #define wxDEFAULT_DIALOG_STYLE (wxSYSTEM_MENU | wxCAPTION | wxCLOSE_BOX)
29#endif
8b5ef6cf 30
0cc1d4ff
MB
31WXDLLEXPORT_DATA(extern const wxChar*) wxDialogNameStr;
32
7d9f12f3 33class WXDLLEXPORT wxDialogBase : public wxTopLevelWindow
c50f1fb9 34{
dfe1eee3 35public:
6463b9f5 36 wxDialogBase() { Init(); }
82c9f85c
VZ
37 virtual ~wxDialogBase() { }
38
7d9f12f3 39 void Init();
82c9f85c 40
dfe1eee3
VZ
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
d7260478 46#if wxUSE_STATTEXT // && wxUSE_TEXTCTRL
92afa2b1
RR
47 // splits text up at newlines and places the
48 // lines into a vertical wxBoxSizer
49 wxSizer *CreateTextSizer( const wxString &message );
d7260478 50#endif // wxUSE_STATTEXT // && wxUSE_TEXTCTRL
82c9f85c 51
1e6feb95 52#if wxUSE_BUTTON
92afa2b1
RR
53 // places buttons into a horizontal wxBoxSizer
54 wxSizer *CreateButtonSizer( long flags );
1e6feb95 55#endif // wxUSE_BUTTON
dfe1eee3 56
f6bcfd97 57protected:
dfe1eee3
VZ
58 // the return code from modal dialog
59 int m_returnCode;
7d9f12f3 60
fc7a2a60 61 DECLARE_NO_COPY_CLASS(wxDialogBase)
7d9f12f3
VS
62 DECLARE_EVENT_TABLE()
63 WX_DECLARE_CONTROL_CONTAINER();
c50f1fb9
VZ
64};
65
7d9f12f3 66
c67d6888 67#if defined(__WXUNIVERSAL__) && !defined(__WXMICROWIN__)
0e0de6b8
VS
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"
e64df9bc
DE
78 #elif defined(__WXCOCOA__)
79 #include "wx/cocoa/dialog.h"
0e0de6b8
VS
80 #elif defined(__WXPM__)
81 #include "wx/os2/dialog.h"
0e0de6b8 82 #endif
c801d85f
KB
83#endif
84
85#endif
34138703 86 // _WX_DIALOG_H_BASE_