index 609778b4619404fd183794de669fa5899c071f6f..6acba000ce5f9376dc7802190dfcaf37f68a1959 100644 (file)
*/
-#include "display/display-forward.h"
#include <map>
#include <glibmm/ustring.h>
-#include <2geom/path.h>
#include <2geom/forward.h>
#include "ui/widget/registry.h"
-#include "util/enums.h"
-#include "sp-lpe-item.h"
-#include "knotholder.h"
#include "parameter/bool.h"
+#include "effect-enum.h"
#define LPE_CONVERSION_TOLERANCE 0.01 // FIXME: find good solution for this.
-#define LPE_ENABLE_TEST_EFFECTS
-
struct SPDocument;
struct SPDesktop;
struct SPItem;
class SPNodeContext;
struct LivePathEffectObject;
+class SPLPEItem;
+class KnotHolder;
+class KnotHolderEntity;
+class SPPath;
+struct SPCurve;
namespace Gtk {
class Widget;
namespace LivePathEffect {
-enum EffectType {
- BEND_PATH = 0,
- PATTERN_ALONG_PATH,
- FREEHAND_SHAPE,
- SKETCH,
- VONKOCH,
- KNOT,
-#ifdef LPE_ENABLE_TEST_EFFECTS
- DOEFFECTSTACK_TEST,
-#endif
- GEARS,
- CURVE_STITCH,
- CIRCLE_WITH_RADIUS,
- PERSPECTIVE_PATH,
- SPIRO,
- LATTICE,
- ENVELOPE,
- CONSTRUCT_GRID,
- PERP_BISECTOR,
- TANGENT_TO_CURVE,
- MIRROR_SYMMETRY,
- CIRCLE_3PTS,
- ANGLE_BISECTOR,
- PARALLEL,
- COPY_ROTATE,
- OFFSET,
- RULER,
- BOOLOPS,
- INTERPOLATE,
- TEXT_LABEL,
- PATH_LENGTH,
- LINE_SEGMENT,
- INVALID_LPE // This must be last
-};
-
-extern const Util::EnumData<EffectType> LPETypeData[];
-extern const Util::EnumDataConverter<EffectType> LPETypeConverter;
-
enum LPEPathFlashType {
SUPPRESS_FLASH,
// PERMANENT_FLASH,
virtual Gtk::Widget * newWidget(Gtk::Tooltips * tooltips);
+ /**
+ * Sets all parameters to their default values and writes them to SVG.
+ */
virtual void resetDefaults(SPItem * item);
- virtual void setup_nodepath(Inkscape::NodePath::Path *np);
-
+ /// /todo: is this method really necessary? it causes UI inconsistensies... (johan)
virtual void transform_multiply(Geom::Matrix const& postmul, bool set);
- // TODO: providesKnotholder() is currently used as an indicator of whether a nodepath is
+ // /TODO: providesKnotholder() is currently used as an indicator of whether a nodepath is
// created for an item or not. When we allow both at the same time, this needs rethinking!
bool providesKnotholder();
- // TODO: in view of providesOwnFlashPaths() below, this is somewhat redundant
+ // /TODO: in view of providesOwnFlashPaths() below, this is somewhat redundant
// (but spiro lpe still needs it!)
virtual LPEPathFlashType pathFlashType() { return DEFAULT; }
void addHandles(KnotHolder *knotholder, SPDesktop *desktop, SPItem *item);
std::vector<std::pair<KnotHolderEntity*, const char*> > kh_entity_vector;
int oncanvasedit_it;
BoolParam is_visible;
- BoolParam deactivate_knotholder; // the user can use this to deactivate knotholders (for
- // convenience, because they may interfere with node handles
- // during editing); this is probably only temporary
bool show_orig_path; // set this to true in derived effects to automatically have the original
// path displayed as helperpath