Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 6 Jun 2002 10:00:48 -0400
From:      Antoine Beaupre <anarcat@anarcat.ath.cx>
To:        Max Okumoto <okumoto@ucsd.edu>
Cc:        freebsd-libh@FreeBSD.ORG
Subject:   Re: Hui API doc
Message-ID:  <CDC0C844-7955-11D6-8A4B-0050E4A0BB3F@anarcat.ath.cx>
In-Reply-To: <hf660x8azu.fsf@multivac.sdsc.edu>

next in thread | previous in thread | raw e-mail | index | archive | help
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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CDC0C844-7955-11D6-8A4B-0050E4A0BB3F>