GooCanvas-2.0 Python API Documentation

Class: GooCanvas.Canvas

Implements: Atk.ImplementorIface, Gtk.Buildable, Gtk.Scrollable

Subclass of: Gtk.Container

The #GooCanvas-struct struct contains private data only.

Properties

int"background-color-rgb"read/write

float"scale-x"read/write

float"scale"read/write

float"y2"read/write

float"y1"read/write

bool"redraw-when-scrolled"read/write

float"x1"read/write

bool"clear-background"read/write

bool"automatic-bounds"read/write

GooCanvas.CanvasAnchorType"anchor"read/write

float"x2"read/write

Gtk.Unit"units"read/write

float"scale-y"read/write

float"bounds-padding"read/write

float"resolution-y"read/write

float"resolution-x"read/write

bool"integer-layout"read/write

bool"bounds-from-origin"read/write

string"background-color"read/write

Signals

void"item-created"(self, canvas, item, model)

This is emitted when a new canvas item is created, in model/view mode. Applications can set up signal handlers for the new items here.

Methods

boolboolean_handled_accumulator(ihint, return_accu, handler_return, dummy)(static method)

cairo.Patterncairo_pattern_from_pixbuf(pixbuf)(static method)

cairo.Surfacecairo_surface_from_pixbuf(pixbuf)(static method)

voidconvert_bounds_to_item_space(item, bounds)

intconvert_colors_to_rgba(red, green, blue, alpha)(static method)

voidconvert_from_item_space(item, x, y)

voidconvert_from_pixels(x, y)

voidconvert_to_item_space(item, x, y)

voidconvert_to_pixels(x, y)

cairo.Contextcreate_cairo_context()

voidcreate_path(commands, cr)(static method)

cairo.Patterncreate_pattern_from_color_value(value)(static method)

cairo.Patterncreate_pattern_from_pixbuf_value(value)(static method)

cairo.Patterncreate_pattern_from_rgba_value(value)(static method)

voidget_bounds(left, top, right, bottom)

floatget_default_line_width()

GooCanvas.CanvasItemget_item_at(x, y, is_pointer_event)

GLib.Listget_items_at(x, y, is_pointer_event)

GLib.Listget_items_in_area(area, inside_area, allow_overlaps, include_containers)

voidget_rgba_value_from_pattern(pattern, value)(static method)

GooCanvas.CanvasItemget_root_item()

GooCanvas.CanvasItemModelget_root_item_model()

floatget_scale()

GooCanvas.CanvasItemget_static_root_item()

GooCanvas.CanvasItemModelget_static_root_item_model()

voidgrab_focus(item)

voiditem_created(item, model)

Gdk.GrabStatuskeyboard_grab(item, owner_events, time)

voidkeyboard_ungrab(item, time)

voidmarshal_BOOLEAN__BOXED(closure, return_value, n_param_values, param_values, invocation_hint, marshal_data)(static method)

voidmarshal_BOOLEAN__DOUBLE_DOUBLE_BOOLEAN_OBJECT(closure, return_value, n_param_values, param_values, invocation_hint, marshal_data)(static method)

voidmarshal_BOOLEAN__OBJECT_BOXED(closure, return_value, n_param_values, param_values, invocation_hint, marshal_data)(static method)

voidmarshal_VOID__INT_INT(closure, return_value, n_param_values, param_values, invocation_hint, marshal_data)(static method)

voidmarshal_VOID__OBJECT_OBJECT(closure, return_value, n_param_values, param_values, invocation_hint, marshal_data)(static method)

Arrayparse_path_data(path_data)(static method)

Gdk.GrabStatuspointer_grab(item, event_mask, cursor, time)

voidpointer_ungrab(item, time)

voidregister_widget_item(witem)

voidrender(cr, bounds, scale)

voidrequest_item_redraw(bounds, is_static)

voidrequest_redraw(bounds)

voidrequest_update()

voidscroll_to(left, top)

voidset_bounds(left, top, right, bottom)

voidset_root_item(item)

voidset_root_item_model(model)

voidset_scale(scale)

voidset_static_root_item(item)

voidset_static_root_item_model(model)

voidset_style_property_from_pattern(style, property_id, pattern)(static method)

voidunregister_item(model)

voidunregister_widget_item(witem)

voidupdate()

intutil_ptr_array_find_index(ptr_array, data)(static method)

voidutil_ptr_array_insert(ptr_array, data, index)(static method)

voidutil_ptr_array_move(ptr_array, old_index, new_index)(static method)

Class: GooCanvas.CanvasAccessibleFactory

Subclass of: Atk.ObjectFactory

Class: GooCanvas.CanvasItemAccessibleFactory

Subclass of: Atk.ObjectFactory

Class: GooCanvas.CanvasWidgetAccessibleFactory

Subclass of: Atk.ObjectFactory

Class: GooCanvas.CanvasEllipse

Implements: GooCanvas.CanvasItem

Subclass of: GooCanvas.CanvasItemSimple

GooCanvasEllipse represents an ellipse item. It is a subclass of #GooCanvasItemSimple and so inherits all of the style properties such as "stroke-color", "fill-color" and "line-width". It also implements the #GooCanvasItem interface, so you can use the #GooCanvasItem functions such as goo_canvas_item_raise() and goo_canvas_item_rotate(). To create a #GooCanvasEllipse use goo_canvas_ellipse_new(). To get or set the properties of an existing #GooCanvasEllipse, use g_object_get() and g_object_set(). The ellipse can be specified either with the "center-x", "center-y", "radius-x" and "radius-y" properties, or with the "x", "y", "width" and "height" properties.

Properties

float"radius-y"read/write

float"radius-x"read/write

