]> git.lyx.org Git - features.git/blob - src/mathed/InsetMathRef.h
a93d91059483b1c2488c243d4772ed3bea2a6e22
[features.git] / src / mathed / InsetMathRef.h
1 // -*- C++ -*-
2 /**
3  * \file InsetMathRef.h
4  * This file is part of LyX, the document processor.
5  * Licence details can be found in the file COPYING.
6  *
7  * \author André Pönitz
8  *
9  * Full author contact details are available in file CREDITS.
10  */
11
12 #ifndef REF_INSET_H
13 #define REF_INSET_H
14
15
16 #include "CommandInset.h"
17
18
19 namespace lyx {
20 class Buffer;
21
22 // for \ref
23 class InsetMathRef : public CommandInset {
24 public:
25         ///
26         InsetMathRef(Buffer * buf);
27         ///
28         explicit InsetMathRef(Buffer * buf, docstring const & data);
29         ///
30         void updateLabels(ParIterator const &, UpdateType);
31         ///
32         //void write(WriteStream & os) const;
33         ///
34         void infoize(odocstream & os) const;
35         ///
36         docstring const screenLabel() const;
37         ///
38         void validate(LaTeXFeatures & features) const;
39         ///
40         void changeTarget(docstring const & target);
41         ///
42         virtual InsetMathRef * asRefInset() { return this; }
43
44         /// docbook output
45         int docbook(odocstream & os, OutputParams const &) const;
46         /// generate something that will be understood by the Dialogs.
47         std::string const createDialogStr(std::string const & name) const;
48
49         struct ref_type_info {
50                 ///
51                 docstring latex_name;
52                 ///
53                 docstring gui_name;
54                 ///
55                 docstring short_gui_name;
56         };
57         static ref_type_info types[];
58         ///
59         static int getType(docstring const & name);
60         ///
61         static docstring const & getName(int type);
62         ///
63         docstring const getTarget() const;
64         ///
65         InsetCode lyxCode() const { return MATH_REF_CODE; }
66
67 protected:
68         ///
69         virtual void doDispatch(Cursor & cur, FuncRequest & cmd);
70         ///
71         bool getStatus(Cursor &, FuncRequest const &, FuncStatus &) const;
72 private:
73         ///
74         virtual Inset * clone() const;
75 };
76
77
78
79 } // namespace lyx
80 #endif