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 explicit InsetHyperlink(Buffer * buf, InsetCommandParams const &);
28 InsetCode lyxCode() const { return HYPERLINK_CODE; }
30 void validate(LaTeXFeatures &) const;
32 docstring screenLabel() const;
34 bool hasSettings() const { return true; }
36 DisplayType display() const { return Inline; }
38 int latex(odocstream &, OutputParams const &) const;
40 int plaintext(odocstream &, OutputParams const &) const;
42 int docbook(odocstream &, OutputParams const &) const;
44 docstring xhtml(XHTMLStream &, OutputParams const &) const;
45 /// the string that is passed to the TOC
46 void tocString(odocstream &) const;
48 static ParamInfo const & findInfo(std::string const &);
50 static std::string defaultCommand() { return "href"; }
52 static bool isCompatibleCommand(std::string const & s)
53 { return s == "href"; }
54 /// Force inset into LTR environment if surroundings are RTL
55 bool forceLTR() const { return true; }
57 virtual bool isInToc() const { return true; }
59 docstring contextMenu(BufferView const & bv, int x, int y) const;
61 docstring toolTip(BufferView const & bv, int x, int y) const;
64 void doDispatch(Cursor & cur, FuncRequest & cmd);
66 bool getStatus(Cursor & cur, FuncRequest const & cmd,
67 FuncStatus & flag) const;
69 void viewTarget() const;
71 Inset * clone() const { return new InsetHyperlink(*this); }