Re: need some design advice
- From: Antonio Coralles <noche suapie reflex at>
- To: gtkmm-list gnome org
- Subject: Re: need some design advice
- Date: Tue, 05 Apr 2005 03:21:06 +0200
Rob Benton wrote:
> 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.
I don't know exactly what you want to to, but if these four event boxes
are classes of a type you use just inside this table, i would consider
using a static stl-container (whatever seems suitable) class variable
where every instace registers during construction and unregisters on
destruction ...
But this is really just a guess, as i don't know what you want to do in
detail.
antonio
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]