Now that setPosCache() is in Inset, InsetMathDim is not needed anymore: ERASED!

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@18110 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Abdelrazak Younes 2007-04-30 10:31:51 +00:00
parent f98f0d4f73
commit 00e1771f94
14 changed files with 19 additions and 97 deletions

View File

@ -186,7 +186,6 @@ src_mathed_header_files = Split('''
InsetMathDecoration.h InsetMathDecoration.h
InsetMathDelim.h InsetMathDelim.h
InsetMathDiff.h InsetMathDiff.h
InsetMathDim.h
InsetMathDots.h InsetMathDots.h
InsetMathEnv.h InsetMathEnv.h
InsetMathExFunc.h InsetMathExFunc.h
@ -267,7 +266,6 @@ src_mathed_files = Split('''
InsetMathDecoration.cpp InsetMathDecoration.cpp
InsetMathDelim.cpp InsetMathDelim.cpp
InsetMathDiff.cpp InsetMathDiff.cpp
InsetMathDim.cpp
InsetMathDots.cpp InsetMathDots.cpp
InsetMathEnv.cpp InsetMathEnv.cpp
InsetMathExFunc.cpp InsetMathExFunc.cpp

View File

@ -30,17 +30,14 @@
#include <sstream> #include <sstream>
namespace lyx {
using odocstream;
using support::bformat;
using std::string; using std::string;
using std::auto_ptr; using std::auto_ptr;
using std::ostream; using std::ostream;
using std::endl; using std::endl;
namespace lyx {
using support::bformat;
InsetFormulaMacro::InsetFormulaMacro() InsetFormulaMacro::InsetFormulaMacro()
@ -49,7 +46,7 @@ InsetFormulaMacro::InsetFormulaMacro()
InsetFormulaMacro::InsetFormulaMacro InsetFormulaMacro::InsetFormulaMacro
(string const & name, int nargs, string const & type) (docstring const & name, int nargs, docstring const & type)
: InsetMathNest(2), name_(name) : InsetMathNest(2), name_(name)
{ {
MathMacroTable::create(MathAtom(new MathMacroTemplate(name, nargs, type))); MathMacroTable::create(MathAtom(new MathMacroTemplate(name, nargs, type)));

View File

@ -12,7 +12,7 @@
#ifndef MATH_BIGINSET_H #ifndef MATH_BIGINSET_H
#define MATH_BIGINSET_H #define MATH_BIGINSET_H
#include "InsetMathDim.h" #include "InsetMath.h"
#include <string> #include <string>
@ -20,7 +20,7 @@
namespace lyx { namespace lyx {
/// Inset for \\bigl & Co. /// Inset for \\bigl & Co.
class InsetMathBig : public InsetMathDim { class InsetMathBig : public InsetMath {
public: public:
/// ///
InsetMathBig(docstring const & name, docstring const & delim); InsetMathBig(docstring const & name, docstring const & delim);

View File

@ -1,35 +0,0 @@
/**
* \file InsetMathDim.cpp
* This file is part of LyX, the document processor.
* Licence details can be found in the file COPYING.
*
* \author André Pönitz
*
* Full author contact details are available in file CREDITS.
*/
#include <config.h>
#include "InsetMathDim.h"
#include "BufferView.h"
#include "CoordCache.h"
#include "debug.h"
#include "MetricsInfo.h"
namespace lyx {
InsetMathDim::InsetMathDim()
{}
void InsetMathDim::setPosCache(PainterInfo const & pi, int x, int y) const
{
//lyxerr << "InsetMathDim: cache to " << x << " " << y << std::endl;
pi.base.bv->coordCache().insets().add(this, x, y);
}
} // namespace lyx

View File

@ -1,36 +0,0 @@
// -*- C++ -*-
/**
* \file InsetMathDim.h
* This file is part of LyX, the document processor.
* Licence details can be found in the file COPYING.
*
* \author André Pönitz
*
* Full author contact details are available in file CREDITS.
*/
#ifndef MATH_DIMINSET_H
#define MATH_DIMINSET_H
#include <boost/assert.hpp>
#include "InsetMath.h"
namespace lyx {
class PainterInfo;
/// things that need the dimension cache
class InsetMathDim : public InsetMath {
public:
///
InsetMathDim();
///
void setPosCache(PainterInfo const & pi, int x, int y) const;
};
} // namespace lyx
#endif

View File

@ -12,7 +12,7 @@
#ifndef MATH_DOTSINSET_H #ifndef MATH_DOTSINSET_H
#define MATH_DOTSINSET_H #define MATH_DOTSINSET_H
#include "InsetMathDim.h" #include "InsetMath.h"
namespace lyx { namespace lyx {
@ -20,7 +20,7 @@ namespace lyx {
class latexkeys; class latexkeys;
/// The different kinds of ellipsis /// The different kinds of ellipsis
class InsetMathDots : public InsetMathDim { class InsetMathDots : public InsetMath {
public: public:
/// ///
explicit InsetMathDots(latexkeys const * l); explicit InsetMathDots(latexkeys const * l);

View File

@ -1039,7 +1039,7 @@ void InsetMathGrid::doDispatch(Cursor & cur, FuncRequest & cmd)
break; break;
case LFUN_INSET_DIALOG_UPDATE: case LFUN_INSET_DIALOG_UPDATE:
GridInsetMailer(*this).updateDialog(&cur.bv()); // GridInsetMailer(*this).updateDialog(&cur.bv());
break; break;
// insert file functions // insert file functions

View File

@ -16,7 +16,7 @@
#ifndef MATH_MBOXINSET_H #ifndef MATH_MBOXINSET_H
#define MATH_MBOXINSET_H #define MATH_MBOXINSET_H
#include "InsetMathDim.h" #include "InsetMath.h"
#include "Text.h" #include "Text.h"
@ -27,7 +27,7 @@ class BufferView;
// almost a substitute for the real text inset... // almost a substitute for the real text inset...
class InsetMathMBox : public InsetMathDim { class InsetMathMBox : public InsetMath {
public: public:
/// ///
explicit InsetMathMBox(); explicit InsetMathMBox();

View File

@ -983,7 +983,7 @@ void InsetMathNest::doDispatch(Cursor & cur, FuncRequest & cmd)
} }
default: default:
InsetMathDim::doDispatch(cur, cmd); InsetMath::doDispatch(cur, cmd);
break; break;
} }
} }

View File

@ -12,7 +12,7 @@
#ifndef MATH_NESTINSET_H #ifndef MATH_NESTINSET_H
#define MATH_NESTINSET_H #define MATH_NESTINSET_H
#include "InsetMathDim.h" #include "InsetMath.h"
namespace lyx { namespace lyx {
@ -23,7 +23,7 @@ namespace lyx {
single symbol. single symbol.
*/ */
class InsetMathNest : public InsetMathDim { class InsetMathNest : public InsetMath {
public: public:
/// nestinsets have a fixed size to start with /// nestinsets have a fixed size to start with
explicit InsetMathNest(idx_type ncells); explicit InsetMathNest(idx_type ncells);

View File

@ -12,14 +12,14 @@
#ifndef MATH_UNKNOWNINSET_H #ifndef MATH_UNKNOWNINSET_H
#define MATH_UNKNOWNINSET_H #define MATH_UNKNOWNINSET_H
#include "InsetMathDim.h" #include "InsetMath.h"
namespace lyx { namespace lyx {
/// LaTeX names for objects that we really don't know /// LaTeX names for objects that we really don't know
class InsetMathUnknown : public InsetMathDim { class InsetMathUnknown : public InsetMath {
public: public:
/// ///
explicit InsetMathUnknown(docstring const & name, explicit InsetMathUnknown(docstring const & name,

View File

@ -44,8 +44,6 @@ libmathed_la_SOURCES = \
InsetMathDFrac.h \ InsetMathDFrac.h \
InsetMathDiff.cpp \ InsetMathDiff.cpp \
InsetMathDiff.h \ InsetMathDiff.h \
InsetMathDim.cpp \
InsetMathDim.h \
InsetMathDots.cpp \ InsetMathDots.cpp \
InsetMathDots.h \ InsetMathDots.h \
InsetMathEnv.cpp \ InsetMathEnv.cpp \

View File

@ -35,7 +35,7 @@ using std::vector;
/// This class is the value of a macro argument, technically /// This class is the value of a macro argument, technically
/// a wrapper of the cells of MathMacro. /// a wrapper of the cells of MathMacro.
class MathMacroArgumentValue : public InsetMathDim { class MathMacroArgumentValue : public InsetMath {
public: public:
/// ///
MathMacroArgumentValue(MathData const * value, docstring const & macroName) MathMacroArgumentValue(MathData const * value, docstring const & macroName)

View File

@ -13,14 +13,14 @@
#ifndef MATHMACROARGUMENT_H #ifndef MATHMACROARGUMENT_H
#define MATHMACROARGUMENT_H #define MATHMACROARGUMENT_H
#include "InsetMathDim.h" #include "InsetMath.h"
namespace lyx { namespace lyx {
/// A macro argument. /// A macro argument.
class MathMacroArgument : public InsetMathDim { class MathMacroArgument : public InsetMath {
public: public:
/// ///
explicit MathMacroArgument(std::size_t); explicit MathMacroArgument(std::size_t);