~valavanisalex/ubuntu/oneiric/inkscape/inkscape_0.48.1-2ubuntu4

« back to all changes in this revision

Viewing changes to src/lpe-tool-context.h

  • Committer: Bazaar Package Importer
  • Author(s): Kees Cook, Ted Gould, Kees Cook
  • Date: 2009-06-24 14:00:43 UTC
  • mfrom: (1.1.8 upstream)
  • Revision ID: james.westby@ubuntu.com-20090624140043-07stp20mry48hqup
Tags: 0.47~pre0-0ubuntu1
* New upstream release

[ Ted Gould ]
* debian/control: Adding libgsl0 and removing version specifics on boost

[ Kees Cook ]
* debian/watch: updated to run uupdate and mangle pre-release versions.
* Dropped patches that have been taken upstream:
  - 01_mips
  - 02-poppler-0.8.3
  - 03-chinese-inkscape
  - 05_fix_latex_patch
  - 06_gcc-4.4
  - 07_cdr2svg
  - 08_skip-bad-utf-on-pdf-import
  - 09_gtk-clist
  - 10_belarussian
  - 11_libpng
  - 12_desktop
  - 13_slider
  - 100_svg_import_improvements
  - 102_sp_pattern_painter_free
  - 103_bitmap_type_print

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#ifndef SP_LPETOOL_CONTEXT_H_SEEN
 
2
#define SP_LPETOOL_CONTEXT_H_SEEN
 
3
 
 
4
/*
 
5
 * LPEToolContext: a context for a generic tool composed of subtools that are given by LPEs
 
6
 *
 
7
 * Authors:
 
8
 *   Maximilian Albert <maximilian.albert@gmail.com>
 
9
 *
 
10
 * Copyright (C) 1998 The Free Software Foundation
 
11
 * Copyright (C) 1999-2002 authors
 
12
 * Copyright (C) 2001-2002 Ximian, Inc.
 
13
 * Copyright (C) 2008 Maximilian Albert
 
14
 *
 
15
 * Released under GNU GPL, read the file 'COPYING' for more information
 
16
 */
 
17
 
 
18
#include "pen-context.h"
 
19
#include "helper/units.h"
 
20
 
 
21
#define SP_TYPE_LPETOOL_CONTEXT (sp_lpetool_context_get_type())
 
22
#define SP_LPETOOL_CONTEXT(o) (GTK_CHECK_CAST((o), SP_TYPE_LPETOOL_CONTEXT, SPLPEToolContext))
 
23
#define SP_LPETOOL_CONTEXT_CLASS(k) (GTK_CHECK_CLASS_CAST((k), SP_TYPE_LPETOOL_CONTEXT, SPLPEToolContextClass))
 
24
#define SP_IS_LPETOOL_CONTEXT(o) (GTK_CHECK_TYPE((o), SP_TYPE_LPETOOL_CONTEXT))
 
25
#define SP_IS_LPETOOL_CONTEXT_CLASS(k) (GTK_CHECK_CLASS_TYPE((k), SP_TYPE_LPETOOL_CONTEXT))
 
26
 
 
27
class SPLPEToolContext;
 
28
class SPLPEToolContextClass;
 
29
 
 
30
/* This is the list of subtools from which the toolbar of the LPETool is built automatically */
 
31
extern const int num_subtools;
 
32
 
 
33
struct SubtoolEntry {
 
34
    Inkscape::LivePathEffect::EffectType type;
 
35
    gchar const *icon_name;
 
36
};
 
37
 
 
38
extern SubtoolEntry lpesubtools[];
 
39
 
 
40
enum LPEToolState {
 
41
    LPETOOL_STATE_PEN,
 
42
    LPETOOL_STATE_NODE
 
43
};
 
44
 
 
45
namespace Inkscape {
 
46
class Selection;
 
47
}
 
48
 
 
49
class ShapeEditor;
 
50
 
 
51
struct SPLPEToolContext : public SPPenContext {
 
52
    ShapeEditor* shape_editor;
 
53
    SPCanvasItem *canvas_bbox;
 
54
    Inkscape::LivePathEffect::EffectType mode;
 
55
 
 
56
    std::map<SPPath *, SPCanvasItem*> *measuring_items;
 
57
 
 
58
    Inkscape::MessageContext *_lpetool_message_context;
 
59
 
 
60
    sigc::connection sel_changed_connection;
 
61
    sigc::connection sel_modified_connection;
 
62
};
 
63
 
 
64
struct SPLPEToolContextClass : public SPEventContextClass{};
 
65
 
 
66
int lpetool_mode_to_index(Inkscape::LivePathEffect::EffectType const type);
 
67
int lpetool_item_has_construction(SPLPEToolContext *lc, SPItem *item);
 
68
bool lpetool_try_construction(SPLPEToolContext *lc, Inkscape::LivePathEffect::EffectType const type);
 
69
void lpetool_context_switch_mode(SPLPEToolContext *lc, Inkscape::LivePathEffect::EffectType const type);
 
70
void lpetool_get_limiting_bbox_corners(SPDocument *document, Geom::Point &A, Geom::Point &B);
 
71
void lpetool_context_reset_limiting_bbox(SPLPEToolContext *lc);
 
72
void lpetool_create_measuring_items(SPLPEToolContext *lc, Inkscape::Selection *selection = NULL);
 
73
void lpetool_delete_measuring_items(SPLPEToolContext *lc);
 
74
void lpetool_update_measuring_items(SPLPEToolContext *lc);
 
75
void lpetool_show_measuring_info(SPLPEToolContext *lc, bool show = true);
 
76
 
 
77
GType sp_lpetool_context_get_type(void);
 
78
 
 
79
#endif // SP_LPETOOL_CONTEXT_H_SEEN
 
80
 
 
81
/*
 
82
  Local Variables:
 
83
  mode:c++
 
84
  c-file-style:"stroustrup"
 
85
  c-file-offsets:((innamespace . 0)(inline-open . 0)(case-label . +))
 
86
  indent-tabs-mode:nil
 
87
  fill-column:99
 
88
  End:
 
89
*/
 
90
// vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:encoding=utf-8:textwidth=99 :