2000-02-25 12:06:15 +00:00
|
|
|
// -*- C++ -*-
|
|
|
|
/* This file is part of
|
|
|
|
* ======================================================
|
|
|
|
*
|
|
|
|
* LyX, The Document Processor
|
|
|
|
*
|
2000-02-25 13:35:38 +00:00
|
|
|
* Copyright 1998 The LyX Team.
|
2000-02-25 12:06:15 +00:00
|
|
|
*
|
|
|
|
*======================================================
|
|
|
|
*/
|
|
|
|
// The pristine updatable inset: Text
|
|
|
|
|
|
|
|
|
|
|
|
#ifndef INSETERT_H
|
|
|
|
#define INSETERT_H
|
|
|
|
|
|
|
|
#ifdef __GNUG__
|
|
|
|
#pragma interface
|
|
|
|
#endif
|
|
|
|
|
2000-03-08 13:52:57 +00:00
|
|
|
#include "insetcollapsable.h"
|
2000-02-25 12:06:15 +00:00
|
|
|
|
|
|
|
/** A colapsable text inset
|
|
|
|
|
|
|
|
To write full ert (including styles and other insets) in a given
|
|
|
|
space.
|
|
|
|
*/
|
2000-03-08 13:52:57 +00:00
|
|
|
class InsetERT : public InsetCollapsable {
|
2000-02-25 12:06:15 +00:00
|
|
|
public:
|
2000-06-28 13:35:52 +00:00
|
|
|
///
|
|
|
|
InsetERT();
|
|
|
|
///
|
2001-07-23 09:11:14 +00:00
|
|
|
InsetERT(string const & contents, bool collapsed);
|
2001-07-08 12:52:16 +00:00
|
|
|
///
|
2001-06-28 10:25:20 +00:00
|
|
|
virtual void write(Buffer const * buf, std::ostream & os) const;
|
2000-06-28 13:35:52 +00:00
|
|
|
///
|
2001-07-06 15:57:54 +00:00
|
|
|
virtual Inset * clone(Buffer const &, bool same_id = false) const;
|
2000-06-28 13:35:52 +00:00
|
|
|
///
|
2001-06-28 10:25:20 +00:00
|
|
|
virtual string const editMessage() const;
|
2000-06-28 13:35:52 +00:00
|
|
|
///
|
2001-06-28 10:25:20 +00:00
|
|
|
virtual bool insertInset(BufferView *, Inset *);
|
2000-06-28 13:35:52 +00:00
|
|
|
///
|
2001-07-19 08:52:59 +00:00
|
|
|
virtual bool insetAllowed(Inset::Code) const { return false; }
|
2001-07-09 14:19:41 +00:00
|
|
|
///
|
2001-06-28 10:25:20 +00:00
|
|
|
virtual void setFont(BufferView *, LyXFont const &,
|
2001-07-20 14:18:48 +00:00
|
|
|
bool toggleall = false, bool selectall = false);
|
2000-06-28 13:35:52 +00:00
|
|
|
///
|
2001-06-28 10:25:20 +00:00
|
|
|
virtual void edit(BufferView *, int, int, unsigned int);
|
2001-06-27 14:10:35 +00:00
|
|
|
///
|
2001-07-20 14:18:48 +00:00
|
|
|
virtual void edit(BufferView * bv, bool front = true);
|
|
|
|
///
|
2001-06-28 10:25:20 +00:00
|
|
|
virtual int latex(Buffer const *, std::ostream &, bool fragile,
|
2001-07-20 14:18:48 +00:00
|
|
|
bool free_spc) const;
|
2001-06-27 14:10:35 +00:00
|
|
|
///
|
2001-06-28 10:25:20 +00:00
|
|
|
virtual int ascii(Buffer const *,
|
2001-07-20 14:18:48 +00:00
|
|
|
std::ostream &, int linelen = 0) const;
|
2001-06-27 14:10:35 +00:00
|
|
|
///
|
2001-06-28 10:25:20 +00:00
|
|
|
virtual int linuxdoc(Buffer const *, std::ostream &) const;
|
2001-06-27 14:10:35 +00:00
|
|
|
///
|
2001-06-28 10:25:20 +00:00
|
|
|
virtual int docBook(Buffer const *, std::ostream &) const;
|
2001-07-24 10:13:19 +00:00
|
|
|
private:
|
|
|
|
///
|
|
|
|
void init();
|
2000-02-25 12:06:15 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif
|