#define INSETTEXT_H
#include "Inset.h"
-#include "RowList_fwd.h"
-#include "LyXFont.h"
-#include "LyXText.h"
-#include "ParagraphList_fwd.h"
+#include "Font.h"
+#include "Text.h"
#include "support/types.h"
class BufferView;
class CursorSlice;
class Dimension;
-class LColor_color;
+class Color_color;
+class ParagraphList;
/**
A text inset is like a TeX box to write full text
(including styles and other insets) in a given space.
*/
-class InsetText : public InsetOld {
+class InsetText : public Inset {
public:
///
explicit InsetText(BufferParams const &);
///
InsetText();
- ///
- virtual ~InsetText() {}
/// empty inset to empty par
void clear();
///
- void read(Buffer const & buf, LyXLex & lex);
+ void read(Buffer const & buf, Lexer & lex);
///
void write(Buffer const & buf, std::ostream & os) const;
///
///
Code lyxCode() const { return TEXT_CODE; }
///
- void setText(docstring const &, LyXFont const &, bool trackChanges);
+ void setText(docstring const &, Font const &, bool trackChanges);
///
void setAutoBreakRows(bool);
///
///
void setDrawFrame(bool);
///
- LColor_color frameColor() const;
+ Color_color frameColor() const;
///
- void setFrameColor(LColor_color);
+ void setFrameColor(Color_color);
///
bool showInsetDialog(BufferView *) const;
///
- LyXText * getText(int i) const {
- return (i == 0) ? const_cast<LyXText*>(&text_) : 0;
+ Text * getText(int i) const {
+ return (i == 0) ? const_cast<Text*>(&text_) : 0;
}
///
- virtual bool getStatus(LCursor & cur, FuncRequest const & cmd, FuncStatus &) const;
+ virtual bool getStatus(Cursor & cur, FuncRequest const & cmd, FuncStatus &) const;
/// set the change for the entire inset
void setChange(Change const & change);
void addPreview(graphics::PreviewLoader &) const;
///
- void edit(LCursor & cur, bool left);
+ void edit(Cursor & cur, bool left);
///
- InsetBase * editXY(LCursor & cur, int x, int y);
+ Inset * editXY(Cursor & cur, int x, int y);
/// number of cells in this inset
size_t nargs() const { return 1; }
protected:
///
- virtual void doDispatch(LCursor & cur, FuncRequest & cmd);
+ virtual void doDispatch(Cursor & cur, FuncRequest & cmd);
private:
///
- virtual std::auto_ptr<InsetBase> doClone() const;
+ virtual std::auto_ptr<Inset> doClone() const;
///
void init();
///
bool drawFrame_;
- /** We store the LColor::color value as an int to get LColor.h out
+ /** We store the Color::color value as an int to get Color.h out
* of the header file.
*/
int frame_color_;
bool wide_inset_;
public:
///
- mutable LyXText text_;
+ mutable Text text_;
///
- mutable LyXFont font_;
+ mutable Font font_;
///
static int border_;
};