4 * This file is part of LyX, the document processor.
5 * Licence details can be found in the file COPYING.
7 * \author Angus Leeming
9 * Full author contact details are available in file CREDITS.
12 #ifndef RENDERBUTTON_H
13 #define RENDERBUTTON_H
15 #include "RenderBase.h"
17 #include "support/docstring.h"
23 class RenderButton : public RenderBase
28 RenderBase * clone(Inset const *) const override;
30 /// compute the size of the object returned in dim
31 void metrics(MetricsInfo & mi, Dimension & dim) const override;
32 /// draw inset and update (xo, yo)-cache
33 void draw(PainterInfo & pi, int x, int y) const override;
35 /// Provide the text for the button
36 void update(docstring const &, bool editable,
37 bool inherit, bool broken = false);
39 /// The "sensitive area" box, i.e., the button area
40 Box box() const { return button_box_; }
42 void setBox(Box b) { button_box_ = b; }
44 /// equivalent to dynamic_cast
45 RenderButton * asButton() override { return this; }
59 #endif // NOT RENDERBUTTON_H