X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2Finsets%2FInsetCollapsable.h;h=c7b6d65c3a4f193454ba8bc1dcd73d3a9d4ae19c;hb=d4550b7a4d64e9ff772cf3a7635cb4ca532fb340;hp=298c4e14ec308242b43373ace8f4102b9da35837;hpb=fd6ae3539bbc3f5d771d9346437f9ff00c7171ce;p=lyx.git diff --git a/src/insets/InsetCollapsable.h b/src/insets/InsetCollapsable.h index 298c4e14ec..c7b6d65c3a 100644 --- a/src/insets/InsetCollapsable.h +++ b/src/insets/InsetCollapsable.h @@ -54,6 +54,8 @@ public: void metrics(MetricsInfo &, Dimension &) const; /// void draw(PainterInfo & pi, int x, int y) const; + /// + virtual void drawBackground(PainterInfo &, int, int) const {} /// return x,y of given position relative to the inset's baseline void cursorPos(BufferView const & bv, CursorSlice const & sl, @@ -127,6 +129,8 @@ public: /// and of course decoration(). Geometry geometry(BufferView const & bv) const; /// + bool canPaintChange(BufferView const & bv) const; + /// bool getStatus(Cursor &, FuncRequest const &, FuncStatus &) const; /// bool setMouseHover(BufferView const * bv, bool mouse_hover) const; @@ -160,17 +164,22 @@ private: /// docstring labelstring_; - /// FIXME: the variables below should be grouped in a View subclass (as in MVC) + // These variables depend of the view in which the inset is displayed + struct View + { + /// The dimension of the inset button + Box button_dim_; + /// a substatus of the Open status, determined automatically in metrics + bool openinlined_; + /// the inset will automatically open when the cursor is inside. This is + /// dependent on the bufferview, compare with MathMacro::editing_. + bool auto_open_; + /// changes color when mouse enters/leaves this inset + bool mouse_hover_; + }; /// - mutable std::map button_dim_; - /// a substatus of the Open status, determined automatically in metrics - mutable std::map openinlined_; - /// the inset will automatically open when the cursor is inside. This is - /// dependent on the bufferview, compare with MathMacro::editing_. - mutable std::map auto_open_; - /// changes color when mouse enters/leaves this inset - mutable std::map mouse_hover_; + mutable std::map view_; }; } // namespace lyx