Re: Custom signal emission

On Thu, 2009-10-15 at 17:38 -0700, Renato Merli wrote:
> --- Em qui, 15/10/09, Галымжан Кожаев <kozhayev gmail com> escreveu:
> > If i understand you correctly, you
> > need to run
> > someWidget.signal_size_allocate().emit(p); where someWidget
> > is an
> > instance of your widget and p is a Gtk::Allocation object.
> When i try what you told, i get the following error message:
> 'class Glib::SignalProxy1<void, Gtk::Allocation&>' has no member named 'emit'

Standard gtkmm signals wrap existing GTK+ signals. They don't offer a
way to emit them because this is generaly not a good idea.

If you must then you can use the regular C API to emit the underlying C
signal. Sometimes there is a C function that emits the specific signal,
sometimes doing extra checks.  

It's generally impossible to say if emitting a particular GTK+ signal is
a good idea without knowing more about what you are doing.

> > >  I want to run on_size_allocate() by emiting the
> > corresponding signal. how
> > > to do that ?

murrayc murrayc com

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