2001-06-13 14:33:31 +00:00
|
|
|
// -*- C++ -*-
|
2001-03-16 12:08:14 +00:00
|
|
|
/**
|
2002-08-30 16:20:27 +00:00
|
|
|
* \file ControlMath.h
|
2002-09-05 15:14:23 +00:00
|
|
|
* This file is part of LyX, the document processor.
|
|
|
|
* Licence details can be found in the file COPYING.
|
2001-03-16 12:08:14 +00:00
|
|
|
*
|
2002-11-25 18:58:15 +00:00
|
|
|
* \author Angus Leeming
|
2002-09-05 14:10:50 +00:00
|
|
|
*
|
|
|
|
* Full author contact details are available in file CREDITS
|
2003-06-17 12:53:35 +00:00
|
|
|
*
|
|
|
|
* ControlMath2 is a controller class for the Math Panel dialog.
|
2001-03-16 12:08:14 +00:00
|
|
|
*/
|
|
|
|
|
2003-06-17 12:53:35 +00:00
|
|
|
#ifndef CONTROLMATH_H
|
|
|
|
#define CONTROLMATH_H
|
2002-11-25 18:58:15 +00:00
|
|
|
|
|
|
|
|
2003-06-17 12:53:35 +00:00
|
|
|
#include "Dialog.h"
|
|
|
|
#include "lfuns.h" // for kb_action
|
2002-11-25 18:58:15 +00:00
|
|
|
|
|
|
|
|
2003-06-17 12:53:35 +00:00
|
|
|
class ControlMath : public Dialog::Controller {
|
2002-11-25 18:58:15 +00:00
|
|
|
public:
|
2003-06-17 12:53:35 +00:00
|
|
|
ControlMath(Dialog &);
|
2002-11-25 18:58:15 +00:00
|
|
|
|
2003-07-17 15:35:42 +00:00
|
|
|
/// Nothing to initialise in this case.
|
2003-06-17 12:53:35 +00:00
|
|
|
virtual bool initialiseParams(string const &) { return true; }
|
|
|
|
virtual void clearParams() {}
|
|
|
|
virtual void dispatchParams() {}
|
|
|
|
virtual bool isBufferDependent() const { return true; }
|
2002-11-25 18:58:15 +00:00
|
|
|
|
2003-06-17 12:53:35 +00:00
|
|
|
/// dispatch an LFUN
|
|
|
|
void dispatchFunc(kb_action action, string const & arg = string()) const;
|
|
|
|
/// Insert a math symbol into the doc.
|
|
|
|
void dispatchInsert(string const & name) const;
|
|
|
|
/// Insert a subscript.
|
|
|
|
void dispatchSubscript() const;
|
|
|
|
/// Insert a superscript.
|
|
|
|
void dispatchSuperscript() const;
|
|
|
|
/// Insert a cube root
|
|
|
|
void dispatchCubeRoot() const;
|
|
|
|
/// Insert a matrix
|
|
|
|
void dispatchMatrix(string const & str) const;
|
|
|
|
/// Insert a delimiter
|
|
|
|
void dispatchDelim(string const & str) const;
|
2003-07-17 15:35:42 +00:00
|
|
|
/// Wwitch between display and inline
|
2003-06-17 12:53:35 +00:00
|
|
|
void dispatchToggleDisplay() const;
|
2003-07-17 15:35:42 +00:00
|
|
|
/** A request to the kernel to launch a dialog.
|
|
|
|
* \param name the dialog identifier.
|
|
|
|
*/
|
2003-06-17 10:30:38 +00:00
|
|
|
void showDialog(string const & name) const;
|
2002-11-25 18:58:15 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
|
2001-03-19 15:38:22 +00:00
|
|
|
extern char const * function_names[];
|
|
|
|
extern int const nr_function_names;
|
|
|
|
extern char const * latex_arrow[];
|
|
|
|
extern int const nr_latex_arrow;
|
|
|
|
extern char const * latex_bop[];
|
|
|
|
extern int const nr_latex_bop;
|
|
|
|
extern char const * latex_brel[];
|
|
|
|
extern int const nr_latex_brel;
|
|
|
|
extern char const * latex_dots[];
|
|
|
|
extern int const nr_latex_dots;
|
|
|
|
extern char const * latex_greek[];
|
|
|
|
extern int const nr_latex_greek;
|
2002-09-09 15:53:20 +00:00
|
|
|
extern char const * latex_deco[];
|
|
|
|
extern int const nr_latex_deco;
|
2001-03-19 15:38:22 +00:00
|
|
|
extern char const * latex_misc[];
|
|
|
|
extern int const nr_latex_misc;
|
|
|
|
extern char const * latex_varsz[];
|
|
|
|
extern int const nr_latex_varsz;
|
2002-01-18 12:18:20 +00:00
|
|
|
extern char const * latex_ams_misc[];
|
|
|
|
extern int const nr_latex_ams_misc;
|
|
|
|
extern char const * latex_ams_arrows[];
|
|
|
|
extern int const nr_latex_ams_arrows;
|
|
|
|
extern char const * latex_ams_rel[];
|
|
|
|
extern int const nr_latex_ams_rel;
|
|
|
|
extern char const * latex_ams_nrel[];
|
|
|
|
extern int const nr_latex_ams_nrel;
|
|
|
|
extern char const * latex_ams_ops[];
|
|
|
|
extern int const nr_latex_ams_ops;
|
|
|
|
|
2002-11-20 16:11:18 +00:00
|
|
|
/**
|
|
|
|
* Return the mangled XPM filename of the given
|
|
|
|
* math symbol.
|
|
|
|
*/
|
|
|
|
string const find_xpm(string const & name);
|
2002-12-01 22:59:25 +00:00
|
|
|
|
2003-06-17 12:53:35 +00:00
|
|
|
#endif // NOT CONTROLMATH
|