mirror of
https://github.com/UpsilonNumworks/Upsilon.git
synced 2026-03-23 15:50:49 +01:00
39 lines
984 B
C++
39 lines
984 B
C++
#include "layout_cursor.h"
|
|
#include "layout_reference.h"
|
|
#include <stdio.h>
|
|
|
|
/* Comparison */
|
|
|
|
bool LayoutCursor::isEquivalentTo(LayoutCursor cursor) {
|
|
assert(isDefined());
|
|
assert(cursor.isDefined());
|
|
return middleLeftPoint() == cursor.middleLeftPoint();
|
|
}
|
|
|
|
/* Position */
|
|
|
|
int LayoutCursor::middleLeftPoint() {
|
|
int layoutOrigin = layoutReference().absoluteOrigin();
|
|
return layoutOrigin;
|
|
}
|
|
|
|
/* Move */
|
|
|
|
void LayoutCursor::moveLeft(bool * shouldRecomputeLayout) {
|
|
layoutReference().castedNode()->moveCursorLeft(this, shouldRecomputeLayout);
|
|
}
|
|
|
|
void LayoutCursor::moveRight(bool * shouldRecomputeLayout) {
|
|
layoutReference().castedNode()->moveCursorRight(this, shouldRecomputeLayout);
|
|
}
|
|
|
|
void LayoutCursor::moveAbove(bool * shouldRecomputeLayout) {
|
|
layoutReference().castedNode()->moveCursorUp(this, shouldRecomputeLayout);
|
|
}
|
|
|
|
void LayoutCursor::moveUnder(bool * shouldRecomputeLayout) {
|
|
layoutReference().castedNode()->moveCursorDown(this, shouldRecomputeLayout);
|
|
}
|
|
|
|
|