#include <item.h>
Public Member Functions | |
virtual | ~Item () |
GnomeCanvasItem * | gobj () |
Provides access to the underlying C GtkObject. | |
const GnomeCanvasItem * | gobj () const |
Provides access to the underlying C GtkObject. | |
void | move (double dx, double dy) |
Moves a canvas item by creating an affine transformation matrix for translation by using the specified values. | |
void | raise (int positions) |
Raises the item in its parent's stack by the specified number of positions. | |
void | lower (int positions) |
Lowers 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 | lower_to_bottom () |
Lowers an item to the bottom of its parent's stack. | |
int | grab (unsigned int event_mask, const Gdk::Cursor &cursor, guint32 etime) |
int | grab (unsigned int event_mask, guint32 etime) |
void | ungrab (guint32 etime) |
Ungrabs the item, which must have been grabbed in the canvas, and ungrabs the mouse. | |
void | w2i (double &x, double &y) |
Converts a coordinate pair from world coordinates to item-relative coordinates. | |
void | i2w (double &x, double &y) |
Converts a coordinate pair from item-relative coordinates to world coordinates. | |
void | grab_focus () |
Makes the specified item take the keyboard focus, so all keyboard events will be sent to it. | |
void | get_bounds (double &x1, double &y1, double &x2, double &y2) const |
Queries the bounding box of a canvas item. | |
void | show () |
Shows a canvas item. | |
void | hide () |
Hides a canvas item. | |
void | affine_relative (const Art::AffineTrans &affine) |
void | affine_absolute (const Art::AffineTrans &affine) |
Art::AffineTrans | get_i2w_affine () const |
Art::AffineTrans | get_i2c_affine () const |
void | reparent (Group &new_group) |
Changes the parent of the specified item to be the new group. | |
Canvas * | get_canvas () const |
Returns the canvas we're on. | |
virtual void | update_vfunc (double *affine, ArtSVP *clip_path, int flags) |
virtual void | realize_vfunc () |
virtual void | unrealize_vfunc () |
virtual void | map_vfunc () |
virtual void | unmap_vfunc () |
virtual ArtUta * | coverage_vfunc () |
virtual void | draw_vfunc (const Glib::RefPtr< Gdk::Drawable > &drawable, int x, int y, int width, int height) |
virtual void | render_vfunc (GnomeCanvasBuf *buf) |
virtual double | point_vfunc (double x, double y, int cx, int cy, GnomeCanvasItem **actual_item) |
virtual void | bounds_vfunc (double *x1, double *y1, double *x2, double *y2) |
Glib::SignalProxy1< bool, GdkEvent * > | signal_event () |
Group * | get_parent_group () |
const Group * | get_parent_group () const |
Glib::PropertyProxy< Group * > | property_parent () |
You rarely need to use properties because there are get_ and set_ methods for almost all of them. | |
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. | |
Protected Member Functions | |
virtual bool | on_event (GdkEvent *p1) |
void | item_construct (Group &group) |
void | item_construct (Group &group, const gchar *first_arg_name, va_list ap) |
void | set (const gchar *first_arg_name,...) |
void | request_update () |
To be used only by item implementations. | |
void | reset_bounds () |
Resets the bounding box of a canvas item to an empty rectangle. | |
void | update_svp (ArtSVP **p_svp, ArtSVP *new_svp) |
Sets the svp to the new value, requesting repaint on what's changed. | |
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 | update_bbox (int x1, int y1, int x2, int y2) |
Sets the bbox to the new value, requesting full repaint. | |
Related Functions | |
(Note that these are not member functions.) | |
Gnome::Canvas::Item * | wrap (GnomeCanvasItem *object, bool take_copy=false) |
A Glib::wrap() method for this object. |
virtual Gnome::Canvas::Item::~Item | ( | ) | [virtual] |
void Gnome::Canvas::Item::affine_absolute | ( | const Art::AffineTrans & | affine | ) |
void Gnome::Canvas::Item::affine_relative | ( | const Art::AffineTrans & | affine | ) |
virtual void Gnome::Canvas::Item::bounds_vfunc | ( | double * | x1, | |
double * | y1, | |||
double * | x2, | |||
double * | y2 | |||
) | [virtual] |
virtual ArtUta* Gnome::Canvas::Item::coverage_vfunc | ( | ) | [virtual] |
virtual void Gnome::Canvas::Item::draw_vfunc | ( | const Glib::RefPtr< Gdk::Drawable > & | drawable, | |
int | x, | |||
int | y, | |||
int | width, | |||
int | height | |||
) | [virtual] |
void Gnome::Canvas::Item::get_bounds | ( | double & | x1, | |
double & | y1, | |||
double & | x2, | |||
double & | y2 | |||
) | const |
Queries the bounding box of a canvas item.
The bounds are returned in the coordinate system of the item's parent.
x1 | Leftmost edge of the bounding box (return value). | |
y1 | Upper edge of the bounding box (return value). | |
x2 | Rightmost edge of the bounding box (return value). | |
y2 | Lower edge of the bounding box (return value). |
Canvas* Gnome::Canvas::Item::get_canvas | ( | ) | const |
Returns the canvas we're on.
Art::AffineTrans Gnome::Canvas::Item::get_i2c_affine | ( | ) | const |
Art::AffineTrans Gnome::Canvas::Item::get_i2w_affine | ( | ) | const |
const Group* Gnome::Canvas::Item::get_parent_group | ( | ) | const |
Group* Gnome::Canvas::Item::get_parent_group | ( | ) |
const GnomeCanvasItem* Gnome::Canvas::Item::gobj | ( | ) | const [inline] |
Provides access to the underlying C GtkObject.
Reimplemented in Gnome::Canvas::Bpath, Gnome::Canvas::Ellipse, Gnome::Canvas::Group, Gnome::Canvas::Line, Gnome::Canvas::Pixbuf, Gnome::Canvas::Polygon, Gnome::Canvas::RectEllipse, Gnome::Canvas::Rect, Gnome::Canvas::RichText, Gnome::Canvas::Shape, Gnome::Canvas::Text, and Gnome::Canvas::Widget.
GnomeCanvasItem* Gnome::Canvas::Item::gobj | ( | ) | [inline] |
Provides access to the underlying C GtkObject.
Reimplemented in Gnome::Canvas::Bpath, Gnome::Canvas::Ellipse, Gnome::Canvas::Group, Gnome::Canvas::Line, Gnome::Canvas::Pixbuf, Gnome::Canvas::Polygon, Gnome::Canvas::RectEllipse, Gnome::Canvas::Rect, Gnome::Canvas::RichText, Gnome::Canvas::Shape, Gnome::Canvas::Text, and Gnome::Canvas::Widget.
int Gnome::Canvas::Item::grab | ( | unsigned int | event_mask, | |
guint32 | etime | |||
) |
int Gnome::Canvas::Item::grab | ( | unsigned int | event_mask, | |
const Gdk::Cursor & | cursor, | |||
guint32 | etime | |||
) |
void Gnome::Canvas::Item::grab_focus | ( | ) |
Makes the specified item take the keyboard focus, so all keyboard events will be sent to it.
If the canvas widget itself did not have the focus, it grabs it as well.
void Gnome::Canvas::Item::hide | ( | ) |
Hides a canvas item.
If the item was already hidden, then no action is taken.
void Gnome::Canvas::Item::i2w | ( | double & | x, | |
double & | y | |||
) |
Converts a coordinate pair from item-relative coordinates to world coordinates.
x | X coordinate to convert (input/output value). | |
y | Y coordinate to convert (input/output value). |
void Gnome::Canvas::Item::item_construct | ( | Group & | group, | |
const gchar * | first_arg_name, | |||
va_list | ap | |||
) | [protected] |
void Gnome::Canvas::Item::item_construct | ( | Group & | group | ) | [protected] |
void Gnome::Canvas::Item::lower | ( | int | positions | ) |
Lowers the item in its parent's stack by the specified number of positions.
If the number of positions is greater than the distance to the bottom of the stack, then the item is put at the bottom.
positions | Number of steps to lower the item. |
void Gnome::Canvas::Item::lower_to_bottom | ( | ) |
Lowers an item to the bottom of its parent's stack.
virtual void Gnome::Canvas::Item::map_vfunc | ( | ) | [virtual] |
void Gnome::Canvas::Item::move | ( | double | dx, | |
double | dy | |||
) |
Moves a canvas item by creating an affine transformation matrix for translation by using the specified values.
This happens in item local coordinate system, so if you have nontrivial transform, it most probably does not do, what you want.
dx | Horizontal offset. | |
dy | Vertical offset. |
virtual bool Gnome::Canvas::Item::on_event | ( | GdkEvent * | p1 | ) | [protected, virtual] |
virtual double Gnome::Canvas::Item::point_vfunc | ( | double | x, | |
double | y, | |||
int | cx, | |||
int | cy, | |||
GnomeCanvasItem ** | actual_item | |||
) | [virtual] |
Glib::PropertyProxy_ReadOnly<Group*> Gnome::Canvas::Item::property_parent | ( | ) | const |
You rarely need to use properties because there are get_ and set_ methods for almost all of them.
Glib::PropertyProxy<Group*> Gnome::Canvas::Item::property_parent | ( | ) |
You rarely need to use properties because there are get_ and set_ methods for almost all of them.
void Gnome::Canvas::Item::raise | ( | int | positions | ) |
Raises the item in its parent's stack by the specified number of positions.
If the number of positions is greater than the distance to the top of the stack, then the item is put at the top.
positions | Number of steps to raise the item. |
void Gnome::Canvas::Item::raise_to_top | ( | ) |
Raises an item to the top of its parent's stack.
virtual void Gnome::Canvas::Item::realize_vfunc | ( | ) | [virtual] |
virtual void Gnome::Canvas::Item::render_vfunc | ( | GnomeCanvasBuf * | buf | ) | [virtual] |
void Gnome::Canvas::Item::reparent | ( | Group & | new_group | ) |
Changes the parent of the specified item to be the new group.
The item keeps its group-relative coordinates as for its old parent, so the item may change its absolute position within the canvas.
new_group | A canvas group. |
void Gnome::Canvas::Item::request_redraw_svp | ( | const ArtSVP * | svp | ) | [protected] |
Request redraw of the svp if in aa mode, or the entire item in in xlib mode.
svp | The svp that needs to be redrawn. |
void Gnome::Canvas::Item::request_update | ( | ) | [protected] |
To be used only by item implementations.
Requests that the canvas queue an update for the specified item.
void Gnome::Canvas::Item::reset_bounds | ( | ) | [protected] |
Resets the bounding box of a canvas item to an empty rectangle.
void Gnome::Canvas::Item::set | ( | const gchar * | first_arg_name, | |
... | ||||
) | [protected] |
void Gnome::Canvas::Item::show | ( | ) |
Shows a canvas item.
If the item was already shown, then no action is taken.
Glib::SignalProxy1< bool,GdkEvent* > Gnome::Canvas::Item::signal_event | ( | ) |
bool on_my_event(GdkEvent* p1)
void Gnome::Canvas::Item::ungrab | ( | guint32 | etime | ) |
Ungrabs the item, which must have been grabbed in the canvas, and ungrabs the mouse.
etime | The timestamp for ungrabbing the mouse. |
virtual void Gnome::Canvas::Item::unmap_vfunc | ( | ) | [virtual] |
virtual void Gnome::Canvas::Item::unrealize_vfunc | ( | ) | [virtual] |
void Gnome::Canvas::Item::update_bbox | ( | int | x1, | |
int | y1, | |||
int | x2, | |||
int | y2 | |||
) | [protected] |
Sets the bbox to the new value, requesting full repaint.
item | The canvas item needing update. | |
x1 | Left coordinate of the new bounding box. | |
y1 | Top coordinate of the new bounding box. | |
x2 | Right coordinate of the new bounding box. | |
y2 | Bottom coordinate of the new bounding box. |
void Gnome::Canvas::Item::update_svp | ( | ArtSVP ** | p_svp, | |
ArtSVP * | new_svp | |||
) | [protected] |
Sets the svp to the new value, requesting repaint on what's changed.
This function takes responsibility for freeing new_svp. This routine also adds the svp's bbox to the item's.
p_svp | A pointer to the existing svp. | |
new_svp | The new svp. |
void Gnome::Canvas::Item::update_svp_clip | ( | ArtSVP ** | p_svp, | |
ArtSVP * | new_svp, | |||
ArtSVP * | clip_svp | |||
) | [protected] |
Sets the svp to the new value, clipping if necessary, and requesting repaint on what's changed.
This function takes responsibility for freeing new_svp.
p_svp | A pointer to the existing svp. | |
new_svp | The new svp. | |
clip_svp | A clip path, if non-null. |
virtual void Gnome::Canvas::Item::update_vfunc | ( | double * | affine, | |
ArtSVP * | clip_path, | |||
int | flags | |||
) | [virtual] |
void Gnome::Canvas::Item::w2i | ( | double & | x, | |
double & | y | |||
) |
Converts a coordinate pair from world coordinates to item-relative coordinates.
x | X coordinate to convert (input/output value). | |
y | Y coordinate to convert (input/output value). |
Gnome::Canvas::Item * wrap | ( | GnomeCanvasItem * | object, | |
bool | take_copy = false | |||
) | [related] |
A Glib::wrap() method for this object.
object | The C instance. | |
take_copy | False if the result should take ownership of the C instance. True if it should take a new copy or ref. |