}
-char const * function_names[] = {
- "arccos", "arcsin", "arctan", "arg", "bmod",
- "cos", "cosh", "cot", "coth", "csc", "deg",
- "det", "dim", "exp", "gcd", "hom", "inf", "ker",
- "lg", "lim", "liminf", "limsup", "ln", "log",
- "max", "min", "sec", "sin", "sinh", "sup",
- "tan", "tanh", "Pr", ""
-};
-
-int const nr_function_names = sizeof(function_names) / sizeof(char const *) - 1;
-
-char const * latex_delimiters[] = {
- "(", ")", "{", "}", "[", "]",
- "lceil", "rceil", "lfloor", "rfloor", "langle", "rangle",
- "uparrow", "updownarrow", "Uparrow", "Updownarrow", "downarrow", "Downarrow",
- "|", "Vert", "/", "backslash", ""
-};
-
-
-int const nr_latex_delimiters = sizeof(latex_delimiters) / sizeof(char const *);
-
} // namespace frontend
} // namespace lyx
#ifndef CONTROLMATH_H
#define CONTROLMATH_H
-
#include "Dialog.h"
#include "lfuns.h" // for kb_action
#include "Font.h"
#include <map>
+
namespace lyx {
namespace frontend {
Font::FONT_FAMILY fontfamily;
};
+
class ControlMath : public Controller {
public:
ControlMath(Dialog &);
};
-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;
-extern char const * latex_deco[];
-extern int const nr_latex_deco;
-extern char const * latex_misc[];
-extern int const nr_latex_misc;
-extern char const * latex_varsz[];
-extern int const nr_latex_varsz;
-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;
-extern char const * latex_delimiters[];
-extern int const nr_latex_delimiters;
-
} // namespace frontend
} // namespace lyx
using std::string;
-namespace lyx {
-namespace frontend {
+static char const * latex_delimiters[] = {
+ "(", ")", "{", "}", "[", "]",
+ "lceil", "rceil", "lfloor", "rfloor", "langle", "rangle",
+ "uparrow", "updownarrow", "Uparrow", "Updownarrow", "downarrow", "Downarrow",
+ "|", "Vert", "/", "backslash", ""
+};
+
+
+static int const nr_latex_delimiters =
+ sizeof(latex_delimiters) / sizeof(char const *);
static QString const bigleft[] = {"", "bigl", "Bigl", "biggl", "Biggl"};
}
+namespace lyx {
+namespace frontend {
+
+
GuiDelimiterDialog::GuiDelimiterDialog(LyXView & lv)
: GuiDialog(lv, "mathdelimiter")
{
*/
// This file contains most of the magic that extracts "context
-// information" from the unstructered layout-oriented stuff in an
+// information" from the unstructered layout-oriented stuff in
// MathData.
#include <config.h>
#include "support/filetools.h"
#include "support/lstrings.h"
#include "support/lyxlib.h"
-#include "frontends/controllers/ControlMath.h"
#include <algorithm>
#include <sstream>
using support::unlink;
using support::subst;
-using frontend::function_names;
-
using std::auto_ptr;
using std::endl;
using std::find_if;
using std::string;
using std::vector;
+static char const * function_names[] = {
+ "arccos", "arcsin", "arctan", "arg", "bmod",
+ "cos", "cosh", "cot", "coth", "csc", "deg",
+ "det", "dim", "exp", "gcd", "hom", "inf", "ker",
+ "lg", "lim", "liminf", "limsup", "ln", "log",
+ "max", "min", "sec", "sin", "sinh", "sup",
+ "tan", "tanh", "Pr", 0
+};
+
static size_t const npos = lyx::docstring::npos;
// define a function for tests
// is this a known function?
bool isKnownFunction(docstring const & str)
{
- for (int i = 0; *function_names[i]; ++i) {
+ for (int i = 0; function_names[i]; ++i) {
if (str == function_names[i])
return true;
}