]> git.lyx.org Git - lyx.git/blob - src/insets/InsetHyperlink.h
Do not forceLTR in InsetHyperlink (#12044)
[lyx.git] / src / insets / InsetHyperlink.h
1 // -*- C++ -*-
2 /**
3  * \file InsetHyperlink.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_HYPERLINK_H
13 #define INSET_HYPERLINK_H
14
15 #include "InsetCommand.h"
16
17
18 namespace lyx {
19
20 /** The hyperlink inset
21  */
22 class InsetHyperlink : public InsetCommand
23 {
24 public:
25         ///
26         InsetHyperlink(Buffer * buf, InsetCommandParams const &);
27
28         /// \name Public functions inherited from Inset class
29         //@{
30         ///
31         InsetCode lyxCode() const override { return HYPERLINK_CODE; }
32         ///
33         bool hasSettings() const override { return true; }
34         ///
35         bool isInToc() const override { return true; }
36         ///
37         void toString(odocstream &) const override;
38         ///
39         void forOutliner(docstring &, size_t const, bool const) const override;
40         ///
41         docstring toolTip(BufferView const & bv, int x, int y) const override;
42         ///
43         std::string contextMenuName() const override;
44         ///
45         void validate(LaTeXFeatures &) const override;
46         ///
47         void latex(otexstream &, OutputParams const &) const override;
48         ///
49         int plaintext(odocstringstream & ods, OutputParams const & op,
50                       size_t max_length = INT_MAX) const override;
51         ///
52         void docbook(XMLStream &, OutputParams const &) const override;
53         ///
54         docstring xhtml(XMLStream &, OutputParams const &) const override;
55         //@}
56
57         /// \name Static public methods obligated for InsetCommand derived classes
58         //@{
59         ///
60         static bool isCompatibleCommand(std::string const & s)
61                 { return s == "href"; }
62         ///
63         static std::string defaultCommand() { return "href"; }
64         ///
65         static ParamInfo const & findInfo(std::string const &);
66         //@}
67
68 private:
69         /// \name Private functions inherited from Inset class
70         //@{
71         ///
72         void doDispatch(Cursor & cur, FuncRequest & cmd) override;
73         ///
74         bool getStatus(Cursor & cur, FuncRequest const & cmd,
75                 FuncStatus & flag) const override;
76         ///
77         Inset * clone() const override { return new InsetHyperlink(*this); }
78         //@}
79
80         /// \name Private functions inherited from InsetCommand class
81         //@{
82         ///
83         docstring screenLabel() const override;
84         //@}
85
86         ///
87         void viewTarget() const;
88 };
89
90
91 } // namespace lyx
92
93 #endif // INSET_HYPERLINK_H