2001-10-19 11:25:48 +00:00
|
|
|
// -*- C++ -*-
|
|
|
|
#ifndef MATH_BOXINSET_H
|
|
|
|
#define MATH_BOXINSET_H
|
|
|
|
|
|
|
|
#include "math_diminset.h"
|
|
|
|
#include "LString.h"
|
|
|
|
|
|
|
|
#ifdef __GNUG__
|
|
|
|
#pragma interface
|
|
|
|
#endif
|
|
|
|
|
|
|
|
class InsetText;
|
2001-10-24 19:09:31 +00:00
|
|
|
class UpdatableInset;
|
2001-10-19 11:25:48 +00:00
|
|
|
class BufferView;
|
|
|
|
class Buffer;
|
|
|
|
class LyXFont;
|
|
|
|
|
|
|
|
/// Support for \\mbox
|
|
|
|
|
|
|
|
class MathBoxInset : public MathDimInset {
|
|
|
|
public:
|
|
|
|
///
|
|
|
|
explicit MathBoxInset(string const &);
|
|
|
|
///
|
|
|
|
MathBoxInset(MathBoxInset const &);
|
|
|
|
///
|
|
|
|
~MathBoxInset();
|
|
|
|
///
|
|
|
|
MathInset * clone() const;
|
|
|
|
///
|
|
|
|
void draw(Painter &, int x, int y) const;
|
|
|
|
///
|
2001-11-09 08:35:57 +00:00
|
|
|
void write(WriteStream & os) const;
|
2001-10-19 11:25:48 +00:00
|
|
|
///
|
2001-11-09 08:35:57 +00:00
|
|
|
void normalize(NormalStream &) const;
|
2001-10-19 11:25:48 +00:00
|
|
|
///
|
2001-10-22 15:37:49 +00:00
|
|
|
void metrics(MathMetricsInfo const &) const;
|
2001-10-19 11:25:48 +00:00
|
|
|
/// identifies BoxInsets
|
|
|
|
MathBoxInset * asBoxInset() { return this; }
|
2001-10-24 18:29:55 +00:00
|
|
|
///
|
|
|
|
bool isHyperActive() const { return 1; }
|
2001-10-24 19:09:31 +00:00
|
|
|
///
|
|
|
|
void edit(BufferView * bv, int x, int y, unsigned int button);
|
|
|
|
/// identifies hyperactive insets
|
|
|
|
UpdatableInset * asHyperActiveInset() const;
|
2001-10-19 11:25:48 +00:00
|
|
|
|
|
|
|
private:
|
|
|
|
/// unimplemented
|
|
|
|
void operator=(MathBoxInset const &);
|
|
|
|
|
2001-10-22 15:37:49 +00:00
|
|
|
///
|
|
|
|
mutable MathMetricsInfo mi_;
|
2001-10-19 11:25:48 +00:00
|
|
|
///
|
|
|
|
string name_;
|
|
|
|
///
|
|
|
|
InsetText * text_;
|
|
|
|
///
|
|
|
|
mutable Buffer * buffer_;
|
|
|
|
};
|
|
|
|
#endif
|