X-Git-Url: http://git.nikiroo.be/?a=blobdiff_plain;f=src%2Fjexer%2FTWindow.java;fp=src%2Fjexer%2FTWindow.java;h=e50e16fd1c5a9eec4f6b45c4e836a5d31b6bbdec;hb=978a5d8f650488c8840d54ccc3032599ca50a084;hp=a4a9c23a815d602e2525b07f28bfbfcd921744a7;hpb=af56159c6460ab42f06e30d4e677c67f64e3ea8e;p=fanfix.git diff --git a/src/jexer/TWindow.java b/src/jexer/TWindow.java index a4a9c23..e50e16f 100644 --- a/src/jexer/TWindow.java +++ b/src/jexer/TWindow.java @@ -185,6 +185,15 @@ public class TWindow extends TWidget { */ protected TStatusBar statusBar = null; + /** + * A window may request that TApplication NOT draw the mouse cursor over + * it by setting this to true. This is currently only used within Jexer + * by TTerminalWindow so that only the bottom-most instance of nested + * Jexer's draws the mouse within its application window. But perhaps + * other applications can use it, so public getter/setter is provided. + */ + private boolean hideMouse = false; + // ------------------------------------------------------------------------ // Constructors ----------------------------------------------------------- // ------------------------------------------------------------------------ @@ -1346,4 +1355,26 @@ public class TWindow extends TWidget { } } + /** + * Returns true if this window does not want the application-wide mouse + * cursor drawn over it. + * + * @return true if this window does not want the application-wide mouse + * cursor drawn over it + */ + public final boolean hasHiddenMouse() { + return hideMouse; + } + + /** + * Set request to prevent the application-wide mouse cursor from being + * drawn over this window. + * + * @param hideMouse if true, this window does not want the + * application-wide mouse cursor drawn over it + */ + public final void setHiddenMouse(final boolean hideMouse) { + this.hideMouse = hideMouse; + } + }