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.
16 #include "InsetMathCommand.h"
23 class InsetMathRef : public InsetMathCommand {
26 explicit InsetMathRef(Buffer * buf);
28 explicit InsetMathRef(Buffer * buf, docstring const & data);
30 void updateBuffer(ParIterator const &, UpdateType, bool const deleted = false) override;
32 void write(TeXMathStream & os) const override;
34 void infoize(odocstream & os) const override;
36 bool hasSettings() const override { return true; }
38 bool clickable(BufferView const &, int, int) const override { return true; }
40 std::string contextMenuName() const override { return "context-mathref"; }
42 mode_type currentMode() const override { return TEXT_MODE; }
44 bool lockedMode() const override { return true; }
46 bool asciiOnly() const override { return true; }
48 docstring const screenLabel() const override;
50 void validate(LaTeXFeatures & features) const override;
52 void changeTarget(docstring const & target);
54 InsetMathRef * asRefInset() override { return this; }
57 void docbook(XMLStream &, OutputParams const &) const override;
58 /// generate something that will be understood by the Dialogs.
59 std::string const createDialogStr(std::string const & type = std::string()) const;
61 struct ref_type_info {
67 docstring short_gui_name;
69 static ref_type_info types[];
71 docstring const getTarget() const;
73 InsetCode lyxCode() const override { return MATH_REF_CODE; }
77 void doDispatch(Cursor & cur, FuncRequest & cmd) override;
79 bool getStatus(Cursor &, FuncRequest const &, FuncStatus &) const override;
82 Inset * clone() const override;