[ptx] thoughts for hugin UI, post 0.5

Rob Park rbpark at gmail.com
Sun May 29 22:37:27 BST 2005


On 5/29/05, Pablo d'Angelo <pablo.dangelo at web.de> wrote:
> Well, I have written the major part of hugin and it was my first big GUI
> project. I have used QT before wxWindows (actually, the first hugin
> prototype was written using QT), but I switched, because I could not use
> the free QT version on windows (due to the lack of a Microsoft compiler
> at that time). This was a step I deeply regret.. However, it has been
> taken 2 years ago.

Ah, Qt. I have no experience with Qt beyond disliking the KDE project.

> I'm not sure about your software development background,

I come from a background of web development, specifically CGI
applications, in which everything is nice and simple. I am just
starting GUI stuff now, for the first time. So I guess I find it more
apalling than I was expecting ;)

> I haven't looked at the bittorrent client, but I believe a panoramic
> editor is much more complex than a frontend for a file downloading
> application.

That's true, of course. But my first exposure to wx was with
bittorrent, and it always seemed to have a nice, simple UI. That's why
I suggested it originally.

> Nona is already available as an external program... People can use it
> from their own frontends.. Its just that no other opensource frontends
> are available.

Ah, I wasn't aware of that. I thought it was an internal feature of hugin.

>  > I'm not sure exactly that it's wx that's deficient, it seems like a
>  > nice easy way to do cross-platform applications...
> 
> Urgh... sorry... it is not, I have learned that in the last 2 years.

Ok, sorry ;)

> Compared to these problems, the XRC stuff is actually quite nice.
> XRC is just another way to avoid writing thousands of lines of code that
> generate the widgets by hand. However, it doesn't change the design and
> usability problems wxWidgets has, its just makes it easier to specify
> the structure of the GUI.
> 
> Actually I like the tree structure of the XRC files, and the way they
> are edited for example from within XRCed. A lot nicer than drawing
> widgets onto a canvas, because the underlying structure is immediately
> visible, and one is not tempted to use fixed sizes for widgets etc.
> In case of XRC I'm just unhappy with the implementation, not with the
> concept itself.

Have you considered creating a GUI in XUL, then? XUL is the widget
toolkit used to create the mozilla/firefox UIs. It defines the entire
UI in XML with a touch of javascript, and is cross-platform (an
application written in XUL will run on any platform for which mozilla
is available).

I've never used it but I've seem some examples, and it seems a lot
more elegant than this XRC stuff. An application written in XUL should
look like a native application on both linux & windows, although I'm
not sure what it would look like on OSX. I'll have to look into it.

>  > Repeated 18 times in one XRC file (in fact this is repeated 360 times
>  > across all the XRC files that hugin uses). WHY!?
> 
> Because you have to specify the properties of the widgets. Maybe there
> are nicer ways to handle defaults for other widget systems.

Well, like I said, I'm coming from a web programming background, so
I'm accustomed to defining structure in HTML and then controlling
appearances with CSS, which is a very elegant way of doing it.

I think if HTML was made to be more like XRC, you'd see webpages like this:

<div align="center" valign="middle" style="padding:
5px;">Hello,</div><div align="center" valign="middle" style="padding:
5px;">this</div><div align="center" valign="middle" style="padding:
5px;">is</div><div align="center" valign="middle" style="padding:
5px;">some</div><div align="center" valign="middle" style="padding:
5px;">fancy</div><div align="center" valign="middle" style="padding:
5px;">HTML</div>

Eg, terrible.

> However having the stuff
> inside the XRC files that are editable with another program like XRCed
> is nicer than hardcoding everything by hand. If you code everything by
> hand, you will have to hardcode all the flags and stuff into your
> program (no matter if it is written in python or C++).

Yeah, that's true.

> I believe you have just discovered that writing GUI's is not as nice as
> using them :-(

Yeah.

> I hope you don't take this as a personal attack. I'm as unhappy as you
> are with the current situation.

Not at all. Good to hear you're as unhappy as I am, that means you'll
be receptive to progress made and you won't be a stubborn
anti-progress guy like I see on some other projects. ;)

> But one has to think very carefully about it, and try out several
> alternatives (by actually writing code with it, not just by reading the
> documentation !!!). That example code should contain major parts of
> central stuff like the control point editor and some complex dialog
> code, like the Pano panel as well as interfacing with fast, C/C++ based
> routines for preview.

When I get some free time I'll look more into XUL to see if it's worth pursuing.

-- 
Urban Artography
http://artography.ath.cx


More information about the ptX mailing list