2 /* This file is part of*
3 * ======================================================
5 * LyX, The Document Processor
7 * Copyright 1997 LyX Team (this file was created this year)
9 * ====================================================== */
18 #include "insetcommand.h"
22 /** The reference inset
24 class InsetRef : public InsetCommand {
32 string short_gui_name;
34 static type_info types[];
36 static int getType(string const & name);
38 static string const & getName(int type);
41 InsetRef(InsetCommandParams const &, Buffer const &, bool same_id = false);
43 virtual Inset * clone(Buffer const & buffer, bool same_id = false) const {
44 return new InsetRef(params(), buffer, same_id);
47 string const getScreenLabel() const;
49 EDITABLE editable() const { return IS_EDITABLE; }
51 Inset::Code lyxCode() const { return Inset::REF_CODE; }
53 void edit(BufferView *, int, int, unsigned int);
55 void edit(BufferView * bv, bool front = true);
57 bool display() const { return false; }
59 int latex(Buffer const *, std::ostream &,
60 bool fragile, bool free_spc) const;
62 int ascii(Buffer const *, std::ostream &, int linelen) const;
64 int linuxdoc(Buffer const *, std::ostream &) const;
66 int docBook(Buffer const *, std::ostream &) const;
68 void validate(LaTeXFeatures & features) const;