3#ifndef _LIBGNOMECANVASMM_ITEM_H
4#define _LIBGNOMECANVASMM_ITEM_H
34#include <gtkmm/object.h>
35#include <gdkmm/cursor.h>
36#include <libgnomecanvas/gnome-canvas.h>
43#ifndef DOXYGEN_SHOULD_SKIP_THIS
44typedef struct _GnomeCanvasItem GnomeCanvasItem;
45typedef struct _GnomeCanvasItemClass GnomeCanvasItemClass;
66class Item :
public Gtk::Object
69#ifndef DOXYGEN_SHOULD_SKIP_THIS
70 typedef Item CppObjectType;
71 typedef Item_Class CppClassType;
72 typedef GnomeCanvasItem BaseObjectType;
73 typedef GnomeCanvasItemClass BaseClassType;
78#ifndef DOXYGEN_SHOULD_SKIP_THIS
81 friend class Item_Class;
82 static CppClassType item_class_;
89 explicit Item(
const Glib::ConstructParams& construct_params);
90 explicit Item(GnomeCanvasItem* castitem);
95#ifndef DOXYGEN_SHOULD_SKIP_THIS
96 static GType get_type() G_GNUC_CONST;
97 static GType get_base_type() G_GNUC_CONST;
101 GnomeCanvasItem*
gobj() {
return reinterpret_cast<GnomeCanvasItem*
>(gobject_); }
104 const GnomeCanvasItem*
gobj()
const {
return reinterpret_cast<GnomeCanvasItem*
>(gobject_); }
109#ifdef GLIBMM_VFUNCS_ENABLED
114#ifdef GLIBMM_VFUNCS_ENABLED
118#ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED
137 void move(
double dx,
double dy);
177 int grab(
unsigned int event_mask,
const Gdk::Cursor& cursor, guint32 etime);
178 int grab(
unsigned int event_mask, guint32 etime);
199 void w2i(
double& x,
double& y);
206 void i2w(
double& x,
double& y);
227 void get_bounds(
double& x1,
double& y1,
double& x2,
double& y2)
const;
270 #ifdef GLIBMM_VFUNCS_ENABLED
271 virtual void update_vfunc(
double* affine, ArtSVP* clip_path,
int flags);
274 #ifdef GLIBMM_VFUNCS_ENABLED
278 #ifdef GLIBMM_VFUNCS_ENABLED
282 #ifdef GLIBMM_VFUNCS_ENABLED
286 #ifdef GLIBMM_VFUNCS_ENABLED
290 #ifdef GLIBMM_VFUNCS_ENABLED
294 #ifdef GLIBMM_VFUNCS_ENABLED
295 virtual void draw_vfunc(
const Glib::RefPtr<Gdk::Drawable>& drawable,
int x,
int y,
int width,
int height);
298 #ifdef GLIBMM_VFUNCS_ENABLED
302 #ifdef GLIBMM_VFUNCS_ENABLED
303 virtual double point_vfunc(
double x,
double y,
int cx,
int cy, GnomeCanvasItem** actual_item);
306 #ifdef GLIBMM_VFUNCS_ENABLED
307 virtual void bounds_vfunc(
double* x1,
double* y1,
double* x2,
double* y2);
325 #ifdef GLIBMM_PROPERTIES_ENABLED
335#ifdef GLIBMM_PROPERTIES_ENABLED
357 void set(
const gchar* first_arg_name, ...);
Definition affinetrans.h:37
Canvas functions usually operate in either World coordinates (units for the entire canvas),...
Definition canvas.h:69
void update_svp_clip(ArtSVP **p_svp, ArtSVP *new_svp, ArtSVP *clip_svp)
Sets the svp to the new value, clipping if necessary, and requesting repaint on what's changed.
void request_redraw_svp(const ArtSVP *svp)
Request redraw of the svp if in aa mode, or the entire item in in xlib mode.
void w2i(double &x, double &y)
Converts a coordinate pair from world coordinates to item-relative coordinates.
Canvas * get_canvas() const
Returns the canvas we're on.
Group * get_parent_group()
void i2w(double &x, double &y)
Converts a coordinate pair from item-relative coordinates to world coordinates.
Gnome::Canvas::Item * wrap(GnomeCanvasItem *object, bool take_copy=false)
A Glib::wrap() method for this object.
virtual void unmap_vfunc()
const Group * get_parent_group() const
void update_svp(ArtSVP **p_svp, ArtSVP *new_svp)
Sets the svp to the new value, requesting repaint on what's changed.
virtual void render_vfunc(GnomeCanvasBuf *buf)
const GnomeCanvasItem * gobj() const
Provides access to the underlying C GtkObject.
Definition item.h:104
virtual bool on_event(GdkEvent *p1)
virtual void unrealize_vfunc()
virtual void draw_vfunc(const Glib::RefPtr< Gdk::Drawable > &drawable, int x, int y, int width, int height)
virtual ArtUta * coverage_vfunc()
int grab(unsigned int event_mask, const Gdk::Cursor &cursor, guint32 etime)
void raise(int positions)
Raises the item in its parent's stack by the specified number of positions.
void raise_to_top()
Raises an item to the top of its parent's stack.
void update_bbox(int x1, int y1, int x2, int y2)
Sets the bbox to the new value, requesting full repaint.
void get_bounds(double &x1, double &y1, double &x2, double &y2) const
Queries the bounding box of a canvas item.
void affine_relative(const Art::AffineTrans &affine)
Art::AffineTrans get_i2c_affine() const
void reset_bounds()
Resets the bounding box of a canvas item to an empty rectangle.
void reparent(Group &new_group)
Changes the parent of the specified item to be the new group.
void request_update()
To be used only by item implementations.
void hide()
Hides a canvas item.
Glib::PropertyProxy< Group * > property_parent()
You rarely need to use properties because there are get_ and set_ methods for almost all of them.
void set(const gchar *first_arg_name,...)
void item_construct(Group &group, const gchar *first_arg_name, va_list ap)
void move(double dx, double dy)
Moves a canvas item by creating an affine transformation matrix for translation by using the specifie...
int grab(unsigned int event_mask, guint32 etime)
Art::AffineTrans get_i2w_affine() const
void lower_to_bottom()
Lowers an item to the bottom of its parent's stack.
virtual double point_vfunc(double x, double y, int cx, int cy, GnomeCanvasItem **actual_item)
Glib::PropertyProxy_ReadOnly< Group * > property_parent() const
You rarely need to use properties because there are get_ and set_ methods for almost all of them.
virtual void update_vfunc(double *affine, ArtSVP *clip_path, int flags)
virtual void realize_vfunc()
Glib::SignalProxy1< bool, GdkEvent * > signal_event()
void affine_absolute(const Art::AffineTrans &affine)
void show()
Shows a canvas item.
virtual void bounds_vfunc(double *x1, double *y1, double *x2, double *y2)
GnomeCanvasItem * gobj()
Provides access to the underlying C GtkObject.
Definition item.h:101
void item_construct(Group &group)
void ungrab(guint32 etime)
Ungrabs the item, which must have been grabbed in the canvas, and ungrabs the mouse.
void grab_focus()
Makes the specified item take the keyboard focus, so all keyboard events will be sent to it.
void lower(int positions)
Lowers the item in its parent's stack by the specified number of positions.
Definition affinetrans.h:30