mirror of
https://github.com/UpsilonNumworks/Upsilon.git
synced 2026-03-24 08:10:50 +01:00
36 lines
1.1 KiB
C++
36 lines
1.1 KiB
C++
#ifndef LAYOUT_CURSOR_REFERENCE_H
|
|
#define LAYOUT_CURSOR_REFERENCE_H
|
|
|
|
#include "layout_node.h"
|
|
#include "layout_reference.h"
|
|
|
|
class LayoutCursor;
|
|
|
|
template <typename T>
|
|
class LayoutCursorReference : public LayoutReference<T> {
|
|
public:
|
|
//using LayoutReference<T>::LayoutReference;
|
|
LayoutCursorReference(LayoutReference<T> * r) :
|
|
LayoutReference<T>(r->node())
|
|
{
|
|
}
|
|
|
|
LayoutCursorReference(const LayoutCursorReference & r) :
|
|
LayoutReference<T>(r.node())
|
|
{
|
|
}
|
|
|
|
// Tree navigation
|
|
|
|
/* We cannot have LayoutCursor cursorLeftOf(LayoutCursor cursor) because of
|
|
* circular header dependency */
|
|
virtual void moveCursorLeft(LayoutCursor * cursor, bool * shouldRecomputeLayout) {}
|
|
virtual void moveCursorRight(LayoutCursor * cursor, bool * shouldRecomputeLayout) {}
|
|
virtual void moveCursorUp(LayoutCursor * cursor, bool * shouldRecomputeLayout, bool equivalentPositionVisited = false) {}
|
|
virtual void moveCursorDown(LayoutCursor * cursor, bool * shouldRecomputeLayout, bool equivalentPositionVisited = false) {}
|
|
};
|
|
|
|
typedef LayoutCursorReference<LayoutNode> LayoutPointer;
|
|
|
|
#endif
|