2004-01-30 11:41:12 +00:00
|
|
|
|
// -*- C++ -*-
|
|
|
|
|
/**
|
|
|
|
|
* \file math_mboxinset.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.
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
#ifndef MATH_MBOXINSET_H
|
|
|
|
|
#define MATH_MBOXINSET_H
|
|
|
|
|
|
|
|
|
|
#include "math_diminset.h"
|
|
|
|
|
#include "lyxtext.h"
|
|
|
|
|
|
|
|
|
|
|
2004-04-07 18:15:29 +00:00
|
|
|
|
// almost a substitute for the real text inset...
|
2004-01-30 11:41:12 +00:00
|
|
|
|
|
|
|
|
|
class MathMBoxInset : public MathDimInset {
|
|
|
|
|
public:
|
|
|
|
|
///
|
|
|
|
|
MathMBoxInset(BufferView & bv);
|
|
|
|
|
///
|
|
|
|
|
std::auto_ptr<InsetBase> clone() const;
|
|
|
|
|
/// this stores metrics information in cache_
|
|
|
|
|
void metrics(MetricsInfo & mi, Dimension & dim) const;
|
|
|
|
|
/// draw according to cached metrics
|
|
|
|
|
void draw(PainterInfo &, int x, int y) const;
|
|
|
|
|
///
|
2004-03-18 12:53:43 +00:00
|
|
|
|
void priv_dispatch(LCursor & cur, FuncRequest & cmd);
|
2004-01-30 11:41:12 +00:00
|
|
|
|
|
2004-02-25 14:39:14 +00:00
|
|
|
|
///
|
|
|
|
|
bool inMathed() const { return false; }
|
2004-04-07 18:15:29 +00:00
|
|
|
|
///
|
|
|
|
|
bool isActive() const { return true; }
|
2004-01-30 11:41:12 +00:00
|
|
|
|
|
2004-04-07 18:15:29 +00:00
|
|
|
|
///
|
|
|
|
|
void write(WriteStream & os) const;
|
|
|
|
|
///
|
|
|
|
|
int latex(Buffer const &, std::ostream & os,
|
|
|
|
|
OutputParams const & runparams) const;
|
2004-01-30 11:41:12 +00:00
|
|
|
|
///
|
2004-04-03 08:37:12 +00:00
|
|
|
|
LyXText * getText(int) const;
|
2004-01-30 11:41:12 +00:00
|
|
|
|
///
|
|
|
|
|
void getCursorPos(CursorSlice const & cur, int & x, int & y) const;
|
|
|
|
|
protected:
|
2004-04-03 08:37:12 +00:00
|
|
|
|
///
|
2004-01-30 11:41:12 +00:00
|
|
|
|
mutable LyXText text_;
|
|
|
|
|
///
|
|
|
|
|
BufferView * const bv_;
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
#endif
|