float"height"read/write

float"width"read/write

float"y"read/write

float"x"read/write

float"center-x"read/write

float"center-y"read/write

Methods

Class: GooCanvas.CanvasEllipseModel

Implements: GooCanvas.CanvasItemModel

Subclass of: GooCanvas.CanvasItemModelSimple

GooCanvasEllipseModel represents a model for ellipse items. It is a subclass of #GooCanvasItemModelSimple and so inherits all of the style properties such as "stroke-color", "fill-color" and "line-width". It also implements the #GooCanvasItemModel interface, so you can use the #GooCanvasItemModel functions such as goo_canvas_item_model_raise() and goo_canvas_item_model_rotate(). To create a #GooCanvasEllipseModel use goo_canvas_ellipse_model_new(). To get or set the properties of an existing #GooCanvasEllipseModel, use g_object_get() and g_object_set(). The ellipse can be specified either with the "center-x", "center-y", "radius-x" and "radius-y" properties, or with the "x", "y", "width" and "height" properties. To respond to events such as mouse clicks on the ellipse you must connect to the signal handlers of the corresponding #GooCanvasEllipse objects. (See goo_canvas_get_item() and #GooCanvas::item-created.)

Properties

float"radius-y"read/write

float"radius-x"read/write

float"height"read/write

float"width"read/write

float"y"read/write

float"x"read/write

float"center-x"read/write

float"center-y"read/write

Methods

Class: GooCanvas.CanvasGrid

Implements: GooCanvas.CanvasItem

Subclass of: GooCanvas.CanvasItemSimple

GooCanvasGrid represents a grid item. A grid consists of a number of equally-spaced horizontal and vertical grid lines, plus an optional border. It is a subclass of #GooCanvasItemSimple and so inherits all of the style properties such as "stroke-color", "fill-color" and "line-width". It also implements the #GooCanvasItem interface, so you can use the #GooCanvasItem functions such as goo_canvas_item_raise() and goo_canvas_item_rotate(). To create a #GooCanvasGrid use goo_canvas_grid_new(). To get or set the properties of an existing #GooCanvasGrid, use g_object_get() and g_object_set(). The grid's position and size is specified with the #GooCanvasGrid:x, #GooCanvasGrid:y, #GooCanvasGrid:width and #GooCanvasGrid:height properties. The #GooCanvasGrid:x-step and #GooCanvasGrid:y-step properties specify the distance between grid lines. The #GooCanvasGrid:x-offset and #GooCanvasGrid:y-offset properties specify the distance before the first grid lines. The horizontal or vertical grid lines can be hidden using the #GooCanvasGrid:show-horz-grid-lines and #GooCanvasGrid:show-vert-grid-lines properties. The width of the border can be set using the #GooCanvasGrid:border-width property. The border is drawn outside the area specified with the #GooCanvasGrid:x, #GooCanvasGrid:y, #GooCanvasGrid:width and #GooCanvasGrid:height properties. Other properties allow the colors and widths of the grid lines to be set. The grid line color and width properties override the standard #GooCanvasItemSimple:stroke-color and #GooCanvasItemSimple:line-width properties, enabling different styles for horizontal and vertical grid lines.

Properties

float"y-step"read/write

string"vert-grid-line-color"read/write

string"border-color"read/write

GooCanvas.CairoPattern"border-pattern"read/write

float"height"read/write

GooCanvas.CairoPattern"horz-grid-line-pattern"read/write

string"horz-grid-line-color"read/write

float"x-step"read/write

bool"show-vert-grid-lines"read/write

float"vert-grid-line-width"read/write

int"border-color-rgba"read/write

float"border-width"read/write

float"width"read/write

bool"vert-grid-lines-on-top"read/write

GdkPixbuf.Pixbuf"vert-grid-line-pixbuf"read/write

float"y-offset"read/write

float"x-offset"read/write

GdkPixbuf.Pixbuf"horz-grid-line-pixbuf"read/write

bool"show-horz-grid-lines"read/write

int"horz-grid-line-color-rgba"read/write

float"horz-grid-line-width"read/write

int"vert-grid-line-color-rgba"read/write

float"y"read/write

float"x"read/write

GooCanvas.CairoPattern"vert-grid-line-pattern"read/write

GdkPixbuf.Pixbuf"border-pixbuf"read/write

Methods

Class: GooCanvas.CanvasGridModel

Implements: GooCanvas.CanvasItemModel

Subclass of: GooCanvas.CanvasItemModelSimple

GooCanvasGridModel represents a model for grid items. A grid consists of a number of equally-spaced horizontal and vertical grid lines, plus an optional border. It is a subclass of #GooCanvasItemModelSimple and so inherits all of the style properties such as "stroke-color", "fill-color" and "line-width". It also implements the #GooCanvasItemModel interface, so you can use the #GooCanvasItemModel functions such as goo_canvas_item_model_raise() and goo_canvas_item_model_rotate(). To create a #GooCanvasGridModel use goo_canvas_grid_model_new(). To get or set the properties of an existing #GooCanvasGridModel, use g_object_get() and g_object_set(). To respond to events such as mouse clicks on the grid you must connect to the signal handlers of the corresponding #GooCanvasGrid objects. (See goo_canvas_get_item() and #GooCanvas::item-created.) The grid's position and size is specified with the #GooCanvasGridModel:x, #GooCanvasGridModel:y, #GooCanvasGridModel:width and #GooCanvasGridModel:height properties. The #GooCanvasGridModel:x-step and #GooCanvasGridModel:y-step properties specify the distance between grid lines. The #GooCanvasGridModel:x-offset and #GooCanvasGridModel:y-offset properties specify the distance before the first grid lines. The horizontal or vertical grid lines can be hidden using the #GooCanvasGridModel:show-horz-grid-lines and #GooCanvasGridModel:show-vert-grid-lines properties. The width of the border can be set using the #GooCanvasGridModel:border-width property. The border is drawn outside the area specified with the #GooCanvasGridModel:x, #GooCanvasGridModel:y, #GooCanvasGridModel:width and #GooCanvasGridModel:height properties. Other properties allow the colors and widths of the grid lines to be set. The grid line color and width properties override the standard #GooCanvasItemModelSimple:stroke-color and #GooCanvasItemModelSimple:line-width properties, enabling different styles for horizontal and vertical grid lines.

