break;
// Math fonts
- case LFUN_GREEK_TOGGLE: handleFont(bv, cmd.argument, "lyxgreek"); break;
+ //case LFUN_GREEK_TOGGLE: handleFont(bv, cmd.argument, "lyxgreek"); break;
case LFUN_BOLD: handleFont(bv, cmd.argument, "mathbf"); break;
case LFUN_SANS: handleFont(bv, cmd.argument, "mathsf"); break;
case LFUN_EMPH: handleFont(bv, cmd.argument, "mathcal"); break;
case LFUN_FREE: handleFont(bv, cmd.argument, "textrm"); break;
case LFUN_DEFAULT: handleFont(bv, cmd.argument, "textnormal"); break;
- case LFUN_GREEK:
- handleFont(bv, cmd.argument, "lyxgreek1");
- if (cmd.argument.size())
- mathcursor->insert(asArray(cmd.argument));
- break;
+ //case LFUN_GREEK:
+ // handleFont(bv, cmd.argument, "lyxgreek1");
+ // if (cmd.argument.size())
+ // mathcursor->insert(asArray(cmd.argument));
+ // break;
case LFUN_MATH_MODE:
if (mathcursor->currentMode() == MathInset::TEXT_MODE) {
#include "funcrequest.h"
#include "frontends/Painter.h"
#include "debug.h"
+#include "Lsstream.h"
#include "insets/mailinset.h"
///
virtual string const inset2string() const
{
- lyxerr << "inset2string called" << std::endl;
- return "whatever"; //(inset_);
+ ostringstream data;
+ //data << name() << " active_cell " << inset.getActCell() << '\n';
+ data << name() << " active_cell " << 0 << '\n';
+ WriteStream ws(data);
+ inset_.write(ws);
+ return data.str();
}
protected:
{
switch (cmd.action) {
- case LFUN_MOUSE_RELEASE: {
- if (cmd.button() == mouse_button::button3) {
- WriteStream ws(lyxerr);
- write(ws);
- GridInsetMailer mailer(*this);
- lyxerr << "mailer " << mailer.name() << " active\n";
- mailer.showDialog(cmd.view());
- return DISPATCHED;
- }
+ case LFUN_MOUSE_RELEASE:
+ //if (cmd.button() == mouse_button::button3) {
+ // GridInsetMailer mailer(*this);
+ // mailer.showDialog();
+ // return DISPATCHED;
+ //}
break;
- }
case LFUN_INSET_DIALOG_UPDATE: {
GridInsetMailer mailer(*this);
using std::ostream;
+BufferView * MathInset::view() const
+{
+ if (!mathcursor)
+ return 0;
+ return mathcursor->formula()->view();
+}
+
+
int MathInset::height() const
{
return ascent() + descent();
return os;
}
-
-Dialogs & getDialogs()
-{
- return mathcursor->formula()->view()->owner()->getDialogs();
-}
virtual string fileInsetLabel() const { return "Formula"; }
/// usually the latex name
virtual string name() const;
+
+protected:
+ /// a dirty hack
+ BufferView * view() const;
};
std::ostream & operator<<(std::ostream &, MathAtom const &);
// initialize math
void initMath();
-/// here to ssave a few includes in the insets
-class Dialogs;
-Dialogs & getDialogs();
-
#endif
space_ = (space_ + 1) % (nSpace - 2);
}
+
void MathSpaceInset::validate(LaTeXFeatures & features) const
{
if (space_ >= 0 && space_< nSpace) {