Exemplo n.º 1
0
/** \brief  Wrapper to cast to the object and use it's function.  */
float
Parameter::get_float (const SPDocument * doc, const Inkscape::XML::Node * node)
{
    ParamFloat * floatpntr = dynamic_cast<ParamFloat *>(this);
    if (floatpntr == NULL)
        throw Extension::param_not_float_param();
    return floatpntr->get(doc, node);
}
Exemplo n.º 2
0
 /** \brief  Make the adjustment using an extension and the string
             describing the parameter. */
 ParamFloatAdjustment (ParamFloat * param, SPDocument * doc, Inkscape::XML::Node * node, sigc::signal<void> * changeSignal) :
         Gtk::Adjustment(0.0, param->min(), param->max(), 0.1, 0), _pref(param), _doc(doc), _node(node), _changeSignal(changeSignal) {
     this->set_value(_pref->get(NULL, NULL) /* \todo fix */);
     this->signal_value_changed().connect(sigc::mem_fun(this, &ParamFloatAdjustment::val_changed));
     return;
 };