Properties

float"y-step"read/write

string"vert-grid-line-color"read/write

string"border-color"read/write

GooCanvas.CairoPattern"border-pattern"read/write

float"height"read/write

GooCanvas.CairoPattern"horz-grid-line-pattern"read/write

string"horz-grid-line-color"read/write

float"x-step"read/write

bool"show-vert-grid-lines"read/write

float"vert-grid-line-width"read/write

int"border-color-rgba"read/write

float"border-width"read/write

float"width"read/write

bool"vert-grid-lines-on-top"read/write

GdkPixbuf.Pixbuf"vert-grid-line-pixbuf"read/write

float"y-offset"read/write

float"x-offset"read/write

GdkPixbuf.Pixbuf"horz-grid-line-pixbuf"read/write

bool"show-horz-grid-lines"read/write

int"horz-grid-line-color-rgba"read/write

float"horz-grid-line-width"read/write

int"vert-grid-line-color-rgba"read/write

float"y"read/write

float"x"read/write

GooCanvas.CairoPattern"vert-grid-line-pattern"read/write

GdkPixbuf.Pixbuf"border-pixbuf"read/write

Methods

Class: GooCanvas.CanvasGroup

Implements: GooCanvas.CanvasItem

Known subclasses: GooCanvas.CanvasTable

Subclass of: GooCanvas.CanvasItemSimple

#GooCanvasGroup represents a group of items. Groups can be nested to any depth, to create a hierarchy of items. Items are ordered within each group, with later items being displayed above earlier items. #GooCanvasGroup is a subclass of #GooCanvasItemSimple and so inherits all of the style properties such as "stroke-color", "fill-color" and "line-width". Setting a style property on a #GooCanvasGroup will affect all children of the #GooCanvasGroup (unless the children override the property setting). #GooCanvasGroup implements the #GooCanvasItem interface, so you can use the #GooCanvasItem functions such as goo_canvas_item_raise() and goo_canvas_item_rotate(), and the properties such as "visibility" and "pointer-events". If the #GooCanvasGroup:width and #GooCanvasGroup:height properties are set to positive values then the group is clipped to the given size. To create a #GooCanvasGroup use goo_canvas_group_new(). To get or set the properties of an existing #GooCanvasGroup, use g_object_get() and g_object_set().

Properties

float"y"read/write

float"width"read/write

float"x"read/write

float"height"read/write

Methods

Class: GooCanvas.CanvasGroupModel

Implements: GooCanvas.CanvasItemModel

Known subclasses: GooCanvas.CanvasTableModel

Subclass of: GooCanvas.CanvasItemModelSimple

#GooCanvasGroupModel represents a group of items. Groups can be nested to any depth, to create a hierarchy of items. Items are ordered within each group, with later items being displayed above earlier items. #GooCanvasGroupModel is a subclass of #GooCanvasItemModelSimple and so inherits all of the style properties such as "stroke-color", "fill-color" and "line-width". Setting a style property on a #GooCanvasGroupModel will affect all children of the #GooCanvasGroupModel (unless the children override the property setting). #GooCanvasGroupModel implements the #GooCanvasItemModel interface, so you can use the #GooCanvasItemModel functions such as goo_canvas_item_model_raise() and goo_canvas_item_model_rotate(), and the properties such as "visibility" and "pointer-events". To create a #GooCanvasGroupModel use goo_canvas_group_model_new(). To get or set the properties of an existing #GooCanvasGroupModel, use g_object_get() and g_object_set(). To respond to events such as mouse clicks on the group you must connect to the signal handlers of the corresponding #GooCanvasGroup objects. (See goo_canvas_get_item() and #GooCanvas::item-created.)

Properties

float"y"read/write

float"width"read/write

float"x"read/write

float"height"read/write

Methods

Class: GooCanvas.CanvasImage

Implements: GooCanvas.CanvasItem

Subclass of: GooCanvas.CanvasItemSimple

GooCanvasImage represents an image item. It is a subclass of #GooCanvasItemSimple and so inherits all of the style properties such as "operator" and "pointer-events". It also implements the #GooCanvasItem interface, so you can use the #GooCanvasItem functions such as goo_canvas_item_raise() and goo_canvas_item_rotate(). To create a #GooCanvasImage use goo_canvas_image_new(). To get or set the properties of an existing #GooCanvasImage, use g_object_get() and g_object_set().

Properties

GooCanvas.CairoPattern"pattern"read/write

GdkPixbuf.Pixbuf"pixbuf"read/write

float"height"read/write

float"width"read/write

float"x"read/write

float"y"read/write

float"alpha"read/write

bool"scale-to-fit"read/write

Methods

Class: GooCanvas.CanvasImageModel

Implements: GooCanvas.CanvasItemModel

Subclass of: GooCanvas.CanvasItemModelSimple

