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 forceLTR() const { return true; }
37 bool isInToc() const { return true; }
39 void tocString(odocstream &) const;
41 docstring toolTip(BufferView const & bv, int x, int y) const;
43 docstring contextMenu(BufferView const &, int, int) const;
45 void validate(LaTeXFeatures &) const;
47 int latex(odocstream &, OutputParams const &) const;
49 int plaintext(odocstream &, OutputParams const &) const;
51 int docbook(odocstream &, OutputParams const &) const;
53 docstring xhtml(XHTMLStream &, OutputParams const &) const;
56 /// \name Static public methods obligated for InsetCommand derived classes
59 static bool isCompatibleCommand(std::string const & s)
60 { return s == "href"; }
62 static std::string defaultCommand() { return "href"; }
64 static ParamInfo const & findInfo(std::string const &);
68 /// \name Private functions inherited from Inset class
71 void doDispatch(Cursor & cur, FuncRequest & cmd);
73 bool getStatus(Cursor & cur, FuncRequest const & cmd,
74 FuncStatus & flag) const;
76 Inset * clone() const { return new InsetHyperlink(*this); }
79 /// \name Private functions inherited from InsetCommand class
82 docstring screenLabel() const;
86 void viewTarget() const;
92 #endif // INSET_HYPERLINK_H