mathed40.diff

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@1665 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Lars Gullik Bjønnes 2001-03-05 10:52:39 +00:00
parent 7e49d156ca
commit 37603745aa
4 changed files with 18 additions and 13 deletions

View File

@ -1,3 +1,10 @@
2001-02-14 André Pönitz <poenitz@htwm.de>
* math_macrotemplate.[Ch]:
math_macro.C: move update() functionality to the macro
* math_rowst.h: split MathedRowSt into "data" and "list"
2001-03-01 Lars Gullik Bjřnnes <larsbj@trylle.birdstep.com>
* math_macrotemplate.C (update): use MathMacro::getArg, and

View File

@ -74,8 +74,8 @@ MathedInset * MathMacro::Clone()
void MathMacro::Metrics()
{
if (args_.size() > 0)
tmplate_->update(*this);
for (int i = 0; i < args_.size(); ++i)
tmplate_->args_[i] = getArg(i);
tmplate_->SetStyle(size());
tmplate_->Metrics();
width = tmplate_->Width();

View File

@ -116,14 +116,6 @@ void MathMacroTemplate::Metrics()
}
void MathMacroTemplate::update(MathMacro const & macro)
{
for (int i = 0; i < nargs_; ++i) {
args_[i] = macro.getArg(i);
}
}
void MathMacroTemplate::WriteDef(ostream & os, bool fragile)
{
os << "\n\\newcommand{\\" << name << "}";
@ -159,6 +151,13 @@ MathParInset * MathMacroTemplate::getMacroPar(int i) const
return 0;
}
void MathMacroTemplate::setMacroPar(int i, MathedArray const & ar)
{
if (i >= 0 && i < nargs_)
args_[i].setData(ar);
}
void MathMacroTemplate::SetMacroFocus(int &idx, int x, int y)
{

View File

@ -43,12 +43,11 @@ public:
///
MathParInset * getMacroPar(int) const;
///
void setMacroPar(int, MathedArray const &);
///
void SetMacroFocus(int &, int, int);
///
void setEditMode(bool);
/// Replace the appropriate arguments with a specific macro's data
void update(MathMacro const & m);
private:
/// Are we in edit mode or not?
bool edit_;