GooCanvasImageModel represent a model for image items. It is a subclass of #GooCanvasItemModelSimple and so inherits all of the style properties such as "operator" and "pointer-events". It also implements the #GooCanvasItemModel interface, so you can use the #GooCanvasItemModel functions such as goo_canvas_item_model_raise() and goo_canvas_item_model_rotate(). To create a #GooCanvasImageModel use goo_canvas_image_model_new(). To get or set the properties of an existing #GooCanvasImageModel, use g_object_get() and g_object_set(). To respond to events such as mouse clicks on the image you must connect to the signal handlers of the corresponding #GooCanvasImage objects. (See goo_canvas_get_item() and #GooCanvas::item-created.)

Properties

GooCanvas.CairoPattern"pattern"read/write

GdkPixbuf.Pixbuf"pixbuf"read/write

float"height"read/write

float"width"read/write

float"x"read/write

float"y"read/write

float"alpha"read/write

bool"scale-to-fit"read/write

Methods

Interface: GooCanvas.CanvasItem

Classes implementing GooCanvas.CanvasItem: GooCanvas.CanvasItemSimple, GooCanvas.CanvasEllipse, GooCanvas.CanvasImage, GooCanvas.CanvasText, GooCanvas.CanvasPath, GooCanvas.CanvasGroup, GooCanvas.CanvasPolyline, GooCanvas.CanvasGrid, GooCanvas.CanvasRect, GooCanvas.CanvasWidget, GooCanvas.CanvasTable

#GooCanvasItem defines the interface that canvas items must implement, and contains methods for operating on canvas items.

Properties

utf8"description"read/write

GooCanvas.CanvasItem"parent"read/write

utf8"title"read/write

GooCanvas.CairoMatrix"transform"read/write

utf8"tooltip"read/write

gboolean"can-focus"read/write

GooCanvas.CanvasPointerEvents"pointer-events"read/write

GooCanvas.CanvasItemVisibility"visibility"read/write

gdouble"visibility-threshold"read/write

Signals

gboolean"leave-notify-event"(self, canvas_item, target_item, event)

Emitted when the mouse leaves an item. continue.

gboolean"query-tooltip"(self, canvas_item, x, y, keyboard_mode, tooltip)

Emitted when the mouse has paused over the item for a certain amount of time, or the tooltip was requested via the keyboard. Note that if @keyboard_mode is %TRUE, the values of @x and @y are undefined and should not be used. If the item wants to display a tooltip it should update @tooltip and return %TRUE.

gboolean"grab-broken-event"(self, canvas_item, target_item, event)

Emitted when the item's keyboard or pointer grab was lost unexpectedly. continue.

gboolean"key-release-event"(self, canvas_item, target_item, event)

Emitted when a key is released and the item has the keyboard focus. continue.

gboolean"scroll-event"(self, canvas_item, target_item, event)

Emitted when a button in the 4 to 7 range is pressed. Wheel mice are usually configured to generate button press events for buttons 4 and 5 when the wheel is turned in an item. continue.

gboolean"key-press-event"(self, canvas_item, target_item, event)

Emitted when a key is pressed and the item has the keyboard focus. continue.

gboolean"focus-out-event"(self, canvas_item, target_item, event)

Emitted when the item loses the keyboard focus. continue.

gboolean"enter-notify-event"(self, canvas_item, target_item, event)

Emitted when the mouse enters an item. continue.

none"animation-finished"(self, canvas_item, stopped)

Emitted when the item animation has finished.

gboolean"motion-notify-event"(self, canvas_item, target_item, event)

Emitted when the mouse moves within an item. continue.

none"child-notify"(self, canvas_item, pspec)

Emitted for each child property that has changed. The signal's detail holds the property name.

gboolean"button-release-event"(self, canvas_item, target_item, event)

Emitted when a mouse button is released in an item. continue.

gboolean"focus-in-event"(self, canvas_item, target_item, event)

Emitted when the item receives the keyboard focus. continue.

gboolean"button-press-event"(self, canvas_item, target_item, event)

Emitted when a mouse button is pressed in an item. continue.

Methods

voidadd_child(child, position)

voidallocate_area(cr, requested_area, allocated_area, x_offset, y_offset)

voidanimate(x, y, scale, degrees, absolute, duration, step_time, type)

voidanimation_finished(stopped)

boolbutton_press_event(target, event)

boolbutton_release_event(target, event)

voidchild_notify(pspec)

voidensure_updated()

boolenter_notify_event(target, event)

intfind_child(child)

boolfocus_in_event(target, event)

boolfocus_out_event(target, event)

void, GooCanvas.CanvasBoundsget_bounds()

GooCanvas.Canvasget_canvas()

GooCanvas.CanvasItemget_child(child_num)

voidget_child_property(child, property_id, value, pspec)

boolget_is_static()

GLib.Listget_items_at(x, y, cr, is_pointer_event, parent_is_visible, found_items)

intget_n_children()

GooCanvas.CanvasItemget_parent()

boolget_requested_area(cr, requested_area)

floatget_requested_height(cr, width)

bool, float, float, float, floatget_simple_transform()

bool, cairo.Matrixget_transform()

boolget_transform_for_child(child, transform)

boolgrab_broken_event(target, event)

boolis_container()

boolis_visible()

boolkey_press_event(target, event)

boolkey_release_event(target, event)

boolleave_notify_event(target, event)

voidlower(below)

boolmotion_notify_event(target, event)

voidmove_child(old_position, new_position)

voidpaint(cr, bounds, scale)

boolquery_tooltip(x, y, keyboard_tooltip, tooltip)

voidraise(above)

voidremove()

voidremove_child(child_num)

voidrequest_update()

voidrotate(degrees, cx, cy)

voidscale(sx, sy)

boolscroll_event(target, event)

voidset_canvas(canvas)

voidset_child_property(child, property_id, value, pspec)

