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