X-Git-Url: http://matita.cs.unibo.it/gitweb/?a=blobdiff_plain;f=helm%2FDEVEL%2Fmathml_editor%2Fsrc%2Fspecial.cc;fp=helm%2FDEVEL%2Fmathml_editor%2Fsrc%2Fspecial.cc;h=d794ffd81270e0afbafe0da329c59eeaab90229c;hb=89262281b6e83bd2321150f81f1a0583645eb0c8;hp=0000000000000000000000000000000000000000;hpb=b1fb6b8e1767d775bc452303629e95941d142bea;p=helm.git diff --git a/helm/DEVEL/mathml_editor/src/special.cc b/helm/DEVEL/mathml_editor/src/special.cc new file mode 100644 index 000000000..d794ffd81 --- /dev/null +++ b/helm/DEVEL/mathml_editor/src/special.cc @@ -0,0 +1,62 @@ + +#include + +#include "dom.hh" +#include "globals.hh" +#include "TNode.hh" +#include "TToken.hh" + +void finishG(const TNode&); + +void +do_bgroup(const TNode& cursor) +{ + TNode parent = cursor.parent(); + if (parent.isM("matrix") || parent.isM("pmatrix") || + parent.isM("bordermatrix") || parent.isM("cases")) + { + TNode row = cursor.create("row"); + TNode cell = cursor.create("cell"); + TNode g = cursor.createG(); + row.append(cell); + cell.append(g); + g.append(cursor); + parent.append(row); + } + else + { + TNode g = cursor.createG(); + cursor.replace(g); + g.append(cursor); + } +} + + + + +void +do_apostrophe(const TNode& cursor) +{ +} + +void +do_control(const TNode& cursor, const std::string& name) +{ +} + +void +do_other(const TNode& cursor, const std::string& s) +{ + switch (s[0]) + { + case '\'': do_apostrophe(cursor); break; + default: + if (isUnicodeDigit(s[0])) do_number(cursor, s); + else do_control(cursor, s); + } +} + +void +dispatch(const TNode& cursor, const TToken& token) +{ +