Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > C++ > Portable C++ GUI framework

Reply
Thread Tools

Portable C++ GUI framework

 
 
s0suk3@gmail.com
Guest
Posts: n/a
 
      06-27-2008
On Jun 27, 9:02 am, Sherman Pendley <(E-Mail Removed)> wrote:
> "Alf P. Steinbach" <(E-Mail Removed)> writes:
>
> > wxWidgets runs on all three platforms with, I believe, native look &
> > feel.

>
> You're obviously not a Mac user.
>
> Picking a random screen shot from wxWidgets' own site, at:
>
> <http://www.wxwidgets.org/images/screens/bitwiseim_macosx.jpg>
>
> Yes, it uses native widgets. It's got the "look" pretty close. But a
> native interface, at least on the Mac, is more than that.
>
> There are plenty of places in this app where one might want to copy
> and/or paste text - but there's no edit menu. The relevant menu items
> are either in a non-standard place, or missing entirely.
>
> There are toolbars, but no toolbar hide button at the top-right of the
> windows that have them.
>
> The rows of buttons on the message dialogs are centered. Since English
> reads left to right, they should be right-aligned, and the default
> button should be on the right.
>
> I could go on, but this isn't really about C++, so I'll stop here.
>


But note that all those issues are the implementation's fault, not
wxWidgets' fault. For example, AFAIK, wxWidgets doesn't provide any
kind of 'default' menu hierarchy; you have to build every menu item
yourself, hence you're in complete control of the menu labels and
their order. You're also responsible for the buttons in the toolbar.

Sebastian

 
Reply With Quote
 
 
 
 
R.A. Nagy
Guest
Posts: n/a
 
      06-27-2008
>
> Apple's Human Interface Guidelines (the HIG I mentioned earlier)
> should, IMHO, be required reading for anyone contemplating a Mac port
> of their app.
>
> <http://developer.apple.com/documentation/UserExperience/Conceptual/AppleHIGuidelines/>
>


Link is priceless.

Thanks!

R.A. Nagy
http://Soft9000.com


 
Reply With Quote
 
 
 
 
Jerry Coffin
Guest
Posts: n/a
 
      06-27-2008
In article <(E-Mail Removed)>, http://www.velocityreviews.com/forums/(E-Mail Removed) says...
> Sherman Pendley wrote:
>
> > Yes, it uses native widgets. It's got the "look" pretty close. But a
> > native interface, at least on the Mac, is more than that.

>
> Enough of that Mac snobbery! If you think people are gonna rewrite
> everything just for the Mac because you don't quite like a shade of an
> icon you can eat your one-button mouse.
>
> Seriously, for many applications cross-platform toolkits are a nice
> thing and a Mac user surely prefers a "close enough" GUI to one that
> hasn't been ported to the Mac at all.


[ getting badly off-topic...]

A few years ago I was frustrated with how difficult it was to do
something fairly simple in Photoshop, so I wrote my own little Windows
program to do the job. It was fairly complex internally, but externally
pretty boring -- you opened a graphics file, it did its job, showed you
the result and let you save the filtered file. The only bit of visible
complexity was that it let you do the same transform on an arbitrary
number of files at once, and allowed you some flexibility about how it
dealt with file names.

A friend of mine who uses a Mac watched me use it once, and exclaimed
about how boring and ugly it was. As it happens, at work at the time I
was doing a little bit of Mac development anyway, so I decided to port
this bit of stuff to the Mac -- but with a twist.

Instead of making it boringly simple, I deliberately made everything
stupidly complex -- in fact, I pretty much implemented the same things
that Photoshop had, and then gave a rather complex set of directions for
how to carry out the steps in the right order to do the job. Just for
fun, I also included a few complete wild goose chases -- a few things
that looked like they were supposed to manipulate your picture (with
careful explanations about how they were much more subtle than the
"gross" controls in other programs), but really did nothing, no matter
how you adjusted the controls. OTOH, make no mistake about it: I spent a
ridiculous amount of time making sure those useless controls followed
Apple's Human Interface Guidelines as closely as I possibly could. I
took a process that could be (and was) completely automated, and added
useless human intervention _every_ step of the way -- and even
introduced a couple of steps that had absolutely NO use at all except
for making you do more "stuff" before you were done. As a finishing
touch, I added the automation back in, but only to have it "coach" you
for the optimum setting each step of the way -- if you tried to do
things out of order OR set the controls wrong, it told you so.

