index 76163ac49b5654ee2a7ed5cee417da7378105dbe..88da74a1dd689bc5fedc34b7727fc25d9faa7335 100644 (file)
@@ -236,13 +236,13 @@ Parameter::make (Inkscape::XML::Node * in_repr, Inkscape::Extension::Extension *
Parameter * param = NULL;
if (!strcmp(type, "boolean")) {
param = new ParamBool(name, guitext, in_ext, in_repr);
- } else if (!strcmp(type, "int")) {
+ } else if (!strcmp(type, "int")) {
param = new ParamInt(name, guitext, in_ext, in_repr);
- } else if (!strcmp(type, "float")) {
+ } else if (!strcmp(type, "float")) {
param = new ParamFloat(name, guitext, in_ext, in_repr);
- } else if (!strcmp(type, "string")) {
+ } else if (!strcmp(type, "string")) {
param = new ParamString(name, guitext, in_ext, in_repr);
- }
+ }
/* Note: param could equal NULL */
return param;
boolpntr = dynamic_cast<ParamBool *>(this);
if (boolpntr == NULL)
throw Extension::param_wrong_type();
- return boolpntr->get(doc);
+ return boolpntr->get(doc);
}
/** \brief Wrapper to cast to the object and use it's function. */
intpntr = dynamic_cast<ParamInt *>(this);
if (intpntr == NULL)
throw Extension::param_wrong_type();
- return intpntr->get(doc);
+ return intpntr->get(doc);
}
/** \brief Wrapper to cast to the object and use it's function. */
floatpntr = dynamic_cast<ParamFloat *>(this);
if (floatpntr == NULL)
throw Extension::param_wrong_type();
- return floatpntr->get(doc);
+ return floatpntr->get(doc);
}
/** \brief Wrapper to cast to the object and use it's function. */
stringpntr = dynamic_cast<ParamString *>(this);
if (stringpntr == NULL)
throw Extension::param_wrong_type();
- return stringpntr->get(doc);
+ return stringpntr->get(doc);
}
/** \brief Wrapper to cast to the object and use it's function. */
boolpntr = dynamic_cast<ParamBool *>(this);
if (boolpntr == NULL)
throw Extension::param_wrong_type();
- return boolpntr->set(in, doc);
+ return boolpntr->set(in, doc);
}
/** \brief Wrapper to cast to the object and use it's function. */
intpntr = dynamic_cast<ParamInt *>(this);
if (intpntr == NULL)
throw Extension::param_wrong_type();
- return intpntr->set(in, doc);
+ return intpntr->set(in, doc);
}
/** \brief Wrapper to cast to the object and use it's function. */
floatpntr = dynamic_cast<ParamFloat *>(this);
if (floatpntr == NULL)
throw Extension::param_wrong_type();
- return floatpntr->set(in, doc);
+ return floatpntr->set(in, doc);
}
/** \brief Wrapper to cast to the object and use it's function. */
stringpntr = dynamic_cast<ParamString *>(this);
if (stringpntr == NULL)
throw Extension::param_wrong_type();
- return stringpntr->set(in, doc);
+ return stringpntr->set(in, doc);
}
/** \brief Initialize the object, to do that, copy the data. */
describing the parameter. */
ParamFloatAdjustment (ParamFloat * param) :
Gtk::Adjustment(0.0, param->min(), param->max(), 0.1), _pref(param) {
- this->set_value(_pref->get(NULL) /* \todo fix */);
+ this->set_value(_pref->get(NULL) /* \todo fix */);
this->signal_value_changed().connect(sigc::mem_fun(this, &ParamFloatAdjustment::val_changed));
return;
};
describing the parameter. */
ParamIntAdjustment (ParamInt * param) :
Gtk::Adjustment(0.0, param->min(), param->max(), 1.0), _pref(param) {
- this->set_value(_pref->get(NULL) /* \todo fix */);
+ this->set_value(_pref->get(NULL) /* \todo fix */);
this->signal_value_changed().connect(sigc::mem_fun(this, &ParamIntAdjustment::val_changed));
return;
};
/**
\brief Creates a Float Adjustment for a float parameter
-
+
Builds a hbox with a label and a float adjustment in it.
*/
Gtk::Widget *
/**
\brief Creates a Int Adjustment for a int parameter
-
+
Builds a hbox with a label and a int adjustment in it.
*/
Gtk::Widget *
public:
/** \brief Initialize the check button
\param param Which parameter to adjust on changing the check button
-
+
This function sets the value of the checkbox to be that of the
parameter, and then sets up a callback to \c on_toggle.
*/
/**
\brief Creates a bool check button for a bool parameter
-
+
Builds a hbox with a label and a check button in it.
*/
Gtk::Widget *
/**
\brief Creates a text box for the string parameter
-
+
Builds a hbox with a label and a text box in it.
*/
Gtk::Widget *
ParamBool::string (void)
{
Glib::ustring * mystring;
-
- if (_value)
+
+ if (_value)
mystring = new Glib::ustring("true");
else
mystring = new Glib::ustring("false");
-
+
return mystring;
}
{
Glib::ustring * mystring = new Glib::ustring("");
*mystring += "\"";
- *mystring += _value;
+ *mystring += _value;
*mystring += "\"";
return mystring;
}