mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-12-27 06:19:36 +00:00
move things around
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@2460 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
20effa2eb1
commit
c9c3b9b447
@ -3,10 +3,8 @@
|
||||
#endif
|
||||
|
||||
#include "math_inset.h"
|
||||
#include "math_charinset.h"
|
||||
#include "debug.h"
|
||||
#include "array.h"
|
||||
#include "math_scriptinset.h"
|
||||
#include "mathed/support.h"
|
||||
|
||||
using std::ostream;
|
||||
@ -84,12 +82,6 @@ void MathArray::insert(int pos, MathInset * p)
|
||||
}
|
||||
|
||||
|
||||
void MathArray::insert(int pos, unsigned char b, MathTextCodes t)
|
||||
{
|
||||
bf_.insert(begin() + pos, new MathCharInset(b, t));
|
||||
}
|
||||
|
||||
|
||||
void MathArray::insert(int pos, MathArray const & array)
|
||||
{
|
||||
bf_.insert(begin() + pos, array.begin(), array.end());
|
||||
@ -103,12 +95,6 @@ void MathArray::push_back(MathInset * p)
|
||||
}
|
||||
|
||||
|
||||
void MathArray::push_back(unsigned char b, MathTextCodes c)
|
||||
{
|
||||
insert(size(), b, c);
|
||||
}
|
||||
|
||||
|
||||
void MathArray::push_back(MathArray const & array)
|
||||
{
|
||||
insert(size(), array);
|
||||
|
@ -19,12 +19,8 @@
|
||||
#include <vector>
|
||||
#include <iosfwd>
|
||||
|
||||
#include "mathed/support.h"
|
||||
#include "math_defs.h"
|
||||
|
||||
class MathInset;
|
||||
class MathMacro;
|
||||
class Painter;
|
||||
class LaTeXFeatures;
|
||||
|
||||
#ifdef __GNUG__
|
||||
@ -72,8 +68,6 @@ public:
|
||||
///
|
||||
void insert(int pos, MathInset * inset);
|
||||
///
|
||||
void insert(int pos, unsigned char, MathTextCodes);
|
||||
///
|
||||
void insert(int pos, MathArray const &);
|
||||
|
||||
///
|
||||
@ -89,8 +83,6 @@ public:
|
||||
///
|
||||
void push_back(MathInset * inset);
|
||||
///
|
||||
void push_back(unsigned char, MathTextCodes);
|
||||
///
|
||||
void push_back(MathArray const &);
|
||||
///
|
||||
void pop_back();
|
||||
|
@ -1,5 +1,6 @@
|
||||
#include "math_bigopinset.h"
|
||||
#include "mathed/math_parser.h"
|
||||
#include "mathed/support.h"
|
||||
#include "support/LOstream.h"
|
||||
|
||||
|
||||
|
@ -6,6 +6,7 @@
|
||||
// larger in displayed formulae and take limits
|
||||
|
||||
#include "math_diminset.h"
|
||||
#include "LString.h"
|
||||
|
||||
struct latexkeys;
|
||||
|
||||
|
@ -31,6 +31,7 @@
|
||||
#include "math_cursor.h"
|
||||
#include "math_arrayinset.h"
|
||||
#include "math_bigopinset.h"
|
||||
#include "math_charinset.h"
|
||||
#include "math_symbolinset.h"
|
||||
#include "math_decorationinset.h"
|
||||
#include "math_deliminset.h"
|
||||
@ -417,7 +418,7 @@ void MathCursor::insert(char c, MathTextCodes t)
|
||||
}
|
||||
}
|
||||
|
||||
array().insert(pos(), c, t);
|
||||
array().insert(pos(), new MathCharInset(c, t));
|
||||
posRight();
|
||||
}
|
||||
|
||||
|
@ -4,6 +4,7 @@
|
||||
|
||||
#include "math_diminset.h"
|
||||
#include "math_defs.h"
|
||||
#include "LString.h"
|
||||
|
||||
#ifdef __GNUG__
|
||||
#pragma interface
|
||||
|
@ -1,5 +1,6 @@
|
||||
#include "math_funcliminset.h"
|
||||
#include "mathed/math_parser.h"
|
||||
#include "mathed/support.h"
|
||||
#include "support/LOstream.h"
|
||||
|
||||
|
||||
|
@ -3,6 +3,7 @@
|
||||
#define MATH_GRID_H
|
||||
|
||||
#include "math_nestinset.h"
|
||||
#include "LString.h"
|
||||
|
||||
#ifdef __GNUG__
|
||||
#pragma interface
|
||||
|
@ -48,11 +48,13 @@ MathInset * MathMacro::clone() const
|
||||
return new MathMacro(*this);
|
||||
}
|
||||
|
||||
string const & MathMacro::name() const
|
||||
|
||||
const char * MathMacro::name() const
|
||||
{
|
||||
return tmplate_->name();
|
||||
return tmplate_->name().c_str();
|
||||
}
|
||||
|
||||
|
||||
void MathMacro::metrics(MathStyles st) const
|
||||
{
|
||||
if (mathcursor && mathcursor->isInside(this)) {
|
||||
|
@ -69,7 +69,7 @@ private:
|
||||
///
|
||||
void operator=(MathMacro const &);
|
||||
///
|
||||
string const & name() const;
|
||||
char const * name() const;
|
||||
|
||||
///
|
||||
MathMacroTemplate const * const tmplate_;
|
||||
|
@ -3,6 +3,7 @@
|
||||
#define MATH_MACROTEMPLATE_H
|
||||
|
||||
#include "math_nestinset.h"
|
||||
#include "LString.h"
|
||||
|
||||
#ifdef __GNUG__
|
||||
#pragma interface
|
||||
|
@ -5,6 +5,7 @@
|
||||
#include <vector>
|
||||
|
||||
#include "math_matrixinset.h"
|
||||
#include "support.h"
|
||||
#include "debug.h"
|
||||
#include "support/LOstream.h"
|
||||
#include "Painter.h"
|
||||
|
@ -148,15 +148,6 @@ void MathNestInset::dump() const
|
||||
}
|
||||
|
||||
|
||||
void MathNestInset::push_back(unsigned char ch, MathTextCodes fcode)
|
||||
{
|
||||
if (nargs())
|
||||
cells_.back().data_.push_back(ch, fcode);
|
||||
else
|
||||
lyxerr << "can't push without a cell\n";
|
||||
}
|
||||
|
||||
|
||||
void MathNestInset::push_back(MathInset * p)
|
||||
{
|
||||
if (nargs())
|
||||
|
@ -62,8 +62,6 @@ public:
|
||||
///
|
||||
void push_back(MathInset *);
|
||||
///
|
||||
void push_back(unsigned char ch, MathTextCodes fcode);
|
||||
///
|
||||
void dump() const;
|
||||
|
||||
///
|
||||
|
@ -30,6 +30,7 @@
|
||||
#include "math_inset.h"
|
||||
#include "math_arrayinset.h"
|
||||
#include "math_bigopinset.h"
|
||||
#include "math_charinset.h"
|
||||
#include "math_dotsinset.h"
|
||||
#include "math_decorationinset.h"
|
||||
#include "math_deliminset.h"
|
||||
@ -553,7 +554,7 @@ void mathed_parse_into(MathArray & array, unsigned flags)
|
||||
|
||||
case LM_TK_ALPHA:
|
||||
if (!isspace(yylval.i) || yyvarcode == LM_TC_TEXTRM)
|
||||
array.push_back(yylval.i, yyvarcode);
|
||||
array.push_back(new MathCharInset(yylval.i, yyvarcode));
|
||||
break;
|
||||
|
||||
case LM_TK_ARGUMENT: {
|
||||
@ -564,11 +565,11 @@ void mathed_parse_into(MathArray & array, unsigned flags)
|
||||
}
|
||||
|
||||
case LM_TK_SPECIAL:
|
||||
array.push_back(yylval.i, LM_TC_SPECIAL);
|
||||
array.push_back(new MathCharInset(yylval.i, LM_TC_SPECIAL));
|
||||
break;
|
||||
|
||||
case LM_TK_STR:
|
||||
array.push_back(yylval.i, LM_TC_CONST);
|
||||
array.push_back(new MathCharInset(yylval.i, LM_TC_CONST));
|
||||
break;
|
||||
|
||||
case LM_TK_OPEN:
|
||||
@ -576,7 +577,7 @@ void mathed_parse_into(MathArray & array, unsigned flags)
|
||||
if (flags & FLAG_BRACE)
|
||||
flags &= ~FLAG_BRACE;
|
||||
else
|
||||
array.push_back('{', LM_TC_TEX);
|
||||
array.push_back(new MathCharInset('{', LM_TC_TEX));
|
||||
break;
|
||||
|
||||
case LM_TK_CLOSE:
|
||||
@ -594,18 +595,18 @@ void mathed_parse_into(MathArray & array, unsigned flags)
|
||||
if (brace == 0 && (flags & FLAG_BRACE_LAST))
|
||||
flags |= FLAG_LEAVE;
|
||||
else
|
||||
array.push_back('}', LM_TC_TEX);
|
||||
array.push_back(new MathCharInset('}', LM_TC_TEX));
|
||||
break;
|
||||
|
||||
case '[':
|
||||
array.push_back('[', LM_TC_CONST);
|
||||
array.push_back(new MathCharInset('[', LM_TC_CONST));
|
||||
break;
|
||||
|
||||
case ']':
|
||||
if (flags & FLAG_BRACK_END)
|
||||
flags |= FLAG_LEAVE;
|
||||
else
|
||||
array.push_back(']', LM_TC_CONST);
|
||||
array.push_back(new MathCharInset(']', LM_TC_CONST));
|
||||
break;
|
||||
|
||||
case '^':
|
||||
@ -662,7 +663,7 @@ void mathed_parse_into(MathArray & array, unsigned flags)
|
||||
break;
|
||||
|
||||
case LM_TK_BOP:
|
||||
array.push_back(yylval.i, LM_TC_BOP);
|
||||
array.push_back(new MathCharInset(yylval.i, LM_TC_BOP));
|
||||
break;
|
||||
|
||||
case LM_TK_SPACE:
|
||||
|
@ -4,6 +4,7 @@
|
||||
|
||||
#include "math_scriptinset.h"
|
||||
#include "support/LOstream.h"
|
||||
#include "support.h"
|
||||
|
||||
|
||||
MathScriptInset::MathScriptInset()
|
||||
@ -239,8 +240,8 @@ void MathScriptInset::metrics(MathStyles st) const
|
||||
dx0_ = (width_ - xcell(0).width()) / 2;
|
||||
dx1_ = (width_ - xcell(1).width()) / 2;
|
||||
} else {
|
||||
int asc;
|
||||
int des;
|
||||
int asc = 0;
|
||||
int des = 0;
|
||||
int wid = 0;
|
||||
mathed_char_height(LM_TC_VAR, st, 'I', asc, des);
|
||||
if (symbol_) {
|
||||
|
@ -3,6 +3,7 @@
|
||||
#endif
|
||||
|
||||
#include "math_spaceinset.h"
|
||||
#include "support.h"
|
||||
#include "LColor.h"
|
||||
#include "Painter.h"
|
||||
#include "support/LOstream.h"
|
||||
|
@ -1,5 +1,6 @@
|
||||
#include "math_symbolinset.h"
|
||||
#include "mathed/math_parser.h"
|
||||
#include "math_parser.h"
|
||||
#include "support.h"
|
||||
#include "support/LOstream.h"
|
||||
|
||||
|
||||
|
@ -3,6 +3,7 @@
|
||||
#define MATH_SYMBOLINSET_H
|
||||
|
||||
#include "math_diminset.h"
|
||||
#include "LString.h"
|
||||
|
||||
struct latexkeys;
|
||||
|
||||
|
@ -5,6 +5,7 @@
|
||||
|
||||
#include <iosfwd>
|
||||
#include "array.h"
|
||||
#include "math_defs.h"
|
||||
|
||||
#ifdef __GNUG__
|
||||
#pragma interface
|
||||
|
Loading…
Reference in New Issue
Block a user