Re: hi
- From: Elliott Hughes <Elliott Hughes genedata com>
- To: gtk-devel-list redhat com
- Subject: Re: hi
- Date: Wed, 25 Aug 1999 10:17:33 +0200 (CEST)
> I know Tk allows you to set the border style on all widgets,
> but I've never quite understand it.
>From my own personal experience, coming most recently from
Java/Swing which also has `border' as a basic property of all
widgets, the main advantage to this is that it's unsurprising.
In GTK, some widgets allow the user to choose a shadow (arrow,
clist, frame, handle box, menu bar, spin button and viewport),
others a relief (button and toolbar, sort-of) and the rest not at
all.
This is harder to explain, get used to and remember than
Swing's ``everything has a border that you can change at
will'', so from this point of view it's worse.
Sadly, the actual implementation of borders in Swing is pretty
stupid, so I wouldn't suggest GTK copy it exactly. I can go
into detail about the problems with their approach at such
time as there is any interest in moving borders up the
heirarchy in GTK.
So far I've done a lot less with GTK than with Swing, so it's
possible I'm missing something. The only advantage that
springs to mind with the GTK way of doing things is that it's
significantly harder for the user to produce nasty-looking
buttons with arbitrary shadows (since a distinction is made
between relief and shadow). I haven't found that this freedom
is misused in Swing, but maybe that's because most people
writing Swing stuff do it for money, not love, and have their
freedom restricted at another level? ;-)
In summary, I'd say that a single border system works out
quite handy, but it could hardly be considered a priority. The
main lesson I would take from Swing is that their simplified
almost-MVC scheme works very well for complicated widgets
like text and tables (clists), but badly for simple stuff. When
I have the chance, I want to try and persuade everyone
that a similar scheme would be invaluable for GTK and --
amusingly enough -- would work even better in C than
in Java. But that would be drifting off-topic (if "hi" counts
as a topic).
--
"Intelligence ... has caused our troubles; but it is not
unintelligence that will cure them." -- Bertrand Russell
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]