From owner-freebsd-libh Thu Jun 6 7: 3: 4 2002 Delivered-To: freebsd-libh@freebsd.org Received: from mail2.qc.uunet.ca (mail2.qc.uunet.ca [198.168.54.17]) by hub.freebsd.org (Postfix) with ESMTP id 41CAA37B401 for ; Thu, 6 Jun 2002 07:02:58 -0700 (PDT) Received: from xtanbul ([216.94.147.34]) by mail2.qc.uunet.ca (8.9.3/8.9.3) with ESMTP id KAA14343; Thu, 6 Jun 2002 10:02:46 -0400 Date: Thu, 6 Jun 2002 10:00:48 -0400 Subject: Re: Hui API doc Content-Type: text/plain; charset=ISO-8859-1; format=flowed Mime-Version: 1.0 (Apple Message framework v482) Cc: freebsd-libh@FreeBSD.ORG To: Max Okumoto From: Antoine Beaupre In-Reply-To: Message-Id: Content-Transfer-Encoding: quoted-printable X-Mailer: Apple Mail (2.482) Sender: owner-freebsd-libh@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG Le mercredi 5 juin 2002, =E0 09:13 PM, Max Okumoto a =E9crit : > I felt left out looking at all the new documentation so I have written > up a little documentation for the parts that I am working on recently. I thought that would happen. Very good work! It's a good idea to start=20= "real" (as in "not doxygen") documentation on the Hui. Since you now=20 have access to the WWW repo, you could also make your own timetable and=20= let the world know where you're at with the Hui cleanup. I'm curious. ;) Please don't feel left out. Your work is as important as any other in=20 the project, and presently, you're the most active committer. :) > But I don't know where it would fit in... > Can someone look it over and tell me where it put it? I don't think it belongs to the sysinstall2.sgml file, since it should=20= really be called "packageNG.sgml". It would, however, fit pretty well in the doc/hui.sgml document that=20 only contains a introduction, right now. You can commit straight to this file if you want. It's seriously=20 outdated and you could probably give it a good refresh. If you can't=20 deal with SGML, I could commit small bits to the file. We could modify the web update script to build and install this file=20 too, though I haven't setup DocBook builds on usw4 yet. A few comments on the document itself: > Hui Programming API > > Intro > ------- > The graphical user interface for libh is the Hui subsystem. Don't say "graphical" since it can be text-based. :) Just "The user=20 interface" is fine. > Currently there are two graphics implementations, text based > (Turbo Vision) and X window (Qt). The scripting language > is tcl. I think the wording "front-end" and "back-end" would be more = appropriate. So I'd put the whole paragraph as: Intro The front-end User Interface (UI) for libh is the Hui subsystem. There=20= are currently two back-ends implemented: text-based (Turbo Vision) and=20= graphics-based (X Window System/Qt). The scripting language is TCL. > Programming Model > ------- > The programming model is a container and element system. > Graphical elements and other containers are created by their > parent containers. The resulting hierarchy is a tree like > structure with containers as internal nodes and elements > as leaves. > > The root of the tree is the Hui object. =46rom this object > you can create a menu bar, windows and dialogs. A graphic would be nice here. :) > The two containers, windows and dialogs, have many of the > same features but dialogs can return result strings, and > are modal. In windows and dialogs you can create the > following objects: > o button > o input line > o label > o list box > o progress indicator > o text edit > > [I have to examine the code more for this section.] > But it looks like there can only be one menu bar. This bar > is associated with the first window created which requests > a menu bar. Indeed, There Can Be Only One menubar. Look also at the bug in the BUGS=20= file regarding that. I think this is due to a limitation in TVision, but we could possibly=20 work around this limitation by changing the menu bar depending on which=20= window has the focus in TVision. That's probably too much trouble for=20 nothing. Note that Qt dialogs (ours, at least) don't have menu bars and have=20 fixed sizes, in opposition with Qt windows. > Element Placement. > ------- > The placement of elements and containers are absolute > coordinates relieve to their container. [There is no automatic > placement in the containers as far as I can tell] I guess this should have read: "The placement of elements and containers are in absolute coordinates=20 relative to their container." That is true, but there *is* also automatic placement in Hui. For an=20 example, look at the diskeditor, in particular, a trivial example is in=20= the test stub, release/scripts/disk.tcl: set test_window [$hui window "labeltest"\ "Partition Editor Test Loader" "1 0" "40 5"=20 "horizontal"] $test_window button "disk" "&Test diskeditor" {disk_callback ""}=20 "default" $test_window button "newfs" "&Test newfs" {newfs_callback ""} "default" $test_window button "quit" "&Quit" {quit_callback ""} $test_window show $hui run The buttons are disposed properly as seen on the top left window=20 ("Partition Editor Test Loader") of the screenshot: http://usw4.freebsd.org/~libh/screenshots/screenshot-hui- console+qt-2002-05-29.jpg Good work! A. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-libh" in the body of the message