]> git.saurik.com Git - wxWidgets.git/blob - include/wx/dialog.h
made SelectionToText and ToText public
[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 # ifdef __SMARTPHONE__
27 # define wxDEFAULT_DIALOG_STYLE (wxMAXIMIZE | wxCAPTION)
28 # else
29 # define wxDEFAULT_DIALOG_STYLE (0)
30 # endif
31 #else // !__WXWINCE__
32 # define wxDEFAULT_DIALOG_STYLE (wxSYSTEM_MENU | wxCAPTION | wxCLOSE_BOX)
33 #endif
34
35 WXDLLEXPORT_DATA(extern const wxChar*) wxDialogNameStr;
36
37 class WXDLLEXPORT wxDialogBase : public wxTopLevelWindow
38 {
39 public:
40 wxDialogBase() { Init(); }
41 virtual ~wxDialogBase() { }
42
43 void Init();
44
45 // the modal dialogs have a return code - usually the id of the last
46 // pressed button
47 void SetReturnCode(int returnCode) { m_returnCode = returnCode; }
48 int GetReturnCode() const { return m_returnCode; }
49
50 #if wxUSE_STATTEXT // && wxUSE_TEXTCTRL
51 // splits text up at newlines and places the
52 // lines into a vertical wxBoxSizer
53 wxSizer *CreateTextSizer( const wxString &message );
54 #endif // wxUSE_STATTEXT // && wxUSE_TEXTCTRL
55
56 #if wxUSE_BUTTON
57 // places buttons into a horizontal wxBoxSizer
58 wxSizer *CreateButtonSizer( long flags );
59 #endif // wxUSE_BUTTON
60
61 protected:
62 // the return code from modal dialog
63 int m_returnCode;
64
65 DECLARE_NO_COPY_CLASS(wxDialogBase)
66 DECLARE_EVENT_TABLE()
67 WX_DECLARE_CONTROL_CONTAINER();
68 };
69
70
71 #if defined(__WXUNIVERSAL__) && !defined(__WXMICROWIN__)
72 #include "wx/univ/dialog.h"
73 #else
74 #if defined(__WXMSW__)
75 #include "wx/msw/dialog.h"
76 #elif defined(__WXMOTIF__)
77 #include "wx/motif/dialog.h"
78 #elif defined(__WXGTK__)
79 #include "wx/gtk/dialog.h"
80 #elif defined(__WXMAC__)
81 #include "wx/mac/dialog.h"
82 #elif defined(__WXCOCOA__)
83 #include "wx/cocoa/dialog.h"
84 #elif defined(__WXPM__)
85 #include "wx/os2/dialog.h"
86 #endif
87 #endif
88
89 #endif
90 // _WX_DIALOG_H_BASE_