*
* Dependencies: Xlib, XForms, Lyx
*
- * Copyright: (c) 1995, 1996, Alejandro Aguilar Sierra
+ * Copyright: 1995, 1996, Alejandro Aguilar Sierra
*
* You are free to use and modify it under the terms of
* the GNU General Public Licence version 2 or later.
#endif
#include <algorithm>
-using std::max;
#include "lyx_main.h"
#include "buffer.h"
#include "LyXView.h"
#include "support/lstrings.h"
#include "debug.h"
+#include "lyxfunc.h"
#include "formula.h"
#include "math_panel.h"
#include "math_parser.h"
-//extern void Update(signed char);
-//extern int UnlockInset(UpdatableInset *);
+using std::max;
+using std::endl;
+using std::ostream;
+
extern short greek_kb_flag;
extern BufferView * current_view;
extern "C" void math_cb(FL_OBJECT* ob, long data)
{
- BitmapMenu* menu = (BitmapMenu*)ob->u_vdata;
+ BitmapMenu * menu = static_cast<BitmapMenu*>(ob->u_vdata);
int i = menu->GetIndex(ob);
char const *s = 0;
}
if (s) {
- if (current_view->available() && lyxrc->display_shortcuts) {
+ if (current_view->available() && lyxrc.display_shortcuts) {
current_view->owner()->getMiniBuffer()->Set("Inserting symbol ", s);
}
current_view->owner()->getLyXFunc()->Dispatch(LFUN_INSERT_MATH, s);
current_view->beforeChange();
current_view->insertInset(new_inset);
// Update(1);//BUG
- new_inset->Edit(0, 0);
- new_inset->InsertSymbol(s);
+ new_inset->Edit(current_view, 0, 0, 0);
+ new_inset->InsertSymbol(current_view, s);
} else
if (current_view->the_locking_inset->LyxCode() == Inset::MATH_CODE)
- static_cast<InsetFormula*>(current_view->the_locking_inset)->InsertSymbol(s);
+ static_cast<InsetFormula*>(current_view->the_locking_inset)->InsertSymbol(current_view, s);
else
lyxerr << "Math error: attempt to write on a wrong "
"class of inset." << endl;