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