1
#ifndef SEEN_SP_CANVAS_ITEM_H
2
#define SEEN_SP_CANVAS_ITEM_H
8
* Federico Mena <federico@nuclecu.unam.mx>
9
* Raph Levien <raph@gimp.org>
10
* Lauris Kaplinski <lauris@kaplinski.com>
11
* Jon A. Cruz <jon@joncruz.org>
13
* Copyright (C) 1998 The Free Software Foundation
14
* Copyright (C) 2002 Lauris Kaplinski
15
* Copyright (C) 2010 authors
17
* Released under GNU GPL, read the file 'COPYING' for more information
24
#include <glib-object.h>
27
#include <2geom/rect.h>
35
typedef struct _SPCanvasItemClass SPCanvasItemClass;
37
#define SP_TYPE_CANVAS_ITEM (sp_canvas_item_get_type())
38
#define SP_CANVAS_ITEM(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), SP_TYPE_CANVAS_ITEM, SPCanvasItem))
39
#define SP_IS_CANVAS_ITEM(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), SP_TYPE_CANVAS_ITEM))
40
#define SP_CANVAS_ITEM_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS((o), SP_TYPE_CANVAS_ITEM, SPCanvasItemClass))
42
GType sp_canvas_item_get_type();
45
* An SPCanvasItem refers to a SPCanvas and to its parent item; it has
46
* four coordinates, a bounding rectangle, and a transformation matrix.
48
struct SPCanvasItem : public GtkObject {
52
double x1, y1, x2, y2;
58
* The vtable of an SPCanvasItem.
60
struct _SPCanvasItemClass : public GtkObjectClass {
61
void (* update) (SPCanvasItem *item, Geom::Affine const &affine, unsigned int flags);
63
void (* render) (SPCanvasItem *item, SPCanvasBuf *buf);
64
double (* point) (SPCanvasItem *item, Geom::Point p, SPCanvasItem **actual_item);
66
int (* event) (SPCanvasItem *item, GdkEvent *event);
67
void (* viewbox_changed) (SPCanvasItem *item, Geom::IntRect const &new_area);
70
SPCanvasItem *sp_canvas_item_new(SPCanvasGroup *parent, GType type, const gchar *first_arg_name, ...);
75
#define sp_canvas_item_set g_object_set
77
void sp_canvas_item_affine_absolute(SPCanvasItem *item, Geom::Affine const &aff);
79
void sp_canvas_item_raise(SPCanvasItem *item, int positions);
80
void sp_canvas_item_lower(SPCanvasItem *item, int positions);
81
bool sp_canvas_item_is_visible(SPCanvasItem *item);
82
void sp_canvas_item_show(SPCanvasItem *item);
83
void sp_canvas_item_hide(SPCanvasItem *item);
84
int sp_canvas_item_grab(SPCanvasItem *item, unsigned int event_mask, GdkCursor *cursor, guint32 etime);
85
void sp_canvas_item_ungrab(SPCanvasItem *item, guint32 etime);
87
Geom::Affine sp_canvas_item_i2w_affine(SPCanvasItem const *item);
89
void sp_canvas_item_grab_focus(SPCanvasItem *item);
91
void sp_canvas_item_request_update(SPCanvasItem *item);
93
/* get item z-order in parent group */
95
gint sp_canvas_item_order(SPCanvasItem * item);
99
#endif // SEEN_SP_CANVAS_ITEM_H
104
c-file-style:"stroustrup"
105
c-file-offsets:((innamespace . 0)(inline-open . 0)(case-label . +))
110
// vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4 :