- // based on message dialog style, returns exactly one of: wxICON_NONE,
- // wxICON_ERROR, wxICON_WARNING, wxICON_QUESTION, wxICON_INFORMATION
- long GetEffectiveIcon() const
- {
- if ( m_dialogStyle & wxICON_NONE )
- return wxICON_NONE;
- else if ( m_dialogStyle & wxICON_ERROR )
- return wxICON_ERROR;
- else if ( m_dialogStyle & wxICON_WARNING )
- return wxICON_WARNING;
- else if ( m_dialogStyle & wxICON_QUESTION )
- return wxICON_QUESTION;
- else if ( m_dialogStyle & wxICON_INFORMATION )
- return wxICON_INFORMATION;
- else if ( m_dialogStyle & wxYES )
- return wxICON_QUESTION;
- else
- return wxICON_INFORMATION;
- }
-
-
- // for the platforms not supporting separate main and extended messages
- // this function should be used to combine both of them in a single string
- wxString GetFullMessage() const
- {
- wxString msg = m_message;
- if ( !m_extendedMessage.empty() )
- msg << "\n\n" << m_extendedMessage;
-
- return msg;
- }
-
- wxString m_message,
- m_extendedMessage,
- m_caption;
- long m_dialogStyle;
-
- wxDECLARE_NO_COPY_CLASS(wxMessageDialogBase);
-};
-
-// this is a helper class for native wxMessageDialog implementations which need
-// to store the custom button labels as member variables and then use them in
-// ShowModal() (there could conceivably be a port which would have some native
-// functions for setting these labels immediately and we also don't need to
-// store them at all if custom labels are not supported, which is why we do
-// this in a separate class and not wxMessageDialogBase itself)
-#if defined(__WXCOCOA__) || \
- defined(__WXGTK20__) || \
- defined(__WXMAC__) || \
- defined(__WXMSW__)
-
-class WXDLLIMPEXP_CORE wxMessageDialogWithCustomLabels
- : public wxMessageDialogBase
-{
-public:
- // ctors
- wxMessageDialogWithCustomLabels() { }
- wxMessageDialogWithCustomLabels(wxWindow *parent,
- const wxString& message,
- const wxString& caption,
- long style)
- : wxMessageDialogBase(parent, message, caption, style)
- {
- }
-