voidset_is_static(is_static)

voidset_model(model)

voidset_parent(parent)

voidset_simple_transform(x, y, scale, rotation)

voidset_style(style)

voidset_transform(transform)

voidskew_x(degrees, cx, cy)

voidskew_y(degrees, cx, cy)

voidstop_animation()

voidtranslate(tx, ty)

voidupdate(entire_tree, cr, bounds)

Interface: GooCanvas.CanvasItemModel

Classes implementing GooCanvas.CanvasItemModel: GooCanvas.CanvasRectModel, GooCanvas.CanvasTextModel, GooCanvas.CanvasPolylineModel, GooCanvas.CanvasGroupModel, GooCanvas.CanvasImageModel, GooCanvas.CanvasItemModelSimple, GooCanvas.CanvasPathModel, GooCanvas.CanvasGridModel, GooCanvas.CanvasEllipseModel, GooCanvas.CanvasTableModel

#GooCanvasItemModel defines the interface that models for canvas items must implement, and contains methods for operating on canvas item models. <note><para> The Model/View canvas feature may be removed in a future version of GooCanvas. </para></note>

Properties

utf8"description"read/write

GooCanvas.CanvasItemModel"parent"read/write

utf8"title"read/write

GooCanvas.CairoMatrix"transform"read/write

utf8"tooltip"read/write

gboolean"can-focus"read/write

GooCanvas.CanvasPointerEvents"pointer-events"read/write

GooCanvas.CanvasItemVisibility"visibility"read/write

gdouble"visibility-threshold"read/write

Signals

none"child-added"(self, canvas_item_model, child_num)

Emitted when a child has been added.

none"changed"(self, canvas_item_model, recompute_bounds)

Emitted when the item model has been changed.

none"animation-finished"(self, canvas_item_model, stopped)

Emitted when the item model animation has finished.

none"child-notify"(self, canvas_item_model, pspec)

Emitted for each child property that has changed. The signal's detail holds the property name.

none"child-removed"(self, canvas_item_model, child_num)

Emitted when a child has been removed.

none"child-moved"(self, canvas_item_model, old_child_num, new_child_num)

Emitted when a child has been moved in the stacking order.

Methods

voidadd_child(child, position)

voidanimate(x, y, scale, degrees, absolute, duration, step_time, type)

voidanimation_finished(stopped)

voidchanged(recompute_bounds)

voidchild_added(child_num)

voidchild_moved(old_child_num, new_child_num)

voidchild_notify(pspec)

voidchild_removed(child_num)

intfind_child(child)

GooCanvas.CanvasItemModelget_child(child_num)

voidget_child_property(child, property_id, value, pspec)

intget_n_children()

boolget_simple_transform(x, y, scale, rotation)

boolget_transform(transform)

boolis_container()

voidlower(below)

voidmove_child(old_position, new_position)

voidraise(above)

voidremove()

voidremove_child(child_num)

voidrotate(degrees, cx, cy)

voidscale(sx, sy)

voidset_child_property(child, property_id, value, pspec)

voidset_parent(parent)

voidset_simple_transform(x, y, scale, rotation)

voidset_style(style)

voidset_transform(transform)

voidskew_x(degrees, cx, cy)

voidskew_y(degrees, cx, cy)

voidstop_animation()

voidtranslate(tx, ty)

Class: GooCanvas.CanvasItemModelSimple

Implements: GooCanvas.CanvasItemModel

Known subclasses: GooCanvas.CanvasPathModel, GooCanvas.CanvasTextModel, GooCanvas.CanvasRectModel, GooCanvas.CanvasPolylineModel, GooCanvas.CanvasImageModel, GooCanvas.CanvasGroupModel, GooCanvas.CanvasGridModel, GooCanvas.CanvasEllipseModel

Subclass of: GObject.Object

#GooCanvasItemModelSimple is used as a base class for the standard canvas item models. It can also be used as the base class for new custom canvas item models. <note><para> The Model/View canvas feature may be removed in a future version of GooCanvas. </para></note> It provides default implementations for many of the #GooCanvasItemModel methods. Subclasses of #GooCanvasItemModelSimple only need to implement the create_item() method of the #GooCanvasItemModel interface, to create the default canvas item to view the item model.

Properties

float"line-join-miter-limit"read/write

GooCanvas.CairoFillRule"fill-rule"read/write

Pango.FontDescription"font-desc"read/write

int"stroke-color-rgba"read/write

string"clip-path"read/write

The sequence of commands describing the clip path of the item, specified as a string using the same syntax as in the <ulink url="http://www.w3.org/Graphics/SVG/">Scalable Vector Graphics (SVG)</ulink> path element.

GooCanvas.CairoLineCap"line-cap"read/write

int"fill-color-rgba"read/write

GooCanvas.CairoPattern"stroke-pattern"read/write

GooCanvas.CairoAntialias"antialias"read/write

GdkPixbuf.Pixbuf"fill-pixbuf"read/write

GooCanvas.CairoFillRule"clip-fill-rule"read/write

GdkPixbuf.Pixbuf"stroke-pixbuf"read/write

string"fill-color"read/write

string"stroke-color"read/write

GooCanvas.CanvasLineDash"line-dash"read/write

GooCanvas.CairoHintMetrics"hint-metrics"read/write

GooCanvas.CairoOperator"operator"read/write

string"font"read/write

GooCanvas.CairoLineJoin"line-join"read/write

GooCanvas.CairoPattern"fill-pattern"read/write

float"line-width"read/write

Class: GooCanvas.CanvasItemSimple

Implements: GooCanvas.CanvasItem

