mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-11 05:33:33 +00:00
4d51fc96b4
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@4799 a592a061-630c-0410-9148-cb99ea01b6c8
51 lines
1.2 KiB
C++
51 lines
1.2 KiB
C++
#ifndef MATH_PARBOXINSET_H
|
|
#define MATH_PARBOXINSET_H
|
|
|
|
#include "math_nestinset.h"
|
|
|
|
class MathParboxInset : public MathNestInset {
|
|
public:
|
|
///
|
|
MathParboxInset();
|
|
///
|
|
MathParboxInset * asParboxInset() { return this; }
|
|
///
|
|
MathInset * clone() const;
|
|
///
|
|
mode_type currentMode() const { return TEXT_MODE; }
|
|
/// get cursor position
|
|
void getPos(idx_type idx, pos_type pos, int & x, int & y) const;
|
|
///
|
|
void metrics(MathMetricsInfo & mi) const;
|
|
///
|
|
void draw(MathPainterInfo &, int x, int y) const;
|
|
/// draw selection background
|
|
void drawSelection(MathPainterInfo & pi,
|
|
idx_type idx1, pos_type pos1, idx_type idx2, pos_type pos2) const;
|
|
///
|
|
void infoize(std::ostream & os) const;
|
|
///
|
|
void write(WriteStream & os) const;
|
|
///
|
|
void setWidth(string const & width);
|
|
///
|
|
void setPosition(string const & pos);
|
|
/// moves cursor up or down
|
|
bool idxUpDown(idx_type &, pos_type & pos, bool up) const;
|
|
private:
|
|
/// number of rows on screen
|
|
int screenrows() const;
|
|
/// row corresponding to given position
|
|
int pos2row(pos_type pos) const;
|
|
/// width on screen
|
|
int lyx_width_;
|
|
/// width for TeX
|
|
string tex_width_;
|
|
/// htb
|
|
char position_;
|
|
/// cached metrics
|
|
mutable std::vector<MathXArray::Row> rows_;
|
|
};
|
|
|
|
#endif
|