msgdlgg.h 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. /////////////////////////////////////////////////////////////////////////////
  2. // Name: wx/generic/msgdlgg.h
  3. // Purpose: Generic wxMessageDialog
  4. // Author: Julian Smart
  5. // Modified by:
  6. // Created: 01/02/97
  7. // Copyright: (c) Julian Smart
  8. // Licence: wxWindows licence
  9. /////////////////////////////////////////////////////////////////////////////
  10. #ifndef _WX_GENERIC_MSGDLGG_H_
  11. #define _WX_GENERIC_MSGDLGG_H_
  12. class WXDLLIMPEXP_FWD_CORE wxSizer;
  13. class WXDLLIMPEXP_CORE wxGenericMessageDialog : public wxMessageDialogBase
  14. {
  15. public:
  16. wxGenericMessageDialog(wxWindow *parent,
  17. const wxString& message,
  18. const wxString& caption = wxMessageBoxCaptionStr,
  19. long style = wxOK|wxCENTRE,
  20. const wxPoint& pos = wxDefaultPosition);
  21. virtual int ShowModal();
  22. protected:
  23. // Creates a message dialog taking any options that have been set after
  24. // object creation into account such as custom labels.
  25. void DoCreateMsgdialog();
  26. void OnYes(wxCommandEvent& event);
  27. void OnNo(wxCommandEvent& event);
  28. void OnHelp(wxCommandEvent& event);
  29. void OnCancel(wxCommandEvent& event);
  30. // can be overridden to provide more contents to the dialog
  31. virtual void AddMessageDialogCheckBox(wxSizer *WXUNUSED(sizer)) { }
  32. virtual void AddMessageDialogDetails(wxSizer *WXUNUSED(sizer)) { }
  33. private:
  34. // Creates and returns a standard button sizer using the style of this
  35. // dialog and the custom labels, if any.
  36. //
  37. // May return NULL on smart phone platforms not using buttons at all.
  38. wxSizer *CreateMsgDlgButtonSizer();
  39. wxPoint m_pos;
  40. bool m_created;
  41. DECLARE_EVENT_TABLE()
  42. DECLARE_DYNAMIC_CLASS(wxGenericMessageDialog)
  43. };
  44. #endif // _WX_GENERIC_MSGDLGG_H_