]> git.lyx.org Git - lyx.git/blobdiff - src/insets/Inset.h
Do not output deleted rows columns if show changes in output is false
[lyx.git] / src / insets / Inset.h
index 302c958a1eb756bec50013a1047e514564904dd2..cffaf77c6ea7ac5bd4a3b83d5ba70897afe44744 100644 (file)
@@ -20,6 +20,7 @@
 #include "InsetLayout.h"
 #include "LayoutEnums.h"
 #include "OutputEnums.h"
+#include "OutputParams.h"
 
 #include "support/strfwd.h"
 #include "support/types.h"
@@ -242,7 +243,7 @@ public:
        /// Don't eliminate empty paragraphs
        virtual bool allowEmpty() const;
        /// Force inset into LTR environment if surroundings are RTL
-       virtual bool forceLTR() const;
+       virtual bool forceLTR(OutputParams const &) const;
        /// whether to include this inset in the strings generated for the TOC
        virtual bool isInToc() const;
 
@@ -423,6 +424,10 @@ public:
        /// if this inset has paragraphs should they be forced to use a
        /// local font language switch?
        virtual bool forceLocalFontSwitch() const { return false; }
+       /// if this inset has paragraphs should they be forced to use a
+       /// font language switch that switches paragraph directions
+       /// (relevant with polyglossia only)?
+       virtual bool forceParDirectionSwitch() const { return false; }
        /// Does the inset force a specific encoding?
        virtual Encoding const * forcedEncoding(Encoding const *, Encoding const *) const
        { return 0; }
@@ -467,26 +472,16 @@ public:
        /// does this inset try to use all available space (like \\hfill does)?
        virtual bool isHfill() const { return false; }
 
-       // Describe how the inset should be typeset
+       virtual OutputParams::CtObject CtObject(OutputParams const &) const { return OutputParams::CT_NORMAL; }
+
        enum DisplayType {
                Inline = 0,
-               // break row before this inset
-               BreakBefore = 1,
-               // break row after this inset
-               BreakAfter = 2,
-               // optionally break row after this inset (not used yet)
-               CanBreakAfter = 4,
-               // specify an alignment (left, right) for a display inset (default is center)
-               AlignLeft = 8,
-               AlignRight = 16,
-               // do not allow cursor to go at the end of the row before
-               // a display inset (not used yet)
-               NoBoundary = 32,
-               // A display inset breaks row at both ends
-               Display = BreakBefore | BreakAfter
+               AlignLeft,
+               AlignCenter,
+               AlignRight
        };
 
-       /// How should this inset be typeset?
+       /// should we have a non-filled line before this inset?
        virtual DisplayType display() const { return Inline; }
        /// indentation before this inset (only needed for displayed hull insets with fleqn option)
        virtual int indent(BufferView const &) const { return 0; }
@@ -599,6 +594,8 @@ public:
         */
        virtual bool resetFontEdit() const;
 
+       /// does the inset contain changes ?
+       virtual bool isChanged() const { return false; }
        /// set the change for the entire inset
        virtual void setChange(Change const &) {}
        /// accept the changes within the inset
@@ -646,21 +643,6 @@ protected:
        Buffer * buffer_;
 };
 
-
-inline Inset::DisplayType operator|(Inset::DisplayType const d1,
-                                    Inset::DisplayType const d2)
-{
-       return static_cast<Inset::DisplayType>(int(d1) | int(d2));
-}
-
-
-inline Inset::DisplayType operator&(Inset::DisplayType const d1,
-                                    Inset::DisplayType const d2)
-{
-       return static_cast<Inset::DisplayType>(int(d1) & int(d2));
-}
-
-
 } // namespace lyx
 
 #endif