LayoutCursor

This commit is contained in:
Léa Saviot
2018-06-26 15:11:04 +02:00
parent f8d08f8599
commit b58ab0a8ca
8 changed files with 49 additions and 27 deletions

View File

@@ -13,26 +13,26 @@ bool LayoutCursor::isEquivalentTo(LayoutCursor cursor) {
/* Position */
int LayoutCursor::middleLeftPoint() {
int layoutOrigin = m_layoutPointer.absoluteOrigin();
int layoutOrigin = layoutReference().absoluteOrigin();
return layoutOrigin;
}
/* Move */
void LayoutCursor::moveLeft(bool * shouldRecomputeLayout) {
m_layoutPointer.moveCursorLeft(this, shouldRecomputeLayout);
layoutReference().node()->moveCursorLeft(this, shouldRecomputeLayout);
}
void LayoutCursor::moveRight(bool * shouldRecomputeLayout) {
m_layoutPointer.moveCursorRight(this, shouldRecomputeLayout);
layoutReference().node()->moveCursorRight(this, shouldRecomputeLayout);
}
void LayoutCursor::moveAbove(bool * shouldRecomputeLayout) {
m_layoutPointer.moveCursorUp(this, shouldRecomputeLayout);
layoutReference().node()->moveCursorUp(this, shouldRecomputeLayout);
}
void LayoutCursor::moveUnder(bool * shouldRecomputeLayout) {
m_layoutPointer.moveCursorDown(this, shouldRecomputeLayout);
layoutReference().node()->moveCursorDown(this, shouldRecomputeLayout);
}