X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/9bb9964e261781d575353864cc027b3ca8ba445e..66f2aa61c3c7bc326f3287739eded70ca61f775d:/include/wx/private/markupparser.h diff --git a/include/wx/private/markupparser.h b/include/wx/private/markupparser.h index e0eb0a8099..9ae44ac5e0 100644 --- a/include/wx/private/markupparser.h +++ b/include/wx/private/markupparser.h @@ -70,10 +70,15 @@ struct wxMarkupSpanAttributes // wxMarkupParserOutput: gathers the results of parsing markup. // ---------------------------------------------------------------------------- +// A class deriving directly from this one needs to implement all the pure +// virtual functions below but as the handling of all simple tags (bold, italic +// &c) is often very similar, it is usually more convenient to inherit from +// wxMarkupParserFontOutput defined in wx/private/markupparserfont.h instead. class wxMarkupParserOutput { public: wxMarkupParserOutput() { } + virtual ~wxMarkupParserOutput() { } // Virtual functions called by wxMarkupParser while parsing the markup. @@ -136,6 +141,11 @@ public: // interpreted as tag opening characters. static wxString Quote(const wxString& text); + // Strip markup from a string, i.e. simply remove all tags and replace + // XML entities with their values (or with "&&" in case of "&" to + // prevent it from being interpreted as mnemonic marker). + static wxString Strip(const wxString& text); + private: // Simple struct combining the name of a tag and its attributes. struct TagAndAttrs