2000-02-25 12:06:15 +00:00
|
|
|
// -*- C++ -*-
|
2002-09-25 14:26:13 +00:00
|
|
|
/**
|
2007-04-25 01:24:38 +00:00
|
|
|
* \file InsetERT.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.
|
2002-03-21 17:09:55 +00:00
|
|
|
*
|
2008-11-14 15:58:50 +00:00
|
|
|
* \author Jürgen Vigna
|
|
|
|
* \author Lars Gullik Bjønnes
|
2000-02-25 12:06:15 +00:00
|
|
|
*
|
2003-08-23 00:17:00 +00:00
|
|
|
* Full author contact details are available in file CREDITS.
|
2000-02-25 12:06:15 +00:00
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef INSETERT_H
|
|
|
|
#define INSETERT_H
|
|
|
|
|
2017-10-16 08:12:21 +00:00
|
|
|
#include "InsetCollapsible.h"
|
2006-10-21 00:16:43 +00:00
|
|
|
|
|
|
|
namespace lyx {
|
2002-05-29 16:21:03 +00:00
|
|
|
|
2017-10-16 08:03:05 +00:00
|
|
|
/** A collapsible text inset for LaTeX insertions.
|
2002-03-21 17:09:55 +00:00
|
|
|
|
2000-02-25 12:06:15 +00:00
|
|
|
To write full ert (including styles and other insets) in a given
|
2001-10-31 15:19:49 +00:00
|
|
|
space.
|
|
|
|
|
|
|
|
Note that collapsed_ encompasses both the inline and collapsed button
|
2002-03-21 17:09:55 +00:00
|
|
|
versions of this inset.
|
2000-02-25 12:06:15 +00:00
|
|
|
*/
|
2002-02-20 14:55:17 +00:00
|
|
|
|
|
|
|
class Language;
|
|
|
|
|
2017-10-16 08:12:21 +00:00
|
|
|
class InsetERT : public InsetCollapsible {
|
2000-02-25 12:06:15 +00:00
|
|
|
public:
|
2001-08-06 14:55:02 +00:00
|
|
|
///
|
2009-11-08 15:53:21 +00:00
|
|
|
InsetERT(Buffer *, CollapseStatus status = Open);
|
2018-04-02 02:40:00 +00:00
|
|
|
///
|
2018-10-04 17:36:01 +00:00
|
|
|
InsetERT(InsetERT const & old);
|
2001-07-08 12:52:16 +00:00
|
|
|
///
|
2008-03-27 23:37:59 +00:00
|
|
|
static CollapseStatus string2params(std::string const &);
|
2008-03-26 23:41:35 +00:00
|
|
|
///
|
|
|
|
static std::string params2string(CollapseStatus);
|
2010-03-28 20:12:24 +00:00
|
|
|
|
2011-10-29 14:48:55 +00:00
|
|
|
std::string contextMenuName() const
|
|
|
|
{ return "context-ert"; }
|
2008-03-05 00:21:05 +00:00
|
|
|
private:
|
2001-08-06 14:55:02 +00:00
|
|
|
///
|
2007-10-13 09:04:52 +00:00
|
|
|
InsetCode lyxCode() const { return ERT_CODE; }
|
2001-07-27 12:03:36 +00:00
|
|
|
///
|
2011-03-28 22:33:04 +00:00
|
|
|
docstring layoutName() const { return from_ascii("ERT"); }
|
2007-04-29 12:32:14 +00:00
|
|
|
///
|
2008-02-27 20:43:16 +00:00
|
|
|
void write(std::ostream & os) const;
|
2000-06-28 13:35:52 +00:00
|
|
|
///
|
2013-03-08 19:52:18 +00:00
|
|
|
int plaintext(odocstringstream & ods, OutputParams const & op,
|
|
|
|
size_t max_length = INT_MAX) const;
|
2001-06-27 14:10:35 +00:00
|
|
|
///
|
2020-06-08 21:27:49 +00:00
|
|
|
void docbook(XMLStream &, OutputParams const &) const;
|
2001-06-27 14:10:35 +00:00
|
|
|
///
|
2019-05-09 23:35:40 +00:00
|
|
|
docstring xhtml(XMLStream &, OutputParams const &) const;
|
2009-06-06 04:20:57 +00:00
|
|
|
///
|
2001-08-18 15:01:09 +00:00
|
|
|
void validate(LaTeXFeatures &) const {}
|
Run codespell on src/insets
Command was
codespell -w -i 3 -S Makefile.in -L mathed,afe,tthe,ue,fro,uint,larg,alph,te,thes,alle,Claus,pres,pass-thru src/insets/
2020-06-25 21:46:16 +00:00
|
|
|
/// should paragraph indentation be omitted in any case?
|
2008-02-27 20:43:16 +00:00
|
|
|
bool neverIndent() const { return true; }
|
2003-10-17 18:01:15 +00:00
|
|
|
///
|
2008-03-05 00:21:05 +00:00
|
|
|
void doDispatch(Cursor & cur, FuncRequest & cmd);
|
2004-11-04 19:50:04 +00:00
|
|
|
///
|
2007-04-26 14:56:30 +00:00
|
|
|
bool getStatus(Cursor & cur, FuncRequest const & cmd, FuncStatus &) const;
|
2018-04-02 02:40:00 +00:00
|
|
|
///
|
2008-03-05 00:21:05 +00:00
|
|
|
Inset * clone() const { return new InsetERT(*this); }
|
2001-07-24 10:13:19 +00:00
|
|
|
///
|
2009-02-25 22:35:41 +00:00
|
|
|
docstring const buttonLabel(BufferView const & bv) const;
|
2003-11-07 09:40:49 +00:00
|
|
|
///
|
|
|
|
bool allowSpellCheck() const { return false; }
|
2018-04-02 02:40:00 +00:00
|
|
|
///
|
2018-07-22 18:04:19 +00:00
|
|
|
bool insetAllowed(InsetCode code) const { return code == QUOTE_CODE; }
|
2000-02-25 12:06:15 +00:00
|
|
|
};
|
|
|
|
|
2003-02-25 14:51:38 +00:00
|
|
|
|
2006-10-21 00:16:43 +00:00
|
|
|
} // namespace lyx
|
|
|
|
|
2000-02-25 12:06:15 +00:00
|
|
|
#endif
|