1999-09-27 18:44:28 +00:00
|
|
|
// -*- C++ -*-
|
|
|
|
/*
|
|
|
|
* File: math_root.h
|
|
|
|
* Purpose: Declaration of the root object
|
|
|
|
* Author: Alejandro Aguilar Sierra <asierra@servidor.unam.mx>
|
|
|
|
* Created: January 1999
|
|
|
|
* Description: Root math object
|
|
|
|
*
|
2000-03-09 03:36:48 +00:00
|
|
|
* Copyright: 1999 Alejandro Aguilar Sierra
|
1999-09-27 18:44:28 +00:00
|
|
|
*
|
|
|
|
* You are free to use and modify this code under the terms of
|
|
|
|
* the GNU General Public Licence version 2 or later.
|
|
|
|
*/
|
|
|
|
|
2001-06-25 00:06:33 +00:00
|
|
|
#ifndef MATH_ROOT_H
|
|
|
|
#define MATH_ROOT_H
|
1999-09-27 18:44:28 +00:00
|
|
|
|
2001-08-03 17:10:22 +00:00
|
|
|
#include "math_nestinset.h"
|
1999-09-27 18:44:28 +00:00
|
|
|
|
2001-02-26 12:53:35 +00:00
|
|
|
#ifdef __GNUG__
|
|
|
|
#pragma interface
|
|
|
|
#endif
|
1999-09-27 18:44:28 +00:00
|
|
|
|
2001-02-16 09:25:43 +00:00
|
|
|
/** The general n-th root inset.
|
|
|
|
\author Alejandro Aguilar Sierra
|
|
|
|
\version January 1999
|
|
|
|
*/
|
2001-08-03 17:10:22 +00:00
|
|
|
class MathRootInset : public MathNestInset {
|
2001-02-16 09:25:43 +00:00
|
|
|
public:
|
|
|
|
///
|
2001-06-25 00:06:33 +00:00
|
|
|
MathRootInset();
|
2001-02-16 09:25:43 +00:00
|
|
|
///
|
2001-06-28 10:25:20 +00:00
|
|
|
MathInset * clone() const;
|
2001-02-16 09:25:43 +00:00
|
|
|
///
|
2001-08-06 17:20:26 +00:00
|
|
|
void draw(Painter &, int x, int y) const;
|
2001-02-16 09:25:43 +00:00
|
|
|
///
|
2001-07-26 06:56:43 +00:00
|
|
|
void write(std::ostream &, bool fragile) const;
|
2001-02-16 09:25:43 +00:00
|
|
|
///
|
2001-07-26 06:56:43 +00:00
|
|
|
void writeNormal(std::ostream &) const;
|
2001-04-25 15:43:57 +00:00
|
|
|
///
|
2001-08-06 17:20:26 +00:00
|
|
|
void metrics(MathStyles st) const;
|
2001-02-16 09:25:43 +00:00
|
|
|
///
|
2001-06-25 00:06:33 +00:00
|
|
|
bool idxUp(int & idx, int & pos) const;
|
2001-02-16 09:25:43 +00:00
|
|
|
///
|
2001-06-25 00:06:33 +00:00
|
|
|
bool idxDown(int & idx, int & pos) const;
|
1999-09-27 18:44:28 +00:00
|
|
|
};
|
2001-02-16 09:25:43 +00:00
|
|
|
|
1999-09-27 18:44:28 +00:00
|
|
|
#endif
|