On Sun, Mar 27, 2005 at 07:36:40PM +0300, Martin Vermeer wrote: > On Sun, Mar 27, 2005 at 05:57:21PM +0200, Georg Baum wrote: > > Happy Easter everybody!
... > > BTW, I discovered that MathAmsArrayInset, MathSubstackInset and > > MathArrayInset lack a validate method which requires amsmath. I attached > > a patch that fixes this. This is going in unless somebody objects. > > Great! > > Once you're at it... let's also add an infoize method, so they appear in > the minibuffer (to construe that as a UI bugfix rather than a new > feature, ask my lawyer :-/ ). And key bindings/shortcuts. As simple as > supporting "math-insert \pmatrix" etc. Like this (for amsarray only for now)... Works too. - Martin
Index: math_amsarrayinset.C
===================================================================
RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/mathed/math_amsarrayinset.C,v
retrieving revision 1.25
diff -u -r1.25 math_amsarrayinset.C
--- math_amsarrayinset.C 23 Nov 2004 23:04:49 -0000 1.25
+++ math_amsarrayinset.C 28 Mar 2005 18:30:29 -0000
@@ -15,6 +15,7 @@
#include "math_mathmlstream.h"
#include "math_streamstr.h"
#include "math_support.h"
+#include "support/std_ostream.h"
using std::string;
using std::auto_ptr;
@@ -88,6 +89,11 @@
setPosCache(pi, x, y);
}
+
+void MathAMSArrayInset::infoize(std::ostream & os) const
+{
+ os << "Name: " << name_;
+}
void MathAMSArrayInset::write(WriteStream & os) const
{
Index: math_amsarrayinset.h
===================================================================
RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/mathed/math_amsarrayinset.h,v
retrieving revision 1.18
diff -u -r1.18 math_amsarrayinset.h
--- math_amsarrayinset.h 23 Nov 2004 23:04:49 -0000 1.18
+++ math_amsarrayinset.h 28 Mar 2005 18:30:29 -0000
@@ -32,6 +32,8 @@
MathAMSArrayInset const * asAMSArrayInset() const { return this; }
///
+ void infoize(std::ostream & os) const;
+ ///
void write(WriteStream & os) const;
///
void normalize(NormalStream &) const;
pgpsIwrN5DIDb.pgp
Description: PGP signature
