]> 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 6ce428f96a042a1190b6599db9a9a40614136bd7..cffaf77c6ea7ac5bd4a3b83d5ba70897afe44744 100644 (file)
 #include "InsetLayout.h"
 #include "LayoutEnums.h"
 #include "OutputEnums.h"
+#include "OutputParams.h"
 
 #include "support/strfwd.h"
 #include "support/types.h"
+#include "support/FileNameList.h"
 
 #include <climits>
 
@@ -38,11 +40,13 @@ class Cursor;
 class CursorSlice;
 class Dimension;
 class DocIterator;
+class Encoding;
 class FuncRequest;
 class FuncStatus;
 class InsetArgument;
-class InsetCollapsable;
+class InsetCollapsible;
 class InsetCommand;
+class InsetGraphics;
 class InsetIterator;
 class InsetLayout;
 class InsetList;
@@ -143,10 +147,10 @@ public:
        virtual InsetText * asInsetText() { return 0; }
        /// is this inset based on the InsetText class?
        virtual InsetText const * asInsetText() const { return 0; }
-       /// is this inset based on the InsetCollapsable class?
-       virtual InsetCollapsable * asInsetCollapsable() { return 0; }
-       /// is this inset based on the InsetCollapsable class?
-       virtual InsetCollapsable const * asInsetCollapsable() const { return 0; }
+       /// is this inset based on the InsetCollapsible class?
+       virtual InsetCollapsible * asInsetCollapsible() { return 0; }
+       /// is this inset based on the InsetCollapsible class?
+       virtual InsetCollapsible const * asInsetCollapsible() const { return 0; }
        /// is this inset based on the InsetTabular class?
        virtual InsetTabular * asInsetTabular() { return 0; }
        /// is this inset based on the InsetTabular class?
@@ -157,6 +161,10 @@ public:
        virtual InsetCommand const * asInsetCommand() const { return 0; }
        /// is this inset based on the InsetArgument class?
        virtual InsetArgument const * asInsetArgument() const { return nullptr; }
+       /// is this inset based on the InsetGraphics class?
+       virtual InsetGraphics * asInsetGraphics() { return 0; }
+       /// is this inset based on the InsetGraphics class?
+       virtual InsetGraphics const * asInsetGraphics() const { return 0; }
 
        /// the real dispatcher
        void dispatch(Cursor & cur, FuncRequest & cmd);
@@ -209,9 +217,7 @@ public:
        virtual bool showInsetDialog(BufferView *) const;
 
        /// draw two angular markers
-       void drawMarkers(PainterInfo & pi, int x, int y) const;
-       /// draw four angular markers
-       void drawMarkers2(PainterInfo & pi, int x, int y) const;
+       virtual void drawMarkers(PainterInfo & pi, int x, int y) const;
        /// add space for markers
        void metricsMarkers(Dimension & dim, int framesize = 1) const;
        /// add space for markers
@@ -237,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;
 
@@ -347,12 +353,12 @@ public:
        /// InsetMathCommand and InsetInfo.
        virtual bool isActive() const { return nargs() > 0; }
        /// can the contents of the inset be edited on screen ?
-       // equivalent to isActive except for closed InsetCollapsable
+       // equivalent to isActive except for closed InsetCollapsible
        virtual bool editable() const;
        /// has the Inset settings that can be modified in a dialog ?
        virtual bool hasSettings() const;
        /// can we go further down on mouse click?
-       /// true for InsetCaption, InsetCollapsables (not ButtonOnly), InsetTabular
+       /// true for InsetCaption, InsetCollapsibles (not ButtonOnly), InsetTabular
        virtual bool descendable(BufferView const &) const { return false; }
        /// can we click at the specified position ?
        virtual bool clickable(BufferView const &, int, int) const { return false; }
@@ -418,6 +424,14 @@ 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; }
+
 
        /// Is the content of this inset part of the output document?
        virtual bool producesOutput() const { return true; }
@@ -458,6 +472,8 @@ public:
        /// does this inset try to use all available space (like \\hfill does)?
        virtual bool isHfill() const { return false; }
 
+       virtual OutputParams::CtObject CtObject(OutputParams const &) const { return OutputParams::CT_NORMAL; }
+
        enum DisplayType {
                Inline = 0,
                AlignLeft,
@@ -529,7 +545,7 @@ public:
                              UpdateType /* utype*/,
                              TocBackend & /* tocbackend */) const {}
        /// Collect BibTeX information
-       virtual void collectBibKeys(InsetIterator const &) const {}
+       virtual void collectBibKeys(InsetIterator const &, support::FileNameList &) const {}
        /// Update the counters of this inset and of its contents.
        /// The boolean indicates whether we are preparing for output, e.g.,
        /// of XHTML.
@@ -578,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
@@ -585,6 +603,9 @@ public:
        /// reject the changes within the inset
        virtual void rejectChanges() {}
 
+       ///
+       virtual bool needsCProtection(bool const, bool const) const { return false; }
+
        ///
        virtual ColorCode backgroundColor(PainterInfo const &) const;
        ///