]>
git.saurik.com Git - wxWidgets.git/blob - include/wx/dialog.h
e74ffcdeffa5e65d35ca1c35b3739307e7aeadd3
1 #ifndef _WX_DIALOG_H_BASE_
2 #define _WX_DIALOG_H_BASE_
4 class WXDLLEXPORT wxDialogBase
: public wxPanel
7 // functions to help with dialog layout
8 // ------------------------------------
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
;
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
);
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
);
26 // Returns the preferred size for the buttons in the dialog
27 wxSize
GetStandardButtonSize(bool hasCancel
= TRUE
);
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
,
37 bool hasCancel
= TRUE
);
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
42 long GetStandardTextHeight();
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"