mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-25 10:58:52 +00:00
mathed42.diff
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@1685 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
31e8745667
commit
08825145ee
@ -1,10 +1,12 @@
|
||||
|
||||
2001-03-06 André Pönitz <poenitz@htwm.de>
|
||||
* array.[Ch]: factor out deep_copy,
|
||||
remove third argument from raw_pointer_insert
|
||||
|
||||
* mathiter.[Ch]: remove unused function Clear()
|
||||
|
||||
* mathcursor.C: change signature of MathStackXIter:push()
|
||||
whitespace changes
|
||||
|
||||
2001-03-04 André Pönitz <poenitz@htwm.de>
|
||||
* math_macrotemplate.[Ch]:
|
||||
math_macro.C: move update() functionality to the macro
|
||||
|
@ -80,8 +80,8 @@ struct MathStackXIter {
|
||||
delete[] item;
|
||||
}
|
||||
|
||||
void push(MathedXIter ** a) {
|
||||
*a = &item[i++];
|
||||
MathedXIter * push() {
|
||||
return &item[i++];
|
||||
}
|
||||
|
||||
MathedXIter * pop() {
|
||||
@ -141,7 +141,7 @@ void MathedCursor::SetPar(MathParInset * p)
|
||||
macro_mode = false;
|
||||
selection = false; // not SelClear() ?
|
||||
mathstk.Reset();
|
||||
mathstk.push(&cursor);
|
||||
cursor = mathstk.push();
|
||||
par = p;
|
||||
cursor->SetData(par);
|
||||
}
|
||||
@ -231,7 +231,7 @@ bool MathedCursor::Left(bool sel)
|
||||
return result;
|
||||
|
||||
p->setArgumentIdx(p->getMaxArgumentIdx());
|
||||
mathstk.push(&cursor);
|
||||
cursor = mathstk.push();
|
||||
cursor->SetData(p);
|
||||
cursor->GoLast();
|
||||
}
|
||||
@ -259,7 +259,7 @@ bool MathedCursor::Push()
|
||||
MathParInset * p = cursor->GetActiveInset();
|
||||
if (!p)
|
||||
return false;
|
||||
mathstk.push(&cursor);
|
||||
cursor = mathstk.push();
|
||||
cursor->SetData(p);
|
||||
return true;
|
||||
}
|
||||
@ -300,7 +300,7 @@ bool MathedCursor::Right(bool sel)
|
||||
return cursor->Next();
|
||||
}
|
||||
p->setArgumentIdx(0);
|
||||
mathstk.push(&cursor);
|
||||
cursor = mathstk.push();
|
||||
cursor->SetData(p);
|
||||
result = true;
|
||||
} else
|
||||
@ -331,7 +331,7 @@ void MathedCursor::SetPos(int x, int y)
|
||||
|
||||
lastcode = LM_TC_MIN;
|
||||
mathstk.Reset();
|
||||
mathstk.push(&cursor);
|
||||
cursor = mathstk.push();
|
||||
cursor->SetData(par);
|
||||
cursor->fitCoord(x, y);
|
||||
|
||||
@ -340,7 +340,7 @@ void MathedCursor::SetPos(int x, int y)
|
||||
MathParInset * p = cursor->GetActiveInset();
|
||||
if (p->Inside(x, y)) {
|
||||
p->SetFocus(x, y);
|
||||
mathstk.push(&cursor);
|
||||
cursor = mathstk.push();
|
||||
cursor->SetData(p);
|
||||
cursor->fitCoord(x, y);
|
||||
continue;
|
||||
@ -362,7 +362,7 @@ void MathedCursor::Home()
|
||||
MacroModeClose();
|
||||
clearLastCode();
|
||||
mathstk.Reset();
|
||||
mathstk.push(&cursor);
|
||||
cursor = mathstk.push();
|
||||
cursor->GoBegin();
|
||||
}
|
||||
|
||||
@ -373,7 +373,7 @@ void MathedCursor::End()
|
||||
MacroModeClose();
|
||||
clearLastCode();
|
||||
mathstk.Reset();
|
||||
mathstk.push(&cursor);
|
||||
cursor = mathstk.push();
|
||||
cursor->GoLast();
|
||||
}
|
||||
|
||||
@ -655,24 +655,24 @@ bool MathedCursor::Down(bool sel)
|
||||
|
||||
result = cursor->Down();
|
||||
if (!result && cursor->getPar()) {
|
||||
MathParInset * p= cursor->getPar();
|
||||
if (p->GetType() == LM_OT_SCRIPT) {
|
||||
MathedXIter * cx = mathstk.Item(1);
|
||||
bool is_up = (cx->GetChar() == LM_TC_UP);
|
||||
cursor = mathstk.pop();
|
||||
cursor->Next();
|
||||
result = (is_up) ? true: Down();
|
||||
} else {
|
||||
result = (p->getArgumentIdx() < p->getMaxArgumentIdx());
|
||||
if (result) {
|
||||
p->setArgumentIdx(p->getArgumentIdx() + 1);
|
||||
cursor->SetData(p);
|
||||
}
|
||||
}
|
||||
if (!result && !mathstk.Empty()) {
|
||||
cursor = mathstk.pop();
|
||||
return Down(sel);
|
||||
}
|
||||
MathParInset * p= cursor->getPar();
|
||||
if (p->GetType() == LM_OT_SCRIPT) {
|
||||
MathedXIter * cx = mathstk.Item(1);
|
||||
bool is_up = (cx->GetChar() == LM_TC_UP);
|
||||
cursor = mathstk.pop();
|
||||
cursor->Next();
|
||||
result = (is_up) ? true : Down();
|
||||
} else {
|
||||
result = (p->getArgumentIdx() < p->getMaxArgumentIdx());
|
||||
if (result) {
|
||||
p->setArgumentIdx(p->getArgumentIdx() + 1);
|
||||
cursor->SetData(p);
|
||||
}
|
||||
}
|
||||
if (!result && !mathstk.Empty()) {
|
||||
cursor = mathstk.pop();
|
||||
return Down(sel);
|
||||
}
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user