]>
Commit | Line | Data |
---|---|---|
13a7abf9 | 1 | ///////////////////////////////////////////////////////////////////////////// |
e5b50758 | 2 | // Name: wx/gtk/msgdlg.h |
13a7abf9 VS |
3 | // Purpose: wxMessageDialog for GTK+2 |
4 | // Author: Vaclav Slavik | |
5 | // Modified by: | |
6 | // Created: 2003/02/28 | |
7 | // RCS-ID: $Id$ | |
8 | // Copyright: (c) Vaclav Slavik, 2003 | |
e5b50758 | 9 | // Licence: wxWindows licence |
13a7abf9 VS |
10 | ///////////////////////////////////////////////////////////////////////////// |
11 | ||
2afb9e16 VZ |
12 | #ifndef _WX_GTK_MSGDLG_H_ |
13 | #define _WX_GTK_MSGDLG_H_ | |
13a7abf9 | 14 | |
92763588 | 15 | class WXDLLIMPEXP_CORE wxMessageDialog : public wxMessageDialogWithCustomLabels |
13a7abf9 VS |
16 | { |
17 | public: | |
18 | wxMessageDialog(wxWindow *parent, const wxString& message, | |
19 | const wxString& caption = wxMessageBoxCaptionStr, | |
20 | long style = wxOK|wxCENTRE, | |
21 | const wxPoint& pos = wxDefaultPosition); | |
22 | ||
2afb9e16 | 23 | virtual int ShowModal(); |
92763588 | 24 | virtual bool Show(bool WXUNUSED(show) = true) { return false; } |
b2ce5e1b RD |
25 | |
26 | protected: | |
27 | // implement some base class methods to do nothing to avoid asserts and | |
28 | // GTK warnings, since this is not a real wxDialog. | |
3db7220e VZ |
29 | virtual void DoSetSize(int WXUNUSED(x), int WXUNUSED(y), |
30 | int WXUNUSED(width), int WXUNUSED(height), | |
31 | int WXUNUSED(sizeFlags) = wxSIZE_AUTO) {} | |
32 | virtual void DoMoveWindow(int WXUNUSED(x), int WXUNUSED(y), | |
33 | int WXUNUSED(width), int WXUNUSED(height)) {} | |
13a7abf9 VS |
34 | |
35 | private: | |
92763588 VZ |
36 | // override to use stock GTK+ defaults instead of just string ones |
37 | virtual wxString GetDefaultYesLabel() const; | |
38 | virtual wxString GetDefaultNoLabel() const; | |
39 | virtual wxString GetDefaultOKLabel() const; | |
40 | virtual wxString GetDefaultCancelLabel() const; | |
41 | ||
e08931c0 VZ |
42 | // override to convert wx mnemonics to GTK+ ones and handle stock ids |
43 | virtual void DoSetCustomLabel(wxString& var, const ButtonLabel& label); | |
92763588 | 44 | |
2afb9e16 VZ |
45 | // create the real GTK+ dialog: this is done from ShowModal() to allow |
46 | // changing the message between constructing the dialog and showing it | |
47 | void GTKCreateMsgDialog(); | |
13a7abf9 VS |
48 | |
49 | DECLARE_DYNAMIC_CLASS(wxMessageDialog) | |
50 | }; | |
51 | ||
2afb9e16 | 52 | #endif // _WX_GTK_MSGDLG_H_ |