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
|
|
|
|
*
|
2000-08-23 15:18:19 +00:00
|
|
|
|
*
|
2000-02-25 12:06:15 +00:00
|
|
|
|
*======================================================
|
|
|
|
|
*/
|
|
|
|
|
// The pristine updatable inset: Text
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#ifndef INSETTEXT_H
|
|
|
|
|
#define INSETTEXT_H
|
|
|
|
|
|
|
|
|
|
#ifdef __GNUG__
|
|
|
|
|
#pragma interface
|
|
|
|
|
#endif
|
|
|
|
|
|
2001-06-25 00:06:33 +00:00
|
|
|
|
#include "inset.h"
|
2000-02-25 12:06:15 +00:00
|
|
|
|
#include "LString.h"
|
2001-07-06 15:57:54 +00:00
|
|
|
|
#include "LColor.h"
|
|
|
|
|
#include "paragraph.h"
|
2000-04-19 14:42:19 +00:00
|
|
|
|
#include "lyxcursor.h"
|
2001-07-05 14:52:08 +00:00
|
|
|
|
#include <boost/smart_ptr.hpp>
|
2000-02-25 12:06:15 +00:00
|
|
|
|
|
|
|
|
|
class Painter;
|
|
|
|
|
class BufferView;
|
2000-03-08 13:52:57 +00:00
|
|
|
|
class Buffer;
|
2000-05-15 14:49:36 +00:00
|
|
|
|
class LyXCursor;
|
2000-06-12 11:27:15 +00:00
|
|
|
|
class LyXText;
|
2000-06-21 15:07:57 +00:00
|
|
|
|
class LyXScreen;
|
2001-07-06 15:57:54 +00:00
|
|
|
|
class Row;
|
2000-02-25 12:06:15 +00:00
|
|
|
|
|
2000-06-12 11:27:15 +00:00
|
|
|
|
/**
|
2000-09-14 17:53:12 +00:00
|
|
|
|
A text inset is like a TeX box to write full text
|
|
|
|
|
(including styles and other insets) in a given space.
|
|
|
|
|
@author: J<EFBFBD>rgen Vigna
|
2000-06-12 11:27:15 +00:00
|
|
|
|
*/
|
2000-02-25 12:06:15 +00:00
|
|
|
|
class InsetText : public UpdatableInset {
|
|
|
|
|
public:
|
2001-04-02 14:02:58 +00:00
|
|
|
|
///
|
|
|
|
|
/// numbers need because of test if codeA < codeB
|
|
|
|
|
///
|
|
|
|
|
enum UpdateCodes {
|
|
|
|
|
///
|
|
|
|
|
NONE = 0,
|
|
|
|
|
///
|
|
|
|
|
CURSOR = 1,
|
|
|
|
|
///
|
|
|
|
|
CLEAR_FRAME = 2,
|
|
|
|
|
///
|
|
|
|
|
DRAW_FRAME = 4,
|
|
|
|
|
///
|
|
|
|
|
SELECTION = 8,
|
|
|
|
|
///
|
|
|
|
|
CURSOR_PAR = 16,
|
|
|
|
|
///
|
|
|
|
|
FULL = 32,
|
|
|
|
|
///
|
|
|
|
|
INIT = 64
|
|
|
|
|
};
|
|
|
|
|
///
|
|
|
|
|
enum DrawFrame {
|
|
|
|
|
///
|
|
|
|
|
NEVER = 0,
|
|
|
|
|
///
|
|
|
|
|
LOCKED,
|
|
|
|
|
///
|
|
|
|
|
ALWAYS
|
|
|
|
|
};
|
|
|
|
|
///
|
|
|
|
|
InsetText();
|
|
|
|
|
///
|
|
|
|
|
explicit
|
2001-07-06 15:57:54 +00:00
|
|
|
|
InsetText(InsetText const &, bool same_id = false);
|
2001-04-02 14:02:58 +00:00
|
|
|
|
///
|
|
|
|
|
~InsetText();
|
|
|
|
|
///
|
2001-07-06 15:57:54 +00:00
|
|
|
|
Inset * clone(Buffer const &, bool same_id = false) const;
|
2001-04-02 14:02:58 +00:00
|
|
|
|
///
|
|
|
|
|
InsetText & operator=(InsetText const & it);
|
|
|
|
|
///
|
|
|
|
|
void clear();
|
|
|
|
|
///
|
2001-06-28 10:25:20 +00:00
|
|
|
|
void read(Buffer const *, LyXLex &);
|
2001-04-02 14:02:58 +00:00
|
|
|
|
///
|
2001-06-28 10:25:20 +00:00
|
|
|
|
void write(Buffer const *, std::ostream &) const;
|
2001-04-02 14:02:58 +00:00
|
|
|
|
///
|
|
|
|
|
int ascent(BufferView *, LyXFont const &) const;
|
|
|
|
|
///
|
|
|
|
|
int descent(BufferView *, LyXFont const &) const;
|
|
|
|
|
///
|
|
|
|
|
int width(BufferView *, LyXFont const & f) const;
|
|
|
|
|
///
|
2001-08-06 14:55:02 +00:00
|
|
|
|
int textWidth(BufferView *, bool fordraw = false) const;
|
2001-04-02 14:02:58 +00:00
|
|
|
|
///
|
|
|
|
|
void draw(BufferView *, LyXFont const &, int , float &, bool) const;
|
|
|
|
|
///
|
|
|
|
|
void update(BufferView *, LyXFont const &, bool =false);
|
|
|
|
|
///
|
2001-06-28 10:25:20 +00:00
|
|
|
|
void setUpdateStatus(BufferView *, int what) const;
|
2001-04-02 14:02:58 +00:00
|
|
|
|
///
|
2001-06-28 10:25:20 +00:00
|
|
|
|
string const editMessage() const;
|
2001-04-02 14:02:58 +00:00
|
|
|
|
///
|
2001-06-28 10:25:20 +00:00
|
|
|
|
void edit(BufferView *, int, int, unsigned int);
|
2001-04-02 14:02:58 +00:00
|
|
|
|
///
|
2001-07-20 14:18:48 +00:00
|
|
|
|
void edit(BufferView *, bool front = true);
|
|
|
|
|
///
|
2001-06-28 10:25:20 +00:00
|
|
|
|
bool isTextInset() const { return true; }
|
2001-04-02 14:02:58 +00:00
|
|
|
|
///
|
2001-04-27 14:03:25 +00:00
|
|
|
|
bool doClearArea() const;
|
2001-04-02 14:02:58 +00:00
|
|
|
|
///
|
2001-06-28 10:25:20 +00:00
|
|
|
|
void insetUnlock(BufferView *);
|
2001-04-02 14:02:58 +00:00
|
|
|
|
///
|
2001-06-28 10:25:20 +00:00
|
|
|
|
bool lockInsetInInset(BufferView *, UpdatableInset *);
|
2001-04-02 14:02:58 +00:00
|
|
|
|
///
|
2001-06-28 10:25:20 +00:00
|
|
|
|
bool unlockInsetInInset(BufferView *,
|
|
|
|
|
UpdatableInset *, bool lr = false);
|
2001-04-02 14:02:58 +00:00
|
|
|
|
///
|
2001-06-28 10:25:20 +00:00
|
|
|
|
bool updateInsetInInset(BufferView *, Inset *);
|
2001-04-02 14:02:58 +00:00
|
|
|
|
///
|
2001-06-28 10:25:20 +00:00
|
|
|
|
void insetButtonRelease(BufferView *, int, int, int);
|
2001-04-02 14:02:58 +00:00
|
|
|
|
///
|
2001-06-28 10:25:20 +00:00
|
|
|
|
void insetButtonPress(BufferView *, int, int, int);
|
2001-04-02 14:02:58 +00:00
|
|
|
|
///
|
2001-06-28 10:25:20 +00:00
|
|
|
|
void insetMotionNotify(BufferView *, int, int, int);
|
2001-04-02 14:02:58 +00:00
|
|
|
|
///
|
2001-06-28 10:25:20 +00:00
|
|
|
|
void insetKeyPress(XKeyEvent *);
|
2001-04-02 14:02:58 +00:00
|
|
|
|
///
|
2001-06-28 10:25:20 +00:00
|
|
|
|
UpdatableInset::RESULT localDispatch(BufferView *,
|
|
|
|
|
kb_action, string const &);
|
2001-04-02 14:02:58 +00:00
|
|
|
|
///
|
2001-06-28 10:25:20 +00:00
|
|
|
|
int latex(Buffer const *, std::ostream &,
|
2001-04-04 22:08:13 +00:00
|
|
|
|
bool fragile, bool free_spc) const;
|
2001-04-02 14:02:58 +00:00
|
|
|
|
///
|
2001-06-28 10:25:20 +00:00
|
|
|
|
int ascii(Buffer const *, std::ostream &, int linelen) const;
|
2001-04-02 14:02:58 +00:00
|
|
|
|
///
|
2001-06-28 10:25:20 +00:00
|
|
|
|
int linuxdoc(Buffer const *, std::ostream &) const { return 0; }
|
2001-04-02 14:02:58 +00:00
|
|
|
|
///
|
2001-09-04 11:02:09 +00:00
|
|
|
|
int docbook(Buffer const *, std::ostream &) const ;
|
2001-04-02 14:02:58 +00:00
|
|
|
|
///
|
2001-06-28 10:25:20 +00:00
|
|
|
|
void validate(LaTeXFeatures & features) const;
|
2001-04-02 14:02:58 +00:00
|
|
|
|
///
|
2001-06-28 10:25:20 +00:00
|
|
|
|
Inset::Code lyxCode() const { return Inset::TEXT_CODE; }
|
2001-04-02 14:02:58 +00:00
|
|
|
|
///
|
2001-06-28 10:25:20 +00:00
|
|
|
|
void getCursorPos(BufferView *, int & x, int & y) const;
|
2001-04-02 14:02:58 +00:00
|
|
|
|
///
|
2001-06-28 10:25:20 +00:00
|
|
|
|
unsigned int insetInInsetY();
|
2001-04-02 14:02:58 +00:00
|
|
|
|
///
|
2001-06-28 10:25:20 +00:00
|
|
|
|
void toggleInsetCursor(BufferView *);
|
2001-04-02 14:02:58 +00:00
|
|
|
|
///
|
2001-07-20 14:18:48 +00:00
|
|
|
|
void showInsetCursor(BufferView *, bool show=true);
|
|
|
|
|
///
|
|
|
|
|
void hideInsetCursor(BufferView *);
|
|
|
|
|
///
|
|
|
|
|
void fitInsetCursor(BufferView *) const;
|
|
|
|
|
///
|
2001-06-28 10:25:20 +00:00
|
|
|
|
bool insertInset(BufferView *, Inset *);
|
2001-04-02 14:02:58 +00:00
|
|
|
|
///
|
2001-07-19 08:52:59 +00:00
|
|
|
|
bool insetAllowed(Inset::Code) const;
|
2001-07-09 14:19:41 +00:00
|
|
|
|
///
|
2001-07-12 12:26:06 +00:00
|
|
|
|
UpdatableInset * getLockingInset() const;
|
2001-04-02 14:02:58 +00:00
|
|
|
|
///
|
2001-06-28 10:25:20 +00:00
|
|
|
|
UpdatableInset * getFirstLockingInsetOfType(Inset::Code);
|
2001-04-02 14:02:58 +00:00
|
|
|
|
///
|
2001-06-28 10:25:20 +00:00
|
|
|
|
void setFont(BufferView *, LyXFont const &,
|
|
|
|
|
bool toggleall = false,
|
2001-05-28 15:11:24 +00:00
|
|
|
|
bool selectall = false);
|
2001-04-02 14:02:58 +00:00
|
|
|
|
///
|
|
|
|
|
int getMaxWidth(BufferView *, UpdatableInset const *) const;
|
|
|
|
|
///
|
2001-07-06 15:57:54 +00:00
|
|
|
|
void init(InsetText const * ins = 0, bool same_id = false);
|
2001-04-02 14:02:58 +00:00
|
|
|
|
///
|
2001-06-28 10:25:20 +00:00
|
|
|
|
void writeParagraphData(Buffer const *, std::ostream &) const;
|
2001-04-02 14:02:58 +00:00
|
|
|
|
///
|
2001-06-28 10:25:20 +00:00
|
|
|
|
void setParagraphData(Paragraph *);
|
2001-04-02 14:02:58 +00:00
|
|
|
|
///
|
2001-06-28 10:25:20 +00:00
|
|
|
|
void setText(string const &);
|
2001-04-02 14:02:58 +00:00
|
|
|
|
///
|
2001-06-28 10:25:20 +00:00
|
|
|
|
void setAutoBreakRows(bool);
|
2001-04-02 14:02:58 +00:00
|
|
|
|
///
|
2001-07-31 09:53:40 +00:00
|
|
|
|
bool getAutoBreakRows() const { return autoBreakRows; }
|
|
|
|
|
///
|
2001-06-28 10:25:20 +00:00
|
|
|
|
void setDrawFrame(BufferView *, DrawFrame);
|
2001-04-02 14:02:58 +00:00
|
|
|
|
///
|
2001-06-28 10:25:20 +00:00
|
|
|
|
void setFrameColor(BufferView *, LColor::color);
|
2001-04-02 14:02:58 +00:00
|
|
|
|
///
|
2001-06-27 14:10:35 +00:00
|
|
|
|
LyXText * getLyXText(BufferView const *,
|
|
|
|
|
bool const recursive = false) const;
|
2001-04-02 14:02:58 +00:00
|
|
|
|
///
|
2001-06-27 14:10:35 +00:00
|
|
|
|
void deleteLyXText(BufferView *, bool recursive = true) const;
|
2001-04-02 14:02:58 +00:00
|
|
|
|
///
|
2001-06-27 14:10:35 +00:00
|
|
|
|
void resizeLyXText(BufferView *, bool force = false) const;
|
2001-04-02 14:02:58 +00:00
|
|
|
|
///
|
2001-06-28 10:25:20 +00:00
|
|
|
|
bool showInsetDialog(BufferView *) const;
|
2001-04-02 14:02:58 +00:00
|
|
|
|
///
|
2001-04-05 08:03:26 +00:00
|
|
|
|
std::vector<string> const getLabelList() const;
|
2001-04-04 23:00:42 +00:00
|
|
|
|
///
|
2001-04-27 14:03:25 +00:00
|
|
|
|
bool nodraw() const;
|
|
|
|
|
///
|
|
|
|
|
int scroll(bool recursive=true) const;
|
2001-06-27 14:10:35 +00:00
|
|
|
|
///
|
2001-04-27 14:03:25 +00:00
|
|
|
|
void scroll(BufferView *bv, float sx) const {
|
|
|
|
|
UpdatableInset::scroll(bv, sx);
|
|
|
|
|
}
|
2001-06-27 14:10:35 +00:00
|
|
|
|
///
|
2001-04-27 14:03:25 +00:00
|
|
|
|
void scroll(BufferView *bv, int offset) const {
|
|
|
|
|
UpdatableInset::scroll(bv, offset);
|
|
|
|
|
}
|
2001-05-28 15:11:24 +00:00
|
|
|
|
///
|
|
|
|
|
void selectAll(BufferView *bv);
|
|
|
|
|
///
|
|
|
|
|
void clearSelection(BufferView *bv);
|
2001-07-06 15:57:54 +00:00
|
|
|
|
///
|
|
|
|
|
Paragraph * getParFromID(int id) const;
|
|
|
|
|
///
|
|
|
|
|
Inset * getInsetFromID(int id) const;
|
|
|
|
|
///
|
|
|
|
|
Paragraph * firstParagraph() const;
|
|
|
|
|
///
|
2001-09-01 21:26:34 +00:00
|
|
|
|
Paragraph * getFirstParagraph(int) const;
|
|
|
|
|
///
|
2001-07-06 15:57:54 +00:00
|
|
|
|
LyXCursor const & cursor(BufferView *) const;
|
|
|
|
|
///
|
|
|
|
|
Paragraph * paragraph() const;
|
|
|
|
|
///
|
|
|
|
|
void paragraph(Paragraph *);
|
2001-04-02 14:02:58 +00:00
|
|
|
|
///
|
2001-09-21 16:21:23 +00:00
|
|
|
|
string const selectNextWordToSpellcheck(BufferView *, float & value) const;
|
2001-07-17 15:39:12 +00:00
|
|
|
|
void selectSelectedWord(BufferView *);
|
|
|
|
|
void toggleSelection(BufferView *, bool kill_selection);
|
|
|
|
|
///
|
2001-07-20 14:18:48 +00:00
|
|
|
|
bool searchForward(BufferView *, string const &,
|
|
|
|
|
bool const & = true, bool const & = false);
|
|
|
|
|
bool searchBackward(BufferView *, string const &,
|
|
|
|
|
bool const & = true, bool const & = false);
|
|
|
|
|
|
|
|
|
|
//
|
|
|
|
|
// Public structures and variables
|
|
|
|
|
///
|
2001-04-02 14:02:58 +00:00
|
|
|
|
mutable int need_update;
|
2000-02-25 12:06:15 +00:00
|
|
|
|
|
|
|
|
|
protected:
|
2001-04-02 14:02:58 +00:00
|
|
|
|
///
|
2001-07-20 14:18:48 +00:00
|
|
|
|
void updateLocal(BufferView *, int what, bool mark_dirty) const;
|
2001-04-02 14:02:58 +00:00
|
|
|
|
///
|
|
|
|
|
mutable int drawTextXOffset;
|
|
|
|
|
///
|
|
|
|
|
mutable int drawTextYOffset;
|
|
|
|
|
///
|
|
|
|
|
bool autoBreakRows;
|
|
|
|
|
///
|
2001-04-27 14:03:25 +00:00
|
|
|
|
DrawFrame drawFrame_;
|
2001-04-02 14:02:58 +00:00
|
|
|
|
///
|
|
|
|
|
LColor::color frame_color;
|
2000-02-25 12:06:15 +00:00
|
|
|
|
|
|
|
|
|
private:
|
2001-07-12 12:26:06 +00:00
|
|
|
|
struct InnerCache {
|
|
|
|
|
InnerCache(boost::shared_ptr<LyXText>);
|
|
|
|
|
|
|
|
|
|
boost::shared_ptr<LyXText> text;
|
|
|
|
|
bool remove;
|
|
|
|
|
};
|
2001-04-02 14:02:58 +00:00
|
|
|
|
///
|
2001-07-12 12:26:06 +00:00
|
|
|
|
typedef std::map<BufferView *, struct InnerCache > Cache;
|
2001-04-02 14:02:58 +00:00
|
|
|
|
///
|
|
|
|
|
typedef Cache::value_type value_type;
|
|
|
|
|
///
|
2001-06-28 10:25:20 +00:00
|
|
|
|
int beginningOfMainBody(Buffer const *, Paragraph * par) const;
|
2001-04-02 14:02:58 +00:00
|
|
|
|
///
|
2001-06-28 10:25:20 +00:00
|
|
|
|
UpdatableInset::RESULT moveRight(BufferView *,
|
|
|
|
|
bool activate_inset = true,
|
2001-04-04 22:08:13 +00:00
|
|
|
|
bool selecting = false);
|
2001-04-02 14:02:58 +00:00
|
|
|
|
///
|
2001-06-28 10:25:20 +00:00
|
|
|
|
UpdatableInset::RESULT moveLeft(BufferView *,
|
|
|
|
|
bool activate_inset = true,
|
2001-04-04 22:08:13 +00:00
|
|
|
|
bool selecting = false);
|
2001-04-02 14:02:58 +00:00
|
|
|
|
///
|
|
|
|
|
UpdatableInset::RESULT moveRightIntern(BufferView *, bool behind,
|
2001-04-04 22:08:13 +00:00
|
|
|
|
bool activate_inset = true,
|
|
|
|
|
bool selecting = false);
|
2001-04-02 14:02:58 +00:00
|
|
|
|
///
|
|
|
|
|
UpdatableInset::RESULT moveLeftIntern(BufferView *, bool behind,
|
2001-04-04 22:08:13 +00:00
|
|
|
|
bool activate_inset = true,
|
|
|
|
|
bool selecting = false);
|
2001-01-08 16:14:09 +00:00
|
|
|
|
|
2001-04-02 14:02:58 +00:00
|
|
|
|
///
|
|
|
|
|
UpdatableInset::RESULT moveUp(BufferView *);
|
|
|
|
|
///
|
|
|
|
|
UpdatableInset::RESULT moveDown(BufferView *);
|
|
|
|
|
///
|
2001-06-28 10:25:20 +00:00
|
|
|
|
void setCharFont(Buffer const *, int pos, LyXFont const & font);
|
2001-04-02 14:02:58 +00:00
|
|
|
|
///
|
|
|
|
|
bool checkAndActivateInset(BufferView * bv, bool behind);
|
|
|
|
|
///
|
|
|
|
|
bool checkAndActivateInset(BufferView * bv, int x = 0, int y = 0,
|
2001-07-31 09:53:40 +00:00
|
|
|
|
int button = 0);
|
2001-04-27 14:03:25 +00:00
|
|
|
|
///
|
2001-04-02 14:02:58 +00:00
|
|
|
|
void removeNewlines();
|
|
|
|
|
///
|
|
|
|
|
int cx(BufferView *) const;
|
|
|
|
|
///
|
|
|
|
|
int cy(BufferView *) const;
|
|
|
|
|
///
|
2001-06-25 00:06:33 +00:00
|
|
|
|
Paragraph::size_type cpos(BufferView *) const;
|
2001-04-02 14:02:58 +00:00
|
|
|
|
///
|
2001-06-25 00:06:33 +00:00
|
|
|
|
Paragraph * cpar(BufferView *) const;
|
2001-04-02 14:02:58 +00:00
|
|
|
|
///
|
|
|
|
|
bool cboundary(BufferView *) const;
|
|
|
|
|
///
|
|
|
|
|
Row * crow(BufferView *) const;
|
2001-04-27 14:03:25 +00:00
|
|
|
|
///
|
|
|
|
|
void drawFrame(Painter &, bool cleared) const;
|
2001-06-28 10:25:20 +00:00
|
|
|
|
///
|
2001-04-27 14:03:25 +00:00
|
|
|
|
void clearFrame(Painter &, bool cleared) const;
|
|
|
|
|
///
|
2001-06-01 15:10:26 +00:00
|
|
|
|
void clearInset(Painter &, int baseline, bool & cleared) const;
|
2001-07-12 12:26:06 +00:00
|
|
|
|
///
|
|
|
|
|
void saveLyXTextState(LyXText *) const;
|
|
|
|
|
void restoreLyXTextState(BufferView *, LyXText *) const;
|
2001-07-31 09:53:40 +00:00
|
|
|
|
///
|
2001-08-10 12:21:42 +00:00
|
|
|
|
void reinitLyXText() const;
|
2000-02-25 12:06:15 +00:00
|
|
|
|
|
2001-04-02 14:02:58 +00:00
|
|
|
|
/* Private structures and variables */
|
|
|
|
|
///
|
2001-07-06 15:57:54 +00:00
|
|
|
|
Paragraph * par;
|
|
|
|
|
///
|
2001-04-02 14:02:58 +00:00
|
|
|
|
mutable bool locked;
|
|
|
|
|
///
|
|
|
|
|
mutable int insetAscent;
|
|
|
|
|
///
|
|
|
|
|
mutable int insetDescent;
|
|
|
|
|
///
|
|
|
|
|
mutable int insetWidth;
|
|
|
|
|
///
|
|
|
|
|
mutable int last_width;
|
|
|
|
|
///
|
|
|
|
|
mutable int last_height;
|
|
|
|
|
///
|
|
|
|
|
mutable int top_y;
|
|
|
|
|
///
|
2001-06-25 00:06:33 +00:00
|
|
|
|
Paragraph * inset_par;
|
2001-04-02 14:02:58 +00:00
|
|
|
|
///
|
2001-06-25 00:06:33 +00:00
|
|
|
|
Paragraph::size_type inset_pos;
|
2001-04-02 14:02:58 +00:00
|
|
|
|
///
|
|
|
|
|
bool inset_boundary;
|
|
|
|
|
///
|
|
|
|
|
mutable int inset_x;
|
|
|
|
|
///
|
|
|
|
|
mutable int inset_y;
|
|
|
|
|
///
|
2001-08-02 14:55:06 +00:00
|
|
|
|
mutable int old_max_width;
|
2001-04-02 14:02:58 +00:00
|
|
|
|
///
|
|
|
|
|
bool no_selection;
|
|
|
|
|
///
|
|
|
|
|
mutable float xpos;
|
|
|
|
|
///
|
|
|
|
|
UpdatableInset * the_locking_inset;
|
|
|
|
|
///
|
2001-07-20 14:18:48 +00:00
|
|
|
|
mutable Paragraph * old_par;
|
2001-04-02 14:02:58 +00:00
|
|
|
|
/// The cache.
|
|
|
|
|
mutable Cache cache;
|
|
|
|
|
///
|
|
|
|
|
mutable int last_drawn_width;
|
2001-04-27 14:03:25 +00:00
|
|
|
|
///
|
|
|
|
|
mutable bool frame_is_visible;
|
2001-07-02 15:29:23 +00:00
|
|
|
|
///
|
|
|
|
|
mutable BufferView * cached_bview;
|
2001-07-05 14:52:08 +00:00
|
|
|
|
///
|
|
|
|
|
mutable boost::shared_ptr<LyXText> cached_text;
|
2001-07-12 12:26:06 +00:00
|
|
|
|
///
|
|
|
|
|
mutable struct save_state {
|
|
|
|
|
Paragraph * lpar;
|
|
|
|
|
Paragraph * selstartpar;
|
|
|
|
|
Paragraph * selendpar;
|
|
|
|
|
Paragraph::size_type pos;
|
|
|
|
|
Paragraph::size_type selstartpos;
|
|
|
|
|
Paragraph::size_type selendpos;
|
|
|
|
|
bool boundary;
|
|
|
|
|
bool selstartboundary;
|
|
|
|
|
bool selendboundary;
|
|
|
|
|
bool selection;
|
|
|
|
|
bool mark_set;
|
2001-08-02 14:55:06 +00:00
|
|
|
|
bool refresh;
|
2001-07-12 12:26:06 +00:00
|
|
|
|
} sstate;
|
|
|
|
|
///
|
|
|
|
|
// this is needed globally so we know that we're using it actually and
|
|
|
|
|
// so the LyXText-Cache is not erased until used!
|
|
|
|
|
mutable LyXText * lt;
|
2001-07-31 09:53:40 +00:00
|
|
|
|
///
|
|
|
|
|
// to remember old painted frame dimensions to clear it on the right spot!
|
|
|
|
|
///
|
|
|
|
|
mutable int frame_x;
|
|
|
|
|
mutable int frame_y;
|
|
|
|
|
mutable int frame_w;
|
|
|
|
|
mutable int frame_h;
|
2001-08-01 15:42:53 +00:00
|
|
|
|
///
|
|
|
|
|
bool in_update; /* as update is not reentrant! */
|
2001-08-13 11:04:49 +00:00
|
|
|
|
mutable BufferView * do_resize;
|
|
|
|
|
mutable bool do_reinit;
|
2000-02-25 12:06:15 +00:00
|
|
|
|
};
|
|
|
|
|
#endif
|