After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 90127 - Bug in example 'rulers' and wrong enum names in Gtk::Ruler's ref doc
Bug in example 'rulers' and wrong enum names in Gtk::Ruler's ref doc
Status: RESOLVED FIXED
Product: gtkmm
Classification: Bindings
Component: general
2.0
Other other
: Normal normal
: ---
Assigned To: gtkmm-forge
gtkmm-forge
Depends on:
Blocks:
 
 
Reported: 2002-08-07 16:52 UTC by Martin Schulze
Modified: 2004-12-22 21:47 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
A patch to fix the described problems. (2.45 KB, patch)
2002-08-07 16:54 UTC, Martin Schulze
none Details | Review

Description Martin Schulze 2002-08-07 16:52:48 UTC
The example 'rulers' doesn't work at the moment because pointer motion
events (on which the motion of the marker on the rulers is triggered) are
quite rare. This is because 'Gdk::POINTER_MOTION_HINT_MASK' has been added
to the event mask of the drawing area. Also while a mouse button is
pressed, no motion events will be emitted unless 'Gdk::BUTTON_PRESSED_MASK'
is added to the event mask of the drawing area. This seems strange and I'll
report on the gtk+ ml.

Gtk::Ruler's reference documentation contains gdk macro names instead of
our enum names.
Comment 1 Martin Schulze 2002-08-07 16:54:12 UTC
Created attachment 10341 [details] [review]
A patch to fix the described problems.
Comment 2 Murray Cumming 2002-08-07 18:25:09 UTC
Is this now the same as the C example?
Comment 3 Martin Schulze 2002-08-07 20:35:21 UTC
No, they do something really weird and if I do the same in gtkmm
(using C code because I can't access the protected member function
Gtk::Widget::on_motion_notify_event()) it somewhat works but only if
no mouse button is not held down:


 gtk_widget_set_events (area, GDK_POINTER_MOTION_MASK |
   GDK_POINTER_MOTION_HINT_MASK);
 ...
 g_signal_connect_swapped (G_OBJECT (area), "motion_notify_event",
   G_CALLBACK (EVENT_METHOD (hrule, motion_notify_event)), hrule);

Comment 4 Murray Cumming 2002-08-08 09:35:18 UTC
Yes, I remember that now. Thanks a lot.