rem: RColor	color; char	tmp[3]; int		value[3]; int		n; W_ColorPanel	*panel = (W_ColorPanel*)observerData;  value[0] = atoi(WMGetTextFieldText(panel->rgbRedT)); value[1] = atoi(WMGetTextFieldText(panel->rgbGreenT)); value[2] = atoi(WMGetTextFieldText(panel->rgbBlueT));  for (n=0; n < 3; n++) { if (value[n] > 255) value[n] = 255; if (value[n] < 0) value[n] = 0; }  sprintf(tmp, "%d", value[0]); WMSetTextFieldText(panel->rgbRedT, tmp); sprintf(tmp, "%d", value[1]); WMSetTextFieldText(panel->rgbGreenT, tmp); sprintf(tmp, "%d", value[2]); WMSetTextFieldText(panel->rgbBlueT, tmp);  WMSetSliderValue(panel->rgbRedS, value[0]); WMSetSliderValue(panel->rgbGreenS, value[1]); WMSetSliderValue(panel->rgbBlueS, value[2]);  color.red = value[0]; color.green = value[1]; color.blue = value[2];  WMSetColorPanelColor(panel, color); panel->lastChanged = WMRGBModeColorPanel;
add: RColor    color; char    tmp[4]; int        value[3]; int        n; W_ColorPanel    *panel = (W_ColorPanel*)observerData;  value[0] = atoi(WMGetTextFieldText(panel->rgbRedT)); value[1] = atoi(WMGetTextFieldText(panel->rgbGreenT)); value[2] = atoi(WMGetTextFieldText(panel->rgbBlueT));  for (n=0; n < 3; n++) { if (value[n] > 255) value[n] = 255; if (value[n] < 0) value[n] = 0; }  sprintf(tmp, "%d", value[0]); WMSetTextFieldText(panel->rgbRedT, tmp); sprintf(tmp, "%d", value[1]); WMSetTextFieldText(panel->rgbGreenT, tmp); sprintf(tmp, "%d", value[2]); WMSetTextFieldText(panel->rgbBlueT, tmp);  WMSetSliderValue(panel->rgbRedS, value[0]); WMSetSliderValue(panel->rgbGreenS, value[1]); WMSetSliderValue(panel->rgbBlueS, value[2]);  color.red = value[0]; color.green = value[1]; color.blue = value[2];  WMSetColorPanelColor(panel, color); panel->lastChanged = WMRGBModeColorPanel;
context: rgbTextFieldCallback(void *observerData, WMNotification *notification){	RColor	color;	char	tmp[3];	int		value[3];	int		n;	W_ColorPanel	*panel = (W_ColorPanel*)observerData;	value[0] = atoi(WMGetTextFieldText(panel->rgbRedT));	value[1] = atoi(WMGetTextFieldText(panel->rgbGreenT));	value[2] = atoi(WMGetTextFieldText(panel->rgbBlueT));	for (n=0; n < 3; n++) {		if (value[n] > 255)			value[n] = 255;		if (value[n] < 0)			value[n] = 0;	}	sprintf(tmp, "%d", value[0]);	WMSetTextFieldText(panel->rgbRedT, tmp);	sprintf(tmp, "%d", value[1]);	WMSetTextFieldText(panel->rgbGreenT, tmp);	sprintf(tmp, "%d", value[2]);	WMSetTextFieldText(panel->rgbBlueT, tmp);	WMSetSliderValue(panel->rgbRedS, value[0]);	WMSetSliderValue(panel->rgbGreenS, value[1]);	WMSetSliderValue(panel->rgbBlueS, value[2]);		color.red = value[0];	color.green = value[1];	color.blue = value[2];		WMSetColorPanelColor(panel, color);	panel->lastChanged = WMRGBModeColorPanel;}