msgdlg.h 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. /////////////////////////////////////////////////////////////////////////////
  2. // Name: wx/gtk1/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 __MSGDLG_H__
  11. #define __MSGDLG_H__
  12. #include "wx/defs.h"
  13. #include "wx/dialog.h"
  14. // type is an 'or' (|) of wxOK, wxCANCEL, wxYES_NO
  15. // Returns wxYES/NO/OK/CANCEL
  16. extern WXDLLIMPEXP_DATA_CORE(const wxChar) wxMessageBoxCaptionStr[];
  17. class WXDLLIMPEXP_CORE wxMessageDialog: public wxDialog, public wxMessageDialogBase
  18. {
  19. public:
  20. wxMessageDialog(wxWindow *parent, const wxString& message,
  21. const wxString& caption = wxMessageBoxCaptionStr,
  22. long style = wxOK|wxCENTRE,
  23. const wxPoint& pos = wxDefaultPosition);
  24. virtual ~wxMessageDialog();
  25. int ShowModal();
  26. virtual bool Show( bool WXUNUSED(show) = true ) { return false; }
  27. protected:
  28. // implement some base class methods to do nothing to avoid asserts and
  29. // GTK warnings, since this is not a real wxDialog.
  30. virtual void DoSetSize(int WXUNUSED(x), int WXUNUSED(y),
  31. int WXUNUSED(width), int WXUNUSED(height),
  32. int WXUNUSED(sizeFlags) = wxSIZE_AUTO) {}
  33. virtual void DoMoveWindow(int WXUNUSED(x), int WXUNUSED(y),
  34. int WXUNUSED(width), int WXUNUSED(height)) {}
  35. private:
  36. wxString m_caption;
  37. wxString m_message;
  38. DECLARE_DYNAMIC_CLASS(wxMessageDialog)
  39. };
  40. #endif