![](https://secure.gravatar.com/avatar/b47d036b8f12e712f4960ba78404c3b2.jpg?s=120&d=mm&r=g)
W dniu 12 czerwca 2010 08:39 użytkownik Jon Cruz <jon@...18...> napisał:
That's not the main reason.
One of the reasons that was at least meaningful early on is to allow access to widgets after construction.
Sometimes you can set everything up cleanly in event handlers, but I've see it more common to come up with needing to access at least some widgets in other handlers, etc.
When using Gtk::manage for all widgets in a dialog, the widgets that need to be accessed after creation can be added to the .h file as pointers to partially specified types; this provides consistency without requiring header bloat, e.g.
class SomeWidget; class SomeDialog { ... private: SomeWidget *_widget_that_needs_to_be_accessed_after_creation; };
However, I see no point in specifying *all* widgets as members of the dialog. The advantages are unclear and at the same time it makes dialog coding very tedious.
Regards, Krzysztof