retrofit from gjexer
[fanfix.git] / src / jexer / TWindow.java
index e50e16fd1c5a9eec4f6b45c4e836a5d31b6bbdec..16945496e1f792d526240f3982aca67fc0f8a6a9 100644 (file)
@@ -91,6 +91,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 --------------------------------------------------------------
     // ------------------------------------------------------------------------
@@ -1251,6 +1256,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.
      *