Known subclasses: GooCanvas.CanvasEllipse, GooCanvas.CanvasImage, GooCanvas.CanvasText, GooCanvas.CanvasPath, GooCanvas.CanvasGroup, GooCanvas.CanvasPolyline, GooCanvas.CanvasGrid, GooCanvas.CanvasRect, GooCanvas.CanvasWidget

Subclass of: GObject.Object

#GooCanvasItemSimple is used as a base class for all of the standard canvas items. It can also be used as the base class for new custom canvas items. It provides default implementations for many of the #GooCanvasItem methods. For very simple items, all that is needed is to implement the create_path() method. (#GooCanvasEllipse, #GooCanvasRect and #GooCanvasPath do this.) More complicated items need to implement the update(), paint() and is_item_at() methods instead. (#GooCanvasImage, #GooCanvasPolyline, #GooCanvasText and #GooCanvasWidget do this.) They may also need to override some of the other GooCanvasItem methods such as set_canvas(), set_parent() or allocate_area() if special code is needed. (#GooCanvasWidget does this to make sure the #GtkWidget is embedded in the #GooCanvas widget correctly.)

Properties

float"line-join-miter-limit"read/write

GooCanvas.CairoFillRule"fill-rule"read/write

Pango.FontDescription"font-desc"read/write

int"stroke-color-rgba"read/write

string"clip-path"read/write

The sequence of commands describing the clip path of the item, specified as a string using the same syntax as in the <ulink url="http://www.w3.org/Graphics/SVG/">Scalable Vector Graphics (SVG)</ulink> path element.

GooCanvas.CairoLineCap"line-cap"read/write

int"fill-color-rgba"read/write

GooCanvas.CairoPattern"stroke-pattern"read/write

GooCanvas.CairoAntialias"antialias"read/write

GdkPixbuf.Pixbuf"fill-pixbuf"read/write

GooCanvas.CairoFillRule"clip-fill-rule"read/write

GdkPixbuf.Pixbuf"stroke-pixbuf"read/write

string"fill-color"read/write

string"stroke-color"read/write

GooCanvas.CanvasLineDash"line-dash"read/write

GooCanvas.CairoHintMetrics"hint-metrics"read/write

GooCanvas.CairoOperator"operator"read/write

string"font"read/write

GooCanvas.CairoLineJoin"line-join"read/write

GooCanvas.CairoPattern"fill-pattern"read/write

float"line-width"read/write

Methods

voidchanged(recompute_bounds)

boolcheck_in_path(x, y, cr, pointer_events)

voidcheck_style()

floatget_line_width()

voidget_path_bounds(cr, bounds)

voidpaint_path(cr)

voidset_model(model)

voidsimple_create_path(cr)

boolsimple_is_item_at(x, y, cr, is_pointer_event)

voidsimple_paint(cr, bounds)

voidsimple_update(cr)

voiduser_bounds_to_device(cr, bounds)

voiduser_bounds_to_parent(cr, bounds)

Class: GooCanvas.CanvasPath

Implements: GooCanvas.CanvasItem

Subclass of: GooCanvas.CanvasItemSimple

GooCanvasPath represents a path item, which is a series of one or more lines, bezier curves, or elliptical arcs. It is a subclass of #GooCanvasItemSimple and so inherits all of the style properties such as "stroke-color", "fill-color" and "line-width". It also implements the #GooCanvasItem interface, so you can use the #GooCanvasItem functions such as goo_canvas_item_raise() and goo_canvas_item_rotate(). #GooCanvasPath uses the same path specification strings as the Scalable Vector Graphics (SVG) path element. For details see the <ulink url="http://www.w3.org/Graphics/SVG/">SVG specification</ulink>. To create a #GooCanvasPath use goo_canvas_path_new(). To get or set the properties of an existing #GooCanvasPath, use g_object_get() and g_object_set().

Properties

float"y"read/write

float"width"read/write

string"data"read/write

The sequence of path commands, specified as a string using the same syntax as in the <ulink url="http://www.w3.org/Graphics/SVG/">Scalable Vector Graphics (SVG)</ulink> path element.

float"x"read/write

float"height"read/write

Methods

Class: GooCanvas.CanvasPathModel

Implements: GooCanvas.CanvasItemModel

Subclass of: GooCanvas.CanvasItemModelSimple

GooCanvasPathModel represents a model for path items, which are a series of one or more lines, bezier curves, or elliptical arcs. It is a subclass of #GooCanvasItemModelSimple and so inherits all of the style properties such as "stroke-color", "fill-color" and "line-width". It also implements the #GooCanvasItemModel interface, so you can use the #GooCanvasItemModel functions such as goo_canvas_item_model_raise() and goo_canvas_item_model_rotate(). #GooCanvasPathModel uses the same path specification strings as the Scalable Vector Graphics (SVG) path element. For details see the <ulink url="http://www.w3.org/Graphics/SVG/">SVG specification</ulink>. To create a #GooCanvasPathModel use goo_canvas_path_model_new(). To get or set the properties of an existing #GooCanvasPathModel, use g_object_get() and g_object_set(). To respond to events such as mouse clicks on the path you must connect to the signal handlers of the corresponding #GooCanvasPath objects. (See goo_canvas_get_item() and #GooCanvas::item-created.)

Properties

float"y"read/write

float"width"read/write

string"data"read/write

float"x"read/write

float"height"read/write

Methods

Class: GooCanvas.CanvasPolyline

Implements: GooCanvas.CanvasItem

Subclass of: GooCanvas.CanvasItemSimple

