]> git.lyx.org Git - lyx.git/blob - src/insets/RenderButton.h
Remove RenderButton::button_box_, which is unused.
[lyx.git] / src / insets / RenderButton.h
1 // -*- C++ -*-
2 /**
3  * \file RenderButton.h
4  * This file is part of LyX, the document processor.
5  * Licence details can be found in the file COPYING.
6  *
7  * \author Angus Leeming
8  *
9  * Full author contact details are available in file CREDITS.
10  */
11
12 #ifndef RENDERBUTTON_H
13 #define RENDERBUTTON_H
14
15 #include "RenderBase.h"
16 #include "support/docstring.h"
17
18
19 namespace lyx {
20
21
22 class RenderButton : public RenderBase
23 {
24 public:
25         RenderButton();
26
27         RenderBase * clone(Inset const *) const override;
28
29         /// compute the size of the object returned in dim
30         void metrics(MetricsInfo & mi, Dimension & dim) const override;
31         /// draw inset and update (xo, yo)-cache
32         void draw(PainterInfo & pi, int x, int y, bool const darkmode = false) const override;
33
34         /// Provide the text for the button
35         void update(docstring const &, bool editable,
36                     bool inherit, bool broken = false);
37
38         /// equivalent to dynamic_cast
39         RenderButton * asButton() override { return this; }
40
41 private:
42         /// The stored data.
43         docstring text_;
44         bool editable_;
45         bool broken_;
46         bool inherit_font_;
47 };
48
49
50 } // namespace lyx
51
52 #endif // NOT RENDERBUTTON_H