Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1Mp6rL-000444-MK for mharc-grub-devel@gnu.org; Sat, 19 Sep 2009 16:48:43 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Mp6rK-00043Z-08 for grub-devel@gnu.org; Sat, 19 Sep 2009 16:48:42 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Mp6rF-00041t-7r for grub-devel@gnu.org; Sat, 19 Sep 2009 16:48:41 -0400 Received: from [199.232.76.173] (port=42465 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Mp6rF-00041m-0o for grub-devel@gnu.org; Sat, 19 Sep 2009 16:48:37 -0400 Received: from mail-pz0-f188.google.com ([209.85.222.188]:40990) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1Mp6rE-0004vB-Kj for grub-devel@gnu.org; Sat, 19 Sep 2009 16:48:36 -0400 Received: by pzk26 with SMTP id 26so1656115pzk.27 for ; Sat, 19 Sep 2009 13:48:34 -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=VMnzFpuuLP94QPGllCBS+RB1PgxPkFzIFt6jDwFruLo=; b=ZcofkY0wG4oz7PfswGVuI9tjZ+QbKgc1Hkt3DhYTz6yHLQKJ0KoZr8FgJHvdSDpZPp l5caqD61nS2jB4s7FT3K1QRBOipHBzQ+h2eY8EX8L9Wq+a/oBsk58RAxA3bSGu4SL3IQ lgvK9flWB2BUdZsdJMNrQsvkQEmZQzt2lsG6A= 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=t7mzPA2YIDPCR89jIg1wv8tTlphi/l7GLvxgiV2sXIIQczf0pnM/B+BzPGIQKxU9aQ q6FrQ4QrCDt122+uVH0PgprTLurZ1NZc7/Fq87XAWPN2gyJCoqNU2yc6pHktPCz+6BwW tyiY+4qQNAB5FTShTcvSj3n50WMkoASJEEcNM= MIME-Version: 1.0 Received: by 10.140.148.14 with SMTP id v14mr197151rvd.26.1253393314736; Sat, 19 Sep 2009 13:48:34 -0700 (PDT) In-Reply-To: References: Date: Sun, 20 Sep 2009 04:48:34 +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: Sat, 19 Sep 2009 20:48:42 -0000 On Sat, Sep 19, 2009 at 10:38 PM, Michal Suchanek wrote: > Hello > > 2009/9/16 Bean : > >> set gfxmode="640x480" >> loadfont /unifont.pf2 >> ismod vbe >> insmod png >> menutest >> >> It runs four tests, it would pause after each test, press any key to continue. >> >> 1, It starts with text mode with three rects, the second rect have 3 >> texts, but the last one is outside the view port and therefore not >> visible. >> 2. It moves the second rect to the top and change the view port, now >> the third text is visible but the first is hidden. >> >> 3-4 rerun the following test in graphic mode. If /r1.png, /r2.png, or >> /r3.png exists, the image will replace the corresponding rect box. >> > > Is it possible to change the demo so that the second rectangle does > not get to top? > > To me it is not obvious where it is raised. > > If it is not possible it's fine with me, I do not think that > overlapping elements have to be supported but if they are not the demo > should look different, right? Hi, The second rectangle is raised as we update it. Normally this is what we want as the current selected item should be raised to top. If you want to keep the third rect on top, just update it as well: grub_menu_region_update (&head, r2, 0, 0, r2->common.width, r2->common.height); grub_menu_region_update (&head, r3, 0, 0, r3->common.width, r3->common.height); grub_menu_region_apply_update (head); > why does the menu system have a glyph drawing function? > Is the one in font.c not suitable? The one in font.c is not usable, as it draws the whole glyph, but in the menu system, sometimes we only want to update a portion of it. > Why are there two methods for returning text width and height, one in > gfx_region in pixels, the other in text_region in characters? Does > size in characters make any sense? There might be proportional fonts > or at least fonts of different size in the future. For example, we need to find out the length of string "HELLO" so that we can align it to the center of screen. In graphic mode, this would be the pixel width, but in text mode, it's the number of characters, 5. -- Bean gitgrub home: http://github.com/grub/grub/ my fork page: http://github.com/bean123/grub/