2003-07-25 17:11:25 +00:00
|
|
|
|
// -*- C++ -*-
|
2003-08-19 13:00:56 +00:00
|
|
|
|
/**
|
|
|
|
|
* \file math_parboxinset.h
|
|
|
|
|
* This file is part of LyX, the document processor.
|
|
|
|
|
* Licence details can be found in the file COPYING.
|
|
|
|
|
*
|
|
|
|
|
* \author Andr<EFBFBD> P<EFBFBD>nitz
|
|
|
|
|
*
|
|
|
|
|
* Full author contact details are available in file CREDITS.
|
|
|
|
|
*/
|
|
|
|
|
|
2002-07-08 11:29:51 +00:00
|
|
|
|
#ifndef MATH_PARBOXINSET_H
|
|
|
|
|
#define MATH_PARBOXINSET_H
|
|
|
|
|
|
2002-09-11 09:14:57 +00:00
|
|
|
|
|
2002-07-31 17:26:14 +00:00
|
|
|
|
#include "math_textinset.h"
|
2002-07-08 11:29:51 +00:00
|
|
|
|
|
2002-07-31 17:26:14 +00:00
|
|
|
|
// implements support for \parbox
|
|
|
|
|
|
|
|
|
|
class MathParboxInset : public MathTextInset {
|
2002-07-08 11:29:51 +00:00
|
|
|
|
public:
|
|
|
|
|
///
|
|
|
|
|
MathParboxInset();
|
|
|
|
|
///
|
|
|
|
|
MathParboxInset * asParboxInset() { return this; }
|
|
|
|
|
///
|
2003-07-25 17:11:25 +00:00
|
|
|
|
virtual std::auto_ptr<InsetBase> clone() const;
|
2002-07-18 11:02:33 +00:00
|
|
|
|
///
|
|
|
|
|
mode_type currentMode() const { return TEXT_MODE; }
|
2002-07-08 11:29:51 +00:00
|
|
|
|
///
|
2003-06-02 10:03:27 +00:00
|
|
|
|
void metrics(MetricsInfo & mi, Dimension & dim) const;
|
2002-07-08 11:29:51 +00:00
|
|
|
|
///
|
2003-03-21 14:20:48 +00:00
|
|
|
|
void draw(PainterInfo &, int x, int y) const;
|
2002-07-08 11:29:51 +00:00
|
|
|
|
///
|
|
|
|
|
void infoize(std::ostream & os) const;
|
|
|
|
|
///
|
|
|
|
|
void write(WriteStream & os) const;
|
|
|
|
|
///
|
2003-10-06 15:43:21 +00:00
|
|
|
|
void setWidth(std::string const & width);
|
2002-07-08 11:29:51 +00:00
|
|
|
|
///
|
2003-10-06 15:43:21 +00:00
|
|
|
|
void setPosition(std::string const & pos);
|
2002-07-08 11:29:51 +00:00
|
|
|
|
private:
|
|
|
|
|
/// width on screen
|
|
|
|
|
int lyx_width_;
|
|
|
|
|
/// width for TeX
|
2003-10-06 15:43:21 +00:00
|
|
|
|
std::string tex_width_;
|
2002-07-31 17:26:14 +00:00
|
|
|
|
/// one of htb
|
2002-07-08 11:29:51 +00:00
|
|
|
|
char position_;
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
#endif
|