]> git.lyx.org Git - lyx.git/blob - src/insets/insetref.h
update no.po
[lyx.git] / src / insets / insetref.h
1 // -*- C++ -*-
2 /**
3  * \file insetref.h
4  * This file is part of LyX, the document processor.
5  * Licence details can be found in the file COPYING.
6  *
7  * \author José Matos
8  *
9  * Full author contact details are available in file CREDITS
10  */
11
12 #ifndef INSET_REF_H
13 #define INSET_REF_H
14
15 #ifdef __GNUG__
16 #pragma interface
17 #endif
18
19 #include "insetcommand.h"
20
21 struct LaTeXFeatures;
22
23 /** The reference inset
24  */
25 class InsetRef : public InsetCommand {
26 public:
27         struct type_info {
28                 ///
29                 string latex_name;
30                 ///
31                 string gui_name;
32                 ///
33                 string short_gui_name;
34         };
35         static type_info types[];
36         ///
37         static int getType(string const & name);
38         ///
39         static string const & getName(int type);
40
41         ///
42         InsetRef(InsetCommandParams const &, Buffer const &, bool same_id = false);
43         ///
44         virtual Inset * clone(Buffer const & buffer, bool same_id = false) const {
45                 return new InsetRef(params(), buffer, same_id);
46         }
47         ///
48         string const getScreenLabel(Buffer const *) const;
49         ///
50         EDITABLE editable() const { return IS_EDITABLE; }
51         ///
52         Inset::Code lyxCode() const { return Inset::REF_CODE; }
53         ///
54         void edit(BufferView *, int, int, mouse_button::state);
55         ///
56         void edit(BufferView * bv, bool front = true);
57         ///
58         bool display() const { return false; }
59         ///
60         int latex(Buffer const *, std::ostream &,
61                   bool fragile, bool free_spc) const;
62         ///
63         int ascii(Buffer const *, std::ostream &, int linelen) const;
64         ///
65         int linuxdoc(Buffer const *, std::ostream &) const;
66         ///
67         int docbook(Buffer const *, std::ostream &, bool mixcont) const;
68         ///
69         void validate(LaTeXFeatures & features) const;
70 private:
71         ///
72         bool isLatex;
73 };
74 #endif