]> git.lyx.org Git - lyx.git/blobdiff - src/insets/Inset.h
InsetListings: change the interface of diaplay function and allow AlignLeft. Applied...
[lyx.git] / src / insets / Inset.h
index 1809ddcf81b074c656a8094e0507079c5ce0dac2..b79a10168f855b4a6860737230b19fa895d5263f 100644 (file)
@@ -37,7 +37,7 @@ class LaTeXFeatures;
 class Color_color;
 class Cursor;
 class Lexer;
-class LyXText;
+class Text;
 class MetricsInfo;
 class Dimension;
 class PainterInfo;
@@ -348,7 +348,9 @@ public:
                ///
                NOMENCL_PRINT_CODE,
                ///
-               PAGEBREAK_CODE
+               PAGEBREAK_CODE,
+               ///
+               LISTINGS_CODE
        };
 
        /** returns the Code corresponding to the \c name.
@@ -365,7 +367,7 @@ public:
        virtual bool hasFixedWidth() const { return false; }
 
        ///
-       virtual docstring insetName() const;
+       virtual docstring name() const { return from_ascii("unknown"); }
        /// used to toggle insets
        /// is the inset open?
        /// should this inset be handled like a normal charater
@@ -375,8 +377,16 @@ public:
        /// is this equivalent to a space (which is BTW different from
        /// a line separator)?
        virtual bool isSpace() const { return false; }
+
+       enum DisplayType {
+               Inline = 0,
+               AlignLeft,
+               AlignCenter,
+               AlignRight
+       };
+       
        /// should we have a non-filled line before this inset?
-       virtual bool display() const { return false; }
+       virtual DisplayType display() const { return Inline; }
        /// should we break lines after this inset?
        virtual bool isLineSeparator() const { return false; }
        /// should paragraph indendation be ommitted in any case?
@@ -401,7 +411,7 @@ public:
        virtual bool allowSpellCheck() const { return false; }
 
        /// if this insets owns text cells (e.g. InsetText) return cell num
-       virtual LyXText * getText(int /*num*/) const { return 0; }
+       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.