Problems with Rulers in gtk--



Since 1.0.0 and 0.8.0 gtk and gtk-- have really improved.
But now I'm trying to attach 2 scrollbars to a drawing area,
basically like in "testgtk". This works fine, by putting the rulers
and the drawing_area in a table, but a can't get the connect to work.

That connect should connect the motion_notify_event of the drawing_area to
to ruler, but I can't find a correct syntax.

I tried

connect(drw_area.motion_notify_event,&hruler,Gtk_HRuler::motion_notify_event);

and I get:
colorbutton.cc:99: type unification failed for function template `template
<class rettype, class T> class Connection connect(Signal0_r<...> &, T *,
rettype (T::*)())'

with
connect(drw_area.motion_notify_event,&hruler,Gtk_HRuler::motion_notify_event_imp
l) ;

it says the _impl() function is protected...

In the C original it says

gtk_signal_connect_object (
        GTK_OBJECT (window),
        "motion_notify_event",
        GTK_SIGNAL_FUNC(
          GTK_WIDGET_CLASS (GTK_OBJECT (ruler)->klass)->motion_notify_event),
        GTK_OBJECT (ruler));   
but I can't quite translate that to c++, and I don't know how to add the
necessary stuff to gtk-- :-(

So if anyone knows how to handle this...

Any help is appreciated...

Bye bye, Oliver



----------------------------------
E-Mail: Oliver Freyd <freyd@uni-muenster.de>
Date: 18-Apr-98
Time: 00:16:33

This message was sent by XFMail
----------------------------------



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