|
Boost : |
From: Reece Dunn (msclrhd_at_[hidden])
Date: 2004-08-25 06:22:45
Miro Jurisic wrote:
>I also believe this community is capable of producing such a framework, but
>I
>think that it's telling that the title of this thread is "Java style GUI in
>C++"; a Java style GUI typically implies making user experience sacrifices
>on
>every platform, and therefore I believe that a "Java style GUI in C++" is
>likely
>to be driven by misguided goals.
What I meant by "Java style GUI" is not in terms of L&F, but in terms of
programming the framework. I understand how important having a native L&F is
to the particular OS you are using (implemented using OS components for
native feel): this is one of the goals I am aiming for.
Thus, in Java Swing-style C++, you can do something like:
boost::gui::frame * main = new boost::gui::frame( "My GUI App" );
frame -> set_pane( new boost::gui::button( "PUSH" ));
frame -> set_size( 500, 400 );
frame -> show();
boost::gui::message_loop msg;
return msg.execute();
And this will work, creating a window with a button in it's "client" area.
That is, allow the user to:
[1] create components/widgets using constructors instead of Create functions
(like MFC);
[2] allow "native" components (buttons, etc.) and windowless components (for
performance);
[3] provide a set of "layout managers" that are windowless components
allowing you to specify scrolling panes, splitter panes, grid layouts, flow
layouts, fixed/stretchy layouts and so on -- I personally find using layout
managers easy to produce interfaces rapidly;
[4] avoid message maps if possible -- I personally don't like message maps
and feel there is a better way to implement event handling. From the
discussions here boost::signal seems to be the way to go, but some effort
needs to be taken to produce a flexible, portable way of handling messages
that can both write generic handlers and OS-specific handlers;
That is what I mean by a Java-style C++ GUI framework.
Regards,
Reece
_________________________________________________________________
Want to block unwanted pop-ups? Download the free MSN Toolbar now!
http://toolbar.msn.co.uk/
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk