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