Re: forwarding a signal



> Hello
>
> I created a widget like this:
>
> class AxeWidget : public Gtk::VBox
> {
>   public:
>     AxeWidget(hkl::Axe & axe);
>     virtual ~AxeWidget(void);
>     void update(bool const & connect);
>
>   protected:
>
>     virtual void on_spinbutton_value_changed();
>
>     hkl::Axe & m_axe;
>
>     Gtk::Label m_label;
>     Gtk::SpinButton m_spinbutton;
>     sigc::connection m_on_value_changed;
> };
>
> I would like for another class to connect to a signal
> AxeWidget.signal_value_changed() with is in fact the
> m_spinbutton.signal_value_changed().
> How can I proceed ?

I do this by defining a new signal and then emitting that signal, in
response to the first signal.

I would like some generic signal delegation/forward technique, for use
with a deep parent-child hierarchy of widgets, but I haven't thought of
one yet.


Murray Cumming
murrayc murrayc com
www.murrayc.com
www.openismus.com




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