*
* \author Jürgen Vigna
*
- * Full author contact details are available in file CREDITS
+ * Full author contact details are available in file CREDITS.
*/
// This is the rewrite of the tabular (table) support.
#include "inset.h"
#include "tabular.h"
-#include "LString.h"
-#include "FuncStatus.h"
#include "frontends/mouse_state.h"
+class FuncStatus;
class LyXLex;
class Painter;
class BufferView;
class InsetTabular : public UpdatableInset {
public:
- ///
- enum UpdateCodes {
- NONE = 0,
- CURSOR = 1,
- CELL = 2,
- FULL = 4,
- INIT = 5
- };
///
InsetTabular(Buffer const &, int rows = 1, int columns = 1);
///
///
virtual std::auto_ptr<InsetBase> clone() const;
///
- void read(Buffer const *, LyXLex &);
+ void read(Buffer const &, LyXLex &);
///
- void write(Buffer const *, std::ostream &) const;
+ void write(Buffer const &, std::ostream &) const;
///
void metrics(MetricsInfo &, Dimension &) const;
///
void draw(PainterInfo & pi, int x, int y) const;
///
- string const editMessage() const;
+ std::string const editMessage() const;
//
void insetUnlock(BufferView *);
///
- void updateLocal(BufferView *, UpdateCodes) const;
+ void updateLocal(BufferView *) const;
///
bool lockInsetInInset(BufferView *, UpdatableInset *);
///
bool unlockInsetInInset(BufferView *, UpdatableInset *,
bool lr = false);
///
- bool updateInsetInInset(BufferView *, InsetOld *);
- ///
int insetInInsetY() const;
///
UpdatableInset * getLockingInset() const;
///
bool display() const { return tabular.isLongTabular(); }
///
- RESULT localDispatch(FuncRequest const &);
+ dispatch_result localDispatch(FuncRequest const &);
///
- int latex(Buffer const *, std::ostream &,
+ int latex(Buffer const &, std::ostream &,
LatexRunParams const &) const;
///
- int ascii(Buffer const *, std::ostream &, int linelen) const;
+ int ascii(Buffer const &, std::ostream &, int linelen) const;
///
- int linuxdoc(Buffer const *, std::ostream &) const;
+ int linuxdoc(Buffer const &, std::ostream &) const;
///
- int docbook(Buffer const *, std::ostream &, bool mixcont) const;
+ int docbook(Buffer const &, std::ostream &, bool mixcont) const;
///
void validate(LaTeXFeatures & features) const;
///
/// Get the absolute document x,y of the cursor
virtual void getCursor(BufferView &, int &, int &) const;
///
- bool tabularFeatures(BufferView * bv, string const & what);
+ bool tabularFeatures(BufferView * bv, std::string const & what);
///
void tabularFeatures(BufferView * bv, LyXTabular::Feature feature,
- string const & val = string());
+ std::string const & val = std::string());
///
int getActCell() const { return actcell; }
///
///
void deleteLyXText(BufferView *, bool recursive = true) const;
///
- void resizeLyXText(BufferView *, bool force = false) const;
- ///
void openLayoutDialog(BufferView *) const;
///
bool showInsetDialog(BufferView *) const;
///
- FuncStatus getStatus(string const & argument) const;
- ///
- void getLabelList(std::vector<string> &) const;
- ///
- void nodraw(bool b) const {
- UpdatableInset::nodraw(b);
- }
- bool nodraw() const;
+ FuncStatus getStatus(std::string const & argument) const;
+ /// Appends \c list with all labels found within this inset.
+ void getLabelList(Buffer const &, std::vector<std::string> & list) const;
///
int scroll(bool recursive=true) const;
///
/// find next change
bool nextChange(BufferView *, lyx::pos_type & length);
///
- bool searchForward(BufferView *, string const &,
+ bool searchForward(BufferView *, std::string const &,
bool = true, bool = false);
- bool searchBackward(BufferView *, string const &,
+ bool searchBackward(BufferView *, std::string const &,
bool = true, bool = false);
// this should return true if we have a "normal" cell, otherwise true.
///
virtual BufferView * view() const;
///
- Buffer const * buffer() const;
+ Buffer const & buffer() const;
/// set the owning buffer
void buffer(Buffer * b);
///
void setPos(BufferView *, int x, int y) const;
///
- RESULT moveRight(BufferView *, bool lock = true);
+ dispatch_result moveRight(BufferView *, bool lock = true);
///
- RESULT moveLeft(BufferView *, bool lock = true);
+ dispatch_result moveLeft(BufferView *, bool lock = true);
///
- RESULT moveUp(BufferView *, bool lock = true);
+ dispatch_result moveUp(BufferView *, bool lock = true);
///
- RESULT moveDown(BufferView *, bool lock = true);
+ dispatch_result moveDown(BufferView *, bool lock = true);
///
bool moveNextCell(BufferView *, bool lock = false);
///
///
WordLangTuple selectNextWordInt(BufferView *, float & value) const;
///
- bool insertAsciiString(BufferView *, string const & buf, bool usePaste);
+ bool insertAsciiString(BufferView *, std::string const & buf, bool usePaste);
//
// Private structures and variables
///
mutable bool locked;
///
- mutable UpdateCodes need_update;
- ///
mutable int in_reset_pos;
};
///
virtual InsetBase & inset() const { return inset_; }
///
- virtual string const & name() const { return name_; }
+ virtual std::string const & name() const { return name_; }
///
- virtual string const inset2string(Buffer const &) const;
+ virtual std::string const inset2string(Buffer const &) const;
/// Returns the active cell if successful, else -1.
- static int string2params(string const &, InsetTabular &);
+ static int string2params(std::string const &, InsetTabular &);
///
- static string const params2string(InsetTabular const &);
+ static std::string const params2string(InsetTabular const &);
private:
///
- static string const name_;
+ static std::string const name_;
///
InsetTabular & inset_;
};
-string const featureAsString(LyXTabular::Feature feature);
+std::string const featureAsString(LyXTabular::Feature feature);
#endif