X-Git-Url: http://git.nikiroo.be/?a=blobdiff_plain;f=src%2Fjexer%2Fbackend%2FLogicalScreen.java;h=bfe1c7226700df9993d0dd25010b13ebe9c7e54f;hb=3e0743556d1f31723a11a6019b5c2b018b4b2104;hp=8432e4eae526f8a74f395303ebb8fbd3d5f3c09e;hpb=d79f1f31b1c036712b4e7f0bbfde980f212c3a3a;p=nikiroo-utils.git diff --git a/src/jexer/backend/LogicalScreen.java b/src/jexer/backend/LogicalScreen.java index 8432e4e..bfe1c72 100644 --- a/src/jexer/backend/LogicalScreen.java +++ b/src/jexer/backend/LogicalScreen.java @@ -229,6 +229,21 @@ public class LogicalScreen implements Screen { return attr; } + /** + * Get the cell at one location. + * + * @param x column coordinate. 0 is the left-most column. + * @param y row coordinate. 0 is the top-most row. + * @return the character + attributes + */ + public Cell getCharXY(final int x, final int y) { + Cell cell = new Cell(); + if ((x >= 0) && (x < width) && (y >= 0) && (y < height)) { + cell.setTo(logical[x][y]); + } + return cell; + } + /** * Set the attributes at one location. * @@ -771,6 +786,33 @@ public class LogicalScreen implements Screen { cursorVisible = false; } + /** + * Get the cursor visibility. + * + * @return true if the cursor is visible + */ + public boolean isCursorVisible() { + return cursorVisible; + } + + /** + * Get the cursor X position. + * + * @return the cursor x column position + */ + public int getCursorX() { + return cursorX; + } + + /** + * Get the cursor Y position. + * + * @return the cursor y row position + */ + public int getCursorY() { + return cursorY; + } + /** * Set the window title. Default implementation does nothing. *