[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [paragui-users] event is not passed to the parent
From: |
Alexander Pipelka |
Subject: |
Re: [paragui-users] event is not passed to the parent |
Date: |
25 Apr 2002 21:42:54 +0200 |
Am Don, 2002-04-25 um 20.50 schrieb Steffen Blume:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Hi!
> Here is my problem:
> I created a PG_Widget with three PG_ThemeWidget childs. Each of this has
> several Buttons. I want to process the buttonclicks in the parent PG_Widget.
> The ThemeWidgets does not have an method eventButtonClick neither have the
> buttons. I thought if the event isn't processed by a widget's child neither
> by the widget itself, it will be passed to the parent, but eventButtonClick
> of my parent isn't called.
You should use SetEventCallback or SetEventObject to connect the message
to a callback (MSG_BUTTONCLICK). The "click" events are only passed one
level up.
I'm currently rethinking (and redesigning) the eventcallbacks. There is
a good chance that all eventXXX functions will disappear in version 1.2
or 2.0 (i'm considering libsigc++ as callback mechanism).
> Another thing (not important):
> When a widget is created internaldata->widgetParent is set in
> PG_Widget::InitWidget. If it is != NULL AddChild of the parent is called.
> There RemoveChild is called, because child->internaldata->widgetParent is
> set, althougt it is not a child of the parent (up to now). Then
> child->internaldata->widgetParent is set to this. Has this to be like this?
> Looks strange to me, but works ;-)
Everything ok with this. It's a bit tricky but necessary :))
(an in depth explanation would take too long).
Alex