|
Boost : |
From: Mathew Robertson (mathew.robertson_at_[hidden])
Date: 2004-08-22 18:14:32
[This assumes I understand what you are refering to with the term "design time"...]
> >> VC++ Managed C++ .NET is very nice but it is even further away from
> >> standard C++. In neither do you have to write hundreds of lines of
> >> code to do any GUI programming of significance. In order to have a
> >> really top-rate C++ GUI library I believe one needs reflection in
> >> C++ in order to do the sort of
> >
> > Not true. It would be great if you had reflection, but it's not a
> > necessity.
> >
> > I'll show you (in about 3-4 months) that you don't need reflection to
> > set GUI properties at design time. It'll be just like VB, but only
> > better ;)
>
> I am very interested in this and would like very much to see how you will do
> this at design time. In particular I am interested in how event handlers can
> be set at design time. All without C++ reflection of course and using
> strictly the C++ standard, since you are confident that this can be done. My
> view of event handlers is that any "component" ( see below ) within such a
> system should be capable of handling any event generated by any other
> component; which is true of both C++ Builder and Managed C++/.NET.
This can be handled by the FOX library _now_. If a widget is capable of handling the incoming event, then it does handle it, otherwise the event just propogates its way back up with widget tree, or it doesn't get handled.
It works because it uses message maps which are statically defined (-> they are a design time constraint) -> no need for reflection - either the widget has a handler for the event in its message map, or it doesn't.
> >> easy RAD programming which C++ Builder and Managed C++ .NET provide.
> >> Needless to say, both use extensions to C++ to do reflection. This
> >> is not a knock on any of the GUI libraries mentioned, but after
> >> using C++ Builder and Managed C++ .NET, even despite their
> >> non-C++-isms, most C++ GUI libraries are very primitive by contrast.
> >
> > I donot understand what you mean by the last sentence.
>
> In the sense that one has to do work at run-time when it could be done at
> design time. Please notice I said 'most', not all. If you, or anyone else,
> could come up with a RAD C++ GUI development environment which works with
> 98%+ conforming C++ compilers ( Como, gcc, VC++ 7.1, Intel etc. ) and
> enables one to easily set properties and events at design time, ala C++
> Builder and Managed C++/.NET, I would be very interested in it and would
> contribute to it any way that I can if I liked the design. By GUI I also
> means the sort of components ( properties and events along with traditional
> C++ method-based programming ) which are supported by C++ Builder and
> Managed C++. I think non-visual components are also very important and
> should be available for design time configuration just as much as visual
> components in such a GUI environment.
FOX has most of this already, simply because you can _only_ set your properties and event at design time, ie: a widget cannot automagically handle new types of events. However you can use either inheritance or event dispatch to extend the widgets' capabilities - but again only at design time.
Mathew
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk