]> git.lyx.org Git - lyx.git/blobdiff - src/insets/RenderBase.h
Fix bug #12795
[lyx.git] / src / insets / RenderBase.h
index fab0d7abc2e9a2bbbb4253e50251fa83700c65f3..b522978ef62e32b3cf60120d4ecab8fcef9dc388 100644 (file)
@@ -36,14 +36,12 @@ public:
        /// \retval true if the metrics has changed.
        virtual void metrics(MetricsInfo & mi, Dimension & dim) const = 0;
        /// draw inset and update (xo, yo)-cache
-       virtual void draw(PainterInfo & pi, int x, int y) const = 0;
-       ///
-       Dimension const & dimension() const { return dim_; };
+       virtual void draw(PainterInfo & pi, int x, int y, bool const darkmode = false) const = 0;
 
        /// render state, exact meaning of state is render-specific
-       void setRenderState(int state) { state_ = state; }
+       void setRenderState(bool state) { state_ = state; }
        /// get render state
-       int renderState() const { return state_; }
+       bool renderState() const { return state_; }
 
        /// equivalent to dynamic_cast
        virtual RenderButton * asButton() { return 0; }
@@ -53,7 +51,7 @@ public:
 
 protected:
        RenderBase() : state_(false) {}
-       RenderBase(RenderBase const &) {}
+       RenderBase(RenderBase const & x) : state_(x.state_) {}
        RenderBase & operator=(RenderBase const &) { return *this; }
 
        /// render state. currently, render_button uses this to store mouse_hover_