]> git.saurik.com Git - wxWidgets.git/blame - include/wx/dialog.h
gtk_window_[un]fullscreen only available with GTK >= 2.2
[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
65571936 9// Licence: wxWindows licence
dfe1eee3
VZ
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 25#ifdef __WXWINCE__
af2799b7
WS
26# ifdef __SMARTPHONE__
27# define wxDEFAULT_DIALOG_STYLE (wxMAXIMIZE | wxCAPTION)
28# else
29# define wxDEFAULT_DIALOG_STYLE (0)
30# endif
568883a4 31#else // !__WXWINCE__
af2799b7 32# define wxDEFAULT_DIALOG_STYLE (wxSYSTEM_MENU | wxCAPTION | wxCLOSE_BOX)
568883a4 33#endif
8b5ef6cf 34
0cc1d4ff
MB
35WXDLLEXPORT_DATA(extern const wxChar*) wxDialogNameStr;
36
7d9f12f3 37class WXDLLEXPORT wxDialogBase : public wxTopLevelWindow
c50f1fb9 38{
dfe1eee3 39public:
6463b9f5 40 wxDialogBase() { Init(); }
82c9f85c
VZ
41 virtual ~wxDialogBase() { }
42
7d9f12f3 43 void Init();
82c9f85c 44
dfe1eee3
VZ
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
d7260478 50#if wxUSE_STATTEXT // && wxUSE_TEXTCTRL
92afa2b1
RR
51 // splits text up at newlines and places the
52 // lines into a vertical wxBoxSizer
53 wxSizer *CreateTextSizer( const wxString &message );
d7260478 54#endif // wxUSE_STATTEXT // && wxUSE_TEXTCTRL
82c9f85c 55
1e6feb95 56#if wxUSE_BUTTON
92afa2b1
RR
57 // places buttons into a horizontal wxBoxSizer
58 wxSizer *CreateButtonSizer( long flags );
1e6feb95 59#endif // wxUSE_BUTTON
dfe1eee3 60
f6bcfd97 61protected:
dfe1eee3
VZ
62 // the return code from modal dialog
63 int m_returnCode;
7d9f12f3 64
fc7a2a60 65 DECLARE_NO_COPY_CLASS(wxDialogBase)
7d9f12f3
VS
66 DECLARE_EVENT_TABLE()
67 WX_DECLARE_CONTROL_CONTAINER();
c50f1fb9
VZ
68};
69
7d9f12f3 70
c67d6888 71#if defined(__WXUNIVERSAL__) && !defined(__WXMICROWIN__)
0e0de6b8
VS
72 #include "wx/univ/dialog.h"
73#else
ffecfa5a
JS
74 #if defined(__PALMOS__)
75 #include "wx/palmos/dialog.h"
76 #elif defined(__WXMSW__)
0e0de6b8
VS
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"
e64df9bc
DE
84 #elif defined(__WXCOCOA__)
85 #include "wx/cocoa/dialog.h"
0e0de6b8
VS
86 #elif defined(__WXPM__)
87 #include "wx/os2/dialog.h"
0e0de6b8 88 #endif
c801d85f
KB
89#endif
90
91#endif
34138703 92 // _WX_DIALOG_H_BASE_