]> git.lyx.org Git - lyx.git/blobdiff - src/output_xhtml.h
Comment.
[lyx.git] / src / output_xhtml.h
index 4b6c297e85fd907139f51f07b734e98cc73d2297..1b68261be34f34db94f61c56a715dd895d15bee2 100644 (file)
@@ -23,6 +23,9 @@ class Buffer;
 class OutputParams;
 class Text;
 
+// Inspiration for the *Tag structs and for XHTMLStream
+// came from MathStream and its cousins.
+
 struct StartTag {
        ///
        StartTag(std::string const & tag) : tag_(tag) {}
@@ -57,6 +60,9 @@ struct EndTag {
 // Tags like <img />
 struct CompTag {
        ///
+       CompTag(std::string const & tag)
+               : tag_(tag) {}
+       ///
        CompTag(std::string const & tag, std::string const & attr)
                : tag_(tag), attr_(attr) {}
        /// <tag_ attr_ />
@@ -86,6 +92,8 @@ public:
        ///
        XHTMLStream & operator<<(docstring const &);
        ///
+       XHTMLStream & operator<<(const char *);
+       ///
        XHTMLStream & operator<<(char_type);
        ///
        XHTMLStream & operator<<(StartTag const &);
@@ -93,12 +101,20 @@ public:
        XHTMLStream & operator<<(EndTag const &);
        ///
        XHTMLStream & operator<<(CompTag const &);
+       /// A trivial struct that functions as a stream modifier.
+       /// << NextRaw() causes the next string-like thing sent to the
+       /// stream not to be escaped.
+       struct NextRaw {};
+       ///
+       XHTMLStream & operator<<(NextRaw const &);
 private:
        ///
        void clearTagDeque();
        ///
        bool isTagOpen(std::string const &);
        ///
+       void writeError(std::string const &);
+       ///
        odocstream & os_;
        ///
        // int tab_;
@@ -110,6 +126,8 @@ private:
        TagDeque pending_tags_;
        /// remembers the history, so we can make sure we nest properly.
        TagStack tag_stack_;
+       /// 
+       bool nextraw_;
 };
 
 ///