X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2Finsets%2FInset.h;h=ab35584e126c06a830b3cee11fa294ec4008c474;hb=62af7ee772f16f154225d2d0b65d77f4376b6001;hp=cffaf77c6ea7ac5bd4a3b83d5ba70897afe44744;hpb=ce950f1ea50ec1fcc3df3938cb94c20347f5b71e;p=lyx.git diff --git a/src/insets/Inset.h b/src/insets/Inset.h index cffaf77c6e..ab35584e12 100644 --- a/src/insets/Inset.h +++ b/src/insets/Inset.h @@ -202,6 +202,17 @@ public: /// https://www.mail-archive.com/lyx-devel@lists.lyx.org/msg199001.html virtual Inset * editXY(Cursor & cur, int x, int y); + /// The default margin inside text insets + static int textOffset(BufferView const *) { return 4; } + /// + virtual int topOffset(BufferView const *bv) const { return textOffset(bv); } + /// + virtual int bottomOffset(BufferView const *bv) const { return textOffset(bv); } + /// + virtual int leftOffset(BufferView const *bv) const { return textOffset(bv); } + /// + virtual int rightOffset(BufferView const *bv) const { return textOffset(bv); } + /// compute the size of the object returned in dim virtual void metrics(MetricsInfo & mi, Dimension & dim) const = 0; /// draw inset and update (xo, yo)-cache @@ -610,8 +621,6 @@ public: virtual ColorCode backgroundColor(PainterInfo const &) const; /// virtual ColorCode labelColor() const; - // - enum { TEXT_TO_INSET_OFFSET = 4 }; /// Determine the action of backspace and delete: do we select instead of /// deleting if not already selected?