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 &);
38 InsetRef(InsetRef const &);
41 virtual std::auto_ptr<InsetBase> clone() const {
42 return std::auto_ptr<InsetBase>(new InsetRef(*this));
45 std::string const getScreenLabel(Buffer const &) const;
47 EDITABLE editable() const { return IS_EDITABLE; }
49 InsetOld::Code lyxCode() const { return InsetOld::REF_CODE; }
51 bool display() const { return false; }
53 int latex(Buffer const &, std::ostream &,
54 OutputParams const &) const;
56 int plaintext(Buffer const &, std::ostream &,
57 OutputParams const &) const;
59 int linuxdoc(Buffer const &, std::ostream &,
60 OutputParams const &) const;
62 int docbook(Buffer const &, std::ostream &,
63 OutputParams const &) const;
65 void validate(LaTeXFeatures & features) const;
68 void priv_dispatch(LCursor & cur, FuncRequest & cmd);