mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-10 20:04:46 +00:00
clean my tree
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@6441 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
ab978c8b6c
commit
646d6a7775
@ -652,7 +652,7 @@ dispatch_result InsetFormulaBase::localDispatch(FuncRequest const & cmd)
|
||||
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;
|
||||
@ -664,11 +664,11 @@ dispatch_result InsetFormulaBase::localDispatch(FuncRequest const & cmd)
|
||||
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) {
|
||||
|
@ -5,6 +5,7 @@
|
||||
#include "funcrequest.h"
|
||||
#include "frontends/Painter.h"
|
||||
#include "debug.h"
|
||||
#include "Lsstream.h"
|
||||
|
||||
|
||||
#include "insets/mailinset.h"
|
||||
@ -27,8 +28,12 @@ public:
|
||||
///
|
||||
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:
|
||||
@ -1003,17 +1008,13 @@ dispatch_result MathGridInset::dispatch
|
||||
{
|
||||
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);
|
||||
|
@ -34,6 +34,14 @@
|
||||
using std::ostream;
|
||||
|
||||
|
||||
BufferView * MathInset::view() const
|
||||
{
|
||||
if (!mathcursor)
|
||||
return 0;
|
||||
return mathcursor->formula()->view();
|
||||
}
|
||||
|
||||
|
||||
int MathInset::height() const
|
||||
{
|
||||
return ascent() + descent();
|
||||
@ -297,8 +305,3 @@ ostream & operator<<(ostream & os, MathAtom const & at)
|
||||
return os;
|
||||
}
|
||||
|
||||
|
||||
Dialogs & getDialogs()
|
||||
{
|
||||
return mathcursor->formula()->view()->owner()->getDialogs();
|
||||
}
|
||||
|
@ -299,6 +299,10 @@ public:
|
||||
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 &);
|
||||
@ -311,8 +315,4 @@ MathArray asArray(string const & str);
|
||||
// initialize math
|
||||
void initMath();
|
||||
|
||||
/// here to ssave a few includes in the insets
|
||||
class Dialogs;
|
||||
Dialogs & getDialogs();
|
||||
|
||||
#endif
|
||||
|
@ -83,6 +83,7 @@ void MathSpaceInset::incSpace()
|
||||
space_ = (space_ + 1) % (nSpace - 2);
|
||||
}
|
||||
|
||||
|
||||
void MathSpaceInset::validate(LaTeXFeatures & features) const
|
||||
{
|
||||
if (space_ >= 0 && space_< nSpace) {
|
||||
|
Loading…
Reference in New Issue
Block a user