Example #1
0
void SkSliderView::setValue(U16CPU value)
{
	if (fValue != value)
	{
		U16 prev = actual_value(fValue, fMax);
		U16 next = actual_value(value, fMax);

		fValue = SkToU16(value);
		if (prev != next)
		{
			this->inval(nil);

			if (this->hasListeners())
			{
				SkEvent	evt;
				
				evt.setType(SkWidgetView::GetEventType());
				evt.setFast32(this->getSinkID());
				evt.setS32("sliderValue", next);
				this->postToListeners(evt);
			}
		}
	}
}
 Constant constant_expr() override {
   unsigned width = bitsize_traits<T>::value;
   bool sign = crave::is_signed<T>::value;
   return Constant(actual_value(), width, sign);
 }
 operator T() const { return actual_value(); }