Re: configure event in children



On Mon, Apr 20, 2009 at 09:58:39AM +0200, Krzesimir Nowak wrote:

> Well, maybe mixing connect_notify with signals returning a value (x
> events return bool) is doing something wrong, since connect_notify
> connects a signal to a signal handler without a return value. I would
> try writing:
> notebook.signal_configure_event().
>     connect(sigc::mem_fun(*this, &EditorWin::on_my_configure_event),
> false);
> where EditorWin::on_my_configure_event has a prototype:
> 
> bool EditorWin::on_my_configure_event(GdkEventConfigure*
> configure_event);
> 
> which return true on success or false otherwise.

Many thanks for your reply.  Unfortunately, it doesn't make a
difference how I connect.  And to be honest, I would not have expected
it to either.  As far as I understand, the difference between connect
and connect_notify is merely that in the first case you connect to a
function which has the same signature as the default handler, and in
the other to a function without return value.

If you call connect, then true as a return value indicates that you
don't want to call the default handler afterwards, I think.  So the
return value is not so much about success or not, and moreover, it
should not determine whether or not the handler is called at all.

My suspicion is that there is some "magic" involved in forwarding the
configure-event to a window's children, which I can't seem to figure
out.  

But please, anybody, correct me if I'm wrong.  :-)

I'm just trying to get my head around gtkmm.  :-)

Thanks for your comments,

Andreas.


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