]>
git.saurik.com Git - wxWidgets.git/blob - include/wx/dialog.h
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 #define wxDIALOG_NO_PARENT 0x0001 // Don't make owned by apps top window
26 # ifdef __SMARTPHONE__
27 # define wxDEFAULT_DIALOG_STYLE (wxMAXIMIZE | wxCAPTION)
29 # define wxDEFAULT_DIALOG_STYLE (0)
32 # define wxDEFAULT_DIALOG_STYLE (wxSYSTEM_MENU | wxCAPTION | wxCLOSE_BOX)
35 WXDLLEXPORT_DATA(extern const wxChar
*) wxDialogNameStr
;
37 class WXDLLEXPORT wxDialogBase
: public wxTopLevelWindow
40 wxDialogBase() { Init(); }
41 virtual ~wxDialogBase() { }
45 // the modal dialogs have a return code - usually the id of the last
47 void SetReturnCode(int returnCode
) { m_returnCode
= returnCode
; }
48 int GetReturnCode() const { return m_returnCode
; }
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
57 // places buttons into a horizontal wxBoxSizer
58 wxSizer
*CreateButtonSizer( long flags
);
59 #endif // wxUSE_BUTTON
62 // the return code from modal dialog
65 DECLARE_NO_COPY_CLASS(wxDialogBase
)
67 WX_DECLARE_CONTROL_CONTAINER();
71 #if defined(__WXUNIVERSAL__) && !defined(__WXMICROWIN__)
72 #include "wx/univ/dialog.h"
74 #if defined(__WXPALMOS__)
75 #include "wx/palmos/dialog.h"
76 #elif defined(__WXMSW__)
77 #include "wx/msw/dialog.h"
78 #elif defined(__WXMOTIF__)
79 #include "wx/motif/dialog.h"
80 #elif defined(__WXGTK__)
81 #include "wx/gtk/dialog.h"
82 #elif defined(__WXMAC__)
83 #include "wx/mac/dialog.h"
84 #elif defined(__WXCOCOA__)
85 #include "wx/cocoa/dialog.h"
86 #elif defined(__WXPM__)
87 #include "wx/os2/dialog.h"