]>
Commit | Line | Data |
---|---|---|
2bda0e17 | 1 | ///////////////////////////////////////////////////////////////////////////// |
e5b50758 | 2 | // Name: wx/msw/msgdlg.h |
2bda0e17 KB |
3 | // Purpose: wxMessageDialog class |
4 | // Author: Julian Smart | |
5 | // Modified by: | |
6 | // Created: 01/02/97 | |
7 | // RCS-ID: $Id$ | |
bbcdf8bc | 8 | // Copyright: (c) Julian Smart |
598ddd96 | 9 | // Licence: wxWindows licence |
2bda0e17 KB |
10 | ///////////////////////////////////////////////////////////////////////////// |
11 | ||
bbcdf8bc JS |
12 | #ifndef _WX_MSGBOXDLG_H_ |
13 | #define _WX_MSGBOXDLG_H_ | |
2bda0e17 | 14 | |
ede7b017 | 15 | class WXDLLIMPEXP_CORE wxMessageDialog : public wxMessageDialogBase |
2bda0e17 | 16 | { |
2bda0e17 | 17 | public: |
2afb9e16 VZ |
18 | wxMessageDialog(wxWindow *parent, |
19 | const wxString& message, | |
20 | const wxString& caption = wxMessageBoxCaptionStr, | |
21 | long style = wxOK|wxCENTRE, | |
22 | const wxPoint& WXUNUSED(pos) = wxDefaultPosition) | |
ede7b017 | 23 | : wxMessageDialogBase(parent, message, caption, style) |
2afb9e16 | 24 | { |
1d89da8a | 25 | m_hook = NULL; |
2afb9e16 VZ |
26 | } |
27 | ||
2afb9e16 | 28 | virtual int ShowModal(); |
22f3361e | 29 | |
4b02d42e VZ |
30 | // implementation-specific |
31 | ||
32 | // return the font used for the text in the message box | |
33 | static wxFont GetMessageFont(); | |
34 | ||
dd53b347 VZ |
35 | protected: |
36 | // Override this as task dialogs are always centered on parent. | |
37 | virtual void DoCentre(int dir); | |
38 | ||
1d89da8a | 39 | private: |
23e00c55 VZ |
40 | // hook procedure used to adjust the message box beyond what the standard |
41 | // MessageBox() function can do for us | |
1d89da8a VZ |
42 | static WXLRESULT wxCALLBACK HookFunction(int code, WXWPARAM, WXLPARAM); |
43 | ||
4b02d42e VZ |
44 | static const struct ButtonAccessors |
45 | { | |
46 | int id; | |
47 | wxString (wxMessageDialog::*getter)() const; | |
48 | } ms_buttons[]; | |
49 | ||
50 | // replace the static text control with a text control in order to show | |
51 | // scrollbar (and also, incidentally, allow text selection) | |
52 | void ReplaceStaticWithEdit(); | |
53 | ||
23e00c55 VZ |
54 | // adjust the button labels |
55 | // | |
56 | // this is called from HookFunction() and our HWND is valid at this moment | |
57 | void AdjustButtonLabels(); | |
58 | ||
4b02d42e VZ |
59 | // offset all buttons starting from the first one given by dx to the right |
60 | void OffsetButtonsStartingFrom(int first, int dx); | |
61 | ||
ede7b017 VZ |
62 | // used by ShowModal() to display a message box when task dialogs |
63 | // aren't available. | |
64 | int ShowMessageBox(); | |
65 | ||
23e00c55 | 66 | |
1d89da8a VZ |
67 | WXHANDLE m_hook; // HHOOK used to position the message box |
68 | ||
ede7b017 | 69 | wxDECLARE_DYNAMIC_CLASS_NO_COPY(wxMessageDialog); |
2bda0e17 KB |
70 | }; |
71 | ||
72 | ||
2afb9e16 | 73 | #endif // _WX_MSGBOXDLG_H_ |