~centralelyon2010/inkscape/imagelinks2

5227 by pjrm
svn propset svn:eol-style native *.[ch] *.cpp (including buildtool.cpp, packaging/macosx/native-gtk/*, src/dom/**).
1
#ifndef SP_LPE_ITEM_H_SEEN
2
#define SP_LPE_ITEM_H_SEEN
3
4
/** \file
5
 * Base class for live path effect items
6
 */
7
/*
8
 * Authors:
9
 *   Johan Engelen <j.b.c.engelen@ewi.utwente.nl>
10
 *   Bastien Bouclet <bgkweb@gmail.com>
11
 *
12
 * Copyright (C) 2008 authors
13
 *
14
 * Released under GNU GPL, read the file 'COPYING' for more information
15
 */
16
17
#include "sp-item.h"
18
5766 by johanengelen
LPE STACKING!
19
#include <list>
20
5227 by pjrm
svn propset svn:eol-style native *.[ch] *.cpp (including buildtool.cpp, packaging/macosx/native-gtk/*, src/dom/**).
21
#define SP_TYPE_LPE_ITEM (sp_lpe_item_get_type())
22
#define SP_LPE_ITEM(o) (G_TYPE_CHECK_INSTANCE_CAST((o), SP_TYPE_LPE_ITEM, SPLPEItem))
23
#define SP_LPE_ITEM_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), SP_TYPE_LPE_ITEM, SPLPEItemClass))
24
#define SP_IS_LPE_ITEM(o) (G_TYPE_CHECK_INSTANCE_TYPE((o), SP_TYPE_LPE_ITEM))
25
#define SP_IS_LPE_ITEM_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), SP_TYPE_LPE_ITEM))
26
27
struct LivePathEffectObject;
9020 by JazzyNico
Code refactoring and merging with trunk (revision 10599).
28
struct SPCurve;
29
5227 by pjrm
svn propset svn:eol-style native *.[ch] *.cpp (including buildtool.cpp, packaging/macosx/native-gtk/*, src/dom/**).
30
namespace Inkscape{ 
9020 by JazzyNico
Code refactoring and merging with trunk (revision 10599).
31
namespace Display {
32
    class TemporaryItem;
33
}
5227 by pjrm
svn propset svn:eol-style native *.[ch] *.cpp (including buildtool.cpp, packaging/macosx/native-gtk/*, src/dom/**).
34
namespace LivePathEffect{
35
    class LPEObjectReference;
36
    class Effect;
9020 by JazzyNico
Code refactoring and merging with trunk (revision 10599).
37
}
38
}
5227 by pjrm
svn propset svn:eol-style native *.[ch] *.cpp (including buildtool.cpp, packaging/macosx/native-gtk/*, src/dom/**).
39
5766 by johanengelen
LPE STACKING!
40
typedef std::list<Inkscape::LivePathEffect::LPEObjectReference *> PathEffectList;
41
9020 by JazzyNico
Code refactoring and merging with trunk (revision 10599).
42
class SPLPEItem : public SPItem {
43
public:
5766 by johanengelen
LPE STACKING!
44
    int path_effects_enabled;
45
46
    PathEffectList* path_effect_list;
8839 by johanengelen
work on the lpe group undo bug. it's not solved, but i think LPE code does everything correct now. I think now it's the interplay between undo-system and LPE that bugs.
47
    std::list<sigc::connection> *lpe_modified_connection_list; // this list contains the connections for listening to lpeobject parameter changes
48
5766 by johanengelen
LPE STACKING!
49
    Inkscape::LivePathEffect::LPEObjectReference* current_path_effect;
5954 by cilix42
First step towards making helper paths for LPE items work better
50
    std::vector<Inkscape::Display::TemporaryItem*> lpe_helperpaths;
9020 by JazzyNico
Code refactoring and merging with trunk (revision 10599).
51
52
    void replacePathEffects( std::vector<LivePathEffectObject const *> const old_lpeobjs,
53
                             std::vector<LivePathEffectObject const *> const new_lpeobjs );
5227 by pjrm
svn propset svn:eol-style native *.[ch] *.cpp (including buildtool.cpp, packaging/macosx/native-gtk/*, src/dom/**).
54
};
55
56
struct SPLPEItemClass {
57
    SPItemClass parent_class;
58
59
    void (* update_patheffect) (SPLPEItem *lpeitem, bool write);
60
};
61
62
GType sp_lpe_item_get_type();
63
5766 by johanengelen
LPE STACKING!
64
void sp_lpe_item_update_patheffect (SPLPEItem *lpeitem, bool wholetree, bool write);
6891 by Ted Gould
Merge from fe-moved
65
bool sp_lpe_item_perform_path_effect(SPLPEItem *lpeitem, SPCurve *curve);
5766 by johanengelen
LPE STACKING!
66
void sp_lpe_item_add_path_effect(SPLPEItem *lpeitem, gchar *value, bool reset);
67
void sp_lpe_item_add_path_effect(SPLPEItem *lpeitem, LivePathEffectObject * new_lpeobj);
9012.1.419 by Johan Engelen
better fix for lpe stack forking
68
bool sp_lpe_item_fork_path_effects_if_necessary(SPLPEItem *lpeitem, unsigned int nr_of_allowed_users = 1);
5766 by johanengelen
LPE STACKING!
69
void sp_lpe_item_remove_all_path_effects(SPLPEItem *lpeitem, bool keep_paths);
70
void sp_lpe_item_remove_current_path_effect(SPLPEItem *lpeitem, bool keep_paths);
71
void sp_lpe_item_down_current_path_effect(SPLPEItem *lpeitem);
72
void sp_lpe_item_up_current_path_effect(SPLPEItem *lpeitem);
5227 by pjrm
svn propset svn:eol-style native *.[ch] *.cpp (including buildtool.cpp, packaging/macosx/native-gtk/*, src/dom/**).
73
bool sp_lpe_item_has_path_effect(SPLPEItem *lpeitem);
8520 by buliabyak
fix rendering of testcase errorhandling-nosuchlpe.svg: make sure shapes do not calculate the curve if they have a broken lpe, instead reading it directly from d= and issuing a warning
74
bool sp_lpe_item_has_broken_path_effect(SPLPEItem *lpeitem);
5227 by pjrm
svn propset svn:eol-style native *.[ch] *.cpp (including buildtool.cpp, packaging/macosx/native-gtk/*, src/dom/**).
75
bool sp_lpe_item_has_path_effect_recursive(SPLPEItem *lpeitem);
6322 by cilix42
New LPE FreehandShape derived from PatternAlongPath (for the shapes in pen/pencil context); don't apply shapes each time the selection changes; new functions to test for specific LPE type and if a path can accept a new shape
76
Inkscape::LivePathEffect::Effect* sp_lpe_item_has_path_effect_of_type(SPLPEItem *lpeitem, int type);
77
bool sp_lpe_item_can_accept_freehand_shape(SPLPEItem *lpeitem);
5227 by pjrm
svn propset svn:eol-style native *.[ch] *.cpp (including buildtool.cpp, packaging/macosx/native-gtk/*, src/dom/**).
78
void sp_lpe_item_edit_next_param_oncanvas(SPLPEItem *lpeitem, SPDesktop *dt);
5766 by johanengelen
LPE STACKING!
79
PathEffectList sp_lpe_item_get_effect_list(SPLPEItem *lpeitem);
80
Inkscape::LivePathEffect::LPEObjectReference* sp_lpe_item_get_current_lpereference(SPLPEItem *lpeitem);
81
Inkscape::LivePathEffect::Effect* sp_lpe_item_get_current_lpe(SPLPEItem *lpeitem);
82
bool sp_lpe_item_set_current_path_effect(SPLPEItem *lpeitem, Inkscape::LivePathEffect::LPEObjectReference* lperef);
83
bool sp_lpe_item_path_effects_enabled(SPLPEItem *lpeitem);
5227 by pjrm
svn propset svn:eol-style native *.[ch] *.cpp (including buildtool.cpp, packaging/macosx/native-gtk/*, src/dom/**).
84
85
#endif /* !SP_LPE_ITEM_H_SEEN */
86
87
/*
88
  Local Variables:
89
  mode:c++
90
  c-file-style:"stroustrup"
91
  c-file-offsets:((innamespace . 0)(inline-open . 0)(case-label . +))
92
  indent-tabs-mode:nil
93
  fill-column:99
94
  End:
95
*/
9020 by JazzyNico
Code refactoring and merging with trunk (revision 10599).
96
// vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:fileencoding=utf-8:textwidth=99 :