Boost logo

Boost :

From: Thorsten Ottosen (nesotto_at_[hidden])
Date: 2004-03-03 18:57:03

"David Turner" <dkturner_at_[hidden]> wrote in message
> hi
> > I'm in full support of your effort. Just a small comment:
> >
> > int main(int argc, char* argv[])
> > {
> > window w = create_window();
> > w->title("Example window");
> >
> > why is window implicitly a pointer?
> In fact, window is defined thus:
> typedef boost::shared_ptr<window_base> window;
> The reason is that widgets are always reference-counted. The alternative
> would have been to make window a pimpl class, with the impl being
> reference counted. However, since I wanted to use the factory pattern to
> firewall the implementation of widgets, I would have to have my widgets on
> the heap anyway, so I just made widget a shared pointer to the WDT (whole
> damn thing).
> Does that make sense? :-)

yeah its ok, I was thinking that seing window and not window* could confuse

> > Adn maybe
> >
> > 9. It should be possible to create worm-like games in it, where student
> > need
> > to draw the worm by moving
> > pixels or something around :-)
> Ha ha, yes.

Just to be sure, I'm not kidding. I assume a C++ gui lib should be possible
to use to learn C++. Writing small
games by moving pixels around is a great way to practice, much more fun than
making a menu or pop-up box.



Boost list run by bdawes at, gregod at, cpdaniel at, john at