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

Chris Amshey ychris at amshey.net
Fri Feb 27 06:34:50 GMT 2004


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 ... ;))

Min, max, and current values are set via properties, similarly to
button labels, etc.

Behaviour is good but not perfect, and proper display, like many
things currently, relies on hardcoded values, but I'll post some
thoughts on resolving that in a bit.

If anybody applied my first version of this patch, ask and I'll send you
a minipatch to update; otherwise, this patch is a changeset against the
current tree (Y--devel--0.2--patch26). Unpack and apply with tla dopatch
to try it out.

--Chris
-------------- next part --------------
A non-text attachment was scrubbed...
Name: sliderpatch.gz
Type: application/octet-stream
Size: 4914 bytes
Desc: not available
Url : https://www.y-windows.org/pipermail/y-devel/attachments/20040227/3c8e96e2/sliderpatch.obj


More information about the Y-devel mailing list









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