Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1MkyfG-0006Ap-Au for mharc-grub-devel@gnu.org; Tue, 08 Sep 2009 07:15:10 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MkyfC-000694-Ti for grub-devel@gnu.org; Tue, 08 Sep 2009 07:15:06 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Mkyf8-00068J-EM for grub-devel@gnu.org; Tue, 08 Sep 2009 07:15:06 -0400 Received: from [199.232.76.173] (port=58718 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Mkyf8-000689-8J for grub-devel@gnu.org; Tue, 08 Sep 2009 07:15:02 -0400 Received: from mail-px0-f180.google.com ([209.85.216.180]:44379) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1Mkyf7-0001zX-R6 for grub-devel@gnu.org; Tue, 08 Sep 2009 07:15:02 -0400 Received: by pxi10 with SMTP id 10so2998824pxi.24 for ; Tue, 08 Sep 2009 04:14:58 -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=V2vPBdizG69Od57Hy0rod6v8cr3sRw8jLQ89d7ifp+k=; b=XemBEc6anGq2PvMQfFIMsHrup6nMom+3ubjKuzZcaYj82xBhQqiQIo1tYMl9eCeKCO 0GavBzSlPm/tdbwSXHKGSBcoU3yvtrDJLZrrdPrel41Mb/n1q2rUifMK/q0g322RODyq +hQlUf8Xe2s2cZS9IzZ263o9lMP+kU0uVDHJQ= 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=DBoBd82AVqOjOW0MuKaPGCE0voZf3wGx6S+xUAQMzUxZg2VdNyE4cHV5JTdyvqOSGl ITdvae6IdKnZmyqfq3gq6AqP8sqbrj8ruti0XMfH/xWz7H/5eQ3F5NwBiRX1iHxHfhz8 XlWDvpq9woBmVSU1Fo50ditcQR9sk0ZydMB5E= MIME-Version: 1.0 Received: by 10.141.52.15 with SMTP id e15mr3409960rvk.219.1252408498695; Tue, 08 Sep 2009 04:14:58 -0700 (PDT) In-Reply-To: References: Date: Tue, 8 Sep 2009 19:14:58 +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: Tue, 08 Sep 2009 11:15:07 -0000 On Tue, Sep 8, 2009 at 4:14 PM, Michal Suchanek wrote: > 2009/9/7 Bean : >> Hi, >> >> After considering the discussion of first post, I come up with the >> second draft for new menu interface implementation. >> >> First, the basic drawing unit is now region, there are four types: >> >> text >> Single line of text, have alignment attribute. >> >> image >> An image, have scaling and alignment attribute. >> >> rect >> A rectangle area filled with background color. >> >> viewport >> A viewport in the container box. This is used for strolling. >> >> The whole ui are composed of the above regions, components add their >> drawing regions to a global tree which handles region updates for >> them. >> >> One of the shortcoming of Colin's graphic patch is that the update >> process is not optimized. The screen flickers a lot without double >> buffer. Double buffer eats up a lot of memory, which is a problem in >> platforms like OpenFirmware. And even with double buffer, the >> redrawing process takes time and response is quite slow. The new menu >> interface split ui into small regions which uses different update >> strategy, and redraw only the necessary regions. >> >> Component is the basic unit for interaction. Each component has a flag >> that indicate if it can receive input focus. The last component with >> input focus will be the current input, you can use a hotkey like >> ctrl-tab to switch to other component. >> >> Some of the components: >> >> label >> Text label, it consist of text region. >> >> image >> Image, it consist of image region. > > How does an image map to other menu rendering like: text-only, dumb termi= nal ? > > You can render a menu item that has an image and text in both but > image would not show without graphics. The style may turn off =A0the > text if graphics is available. > > IMHO images need not be available separately. You can put them in the > background of an element or as an icon to text+icon label element. The > style then specifies in which direction from icon the text is shown > (hidden, over the center, above, below, left, right ..). Hi, Actually there is bitmap for text mode as well, it's ascii art. And the main reason to separate image from others is for update control. Bitmaps uses blt to update a region, rect uses fill, and text uses draw_font, each have different update algorithm. >> frame >> Window frame. This is normally used by other component to draw the >> border, it consist of multiple image and/or rect region. >> >> panel >> Layout manager. It can have a scrollbar when the actual content is >> bigger than the window size. it consist of viewport region. > > How does a frame differ from a panel? The frame only draws the window border, and panel is layout manger. It's possible to use panel without frame, for example, listbox. >> >> text >> Multi-line text box. It has a frame and a text box in the center. > > Why another frame ? We have a frame component already. > Frame is only responsible for the border, the actual content is controlled by another component. >> >> edit >> Single line edit box. It has a frame and an edit box in the center. >> Has input focus. > > Another frame? > Is this even needed? The only editable thing in gfxterm is multiline - > the whole menu entry. > This edit box is mainly for popups, for example, it can be used to input passwords. >> >> menu >> Menu box. It has a frame, a panel for layout control, and multiple >> menu items. Has input focus. > > Is this even needed? The menu is always generated by a script so there > is no problem if multiple elements are used in the default menu and it > can be customized if it is not a fixed element. This only control the style and layout of menu component, the actual menu items is added in menuentry statement. > >> >> term >> Terminal emulator. It has a frame and a two dimension edit box in the >> center. Has input focus. >> > > Thanks > > Michal > > > _______________________________________________ > Grub-devel mailing list > Grub-devel@gnu.org > http://lists.gnu.org/mailman/listinfo/grub-devel > --=20 Bean gitgrub home: http://github.com/grub/grub/ my fork page: http://github.com/bean123/grub/