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
44 typedef struct _GnomeCanvasItem GnomeCanvasItem;
45 typedef struct _GnomeCanvasItemClass GnomeCanvasItemClass;
66 class 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
110 #endif //GLIBMM_VFUNCS_ENABLED
114 #ifdef GLIBMM_VFUNCS_ENABLED
115 #endif //GLIBMM_VFUNCS_ENABLED
118 #ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED
119 virtual bool on_event(GdkEvent* p1);
120 #endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED
137 void move(
double dx,
double dy);
148 void raise(
int positions);
159 void lower(
int positions);
177 int grab(
unsigned int event_mask,
const Gdk::Cursor& cursor, guint32 etime);
178 int grab(
unsigned int event_mask, guint32 etime);
189 void ungrab(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);
272 #endif //GLIBMM_VFUNCS_ENABLED
274 #ifdef GLIBMM_VFUNCS_ENABLED
276 #endif //GLIBMM_VFUNCS_ENABLED
278 #ifdef GLIBMM_VFUNCS_ENABLED
280 #endif //GLIBMM_VFUNCS_ENABLED
282 #ifdef GLIBMM_VFUNCS_ENABLED
284 #endif //GLIBMM_VFUNCS_ENABLED
286 #ifdef GLIBMM_VFUNCS_ENABLED
288 #endif //GLIBMM_VFUNCS_ENABLED
290 #ifdef GLIBMM_VFUNCS_ENABLED
292 #endif //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);
296 #endif //GLIBMM_VFUNCS_ENABLED
298 #ifdef GLIBMM_VFUNCS_ENABLED
300 #endif //GLIBMM_VFUNCS_ENABLED
302 #ifdef GLIBMM_VFUNCS_ENABLED
303 virtual double point_vfunc(
double x,
double y,
int cx,
int cy, GnomeCanvasItem** actual_item);
304 #endif //GLIBMM_VFUNCS_ENABLED
306 #ifdef GLIBMM_VFUNCS_ENABLED
307 virtual void bounds_vfunc(
double* x1,
double* y1,
double* x2,
double* y2);
308 #endif //GLIBMM_VFUNCS_ENABLED
325 #ifdef GLIBMM_PROPERTIES_ENABLED
333 #endif //#GLIBMM_PROPERTIES_ENABLED
335 #ifdef GLIBMM_PROPERTIES_ENABLED
343 #endif //#GLIBMM_PROPERTIES_ENABLED
357 void set(
const gchar* first_arg_name, ...);
378 void update_svp(ArtSVP **p_svp, ArtSVP *new_svp);
386 void update_svp_clip(ArtSVP **p_svp, ArtSVP *new_svp, ArtSVP *clip_svp);
void raise_to_top()
Raises an item to the top of its parent's stack.
void request_update()
To be used only by item implementations.
void hide()
Hides a canvas item.
virtual void unmap_vfunc()
void item_construct(Group &group)
virtual void bounds_vfunc(double *x1, double *y1, double *x2, double *y2)
Definition: affinetrans.h:29
Glib::PropertyProxy< Group * > property_parent()
You rarely need to use properties because there are get_ and set_ methods for almost all of them...
Definition: affinetrans.h:36
void w2i(double &x, double &y)
Converts a coordinate pair from world coordinates to item-relative coordinates.
Group * get_parent_group()
virtual void render_vfunc(GnomeCanvasBuf *buf)
const GnomeCanvasItem * gobj() const
Provides access to the underlying C GtkObject.
Definition: item.h:104
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::SignalProxy1< bool, GdkEvent * > signal_event()
Art::AffineTrans get_i2c_affine() const
virtual void update_vfunc(double *affine, ArtSVP *clip_path, int flags)
void affine_absolute(const Art::AffineTrans &affine)
void ungrab(guint32 etime)
Ungrabs the item, which must have been grabbed in the canvas, and ungrabs the mouse.
void move(double dx, double dy)
Moves a canvas item by creating an affine transformation matrix for translation by using the specifie...
void set(const gchar *first_arg_name,...)
void show()
Shows a canvas item.
void lower(int positions)
Lowers the item in its parent's stack by the specified number of positions.
void affine_relative(const Art::AffineTrans &affine)
Art::AffineTrans get_i2w_affine() const
virtual void unrealize_vfunc()
void grab_focus()
Makes the specified item take the keyboard focus, so all keyboard events will be sent to it...
void i2w(double &x, double &y)
Converts a coordinate pair from item-relative coordinates to world coordinates.
virtual ArtUta * coverage_vfunc()
void reset_bounds()
Resets the bounding box of a canvas item to an empty rectangle.
void update_bbox(int x1, int y1, int x2, int y2)
Sets the bbox to the new value, requesting full repaint.
virtual bool on_event(GdkEvent *p1)
Canvas functions usually operate in either World coordinates (units for the entire canvas)...
Definition: canvas.h:68
void get_bounds(double &x1, double &y1, double &x2, double &y2) const
Queries the bounding box of a canvas item.
virtual void realize_vfunc()
virtual void draw_vfunc(const Glib::RefPtr< Gdk::Drawable > &drawable, int x, int y, int width, int height)
Canvas * get_canvas() const
Returns the canvas we're on.
int grab(unsigned int event_mask, const Gdk::Cursor &cursor, guint32 etime)
GnomeCanvasItem * gobj()
Provides access to the underlying C GtkObject.
Definition: item.h:101
void reparent(Group &new_group)
Changes the parent of the specified item to be the new group.
void update_svp(ArtSVP **p_svp, ArtSVP *new_svp)
Sets the svp to the new value, 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 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...