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"
18 /// The reference inset
19 class InsetRef : public InsetCommand {
23 std::string latex_name;
27 std::string short_gui_name;
29 static type_info types[];
31 static int getType(std::string const & name);
33 static std::string const & getName(int type);
36 InsetRef(InsetCommandParams const &, Buffer const &);
39 std::string const getScreenLabel(Buffer const &) const;
41 EDITABLE editable() const { return IS_EDITABLE; }
43 InsetBase::Code lyxCode() const { return InsetBase::REF_CODE; }
45 bool display() const { return false; }
47 int latex(Buffer const &, std::ostream &,
48 OutputParams const &) const;
50 int plaintext(Buffer const &, std::ostream &,
51 OutputParams const &) const;
53 int docbook(Buffer const &, std::ostream &,
54 OutputParams const &) const;
55 /// the string that is passed to the TOC
56 virtual int textString(Buffer const &, std::ostream & os,
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));