Exemplo n.º 1
0
void Vibrator::setValue( unsigned int value )
{
	if ( value>mMaxValue )
		value=mMaxValue;
	if ( value==mValue )
		return;
	internalSetValue( value );
	mValue = value;
	notifyComponentChanged();
}
void ZLWin32ApplicationWindow::TextEditParameter::setValueList(const std::vector<std::string> &values) {
	std::string oldValue = internalValue();

	if (myParameterItem.type() == ZLToolbar::Item::TEXT_FIELD) {
		return;
	}

	SendMessage(myComboBox, CB_RESETCONTENT, 0, 0);

	ZLUnicodeUtil::Ucs2String buffer;
	for (std::vector<std::string>::const_iterator it = values.begin(); it != values.end(); ++it) {
		SendMessage(myComboBox, CB_ADDSTRING, 0, (LPARAM)::wchar(::createNTWCHARString(buffer, *it)));
	}

	if (values.size() > 0) {
		SendMessage(myComboBox, CB_SETMINVISIBLE, std::min((int)values.size(), 7), 0);
	}

	internalSetValue(oldValue);
}
Exemplo n.º 3
0
void ZLApplicationWindow::VisualParameter::restoreOldValue() {
	internalSetValue(myValue);
}
Exemplo n.º 4
0
void ZLApplicationWindow::VisualParameter::setValue(const std::string &value) {
	if (value != myValue) {
		myValue = value;
		internalSetValue(value);
	}
}