]> git.lyx.org Git - lyx.git/blobdiff - src/insets/InsetText.h
New DocBook support
[lyx.git] / src / insets / InsetText.h
index eb52bc81b66020c1e68de411a831d3f6d869a18e..d86bfb75d339456def755b311329633fed9f575a 100644 (file)
@@ -81,9 +81,7 @@ public:
        int plaintext(odocstringstream & ods, OutputParams const & op,
                      size_t max_length = INT_MAX) const;
        ///
-       int docbook(odocstream &, OutputParams const &) const;
-       ///
-       docstring xhtml(XHTMLStream &, OutputParams const &) const;
+       docstring xhtml(XMLStream &, OutputParams const &) const;
        ///
        enum XHTMLOptions {
                JustText = 0,
@@ -93,11 +91,15 @@ public:
                WriteEverything = 7
        };
        ///
-       docstring insetAsXHTML(XHTMLStream &, OutputParams const &, 
+       docstring insetAsXHTML(XMLStream &, OutputParams const &,
                               XHTMLOptions) const;
        ///
+       void docbook(XMLStream &, OutputParams const &, XHTMLOptions opts) const;
+       ///
+       void docbook(XMLStream &, OutputParams const &) const;
+       ///
        void validate(LaTeXFeatures & features) const;
-       
+
        /// return the argument(s) only
        void getArgs(otexstream & os, OutputParams const &, bool const post = false) const;
 
@@ -124,6 +126,10 @@ public:
        ///
        void fixParagraphsFont();
 
+       /// does the inset contain changes ?
+       bool isChanged() const { return is_changed_; }
+       /// this is const because value is mutable
+       void isChanged(bool ic) const { is_changed_ = ic; }
        /// set the change for the entire inset
        void setChange(Change const & change);
        /// accept the changes within the inset
@@ -157,6 +163,8 @@ public:
        ///
        virtual bool allowMultiPar() const { return getLayout().isMultiPar(); }
        ///
+       bool isInTitle() const { return intitle_context_; }
+       ///
        /// should paragraphs be forced to use the empty layout?
        virtual bool forcePlainLayout(idx_type = 0) const
                { return getLayout().forcePlainLayout(); }
@@ -168,8 +176,8 @@ public:
                { return getLayout().forcelocalfontswitch(); }
 
        /// Update the counters of this inset and of its contents
-       virtual void updateBuffer(ParIterator const &, UpdateType);
-       /// 
+       virtual void updateBuffer(ParIterator const &, UpdateType, bool const deleted = false);
+       ///
        void setMacrocontextPositionRecursive(DocIterator const & pos);
        ///
        void toString(odocstream &) const;
@@ -202,10 +210,10 @@ public:
        ///
        void completionPosAndDim(Cursor const &, int & x, int & y, Dimension & dim) const;
        /// returns the text to be used as tooltip
-       /// \param prefix: a string that will preced the tooltip,
+       /// \param prefix: a string that will precede the tooltip,
        /// e.g., "Index: ".
        /// \param len: length of the resulting string
-       /// NOTE This routine is kind of slow. It's fine to use it within the 
+       /// NOTE This routine is kind of slow. It's fine to use it within the
        /// GUI, but definitely do not try to use it in updateBuffer or anything
        /// of that sort. (Note: unnecessary internal copies have been removed
        /// since the previous note. The efficiency would have to be assessed
@@ -223,6 +231,12 @@ public:
        ///
        bool confirmDeletion() const { return !text().empty(); }
 
+       ///
+       bool needsCProtection(bool const maintext = false,
+                             bool const fragile = false) const;
+       ///
+       bool hasCProtectContent(bool fragile = false) const;
+
 protected:
        ///
        void iterateForToc(DocIterator const & cdit, bool output_active,
@@ -239,6 +253,10 @@ private:
                                       TocBackend & backend) const;
        ///
        bool drawFrame_;
+       /// true if the inset contains change
+       mutable bool is_changed_;
+       ///
+       bool intitle_context_;
        ///
        ColorCode frame_color_;
        ///