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:
|
|
|
|
///
|
2008-03-04 22:28:18 +00:00
|
|
|
InsetFlex(Buffer const &, DocumentClass * dc,
|
2008-02-27 23:11:50 +00:00
|
|
|
std::string const & layoutName);
|
2007-04-29 12:32:14 +00:00
|
|
|
///
|
2007-11-05 10:14:19 +00:00
|
|
|
docstring name() const { return from_utf8(name_); }
|
2007-11-03 09:03:08 +00:00
|
|
|
|
2003-11-12 14:38:26 +00:00
|
|
|
///
|
2008-02-27 20:43:16 +00:00
|
|
|
docstring editMessage() const;
|
2003-11-12 14:38:26 +00:00
|
|
|
///
|
2007-10-13 09:04:52 +00:00
|
|
|
InsetCode lyxCode() const { return FLEX_CODE; }
|
2003-11-12 14:38:26 +00:00
|
|
|
///
|
2008-02-27 20:43:16 +00:00
|
|
|
void write(std::ostream &) const;
|
2003-11-12 14:38:26 +00:00
|
|
|
///
|
2008-02-27 20:43:16 +00:00
|
|
|
void read(Lexer & lex);
|
2003-11-12 14:38:26 +00:00
|
|
|
///
|
2008-03-19 16:21:33 +00:00
|
|
|
virtual bool allowParagraphCustomization(idx_type = 0) const { return false; }
|
2007-08-16 16:36:50 +00:00
|
|
|
|
2003-11-12 14:38:26 +00:00
|
|
|
///
|
2008-02-27 20:43:16 +00:00
|
|
|
int plaintext(odocstream &, OutputParams const &) const;
|
2007-02-17 15:28:50 +00:00
|
|
|
///
|
2008-02-27 20:43:16 +00:00
|
|
|
int docbook(odocstream &, OutputParams const &) const;
|
2005-11-25 14:40:34 +00:00
|
|
|
/// the string that is passed to the TOC
|
2008-02-27 20:43:16 +00:00
|
|
|
void textString(odocstream &) const;
|
2008-01-07 16:59:10 +00:00
|
|
|
///
|
|
|
|
void validate(LaTeXFeatures &) const;
|
2003-11-12 14:38:26 +00:00
|
|
|
|
2005-09-10 06:51:58 +00:00
|
|
|
/// should paragraph indendation be ommitted in any case?
|
2008-02-27 20:43:16 +00:00
|
|
|
bool neverIndent() const { return true; }
|
2005-09-10 06:51:58 +00:00
|
|
|
|
2003-11-12 14:38:26 +00:00
|
|
|
protected:
|
2007-09-05 15:29:04 +00:00
|
|
|
InsetFlex(InsetFlex const &);
|
2003-11-12 14:38:26 +00:00
|
|
|
|
|
|
|
private:
|
2008-03-04 22:28:18 +00:00
|
|
|
Inset * clone() const { return new InsetFlex(*this); }
|
2004-11-23 23:04:52 +00:00
|
|
|
|
2003-11-12 14:38:26 +00:00
|
|
|
///
|
2007-11-05 10:14:19 +00:00
|
|
|
std::string name_;
|
2008-01-07 16:59:10 +00:00
|
|
|
///
|
2008-02-01 15:12:04 +00:00
|
|
|
std::set<std::string> packages_;
|
2008-01-07 16:59:10 +00:00
|
|
|
///
|
|
|
|
std::string preamble_;
|
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
|