#ifndef INSETTEXT_H
#define INSETTEXT_H
-
#include "updatableinset.h"
#include "LString.h"
#include "LColor.h"
#include "ParagraphList.h"
#include "RowList.h"
+#include "dimension.h"
+#include "frontends/mouse_state.h"
#include "support/types.h"
#include <boost/shared_ptr.hpp>
+#include <map>
class Painter;
class BufferView;
///
void write(Buffer const *, std::ostream &) const;
///
- int ascent(BufferView *, LyXFont const &) const;
- ///
- int descent(BufferView *, LyXFont const &) const;
- ///
- int width(BufferView *, LyXFont const & f) const;
+ void dimension(BufferView *, LyXFont const &, Dimension &) const;
///
int textWidth(BufferView *, bool fordraw = false) const;
///
///
string const editMessage() const;
///
- void edit(BufferView *, int, int, mouse_button::state);
- ///
- void edit(BufferView *, bool front = true);
- ///
bool isTextInset() const { return true; }
///
void insetUnlock(BufferView *);
RESULT localDispatch(FuncRequest const &);
///
int latex(Buffer const *, std::ostream &,
- bool fragile, bool free_spc) const;
+ LatexRunParams const &) const;
///
int ascii(Buffer const *, std::ostream &, int linelen) const;
///
void validate(LaTeXFeatures & features) const;
///
Inset::Code lyxCode() const { return Inset::TEXT_CODE; }
- ///
+ /// FIXME, document
void getCursorPos(BufferView *, int & x, int & y) const;
+ /// Get the absolute document x,y of the cursor
+ virtual void getCursor(BufferView &, int &, int &) const;
///
int insetInInsetY() const;
///
- void toggleInsetCursor(BufferView *);
- ///
- void showInsetCursor(BufferView *, bool show = true);
- ///
- void hideInsetCursor(BufferView *);
- ///
void fitInsetCursor(BufferView *) const;
///
bool insertInset(BufferView *, Inset *);
///
Inset * getInsetFromID(int id) const;
///
- Paragraph * firstParagraph() const;
- ///
- Paragraph * getFirstParagraph(int) const;
+ ParagraphList * getParagraphs(int) const;
///
LyXCursor const & cursor(BufferView *) const;
///
- void paragraph(Paragraph *);
- ///
bool allowSpellcheck() const { return true; }
///
WordLangTuple const
///
mutable bool locked;
///
- mutable int insetAscent;
- ///
- mutable int insetDescent;
- ///
- mutable int insetWidth;
+ mutable Dimension dim_;
///
mutable int top_y;
///