     }
 
     /**
+     * Sets a Rectangle (in stage coords) that the menu will attempt to keep submenus positioned 
+     * within.  If a submenu is too large to fit, it will position it in the lower right corner
+     * of this Rectangle (or top if popping upwards, or left if popping leftwards).   This
+     * value defaults to the stage bounds.
+     */
+    public function setBounds (fitting :Rectangle) :void
+    {
+        _fitting = fitting;
+    }
+
+    /**
      * Actually pop up the menu. This can be used instead of show().
      */
     public function popUp (

        var submenu :Menu = IMenuItemRenderer(row).menu;
        var lefting :Boolean = _lefting;
        var upping :Boolean = _upping;
        var fitting :Rectangle = new Rectangle(0, 0, stage.stageWidth, stage.stageHeight);
        if (submenu.x + submenu.getExplicitOrMeasuredWidth() > fitting.right) {
            lefting = true;
        }

    protected var _dispatcher :IEventDispatcher;
    protected var _lefting :Boolean = false;
    protected var _upping :Boolean = false;
    protected var _fitting :Rectangle = null;
}
}
