|
Boost : |
From: Reece Dunn (msclrhd_at_[hidden])
Date: 2005-09-27 05:22:20
David Wehite wrote:
>In his article "The Design of C++0x", published in C/C++ Users Journal, May
>2005, the author of C++ Bjarne Stroustrup wrote, "The most commonly
>requested new feature for C++ is a standard GUI".
And the most debated as to how it would work ;)
>I am new to Boost and will appreciate if some folks here would give me a
>summary of Boost organization's standing on such a standard GUI library. If
>and how was it addressed and pointers to work on the subject if such has
>been done.
I have, as well as many others, have made attempts into this brave new world
;).
I suggest getting the framework right first to allow the support for the
GUI/Graphics libraries to be build on top of them.
(1) Platform -- detection for what GUI library is being used; native (GTK?,
PalmOS API, Win32 API, etc.), native extension (ATL/WTL, MFC, GDK+, etc.) or
cross-platform (wxWidgets, Qt, etc.) and the platform being used for that
cross-platform GUI. This could be an extension to Boost.Config with
platform/win32.hpp, platform/wxwidgets.hpp, etc.
(2) String Library -- helpers to interact with native string types (e.g.
wxString and ATL::CString) and C++ strings std::[w]string; native version of
std::[w]string for platforms that use wide character strings; conversion
routines and other helpers.
(3) Colour Library -- there is a discussion of a colour library elsewhere on
this list. This is one step to a standard GUI library, but must implicitly
(by default?) support the platform being targetted.
(4) Coordinates Library -- holding coordinate primitives: point (with its
alias size) and rect are a minimum here; matrix and other transforms? what
about interactions with other Boost libraries? 2D/3D support (e.g. the
Windows GDI verses DirectX)? mixing different compatible systems?
I would like to do something like:
boost::coord::point2d pos;
::GetCursorPos( pos.native()); // handle POINT <==> point2d conversions
Advanced Libraries --
(5) Graphics -- Mixing different graphical systems (e.g. Win32 GDI, GDI+ and
DirectDraw/Direct3D).
>I just want to clarify, that when I say "standard", I mean that as long as
>my application source code adheres to that standard, if I take it and walk
>into any machine that has a C++ compiler (at least one that deserves that
>title), compilation would at least not fail for syntax reasons, w/o me
>changing a single character in the source (not even changing the case of a
>character), no matter how complex and/or large that source is.
This should be one of the goals. It should also be possible to hook into the
native code (GTK, wxWidgets, WTL, Win32, PalmOS API, etc.) when/if you want
to.
- Reece
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk