4 * This file is part of LyX, the document processor.
5 * Licence details can be found in the file COPYING.
7 * \author Asger Alstrup Nielsen
9 * \author Lars Gullik Bjønnes
11 * Full author contact details are available in file CREDITS
14 #ifndef INSET_BUTTON_H
15 #define INSET_BUTTON_H
20 #include <boost/weak_ptr.hpp>
22 /** Used to provide an inset that looks like a button.
24 class InsetButton: public Inset {
27 int ascent(BufferView *, LyXFont const &) const;
29 int descent(BufferView *, LyXFont const &) const;
31 int width(BufferView *, LyXFont const &) const;
33 void draw(BufferView *, LyXFont const &, int, float &) const;
37 virtual void cache(BufferView *) const;
39 virtual BufferView * view() const;
40 /// This should provide the text for the button
41 virtual string const getScreenLabel(Buffer const *) const = 0;
43 mutable boost::weak_ptr<BufferView> view_;