]> git.lyx.org Git - lyx.git/blob - src/insets/insetref.h
prepare for 1.1.6pre2
[lyx.git] / src / insets / insetref.h
1 // -*- C++ -*-
2 /* This file is part of*
3  * ======================================================
4  *
5  *           LyX, The Document Processor
6  *       
7  *          Copyright 1997 LyX Team (this file was created this year)
8  * 
9  * ====================================================== */
10
11 #ifndef INSET_REF_H
12 #define INSET_REF_H
13
14 #ifdef __GNUG__
15 #pragma interface
16 #endif
17
18 #include "insetcommand.h"
19
20 struct LaTeXFeatures;
21
22 /** The reference inset  
23  */
24 class InsetRef : public InsetCommand {
25 public:
26         ///
27         InsetRef(InsetCommandParams const &, Buffer const &);
28         ///
29         Inset * Clone(Buffer const & buffer) const {
30                 return new InsetRef(params(), buffer);
31         }
32         ///
33         string const getScreenLabel() const;
34         ///
35         EDITABLE Editable() const { return IS_EDITABLE; }
36         ///
37         Inset::Code LyxCode() const { return Inset::REF_CODE; }
38         ///
39         void Edit(BufferView *, int, int, unsigned int);
40         ///
41         bool display() const { return false; }
42         ///
43         int Latex(Buffer const *, std::ostream &,
44                   bool fragile, bool free_spc) const;
45         ///
46         int Ascii(Buffer const *, std::ostream &, int linelen) const;
47         ///
48         int Linuxdoc(Buffer const *, std::ostream &) const;
49         ///
50         int DocBook(Buffer const *, std::ostream &) const;
51         ///
52         void Validate(LaTeXFeatures & features) const;
53 private:
54         /// This function escapes 8-bit characters
55         string const escape(string const &) const;
56         ///
57         bool isLatex;
58 };
59 #endif