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