]> git.lyx.org Git - lyx.git/blob - src/insets/InsetHyperlink.h
Fix text direction of references with XeTeX/bidi
[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 { return HYPERLINK_CODE; }
32         ///
33         bool hasSettings() const { return true; }
34         ///
35         bool forceLTR(OutputParams const &) const { return true; }
36         ///
37         bool isInToc() const { return true; }
38         ///
39         void toString(odocstream &) const;
40         ///
41         void forOutliner(docstring &, size_t const, bool const) const;
42         ///
43         docstring toolTip(BufferView const & bv, int x, int y) const;
44         ///
45         std::string contextMenuName() const;
46         ///
47         void validate(LaTeXFeatures &) const;
48         ///
49         void latex(otexstream &, OutputParams const &) const;
50         ///
51         int plaintext(odocstringstream & ods, OutputParams const & op,
52                       size_t max_length = INT_MAX) const;
53         ///
54         int docbook(odocstream &, OutputParams const &) const;
55         ///
56         docstring xhtml(XHTMLStream &, OutputParams const &) const;
57         //@}
58
59         /// \name Static public methods obligated for InsetCommand derived classes
60         //@{
61         ///
62         static bool isCompatibleCommand(std::string const & s)
63                 { return s == "href"; }
64         ///
65         static std::string defaultCommand() { return "href"; }
66         ///
67         static ParamInfo const & findInfo(std::string const &);
68         //@}
69
70 private:
71         /// \name Private functions inherited from Inset class
72         //@{
73         ///
74         void doDispatch(Cursor & cur, FuncRequest & cmd);
75         ///
76         bool getStatus(Cursor & cur, FuncRequest const & cmd,
77                 FuncStatus & flag) const;
78         ///
79         Inset * clone() const { return new InsetHyperlink(*this); }
80         //@}
81
82         /// \name Private functions inherited from InsetCommand class
83         //@{
84         ///
85         docstring screenLabel() const;
86         //@}
87
88         ///
89         void viewTarget() const;
90 };
91
92
93 } // namespace lyx
94
95 #endif // INSET_HYPERLINK_H