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(OutputParams const &) const { return true; }
37 bool isInToc() const { return true; }
39 void toString(odocstream &) const;
41 void forOutliner(docstring &, size_t const, bool const) const;
43 docstring toolTip(BufferView const & bv, int x, int y) const;
45 std::string contextMenuName() const;
47 void validate(LaTeXFeatures &) const;
49 void latex(otexstream &, OutputParams const &) const;
51 int plaintext(odocstringstream & ods, OutputParams const & op,
52 size_t max_length = INT_MAX) const;
54 void docbook(XMLStream &, OutputParams const &) const;
56 docstring xhtml(XMLStream &, OutputParams const &) const;
59 /// \name Static public methods obligated for InsetCommand derived classes
62 static bool isCompatibleCommand(std::string const & s)
63 { return s == "href"; }
65 static std::string defaultCommand() { return "href"; }
67 static ParamInfo const & findInfo(std::string const &);
71 /// \name Private functions inherited from Inset class
74 void doDispatch(Cursor & cur, FuncRequest & cmd);
76 bool getStatus(Cursor & cur, FuncRequest const & cmd,
77 FuncStatus & flag) const;
79 Inset * clone() const { return new InsetHyperlink(*this); }
82 /// \name Private functions inherited from InsetCommand class
85 docstring screenLabel() const;
89 void viewTarget() const;
95 #endif // INSET_HYPERLINK_H