GooCanvas.CanvasItemIface¶
Fields¶
Name |
Type |
Access |
Description |
---|---|---|---|
add_child |
r |
adds a child. |
|
allocate_area |
r |
allocates the item’s area, in its parent’s coordinate space. The item must recalculate its bounds and request redraws of parts of the canvas if necessary. This is only used for items in layout containers such as |
|
animation_finished |
r |
signal emitted when the item’s animation has finished. |
|
base_iface |
r |
||
button_press_event |
r |
signal emitted when a mouse button is pressed within the item. |
|
button_release_event |
r |
signal emitted when a mouse button is released. |
|
child_notify |
r |
signal emitted when a child property is changed. |
|
enter_notify_event |
r |
signal emitted when the mouse enters the item. |
|
focus_in_event |
r |
signal emitted when the item receices the keyboard focus. |
|
focus_out_event |
r |
signal emitted when the item loses the keyboard focus. |
|
get_bounds |
r |
gets the bounds of the item. |
|
get_canvas |
r |
returns the canvas the item is in. |
|
get_child |
r |
returns the child at the given index. |
|
get_child_property |
r |
gets a child property of a given child item, e.g. the “row” or “column” property of an item in a |
|
get_is_static |
r |
returns |
|
get_items_at |
r |
gets all the items at the given point. |
|
get_model |
r |
gets the model that the canvas item is viewing. |
|
get_n_children |
r |
returns the number of children of the item. |
|
get_parent |
r |
gets the item’s parent. |
|
get_requested_area |
r |
returns the requested area of the item, in its parent’s coordinate space. This is only used for items in layout containers such as |
|
get_requested_area_for_width |
r |
returns the requested bounds of the item, given a particular allocated width, using the parent’s coordinate space. |
|
get_requested_height |
r |
returns the requested height of the item, given a particular allocated width, using the parent’s coordinate space. Note that this method should only be used if the position of the item remains unchanged. If the position might change use get_requested_area_for_width() instead. |
|
get_style |
r |
gets the item’s style. |
|
get_transform |
r |
gets the item’s transformation matrix. |
|
get_transform_for_child |
r |
gets the transform used to lay out a given child. |
|
grab_broken_event |
r |
signal emitted when a grab that the item has is lost. |
|
is_visible |
r |
returns |
|
key_press_event |
r |
signal emitted when a key is pressed. |
|
key_release_event |
r |
signal emitted when a key is released. |
|
leave_notify_event |
r |
signal emitted when the mouse leaves the item. |
|
motion_notify_event |
r |
signal emitted when the mouse moves within the item. |
|
move_child |
r |
moves a child up or down the stacking order. |
|
paint |
r |
renders the item to the given cairo context. |
|
query_tooltip |
r |
signal emitted to query the tooltip of an item. |
|
remove_child |
r |
removes a child. |
|
request_update |
r |
requests that an update is scheduled. |
|
scroll_event |
r |
signal emitted when the mouse wheel is activated within the item. |
|
set_canvas |
r |
sets the canvas the item is in. |
|
set_child_property |
r |
sets a child property for a given child item. |
|
set_is_static |
r |
notifies the item whether it is static or not. |
|
set_model |
r |
sets the model that the canvas item will view. |
|
set_parent |
r |
sets the item’s parent. |
|
set_style |
r |
sets the item’s style. |
|
set_transform |
r |
sets the item’s transformation matrix. |
|
update |
r |
updates the item, if needed. It recalculates the bounds of the item and requests redraws of parts of the canvas if necessary. |
Methods¶
None
Details¶
- class GooCanvas.CanvasItemIface¶
#GooCanvasItemIFace holds the virtual methods that make up the
GooCanvas.CanvasItem
interface.Simple canvas items only need to implement the get_parent(), set_parent(), get_bounds(), get_items_at(), update() and paint() methods (and also get_requested_area() and allocate_area() if they are going to be used inside a layout container like
GooCanvas.CanvasTable
).Items that support transforms should also implement get_transform() and set_transform(). Items that support styles should implement get_style() and set_style().
Container items must implement get_canvas(), set_canvas(), get_n_children(), get_child() and request_update(). Containers that support dynamic changes to their children should implement add_child(), move_child() and remove_child(). Layout containers like
GooCanvas.CanvasTable
may implement get_child_property(), set_child_property() and get_transform_for_child().