msgdlg.h 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  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. #ifndef _WX_GTK_MSGDLG_H_
  11. #define _WX_GTK_MSGDLG_H_
  12. class WXDLLIMPEXP_CORE wxMessageDialog : public wxMessageDialogBase
  13. {
  14. public:
  15. wxMessageDialog(wxWindow *parent, const wxString& message,
  16. const wxString& caption = wxMessageBoxCaptionStr,
  17. long style = wxOK|wxCENTRE,
  18. const wxPoint& pos = wxDefaultPosition);
  19. virtual int ShowModal();
  20. virtual bool Show(bool WXUNUSED(show) = true) { return false; }
  21. protected:
  22. // implement some base class methods to do nothing to avoid asserts and
  23. // GTK warnings, since this is not a real wxDialog.
  24. virtual void DoSetSize(int WXUNUSED(x), int WXUNUSED(y),
  25. int WXUNUSED(width), int WXUNUSED(height),
  26. int WXUNUSED(sizeFlags) = wxSIZE_AUTO) {}
  27. virtual void DoMoveWindow(int WXUNUSED(x), int WXUNUSED(y),
  28. int WXUNUSED(width), int WXUNUSED(height)) {}
  29. // override to convert wx mnemonics to GTK+ ones and handle stock ids
  30. virtual void DoSetCustomLabel(wxString& var, const ButtonLabel& label);
  31. private:
  32. // override to use stock GTK+ defaults instead of just string ones
  33. virtual wxString GetDefaultYesLabel() const;
  34. virtual wxString GetDefaultNoLabel() const;
  35. virtual wxString GetDefaultOKLabel() const;
  36. virtual wxString GetDefaultCancelLabel() const;
  37. virtual wxString GetDefaultHelpLabel() const;
  38. // create the real GTK+ dialog: this is done from ShowModal() to allow
  39. // changing the message between constructing the dialog and showing it
  40. void GTKCreateMsgDialog();
  41. DECLARE_DYNAMIC_CLASS(wxMessageDialog)
  42. };
  43. #endif // _WX_GTK_MSGDLG_H_