2 /* This file is part of*
3 * ======================================================
5 * LyX, The Document Processor
7 * Copyright (C) 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 *);
44 Inset * Clone() const {
45 return new InsetRef (getCommand(), master);
48 Inset::Code LyxCode() const { return Inset::REF_CODE; }
52 unsigned char Editable() const {
56 bool display() const { return false; }
58 string getScreenLabel() const;
60 InsetRef::Ref_Flags getFlag() { return flag; }
62 void setFlag(InsetRef::Ref_Flags f) { flag = f; }
66 int Latex(FILE * file, signed char fragile);
68 int Latex(string & file, signed char fragile);
70 int Linuxdoc(string & file);
72 int DocBook(string & file);
74 /// This function escapes 8-bit characters
75 string escape(string const &) const;
84 void InsetRef::gotoLabel()
87 master->gotoLabel(getContents());