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 {
36 InsetRef() : InsetCommand("ref") { flag = InsetRef::REF; }
38 InsetRef(string const &, Buffer *);
40 InsetRef(InsetCommand const &, Buffer *);
42 Inset * Clone() const {
43 return new InsetRef (getCommand(), master);
46 Inset::Code LyxCode() const { return Inset::REF_CODE; }
48 void Edit(BufferView *, int, int, unsigned int);
50 EDITABLE Editable() const {
54 bool display() const { return false; }
56 string getScreenLabel() const;
58 InsetRef::Ref_Flags getFlag() { return flag; }
60 void setFlag(InsetRef::Ref_Flags f) { flag = f; }
64 int Latex(std::ostream &, bool fragile, bool free_spc) const;
66 int Linuxdoc(std::ostream &) const;
68 int DocBook(std::ostream &) const;
70 /// This function escapes 8-bit characters
71 string escape(string const &) const;
80 void InsetRef::gotoLabel()
83 master->getUser()->gotoLabel(getContents());