Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1MtOQN-0000BG-Vy for mharc-grub-devel@gnu.org; Thu, 01 Oct 2009 12:22:36 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MtOQL-00008h-JF for grub-devel@gnu.org; Thu, 01 Oct 2009 12:22:33 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MtOQG-0008TL-DF for grub-devel@gnu.org; Thu, 01 Oct 2009 12:22:32 -0400 Received: from [199.232.76.173] (port=36400 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MtOQG-0008S9-7V for grub-devel@gnu.org; Thu, 01 Oct 2009 12:22:28 -0400 Received: from mail-px0-f202.google.com ([209.85.216.202]:45761) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1MtOQF-0007mI-52 for grub-devel@gnu.org; Thu, 01 Oct 2009 12:22:27 -0400 Received: by pxi40 with SMTP id 40so328721pxi.24 for ; Thu, 01 Oct 2009 09:22:25 -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=ySbckd60ZGyVQT7M83KekZzMYZOyhVcGCtLp1b0TV8A=; b=G7E6qcpNTqb+a2sN3UBT1l1aIfJ3tWPlOAYLRUnOMxZ8xindilTlc7nv1VGMiw7ex7 09DxTVPzu12OoOjOMPViKN1HryLSdI5mg0jcf4u0GOvepc4nrqkmPTiRgYUZ0BPNHAnR B8dXJ648bd5vqjiY1GF35mQruz0DAdSxfkjNk= 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=tu5TI5Ef0a2vF8t/DLQucQGVWbGOS8KtpEhejzuglkwZDDwvjJN9rLcbgLaAOfNEIs +40L3fFlPxLxGbWrtVYYHF9y8rNvV/EBXIdW0jRkjLQm3uIWlctuUzXTeKqIClp3K1IO IgVAEJu9EDu9Bbuej3qFQWnU3IJrK7goydX0E= MIME-Version: 1.0 Received: by 10.141.18.9 with SMTP id v9mr367766rvi.89.1254414145808; Thu, 01 Oct 2009 09:22:25 -0700 (PDT) In-Reply-To: References: Date: Fri, 2 Oct 2009 00:22:25 +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 (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: Thu, 01 Oct 2009 16:22:33 -0000 On Thu, Oct 1, 2009 at 10:53 PM, Michal Suchanek wrot= e: > 2009/10/1 Bean : >> On Thu, Oct 1, 2009 at 8:44 PM, Michal Suchanek wr= ote: >>> 2009/10/1 Bean : >>>> On Thu, Oct 1, 2009 at 4:41 PM, Michal Suchanek = wrote: >>>>> Cannot this be inferred automatically? >>>>> >>>>> That is any panel that contains command items is a window. >>>> >>>> Hi, >>>> >>>> Sometimes panel can be used to ground some widgets together, for >>>> example, a dialog may look like this: >>>> >>>> panel >>>> { >>>> =E1direction =3D vertical >>>> =E1input =3D 1 >>>> >>>> =E1panel >>>> =E1{ >>>> =E1 =E1direction =3D horizontal >>>> =E1 =E1text { text=3D"username"} >>>> =E1 =E1edit {} >>>> =E1} >>>> >>>> =E1panel >>>> =E1{ >>>> =E1 =E1direction =3D horizontal >>>> =E1 =E1text { text=3D"password"} >>>> =E1 =E1edit {} >>>> =E1} >>>> } >>>> >>>> In this case, the outer panel should be a single window, and the edits >>>> are items. The inner panel is only used for layout, we don't want them >>>> to receive input focus. >>> >>> Since the panel only contains one active item ( the edit ) this should >>> still work. >>> >>> I recall writing about this here already. >> >> Hi, >> >> It'd be ok if we only have one level input items, but I plans to add >> two two level interaction, first is window, second is item, TAB switch >> different window, while UP/DOWN switch different items. In this setup, >> we need to mark the panel that acted as window. >> > > Yes, there's no problem inferring the interaction from the widget tree. > > Widgets that don't do anything don't get focus, they are ignored for > purpose of determining focus. > > An active item like edit or panel with command is an atomic widget for > focus. A panel that contains exactly one atomic widget is also atomic. > > A panel that contains multiple atomic items (or alternatively in which > atomic item is focused) acts on directional keys by switching focus to > next item - this seems what window =3D 1 does. > > A panel that contains multiple panels that can focus but are not > atomic handles (Shift +)TAB by switching to the (previous) next > contained panel. In case the focused panel is its (first) last > focusable item it passes the key to the upper panel. > > As an extension the panel direction can be taken into account, and > panels can be seen as atomic in both directions (atomic) atomic in > vertical direction (horizontal panel containing atomic widgets), ... > > This can work completely automagically without user setup and thus can > eliminate errors in the setup. > > It perhaps might be useful to override the default in some cases but > this should work for any menu I would want to put together. Hi, The window =3D 1 is used to group some input items together, for example: screen { panel { # A window =3D 1 panel { } #A1 panel { } #A2 } panel { # B window =3D 1 panel { } #B1 panel { } #B2 } } This define two menus, each with two items. Each menu remember its current selection, for example, if panel A select a language, panel B select theme, both can have current selection at the same time. You can walk from A to B as they represent two different things. --=20 Bean gitgrub home: http://github.com/grub/grub/ my fork page: http://github.com/bean123/grub/