Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1MlPeR-0008TN-5a for mharc-grub-devel@gnu.org; Wed, 09 Sep 2009 12:04:07 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MlPeP-0008Q8-1N for grub-devel@gnu.org; Wed, 09 Sep 2009 12:04:05 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MlPeI-0008J4-8I for grub-devel@gnu.org; Wed, 09 Sep 2009 12:04:03 -0400 Received: from [199.232.76.173] (port=51500 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MlPeG-0008Ip-UH for grub-devel@gnu.org; Wed, 09 Sep 2009 12:03:57 -0400 Received: from mail-pz0-f199.google.com ([209.85.222.199]:51771) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1MlPeG-0002tx-1D for grub-devel@gnu.org; Wed, 09 Sep 2009 12:03:56 -0400 Received: by pzk37 with SMTP id 37so2653439pzk.26 for ; Wed, 09 Sep 2009 09:03:55 -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 :content-transfer-encoding; bh=9xQiaceRaADOjmRCvQGR/S/Y04+HWuxojUyLakGlr0w=; b=xukN6F0M+mDycLf+jtyMbRPt/0cieNFaVi8J8w0CK/lAHNvQ8I7s8J4mx0vxesfnCE 52siL41hXuZSJ6TC1NssDz4+Y88h6vclw+dTyLEnQP/4XveWgKoh4VAXjHPqjxArbjtq 8t/6URBsd3zpcOmkGT9NdF7+ACKf7achSf4eo= 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:content-transfer-encoding; b=uICZ8fZaxfIRNd7i05Yiy2QGxc0Et/Cir1/6Mla2UZFM4XTFcdwEfgX5+1VJguTcuw ADUzYDefu5LL4Fv57wnHA9Xh9aZJM1ET0QcM1vOwQKD9HVGGhVi5cdnCweYTcmZFFJ77 DD9OMqzuKSPVnIAGMeOHqT4AAQsfb9C0FMspA= MIME-Version: 1.0 Received: by 10.141.3.15 with SMTP id f15mr172519rvi.13.1252512232536; Wed, 09 Sep 2009 09:03:52 -0700 (PDT) In-Reply-To: References: Date: Thu, 10 Sep 2009 00:03:52 +0800 Message-ID: From: Bean To: The development of GRUB 2 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 2) Subject: Re: [GITGRUB] New menu interface (second draft) 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: Wed, 09 Sep 2009 16:04:06 -0000 On Wed, Sep 9, 2009 at 10:50 PM, Michal Suchanek wrote= : > 2009/9/8 Bean : >> Hi, >> >> After more consideration, perhaps we should use the following >> component structure: >> >> frame - window border >> panel - layout manager with scroll bar support >> window - frame + panel >> label - text >> image - image >> button - button >> list - list box >> edit - multi-line edit box >> term - terminal emulator =A0(extends edit component) >> menu - menu list (extends list box) > > Also how is the menu shown? > > Currently the menu is implicitly shown if defined but with this > extended menu system you can create multiple "windows". > > There could be a menu with some magic ID that is shown automatically > if defined after config parsing ends. > > Another approach is adding a show command that shows a particular > element (with its subelements) as the main window on the screen, This > would be likely implicitly present in the edit command for the menu > items that have some action bound to them. > > To make the window management simple every time only a single window > would be shown - they could be pushed onto a window stack so that if a > popup (such as the action edit popup) is closed the previous window is > restored. Hi, We can have a menu tree like this: + menu { + main { + item { class =3D "chainloader" name =3D "Chainloader" command =3D "chainloader +1\nboot" } } + tools { } } The menuitem command adds to the main menu by default, but it could be overwritten with a option. In menu component, we uses an attribute to set the menu name. --=20 Bean gitgrub home: http://github.com/grub/grub/ my fork page: http://github.com/bean123/grub/