]> git.lyx.org Git - lyx.git/blob - src/insets/insetref.h
Switch from SigC signals to boost::signals
[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         struct type_info {
27                 ///
28                 string latex_name;
29                 ///
30                 string gui_name;
31                 ///
32                 string short_gui_name;
33         };
34         static type_info types[];
35         ///
36         static int getType(string const & name);
37         ///
38         static string const & getName(int type);
39
40         ///
41         InsetRef(InsetCommandParams const &, Buffer const &, bool same_id = false);
42         ///
43         virtual Inset * clone(Buffer const & buffer, bool same_id = false) const {
44                 return new InsetRef(params(), buffer, same_id);
45         }
46         ///
47         string const getScreenLabel(Buffer const *) const;
48         ///
49         EDITABLE editable() const { return IS_EDITABLE; }
50         ///
51         Inset::Code lyxCode() const { return Inset::REF_CODE; }
52         ///
53         void edit(BufferView *, int, int, mouse_button::state);
54         ///
55         void edit(BufferView * bv, bool front = true);
56         ///
57         bool display() const { return false; }
58         ///
59         int latex(Buffer const *, std::ostream &,
60                   bool fragile, bool free_spc) const;
61         ///
62         int ascii(Buffer const *, std::ostream &, int linelen) const;
63         ///
64         int linuxdoc(Buffer const *, std::ostream &) const;
65         ///
66         int docbook(Buffer const *, std::ostream &) const;
67         ///
68         void validate(LaTeXFeatures & features) const;
69 private:
70         ///
71         bool isLatex;
72 };
73 #endif