Re: Recording widget motion



On Thu, Sep 07, 2006 at 09:42:16AM -0400, Samuel Cormier-Iijima wrote:

I thought g_timeout_add
would cause timing to be off (it would unsynchronize over time), but
using a GTimer fixed it.

Yes, g_timeout_add() is just a best-effort timer, no
real-time.  But many apps do not need to run the callbacks
in precise intervals, they only need to know precisely when
the callback is actually called -- and this can be done with
a GTimer as you did.

The problem I'm currently having is this: I'd
like to know when the user is "holding" the slider, that is, has the
mouse button pressed on the slider itself, not in the "trough", so
that the user can record "over" his previous recording. This is kinda
hard to explain, and I'm not sure if it's a good idea from a UI point
of view...

I think I understand, but I'm afraid Gtk+ provides no public
interface for that.  Especially the extreme no-motion case
is hardly detectable, that is when user just presses the
slider but does not move it at all to set a fixed value over
a time interval.  IMO it's not a bad UI idea, except that
the value the slider `wants' at given moment (from previous
recording) becomes invisible once you press it.  So it's
hard not to cause a jump when you release it.  But it can be
visualized somehow.

In similar situations one can fork the Gtk+ widget and add
the required functionality, although in this case the fork
would have to include at least GtkRange, GtkScale, GtkHScale
and/or GtkVScale.

Yeti


--
Anonyms eat their boogers.



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