X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2FMetricsInfo.h;h=7fe72405bfd72fc5bd585e24b47bb96473bff925;hb=1e519d1115f41f71c253cb9e2fbb7803e9a583a9;hp=ff0b1c698941faeec9e2add2b2f2f3dc408c4f93;hpb=3d590d3bd71a3522d525ce71220e99bd25b6a648;p=lyx.git diff --git a/src/MetricsInfo.h b/src/MetricsInfo.h index ff0b1c6989..7fe72405bf 100644 --- a/src/MetricsInfo.h +++ b/src/MetricsInfo.h @@ -30,6 +30,7 @@ namespace lyx { namespace frontend { class Painter; } class BufferView; +class Length; class MacroContext; @@ -69,6 +70,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 +130,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_;