blob: ce47126e6873cbc5beb40dd72869c1ed94ea0e83 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
|
#ifndef __SP_STAR_CONTEXT_H__
#define __SP_STAR_CONTEXT_H__
/*
* Star drawing context
*
* Authors:
* Mitsuru Oka <oka326@parkcity.ne.jp>
* Lauris Kaplinski <lauris@kaplinski.com>
*
* Copyright (C) 1999-2002 Lauris Kaplinski
* Copyright (C) 2001-2002 Mitsuru Oka
*
* Released under GNU GPL, read the file 'COPYING' for more information
*/
#include <stddef.h>
#include <sigc++/sigc++.h>
#include <2geom/point.h>
#include "event-context.h"
#define SP_TYPE_STAR_CONTEXT (sp_star_context_get_type ())
#define SP_STAR_CONTEXT(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), SP_TYPE_STAR_CONTEXT, SPStarContext))
#define SP_STAR_CONTEXT_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), SP_TYPE_STAR_CONTEXT, SPStarContextClass))
#define SP_IS_STAR_CONTEXT(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), SP_TYPE_STAR_CONTEXT))
#define SP_IS_STAR_CONTEXT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), SP_TYPE_STAR_CONTEXT))
class CStarContext;
class SPStarContext : public SPEventContext {
public:
SPStarContext();
CStarContext* cstarcontext;
SPItem *item;
Geom::Point center;
/* Number of corners */
gint magnitude;
/* Outer/inner radius ratio */
gdouble proportion;
/* flat sides or not? */
bool isflatsided;
/* rounded corners ratio */
gdouble rounded;
// randomization
gdouble randomized;
sigc::connection sel_changed_connection;
Inkscape::MessageContext *_message_context;
};
struct SPStarContextClass {
SPEventContextClass parent_class;
};
class CStarContext : public CEventContext {
public:
CStarContext(SPStarContext* starcontext);
virtual void setup();
virtual void finish();
virtual void set(Inkscape::Preferences::Entry* val);
virtual gint root_handler(GdkEvent* event);
private:
SPStarContext* spstarcontext;
};
GType sp_star_context_get_type (void);
#endif
|