static int param_init(void) { if (!param) { return param_set_value("param"); } return 0; }
static int param_set(const char *buffer, const struct kernel_param *kp) { if (param) { kfree(param); } return param_set_value(buffer); }
void ScalarParam::param_set_range(gdouble min, gdouble max) { this->min = min; this->max = max; param_set_value(value); // reset value to see whether it is in ranges }
bool ScalarParam::param_readSVGValue(const gchar * strvalue) { double newval; unsigned int success = sp_svg_number_read_d(strvalue, &newval); if (success == 1) { param_set_value(newval); return true; } return false; }
void ScalarParam::param_set_range(gdouble min, gdouble max) { // if you look at client code, you'll see that many effects // has a tendency to set an upper range of Geom::infinity(). // Once again, in gtk2, this is not a problem. But in gtk3, // widgets get allocated the amount of size they ask for, // leading to excessively long widgets. if (min >= -SCALARPARAM_G_MAXDOUBLE) { this->min = min; } else { this->min = -SCALARPARAM_G_MAXDOUBLE; } if (max <= SCALARPARAM_G_MAXDOUBLE) { this->max = max; } else { this->max = SCALARPARAM_G_MAXDOUBLE; } param_set_value(value); // reset value to see whether it is in ranges }
void ScalarParam::param_set_default() { param_set_value(defvalue); }