#include "Dimension.h"
-#include <memory>
-
namespace lyx {
/// \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; }
virtual RenderMonitoredPreview * asMonitoredPreview() { return 0; }
protected:
- RenderBase() {}
- RenderBase(RenderBase const &) {}
+ RenderBase() : state_(false) {}
+ RenderBase(RenderBase const & x) : state_(x.state_) {}
RenderBase & operator=(RenderBase const &) { return *this; }
/// render state. currently, render_button uses this to store mouse_hover_
- int state_;
+ bool state_;
/// Cached
mutable Dimension dim_;
};