The next April 1, I decided to send this piece of crap out to the Mac
users I know (including the one who'd originally commented about the
"boring" Windows version. Apparently none of them realized this was
supposed to be a joke -- I got back about a dozen emails exclaiming
about how wonderful it was to see a former Windows programmer really
"get" the Mac, and go to all the time and effort to design such a user
interface that (according to one of them): "really showed how beauty and
efficiency could be harmonized." Rather than people noticing how I'd
made them waste dozens of steps on things it already knew how to do, I
go praised for such a thoughtful touch of having it help guide you
through the process to produce such superb results.

--
Later,
Jerry.

The universe is a figment of its own imagination.
 
Reply With Quote
 
Ioannis Vranos
Guest
Posts: n/a
 
      06-28-2008
James Kanze wrote:
>
> I think I'm not expressing clearly what I'm thinking. The
> comments concerning the pre-processor do concern Qt, and were
> meant to explain why I only looked at Wx.



*What does QT do with the preprocessor*? I am a concerned because this
is the framework I decided that I will probably learn to use, because of
its support and documentation (books).


The book I have in mind:

[C++ GUI Programming with Qt 4 (2nd Edition)]:
http://trolltech.com/developer/books...-4-2nd-edition



All the books they suggest:

http://trolltech.com/developer/books/
 
Reply With Quote
 
Andreas Dehmel
Guest
Posts: n/a
 
      06-28-2008
On Sat, 28 Jun 2008 14:33:56 +0300, Ioannis Vranos wrote:

> James Kanze wrote:
> >
> > I think I'm not expressing clearly what I'm thinking. The
> > comments concerning the pre-processor do concern Qt, and were
> > meant to explain why I only looked at Wx.

>
>
> *What does QT do with the preprocessor*? I am a concerned because this
> is the framework I decided that I will probably learn to use, because of
> its support and documentation (books).


For the most part, the preprocessor is required to get signals/slots working
for your own classes derived from QObject (the Qt-base class for everything
that can have signals/slots). Essentially it checks for the macro Q_OBJECT
in your class declaration and creates special code for signals and slots. As
long as you only use Qt's classes, you won't need it. There are other uses
of the preprocessor (e.g. Qt-plugins), but you'll probably never need those.

I dislike non-compiler-internal preprocessors almost as much as James, but
the Qt one isn't nearly as bad as some of the ones I've come across (e.g.
Oracle's some yours back). I haven't seen it choke on valid C++ code (at least
not current incarnations), the biggest pain using it is trying to integrate
it into MSVC (don't ask...) because we haven't found a way to automatically
run it la make-patterns, so we have to define the extra build stage by
hand each time; that's really a MSVC shortcoming, though. The biggest
limitations I'm aware of are that you can't define new signals/slots in a
template class or a subclass (more on that below).

I often wished they'd implemented signals/slots properly within the language,
but ultimately the good easily outweighs the bad IMHO. If you're really unhappy
about the preprocessor, you can always create your own library of intermediate
classes where you define stubs slots as virtual functions, then you have to use
the processor in that library only and everything else can just overload these
functions and forget about the preprocessor (I've done that for some frequenty
used widgets, works fine). That way you can also overcome the two limitations
I mentioned above.


> The book I have in mind:
>
> [C++ GUI Programming with Qt 4 (2nd Edition)]:
> http://trolltech.com/developer/books...-4-2nd-edition


I think that's the one a colleague of mine had a look at before we started
porting a 3 million LOC project from Qt3 to Qt4. He wasn't that impressed
(could have been another book, though). The best way to learn it is probably
simply checking their examples (there are a lot of them) and getting your coding-
fingers dirty



Andreas
--
Dr. Andreas Dehmel Ceterum censeo
FLIPME(ed.enilno-t@nouqraz) Microsoft esse delendam
http://www.zarquon.homepage.t-online.de (Cato the Much Younger)

 
Reply With Quote
 
Ioannis Vranos
Guest
Posts: n/a
 
      06-29-2008
I have ordered "C++ GUI Programming with Qt 4 (2nd Edition)" and hope
for the best.
 
Reply With Quote
 
f.fracassi@gmx.net
Guest
Posts: n/a
 
      06-30-2008
On 29 Jun., 16:38, Ioannis Vranos <(E-Mail Removed)>
wrote:
> I have ordered "C++ GUI Programming with Qt 4 (2nd Edition)" and hope
> for the best.


It is quite OK as a beginners Guide, though not much more.
Besides there are always the great Documentation pages at
http://doc.trolltech.com/4.4/index.html. The Tutorials get you
started very fast, and I haven't found anything that I couldn't
gasp from the articles under "Core Features" or "Key Technologies".
All in all Qt's Online Doc belongs to the best Tech Docs I ever
used.

And even though I don't like the preprocessing either, it just works,
and even helps to cut some dependencies.
The rest of Qt's design decisions are sound, and the API is very clean
and unsurprising.

HTH

Fabio

 
Reply With Quote
 
f.fracassi@gmx.net
Guest
Posts: n/a
 
      06-30-2008
On 27 Jun., 21:37, James Kanze <(E-Mail Removed)> wrote:
[...]
>*And whether it looks good or not depends on
> whose programming it: you can create ugly and inefficient GUI's
> with any tool kit. *(Most of what makes a GUI beautiful or ugly
> is situated at a level above the tool kit.) *It provides the
> tools to support well designed GUI's, if that's what you want.
>


While it is certainly true that you can create ugly GUI's in any
tool kit, some make it much easier than others. In Qt for example
your application is as ugly or beautiful as the rest of your
(or your users) desktop, by default, since it automatically integrates
with the native style. Of course you can use theming to create other
styles.

>
> And of course, given my background, I especially liked the fact
> that I could have a Motif look and feel.
>


Qt also comes with a Motif Theme if that is what you call not ugly

Regards

Fabio




 
Reply With Quote
 
Gernot Frisch
Guest
Posts: n/a
 
      06-30-2008

> The next April 1, I decided to send this piece of crap out
> [...]
> go praised for such a thoughtful touch of having it help guide you
> through the process to produce such superb results.


Best story ever! I also get the feeling that you can make more money with a
program to sort your MP3 files by length, date, file size of date of
creation, than with any rogram that migth be of use.

 
Reply With Quote
 
Gernot Frisch
Guest
Posts: n/a
 
      06-30-2008

> For the most part, the preprocessor is required to get signals/slots
> working
> for your own classes derived from QObject


....which could have been made entirely using standart C++ technique, IF one
knows how to program.

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Re: Portable library to create GUI intefaces ? Tiib C++ 1 07-23-2010 12:59 AM
Portable library to create GUI intefaces ? Timothy Madden C++ 10 07-22-2010 06:50 AM
ActivePython - how to configure portable framework? balzer Python 1 05-08-2010 03:34 PM
Portable Python - free portable development environment ! perica.zivkovic@gmail.com Python 7 01-13-2007 11:19 AM
portable (VHDL) vs. non-portable (altera LPM) approaches to signed computations Eli Bendersky VHDL 1 03-01-2006 02:43 PM



Advertisments