4 * This file is part of LyX, the document processor.
5 * Licence details can be found in the file COPYING.
9 * Full author contact details are available in file CREDITS.
15 #include "InsetText.h"
16 #include "RenderButton.h"
19 #include "support/Translator.h"
23 /** Used to insert index labels
25 class InsetInfo : public InsetText {
28 UNKNOWN_INFO, // Invalid type
29 SHORTCUT_INFO, // Keyboard shortcut
30 LYXRC_INFO, // RC entry
31 PACKAGE_INFO, // Availability of package
32 TEXTCLASS_INFO, // Availability of textclass
33 MENU_INFO, // Which menu item is used for certain function
37 InsetInfo(BufferParams const & bp, std::string const & info = std::string());
39 Inset * editXY(Cursor & cur, int x, int y);
41 EDITABLE editable() const { return NOT_EDITABLE; }
43 void draw(PainterInfo & pi, int x, int y) const;
45 void read(Buffer const &, Lexer & lex);
47 void write(Buffer const & buf, std::ostream & os) const;
49 void doDispatch(Cursor & cur, FuncRequest & cmd);
51 InsetCode lyxCode() const { return INFO_CODE; }
53 void setInfo(std::string const & info);
55 bool setMouseHover(bool mouse_hover);
58 /// The translator between the information type enum and corresponding string.
59 Translator<info_type, std::string> const & nameTranslator() const;
60 /// update info_ and text
63 virtual Inset * clone() const { return new InsetInfo(*this); }
68 /// store the buffer parameter
69 BufferParams const & bp_;