Boost logo

Boost :

Subject: Re: [boost] Thoughts for a GUI (Primitives) Library
From: Cory Nelson (phrosty_at_[hidden])
Date: 2010-09-07 15:50:50


On Tue, Sep 7, 2010 at 11:41 AM, Alexander Lamaison <awl03_at_[hidden]> wrote:
> On Tue, 7 Sep 2010 10:19:23 -0400, Gwenio wrote:
>
>> On Tue, Sep 7, 2010 at 8:40 AM, Alexander Lamaison <awl03_at_[hidden]>wrote:
>>>
>>> I hope that, for starters, the end-result would look nothing like that
>>> produced by gtkmm.  GTK-based GUIs on Windows just look 'wrong'.  I'd hope
>>> that any solution we envisage would use the platform native widgets to
>>> render itself just as SWT does for Java.
>>>
>> Getting a native look would be difficult;
>
> Why?  It's been done well in the past.  Just not for C++ (if you exclude
> the C++ 'port' of SWT)
>
>> ideally you would have a set of
>> functions that provide the functionallity to draw in the native style.
>
> Yuk.  This approach doesn't work well.  Every time the native style changes
> you have to update your fakes widgets.  Maintainence nightmare!  Not to
> mention that it's almost impossible to simulate native widgets faithfully.

And yet many people do want a native look, so if it's not using native
controls already, I think building it with enough theme support to
make this work is imperative.

>> The
>> other way would to have a wrapper for native controls and some method to
>> adjust how they function.
>
> This is how SWT, Adam/Eve, etc. work though I'm not sure what you mean by
> adjust how they function.

I think that using native controls, while much simpler, would severely
handcuff us in terms of how great we could design the library. A
clean break from any native controls would give us many more options.

I know that saying "WPF" will turn some people off immediately, but by
ditching the native controls, they were able to make everything
vector-based, with great extensible functionality, almost no
restrictions on where you put things (ie. you can put a ListView
inside a button if you want), and incredible support for customizing
the look and feel at every level, from global themes to customizing
how the items of a collection appear to making a single button have an
obnoxious 90's web look.

I would hope that any new GUI framework would have such functionality
too. If it's not going to enable radically better UI, then there
isn't much point in switching from established frameworks like wx and
Qt, even if they do use C++ rather poorly.

>> The latter option would result in there being
>> separate braches of the library for native and custom controls.
>
> If there are native controls why bother with custom controls. (I also don't
> see what 'branches' have to do with anything - do you mean 'option')?

Not all native controls exist on all platforms, and not all native
controls have the same functionality. If we didn't want to limit the
library to the small subset of controls and functionality that exist
on all platforms, we'd eventually need to write some custom controls.

-- 
Cory Nelson
http://int64.org

Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk