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
|
|
|
|
*
|
|
|
|
* Copyright: (c) 1999 Alejandro Aguilar Sierra
|
|
|
|
*
|
|
|
|
* You are free to use and modify this code under the terms of
|
|
|
|
* the GNU General Public Licence version 2 or later.
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef __MATH_ROOT__
|
|
|
|
#define __MATH_ROOT__
|
|
|
|
|
|
|
|
#ifdef __GNUG__
|
|
|
|
#pragma interface
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#include <stdio.h>
|
|
|
|
#include "math_defs.h"
|
|
|
|
#include "math_inset.h"
|
|
|
|
#include "symbol_def.h"
|
|
|
|
#include "LString.h"
|
|
|
|
|
|
|
|
|
|
|
|
///
|
|
|
|
class MathRootInset: public MathSqrtInset {
|
|
|
|
public:
|
|
|
|
///
|
|
|
|
MathRootInset(short st=LM_ST_TEXT);
|
|
|
|
///
|
|
|
|
// MathRootInset(MathSqrtInset &);
|
|
|
|
///
|
|
|
|
~MathRootInset();
|
|
|
|
///
|
|
|
|
MathedInset *Clone();
|
|
|
|
///
|
|
|
|
void Draw(int x, int baseline);
|
|
|
|
///
|
|
|
|
void Write(FILE *file);
|
|
|
|
///
|
1999-10-02 16:21:10 +00:00
|
|
|
void Write(string &file);
|
1999-09-27 18:44:28 +00:00
|
|
|
///
|
|
|
|
void Metrics();
|
|
|
|
///
|
|
|
|
bool Inside(int, int);
|
|
|
|
///
|
|
|
|
void SetFocus(int,int);
|
|
|
|
///
|
|
|
|
void SetData(LyxArrayBase*);
|
|
|
|
///
|
|
|
|
void GetXY(int& x, int& y) const;
|
|
|
|
///
|
|
|
|
LyxArrayBase * GetData();
|
|
|
|
///
|
|
|
|
bool setArgumentIdx(int i);
|
|
|
|
///
|
|
|
|
int getArgumentIdx() { return idx; }
|
|
|
|
///
|
|
|
|
int getMaxArgumentIdx() { return 1; }
|
|
|
|
///
|
|
|
|
void SetStyle(short);
|
|
|
|
|
|
|
|
protected:
|
|
|
|
///
|
|
|
|
int idx;
|
|
|
|
///
|
|
|
|
MathParInset *uroot;
|
|
|
|
///
|
|
|
|
int wroot, dh;
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
#endif
|