]> git.lyx.org Git - lyx.git/blobdiff - src/insets/Inset.h
Properly communicate forced encodings
[lyx.git] / src / insets / Inset.h
index f10ab3f88332e93a98217c2a83b3178eb6b7630a..ecd171dc45de302844373c860c378171d198f662 100644 (file)
@@ -23,6 +23,7 @@
 
 #include "support/strfwd.h"
 #include "support/types.h"
+#include "support/FileNameList.h"
 
 #include <climits>
 
@@ -38,11 +39,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 +146,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 +160,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 +216,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
@@ -347,12 +352,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 +423,10 @@ public:
        /// if this inset has paragraphs should they be forced to use a
        /// local font language switch?
        virtual bool forceLocalFontSwitch() 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; }
@@ -473,7 +482,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 ommitted in any case?
+       /// should paragraph indendation be omitted in any case?
        virtual bool neverIndent() const { return false; }
        /// dumps content to lyxerr
        virtual void dump() const;
@@ -529,7 +538,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.