2000-04-19 14:42:19 +00:00
|
|
|
|
// -*- C++ -*-
|
2002-09-25 14:26:13 +00:00
|
|
|
|
/**
|
|
|
|
|
* \file insettabular.h
|
|
|
|
|
* This file is part of LyX, the document processor.
|
|
|
|
|
* Licence details can be found in the file COPYING.
|
2002-03-21 17:09:55 +00:00
|
|
|
|
*
|
2002-09-25 14:26:13 +00:00
|
|
|
|
* \author J<EFBFBD>rgen Vigna
|
2000-04-19 14:42:19 +00:00
|
|
|
|
*
|
2002-09-25 14:26:13 +00:00
|
|
|
|
* Full author contact details are available in file CREDITS
|
2000-04-19 14:42:19 +00:00
|
|
|
|
*/
|
|
|
|
|
// This is the rewrite of the tabular (table) support.
|
|
|
|
|
|
|
|
|
|
// It will probably be a lot of work.
|
|
|
|
|
|
|
|
|
|
// One first goal could be to make the inset read the old table format
|
|
|
|
|
// and just output it again... no viewing at all.
|
|
|
|
|
|
|
|
|
|
// When making the internal structure of tabular support I really think
|
|
|
|
|
// that STL containers should be used. This will separate the container from
|
|
|
|
|
// the rest of the code, which is a good thing.
|
|
|
|
|
|
|
|
|
|
// Ideally the tabular support should do as the mathed and use
|
|
|
|
|
// LaTeX in the .lyx file too.
|
|
|
|
|
|
|
|
|
|
// Things to think of when desingning the new tabular support:
|
|
|
|
|
// - color support (colortbl, color)
|
|
|
|
|
// - decimal alignment (dcloumn)
|
|
|
|
|
// - custom lines (hhline)
|
|
|
|
|
// - rotation
|
|
|
|
|
// - multicolumn
|
|
|
|
|
// - multirow
|
|
|
|
|
// - column styles
|
|
|
|
|
|
|
|
|
|
// This is what I have written about tabular support in the LyX3-Tasks file:
|
|
|
|
|
//
|
|
|
|
|
// o rewrite of table code. Should probably be written as some
|
|
|
|
|
// kind of an inset. At least get the code out of the kernel.
|
|
|
|
|
// - colortbl -multirow
|
|
|
|
|
// - hhline -multicolumn
|
|
|
|
|
// - dcolumn
|
|
|
|
|
// o enhance longtable support
|
|
|
|
|
|
|
|
|
|
// Lgb
|
|
|
|
|
|
|
|
|
|
#ifndef INSETTABULAR_H
|
|
|
|
|
#define INSETTABULAR_H
|
|
|
|
|
|
|
|
|
|
|
2001-06-25 00:06:33 +00:00
|
|
|
|
#include "inset.h"
|
2000-04-21 15:16:22 +00:00
|
|
|
|
#include "tabular.h"
|
2000-04-19 14:42:19 +00:00
|
|
|
|
#include "LString.h"
|
2000-04-21 15:16:22 +00:00
|
|
|
|
#include "lyxcursor.h"
|
2002-01-09 09:36:35 +00:00
|
|
|
|
#include "FuncStatus.h"
|
2000-10-24 13:13:59 +00:00
|
|
|
|
|
2002-05-22 01:16:37 +00:00
|
|
|
|
#include <boost/scoped_ptr.hpp>
|
2003-03-09 18:11:57 +00:00
|
|
|
|
#include <boost/weak_ptr.hpp>
|
2002-05-22 01:16:37 +00:00
|
|
|
|
|
2000-04-19 14:42:19 +00:00
|
|
|
|
class LyXLex;
|
|
|
|
|
class Painter;
|
|
|
|
|
class BufferView;
|
|
|
|
|
class Buffer;
|
2003-02-08 19:18:01 +00:00
|
|
|
|
class BufferParams;
|
2001-07-06 15:57:54 +00:00
|
|
|
|
class Paragraph;
|
2000-04-19 14:42:19 +00:00
|
|
|
|
|
|
|
|
|
class InsetTabular : public UpdatableInset {
|
|
|
|
|
public:
|
2001-04-04 09:42:56 +00:00
|
|
|
|
///
|
|
|
|
|
enum UpdateCodes {
|
|
|
|
|
NONE = 0,
|
|
|
|
|
CURSOR = 1,
|
|
|
|
|
CELL = 2,
|
|
|
|
|
SELECTION = 3,
|
|
|
|
|
FULL = 4,
|
|
|
|
|
INIT = 5
|
|
|
|
|
};
|
|
|
|
|
///
|
|
|
|
|
InsetTabular(Buffer const &, int rows = 1, int columns = 1);
|
|
|
|
|
///
|
2001-07-06 15:57:54 +00:00
|
|
|
|
InsetTabular(InsetTabular const &, Buffer const &, bool same_id = false);
|
2001-04-04 09:42:56 +00:00
|
|
|
|
///
|
|
|
|
|
~InsetTabular();
|
|
|
|
|
///
|
2001-07-06 15:57:54 +00:00
|
|
|
|
Inset * clone(Buffer const &, bool same_id = false) const;
|
2001-04-04 09:42:56 +00:00
|
|
|
|
///
|
2001-06-28 10:25:20 +00:00
|
|
|
|
void read(Buffer const *, LyXLex &);
|
2001-04-04 09:42:56 +00:00
|
|
|
|
///
|
2001-06-28 10:25:20 +00:00
|
|
|
|
void write(Buffer const *, std::ostream &) const;
|
2001-04-04 09:42:56 +00:00
|
|
|
|
///
|
|
|
|
|
int ascent(BufferView *, LyXFont const &) const;
|
|
|
|
|
///
|
|
|
|
|
int descent(BufferView *, LyXFont const &) const;
|
|
|
|
|
///
|
|
|
|
|
int width(BufferView *, LyXFont const & f) const;
|
|
|
|
|
///
|
|
|
|
|
void draw(BufferView *, const LyXFont &, int , float &, bool) const;
|
|
|
|
|
///
|
|
|
|
|
void update(BufferView *, LyXFont const &, bool = false);
|
|
|
|
|
///
|
2001-06-28 10:25:20 +00:00
|
|
|
|
string const editMessage() const;
|
2001-04-04 09:42:56 +00:00
|
|
|
|
///
|
2002-05-26 17:33:14 +00:00
|
|
|
|
void edit(BufferView *, int x, int y, mouse_button::state);
|
2001-04-04 09:42:56 +00:00
|
|
|
|
///
|
2001-07-20 14:18:48 +00:00
|
|
|
|
void edit(BufferView * bv, bool front = true);
|
|
|
|
|
///
|
2001-04-27 14:03:25 +00:00
|
|
|
|
bool doClearArea() const;
|
2001-04-04 09:42:56 +00:00
|
|
|
|
///
|
2001-06-28 10:25:20 +00:00
|
|
|
|
void insetUnlock(BufferView *);
|
2001-04-04 09:42:56 +00:00
|
|
|
|
///
|
2001-06-28 10:25:20 +00:00
|
|
|
|
void updateLocal(BufferView *, UpdateCodes, bool mark_dirty) const;
|
2001-04-04 09:42:56 +00:00
|
|
|
|
///
|
2001-06-28 10:25:20 +00:00
|
|
|
|
bool lockInsetInInset(BufferView *, UpdatableInset *);
|
2001-04-04 09:42:56 +00:00
|
|
|
|
///
|
2001-06-28 10:25:20 +00:00
|
|
|
|
bool unlockInsetInInset(BufferView *, UpdatableInset *,
|
2001-04-04 22:08:13 +00:00
|
|
|
|
bool lr = false);
|
2001-04-04 09:42:56 +00:00
|
|
|
|
///
|
2001-06-28 10:25:20 +00:00
|
|
|
|
bool updateInsetInInset(BufferView *, Inset *);
|
2001-04-04 09:42:56 +00:00
|
|
|
|
///
|
2002-04-16 14:10:39 +00:00
|
|
|
|
int insetInInsetY() const;
|
2001-04-04 09:42:56 +00:00
|
|
|
|
///
|
2001-07-12 12:26:06 +00:00
|
|
|
|
UpdatableInset * getLockingInset() const;
|
2001-04-04 09:42:56 +00:00
|
|
|
|
///
|
2001-06-28 10:25:20 +00:00
|
|
|
|
UpdatableInset * getFirstLockingInsetOfType(Inset::Code);
|
2001-04-04 09:42:56 +00:00
|
|
|
|
///
|
2001-06-28 10:25:20 +00:00
|
|
|
|
bool insertInset(BufferView *, Inset *);
|
2001-04-04 09:42:56 +00:00
|
|
|
|
///
|
2001-08-08 13:29:13 +00:00
|
|
|
|
bool insetAllowed(Inset::Code code) const;
|
2001-07-09 14:19:41 +00:00
|
|
|
|
///
|
2001-06-28 10:25:20 +00:00
|
|
|
|
bool isTextInset() const { return true; }
|
2002-07-23 21:03:38 +00:00
|
|
|
|
/** returns true if, when outputing LaTeX, font changes should
|
2002-12-01 22:59:25 +00:00
|
|
|
|
be closed before generating this inset. This is needed for
|
|
|
|
|
insets that may contain several paragraphs */
|
2002-07-23 21:03:38 +00:00
|
|
|
|
bool noFontChange() const { return true; }
|
2001-04-04 09:42:56 +00:00
|
|
|
|
///
|
|
|
|
|
bool display() const { return tabular->IsLongTabular(); }
|
|
|
|
|
///
|
2002-08-13 17:43:40 +00:00
|
|
|
|
RESULT localDispatch(FuncRequest const &);
|
2001-04-04 09:42:56 +00:00
|
|
|
|
///
|
2001-06-28 10:25:20 +00:00
|
|
|
|
int latex(Buffer const *, std::ostream &, bool, bool) const;
|
2001-04-04 09:42:56 +00:00
|
|
|
|
///
|
2001-06-28 10:25:20 +00:00
|
|
|
|
int ascii(Buffer const *, std::ostream &, int linelen) const;
|
2001-04-04 09:42:56 +00:00
|
|
|
|
///
|
2001-06-28 10:25:20 +00:00
|
|
|
|
int linuxdoc(Buffer const *, std::ostream &) const;
|
2001-04-04 09:42:56 +00:00
|
|
|
|
///
|
2002-06-18 15:44:30 +00:00
|
|
|
|
int docbook(Buffer const *, std::ostream &, bool mixcont) const;
|
2001-04-04 09:42:56 +00:00
|
|
|
|
///
|
2001-06-28 10:25:20 +00:00
|
|
|
|
void validate(LaTeXFeatures & features) const;
|
2001-04-04 09:42:56 +00:00
|
|
|
|
///
|
2001-06-28 10:25:20 +00:00
|
|
|
|
Inset::Code lyxCode() const { return Inset::TABULAR_CODE; }
|
2001-04-04 09:42:56 +00:00
|
|
|
|
///
|
2001-06-28 10:25:20 +00:00
|
|
|
|
void getCursorPos(BufferView *, int & x, int & y) const;
|
2001-04-04 09:42:56 +00:00
|
|
|
|
///
|
2001-06-28 10:25:20 +00:00
|
|
|
|
void toggleInsetCursor(BufferView *);
|
2001-04-04 09:42:56 +00:00
|
|
|
|
///
|
2001-06-28 10:25:20 +00:00
|
|
|
|
bool tabularFeatures(BufferView * bv, string const & what);
|
2001-04-04 09:42:56 +00:00
|
|
|
|
///
|
2001-06-28 10:25:20 +00:00
|
|
|
|
void tabularFeatures(BufferView * bv, LyXTabular::Feature feature,
|
2001-04-04 22:08:13 +00:00
|
|
|
|
string const & val = string());
|
2001-04-04 09:42:56 +00:00
|
|
|
|
///
|
2001-06-28 10:25:20 +00:00
|
|
|
|
int getActCell() const { return actcell; }
|
2001-04-04 09:42:56 +00:00
|
|
|
|
///
|
2001-06-28 10:25:20 +00:00
|
|
|
|
void setFont(BufferView *, LyXFont const &, bool toggleall = false,
|
2002-03-21 17:09:55 +00:00
|
|
|
|
bool selectall = false);
|
2001-04-04 09:42:56 +00:00
|
|
|
|
///
|
|
|
|
|
int getMaxWidth(BufferView *, UpdatableInset const *) const;
|
|
|
|
|
///
|
2001-06-28 10:25:20 +00:00
|
|
|
|
Buffer * bufferOwner() const { return const_cast<Buffer *>(buffer); }
|
2001-04-04 09:42:56 +00:00
|
|
|
|
///
|
2001-04-04 22:08:13 +00:00
|
|
|
|
LyXText * getLyXText(BufferView const *,
|
|
|
|
|
bool const recursive = false) const;
|
2001-04-04 09:42:56 +00:00
|
|
|
|
///
|
2001-06-07 14:51:20 +00:00
|
|
|
|
void deleteLyXText(BufferView *, bool recursive = true) const;
|
|
|
|
|
///
|
|
|
|
|
void resizeLyXText(BufferView *, bool force = false) const;
|
2001-04-04 09:42:56 +00:00
|
|
|
|
///
|
2001-06-28 10:25:20 +00:00
|
|
|
|
void openLayoutDialog(BufferView *) const;
|
2001-04-04 09:42:56 +00:00
|
|
|
|
///
|
2001-06-28 10:25:20 +00:00
|
|
|
|
bool showInsetDialog(BufferView *) const;
|
2001-04-04 09:42:56 +00:00
|
|
|
|
///
|
2002-01-09 09:36:35 +00:00
|
|
|
|
FuncStatus getStatus(string const & argument) const;
|
2001-04-06 12:47:50 +00:00
|
|
|
|
///
|
|
|
|
|
std::vector<string> const getLabelList() const;
|
2001-04-27 14:03:25 +00:00
|
|
|
|
///
|
2001-08-01 15:42:53 +00:00
|
|
|
|
void nodraw(bool b) const {
|
2001-04-27 14:03:25 +00:00
|
|
|
|
UpdatableInset::nodraw(b);
|
|
|
|
|
}
|
|
|
|
|
bool nodraw() const;
|
|
|
|
|
///
|
|
|
|
|
int scroll(bool recursive=true) const;
|
2001-06-28 10:25:20 +00:00
|
|
|
|
///
|
2001-04-27 14:03:25 +00:00
|
|
|
|
void scroll(BufferView *bv, float sx) const {
|
|
|
|
|
UpdatableInset::scroll(bv, sx);
|
|
|
|
|
}
|
2001-06-28 10:25:20 +00:00
|
|
|
|
///
|
2001-04-27 14:03:25 +00:00
|
|
|
|
void scroll(BufferView *bv, int offset) const {
|
|
|
|
|
UpdatableInset::scroll(bv, offset);
|
|
|
|
|
}
|
2001-07-06 15:57:54 +00:00
|
|
|
|
///
|
|
|
|
|
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;
|
2001-07-17 15:39:12 +00:00
|
|
|
|
///
|
2003-02-08 19:18:01 +00:00
|
|
|
|
bool allowSpellcheck() const { return true; }
|
2002-08-13 14:40:38 +00:00
|
|
|
|
///
|
|
|
|
|
WordLangTuple const
|
|
|
|
|
selectNextWordToSpellcheck(BufferView *, float & value) const;
|
|
|
|
|
///
|
2001-07-17 15:39:12 +00:00
|
|
|
|
void selectSelectedWord(BufferView *);
|
2002-08-13 14:40:38 +00:00
|
|
|
|
///
|
2001-07-17 15:39:12 +00:00
|
|
|
|
void toggleSelection(BufferView *, bool kill_selection);
|
2003-02-08 19:18:01 +00:00
|
|
|
|
|
|
|
|
|
void markErased();
|
|
|
|
|
|
|
|
|
|
/// find next change
|
|
|
|
|
bool nextChange(BufferView *, lyx::pos_type & length);
|
2001-07-20 14:18:48 +00:00
|
|
|
|
///
|
|
|
|
|
bool searchForward(BufferView *, string const &,
|
2002-03-21 17:09:55 +00:00
|
|
|
|
bool = true, bool = false);
|
2001-07-20 14:18:48 +00:00
|
|
|
|
bool searchBackward(BufferView *, string const &,
|
2002-03-21 17:09:55 +00:00
|
|
|
|
bool = true, bool = false);
|
2001-04-27 14:03:25 +00:00
|
|
|
|
|
2002-01-08 14:24:49 +00:00
|
|
|
|
// this should return true if we have a "normal" cell, otherwise true.
|
|
|
|
|
// "normal" means without width set!
|
|
|
|
|
bool forceDefaultParagraphs(Inset const * in) const;
|
2002-03-21 17:09:55 +00:00
|
|
|
|
|
2002-08-02 16:39:43 +00:00
|
|
|
|
///
|
|
|
|
|
void addPreview(grfx::PreviewLoader &) const;
|
|
|
|
|
|
2001-04-04 09:42:56 +00:00
|
|
|
|
//
|
|
|
|
|
// Public structures and variables
|
|
|
|
|
///
|
2001-04-04 22:08:13 +00:00
|
|
|
|
boost::scoped_ptr<LyXTabular> tabular;
|
2000-04-19 14:42:19 +00:00
|
|
|
|
|
2002-09-16 12:52:58 +00:00
|
|
|
|
/// are some cells selected ?
|
|
|
|
|
bool hasSelection() const {
|
|
|
|
|
return has_selection;
|
|
|
|
|
}
|
2003-03-09 18:11:57 +00:00
|
|
|
|
|
|
|
|
|
///
|
|
|
|
|
virtual BufferView * view() const;
|
2000-04-19 14:42:19 +00:00
|
|
|
|
private:
|
2002-08-19 10:11:13 +00:00
|
|
|
|
///
|
|
|
|
|
void lfunMousePress(FuncRequest const &);
|
|
|
|
|
///
|
|
|
|
|
// the bool return is used to see if we opened a dialog so that we can
|
|
|
|
|
// check this from an outer inset and open the dialog of the outer inset
|
|
|
|
|
// if that one has one!
|
|
|
|
|
///
|
|
|
|
|
bool lfunMouseRelease(FuncRequest const &);
|
|
|
|
|
///
|
|
|
|
|
void lfunMouseMotion(FuncRequest const &);
|
2001-04-04 09:42:56 +00:00
|
|
|
|
///
|
|
|
|
|
bool calculate_dimensions_of_cells(BufferView *, LyXFont const &,
|
2001-04-06 12:47:50 +00:00
|
|
|
|
bool = false) const;
|
2001-04-04 09:42:56 +00:00
|
|
|
|
///
|
2001-06-28 10:25:20 +00:00
|
|
|
|
void drawCellLines(Painter &, int x, int baseline,
|
2001-04-06 12:47:50 +00:00
|
|
|
|
int row, int cell) const;
|
2001-04-04 09:42:56 +00:00
|
|
|
|
///
|
2001-06-28 10:25:20 +00:00
|
|
|
|
void drawCellSelection(Painter &, int x, int baseline,
|
2001-04-06 12:47:50 +00:00
|
|
|
|
int row, int column, int cell) const;
|
2001-04-04 09:42:56 +00:00
|
|
|
|
///
|
2001-06-28 10:25:20 +00:00
|
|
|
|
void showInsetCursor(BufferView *, bool show=true);
|
2001-04-04 09:42:56 +00:00
|
|
|
|
///
|
2001-06-28 10:25:20 +00:00
|
|
|
|
void hideInsetCursor(BufferView *);
|
2001-04-04 09:42:56 +00:00
|
|
|
|
///
|
2001-08-01 15:42:53 +00:00
|
|
|
|
void fitInsetCursor(BufferView *) const;
|
|
|
|
|
///
|
2001-04-04 09:42:56 +00:00
|
|
|
|
void setPos(BufferView *, int x, int y) const;
|
|
|
|
|
///
|
2002-08-19 10:11:13 +00:00
|
|
|
|
RESULT moveRight(BufferView *, bool lock = true);
|
2001-04-04 09:42:56 +00:00
|
|
|
|
///
|
2002-08-19 10:11:13 +00:00
|
|
|
|
RESULT moveLeft(BufferView *, bool lock = true);
|
2001-04-04 09:42:56 +00:00
|
|
|
|
///
|
2002-08-19 10:11:13 +00:00
|
|
|
|
RESULT moveUp(BufferView *, bool lock = true);
|
2001-04-04 09:42:56 +00:00
|
|
|
|
///
|
2002-08-19 10:11:13 +00:00
|
|
|
|
RESULT moveDown(BufferView *, bool lock = true);
|
2001-04-04 09:42:56 +00:00
|
|
|
|
///
|
|
|
|
|
bool moveNextCell(BufferView *, bool lock = false);
|
|
|
|
|
///
|
|
|
|
|
bool movePrevCell(BufferView *, bool lock = false);
|
2001-07-24 22:08:49 +00:00
|
|
|
|
///
|
2001-04-04 09:42:56 +00:00
|
|
|
|
int getCellXPos(int cell) const;
|
|
|
|
|
///
|
|
|
|
|
void resetPos(BufferView *) const;
|
|
|
|
|
///
|
2001-06-28 10:25:20 +00:00
|
|
|
|
void removeTabularRow();
|
2001-04-04 09:42:56 +00:00
|
|
|
|
///
|
|
|
|
|
void clearSelection() const {
|
2001-12-14 11:55:58 +00:00
|
|
|
|
sel_cell_start = sel_cell_end = 0;
|
|
|
|
|
has_selection = false;
|
|
|
|
|
}
|
|
|
|
|
void setSelection(int start, int end) const {
|
|
|
|
|
sel_cell_start = start;
|
|
|
|
|
sel_cell_end = end;
|
|
|
|
|
has_selection = true;
|
2001-04-04 09:42:56 +00:00
|
|
|
|
}
|
|
|
|
|
///
|
2001-06-28 10:25:20 +00:00
|
|
|
|
bool activateCellInset(BufferView *, int x = 0, int y = 0,
|
2002-05-26 17:33:14 +00:00
|
|
|
|
mouse_button::state button = mouse_button::none,
|
2001-04-06 12:47:50 +00:00
|
|
|
|
bool behind = false);
|
2001-04-04 09:42:56 +00:00
|
|
|
|
///
|
2001-06-28 10:25:20 +00:00
|
|
|
|
bool activateCellInsetAbs(BufferView *, int x = 0, int y = 0,
|
2002-05-26 17:33:14 +00:00
|
|
|
|
mouse_button::state button = mouse_button::none);
|
2001-04-04 09:42:56 +00:00
|
|
|
|
///
|
2001-06-28 10:25:20 +00:00
|
|
|
|
bool insetHit(BufferView * bv, int x, int y) const;
|
2001-04-04 09:42:56 +00:00
|
|
|
|
///
|
2001-06-28 10:25:20 +00:00
|
|
|
|
int getMaxWidthOfCell(BufferView * bv, int cell) const;
|
2001-04-04 09:42:56 +00:00
|
|
|
|
///
|
|
|
|
|
bool hasPasteBuffer() const;
|
|
|
|
|
///
|
|
|
|
|
bool copySelection(BufferView *);
|
|
|
|
|
///
|
|
|
|
|
bool pasteSelection(BufferView *);
|
|
|
|
|
///
|
2003-02-08 19:18:01 +00:00
|
|
|
|
bool cutSelection(BufferParams const & bp);
|
2001-04-04 09:42:56 +00:00
|
|
|
|
///
|
|
|
|
|
bool isRightToLeft(BufferView *);
|
2001-05-28 15:11:24 +00:00
|
|
|
|
///
|
2001-07-24 22:08:49 +00:00
|
|
|
|
void getSelection(int & scol, int & ecol,
|
|
|
|
|
int & srow, int & erow) const;
|
2001-07-17 15:39:12 +00:00
|
|
|
|
///
|
2002-08-06 22:38:44 +00:00
|
|
|
|
WordLangTuple selectNextWordInt(BufferView *, float & value) const;
|
2002-03-04 15:42:54 +00:00
|
|
|
|
///
|
|
|
|
|
bool insertAsciiString(BufferView *, string const & buf, bool usePaste);
|
2002-03-21 17:09:55 +00:00
|
|
|
|
|
2001-04-04 09:42:56 +00:00
|
|
|
|
//
|
|
|
|
|
// Private structures and variables
|
|
|
|
|
///
|
|
|
|
|
InsetText * the_locking_inset;
|
|
|
|
|
///
|
|
|
|
|
InsetText * old_locking_inset;
|
|
|
|
|
///
|
|
|
|
|
Buffer const * buffer;
|
|
|
|
|
///
|
2001-07-06 15:57:54 +00:00
|
|
|
|
mutable LyXCursor cursor_;
|
2001-04-04 09:42:56 +00:00
|
|
|
|
///
|
|
|
|
|
mutable unsigned int inset_x;
|
|
|
|
|
///
|
|
|
|
|
mutable unsigned int inset_y;
|
2001-12-14 11:55:58 +00:00
|
|
|
|
/// true if a set of cells are selected
|
|
|
|
|
mutable bool has_selection;
|
|
|
|
|
/// the starting cell selection nr
|
2001-04-04 09:42:56 +00:00
|
|
|
|
mutable int sel_cell_start;
|
2001-12-14 11:55:58 +00:00
|
|
|
|
/// the ending cell selection nr
|
2001-04-04 09:42:56 +00:00
|
|
|
|
mutable int sel_cell_end;
|
|
|
|
|
///
|
|
|
|
|
mutable int actcell;
|
|
|
|
|
///
|
|
|
|
|
mutable int oldcell;
|
|
|
|
|
///
|
|
|
|
|
mutable int actcol;
|
|
|
|
|
///
|
|
|
|
|
mutable int actrow;
|
|
|
|
|
///
|
|
|
|
|
mutable int first_visible_cell;
|
|
|
|
|
///
|
|
|
|
|
bool no_selection;
|
|
|
|
|
///
|
|
|
|
|
mutable bool locked;
|
|
|
|
|
///
|
|
|
|
|
mutable UpdateCodes need_update;
|
2001-08-01 15:42:53 +00:00
|
|
|
|
///
|
|
|
|
|
bool in_update;
|
2001-11-28 16:09:25 +00:00
|
|
|
|
///
|
2002-06-18 15:44:30 +00:00
|
|
|
|
mutable int in_reset_pos;
|
2000-04-19 14:42:19 +00:00
|
|
|
|
};
|
2003-03-09 18:11:57 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#include "mailinset.h"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
class InsetTabularMailer : public MailInset {
|
|
|
|
|
public:
|
|
|
|
|
///
|
|
|
|
|
InsetTabularMailer(InsetTabular & inset);
|
|
|
|
|
///
|
2003-03-10 13:33:39 +00:00
|
|
|
|
virtual InsetBase & inset() const { return inset_; }
|
2003-03-09 18:11:57 +00:00
|
|
|
|
///
|
|
|
|
|
virtual string const & name() const { return name_; }
|
|
|
|
|
///
|
|
|
|
|
virtual string const inset2string() const;
|
|
|
|
|
/// Returns the active cell if successful, else -1.
|
|
|
|
|
static int string2params(string const &, InsetTabular &);
|
|
|
|
|
///
|
|
|
|
|
static string const params2string(InsetTabular const &);
|
|
|
|
|
private:
|
|
|
|
|
///
|
|
|
|
|
static string const name_;
|
|
|
|
|
///
|
|
|
|
|
InsetTabular & inset_;
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
string const featureAsString(LyXTabular::Feature feature);
|
|
|
|
|
|
2000-04-19 14:42:19 +00:00
|
|
|
|
#endif
|