Class: GOffice::CanvasItem
- Inherits:
-
Object
- Object
- GOffice::CanvasItem
- Defined in:
- (unknown)
Overview
The base class for all canvas items.
Direct Known Subclasses
CanvasComponent, CanvasGraph, CanvasGroup, CanvasImage, CanvasPixbuf, CanvasStyledItem, CanvasWidget
Instance Method Summary collapse
-
#bounds_changed ⇒ nil
This function needs to be called each time the bounds of item change.
-
#canvas ⇒ GOffice::Canvas
Canvas.
- #canvas=(canvas) ⇒ GOffice::Canvas
-
#copy(source) ⇒ nil
Copies source properties to dest.
-
#destroy ⇒ nil
Destroys item, removes it from its parent group and updates the canvas accordingly.
-
#distance(x, y, near_item) ⇒ Float
Evaluates the distance between the point with canvas coordinates x,y and the nearest point of item.
-
#draw(cr) ⇒ nil
Renders item using cr.
-
#draw_region(cr, x0, y0, x1, y1) ⇒ Boolean
Renders item using cr, limiting all drawings to the region limited by x0, y0, x1, and y1.
-
#duplicate(parent) ⇒ GOffice::CanvasItem
Creates a new GocItem identical to item inside the parent GocGroup if not NULL.
-
#get_bounds(x0, y0, x1, y1) ⇒ nil
Retrieves the bounds of item in canvas coordinates.
-
#grab ⇒ nil
Grabs the item.
-
#hide ⇒ nil
Hides item.
-
#initialize(parent, type, first_arg_name, array) ⇒ GOffice::CanvasItem
constructor
Creates a new item of type type in group group.
-
#invalidate ⇒ nil
Force a redraw of item bounding region.
-
#is_visible ⇒ Boolean
True if item is visible.
-
#lower(n) ⇒ nil
Lowers item by n steps inside its parent Goc::Group (or less if the list is too short) in the item list so that it is displayed more deeply in the items stack.
-
#lower_to_bottom ⇒ nil
Lowers item to bottom inside its parent Goc::Group so that it will be at least partly hidden by any overlapping item.
-
#operator ⇒ cairo::Operator
The operator used when drawing the item.
-
#operator=(op) ⇒ nil
Set the operator used when drawing the item.
-
#parent ⇒ GOffice::CanvasGroup
Parent.
- #parent=(parent) ⇒ GOffice::CanvasGroup
-
#raise(n) ⇒ nil
Raises item by n steps inside its parent Goc::Group (or less if the list is too short) in the item list so that it is displayed nearer the top of the items stack.
-
#raise_to_top ⇒ nil
Raises item to front so that it becomes the toplevel item inside its parent Goc::Group.
-
#set(first_arg_name, array) ⇒ nil
Set properties and updates the canvas.
-
#show ⇒ nil
Makes item visible.
-
#style_context ⇒ Gtk::StyleContext
The style context to use for the item.
-
#transform=(m) ⇒ nil
Set the matrix used to transform the item.
-
#ungrab ⇒ nil
Ungrabs the item.
-
#visible=(visible) ⇒ nil
Either hides or shows item as appropriate..
-
#window ⇒ Gdk::Window
NULL.
Constructor Details
#initialize(parent, type, first_arg_name, array) ⇒ GOffice::CanvasItem
Creates a new item of type type in group group. Properties can be set just the same way they are in #g_object_new.
Instance Method Details
#bounds_changed ⇒ nil
This function needs to be called each time the bounds of item change. It is normally called from inside the implementation of items derived classes.
#canvas ⇒ GOffice::Canvas
Returns canvas.
#canvas=(canvas) ⇒ GOffice::Canvas
#copy(source) ⇒ nil
Copies source properties to dest. The two items must be of the same type and their common class needs a copy member.
#destroy ⇒ nil
Destroys item, removes it from its parent group and updates the canvas accordingly.
#distance(x, y, near_item) ⇒ Float
Evaluates the distance between the point with canvas coordinates x,y and the nearest point of item. near_item is set with either item or its appropriate child.
#draw(cr) ⇒ nil
Renders item using cr. There is no need to call this function directly. Invalidating the item is the way to go.
#draw_region(cr, x0, y0, x1, y1) ⇒ Boolean
Renders item using cr, limiting all drawings to the region limited by x0, y0, x1, and y1. If this function returns false, #goc_item_draw should be called. There is no need to call this function directly. Invalidating the item is the way to go.
#duplicate(parent) ⇒ GOffice::CanvasItem
Creates a new GocItem identical to item inside the parent GocGroup if not NULL. not possible.
#get_bounds(x0, y0, x1, y1) ⇒ nil
Retrieves the bounds of item in canvas coordinates.
#grab ⇒ nil
Grabs the item. This function will fail if another item is grabbed.
#hide ⇒ nil
Hides item.
#invalidate ⇒ nil
Force a redraw of item bounding region.
#is_visible ⇒ Boolean
Returns true if item is visible.
#lower(n) ⇒ nil
Lowers item by n steps inside its parent Goc::Group (or less if the list is too short) in the item list so that it is displayed more deeply in the items stack.
#lower_to_bottom ⇒ nil
Lowers item to bottom inside its parent Goc::Group so that it will be at least partly hidden by any overlapping item.
#operator ⇒ cairo::Operator
Returns the operator used when drawing the item.
#operator=(op) ⇒ nil
Set the operator used when drawing the item.
#parent ⇒ GOffice::CanvasGroup
Returns parent.
#parent=(parent) ⇒ GOffice::CanvasGroup
#raise(n) ⇒ nil
Raises item by n steps inside its parent Goc::Group (or less if the list is too short) in the item list so that it is displayed nearer the top of the items stack.
#raise_to_top ⇒ nil
Raises item to front so that it becomes the toplevel item inside its parent Goc::Group.
#set(first_arg_name, array) ⇒ nil
Set properties and updates the canvas. Using #g_object_set instead would set the properties, but not update the canvas.
#show ⇒ nil
Makes item visible.
#style_context ⇒ Gtk::StyleContext
Returns The style context to use for the item.
#transform=(m) ⇒ nil
Set the matrix used to transform the item.
#ungrab ⇒ nil
Ungrabs the item. This function will fail if item is not grabbed.
#visible=(visible) ⇒ nil
Either hides or shows item as appropriate..
#window ⇒ Gdk::Window
NULL. Only Goc::Widget owns a #GdkWindow.