From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1MtN2K-0002pH-3D for mharc-grub-devel@gnu.org; Thu, 01 Oct 2009 10:53:40 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MtN2H-0002o1-Iz for grub-devel@gnu.org; Thu, 01 Oct 2009 10:53:37 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MtN2F-0002nb-Vl for grub-devel@gnu.org; Thu, 01 Oct 2009 10:53:37 -0400 Received: from [199.232.76.173] (port=58606 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MtN2F-0002nS-Oq for grub-devel@gnu.org; Thu, 01 Oct 2009 10:53:35 -0400 Received: from fg-out-1718.google.com ([72.14.220.155]:16148) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1MtN2F-0007l0-3P for grub-devel@gnu.org; Thu, 01 Oct 2009 10:53:35 -0400 Received: by fg-out-1718.google.com with SMTP id 22so91534fge.12 for ; Thu, 01 Oct 2009 07:53:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:sender:received:in-reply-to :references:date:x-google-sender-auth:message-id:subject:from:to :content-type:content-transfer-encoding; bh=yCRmNoYUc7elht+a9JGqbWDt6QgC6ItUYegV6GlH1jI=; b=YpWvNNN1s3r0k0vcqT1qodXQbB/Cs7cX9cI83vKhmg7AhGq9p7Ubrx6N2QdwnYY7hu QBYhF1BHNsKQ5lp4mka2ocW8WVKPEQ08LaadEtXY9MXUhJcMRPjsWJ0n5TROlyBe6fu0 lEe7AK0LFCsM/qGbT3hOL06Lvg6KEl6iyta5I= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:content-type :content-transfer-encoding; b=Rzxnt8PTJkQIZjBBoNYfx4amPEQMmApHnNI4msQmq8gGI85XzkYaruHWqJavCTsD6s 4YoMwpDCSQjiy/MRvUWRvVh6E1xIkaxOmbkDTClJCA7xElH+eH+H2dKR2tjegsWYPLCS PtlLRhFTwdgETmW4jjihLvNS/Q/uEikWWS33w= MIME-Version: 1.0 Sender: hramrach@gmail.com Received: by 10.86.184.35 with SMTP id h35mr1299960fgf.18.1254408812809; Thu, 01 Oct 2009 07:53:32 -0700 (PDT) In-Reply-To: References: Date: Thu, 1 Oct 2009 16:53:32 +0200 X-Google-Sender-Auth: d1ac568c5a36d11a Message-ID: From: Michal Suchanek To: The development of GRUB 2 Content-Type: text/plain; charset=UTF-8 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 14:53:38 -0000 2009/10/1 Bean : > On Thu, Oct 1, 2009 at 8:44 PM, Michal Suchanek wro= te: >> 2009/10/1 Bean : >>> On Thu, Oct 1, 2009 at 4:41 PM, Michal Suchanek w= rote: >>>> 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 >>> { >>> =C3=A1direction =3D vertical >>> =C3=A1input =3D 1 >>> >>> =C3=A1panel >>> =C3=A1{ >>> =C3=A1 =C3=A1direction =3D horizontal >>> =C3=A1 =C3=A1text { text=3D"username"} >>> =C3=A1 =C3=A1edit {} >>> =C3=A1} >>> >>> =C3=A1panel >>> =C3=A1{ >>> =C3=A1 =C3=A1direction =3D horizontal >>> =C3=A1 =C3=A1text { text=3D"password"} >>> =C3=A1 =C3=A1edit {} >>> =C3=A1} >>> } >>> >>> 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. Thanks Michal