~valavanisalex/ubuntu/precise/inkscape/fix-943984

« back to all changes in this revision

Viewing changes to inkscape-0.47pre1/src/sp-lpe-item.h

  • Committer: Bazaar Package Importer
  • Author(s): Bryce Harrington
  • Date: 2009-07-02 17:09:45 UTC
  • mfrom: (1.1.9 upstream)
  • Revision ID: james.westby@ubuntu.com-20090702170945-nn6d6zswovbwju1t
Tags: 0.47~pre1-0ubuntu1
* New upstream release.
  - Don't constrain maximization on small resolution devices (pre0)
    (LP: #348842)
  - Fixes segfault on startup (pre0)
    (LP: #391149)

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
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
#include "display/display-forward.h"
 
19
 
 
20
#include <list>
 
21
 
 
22
#define SP_TYPE_LPE_ITEM (sp_lpe_item_get_type())
 
23
#define SP_LPE_ITEM(o) (G_TYPE_CHECK_INSTANCE_CAST((o), SP_TYPE_LPE_ITEM, SPLPEItem))
 
24
#define SP_LPE_ITEM_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), SP_TYPE_LPE_ITEM, SPLPEItemClass))
 
25
#define SP_IS_LPE_ITEM(o) (G_TYPE_CHECK_INSTANCE_TYPE((o), SP_TYPE_LPE_ITEM))
 
26
#define SP_IS_LPE_ITEM_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), SP_TYPE_LPE_ITEM))
 
27
 
 
28
struct LivePathEffectObject;
 
29
namespace Inkscape{ 
 
30
namespace LivePathEffect{
 
31
    class LPEObjectReference;
 
32
    class Effect;
 
33
};
 
34
};
 
35
 
 
36
typedef std::list<Inkscape::LivePathEffect::LPEObjectReference *> PathEffectList;
 
37
 
 
38
struct SPLPEItem : public SPItem {
 
39
    int path_effects_enabled;
 
40
 
 
41
    PathEffectList* path_effect_list;
 
42
    Inkscape::LivePathEffect::LPEObjectReference* current_path_effect;
 
43
    std::vector<Inkscape::Display::TemporaryItem*> lpe_helperpaths;
 
44
 
 
45
    sigc::connection lpe_modified_connection;
 
46
};
 
47
 
 
48
struct SPLPEItemClass {
 
49
    SPItemClass parent_class;
 
50
 
 
51
    void (* update_patheffect) (SPLPEItem *lpeitem, bool write);
 
52
};
 
53
 
 
54
GType sp_lpe_item_get_type();
 
55
 
 
56
void sp_lpe_item_update_patheffect (SPLPEItem *lpeitem, bool wholetree, bool write);
 
57
bool sp_lpe_item_perform_path_effect(SPLPEItem *lpeitem, SPCurve *curve);
 
58
void sp_lpe_item_add_path_effect(SPLPEItem *lpeitem, gchar *value, bool reset);
 
59
void sp_lpe_item_add_path_effect(SPLPEItem *lpeitem, LivePathEffectObject * new_lpeobj);
 
60
void sp_lpe_item_replace_path_effect(SPLPEItem *lpeitem, LivePathEffectObject * old_lpeobj,
 
61
                                        LivePathEffectObject * new_lpeobj);
 
62
void sp_lpe_item_remove_all_path_effects(SPLPEItem *lpeitem, bool keep_paths);
 
63
void sp_lpe_item_remove_current_path_effect(SPLPEItem *lpeitem, bool keep_paths);
 
64
void sp_lpe_item_down_current_path_effect(SPLPEItem *lpeitem);
 
65
void sp_lpe_item_up_current_path_effect(SPLPEItem *lpeitem);
 
66
bool sp_lpe_item_has_path_effect(SPLPEItem *lpeitem);
 
67
bool sp_lpe_item_has_path_effect_recursive(SPLPEItem *lpeitem);
 
68
Inkscape::LivePathEffect::Effect* sp_lpe_item_has_path_effect_of_type(SPLPEItem *lpeitem, int type);
 
69
bool sp_lpe_item_can_accept_freehand_shape(SPLPEItem *lpeitem);
 
70
void sp_lpe_item_edit_next_param_oncanvas(SPLPEItem *lpeitem, SPDesktop *dt);
 
71
PathEffectList sp_lpe_item_get_effect_list(SPLPEItem *lpeitem);
 
72
Inkscape::LivePathEffect::LPEObjectReference* sp_lpe_item_get_current_lpereference(SPLPEItem *lpeitem);
 
73
Inkscape::LivePathEffect::Effect* sp_lpe_item_get_current_lpe(SPLPEItem *lpeitem);
 
74
bool sp_lpe_item_set_current_path_effect(SPLPEItem *lpeitem, Inkscape::LivePathEffect::LPEObjectReference* lperef);
 
75
bool sp_lpe_item_path_effects_enabled(SPLPEItem *lpeitem);
 
76
 
 
77
#endif /* !SP_LPE_ITEM_H_SEEN */
 
78
 
 
79
/*
 
80
  Local Variables:
 
81
  mode:c++
 
82
  c-file-style:"stroustrup"
 
83
  c-file-offsets:((innamespace . 0)(inline-open . 0)(case-label . +))
 
84
  indent-tabs-mode:nil
 
85
  fill-column:99
 
86
  End:
 
87
*/
 
88
// vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:encoding=utf-8:textwidth=99 :