need some design advice



Here's my situation. I have a Gtk::Table holding a number of Gtk::EventBox's defined at runtime. I want to catch a click/button_press event on each of the eventboxes. Inside this handler I also want to be able to check the status of the surrounding eventboxes. But I can't send a call back to the table b/c that makes a circular dependency between the 2 classes.

The only half-sane solution I could come up with is to give each eventbox class 4 member variables which are pointers to the 4 eventboxes around it. But I'm thinking there's a better way to do this. Help me out here.



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