]> git.lyx.org Git - lyx.git/blob - src/mathed/InsetMathRef.h
Remove profiling.py
[lyx.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 "InsetMathCommand.h"
17
18
19 namespace lyx {
20 class Buffer;
21
22 // for \ref
23 class InsetMathRef : public InsetMathCommand {
24 public:
25         ///
26         explicit InsetMathRef(Buffer * buf);
27         ///
28         explicit InsetMathRef(Buffer * buf, docstring const & data);
29         ///
30         void updateBuffer(ParIterator const &, UpdateType, bool const deleted = false) override;
31         ///
32         void write(TeXMathStream & os) const override;
33         ///
34         void infoize(odocstream & os) const override;
35         ///
36         bool hasSettings() const override { return true; }
37         ///
38         bool clickable(BufferView const &, int, int) const override { return true; }
39         ///
40         std::string contextMenuName() const override { return "context-mathref"; }
41         ///
42         mode_type currentMode() const override { return TEXT_MODE; }
43         ///
44         bool lockedMode() const override { return true; }
45         ///
46         bool asciiOnly() const override { return true; }
47         ///
48         docstring const screenLabel() const override;
49         ///
50         void validate(LaTeXFeatures & features) const override;
51         ///
52         void changeTarget(docstring const & target);
53         ///
54         InsetMathRef * asRefInset() override { return this; }
55
56         /// docbook output
57         void docbook(XMLStream &, OutputParams const &) const override;
58         /// generate something that will be understood by the Dialogs.
59         std::string const createDialogStr(std::string const & type = std::string()) const;
60
61         struct ref_type_info {
62                 ///
63                 docstring latex_name;
64                 ///
65                 docstring gui_name;
66                 ///
67                 docstring short_gui_name;
68         };
69         static ref_type_info types[];
70         ///
71         docstring const getTarget() const;
72         ///
73         InsetCode lyxCode() const override { return MATH_REF_CODE; }
74
75 protected:
76         ///
77         void doDispatch(Cursor & cur, FuncRequest & cmd) override;
78         ///
79         bool getStatus(Cursor &, FuncRequest const &, FuncStatus &) const override;
80 private:
81         ///
82         Inset * clone() const override;
83 };
84
85
86
87 } // namespace lyx
88 #endif