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"
23 /** The reference inset
25 class InsetRef: public InsetCommand {
40 REF_LAST = PRETTY_REF,
46 InsetRef() : InsetCommand("ref") { flag = InsetRef::REF; }
48 InsetRef(string const &, Buffer *);
50 InsetRef(InsetCommand const &, Buffer *);
52 Inset * Clone() const {
53 return new InsetRef (getCommand(), master);
56 Inset::Code LyxCode() const { return Inset::REF_CODE; }
58 void Edit(BufferView *, int, int, unsigned int);
60 EDITABLE Editable() const {
64 bool display() const { return false; }
66 string getScreenLabel() const;
72 int Latex(Buffer const *, std::ostream &, bool fragile, bool free_spc) const;
74 int Ascii(Buffer const *, std::ostream &) const;
76 int Linuxdoc(Buffer const *, std::ostream &) const;
78 int DocBook(Buffer const *, std::ostream &) const;
80 void Validate(LaTeXFeatures & features) const;
84 /// This function escapes 8-bit characters
85 string escape(string const &) const;
94 void InsetRef::gotoLabel()
97 master->getUser()->gotoLabel(getContents());