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 "InsetCommand.h"
21 /// The reference inset
22 class InsetRef : public InsetCommand {
26 std::string latex_name;
30 std::string short_gui_name;
32 static type_info types[];
34 static int getType(std::string const & name);
36 static std::string const & getName(int type);
39 InsetRef(InsetCommandParams const &, Buffer const &);
42 docstring const getScreenLabel(Buffer const &) const;
44 EDITABLE editable() const { return IS_EDITABLE; }
46 InsetCode lyxCode() const { return REF_CODE; }
48 DisplayType display() const { return Inline; }
50 int latex(Buffer const &, odocstream &, OutputParams const &) const;
52 int plaintext(Buffer const &, odocstream &, OutputParams const &) const;
54 int docbook(Buffer const &, odocstream &, OutputParams const &) const;
55 /// the string that is passed to the TOC
56 void textString(Buffer const &, odocstream &) const;
58 void validate(LaTeXFeatures & features) const;
60 static CommandInfo const * findInfo(std::string const &);
62 static std::string defaultCommand() { return "ref"; };
64 static bool isCompatibleCommand(std::string const & s);
67 InsetRef(InsetRef const &);
70 virtual void doDispatch(Cursor & cur, FuncRequest & cmd);
73 Inset * clone() const { return new InsetRef(*this); }