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.
|
|
|
|
*/
|
|
|
|
|
1999-11-15 11:06:41 +00:00
|
|
|
#ifndef MATH_ROOT
|
|
|
|
#define MATH_ROOT
|
1999-09-27 18:44:28 +00:00
|
|
|
|
|
|
|
#ifdef __GNUG__
|
|
|
|
#pragma interface
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#include "math_defs.h"
|
|
|
|
#include "math_inset.h"
|
|
|
|
#include "symbol_def.h"
|
|
|
|
#include "LString.h"
|
|
|
|
|
|
|
|
///
|
|
|
|
class MathRootInset: public MathSqrtInset {
|
|
|
|
public:
|
|
|
|
///
|
1999-11-15 11:06:41 +00:00
|
|
|
MathRootInset(short st = LM_ST_TEXT);
|
1999-09-27 18:44:28 +00:00
|
|
|
///
|
|
|
|
// MathRootInset(MathSqrtInset &);
|
|
|
|
///
|
|
|
|
~MathRootInset();
|
|
|
|
///
|
1999-11-25 13:15:52 +00:00
|
|
|
MathedInset * Clone();
|
1999-09-27 18:44:28 +00:00
|
|
|
///
|
2000-02-17 19:59:08 +00:00
|
|
|
void draw(Painter &, int x, int baseline);
|
1999-09-27 18:44:28 +00:00
|
|
|
///
|
2000-04-04 00:19:15 +00:00
|
|
|
void Write(std::ostream &);
|
1999-09-27 18:44:28 +00:00
|
|
|
///
|
|
|
|
void Metrics();
|
|
|
|
///
|
|
|
|
bool Inside(int, int);
|
|
|
|
///
|
1999-11-15 11:06:41 +00:00
|
|
|
void SetFocus(int, int);
|
1999-09-27 18:44:28 +00:00
|
|
|
///
|
1999-11-15 11:06:41 +00:00
|
|
|
void SetData(LyxArrayBase *);
|
1999-09-27 18:44:28 +00:00
|
|
|
///
|
2000-04-04 00:19:15 +00:00
|
|
|
void GetXY(int & x, int & y) const;
|
1999-09-27 18:44:28 +00:00
|
|
|
///
|
|
|
|
LyxArrayBase * GetData();
|
|
|
|
///
|
|
|
|
bool setArgumentIdx(int i);
|
|
|
|
///
|
|
|
|
int getArgumentIdx() { return idx; }
|
|
|
|
///
|
|
|
|
int getMaxArgumentIdx() { return 1; }
|
|
|
|
///
|
|
|
|
void SetStyle(short);
|
|
|
|
|
|
|
|
protected:
|
|
|
|
///
|
|
|
|
int idx;
|
|
|
|
///
|
1999-11-15 11:06:41 +00:00
|
|
|
MathParInset * uroot;
|
1999-09-27 18:44:28 +00:00
|
|
|
///
|
|
|
|
int wroot, dh;
|
|
|
|
};
|
|
|
|
#endif
|