3 * \file InsetHyperlink.h
4 * This file is part of LyX, the document processor.
5 * Licence details can be found in the file COPYING.
9 * Full author contact details are available in file CREDITS.
12 #ifndef INSET_HYPERLINK_H
13 #define INSET_HYPERLINK_H
15 #include "InsetCommand.h"
20 /** The hyperlink inset
22 class InsetHyperlink : public InsetCommand
26 InsetHyperlink(Buffer * buf, InsetCommandParams const &);
28 /// \name Public functions inherited from Inset class
31 InsetCode lyxCode() const { return HYPERLINK_CODE; }
33 bool hasSettings() const { return true; }
35 bool inheritFont() const { return true; }
37 bool forceLTR() const { return true; }
39 bool isInToc() const { return true; }
41 void toString(odocstream &) const;
43 void forOutliner(docstring &, size_t const, bool const) const;
45 docstring toolTip(BufferView const & bv, int x, int y) const;
47 std::string contextMenuName() const;
49 void validate(LaTeXFeatures &) const;
51 void latex(otexstream &, OutputParams const &) const;
53 int plaintext(odocstringstream & ods, OutputParams const & op,
54 size_t max_length = INT_MAX) const;
56 int docbook(odocstream &, OutputParams const &) const;
58 docstring xhtml(XHTMLStream &, OutputParams const &) const;
61 /// \name Static public methods obligated for InsetCommand derived classes
64 static bool isCompatibleCommand(std::string const & s)
65 { return s == "href"; }
67 static std::string defaultCommand() { return "href"; }
69 static ParamInfo const & findInfo(std::string const &);
73 /// \name Private functions inherited from Inset class
76 void doDispatch(Cursor & cur, FuncRequest & cmd);
78 bool getStatus(Cursor & cur, FuncRequest const & cmd,
79 FuncStatus & flag) const;
81 Inset * clone() const { return new InsetHyperlink(*this); }
84 /// \name Private functions inherited from InsetCommand class
87 docstring screenLabel() const;
91 void viewTarget() const;
97 #endif // INSET_HYPERLINK_H