mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-13 06:20:28 +00:00
mathed40.diff
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@1665 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
7e49d156ca
commit
37603745aa
@ -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>
|
2001-03-01 Lars Gullik Bjřnnes <larsbj@trylle.birdstep.com>
|
||||||
|
|
||||||
* math_macrotemplate.C (update): use MathMacro::getArg, and
|
* math_macrotemplate.C (update): use MathMacro::getArg, and
|
||||||
|
@ -74,8 +74,8 @@ MathedInset * MathMacro::Clone()
|
|||||||
|
|
||||||
void MathMacro::Metrics()
|
void MathMacro::Metrics()
|
||||||
{
|
{
|
||||||
if (args_.size() > 0)
|
for (int i = 0; i < args_.size(); ++i)
|
||||||
tmplate_->update(*this);
|
tmplate_->args_[i] = getArg(i);
|
||||||
tmplate_->SetStyle(size());
|
tmplate_->SetStyle(size());
|
||||||
tmplate_->Metrics();
|
tmplate_->Metrics();
|
||||||
width = tmplate_->Width();
|
width = tmplate_->Width();
|
||||||
|
@ -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)
|
void MathMacroTemplate::WriteDef(ostream & os, bool fragile)
|
||||||
{
|
{
|
||||||
os << "\n\\newcommand{\\" << name << "}";
|
os << "\n\\newcommand{\\" << name << "}";
|
||||||
@ -159,6 +151,13 @@ MathParInset * MathMacroTemplate::getMacroPar(int i) const
|
|||||||
return 0;
|
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)
|
void MathMacroTemplate::SetMacroFocus(int &idx, int x, int y)
|
||||||
{
|
{
|
||||||
|
@ -43,12 +43,11 @@ public:
|
|||||||
///
|
///
|
||||||
MathParInset * getMacroPar(int) const;
|
MathParInset * getMacroPar(int) const;
|
||||||
///
|
///
|
||||||
|
void setMacroPar(int, MathedArray const &);
|
||||||
|
///
|
||||||
void SetMacroFocus(int &, int, int);
|
void SetMacroFocus(int &, int, int);
|
||||||
///
|
///
|
||||||
void setEditMode(bool);
|
void setEditMode(bool);
|
||||||
|
|
||||||
/// Replace the appropriate arguments with a specific macro's data
|
|
||||||
void update(MathMacro const & m);
|
|
||||||
private:
|
private:
|
||||||
/// Are we in edit mode or not?
|
/// Are we in edit mode or not?
|
||||||
bool edit_;
|
bool edit_;
|
||||||
|
Loading…
Reference in New Issue
Block a user