]> git.lyx.org Git - lyx.git/blobdiff - src/MetricsInfo.h
Correctly set language after intitle paragraphs
[lyx.git] / src / MetricsInfo.h
index ff0b1c698941faeec9e2add2b2f2f3dc408c4f93..066d87ce3f1f5b074b4a328e6d2d7ff673eefa94 100644 (file)
@@ -30,6 +30,7 @@ namespace lyx {
 
 namespace frontend { class Painter; }
 class BufferView;
+class Length;
 class MacroContext;
 
 
@@ -60,7 +61,8 @@ public:
        // Temporarily change to the style suitable for use in fractions
        Changer changeFrac();
        // Temporarily change to the style suitable for use in arrays
-       Changer changeArray();
+       // or to style suitable for smallmatrix when \c small is true.
+       Changer changeArray(bool small = false);
        // Temporarily change the style to (script)script style
        Changer changeScript();
        ///
@@ -69,6 +71,13 @@ public:
        int solidLineOffset() const { return solid_line_offset_; }
        ///
        int dottedLineThickness() const { return dotted_line_thickness_; }
+       /** return the on-screen size of this length
+        *
+        *  This version of the function uses the current inset width as
+        *  width and the EM value of the current font.
+        */
+       int inPixels(Length const & len) const;
+
 private:
        int solid_line_thickness_;
        int solid_line_offset_;
@@ -122,7 +131,7 @@ public:
        MetricsBase base;
        ///
        frontend::Painter & pain;
-       /// Whether the text at this point is right-to-left (for InsetNewline)
+       /// Whether the text at this point is right-to-left (for insets)
        bool ltr_pos;
        /// The change the parent is part of (change tracking)
        Change change_;
@@ -134,6 +143,8 @@ public:
        bool full_repaint;
        /// Current background color
        ColorCode background_color;
+       /// Useful for drawing display math numbering
+       int leftx, rightx;
 };
 
 class TextMetricsInfo {};