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 Code lyxCode() const { return REF_CODE; }
48 bool display() const { return false; }
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 virtual int textString(Buffer const &, odocstream &,
57 OutputParams const &) const;
59 void validate(LaTeXFeatures & features) const;
61 InsetRef(InsetRef const &);
64 virtual void doDispatch(LCursor & cur, FuncRequest & cmd);
66 virtual std::auto_ptr<InsetBase> doClone() const {
67 return std::auto_ptr<InsetBase>(new InsetRef(*this));