]> git.lyx.org Git - features.git/commitdiff
clean my tree
authorAndré Pönitz <poenitz@gmx.net>
Tue, 11 Mar 2003 09:25:47 +0000 (09:25 +0000)
committerAndré Pönitz <poenitz@gmx.net>
Tue, 11 Mar 2003 09:25:47 +0000 (09:25 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@6441 a592a061-630c-0410-9148-cb99ea01b6c8

src/mathed/formulabase.C
src/mathed/math_gridinset.C
src/mathed/math_inset.C
src/mathed/math_inset.h
src/mathed/math_spaceinset.C

index 03ec5ea31289c103462974c84f1492262eaee560..4bc566a1e454bead082c1107350042b710d72c28 100644 (file)
@@ -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) {
index 5b05e54b98f10a59cb39a3f399f7a4c43e6b00ff..9798536ab90f0fa42fb1f251e688ea87fc78ce88 100644 (file)
@@ -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);
index 065408881be4c724c456001a489c8c67b86bc039..4c8038cc09056a19607f53c389cc1d50a6d849ae 100644 (file)
 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();
-}
index 22dd39c60edded78df8f0e4b0e5f4a9564e23b34..ed95d8d3e2f60d0c71808647e522ae44664fbc6f 100644 (file)
@@ -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
index 168234db7d790f7d3b802a2b8e5b38b04a755555..d2d2232595e995ec7bfcbdc1ed698ea61f51dc68 100644 (file)
@@ -83,6 +83,7 @@ void MathSpaceInset::incSpace()
        space_ = (space_ + 1) % (nSpace - 2);
 }
 
+
 void MathSpaceInset::validate(LaTeXFeatures & features) const
 {
        if (space_ >= 0 && space_< nSpace) {