1999-09-27 18:44:28 +00:00
|
|
|
// -*- C++ -*-
|
2002-09-25 14:26:13 +00:00
|
|
|
/**
|
2007-10-13 19:06:09 +00:00
|
|
|
* \file InsetHyperlink.h
|
2002-09-25 14:26:13 +00:00
|
|
|
* This file is part of LyX, the document processor.
|
|
|
|
* Licence details can be found in the file COPYING.
|
1999-09-27 18:44:28 +00:00
|
|
|
*
|
2008-11-14 15:58:50 +00:00
|
|
|
* \author José Matos
|
2002-03-21 17:09:55 +00:00
|
|
|
*
|
2003-08-23 00:17:00 +00:00
|
|
|
* Full author contact details are available in file CREDITS.
|
2002-09-25 14:26:13 +00:00
|
|
|
*/
|
1999-09-27 18:44:28 +00:00
|
|
|
|
2007-10-13 19:06:09 +00:00
|
|
|
#ifndef INSET_HYPERLINK_H
|
|
|
|
#define INSET_HYPERLINK_H
|
1999-09-27 18:44:28 +00:00
|
|
|
|
2007-04-25 01:24:38 +00:00
|
|
|
#include "InsetCommand.h"
|
1999-09-27 18:44:28 +00:00
|
|
|
|
2006-10-21 00:16:43 +00:00
|
|
|
|
|
|
|
namespace lyx {
|
|
|
|
|
2007-10-13 19:06:09 +00:00
|
|
|
/** The hyperlink inset
|
1999-09-27 18:44:28 +00:00
|
|
|
*/
|
2008-04-08 20:19:23 +00:00
|
|
|
class InsetHyperlink : public InsetCommand
|
|
|
|
{
|
1999-09-27 18:44:28 +00:00
|
|
|
public:
|
|
|
|
///
|
2009-11-08 16:10:34 +00:00
|
|
|
explicit InsetHyperlink(Buffer * buf, InsetCommandParams const &);
|
2003-05-26 09:13:55 +00:00
|
|
|
///
|
2007-10-13 19:06:09 +00:00
|
|
|
InsetCode lyxCode() const { return HYPERLINK_CODE; }
|
1999-09-27 18:44:28 +00:00
|
|
|
///
|
2001-06-29 06:30:53 +00:00
|
|
|
void validate(LaTeXFeatures &) const;
|
1999-09-27 18:44:28 +00:00
|
|
|
///
|
2008-02-27 20:43:16 +00:00
|
|
|
docstring screenLabel() const;
|
1999-09-27 18:44:28 +00:00
|
|
|
///
|
2009-04-22 20:55:13 +00:00
|
|
|
bool hasSettings() const { return true; }
|
1999-09-27 18:44:28 +00:00
|
|
|
///
|
2007-05-18 14:32:29 +00:00
|
|
|
DisplayType display() const { return Inline; }
|
1999-09-27 18:44:28 +00:00
|
|
|
///
|
2008-02-27 20:43:16 +00:00
|
|
|
int latex(odocstream &, OutputParams const &) const;
|
2000-03-06 02:42:40 +00:00
|
|
|
///
|
2008-02-27 20:43:16 +00:00
|
|
|
int plaintext(odocstream &, OutputParams const &) const;
|
2000-04-24 20:58:23 +00:00
|
|
|
///
|
2008-02-27 20:43:16 +00:00
|
|
|
int docbook(odocstream &, OutputParams const &) const;
|
2009-06-05 17:48:14 +00:00
|
|
|
///
|
2009-11-25 22:19:59 +00:00
|
|
|
docstring xhtml(XHTMLStream &, OutputParams const &) const;
|
2005-11-25 14:40:34 +00:00
|
|
|
/// the string that is passed to the TOC
|
2008-11-10 22:45:14 +00:00
|
|
|
void tocString(odocstream &) const;
|
2007-10-25 04:13:56 +00:00
|
|
|
///
|
2008-02-23 22:01:02 +00:00
|
|
|
static ParamInfo const & findInfo(std::string const &);
|
2007-10-25 04:13:56 +00:00
|
|
|
///
|
2009-12-10 18:30:48 +00:00
|
|
|
static std::string defaultCommand() { return "href"; }
|
2007-10-25 04:13:56 +00:00
|
|
|
///
|
|
|
|
static bool isCompatibleCommand(std::string const & s)
|
|
|
|
{ return s == "href"; }
|
2007-11-05 23:44:47 +00:00
|
|
|
/// Force inset into LTR environment if surroundings are RTL?
|
2008-02-27 20:43:16 +00:00
|
|
|
bool forceLTR() const { return true; }
|
2009-12-10 18:30:48 +00:00
|
|
|
///
|
|
|
|
virtual bool isInToc() const { return true; }
|
2004-11-23 23:04:52 +00:00
|
|
|
private:
|
2008-04-08 20:19:23 +00:00
|
|
|
Inset * clone() const { return new InsetHyperlink(*this); }
|
1999-09-27 18:44:28 +00:00
|
|
|
};
|
|
|
|
|
2006-10-21 00:16:43 +00:00
|
|
|
|
|
|
|
} // namespace lyx
|
|
|
|
|
1999-09-27 18:44:28 +00:00
|
|
|
#endif
|