Example #1
0
void View::Add(ControlPtr c)
{
	int index = c->GetParamIndex();

	if (index > -1)
	{
		ParamInfo *pi = (ParamInfo *)_listener->GetParamInfo(index);
		if (pi != NULL)
		{
			c->SetMin(pi->GetMin());
			c->SetMax(pi->GetMax());
		}
	}

	c->_listener = _listener;
	c->Create();
	_cl.push_back(c);

	if (index > -1)
	{
		double value = _listener->GetParamValue(index);
		c->SetNormalValue(value);
	}
}