-
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
delete[] item;
}
- void push(MathedXIter ** a) {
- *a = &item[i++];
+ MathedXIter * push() {
+ return &item[i++];
}
MathedXIter * pop() {
macro_mode = false;
selection = false; // not SelClear() ?
mathstk.Reset();
- mathstk.push(&cursor);
+ cursor = mathstk.push();
par = p;
cursor->SetData(par);
}
return result;
p->setArgumentIdx(p->getMaxArgumentIdx());
- mathstk.push(&cursor);
+ cursor = mathstk.push();
cursor->SetData(p);
cursor->GoLast();
}
MathParInset * p = cursor->GetActiveInset();
if (!p)
return false;
- mathstk.push(&cursor);
+ cursor = mathstk.push();
cursor->SetData(p);
return true;
}
return cursor->Next();
}
p->setArgumentIdx(0);
- mathstk.push(&cursor);
+ cursor = mathstk.push();
cursor->SetData(p);
result = true;
} else
lastcode = LM_TC_MIN;
mathstk.Reset();
- mathstk.push(&cursor);
+ cursor = mathstk.push();
cursor->SetData(par);
cursor->fitCoord(x, 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;
MacroModeClose();
clearLastCode();
mathstk.Reset();
- mathstk.push(&cursor);
+ cursor = mathstk.push();
cursor->GoBegin();
}
MacroModeClose();
clearLastCode();
mathstk.Reset();
- mathstk.push(&cursor);
+ cursor = mathstk.push();
cursor->GoLast();
}
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;
}