]>
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
25 #define wxDEFAULT_DIALOG_STYLE (wxSYSTEM_MENU | wxCAPTION | wxCLOSE_BOX)
27 WXDLLEXPORT_DATA(extern const wxChar
*) wxDialogNameStr
;
29 class WXDLLEXPORT wxDialogBase
: public wxTopLevelWindow
32 wxDialogBase() { Init(); }
33 virtual ~wxDialogBase() { }
37 // the modal dialogs have a return code - usually the id of the last
39 void SetReturnCode(int returnCode
) { m_returnCode
= returnCode
; }
40 int GetReturnCode() const { return m_returnCode
; }
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
49 // places buttons into a horizontal wxBoxSizer
50 wxSizer
*CreateButtonSizer( long flags
);
51 #endif // wxUSE_BUTTON
54 // the return code from modal dialog
57 DECLARE_NO_COPY_CLASS(wxDialogBase
)
59 WX_DECLARE_CONTROL_CONTAINER();
63 #if defined(__WXUNIVERSAL__) && !defined(__WXMICROWIN__)
64 #include "wx/univ/dialog.h"
66 #if defined(__WXMSW__)
67 #include "wx/msw/dialog.h"
68 #elif defined(__WXMOTIF__)
69 #include "wx/motif/dialog.h"
70 #elif defined(__WXGTK__)
71 #include "wx/gtk/dialog.h"
72 #elif defined(__WXMAC__)
73 #include "wx/mac/dialog.h"
74 #elif defined(__WXCOCOA__)
75 #include "wx/cocoa/dialog.h"
76 #elif defined(__WXPM__)
77 #include "wx/os2/dialog.h"