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