]> git.lyx.org Git - lyx.git/blob - src/insets/InsetHyperlink.h
This should be the last of the commits refactoring the InsetLayout code.
[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
16 #include "InsetCommand.h"
17
18
19 namespace lyx {
20
21 class LaTeXFeatures;
22
23 /** The hyperlink inset
24  */
25 class InsetHyperlink : public InsetCommand {
26 public:
27         ///
28         explicit
29         InsetHyperlink(InsetCommandParams const &);
30         ///
31         InsetCode lyxCode() const { return HYPERLINK_CODE; }
32         ///
33         void validate(LaTeXFeatures &) const;
34         ///
35         docstring const getScreenLabel(Buffer const &) const;
36         ///
37         EDITABLE editable() const { return IS_EDITABLE; }
38         ///
39         DisplayType display() const { return Inline; }
40         ///
41         int latex(Buffer const &, odocstream &,
42                   OutputParams const &) const;
43         ///
44         int plaintext(Buffer const &, odocstream &,
45                       OutputParams const &) const;
46         ///
47         int docbook(Buffer const &, odocstream &,
48                     OutputParams const &) const;
49         /// the string that is passed to the TOC
50         void textString(Buffer const &, odocstream &) const;
51         ///
52         static CommandInfo const * findInfo(std::string const &);
53         ///
54         static std::string defaultCommand() { return "href"; };
55         ///
56         static bool isCompatibleCommand(std::string const & s) 
57                 { return s == "href"; }
58         /// Force inset into LTR environment if surroundings are RTL?
59         virtual bool forceLTR() const { return true; }
60 private:
61         virtual Inset * clone() const {
62                 return new InsetHyperlink(params());
63         }
64 };
65
66
67 } // namespace lyx
68
69 #endif