]> git.saurik.com Git - wxWidgets.git/blob - include/wx/gtk/msgdlg.h
Fix wxPropertyGrid::GetPropertyRect when the last item is collapsed.
[wxWidgets.git] / include / wx / gtk / msgdlg.h
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 = wxMessageBoxCaptionStr,
19 long style = wxOK|wxCENTRE,
20 const wxPoint& pos = wxDefaultPosition);
21
22 virtual int ShowModal();
23 virtual bool Show(bool WXUNUSED(show) = true) { 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.
28 virtual void DoSetSize(int WXUNUSED(x), int WXUNUSED(y),
29 int WXUNUSED(width), int WXUNUSED(height),
30 int WXUNUSED(sizeFlags) = wxSIZE_AUTO) {}
31 virtual void DoMoveWindow(int WXUNUSED(x), int WXUNUSED(y),
32 int WXUNUSED(width), int WXUNUSED(height)) {}
33 // override to convert wx mnemonics to GTK+ ones and handle stock ids
34 virtual void DoSetCustomLabel(wxString& var, const ButtonLabel& label);
35
36 private:
37 // override to use stock GTK+ defaults instead of just string ones
38 virtual wxString GetDefaultYesLabel() const;
39 virtual wxString GetDefaultNoLabel() const;
40 virtual wxString GetDefaultOKLabel() const;
41 virtual wxString GetDefaultCancelLabel() const;
42 virtual wxString GetDefaultHelpLabel() const;
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 DECLARE_DYNAMIC_CLASS(wxMessageDialog)
49 };
50
51 #endif // _WX_GTK_MSGDLG_H_