2003-11-12 14:38:26 +00:00
|
|
|
// -*- C++ -*-
|
|
|
|
/**
|
2007-09-05 15:29:04 +00:00
|
|
|
* \file InsetFlex.h
|
2003-11-12 14:38:26 +00:00
|
|
|
* This file is part of LyX, the document processor.
|
|
|
|
* Licence details can be found in the file COPYING.
|
|
|
|
*
|
|
|
|
* \author Angus Leeming
|
|
|
|
* \author Martin Vermeer
|
|
|
|
*
|
|
|
|
* Full author contact details are available in file CREDITS.
|
|
|
|
*/
|
|
|
|
|
2007-09-05 15:29:04 +00:00
|
|
|
#ifndef INSETFLEX_H
|
|
|
|
#define INSETFLEX_H
|
2003-11-12 14:38:26 +00:00
|
|
|
|
2017-10-16 08:12:21 +00:00
|
|
|
#include "InsetCollapsible.h"
|
2003-11-12 14:38:26 +00:00
|
|
|
|
2020-12-02 20:34:28 +00:00
|
|
|
|
2006-10-21 00:16:43 +00:00
|
|
|
namespace lyx {
|
|
|
|
|
2007-09-05 15:29:04 +00:00
|
|
|
/** The Flex inset, e.g., CharStyle, Custom inset or XML short element
|
2003-11-12 14:38:26 +00:00
|
|
|
|
|
|
|
*/
|
2017-10-16 08:12:21 +00:00
|
|
|
class InsetFlex : public InsetCollapsible {
|
2003-11-12 14:38:26 +00:00
|
|
|
public:
|
|
|
|
///
|
2009-11-08 15:53:21 +00:00
|
|
|
InsetFlex(Buffer *, std::string const & layoutName);
|
2007-04-29 12:32:14 +00:00
|
|
|
///
|
2020-10-01 07:42:11 +00:00
|
|
|
docstring layoutName() const override { return from_utf8("Flex:" + name_); }
|
2010-10-12 15:37:02 +00:00
|
|
|
///
|
2020-10-01 07:42:11 +00:00
|
|
|
InsetLayout const & getLayout() const override;
|
2003-11-12 14:38:26 +00:00
|
|
|
///
|
2020-10-01 07:42:11 +00:00
|
|
|
InsetCode lyxCode() const override { return FLEX_CODE; }
|
2009-07-13 14:06:05 +00:00
|
|
|
/// Default looks
|
2020-12-02 20:34:28 +00:00
|
|
|
InsetDecoration decoration() const override;
|
2003-11-12 14:38:26 +00:00
|
|
|
///
|
2020-10-01 07:42:11 +00:00
|
|
|
void write(std::ostream &) const override;
|
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?
|
2020-10-01 07:42:11 +00:00
|
|
|
bool neverIndent() const override { return true; }
|
2009-04-22 20:55:13 +00:00
|
|
|
///
|
2020-10-01 07:42:11 +00:00
|
|
|
bool hasSettings() const override { return false; }
|
2009-10-26 23:49:43 +00:00
|
|
|
///
|
2021-02-17 18:51:01 +00:00
|
|
|
bool canTrackChanges() const override { return name_ != "URL"; }
|
|
|
|
///
|
2009-10-26 23:49:43 +00:00
|
|
|
bool getStatus(Cursor & cur, FuncRequest const & cmd,
|
2020-10-01 07:42:11 +00:00
|
|
|
FuncStatus &) const override;
|
2009-10-26 23:49:43 +00:00
|
|
|
///
|
2020-10-01 07:42:11 +00:00
|
|
|
void doDispatch(Cursor & cur, FuncRequest & cmd) override;
|
2013-05-23 20:36:59 +00:00
|
|
|
///
|
2020-10-01 07:42:11 +00:00
|
|
|
void updateBuffer(ParIterator const & it, UpdateType utype, bool const deleted = false) override;
|
2005-09-10 06:51:58 +00:00
|
|
|
|
2003-11-12 14:38:26 +00:00
|
|
|
protected:
|
2009-10-26 23:49:43 +00:00
|
|
|
///
|
2007-09-05 15:29:04 +00:00
|
|
|
InsetFlex(InsetFlex const &);
|
2003-11-12 14:38:26 +00:00
|
|
|
|
|
|
|
private:
|
2009-10-26 23:49:43 +00:00
|
|
|
///
|
2020-10-01 07:42:11 +00:00
|
|
|
Inset * clone() const override { return new InsetFlex(*this); }
|
2003-11-12 14:38:26 +00:00
|
|
|
///
|
2007-11-05 10:14:19 +00:00
|
|
|
std::string name_;
|
2003-11-12 14:38:26 +00:00
|
|
|
};
|
|
|
|
|
2006-10-21 00:16:43 +00:00
|
|
|
|
|
|
|
} // namespace lyx
|
|
|
|
|
2003-11-12 14:38:26 +00:00
|
|
|
#endif
|