]> git.lyx.org Git - lyx.git/blobdiff - src/insets/Inset.h
New DocBook support
[lyx.git] / src / insets / Inset.h
index e57a61bd9902a3bb2102b979adfbe0c2c9fa7b76..4ef73db0acbcfb1aacc7a4d45813cf916b1e0a3e 100644 (file)
@@ -130,7 +130,7 @@ public:
        /// initialize view for this inset.
        /**
          * This is typically used after this inset is created interactively.
-         * Intented purpose is to sanitize internal state with regard to current
+         * Intended purpose is to sanitize internal state with regard to current
          * Buffer.
          **/
        virtual void initView() {}
@@ -341,7 +341,7 @@ public:
        virtual int plaintext(odocstringstream &, OutputParams const &,
                              size_t max_length = INT_MAX) const = 0;
        /// docbook output
-       virtual int docbook(odocstream & os, OutputParams const &) const;
+       virtual void docbook(XMLStream &, OutputParams const &) const;
        /// XHTML output
        /// the inset is expected to write XHTML to the XMLStream
        /// \return any "deferred" material that should be written outside the
@@ -469,6 +469,8 @@ public:
        virtual InsetLayout const & getLayout() const;
        ///
        virtual bool isPassThru() const { return getLayout().isPassThru(); }
+       /// Is this inset embedded in a title?
+       virtual bool isInTitle() const { return false; }
        /// Is this inset's layout defined in the document's textclass?
        bool undefined() const;
        /// should this inset be handled like a normal character?
@@ -491,12 +493,14 @@ public:
                BreakBefore = 1 << 0,
                // break row after this inset
                BreakAfter = 1 << 1,
+               // it is possible to break after this inset
+               CanBreakAfter = 1 << 2,
                // force new (maybe empty) row after this inset
-               RowAfter = 1 << 2,
+               RowAfter = 1 << 3,
                // specify an alignment (left, right) for a display inset
                // (default is center)
-               AlignLeft = 1 << 3,
-               AlignRight = 1 << 4,
+               AlignLeft = 1 << 4,
+               AlignRight = 1 << 5,
                // A display inset breaks row at both ends
                Display = BreakBefore | BreakAfter
        };
@@ -509,7 +513,7 @@ public:
        virtual LyXAlignment contentAlignment() const { return LYX_ALIGN_NONE; }
        /// should we break lines after this inset?
        virtual bool isLineSeparator() const { return false; }
-       /// should paragraph indendation be omitted in any case?
+       /// should paragraph indentation be omitted in any case?
        virtual bool neverIndent() const { return false; }
        /// dumps content to lyxerr
        virtual void dump() const;
@@ -532,7 +536,7 @@ public:
        virtual Text * getText(int /*num*/) const { return 0; }
 
        /** Adds a LaTeX snippet to the Preview Loader for transformation
-        *  into a bitmap image. Does not start the laoding process.
+        *  into a bitmap image. Does not start the loading process.
         *
         *  Most insets have no interest in this capability, so the method
         *  defaults to empty.
@@ -603,7 +607,7 @@ public:
         * are reset during editing operations.
         * For copy/paste operations the language is never changed, since
         * the language of a given text never changes if the text is
-        * formatted differently, while other font attribues like size may
+        * formatted differently, while other font attributes like size may
         * need to change if the text is copied from one environment to
         * another one.
         * If this method returns false no font attribute is reset.
@@ -648,7 +652,7 @@ protected:
        /** The real dispatcher.
         *  Gets normally called from Cursor::dispatch(). Cursor::dispatch()
         *  assumes the common case of 'LFUN handled, need update'.
-        *  This has to be overriden by calling Cursor::undispatched() or
+        *  This has to be overridden by calling Cursor::undispatched() or
         *  Cursor::noScreenUpdate() if appropriate.
         *  If you need to call the dispatch method of some inset directly
         *  you may have to explicitly request an update at that place. Don't