2003-05-07 07:46:04 +00:00
|
|
|
// -*- C++ -*-
|
2003-08-19 13:00:56 +00:00
|
|
|
/**
|
|
|
|
* \file math_makeboxinset.h
|
|
|
|
* This file is part of LyX, the document processor.
|
|
|
|
* Licence details can be found in the file COPYING.
|
|
|
|
*
|
|
|
|
* \author Ling Li
|
|
|
|
*
|
|
|
|
* Full author contact details are available in file CREDITS.
|
|
|
|
*/
|
|
|
|
|
2003-05-07 07:46:04 +00:00
|
|
|
#ifndef MATH_MAKEBOXINSET_H
|
|
|
|
#define MATH_MAKEBOXINSET_H
|
|
|
|
|
|
|
|
#include "math_nestinset.h"
|
|
|
|
|
2003-08-19 13:00:56 +00:00
|
|
|
/// Extra nesting: \\makebox.
|
2003-05-07 07:46:04 +00:00
|
|
|
// consolidate with MathFrameboxInset?
|
|
|
|
|
|
|
|
class MathMakeboxInset : public MathNestInset {
|
|
|
|
public:
|
|
|
|
///
|
|
|
|
MathMakeboxInset();
|
|
|
|
///
|
2003-06-02 10:03:27 +00:00
|
|
|
void metrics(MetricsInfo & mi, Dimension & dim) const;
|
2003-05-07 07:46:04 +00:00
|
|
|
///
|
|
|
|
void draw(PainterInfo & pi, int x, int y) const;
|
|
|
|
///
|
|
|
|
void write(WriteStream & os) const;
|
|
|
|
/// write normalized content
|
|
|
|
void normalize(NormalStream & ns) const;
|
|
|
|
///
|
|
|
|
mode_type currentMode() const { return TEXT_MODE; }
|
2003-10-02 13:41:00 +00:00
|
|
|
///
|
|
|
|
void infoize(std::ostream & os) const;
|
2003-05-07 07:46:04 +00:00
|
|
|
private:
|
2004-11-23 23:04:52 +00:00
|
|
|
virtual std::auto_ptr<InsetBase> doClone() const;
|
2003-05-07 07:46:04 +00:00
|
|
|
/// width of '[' in current font
|
|
|
|
mutable int w_;
|
|
|
|
};
|
|
|
|
|
|
|
|
#endif
|