[Y-devel] [PATCH] Slider Widget, With Signals

Casey Winans casey at cwinans.com
Fri Feb 27 15:30:13 GMT 2004


On Fri, 2004-02-27 at 01:34 -0500, Chris Amshey wrote:
> Here's the patch for the slider widget again, with signals added.
> The signal is Slider.valuechanged, defined as Signal1 <void, int> valuechanged,
> and is sent every time there is a change to the slider value.

> It also issues a 'clicked' signal in the same manner as a button, partly
> because it was derived from button, and partly because 'clicked' is
> listed as something it should do in some propositions floating around,
> but I think this is wrong. I think it should emit the valuechanged signal
> it has now, and a finalvalue signal when the mouse is released. 
> (I'm guessing no one did since a slider without the valuechanged signal
> is a fairly useless creature except as another toy in ysample ... ;))

The client should be notified of every value change via the valueChanged
signal. Only being informed at the start and end of the changes will be
perceived as a sluggish UI. While that's not technically true that's how
the user will see it.

You should study how the interactive resizing problem was solved on the
Canvas. It's on page 28 of Mark's thesis.

The client will be notified that the value has changed via the
valueChanged signal, but the client will have to request the new value
on it's own (the signal won't contain that information). That way the
content being scrolled is updated interactively while "pooling" some of
the valueChanged signals to reduce painting operations.

--
Casey Winans




More information about the Y-devel mailing list









2026 © www.Y-Windows.Org - All Rights Reserved