X-Git-Url: http://git.nikiroo.be/?a=blobdiff_plain;f=src%2Fjexer%2FTWindow.java;h=b8513c44298e01819e12d2cf5dbf07a18a1bdd02;hb=e6469faa3f6895ec0ff9b7592a7348a321898b71;hp=e50e16fd1c5a9eec4f6b45c4e836a5d31b6bbdec;hpb=978a5d8f650488c8840d54ccc3032599ca50a084;p=fanfix.git diff --git a/src/jexer/TWindow.java b/src/jexer/TWindow.java index e50e16f..b8513c4 100644 --- a/src/jexer/TWindow.java +++ b/src/jexer/TWindow.java @@ -32,7 +32,6 @@ import java.util.HashSet; import java.util.Set; import jexer.backend.Screen; -import jexer.bits.Cell; import jexer.bits.CellAttributes; import jexer.bits.GraphicsChars; import jexer.event.TCommandEvent; @@ -91,6 +90,11 @@ public class TWindow extends TWidget { */ public static final int HIDEONCLOSE = 0x40; + /** + * Menus cannot be used when this window is active (default no). + */ + public static final int OVERRIDEMENU = 0x80; + // ------------------------------------------------------------------------ // Variables -------------------------------------------------------------- // ------------------------------------------------------------------------ @@ -1182,6 +1186,7 @@ public class TWindow extends TWidget { /** * Activate window (bring to top and receive events). */ + @Override public void activate() { application.activateWindow(this); } @@ -1190,6 +1195,7 @@ public class TWindow extends TWidget { * Close window. Note that windows without a close box can still be * closed by calling the close() method. */ + @Override public void close() { application.closeWindow(this); } @@ -1251,6 +1257,20 @@ public class TWindow extends TWidget { return false; } + /** + * Returns true if this window does not want menus to work while it is + * visible. + * + * @return true if this window does not want menus to work while it is + * visible + */ + public final boolean hasOverriddenMenu() { + if ((flags & OVERRIDEMENU) != 0) { + return true; + } + return false; + } + /** * Retrieve the background color. *