rem: RColor	color; int		value[4]; char	tmp[3];  W_ColorPanel *panel = (W_ColorPanel*)data;  value[0] = WMGetSliderValue(panel->cmykCyanS); value[1] = WMGetSliderValue(panel->cmykMagentaS); value[2] = WMGetSliderValue(panel->cmykYellowS); value[3] = WMGetSliderValue(panel->cmykBlackS);  sprintf(tmp, "%d", value[0]); WMSetTextFieldText(panel->cmykCyanT, tmp); sprintf(tmp, "%d", value[1]); WMSetTextFieldText(panel->cmykMagentaT, tmp); sprintf(tmp, "%d", value[2]); WMSetTextFieldText(panel->cmykYellowT, tmp); sprintf(tmp, "%d", value[3]); WMSetTextFieldText(panel->cmykBlackT, tmp);  color.red = rint((255.0 - (value[0] * 2.55)) * (1.0 - (value[3] / 100.0))); color.green = rint((255.0 - (value[1] * 2.55)) * (1.0 - (value[3] / 100.0))); color.blue = rint((255.0 - (value[2] * 2.55)) * (1.0 - (value[3] / 100.0)));  WMSetColorPanelColor(panel, color); panel->lastChanged = WMCMYKModeColorPanel;
add: RColor    color; int        value[4]; char    tmp[4];  W_ColorPanel *panel = (W_ColorPanel*)data;  value[0] = WMGetSliderValue(panel->cmykCyanS); value[1] = WMGetSliderValue(panel->cmykMagentaS); value[2] = WMGetSliderValue(panel->cmykYellowS); value[3] = WMGetSliderValue(panel->cmykBlackS);  sprintf(tmp, "%d", value[0]); WMSetTextFieldText(panel->cmykCyanT, tmp); sprintf(tmp, "%d", value[1]); WMSetTextFieldText(panel->cmykMagentaT, tmp); sprintf(tmp, "%d", value[2]); WMSetTextFieldText(panel->cmykYellowT, tmp); sprintf(tmp, "%d", value[3]); WMSetTextFieldText(panel->cmykBlackT, tmp);  color.red = rint((255.0 - (value[0] * 2.55)) * (1.0 - (value[3] / 100.0))); color.green = rint((255.0 - (value[1] * 2.55)) * (1.0 - (value[3] / 100.0))); color.blue = rint((255.0 - (value[2] * 2.55)) * (1.0 - (value[3] / 100.0)));  WMSetColorPanelColor(panel, color); panel->lastChanged = WMCMYKModeColorPanel;
context: cmykSliderCallback(WMWidget *w, void *data){	RColor	color;	int		value[4];	char	tmp[3];		W_ColorPanel *panel = (W_ColorPanel*)data;	value[0] = WMGetSliderValue(panel->cmykCyanS);	value[1] = WMGetSliderValue(panel->cmykMagentaS);	value[2] = WMGetSliderValue(panel->cmykYellowS);	value[3] = WMGetSliderValue(panel->cmykBlackS);		sprintf(tmp, "%d", value[0]);	WMSetTextFieldText(panel->cmykCyanT, tmp);	sprintf(tmp, "%d", value[1]);	WMSetTextFieldText(panel->cmykMagentaT, tmp);	sprintf(tmp, "%d", value[2]);	WMSetTextFieldText(panel->cmykYellowT, tmp);	sprintf(tmp, "%d", value[3]);	WMSetTextFieldText(panel->cmykBlackT, tmp);	color.red = rint((255.0 - (value[0] * 2.55)) * (1.0 - (value[3] / 100.0)));	color.green = rint((255.0 - (value[1] * 2.55)) * (1.0 - (value[3] / 100.0)));	color.blue = rint((255.0 - (value[2] * 2.55)) * (1.0 - (value[3] / 100.0)));				WMSetColorPanelColor(panel, color);	panel->lastChanged = WMCMYKModeColorPanel;}