3 * \file render_button.h
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 RENDER_BUTTON_H
13 #define RENDER_BUTTON_H
15 #include "render_base.h"
20 class RenderButton : public RenderBase
25 std::auto_ptr<RenderBase> clone(InsetBase const *) const;
27 /// compute the size of the object returned in dim
28 virtual void metrics(MetricsInfo & mi, Dimension & dim) const;
29 /// draw inset and update (xo, yo)-cache
30 virtual void draw(PainterInfo & pi, int x, int y) const;
32 /// Provide the text for the button
33 void update(std::string const &, bool editable);
35 /// The "sensitive area" box, i.e., the button area
36 Box box() const { return button_box_; }
38 void setBox(Box b) { button_box_ = b; }
40 /// equivalent to dynamic_cast
41 virtual RenderButton * asButton() { return this; }
50 #endif // NOT RENDER_BUTTON_H