How to limit signal propagation?
- From: "Daniel Haude" <dunno stoptrick com>
- To: gtk-app-devel-list gnome org
- Subject: How to limit signal propagation?
- Date: Thu, 01 Jun 2006 17:06:16 +0200
Hello,
now I that I goy my custom widget working, of course there are more
questions.
This widget has no less than five adjustments associated with it -- the
widget lets the user select a rectangular region from a large square area;
the rectangle has a center point, a width, a height, and it can be
rotated. These five parameters are also reflected onto five spinbuttons.
As the user drags and rotates the rectangle with the mouse, the widget
keeps emitting "value_changed" signals to the five adjustments so that the
spinbuttons' contents are continuously updated. Of course the
"value_changed" signals are also reflected back into the widget's five
callbacks, each of which initiates the recalculation of the rectangle's
corners' coordinates and a re-draw of the window. That's five redraws
where one will do.
I tried to make the redraw of the widget dependent on a flag set and unset
by enter and leave events, but that doesn't work when the user activates
the spinbuttons by keyboard while leaving the pointer inside my widget.
Suggestions, anyone?
--Daniel
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]