- // return the attribute having the valid font and colours: it uses the
- // attributes set in attr and falls back first to attrDefault and then to
- // the text control font/colours for those attributes which are not set
- static wxRichTextAttr Combine(const wxRichTextAttr& attr,
- const wxRichTextAttr& attrDef,
- const wxTextCtrlBase *text);
+ // Merges the given attributes. Does not affect 'this'. If compareWith
+ // is non-NULL, then it will be used to mask out those attributes that are the same in style
+ // and compareWith, for situations where we don't want to explicitly set inherited attributes.
+ bool Apply(const wxRichTextAttr& style, const wxRichTextAttr* compareWith = NULL);
+
+ // Merges the given attributes and returns the result. Does not affect 'this'. If compareWith
+ // is non-NULL, then it will be used to mask out those attributes that are the same in style
+ // and compareWith, for situations where we don't want to explicitly set inherited attributes.
+ wxRichTextAttr Combine(const wxRichTextAttr& style, const wxRichTextAttr* compareWith = NULL) const;
+