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
|
|
|
|
2007-04-25 01:24:38 +00:00
|
|
|
#include "InsetCollapsable.h"
|
2003-11-12 14:38:26 +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
|
|
|
|
|
|
|
*/
|
2007-09-05 15:29:04 +00:00
|
|
|
class InsetFlex : public InsetCollapsable {
|
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
|
|
|
///
|
2011-03-28 23:11:54 +00:00
|
|
|
docstring layoutName() const { return from_utf8("Flex:" + name_); }
|
2010-10-12 15:37:02 +00:00
|
|
|
///
|
|
|
|
InsetLayout const & getLayout() const;
|
2003-11-12 14:38:26 +00:00
|
|
|
///
|
2007-10-13 09:04:52 +00:00
|
|
|
InsetCode lyxCode() const { return FLEX_CODE; }
|
2011-02-22 19:41:04 +00:00
|
|
|
///
|
|
|
|
bool resetFontEdit() const;
|
2009-07-13 14:06:05 +00:00
|
|
|
/// Default looks
|
|
|
|
InsetLayout::InsetDecoration decoration() const;
|
2003-11-12 14:38:26 +00:00
|
|
|
///
|
2008-02-27 20:43:16 +00:00
|
|
|
void write(std::ostream &) const;
|
2005-09-10 06:51:58 +00:00
|
|
|
/// should paragraph indendation be ommitted in any case?
|
2011-02-22 19:41:04 +00:00
|
|
|
bool neverIndent() const { return true; }
|
2009-04-22 20:55:13 +00:00
|
|
|
///
|
|
|
|
bool hasSettings() const { return false; }
|
2009-10-26 23:49:43 +00:00
|
|
|
///
|
|
|
|
bool getStatus(Cursor & cur, FuncRequest const & cmd,
|
|
|
|
FuncStatus &) const;
|
|
|
|
///
|
|
|
|
void doDispatch(Cursor & cur, FuncRequest & cmd);
|
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
|
|
|
///
|
2008-03-04 22:28:18 +00:00
|
|
|
Inset * clone() const { 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
|