mono/xwt — pull request #388 by sevoku (2014-09-02 08:15:11+00:00)
Title: Add SpinButton custom formatting support

Adds ValueInput, ValueOutput events for custom value-text, text-value conversion.
Additionally the shown text can be manipulated through the new Text property.

This makes the SpinButton much more flexible. The included examples show spin buttons with different number formats like hex or scientific floats. The new events can be used to convert the numeric value to any text output and to parse the users input back to a numeric value. The input text can be accessed directly for this purpose.

![Xwt SpinButton Demo](https://cloud.githubusercontent.com/assets/951587/4115524/229d8ede-3279-11e4-9505-f1daeaeb8039.png)

The pattern is similar to Gtk. A change of the numeric value triggers the ValueOutput event. The handler must do the conversion, assign the Text property and set args.Handled. Otherwise the conversion is handled by the backend. A user input (text change) triggers ValueInput. The handler must assign the args.NewValue property of the event args object and set args.Handled.

If the events are not handled (args.Handled = false, or nor even subscribed), the backends behave as usual.