wxGTK compile fixes for my wxMSW changes
[wxWidgets.git] / include / wx / dialog.h
1 #ifndef _WX_DIALOG_H_BASE_
2 #define _WX_DIALOG_H_BASE_
3
4 #include "wx/defs.h"
5 #include "wx/panel.h"
6
7 class WXDLLEXPORT wxDialogBase : public wxPanel
8 {
9 protected:
10 // functions to help with dialog layout
11 // ------------------------------------
12
13 // constants used in dialog layout
14 static const long LAYOUT_X_MARGIN;
15 static const long LAYOUT_Y_MARGIN;
16 static const long MARGIN_BETWEEN_BUTTONS;
17
18 // Split the message in lines putting them into the array and calculating
19 // the maximum line width/height which is returned as wxSize.
20 wxSize SplitTextMessage(const wxString& message, wxArrayString *lines);
21
22 // Creates the (possibly multiline) message, assuming each line has the
23 // size sizeText (which can be retrieved from SplitTextMessage). Returns
24 // the bottom border of the multiline text zone.
25 long CreateTextMessage(const wxArrayString& lines,
26 const wxPoint& posText,
27 const wxSize& sizeText);
28
29 // Returns the preferred size for the buttons in the dialog
30 wxSize GetStandardButtonSize(bool hasCancel = TRUE);
31
32 // Create the standard [Ok] and [Cancel] (if hasCancel) buttons centering
33 // them with respect to the dialog width wDialog at vertical position y.
34 // wButton and hButton is the size of the button (which can be retrieved
35 // from GetStandardButtonSize)
36 void CreateStandardButtons(long wDialog,
37 long y,
38 long wButton,
39 long hButton,
40 bool hasCancel = TRUE);
41
42 // Returns the standard height of single line text ctrl (it's not the same
43 // as the height of just text which may be retrieved from
44 // wxGetCharHeight())
45 long GetStandardTextHeight();
46 };
47
48 #if defined(__WXMSW__)
49 #include "wx/msw/dialog.h"
50 #elif defined(__WXMOTIF__)
51 #include "wx/motif/dialog.h"
52 #elif defined(__WXGTK__)
53 #include "wx/gtk/dialog.h"
54 #elif defined(__WXQT__)
55 #include "wx/qt/dialog.h"
56 #elif defined(__WXMAC__)
57 #include "wx/mac/dialog.h"
58 #elif defined(__WXSTUBS__)
59 #include "wx/stubs/dialog.h"
60 #endif
61
62 #endif
63 // _WX_DIALOG_H_BASE_