parameter.h revision fe4492cc1077f798b64277b51f1a4bf9291b1a81
/*
* Inkscape::LivePathEffectParameters
*
* Copyright (C) Johan Engelen 2007 <j.b.c.engelen@utwente.nl>
*
* Released under GNU GPL, read the file 'COPYING' for more information
*/
// In gtk2, this wasn't an issue; we could toss around
// G_MAXDOUBLE and not worry about size allocations. But
// in gtk3, it is an issue: it allocates widget size for the maxmium
// value you pass to it, leading to some insane lengths.
// If you need this to be more, please be conservative about it.
const double SCALARPARAM_G_MAXDOUBLE = 10000000000.0; // TODO fixme: using an arbitrary large number as a magic value seems fragile.
}
}
}
}
virtual bool param_readSVGValue(const gchar * strvalue) = 0; // returns true if new value is valid / accepted.
void write_to_SVG();
virtual void param_set_default() = 0;
// This creates a new widget (newed with Gtk::manage(new ...);)
// overload these for your particular parameter to make it provide knotholder handles or canvas helperpaths
virtual bool providesKnotHolderEntities() const { return false; }
virtual void addKnotHolderEntities(KnotHolder */*knotholder*/, SPDesktop */*desktop*/, SPItem */*item*/) {};
virtual void addCanvasIndicators(SPLPEItem const*/*lpeitem*/, std::vector<Geom::PathVector> &/*hp_vec*/) {};
bool oncanvas_editable;
bool widget_is_visible;
void param_write_to_repr(const char * svgd);
};
virtual ~ScalarParam();
virtual void param_set_default();
void param_make_integer(bool yes = true);
void param_set_digits(unsigned digits);
bool integer;
unsigned digits;
double inc_step;
double inc_page;
bool add_slider;
ScalarParam(const ScalarParam&);
};
} //namespace LivePathEffect
} //namespace Inkscape
#endif
/*
Local Variables:
mode:c++
c-file-style:"stroustrup"
c-file-offsets:((innamespace . 0)(inline-open . 0)(case-label . +))
indent-tabs-mode:nil
fill-column:99
End:
*/
// vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:fileencoding=utf-8:textwidth=99 :