GooCanvasPolyline represents a polyline item, which is a series of one or more lines, with optional arrows at either end. It is a subclass of #GooCanvasItemSimple and so inherits all of the style properties such as "stroke-color", "fill-color" and "line-width". It also implements the #GooCanvasItem interface, so you can use the #GooCanvasItem functions such as goo_canvas_item_raise() and goo_canvas_item_rotate(). To create a #GooCanvasPolyline use goo_canvas_polyline_new(), or goo_canvas_polyline_new_line() for a simple line between two points. To get or set the properties of an existing #GooCanvasPolyline, use g_object_get() and g_object_set().

Properties

bool"end-arrow"read/write

float"arrow-width"read/write

bool"start-arrow"read/write

bool"close-path"read/write

float"height"read/write

float"arrow-tip-length"read/write

float"width"read/write

GooCanvas.CanvasPoints"points"read/write

float"y"read/write

float"x"read/write

float"arrow-length"read/write

Methods

Class: GooCanvas.CanvasPolylineModel

Implements: GooCanvas.CanvasItemModel

Subclass of: GooCanvas.CanvasItemModelSimple

GooCanvasPolylineModel represents a model for polyline items, which are a series of one or more lines, with optional arrows at either end. It is a subclass of #GooCanvasItemModelSimple and so inherits all of the style properties such as "stroke-color", "fill-color" and "line-width". It also implements the #GooCanvasItemModel interface, so you can use the #GooCanvasItemModel functions such as goo_canvas_item_model_raise() and goo_canvas_item_model_rotate(). To create a #GooCanvasPolylineModel use goo_canvas_polyline_model_new(), or goo_canvas_polyline_model_new_line() for a simple line between two points. To get or set the properties of an existing #GooCanvasPolylineModel, use g_object_get() and g_object_set(). To respond to events such as mouse clicks on the polyline you must connect to the signal handlers of the corresponding #GooCanvasPolyline objects. (See goo_canvas_get_item() and #GooCanvas::item-created.)

Properties

bool"end-arrow"read/write

float"arrow-width"read/write

bool"start-arrow"read/write

bool"close-path"read/write

float"height"read/write

float"arrow-tip-length"read/write

float"width"read/write

GooCanvas.CanvasPoints"points"read/write

float"y"read/write

float"x"read/write

float"arrow-length"read/write

Methods

Class: GooCanvas.CanvasRect

Implements: GooCanvas.CanvasItem

Subclass of: GooCanvas.CanvasItemSimple

GooCanvasRect represents a rectangle item. It is a subclass of #GooCanvasItemSimple and so inherits all of the style properties such as "stroke-color", "fill-color" and "line-width". It also implements the #GooCanvasItem interface, so you can use the #GooCanvasItem functions such as goo_canvas_item_raise() and goo_canvas_item_rotate(). To create a #GooCanvasRect use goo_canvas_rect_new(). To get or set the properties of an existing #GooCanvasRect, use g_object_get() and g_object_set().

Properties

float"radius-y"read/write

float"radius-x"read/write

float"height"read/write

float"width"read/write

float"y"read/write

float"x"read/write

Methods

Class: GooCanvas.CanvasRectModel

Implements: GooCanvas.CanvasItemModel

Subclass of: GooCanvas.CanvasItemModelSimple

GooCanvasRectModel represents a model for rectangle items. It is a subclass of #GooCanvasItemModelSimple and so inherits all of the style properties such as "stroke-color", "fill-color" and "line-width". It also implements the #GooCanvasItemModel interface, so you can use the #GooCanvasItemModel functions such as goo_canvas_item_model_raise() and goo_canvas_item_model_rotate(). To create a #GooCanvasRectModel use goo_canvas_rect_model_new(). To get or set the properties of an existing #GooCanvasRectModel, use g_object_get() and g_object_set(). To respond to events such as mouse clicks on the rectangle you must connect to the signal handlers of the corresponding #GooCanvasRect objects. (See goo_canvas_get_item() and #GooCanvas::item-created.)

Properties

float"radius-y"read/write

float"radius-x"read/write

float"height"read/write

float"width"read/write

float"y"read/write

float"x"read/write

Methods

Class: GooCanvas.CanvasStyle

Subclass of: GObject.Object

#GooCanvasStyle provides support for cascading style properties for canvas items. It is intended to be used when implementing new canvas items. <note><para> The cascading styles canvas feature may be removed in a future version of GooCanvas. </para></note> Style properties are identified by a unique #GQuark, and contain arbitrary data stored in a #GValue. #GooCanvasStyle also provides a few convenience functions such as goo_canvas_style_set_stroke_options() and goo_canvas_style_set_fill_options() which efficiently apply an item's standard style properties to the given cairo_t.

Methods

GooCanvas.CanvasStyleget_parent()

GObject.Valueget_property(property_id)

boolset_fill_options(cr)

voidset_parent(parent)

voidset_property(property_id, value)

boolset_stroke_options(cr)

Class: GooCanvas.CanvasTable

Implements: GooCanvas.CanvasItem

Subclass of: GooCanvas.CanvasGroup

#GooCanvasTable is a table container used to lay out other canvas items. It is used in a similar way to how the GtkTable widget is used to lay out GTK+ widgets. Items are added to the table using the normal methods, then goo_canvas_item_set_child_properties() is used to specify how each child item is to be positioned within the table (i.e. which row and column it is in, how much padding it should have and whether it should expand or shrink). #GooCanvasTable is a subclass of #GooCanvasItemSimple and so inherits all of the style properties such as "stroke-color", "fill-color" and "line-width". Setting a style property on a #GooCanvasTable will affect all children of the #GooCanvasTable (unless the children override the property setting). #GooCanvasTable implements the #GooCanvasItem interface, so you can use the #GooCanvasItem functions such as goo_canvas_item_raise() and goo_canvas_item_rotate(), and the properties such as "visibility" and "pointer-events". To create a #GooCanvasTable use goo_canvas_table_new(). To get or set the properties of an existing #GooCanvasTable, use g_object_get() and g_object_set().

