// Lgb
-#ifndef INSETTABULAR_H
-#define INSETTABULAR_H
+#ifndef INSET_TABULAR_H
+#define INSET_TABULAR_H
#include "Inset.h"
#include "InsetText.h"
#include "Layout.h"
#include "Length.h"
-#include "MailInset.h"
#include <boost/shared_ptr.hpp>
///
int TeXBottomHLine(odocstream &, row_type row) const;
///
- int TeXCellPreamble(odocstream &, idx_type cell) const;
+ int TeXCellPreamble(odocstream &, idx_type cell, bool & ismulticol) const;
///
- int TeXCellPostamble(odocstream &, idx_type cell) const;
+ int TeXCellPostamble(odocstream &, idx_type cell, bool ismulticol) const;
///
int TeXLongtableHeaderFooter(odocstream &, OutputParams const &) const;
///
///
-class InsetTableCell : public InsetText {
+class InsetTableCell : public InsetText
+{
public:
///
- explicit InsetTableCell(Buffer const & buf,
+ InsetTableCell(Buffer const & buf,
Tabular::CellData const * cd, Tabular const * t);
///
- virtual InsetCode lyxCode() const { return CELL_CODE; }
+ InsetCode lyxCode() const { return CELL_CODE; }
///
Inset * clone() { return new InsetTableCell(*this); }
///
///
void setTabular(Tabular const * t) { table_ = t; }
private:
- ///
- Tabular::CellData const * cell_data_;
- ///
- Tabular const * table_;
/// unimplemented
InsetTableCell();
/// unimplemented
void operator=(InsetTableCell const &);
+
+ ///
+ Tabular::CellData const * cell_data_;
+ ///
+ Tabular const * table_;
};
-class InsetTabular : public Inset {
+class InsetTabular : public Inset
+{
public:
///
InsetTabular(Buffer const &, row_type rows = 1,
///
~InsetTabular();
///
+ static void string2params(std::string const &, InsetTabular &);
+ ///
+ static std::string params2string(InsetTabular const &);
+ ///
void read(Lexer &);
///
void write(std::ostream &) const;
void validate(LaTeXFeatures & features) const;
///
InsetCode lyxCode() const { return TABULAR_CODE; }
+ ///
+ docstring contextMenu(BufferView const & bv, int x, int y) const;
/// get offset of this cursor slice relative to our upper left corner
void cursorPos(BufferView const & bv, CursorSlice const & sl,
bool boundary, int & x, int & y) const;
mutable idx_type first_visible_cell;
///
mutable int scx_;
-};
-
-
-class InsetTabularMailer : public MailInset {
-public:
- ///
- InsetTabularMailer(InsetTabular const & inset);
- ///
- virtual Inset & inset() const { return inset_; }
- ///
- virtual std::string const & name() const { return name_; }
- ///
- virtual std::string const inset2string(Buffer const &) const;
- ///
- static void string2params(std::string const &, InsetTabular &);
- ///
- static std::string const params2string(InsetTabular const &);
-private:
- ///
- static std::string const name_;
- ///
- InsetTabular & inset_;
+ /// true when selecting rows with the mouse
+ bool rowselect_;
+ /// true when selecting columns with the mouse
+ bool colselect_;
};
std::string const featureAsString(Tabular::Feature feature);
} // namespace lyx
-#endif
+#endif // INSET_TABULAR_H