From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1MteGA-0006v7-EA for mharc-grub-devel@gnu.org; Fri, 02 Oct 2009 05:17:06 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MteG7-0006ue-AX for grub-devel@gnu.org; Fri, 02 Oct 2009 05:17:03 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MteG1-0006t8-LE for grub-devel@gnu.org; Fri, 02 Oct 2009 05:17:01 -0400 Received: from [199.232.76.173] (port=46569 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MteG1-0006t1-CX for grub-devel@gnu.org; Fri, 02 Oct 2009 05:16:57 -0400 Received: from mail-pz0-f181.google.com ([209.85.222.181]:43160) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1MteG1-0001dt-4H for grub-devel@gnu.org; Fri, 02 Oct 2009 05:16:57 -0400 Received: by pzk11 with SMTP id 11so929228pzk.14 for ; Fri, 02 Oct 2009 02:16:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:content-type; bh=y9uZ61IHRSin+E/mpVs/NR2OhLyv1SXGLmi6JChjSLc=; b=o//ohu5iwHQtgGskd7qTSTTsMjdsMs0yfYU1/OwOew55hwJ0Qv1pfFhENIVkaOZpgn 0xq/X8cWdF1n83r5xKWWma7GGUtCeXu6IvPI/Rq5SExLHRXUFVpaNvpiCnmL95zGStOl 3xemhPJawmmHd+8K0JDOkgbp3UkyIWdWQrTII= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; b=UCYLodexFz2mVcp5EIGObfvoWqf3UI4YrfAKJeyedGI9C6is3+Jy7PF9m2nQU3minJ OblcdcMVeKhvcyGnmG3+5JHbLO4sl1A5rYBK0OIfvO6Z2C7i8XRRyzzdV3FsQ8Y1HqT5 Xa3GwZGgaaSpzza6b24aEziiVee9vGW3Ff2c0= MIME-Version: 1.0 Received: by 10.140.225.3 with SMTP id x3mr746954rvg.135.1254475016129; Fri, 02 Oct 2009 02:16:56 -0700 (PDT) In-Reply-To: References: Date: Fri, 2 Oct 2009 17:16:56 +0800 Message-ID: From: Bean To: The development of GRUB 2 Content-Type: text/plain; charset=ISO-8859-1 X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 2) Subject: Re: [GITGRUB] New menu interface (implementation) X-BeenThere: grub-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: The development of GRUB 2 List-Id: The development of GRUB 2 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 02 Oct 2009 09:17:04 -0000 Hi, Update: Add input handler, now you can walk the widget tree with keys. New properties: command If command is set, the widget is selectable anchor This is used to group widgets together, next and previous key can't escape the current anchor. For example, if there are two menus, what would happen if you use the previous key on the first item: 1. wrap to the last item on this menu 2, jump to the next menu I use the anchor property to distinguish the two situation If anchor is set for the parent panel, previous key can't escape the current menu, so it wrap to the last item If anchor is not set, jump to the next menu anchor also define a scope for the current node, this is useful when define onkey handlers: screen - anchor - node In screen, we set global key binding, for example, F1, etc In anchor, we set local key binding, for example, c and e for the menu widget. We can also define specific key handler for each node. The demo supports the following keys: n: jump to next item from the current anchor p: jump to previous item from the current anchor N: jump to next item in another anchor P: jump to previous item in another anchor ESC: exit from the demo -- Bean gitgrub home: http://github.com/grub/grub/ my fork page: http://github.com/bean123/grub/