On Nov 17, 2003, at 3:04 PM, Gerald Combs wrote:
- The interface layout is easy to change, since it's defined by the
XUL files.
- Much (but not all) of the code is automatically generated.
If that's easier than hand-coding GTK+ (or Qt, or Aqua, or Win32) code,
that *alone* might make it worth doing....
Note, though, that menus would, at least in part, be per-platform; for
example, "Preferences" would be under the "Ethereal" menu in Mac OS X,
but under some other menu on other platforms. Multiple XUL files, in
cases where there's a real UI difference due to different
conventions/rules on different platforms, probably wouldn't be too bad
(and if you can do the equivalent of #includes in XUL files - does
SGML/XML support that? - there might be even more common code
available).
Can this handle "custom" widgets - or subclassing existing widgets? We
might want to do that for the packet list, to implement, for example, a
list where the text in the columns is supplied by callbacks and not
even generated for packets that aren't visible.
Does this seem like a viable approach?
It does to me.
(Longhorn will have an XML-based language for GUIs:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/
dnfoghorn/html/foghorn10272003.asp
and Mac OS X Interface Builder nib files are XML (I think there might
also be a non-XML NeXTStEP format as well); it appears that Glade also
uses XML, and Qt Designer uses - wait for it - XML to describe UI
stuff. So who had that idea first? Mozilla? Or did somebody do it
before them?)