Re: [gtkmm] Obtaining a pointer to an object

Miller, Ryan D wrote:

That sounds like a simple solution I'll hack in for now.  Thanks
Christer!  What I was hoping for was a way to not need to rely on having
the parent class having accessors to each class pointer.  Eventually,
everything will be declared dynamically as needed, so I was hoping there
might be something I could use in Gtk (like Gtk::manage) that kept track
of the objects and their hierarchy.

Well, gtkmm does of course keep track of the widget hiearchy and you can traverse it, although this is not very simple. But normally, it would be good design to avoid having objects magically modifying objects other than "child" objects without someone telling them to. Perhaps if you told us more about what you are looking to achieve on a higher, not technical, level?

Christer Palm

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]