2002-08-30 16:20:27 +00:00
|
|
|
// -*- C++ -*-
|
|
|
|
/**
|
|
|
|
* \file QMath.h
|
2002-09-24 13:57:09 +00:00
|
|
|
* This file is part of LyX, the document processor.
|
|
|
|
* Licence details can be found in the file COPYING.
|
2002-08-30 16:20:27 +00:00
|
|
|
*
|
2002-09-24 13:57:09 +00:00
|
|
|
* \author John Levon
|
|
|
|
*
|
|
|
|
* Full author contact details are available in file CREDITS
|
2002-08-30 16:20:27 +00:00
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef QMATH_H
|
|
|
|
#define QMATH_H
|
|
|
|
|
|
|
|
#ifdef __GNUG__
|
|
|
|
#pragma interface
|
|
|
|
#endif
|
|
|
|
|
2002-09-24 13:57:09 +00:00
|
|
|
#include "LString.h"
|
|
|
|
|
2002-09-23 16:16:08 +00:00
|
|
|
class QMathDialog;
|
|
|
|
|
2002-10-20 01:48:28 +00:00
|
|
|
class QMath {
|
2002-08-30 16:20:27 +00:00
|
|
|
public:
|
|
|
|
friend class QMathDialog;
|
|
|
|
|
|
|
|
QMath();
|
|
|
|
|
|
|
|
/// temporary
|
|
|
|
void do_show();
|
2002-09-24 13:57:09 +00:00
|
|
|
|
2002-08-30 16:20:27 +00:00
|
|
|
/// build the dialog (should be private)
|
|
|
|
virtual void build_dialog();
|
|
|
|
|
|
|
|
/// insert a math symbol into the doc
|
2002-09-14 20:16:14 +00:00
|
|
|
void insert(string const & name);
|
2002-09-24 13:57:09 +00:00
|
|
|
|
2002-09-14 03:27:07 +00:00
|
|
|
/// insert a cube root
|
|
|
|
void insertCubeRoot();
|
2002-09-24 13:57:09 +00:00
|
|
|
|
2002-09-14 20:16:14 +00:00
|
|
|
/// insert a matrix
|
2002-10-28 16:43:58 +00:00
|
|
|
void insertMatrix(string const & str);
|
2002-09-24 13:57:09 +00:00
|
|
|
|
2002-09-14 23:59:19 +00:00
|
|
|
/// insert delim
|
|
|
|
void insertDelim(string const & str);
|
2002-09-24 13:57:09 +00:00
|
|
|
|
2002-09-06 01:44:02 +00:00
|
|
|
/// add a subscript
|
|
|
|
void subscript();
|
|
|
|
|
|
|
|
/// add a superscript
|
|
|
|
void superscript();
|
2002-09-24 13:57:09 +00:00
|
|
|
|
2002-09-14 03:27:07 +00:00
|
|
|
/// switch between display and inline
|
|
|
|
void toggleDisplay();
|
2002-08-30 16:20:27 +00:00
|
|
|
private:
|
|
|
|
/// Apply changes
|
2002-09-23 16:16:08 +00:00
|
|
|
virtual void apply() {}
|
2002-08-30 16:20:27 +00:00
|
|
|
/// update
|
2002-09-23 16:16:08 +00:00
|
|
|
virtual void update_contents() {}
|
2002-08-30 16:20:27 +00:00
|
|
|
|
2002-09-24 13:57:09 +00:00
|
|
|
// FIXME: temp
|
|
|
|
QMathDialog * dialog_;
|
2002-08-30 16:20:27 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif // QMATH_H
|