Properties

float"vert-grid-line-width"read/write

float"column-spacing"read/write

float"x-border-spacing"read/write

float"horz-grid-line-width"read/write

float"row-spacing"read/write

bool"homogeneous-rows"read/write

bool"homogeneous-columns"read/write

float"y-border-spacing"read/write

Methods

Class: GooCanvas.CanvasTableModel

Implements: GooCanvas.CanvasItemModel

Subclass of: GooCanvas.CanvasGroupModel

#GooCanvasTableModel is a model for a table container used to lay out other canvas items. It is used in a similar way to how the GtkTable widget is used to lay out GTK+ widgets. Item models are added to the table using the normal methods, then goo_canvas_item_model_set_child_properties() is used to specify how each child item is to be positioned within the table (i.e. which row and column it is in, how much padding it should have and whether it should expand or shrink). #GooCanvasTableModel is a subclass of #GooCanvasItemModelSimple and so inherits all of the style properties such as "stroke-color", "fill-color" and "line-width". Setting a style property on a #GooCanvasTableModel will affect all children of the #GooCanvasTableModel (unless the children override the property setting). #GooCanvasTableModel implements the #GooCanvasItemModel interface, so you can use the #GooCanvasItemModel functions such as goo_canvas_item_model_raise() and goo_canvas_item_rotate(), and the properties such as "visibility" and "pointer-events". To create a #GooCanvasTableModel use goo_canvas_table_model_new(). To get or set the properties of an existing #GooCanvasTableModel, use g_object_get() and g_object_set().

Properties

float"vert-grid-line-width"read/write

float"column-spacing"read/write

float"x-border-spacing"read/write

float"horz-grid-line-width"read/write

float"row-spacing"read/write

bool"homogeneous-rows"read/write

bool"homogeneous-columns"read/write

float"y-border-spacing"read/write

Methods

Class: GooCanvas.CanvasText

Implements: GooCanvas.CanvasItem

Subclass of: GooCanvas.CanvasItemSimple

GooCanvasText represents a text item. It is a subclass of #GooCanvasItemSimple and so inherits all of the style properties such as "fill-color". It also implements the #GooCanvasItem interface, so you can use the #GooCanvasItem functions such as goo_canvas_item_raise() and goo_canvas_item_rotate(). The #GooCanvasText:width and #GooCanvasText:height properties specify the area of the item. If it exceeds that area because there is too much text, it is clipped. The properties can be set to -1 to disable clipping. To create a #GooCanvasText use goo_canvas_text_new(). To get or set the properties of an existing #GooCanvasText, use g_object_get() and g_object_set().

Properties

Pango.EllipsizeMode"ellipsize"read/write

float"y"read/write

string"text"read/write

Pango.WrapMode"wrap"read/write

float"height"read/write

float"width"read/write

bool"use-markup"read/write

float"x"read/write

GooCanvas.CanvasAnchorType"anchor"read/write

Pango.Alignment"alignment"read/write

Methods

voidget_natural_extents(ink_rect, logical_rect)

Class: GooCanvas.CanvasTextModel

Implements: GooCanvas.CanvasItemModel

Subclass of: GooCanvas.CanvasItemModelSimple

GooCanvasTextModel represents a model for text items. It is a subclass of #GooCanvasItemModelSimple and so inherits all of the style properties such as "fill-color". It also implements the #GooCanvasItemModel interface, so you can use the #GooCanvasItemModel functions such as goo_canvas_item_model_raise() and goo_canvas_item_model_rotate(). To create a #GooCanvasTextModel use goo_canvas_text_model_new(). To get or set the properties of an existing #GooCanvasTextModel, use g_object_get() and g_object_set(). To respond to events such as mouse clicks on the text item you must connect to the signal handlers of the corresponding #GooCanvasText objects. (See goo_canvas_get_item() and #GooCanvas::item-created.)

Properties

Pango.EllipsizeMode"ellipsize"read/write

float"y"read/write

string"text"read/write

Pango.WrapMode"wrap"read/write

float"height"read/write

float"width"read/write

bool"use-markup"read/write

float"x"read/write

GooCanvas.CanvasAnchorType"anchor"read/write

Pango.Alignment"alignment"read/write

Methods

Class: GooCanvas.CanvasWidget

Implements: GooCanvas.CanvasItem

Subclass of: GooCanvas.CanvasItemSimple

GooCanvasWidget provides support for placing any GtkWidget in the canvas. The #GooCanvasWidget:width and #GooCanvasWidget:height properties specify the widget's size. If either of them is -1, then the requested size of the widget is used instead, which is the default for both width and height. Note that there are a number of limitations in the use of #GooCanvasWidget: <itemizedlist><listitem><para> It doesn't support any transformation besides simple translation. This means you can't scale a canvas with a #GooCanvasWidget in it. </para></listitem><listitem><para> It doesn't support layering, so you can't place other items beneath or above the #GooCanvasWidget. </para></listitem><listitem><para> It doesn't support rendering of widgets to a given cairo_t, which means you can't output the widget to a pdf or postscript file. </para></listitem><listitem><para> It doesn't have a model/view variant like the other standard items, so it can only be used in a simple canvas without a model. </para></listitem><listitem><para> It can't be made a static item. </para></listitem></itemizedlist>

Properties

Gtk.Widget"widget"read/write

float"height"read/write

float"width"read/write

float"y"read/write

float"x"read/write

GooCanvas.CanvasAnchorType"anchor"read/write

Methods