+
+ // this function is called by our public SetXXXLabels() and should assign
+ // the value to var with possibly some transformation (e.g. Cocoa version
+ // currently uses this to remove any accelerators from the button strings
+ // while GTK+ one handles stock items specifically here)
+ virtual void DoSetCustomLabel(wxString& var, const ButtonLabel& label)
+ {
+ var = label.GetAsString();
+ }
+
+ // these functions return the custom label or empty string and should be
+ // used only in specific circumstances such as creating the buttons with
+ // these labels (in which case it makes sense to only use a custom label if
+ // it was really given and fall back on stock label otherwise), use the
+ // Get{Yes,No,OK,Cancel}Label() methods above otherwise
+ const wxString& GetCustomYesLabel() const { return m_yes; }
+ const wxString& GetCustomNoLabel() const { return m_no; }
+ const wxString& GetCustomOKLabel() const { return m_ok; }
+ const wxString& GetCustomHelpLabel() const { return m_help; }
+ const wxString& GetCustomCancelLabel() const { return m_cancel; }
+
+private:
+ // these functions may be overridden to provide different defaults for the
+ // default button labels (this is used by wxGTK)
+ virtual wxString GetDefaultYesLabel() const { return wxGetTranslation("Yes"); }
+ virtual wxString GetDefaultNoLabel() const { return wxGetTranslation("No"); }
+ virtual wxString GetDefaultOKLabel() const { return wxGetTranslation("OK"); }
+ virtual wxString GetDefaultCancelLabel() const { return wxGetTranslation("Cancel"); }
+ virtual wxString GetDefaultHelpLabel() const { return wxGetTranslation("Help"); }
+
+ // labels for the buttons, initially empty meaning that the defaults should
+ // be used, use GetYes/No/OK/CancelLabel() to access them
+ wxString m_yes,
+ m_no,
+ m_ok,
+ m_cancel,
+ m_help;
+
+ wxDECLARE_NO_COPY_CLASS(wxMessageDialogBase);