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 *);
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 unsigned char 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(ostream &, signed char fragile) const;
65 #ifndef USE_OSTREAM_ONLY
67 int Latex(string & file, signed char fragile) const;
70 int Linuxdoc(string & file) const;
72 int DocBook(string & file) const;
74 /// This function escapes 8-bit characters
75 string escape(string const &) const;
84 void InsetRef::gotoLabel()
87 master->getUser()->gotoLabel(getContents());