2001-08-13 15:26:41 +00:00
|
|
|
|
// -*- C++ -*-
|
2003-08-19 13:00:56 +00:00
|
|
|
|
/**
|
2006-09-17 09:14:18 +00:00
|
|
|
|
* \file InsetMathBinom.h
|
2003-08-19 13:00:56 +00:00
|
|
|
|
* 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.
|
|
|
|
|
*/
|
|
|
|
|
|
2001-08-13 15:26:41 +00:00
|
|
|
|
#ifndef MATH_BINOMINSET_H
|
2004-09-15 15:43:07 +00:00
|
|
|
|
#define MATH_BINOMINSET_H
|
2001-08-13 15:26:41 +00:00
|
|
|
|
|
2006-09-17 09:14:18 +00:00
|
|
|
|
#include "InsetMathFracBase.h"
|
2001-08-13 15:26:41 +00:00
|
|
|
|
|
|
|
|
|
|
2006-10-21 00:16:43 +00:00
|
|
|
|
namespace lyx {
|
|
|
|
|
|
|
|
|
|
|
2003-08-19 13:00:56 +00:00
|
|
|
|
/// Binom like objects
|
2006-09-16 18:11:38 +00:00
|
|
|
|
class InsetMathBinom : public InsetMathFracBase {
|
2001-08-13 15:26:41 +00:00
|
|
|
|
public:
|
|
|
|
|
///
|
2006-09-16 18:11:38 +00:00
|
|
|
|
explicit InsetMathBinom(bool choose = false);
|
2001-08-13 15:26:41 +00:00
|
|
|
|
///
|
2001-11-09 08:35:57 +00:00
|
|
|
|
void write(WriteStream & os) const;
|
2001-08-13 15:26:41 +00:00
|
|
|
|
///
|
2001-11-09 08:35:57 +00:00
|
|
|
|
void normalize(NormalStream &) const;
|
2001-08-13 15:26:41 +00:00
|
|
|
|
///
|
2006-11-28 15:15:49 +00:00
|
|
|
|
bool metrics(MetricsInfo & mi, Dimension & dim) const;
|
2001-08-13 15:26:41 +00:00
|
|
|
|
///
|
2003-03-21 14:20:48 +00:00
|
|
|
|
void draw(PainterInfo &, int x, int y) const;
|
2007-01-20 00:55:24 +00:00
|
|
|
|
/// draw decorations.
|
|
|
|
|
void drawDecoration(PainterInfo & pi, int x, int y) const
|
|
|
|
|
{ drawMarkers2(pi, x, y); }
|
2006-07-16 17:19:05 +00:00
|
|
|
|
///
|
|
|
|
|
bool extraBraces() const;
|
2001-08-13 15:26:41 +00:00
|
|
|
|
private:
|
2007-08-30 18:03:17 +00:00
|
|
|
|
virtual Inset * clone() const;
|
2001-08-13 15:26:41 +00:00
|
|
|
|
///
|
|
|
|
|
int dw() const;
|
2002-07-04 11:00:51 +00:00
|
|
|
|
///
|
|
|
|
|
bool choose_;
|
2001-08-13 15:26:41 +00:00
|
|
|
|
};
|
|
|
|
|
|
2006-10-21 00:16:43 +00:00
|
|
|
|
|
|
|
|
|
} // namespace lyx
|
|
|
|
|
|
2001-08-13 15:26:41 +00:00
|
|
|
|
#endif
|