Goocanvas::Canvas Class Reference

The main canvas widget, containing a number of canvas items. More...

Inheritance diagram for Goocanvas::Canvas:
[legend]

## Public Member Functions

| Canvas (Canvas&& src) noexcept
Canvas& | operator= (Canvas&& src) noexcept
| Canvas (const Canvas&)=delete
Canvas& | operator= (const Canvas&)=delete
virtual | ~Canvas () noexcept
GooCanvas* | gobj ()
| Provides access to the underlying C GtkObject. More...
const GooCanvas* | gobj () const
| Provides access to the underlying C GtkObject. More...
| Canvas ()
Glib::RefPtr< Item > | get_root_item ()
| Gets the root item of the canvas, usually a Goo::CanvasGroup. More...
Glib::RefPtr< const Item > | get_root_item () const
| Gets the root item of the canvas, usually a Goo::CanvasGroup. More...
void | set_root_item (const Glib::RefPtr< Item >& item)
| Sets the root item of the canvas. More...
Glib::RefPtr< ItemModel > | get_root_item_model ()
| Gets the root item model of the canvas. More...
Glib::RefPtr< const ItemModel > | get_root_item_model () const
| Gets the root item model of the canvas. More...
void | set_root_item_model (const Glib::RefPtr< ItemModel >& model)
| Sets the root item model of the canvas. More...
Glib::RefPtr< Item > | get_static_root_item ()
Glib::RefPtr< const Item > | get_static_root_item () const
void | set_static_root_item (const Glib::RefPtr< Item >& item)
Glib::RefPtr< ItemModel > | get_static_root_item_model ()
Glib::RefPtr< const ItemModel > | get_static_root_item_model () const
void | set_static_root_item_model (const Glib::RefPtr< ItemModel >& model)
Glib::RefPtr< Item > | get_item (const Glib::RefPtr< ItemModel >& model)
| Gets the canvas item associated with the given Goo::CanvasItemModel. More...
Glib::RefPtr< const Item > | get_item (const Glib::RefPtr< ItemModel >& model) const
| Gets the canvas item associated with the given Goo::CanvasItemModel. More...
Glib::RefPtr< Item > | get_item_at (double x, double y, bool is_pointer_event)
| Gets the item at the given point. More...
Glib::RefPtr< const Item > | get_item_at (double x, double y, bool is_pointer_event) const
| Gets the item at the given point. More...
std::vector< Glib::RefPtr< Item > > | get_items_at (double x, double y, bool is_pointer_event)
| Gets all items at the given point. More...
std::vector< Glib::RefPtr< const Item > > | get_items_at (double x, double y, bool is_pointer_event) const
| Gets all items at the given point. More...
std::vector< Glib::RefPtr< Item > > | get_items_in_area (const Bounds& area, bool inside_area, bool allow_overlaps, bool include_containers)
| Gets a list of items inside or outside a given area. More...
std::vector< Glib::RefPtr< const Item > > | get_items_in_area (const Bounds& area, bool inside_area, bool allow_overlaps, bool include_containers) const
| Gets a list of items inside or outside a given area. More...
double | get_scale () const
| Gets the current scale of the canvas. More...
void | set_scale (double scale)
| Sets the scale of the canvas. More...
void | get_bounds (double&left, double& top, double&right, double& bottom) const
| Gets the bounds of the canvas, in canvas units. More...
void | get_bounds (Bounds& bounds) const
void | set_bounds (double left, double top, double right, double bottom)
| Sets the bounds of the Goo::Canvas, in canvas units. More...
void | set_bounds (const Bounds& bounds)
void | scroll_to (double left, double top)
| Scrolls the canvas, placing the given point as close to the top-left of the view as possible. More...
void | grab_focus (const Glib::RefPtr< Item >& item)
| Grabs the keyboard focus for the given item. More...
void | render (const Cairo::RefPtr< Cairo::Context >& context, const Bounds& bounds, double scale=0.0)
| Renders all or part of a canvas to the given cairo context. More...
void | render (const Cairo::RefPtr< Cairo::Context >& context, double scale=0.0)
void | convert_to_pixels (double& x, double& y) const
| Converts a coordinate from the canvas coordinate space to pixels. More...
void | convert_from_pixels (double& x, double& y) const
| Converts a coordinate from pixels to the canvas coordinate space. More...
void | convert_to_item_space (const Glib::RefPtr< Item >& item, double& x, double& y) const
| Converts a coordinate from the canvas coordinate space to the given item's coordinate space, applying all transformation matrices including the item's own transformation matrix, if it has one. More...
void | convert_from_item_space (const Glib::RefPtr< Item >& item, double& x, double& y) const
| Converts a coordinate from the given item's coordinate space to the canvas coordinate space, applying all transformation matrices including the item's own transformation matrix, if it has one. More...
void | convert_bounds_to_item_space (const Glib::RefPtr< Item >& item, Bounds& bounds) const
Gdk::GrabStatus | pointer_grab (const Glib::RefPtr< Item >& item, Gdk::EventMask mask, const Glib::RefPtr< Gdk::Cursor >& cursor, guint32 time)
| Attempts to grab the pointer for the given item. More...
Gdk::GrabStatus | pointer_grab (const Glib::RefPtr< Item >& item, Gdk::EventMask mask, guint32 time)
void | pointer_ungrab (const Glib::RefPtr< Item >& item, guint32 time)
| Ungrabs the pointer, if the given item has the pointer grab. More...
GdkGrabStatus | keyboard_grab (const Glib::RefPtr< Item >& item, bool owner_events, guint32 time)
| Attempts to grab the keyboard for the given item. More...
void | keyboard_ungrab (const Glib::RefPtr< Item >& item, guint32 time)
| Ungrabs the keyboard, if the given item has the keyboard grab. More...
Cairo::RefPtr< Cairo::Context > | create_cairo_context ()
| Creates a cairo context, initialized with the default canvas settings. More...
Glib::RefPtr< Item > | create_item (const Glib::RefPtr< ItemModel >& model)
| This function is only intended to be used when implementing new canvas items, typically container items such as Goo::CanvasGroup. More...
void | unregister_item (const Glib::RefPtr< ItemModel >& model)
| This function is only intended to be used when implementing new canvas items. More...
void | update ()
| This function is only intended to be used by subclasses of Goo::Canvas or Goo::CanvasItem implementations. More...
void | request_update ()
| This function is only intended to be used by subclasses of Goo::Canvas or Goo::CanvasItem implementations. More...
void | request_redraw (const Bounds& bounds)
| This function is only intended to be used by subclasses of Goo::Canvas or Goo::CanvasItem implementations. More...
void | request_item_redraw (const Bounds& bounds, bool is_static=false)
double | get_default_line_width () const
| Gets the default line width, which depends on the current units setting. More...
void | register_widget_item (const Glib::RefPtr< Goocanvas::Widget >& widget)
| This function should only be used by Goo::CanvasWidget and subclass implementations. More...
void | unregister_widget_item (const Glib::RefPtr< Goocanvas::Widget >& widget)
| This function should only be used by Goo::CanvasWidget and subclass implementations. More...
Glib::SignalProxy2< void, const Glib::RefPtr< Item >&, const Glib::RefPtr< ItemModel >& > | signal_item_created ()
Glib::PropertyProxy< double > | property_scale ()
| The magnification factor of the canvas. More...
Glib::PropertyProxy_ReadOnly< double > | property_scale () const
| The magnification factor of the canvas. More...
Glib::PropertyProxy< double > | property_scale_x ()
| The horizontal magnification factor of the canvas. More...
Glib::PropertyProxy_ReadOnly< double > | property_scale_x () const
| The horizontal magnification factor of the canvas. More...
Glib::PropertyProxy< double > | property_scale_y ()
| The vertical magnification factor of the canvas. More...
Glib::PropertyProxy_ReadOnly< double > | property_scale_y () const
| The vertical magnification factor of the canvas. More...
Glib::PropertyProxy< AnchorType > | property_anchor ()
| Where to place the canvas when it is smaller than the widget's allocated area. More...
Glib::PropertyProxy_ReadOnly< AnchorType > | property_anchor () const
| Where to place the canvas when it is smaller than the widget's allocated area. More...
Glib::PropertyProxy< double > | property_x1 ()
| The x coordinate of the left edge of the canvas bounds, in canvas units. More...
Glib::PropertyProxy_ReadOnly< double > | property_x1 () const
| The x coordinate of the left edge of the canvas bounds, in canvas units. More...
Glib::PropertyProxy< double > | property_y1 ()
| The y coordinate of the top edge of the canvas bounds, in canvas units. More...
Glib::PropertyProxy_ReadOnly< double > | property_y1 () const
| The y coordinate of the top edge of the canvas bounds, in canvas units. More...
Glib::PropertyProxy< double > | property_x2 ()
| The x coordinate of the right edge of the canvas bounds, in canvas units. More...
Glib::PropertyProxy_ReadOnly< double > | property_x2 () const
| The x coordinate of the right edge of the canvas bounds, in canvas units. More...
Glib::PropertyProxy< double > | property_y2 ()
| The y coordinate of the bottom edge of the canvas bounds, in canvas units. More...
Glib::PropertyProxy_ReadOnly< double > | property_y2 () const
| The y coordinate of the bottom edge of the canvas bounds, in canvas units. More...
Glib::PropertyProxy< bool > | property_automatic_bounds ()
| If the bounds are automatically calculated based on the bounds of all the items in the canvas. More...
Glib::PropertyProxy_ReadOnly< bool > | property_automatic_bounds () const
| If the bounds are automatically calculated based on the bounds of all the items in the canvas. More...
Glib::PropertyProxy< bool > | property_bounds_from_origin ()
| If the automatic bounds are calculated from the origin. More...
Glib::PropertyProxy_ReadOnly< bool > | property_bounds_from_origin () const
| If the automatic bounds are calculated from the origin. More...
Glib::PropertyProxy< double > | property_bounds_padding ()
| The padding added to the automatic bounds. More...
Glib::PropertyProxy_ReadOnly< double > | property_bounds_padding () const
| The padding added to the automatic bounds. More...
Glib::PropertyProxy< Gtk::Unit > | property_units ()
| The units to use for the canvas. More...
Glib::PropertyProxy_ReadOnly< Gtk::Unit > | property_units () const
| The units to use for the canvas. More...
Glib::PropertyProxy< double > | property_resolution_x ()
| The horizontal resolution of the display, in dots per inch. More...
Glib::PropertyProxy_ReadOnly< double > | property_resolution_x () const
| The horizontal resolution of the display, in dots per inch. More...
Glib::PropertyProxy< double > | property_resolution_y ()
| The vertical resolution of the display, in dots per inch. More...
Glib::PropertyProxy_ReadOnly< double > | property_resolution_y () const
| The vertical resolution of the display, in dots per inch. More...
Glib::PropertyProxy_WriteOnly< Glib::ustring > | property_background_color ()
| The color to use for the canvas background. More...
Glib::PropertyProxy_WriteOnly< guint > | property_background_color_rgb ()
| The color to use for the canvas background, specified as a 24-bit integer value, 0xRRGGBB. More...
Glib::PropertyProxy_WriteOnly< Gdk::RGBA > | property_background_color_gdk_rgba ()
| The color to use for the canvas background, specified as a GdkRGBA. More...
Glib::PropertyProxy< bool > | property_integer_layout ()
| If all item layout is done to the nearest integer. More...
Glib::PropertyProxy_ReadOnly< bool > | property_integer_layout () const
| If all item layout is done to the nearest integer. More...
Glib::PropertyProxy< bool > | property_clear_background ()
| If the background is cleared before the canvas is painted. More...
Glib::PropertyProxy_ReadOnly< bool > | property_clear_background () const
| If the background is cleared before the canvas is painted. More...
Public Member Functions inherited from Gtk::Container
| Container (Container &&src) noexcept
Container & | operator= (Container &&src) noexcept
| Container (const Container &)=delete
Container & | operator= (const Container &)=delete
virtual | ~Container () noexcept
GtkContainer * | gobj ()
const GtkContainer * | gobj () const
void | set_border_width (guint border_width)
guint | get_border_width () const
virtual void | add (Widget &widget)
void | remove (Widget &widget)
void | set_resize_mode (ResizeMode resize_mode)
ResizeMode | get_resize_mode () const
void | check_resize ()
void | foreach (const ForeachSlot &slot)
void | forall (const ForeachSlot &slot)
std::vector< Widget * > | get_children ()
std::vector< const Widget * > | get_children () const
void | propagate_draw (Widget &child, const ::Cairo::RefPtr< ::Cairo::Context > &cr)
void | set_focus_chain (const std::vector< Widget * > &focusable_widgets)
bool | has_focus_chain () const
std::vector< Widget * > | get_focus_chain ()
std::vector< const Widget * > | get_focus_chain () const
void | unset_focus_chain ()
void | set_reallocate_redraws (bool needs_redraws=true)
void | set_focus_child (Widget &widget)
Widget * | get_focus_child ()
const Widget * | get_focus_child () const
void | set_focus_vadjustment (const Glib::RefPtr< Adjustment > &adjustment)
Glib::RefPtr< Adjustment > | get_focus_vadjustment ()
Glib::RefPtr< const Adjustment > | get_focus_vadjustment () const
void | set_focus_hadjustment (const Glib::RefPtr< Adjustment > &adjustment)
Glib::RefPtr< Adjustment > | get_focus_hadjustment ()
Glib::RefPtr< const Adjustment > | get_focus_hadjustment () const
void | resize_children ()
GType | child_type () const
WidgetPath | get_path_for_child (const Widget &child) const
Glib::SignalProxy1< void, Widget * > | signal_add ()
Glib::SignalProxy1< void, Widget * > | signal_remove ()
Glib::SignalProxy0< void > | signal_check_resize ()
Glib::SignalProxy1< void, Widget * > | signal_set_focus_child ()
void | show_all_children (bool recursive=true)
Gtk::Container * | wrap (GtkContainer *object, bool take_copy=false)
Public Member Functions inherited from Gtk::Widget
| Widget (Widget &&src) noexcept
Widget & | operator= (Widget &&src) noexcept
| Widget (const Widget &)=delete
Widget & | operator= (const Widget &)=delete
virtual | ~Widget () noexcept
GtkWidget * | gobj ()
const GtkWidget * | gobj () const
void | show ()
void | show_now ()
void | hide ()
void | show_all ()
void | queue_draw ()
void | queue_draw_area (int x, int y, int width, int height)
void | queue_draw_region (const ::Cairo::RefPtr< const ::Cairo::Region > &region)
void | queue_resize ()
void | size_allocate (const Allocation &allocation)
void | size_allocate (const Allocation &allocation, int baseline)
SizeRequestMode | get_request_mode () const
void | get_preferred_width (int &minimum_width, int &natural_width) const
void | get_preferred_height_for_width (int width, int &minimum_height, int &natural_height) const
void | get_preferred_height_for_width (int width, int &minimum_height, int &natural_height, int &minimum_baseline, int &natural_baseline) const
void | get_preferred_height (int &minimum_height, int &natural_height) const
void | get_preferred_width_for_height (int height, int &minimum_width, int &natural_width) const
void | get_preferred_size (Requisition &minimum_size, Requisition &natural_size) const
void | add_accelerator (const Glib::ustring &accel_signal, const Glib::RefPtr< AccelGroup > &accel_group, guint accel_key, Gdk::ModifierType accel_mods, AccelFlags accel_flags)
bool | remove_accelerator (const Glib::RefPtr< AccelGroup > &accel_group, guint accel_key, Gdk::ModifierType accel_mods)
void | set_accel_path (const Glib::ustring &accel_path, const Glib::RefPtr< AccelGroup > &accel_group)
bool | mnemonic_activate (bool group_cycling)
bool | event (GdkEvent *gdk_event)
int | send_expose (GdkEvent *gdk_event)
bool | send_focus_change (GdkEvent *gdk_event)
bool | activate ()
void | reparent (Widget &new_parent)
bool | intersect (const Gdk::Rectangle &area) const
bool | intersect (const Gdk::Rectangle &area, Gdk::Rectangle &intersection) const
::Cairo::RefPtr< ::Cairo::Region > | region_intersect (const ::Cairo::RefPtr< ::Cairo::Region > &region) const
void | freeze_child_notify ()
void | child_notify (const Glib::ustring &child_property)
void | thaw_child_notify ()
void | set_can_focus (bool can_focus=true)
bool | get_can_focus () const
bool | has_focus () const
bool | is_focus () const
bool | has_visible_focus () const
void | grab_focus ()
void | set_can_default (bool can_default=true)
bool | get_can_default () const
bool | has_default () const
void | grab_default ()
void | set_receives_default (bool receives_default=true)
bool | get_receives_default () const
bool | has_grab () const
bool | device_is_shadowed (const Glib::RefPtr< const Gdk::Device > &device)
void | add_modal_grab ()
void | remove_modal_grab ()
void | set_name (const Glib::ustring &name)
void | unset_name ()
Glib::ustring | get_name () const
void | set_state (StateType state)
StateType | get_state () const
void | set_state_flags (StateFlags flags, bool clear=true)
void | unset_state_flags (StateFlags flags)
StateFlags | get_state_flags () const
void | set_sensitive (bool sensitive=true)
bool | get_sensitive () const
bool | is_sensitive () const
void | set_visible (bool visible=true)
bool | get_visible () const
bool | is_visible () const
bool | get_has_window () const
bool | get_is_toplevel () const
bool | get_is_drawable () const
bool | get_realized () const
bool | get_mapped () const
void | set_app_paintable (bool app_paintable=true)
bool | get_app_paintable () const
void | set_double_buffered (bool double_buffered=true)
bool | get_double_buffered () const
void | set_redraw_on_allocate (bool redraw_on_allocate=true)
void | set_child_visible (bool visible=true)
bool | get_child_visible () const
Glib::RefPtr< Gdk::Window > | get_window ()
Glib::RefPtr< const Gdk::Window > | get_window () const
void | register_window (const Glib::RefPtr< Gdk::Window > &window)
void | unregister_window (const Glib::RefPtr< Gdk::Window > &window)
int | get_allocated_width () const
int | get_allocated_height () const
int | get_allocated_baseline () const
Allocation | get_allocation () const
void | set_allocation (const Allocation &allocation)
void | set_clip (const Allocation &clip)
Allocation | get_clip () const
Container * | get_parent ()
const Container * | get_parent () const
Glib::RefPtr< Gdk::Window > | get_parent_window ()
Glib::RefPtr< const Gdk::Window > | get_parent_window () const
void | set_parent_window (const Glib::RefPtr< const Gdk::Window > &parent_window)
bool | child_focus (DirectionType direction)
bool | keynav_failed (DirectionType direction)
void | error_bell ()
void | set_size_request (int width=-1, int height=-1)
void | get_size_request (int &width, int &height) const
void | set_events (Gdk::EventMask events)
void | add_events (Gdk::EventMask events)
void | set_device_events (const Glib::RefPtr< const Gdk::Device > &device, Gdk::EventMask events)
void | add_device_events (const Glib::RefPtr< const Gdk::Device > &device, Gdk::EventMask events)
void | set_opacity (double opacity)
double | get_opacity () const
void | set_device_enabled (const Glib::RefPtr< Gdk::Device > &device, bool enabled=true)
bool | get_device_enabled (const Glib::RefPtr< const Gdk::Device > &device) const
Container * | get_toplevel ()
const Container * | get_toplevel () const
Widget * | get_ancestor (GType widget_type)
const Widget * | get_ancestor (GType widget_type) const
Glib::RefPtr< Gdk::Visual > | get_visual ()
Glib::RefPtr< Gdk::Screen > | get_screen ()
Glib::RefPtr< const Gdk::Screen > | get_screen () const
bool | has_screen () const
int | get_scale_factor () const
Glib::RefPtr< Gdk::Display > | get_display ()
Glib::RefPtr< const Gdk::Display > | get_display () const
Glib::RefPtr< Gdk::Window > | get_root_window ()
Glib::RefPtr< const Gdk::Window > | get_root_window () const
Glib::RefPtr< Settings > | get_settings ()
Glib::RefPtr< Clipboard > | get_clipboard (const Glib::ustring &selection)
Glib::RefPtr< const Clipboard > | get_clipboard (const Glib::ustring &selection) const
bool | get_hexpand () const
void | set_hexpand (bool expand=true)
bool | get_hexpand_set () const
void | set_hexpand_set (bool set=true)
bool | get_vexpand () const
void | set_vexpand (bool expand=true)
bool | get_vexpand_set () const
void | set_vexpand_set (bool set=true)
void | queue_compute_expand ()
bool | compute_expand (Orientation orientation)
bool | get_support_multidevice () const
void | set_support_multidevice (bool support_multidevice=true)
Glib::RefPtr< Atk::Object > | get_accessible ()
Glib::RefPtr< const Atk::Object > | get_accessible () const
Align | get_halign () const
void | set_halign (Align align)
Align | get_valign () const
Align | get_valign_with_baseline () const
void | set_valign (Align align)
int | get_margin_left () const
void | set_margin_left (int margin)
int | get_margin_right () const
void | set_margin_right (int margin)
int | get_margin_start () const
void | set_margin_start (int margin)
int | get_margin_end () const
void | set_margin_end (int margin)
int | get_margin_top () const
void | set_margin_top (int margin)
int | get_margin_bottom () const
void | set_margin_bottom (int margin)
Gdk::EventMask | get_events () const
Gdk::EventMask | get_device_events (const Glib::RefPtr< const Gdk::Device > &device) const
void | get_pointer (int &x, int &y) const
bool | is_ancestor (Widget &ancestor) const
bool | translate_coordinates (Widget &dest_widget, int src_x, int src_y, int &dest_x, int &dest_y)
void | override_color (const Gdk::RGBA &color, StateFlags state=STATE_FLAG_NORMAL)
void | unset_color (StateFlags state=STATE_FLAG_NORMAL)
void | override_background_color (const Gdk::RGBA &color, StateFlags state=STATE_FLAG_NORMAL)
void | unset_background_color (StateFlags state=STATE_FLAG_NORMAL)
void | override_font (const Pango::FontDescription &font_desc)
void | unset_font ()
void | override_symbolic_color (const Glib::ustring &name, const Gdk::RGBA &color)
void | unset_symbolic_color (const Glib::ustring &name)
void | override_cursor (const Gdk::RGBA &cursor, const Gdk::RGBA &secondary_cursor)
void | unset_cursor ()
void | reset_style ()
void | get_style_property (const Glib::ustring &the_property_name, PropertyType &value) const
Glib::RefPtr< Pango::Context > | create_pango_context ()
Glib::RefPtr< Pango::Context > | get_pango_context ()
Glib::RefPtr< Pango::Layout > | create_pango_layout (const Glib::ustring &text)
Glib::RefPtr< Gdk::Pixbuf > | render_icon_pixbuf (const StockID &stock_id, IconSize size)
void | set_composite_name (const Glib::ustring &name)
void | unset_composite_name ()
Glib::ustring | get_composite_name () const
void | set_direction (TextDirection dir)
TextDirection | get_direction () const
void | shape_combine_region (const ::Cairo::RefPtr< const ::Cairo::Region > &region)
void | input_shape_combine_region (const ::Cairo::RefPtr< const ::Cairo::Region > &region)
WidgetPath | get_path () const
std::vector< Widget * > | list_mnemonic_labels ()
std::vector< const Widget * > | list_mnemonic_labels () const
void | add_mnemonic_label (Widget &label)
void | remove_mnemonic_label (Widget &label)
void | drag_get_data (const Glib::RefPtr< Gdk::DragContext > &context, const Glib::ustring &target, guint32 time)
void | drag_highlight ()
void | drag_unhighlight ()
void | drag_dest_set (DestDefaults flags=DestDefaults(0), Gdk::DragAction actions=Gdk::DragAction(0))
void | drag_dest_set (const std::vector< TargetEntry > &targets, DestDefaults flags=DEST_DEFAULT_ALL, Gdk::DragAction actions=Gdk::ACTION_COPY)
void | drag_dest_set_proxy (const Glib::RefPtr< Gdk::Window > &proxy_window, Gdk::DragProtocol protocol, bool use_coordinates)
void | drag_dest_unset ()
Glib::ustring | drag_dest_find_target (const Glib::RefPtr< Gdk::DragContext > &context, const Glib::RefPtr< TargetList > &target_list) const
Glib::ustring | drag_dest_find_target (const Glib::RefPtr< Gdk::DragContext > &context) const
Glib::RefPtr< TargetList > | drag_dest_get_target_list ()
Glib::RefPtr< const TargetList > | drag_dest_get_target_list () const
void | drag_dest_set_target_list (const Glib::RefPtr< TargetList > &target_list)
void | drag_dest_add_text_targets ()
void | drag_dest_add_image_targets ()
void | drag_dest_add_uri_targets ()
void | drag_source_set (const std::vector< TargetEntry > &targets, Gdk::ModifierType start_button_mask=Gdk::MODIFIER_MASK, Gdk::DragAction actions=Gdk::ACTION_COPY)
void | drag_source_unset ()
void | drag_source_set_icon (const Glib::RefPtr< Gdk::Pixbuf > &pixbuf)
void | drag_source_set_icon (const StockID &stock_id)
void | drag_source_set_icon (const Glib::ustring &icon_name)
void | drag_source_add_text_targets ()
void | drag_source_add_uri_targets ()
void | drag_source_add_image_targets ()
Glib::RefPtr< Gdk::DragContext > | drag_begin (const Glib::RefPtr< TargetList > &targets, Gdk::DragAction actions, int button, GdkEvent *gdk_event)
Glib::RefPtr< Gdk::DragContext > | drag_begin (const Glib::RefPtr< TargetList > &targets, Gdk::DragAction actions, int button, GdkEvent *gdk_event, int x, int y)
bool | drag_check_threshold (int start_x, int start_y, int current_x, int current_y)
void | drag_set_as_icon (const Glib::RefPtr< Gdk::DragContext > &context, int hot_x, int hot_y)
void | queue_resize_no_redraw ()
bool | get_no_show_all () const
void | set_no_show_all (bool no_show_all=true)
void | set_parent (Widget &parent)
void | unparent ()
void | map ()
void | unmap ()
void | draw_insertion_cursor (const ::Cairo::RefPtr< ::Cairo::Context > &cr, const Gdk::Rectangle &location, bool is_primary, TextDirection direction, bool draw_arrow=true)
void | set_tooltip_window (Window &custom_window)
Window * | get_tooltip_window ()
void | trigger_tooltip_query ()
void | set_tooltip_text (const Glib::ustring &text)
Glib::ustring | get_tooltip_text () const
void | set_tooltip_markup (const Glib::ustring &markup)
Glib::ustring | get_tooltip_markup () const
void | set_has_tooltip (bool has_tooltip=TRUE)
bool | get_has_tooltip () const
int | get_width () const
int | get_height () const
bool | is_composited () const
bool | in_destruction () const
Glib::RefPtr< StyleContext > | get_style_context ()
Glib::RefPtr< Gtk::StyleContext > | get_style_context () const
Gdk::ModifierType | get_modifier_mask (Gdk::ModifierIntent intent)
void | insert_action_group (const Glib::ustring &name, const Glib::RefPtr< Gio::ActionGroup > &group)
void | remove_action_group (const Glib::ustring &name)
Glib::RefPtr< Gio::ActionGroup > | get_action_group (const Glib::ustring &prefix)
Glib::RefPtr< const Gio::ActionGroup > | get_action_group (const Glib::ustring &prefix) const
std::vector< Glib::ustring > | list_action_prefixes () const
Glib::SignalProxy0< void > | signal_show ()
Glib::SignalProxy0< void > | signal_hide ()
Glib::SignalProxy0< void > | signal_map ()
Glib::SignalProxy0< void > | signal_unmap ()
Glib::SignalProxy0< void > | signal_realize ()
Glib::SignalProxy0< void > | signal_unrealize ()
Glib::SignalProxy1< void, Allocation & > | signal_size_allocate ()
Glib::SignalProxy1< void, Gtk::StateType > | signal_state_changed ()
Glib::SignalProxy1< void, Gtk::StateFlags > | signal_state_flags_changed ()
Glib::SignalProxy1< void, Widget * > | signal_parent_changed ()
Glib::SignalProxy1< void, Widget * > | signal_hierarchy_changed ()
Glib::SignalProxy0< void > | signal_style_updated ()
Glib::SignalProxy1< void, TextDirection > | signal_direction_changed ()
Glib::SignalProxy1< void, bool > | signal_grab_notify ()
Glib::SignalProxy1< void, GParamSpec * > | signal_child_notify ()
Glib::SignalProxy1< bool, bool > | signal_mnemonic_activate ()
Glib::SignalProxy0< void > | signal_grab_focus ()
Glib::SignalProxy1< bool, DirectionType > | signal_focus ()
Glib::SignalProxy1< bool, GdkEvent * > | signal_event ()
Glib::SignalProxy1< void, GdkEvent * > | signal_event_after ()
Glib::SignalProxy1< bool, GdkEventButton * > | signal_button_press_event ()
Glib::SignalProxy1< bool, GdkEventButton * > | signal_button_release_event ()
Glib::SignalProxy1< bool, GdkEventScroll * > | signal_scroll_event ()
Glib::SignalProxy1< bool, GdkEventMotion * > | signal_motion_notify_event ()
Glib::SignalProxy1< bool, GdkEventAny * > | signal_delete_event ()
Glib::SignalProxy1< bool, const ::Cairo::RefPtr< ::Cairo::Context > & > | signal_draw ()
Glib::SignalProxy1< bool, GdkEventKey * > | signal_key_press_event ()
Glib::SignalProxy1< bool, GdkEventKey * > | signal_key_release_event ()
Glib::SignalProxy1< bool, GdkEventCrossing * > | signal_enter_notify_event ()
Glib::SignalProxy1< bool, GdkEventCrossing * > | signal_leave_notify_event ()
Glib::SignalProxy1< bool, GdkEventConfigure * > | signal_configure_event ()
Glib::SignalProxy1< bool, GdkEventFocus * > | signal_focus_in_event ()
Glib::SignalProxy1< bool, GdkEventFocus * > | signal_focus_out_event ()
Glib::SignalProxy1< bool, GdkEventAny * > | signal_map_event ()
Glib::SignalProxy1< bool, GdkEventAny * > | signal_unmap_event ()
Glib::SignalProxy1< bool, GdkEventProperty * > | signal_property_notify_event ()
Glib::SignalProxy1< bool, GdkEventSelection * > | signal_selection_clear_event ()
Glib::SignalProxy1< bool, GdkEventSelection * > | signal_selection_request_event ()
Glib::SignalProxy1< bool, GdkEventSelection * > | signal_selection_notify_event ()
Glib::SignalProxy1< bool, GdkEventProximity * > | signal_proximity_in_event ()
Glib::SignalProxy1< bool, GdkEventProximity * > | signal_proximity_out_event ()
Glib::SignalProxy1< bool, GdkEventVisibility * > | signal_visibility_notify_event ()
Glib::SignalProxy1< bool, GdkEventWindowState * > | signal_window_state_event ()
Glib::SignalProxy3< void, SelectionData &, guint, guint > | signal_selection_get ()
Glib::SignalProxy2< void, const SelectionData &, guint > | signal_selection_received ()
Glib::SignalProxy1< void, const Glib::RefPtr< Gdk::DragContext > & > | signal_drag_begin ()
Glib::SignalProxy1< void, const Glib::RefPtr< Gdk::DragContext > & > | signal_drag_end ()
Glib::SignalProxy4< void, const Glib::RefPtr< Gdk::DragContext > &, SelectionData &, guint, guint > | signal_drag_data_get ()
Glib::SignalProxy1< void, const Glib::RefPtr< Gdk::DragContext > & > | signal_drag_data_delete ()
Glib::SignalProxy2< bool, const Glib::RefPtr< Gdk::DragContext > &, DragResult > | signal_drag_failed ()
Glib::SignalProxy2< void, const Glib::RefPtr< Gdk::DragContext > &, guint > | signal_drag_leave ()
Glib::SignalProxy4< bool, const Glib::RefPtr< Gdk::DragContext > &, int, int, guint > | signal_drag_motion ()
Glib::SignalProxy4< bool, const Glib::RefPtr< Gdk::DragContext > &, int, int, guint > | signal_drag_drop ()
Glib::SignalProxy6< void, const Glib::RefPtr< Gdk::DragContext > &, int, int, const SelectionData &, guint, guint > | signal_drag_data_received ()
Glib::SignalProxy1< void, const Glib::RefPtr< Gdk::Screen > & > | signal_screen_changed ()
Glib::SignalProxy0< void > | signal_composited_changed ()
Glib::SignalProxy0< bool > | signal_popup_menu ()
Glib::SignalProxy4< bool, int, int, bool, const Glib::RefPtr< Tooltip > & > | signal_query_tooltip ()
Glib::SignalProxy1< bool, GdkEventGrabBroken * > | signal_grab_broken_event ()
Glib::SignalProxy1< bool, GdkEventExpose * > | signal_damage_event ()
Glib::SignalProxy1< bool, GdkEventTouch * > | signal_touch_event ()
Glib::PropertyProxy< Glib::ustring > | property_name ()
Glib::PropertyProxy_ReadOnly< Glib::ustring > | property_name () const
Glib::PropertyProxy< Container * > | property_parent ()
Glib::PropertyProxy_ReadOnly< Container * > | property_parent () const
Glib::PropertyProxy< int > | property_width_request ()
Glib::PropertyProxy_ReadOnly< int > | property_width_request () const
Glib::PropertyProxy< int > | property_height_request ()
Glib::PropertyProxy_ReadOnly< int > | property_height_request () const
Glib::PropertyProxy< bool > | property_visible ()
Glib::PropertyProxy_ReadOnly< bool > | property_visible () const
Glib::PropertyProxy< bool > | property_sensitive ()
Glib::PropertyProxy_ReadOnly< bool > | property_sensitive () const
Glib::PropertyProxy< bool > | property_app_paintable ()
Glib::PropertyProxy_ReadOnly< bool > | property_app_paintable () const
Glib::PropertyProxy< bool > | property_can_focus ()
Glib::PropertyProxy_ReadOnly< bool > | property_can_focus () const
Glib::PropertyProxy< bool > | property_has_focus ()
Glib::PropertyProxy_ReadOnly< bool > | property_has_focus () const
Glib::PropertyProxy< bool > | property_is_focus ()
Glib::PropertyProxy_ReadOnly< bool > | property_is_focus () const
Glib::PropertyProxy< bool > | property_can_default ()
Glib::PropertyProxy_ReadOnly< bool > | property_can_default () const
Glib::PropertyProxy< bool > | property_has_default ()
Glib::PropertyProxy_ReadOnly< bool > | property_has_default () const
Glib::PropertyProxy< bool > | property_receives_default ()
Glib::PropertyProxy_ReadOnly< bool > | property_receives_default () const
Glib::PropertyProxy_ReadOnly< bool > | property_composite_child () const
Glib::PropertyProxy< Glib::RefPtr< Style > > | property_style ()
Glib::PropertyProxy_ReadOnly< Glib::RefPtr< Style > > | property_style () const
Glib::PropertyProxy< Gdk::EventMask > | property_events ()
Glib::PropertyProxy_ReadOnly< Gdk::EventMask > | property_events () const
Glib::PropertyProxy< bool > | property_has_tooltip ()
Glib::PropertyProxy_ReadOnly< bool > | property_has_tooltip () const
Glib::PropertyProxy< Glib::ustring > | property_tooltip_markup ()
Glib::PropertyProxy_ReadOnly< Glib::ustring > | property_tooltip_markup () const
Glib::PropertyProxy< Glib::ustring > | property_tooltip_text ()
Glib::PropertyProxy_ReadOnly< Glib::ustring > | property_tooltip_text () const
Glib::PropertyProxy_ReadOnly< Glib::RefPtr< Gdk::Window > > | property_window () const
Glib::PropertyProxy< bool > | property_no_show_all ()
Glib::PropertyProxy_ReadOnly< bool > | property_no_show_all () const
Glib::PropertyProxy< bool > | property_double_buffered ()
Glib::PropertyProxy_ReadOnly< bool > | property_double_buffered () const
Glib::PropertyProxy< Align > | property_halign ()
Glib::PropertyProxy_ReadOnly< Align > | property_halign () const
Glib::PropertyProxy< Align > | property_valign ()
Glib::PropertyProxy_ReadOnly< Align > | property_valign () const
Glib::PropertyProxy< int > | property_margin_left ()
Glib::PropertyProxy_ReadOnly< int > | property_margin_left () const
Glib::PropertyProxy< int > | property_margin_right ()
Glib::PropertyProxy_ReadOnly< int > | property_margin_right () const
Glib::PropertyProxy< int > | property_margin_start ()
Glib::PropertyProxy_ReadOnly< int > | property_margin_start () const
Glib::PropertyProxy< int > | property_margin_end ()
Glib::PropertyProxy_ReadOnly< int > | property_margin_end () const
Glib::PropertyProxy< int > | property_margin_top ()
Glib::PropertyProxy_ReadOnly< int > | property_margin_top () const
Glib::PropertyProxy< int > | property_margin_bottom ()
Glib::PropertyProxy_ReadOnly< int > | property_margin_bottom () const
Glib::PropertyProxy< int > | property_margin ()
Glib::PropertyProxy_ReadOnly< int > | property_margin () const
Glib::PropertyProxy< bool > | property_hexpand ()
Glib::PropertyProxy_ReadOnly< bool > | property_hexpand () const
Glib::PropertyProxy< bool > | property_hexpand_set ()
Glib::PropertyProxy_ReadOnly< bool > | property_hexpand_set () const
Glib::PropertyProxy< bool > | property_vexpand ()
Glib::PropertyProxy_ReadOnly< bool > | property_vexpand () const
Glib::PropertyProxy< bool > | property_vexpand_set ()
Glib::PropertyProxy_ReadOnly< bool > | property_vexpand_set () const
Glib::PropertyProxy< bool > | property_expand ()
Glib::PropertyProxy_ReadOnly< bool > | property_expand () const
Glib::PropertyProxy< double > | property_opacity ()
Glib::PropertyProxy_ReadOnly< double > | property_opacity () const
Glib::PropertyProxy_ReadOnly< int > | property_scale_factor () const
Gtk::Widget * | wrap (GtkWidget *object, bool take_copy=false)
Public Member Functions inherited from Gtk::Object
| Object (Object &&src) noexcept
Object & | operator= (Object &&src) noexcept
virtual | ~Object () noexcept
GObject * | gobj ()
const GObject * | gobj () const
Public Member Functions inherited from Glib::Object
| Object (const Object &)=delete
Object & | operator= (const Object &)=delete
| Object (Object &&src) noexcept
Object & | operator= (Object &&src) noexcept
void * | get_data (const QueryQuark &key)
void | set_data (const Quark &key, void *data)
void | set_data (const Quark &key, void *data, DestroyNotify notify)
void | remove_data (const QueryQuark &quark)
void * | steal_data (const QueryQuark &quark)
Glib::RefPtr< Glib::Object > | wrap (GObject *object, bool take_copy=false)
Public Member Functions inherited from Glib::ObjectBase
| ObjectBase (const ObjectBase &)=delete
ObjectBase & | operator= (const ObjectBase &)=delete
void | set_property_value (const Glib::ustring &property_name, const Glib::ValueBase &value)
void | get_property_value (const Glib::ustring &property_name, Glib::ValueBase &value) const
void | set_property (const Glib::ustring &property_name, const PropertyType &value)
void | get_property (const Glib::ustring &property_name, PropertyType &value) const
void | connect_property_changed (const Glib::ustring &property_name, const sigc::slot< void > &slot)
sigc::connection | connect_property_changed_with_return (const Glib::ustring &property_name, const sigc::slot< void > &slot)
void | freeze_notify ()
void | thaw_notify ()
virtual void | reference () const
virtual void | unreference () const
GObject * | gobj ()
const GObject * | gobj () const
GObject * | gobj_copy () const
Public Member Functions inherited from sigc::trackable
| trackable ()
| trackable (const trackable &src)
| trackable (trackable &&src) noexcept
| ~trackable ()
void | add_destroy_notify_callback (void *data, func_destroy_notify func) const
void | notify_callbacks ()
trackable & | operator= (const trackable &src)
trackable & | operator= (trackable &&src) noexcept
void | remove_destroy_notify_callback (void *data) const
Public Member Functions inherited from Gtk::Buildable
| Buildable (Buildable &&src) noexcept
Buildable & | operator= (Buildable &&src) noexcept
virtual | ~Buildable () noexcept
GtkBuildable * | gobj ()
const GtkBuildable * | gobj () const
void | set_name (const Glib::ustring &name)
Glib::ustring | get_name () const
Glib::RefPtr< Gtk::Buildable > | wrap (GtkBuildable *object, bool take_copy=false)
Public Member Functions inherited from Glib::Interface
| Interface ()
| Interface (Interface &&src) noexcept
Interface & | operator= (Interface &&src) noexcept
| Interface (const Glib::Interface_Class &interface_class)
| Interface (GObject *castitem)
virtual | ~Interface () noexcept
| Interface (const Interface &)=delete
Interface & | operator= (const Interface &)=delete
GObject * | gobj ()
const GObject * | gobj () const

## Static Public Member Functions

static GType | get_type ()
| Get the GType for this class, for use with the underlying GObject type system. More...
Static Public Member Functions inherited from Gtk::Container
static GType | get_type ()
Static Public Member Functions inherited from Gtk::Widget
static GType | get_type ()
static Widget * | get_current_modal_grab ()
static void | push_composite_child ()
static void | pop_composite_child ()
static void | set_default_direction (TextDirection dir)
static TextDirection | get_default_direction ()
static Widget * | drag_get_source_widget (const Glib::RefPtr< Gdk::DragContext > &context)
Static Public Member Functions inherited from Gtk::Buildable
static void | add_interface (GType gtype_implementer)
static GType | get_type ()

## Protected Member Functions

virtual void | on_item_created (const Glib::RefPtr< Item >& item, const Glib::RefPtr< ItemModel >& model)
| This is a default handler for the signal signal_item_created(). More...
virtual Glib::RefPtr< Item > | create_item_vfunc (const Glib::RefPtr< ItemModel >& model)
Protected Member Functions inherited from Gtk::Container
virtual void | on_add (Widget *widget)
virtual void | on_remove (Widget *widget)
virtual void | on_check_resize ()
virtual void | on_set_focus_child (Widget *widget)
| Container ()
virtual GType | child_type_vfunc () const
virtual void | forall_vfunc (gboolean include_internals, GtkCallback callback, gpointer callback_data)
virtual char * | composite_name_vfunc (GtkWidget *child)
virtual void | set_child_property_vfunc (GtkWidget *child, guint property_id, const GValue *value, GParamSpec *pspec)
virtual void | get_child_property_vfunc (GtkWidget *child, guint property_id, GValue *value, GParamSpec *pspec) const
Glib::PropertyProxy< guint > | property_border_width ()
Glib::PropertyProxy_ReadOnly< guint > | property_border_width () const
Glib::PropertyProxy< ResizeMode > | property_resize_mode ()
Glib::PropertyProxy_ReadOnly< ResizeMode > | property_resize_mode () const
Glib::PropertyProxy_WriteOnly< Widget * > | property_child ()
Protected Member Functions inherited from Gtk::Widget
virtual void | on_show ()
virtual void | on_hide ()
virtual void | on_map ()
virtual void | on_unmap ()
virtual void | on_realize ()
virtual void | on_unrealize ()
virtual void | on_size_allocate (Allocation &allocation)
virtual void | on_state_changed (Gtk::StateType previous_state)
virtual void | on_parent_changed (Widget *previous_parent)
virtual void | on_hierarchy_changed (Widget *previous_toplevel)
virtual void | on_style_updated ()
virtual void | on_direction_changed (TextDirection direction)
virtual void | on_grab_notify (bool was_grabbed)
virtual void | on_child_notify (GParamSpec *pspec)
virtual bool | on_mnemonic_activate (bool group_cycling)
virtual void | on_grab_focus ()
virtual bool | on_focus (DirectionType direction)
virtual bool | on_event (GdkEvent *gdk_event)
virtual bool | on_button_press_event (GdkEventButton *button_event)
virtual bool | on_button_release_event (GdkEventButton *release_event)
virtual bool | on_scroll_event (GdkEventScroll *scroll_event)
virtual bool | on_motion_notify_event (GdkEventMotion *motion_event)
virtual bool | on_delete_event (GdkEventAny *any_event)
virtual bool | on_draw (const ::Cairo::RefPtr< ::Cairo::Context > &cr)
virtual bool | on_key_press_event (GdkEventKey *key_event)
virtual bool | on_key_release_event (GdkEventKey *key_event)
virtual bool | on_enter_notify_event (GdkEventCrossing *crossing_event)
virtual bool | on_leave_notify_event (GdkEventCrossing *crossing_event)
virtual bool | on_configure_event (GdkEventConfigure *configure_event)
virtual bool | on_focus_in_event (GdkEventFocus *focus_event)
virtual bool | on_focus_out_event (GdkEventFocus *gdk_event)
virtual bool | on_map_event (GdkEventAny *any_event)
virtual bool | on_unmap_event (GdkEventAny *any_event)
virtual bool | on_property_notify_event (GdkEventProperty *property_event)
virtual bool | on_selection_clear_event (GdkEventSelection *selection_event)
virtual bool | on_selection_request_event (GdkEventSelection *selection_event)
virtual bool | on_selection_notify_event (GdkEventSelection *selection_event)
virtual bool | on_proximity_in_event (GdkEventProximity *proximity_event)
virtual bool | on_proximity_out_event (GdkEventProximity *proximity_event)
virtual bool | on_visibility_notify_event (GdkEventVisibility *visibility_event)
virtual bool | on_window_state_event (GdkEventWindowState *window_state_event)
virtual void | on_selection_get (SelectionData &selection_data, guint info, guint time)
virtual void | on_selection_received (const SelectionData &selection_data, guint time)
virtual void | on_drag_begin (const Glib::RefPtr< Gdk::DragContext > &context)
virtual void | on_drag_end (const Glib::RefPtr< Gdk::DragContext > &context)
virtual void | on_drag_data_get (const Glib::RefPtr< Gdk::DragContext > &context, SelectionData &selection_data, guint info, guint time)
virtual void | on_drag_data_delete (const Glib::RefPtr< Gdk::DragContext > &context)
virtual void | on_drag_leave (const Glib::RefPtr< Gdk::DragContext > &context, guint time)
virtual bool | on_drag_motion (const Glib::RefPtr< Gdk::DragContext > &context, int x, int y, guint time)
virtual bool | on_drag_drop (const Glib::RefPtr< Gdk::DragContext > &context, int x, int y, guint time)
virtual void | on_drag_data_received (const Glib::RefPtr< Gdk::DragContext > &context, int x, int y, const SelectionData &selection_data, guint info, guint time)
virtual void | on_screen_changed (const Glib::RefPtr< Gdk::Screen > &previous_screen)
virtual void | dispatch_child_properties_changed_vfunc (guint p1, GParamSpec **p2)
virtual void | show_all_vfunc ()
virtual Glib::RefPtr< Atk::Object > | get_accessible_vfunc ()
virtual SizeRequestMode | get_request_mode_vfunc () const
virtual void | get_preferred_width_vfunc (int &minimum_width, int &natural_width) const
virtual void | get_preferred_height_for_width_vfunc (int width, int &minimum_height, int &natural_height) const
virtual void | get_preferred_height_vfunc (int &minimum_height, int &natural_height) const
virtual void | get_preferred_width_for_height_vfunc (int height, int &minimum_width, int &natural_width) const
| Widget ()
void | realize ()
void | unrealize ()
void | draw (const ::Cairo::RefPtr< ::Cairo::Context > &cr)
void | set_mapped (bool mapped=true)
void | set_realized (bool realized=true)
void | set_has_window (bool has_window=true)
void | set_window (const Glib::RefPtr< Gdk::Window > &window)
void | transform_cairo_context_to_window (const ::Cairo::RefPtr< ::Cairo::Context > &cr, const Glib::RefPtr< const Gdk::Window > &window)
Requisition | get_requisition () const
void | get_style_property_value (const Glib::ustring &the_property_name, Glib::ValueBase &value) const
void | realize_if_needed ()
Protected Member Functions inherited from Glib::Object
| Object ()
| Object (const Glib::ConstructParams &construct_params)
| Object (GObject *castitem)
Protected Member Functions inherited from Glib::ObjectBase
| ObjectBase ()
| ObjectBase (const char *custom_type_name)
| ObjectBase (const std::type_info &custom_type_info)
| ObjectBase (ObjectBase &&src) noexcept
ObjectBase & | operator= (ObjectBase &&src) noexcept
virtual | ~ObjectBase () noexcept=0
void | initialize (GObject *castitem)
void | initialize_move (GObject *castitem, Glib::ObjectBase *previous_wrapper)
Protected Member Functions inherited from Gtk::Buildable
| Buildable ()

## Related Functions

(Note that these are not member functions.)
Goocanvas::Canvas* | wrap (GooCanvas* object, bool take_copy=false)
| A Glib::wrap() method for this object. More...

## Additional Inherited Members

Public Types inherited from Gtk::Container
typedef sigc::slot< void, Widget & > | ForeachSlot
Public Types inherited from Glib::Object
typedef void(* | DestroyNotify) (gpointer data)
Public Types inherited from sigc::trackable
typedef internal::func_destroy_notify | func_destroy_notify
Static Protected Member Functions inherited from Gtk::Widget
static bool | should_draw_window (const ::Cairo::RefPtr< const ::Cairo::Context > &cr, const Glib::RefPtr< const Gdk::Window > &window)

## Detailed Description

The main canvas widget, containing a number of canvas items.

Add child items (see Item) to the root item (see get_root_item()), for instance with Item::add_child().

## Constructor & Destructor Documentation

Goocanvas::Canvas::Canvas | ( | Canvas&& | src | ) |

noexcept

Goocanvas::Canvas::Canvas | ( | const Canvas& |  | ) |

delete

virtual Goocanvas::Canvas::~Canvas | ( |  | ) |

virtual noexcept

Goocanvas::Canvas::Canvas | ( |  | ) |

## Member Function Documentation

void Goocanvas::Canvas::convert_bounds_to_item_space | ( | const Glib::RefPtr< Item >& | item,
|  | Bounds& | bounds
| ) |  | const

void Goocanvas::Canvas::convert_from_item_space | ( | const Glib::RefPtr< Item >& | item,
|  | double & | x,
|  | double & | y
| ) |  | const

Converts a coordinate from the given item's coordinate space to the canvas coordinate space, applying all transformation matrices including the item's own transformation matrix, if it has one.

Parameters

  item | A Goo::CanvasItem.
  x | A pointer to the x coordinate to convert.
  y | A pointer to the y coordinate to convert.

void Goocanvas::Canvas::convert_from_pixels | ( | double & | x,
|  | double & | y
| ) |  | const

Converts a coordinate from pixels to the canvas coordinate space.

The pixel coordinate space specifies pixels from the top-left of the entire canvas window, according to the current scale setting. See set_scale().

The canvas coordinate space is specified in the call to set_bounds().

Parameters

  x | A pointer to the x coordinate to convert.
  y | A pointer to the y coordinate to convert.

void Goocanvas::Canvas::convert_to_item_space | ( | const Glib::RefPtr< Item >& | item,
|  | double & | x,
|  | double & | y
| ) |  | const

Converts a coordinate from the canvas coordinate space to the given item's coordinate space, applying all transformation matrices including the item's own transformation matrix, if it has one.

Parameters

  item | A Goo::CanvasItem.
  x | A pointer to the x coordinate to convert.
  y | A pointer to the y coordinate to convert.

void Goocanvas::Canvas::convert_to_pixels | ( | double & | x,
|  | double & | y
| ) |  | const

Converts a coordinate from the canvas coordinate space to pixels.

The canvas coordinate space is specified in the call to set_bounds().

The pixel coordinate space specifies pixels from the top-left of the entire canvas window, according to the current scale setting. See set_scale().

Parameters

  x | A pointer to the x coordinate to convert.
  y | A pointer to the y coordinate to convert.

Cairo::RefPtr<Cairo::Context> Goocanvas::Canvas::create_cairo_context | ( |  | ) |

Creates a cairo context, initialized with the default canvas settings.

Returns
  A new cairo context. It should be freed with cairo_destroy().

Glib::RefPtr<Item> Goocanvas::Canvas::create_item | ( | const Glib::RefPtr< ItemModel >& | model | ) |

This function is only intended to be used when implementing new canvas items, typically container items such as Goo::CanvasGroup.

It creates a new canvas item for the given item model, and recursively creates items for any children.

It uses the create_item() virtual method if it has been set. Subclasses of Goo::Canvas can define this method if they want to use custom views for items.

It emits the Goo::Canvas::signal_item_created() signal after creating the view, so application code can connect signal handlers to the new view if desired.

Parameters

  model | The item model to create a canvas item for.

Returns
  A new canvas item.

virtual Glib::RefPtr<Item> Goocanvas::Canvas::create_item_vfunc | ( | const Glib::RefPtr< ItemModel >& | model | ) |

protected virtual

void Goocanvas::Canvas::get_bounds | ( | double & | left,
|  | double & | top,
|  | double & | right,
|  | double & | bottom
| ) |  | const

Gets the bounds of the canvas, in canvas units.

By default, canvas units are pixels, though the Goo::Canvas::property_units() property can be used to change the units to points, inches or millimeters.

Parameters

  left | A pointer to a #gdouble to return the left edge, or `0`.
  top | A pointer to a #gdouble to return the top edge, or `0`.
  right | A pointer to a #gdouble to return the right edge, or `0`.
  bottom | A pointer to a #gdouble to return the bottom edge, or `0`.

void Goocanvas::Canvas::get_bounds | ( | Bounds& | bounds | ) | const

double Goocanvas::Canvas::get_default_line_width | ( |  | ) | const

Gets the default line width, which depends on the current units setting.

Returns
  The default line width of the canvas.

Glib::RefPtr<Item> Goocanvas::Canvas::get_item | ( | const Glib::RefPtr< ItemModel >& | model | ) |

Gets the canvas item associated with the given Goo::CanvasItemModel.

This is only useful when set_root_item_model() has been used to set a model for the canvas.

For simple applications you can use get_item() to set up signal handlers for your items, e.g.

<informalexample><programlisting> item = goo_canvas_get_item (GOO_CANVAS (canvas), my_item); g_signal_connect (item, "button_press_event", (GtkSignalFunc) on_my_item_button_press, `0`); </programlisting></informalexample>

More complex applications may want to use the Goo::Canvas::signal_item_created() signal to hook up their signal handlers.

Parameters

  model | A Goo::CanvasItemModel.

Returns
  The canvas item corresponding to the given Goo::CanvasItemModel, or `0` if no canvas item has been created for it yet.

Glib::RefPtr<const Item> Goocanvas::Canvas::get_item | ( | const Glib::RefPtr< ItemModel >& | model | ) | const

Gets the canvas item associated with the given Goo::CanvasItemModel.

This is only useful when set_root_item_model() has been used to set a model for the canvas.

For simple applications you can use get_item() to set up signal handlers for your items, e.g.

<informalexample><programlisting> item = goo_canvas_get_item (GOO_CANVAS (canvas), my_item); g_signal_connect (item, "button_press_event", (GtkSignalFunc) on_my_item_button_press, `0`); </programlisting></informalexample>

More complex applications may want to use the Goo::Canvas::signal_item_created() signal to hook up their signal handlers.

Parameters

  model | A Goo::CanvasItemModel.

Returns
  The canvas item corresponding to the given Goo::CanvasItemModel, or `0` if no canvas item has been created for it yet.

Glib::RefPtr<Item> Goocanvas::Canvas::get_item_at | ( | double | x,
|  | double | y,
|  | bool | is_pointer_event
| ) |  |

Gets the item at the given point.

Parameters

  x | The x coordinate of the point.
  y | The y coordinate of the point.
  is_pointer_event | `true` if the "pointer-events" property of items should be used to determine which parts of the item are tested.

Returns
  The item found at the given point, or `0` if no item was found.

Glib::RefPtr<const Item> Goocanvas::Canvas::get_item_at | ( | double | x,
|  | double | y,
|  | bool | is_pointer_event
| ) |  | const

Gets the item at the given point.

Parameters

  x | The x coordinate of the point.
  y | The y coordinate of the point.
  is_pointer_event | `true` if the "pointer-events" property of items should be used to determine which parts of the item are tested.

Returns
  The item found at the given point, or `0` if no item was found.

std::vector< Glib::RefPtr<Item> > Goocanvas::Canvas::get_items_at | ( | double | x,
|  | double | y,
|  | bool | is_pointer_event
| ) |  |

Gets all items at the given point.

Parameters

  x | The x coordinate of the point.
  y | The y coordinate of the point.
  is_pointer_event | `true` if the "pointer-events" property of items should be used to determine which parts of the item are tested.

Returns
  A list of items found at the given point, with the top item at the start of the list, or `0` if no items were found. The list must be freed with Glib::list_free().

std::vector< Glib::RefPtr<const Item> > Goocanvas::Canvas::get_items_at | ( | double | x,
|  | double | y,
|  | bool | is_pointer_event
| ) |  | const

Gets all items at the given point.

Parameters

  x | The x coordinate of the point.
  y | The y coordinate of the point.
  is_pointer_event | `true` if the "pointer-events" property of items should be used to determine which parts of the item are tested.

Returns
  A list of items found at the given point, with the top item at the start of the list, or `0` if no items were found. The list must be freed with Glib::list_free().

std::vector< Glib::RefPtr<Item> > Goocanvas::Canvas::get_items_in_area | ( | const Bounds& | area,
|  | bool | inside_area,
|  | bool | allow_overlaps,
|  | bool | include_containers
| ) |  |

Gets a list of items inside or outside a given area.

Parameters

  area | The area to compare with each item's bounds.
  inside_area | `true` if items inside area should be returned, or `false` if items outside area should be returned.
  allow_overlaps | `true` if items which are partly inside and partly outside should be returned.
  include_containers | `true` if containers should be checked as well as normal items.

Returns
  A list of items in the given area, or `0` if no items are found. The list should be freed with Glib::list_free().

std::vector< Glib::RefPtr<const Item> > Goocanvas::Canvas::get_items_in_area | ( | const Bounds& | area,
|  | bool | inside_area,
|  | bool | allow_overlaps,
|  | bool | include_containers
| ) |  | const

Gets a list of items inside or outside a given area.

Parameters

  area | The area to compare with each item's bounds.
  inside_area | `true` if items inside area should be returned, or `false` if items outside area should be returned.
  allow_overlaps | `true` if items which are partly inside and partly outside should be returned.
  include_containers | `true` if containers should be checked as well as normal items.

Returns
  A list of items in the given area, or `0` if no items are found. The list should be freed with Glib::list_free().

Glib::RefPtr<Item> Goocanvas::Canvas::get_root_item | ( |  | ) |

Gets the root item of the canvas, usually a Goo::CanvasGroup.

Returns
  The root item, or `0` if there is no root item.

Glib::RefPtr<const Item> Goocanvas::Canvas::get_root_item | ( |  | ) | const

Gets the root item of the canvas, usually a Goo::CanvasGroup.

Returns
  The root item, or `0` if there is no root item.

Glib::RefPtr<ItemModel> Goocanvas::Canvas::get_root_item_model | ( |  | ) |

Gets the root item model of the canvas.

Returns
  The root item model, or `0` if there is no root item model.

Glib::RefPtr<const ItemModel> Goocanvas::Canvas::get_root_item_model | ( |  | ) | const

Gets the root item model of the canvas.

Returns
  The root item model, or `0` if there is no root item model.

double Goocanvas::Canvas::get_scale | ( |  | ) | const

Gets the current scale of the canvas.

The scale specifies the magnification factor of the canvas, e.g. if an item has a width of 2 pixels and the scale is set to 3, it will be displayed with a width of 2 x 3 = 6 pixels.

Returns
  The current scale setting.

Glib::RefPtr<Item> Goocanvas::Canvas::get_static_root_item | ( |  | ) |

Glib::RefPtr<const Item> Goocanvas::Canvas::get_static_root_item | ( |  | ) | const

Glib::RefPtr<ItemModel> Goocanvas::Canvas::get_static_root_item_model | ( |  | ) |

Glib::RefPtr<const ItemModel> Goocanvas::Canvas::get_static_root_item_model | ( |  | ) | const

static GType Goocanvas::Canvas::get_type | ( |  | ) |

static

Get the GType for this class, for use with the underlying GObject type system.

GooCanvas* Goocanvas::Canvas::gobj | ( |  | ) |

inline

Provides access to the underlying C GtkObject.

const GooCanvas* Goocanvas::Canvas::gobj | ( |  | ) | const

inline

Provides access to the underlying C GtkObject.

void Goocanvas::Canvas::grab_focus | ( | const Glib::RefPtr< Item >& | item | ) |

Grabs the keyboard focus for the given item.

Parameters

  item | The item to grab the focus.

GdkGrabStatus Goocanvas::Canvas::keyboard_grab | ( | const Glib::RefPtr< Item >& | item,
|  | bool | owner_events,
|  | guint32 | time
| ) |  |

Attempts to grab the keyboard for the given item.

Parameters

  item | The item to grab the keyboard for.
  owner_events | `true` if keyboard events for this application will be reported normally, or `false` if all keyboard events will be reported with respect to the grab item.
  time | The time of the event that lead to the keyboard grab. This should come from the relevant Gdk::Event.

Returns
  Gdk::GRAB_SUCCESS if the grab succeeded.

void Goocanvas::Canvas::keyboard_ungrab | ( | const Glib::RefPtr< Item >& | item,
|  | guint32 | time
| ) |  |

Ungrabs the keyboard, if the given item has the keyboard grab.

Parameters

  item | The item that has the keyboard grab.
  time | The time of the event that lead to the keyboard ungrab. This should come from the relevant Gdk::Event.

virtual void Goocanvas::Canvas::on_item_created | ( | const Glib::RefPtr< Item >& | item,
|  | const Glib::RefPtr< ItemModel >& | model
| ) |  |

protected virtual

This is a default handler for the signal signal_item_created().

Canvas& Goocanvas::Canvas::operator= | ( | Canvas&& | src | ) |

noexcept

Canvas& Goocanvas::Canvas::operator= | ( | const Canvas& |  | ) |

delete

Gdk::GrabStatus Goocanvas::Canvas::pointer_grab | ( | const Glib::RefPtr< Item >& | item,
|  | Gdk::EventMask | mask,
|  | const Glib::RefPtr< Gdk::Cursor > & | cursor,
|  | guint32 | time
| ) |  |

Attempts to grab the pointer for the given item.

Parameters

  item | The item to grab the pointer for.
  mask | The events to receive during the grab.
  cursor | The cursor to display during the grab, or `0`.
  time | The time of the event that lead to the pointer grab. This should come from the relevant Gdk::Event.

Returns
  Gdk::GRAB_SUCCESS if the grab succeeded.

Gdk::GrabStatus Goocanvas::Canvas::pointer_grab | ( | const Glib::RefPtr< Item >& | item,
|  | Gdk::EventMask | mask,
|  | guint32 | time
| ) |  |

void Goocanvas::Canvas::pointer_ungrab | ( | const Glib::RefPtr< Item >& | item,
|  | guint32 | time
| ) |  |

Ungrabs the pointer, if the given item has the pointer grab.

Parameters

  item | The item that has the grab.
  time | The time of the event that lead to the pointer ungrab. This should come from the relevant Gdk::Event.

Glib::PropertyProxy< AnchorType > Goocanvas::Canvas::property_anchor | ( |  | ) |

Where to place the canvas when it is smaller than the widget's allocated area.

Returns
  A PropertyProxy that allows you to get or set the value of the property, or receive notification when the value of the property changes.

Glib::PropertyProxy_ReadOnly< AnchorType > Goocanvas::Canvas::property_anchor | ( |  | ) | const

Where to place the canvas when it is smaller than the widget's allocated area.

Returns
  A PropertyProxy_ReadOnly that allows you to get the value of the property, or receive notification when the value of the property changes.

Glib::PropertyProxy< bool > Goocanvas::Canvas::property_automatic_bounds | ( |  | ) |

If the bounds are automatically calculated based on the bounds of all the items in the canvas.

Returns
  A PropertyProxy that allows you to get or set the value of the property, or receive notification when the value of the property changes.

Glib::PropertyProxy_ReadOnly< bool > Goocanvas::Canvas::property_automatic_bounds | ( |  | ) | const

If the bounds are automatically calculated based on the bounds of all the items in the canvas.

Returns
  A PropertyProxy_ReadOnly that allows you to get the value of the property, or receive notification when the value of the property changes.

Glib::PropertyProxy_WriteOnly< Glib::ustring > Goocanvas::Canvas::property_background_color | ( |  | ) |

The color to use for the canvas background.

Returns
  A PropertyProxy_WriteOnly that allows you to set the value of the property, or receive notification when the value of the property changes.

Glib::PropertyProxy_WriteOnly< Gdk::RGBA > Goocanvas::Canvas::property_background_color_gdk_rgba | ( |  | ) |

The color to use for the canvas background, specified as a GdkRGBA.

Returns
  A PropertyProxy_WriteOnly that allows you to set the value of the property, or receive notification when the value of the property changes.

Glib::PropertyProxy_WriteOnly< guint > Goocanvas::Canvas::property_background_color_rgb | ( |  | ) |

The color to use for the canvas background, specified as a 24-bit integer value, 0xRRGGBB.

Returns
  A PropertyProxy_WriteOnly that allows you to set the value of the property, or receive notification when the value of the property changes.

Glib::PropertyProxy< bool > Goocanvas::Canvas::property_bounds_from_origin | ( |  | ) |

If the automatic bounds are calculated from the origin.

Returns
  A PropertyProxy that allows you to get or set the value of the property, or receive notification when the value of the property changes.

Glib::PropertyProxy_ReadOnly< bool > Goocanvas::Canvas::property_bounds_from_origin | ( |  | ) | const

If the automatic bounds are calculated from the origin.

Returns
  A PropertyProxy_ReadOnly that allows you to get the value of the property, or receive notification when the value of the property changes.

Glib::PropertyProxy< double > Goocanvas::Canvas::property_bounds_padding | ( |  | ) |

The padding added to the automatic bounds.

Returns
  A PropertyProxy that allows you to get or set the value of the property, or receive notification when the value of the property changes.

Glib::PropertyProxy_ReadOnly< double > Goocanvas::Canvas::property_bounds_padding | ( |  | ) | const

The padding added to the automatic bounds.

Returns
  A PropertyProxy_ReadOnly that allows you to get the value of the property, or receive notification when the value of the property changes.

Glib::PropertyProxy< bool > Goocanvas::Canvas::property_clear_background | ( |  | ) |

If the background is cleared before the canvas is painted.

Returns
  A PropertyProxy that allows you to get or set the value of the property, or receive notification when the value of the property changes.

Glib::PropertyProxy_ReadOnly< bool > Goocanvas::Canvas::property_clear_background | ( |  | ) | const

If the background is cleared before the canvas is painted.

Returns
  A PropertyProxy_ReadOnly that allows you to get the value of the property, or receive notification when the value of the property changes.

Glib::PropertyProxy< bool > Goocanvas::Canvas::property_integer_layout | ( |  | ) |

If all item layout is done to the nearest integer.

Returns
  A PropertyProxy that allows you to get or set the value of the property, or receive notification when the value of the property changes.

Glib::PropertyProxy_ReadOnly< bool > Goocanvas::Canvas::property_integer_layout | ( |  | ) | const

If all item layout is done to the nearest integer.

Returns
  A PropertyProxy_ReadOnly that allows you to get the value of the property, or receive notification when the value of the property changes.

Glib::PropertyProxy< double > Goocanvas::Canvas::property_resolution_x | ( |  | ) |

The horizontal resolution of the display, in dots per inch.

Returns
  A PropertyProxy that allows you to get or set the value of the property, or receive notification when the value of the property changes.

Glib::PropertyProxy_ReadOnly< double > Goocanvas::Canvas::property_resolution_x | ( |  | ) | const

The horizontal resolution of the display, in dots per inch.

Returns
  A PropertyProxy_ReadOnly that allows you to get the value of the property, or receive notification when the value of the property changes.

Glib::PropertyProxy< double > Goocanvas::Canvas::property_resolution_y | ( |  | ) |

The vertical resolution of the display, in dots per inch.

Returns
  A PropertyProxy that allows you to get or set the value of the property, or receive notification when the value of the property changes.

Glib::PropertyProxy_ReadOnly< double > Goocanvas::Canvas::property_resolution_y | ( |  | ) | const

The vertical resolution of the display, in dots per inch.

Returns
  A PropertyProxy_ReadOnly that allows you to get the value of the property, or receive notification when the value of the property changes.

Glib::PropertyProxy< double > Goocanvas::Canvas::property_scale | ( |  | ) |

The magnification factor of the canvas.

Returns
  A PropertyProxy that allows you to get or set the value of the property, or receive notification when the value of the property changes.

Glib::PropertyProxy_ReadOnly< double > Goocanvas::Canvas::property_scale | ( |  | ) | const

The magnification factor of the canvas.

Returns
  A PropertyProxy_ReadOnly that allows you to get the value of the property, or receive notification when the value of the property changes.

Glib::PropertyProxy< double > Goocanvas::Canvas::property_scale_x | ( |  | ) |

The horizontal magnification factor of the canvas.

Returns
  A PropertyProxy that allows you to get or set the value of the property, or receive notification when the value of the property changes.

Glib::PropertyProxy_ReadOnly< double > Goocanvas::Canvas::property_scale_x | ( |  | ) | const

The horizontal magnification factor of the canvas.

Returns
  A PropertyProxy_ReadOnly that allows you to get the value of the property, or receive notification when the value of the property changes.

Glib::PropertyProxy< double > Goocanvas::Canvas::property_scale_y | ( |  | ) |

The vertical magnification factor of the canvas.

Returns
  A PropertyProxy that allows you to get or set the value of the property, or receive notification when the value of the property changes.

Glib::PropertyProxy_ReadOnly< double > Goocanvas::Canvas::property_scale_y | ( |  | ) | const

The vertical magnification factor of the canvas.

Returns
  A PropertyProxy_ReadOnly that allows you to get the value of the property, or receive notification when the value of the property changes.

Glib::PropertyProxy< Gtk::Unit > Goocanvas::Canvas::property_units | ( |  | ) |

The units to use for the canvas.

Returns
  A PropertyProxy that allows you to get or set the value of the property, or receive notification when the value of the property changes.

Glib::PropertyProxy_ReadOnly< Gtk::Unit > Goocanvas::Canvas::property_units | ( |  | ) | const

The units to use for the canvas.

Returns
  A PropertyProxy_ReadOnly that allows you to get the value of the property, or receive notification when the value of the property changes.

Glib::PropertyProxy< double > Goocanvas::Canvas::property_x1 | ( |  | ) |

The x coordinate of the left edge of the canvas bounds, in canvas units.

Returns
  A PropertyProxy that allows you to get or set the value of the property, or receive notification when the value of the property changes.

Glib::PropertyProxy_ReadOnly< double > Goocanvas::Canvas::property_x1 | ( |  | ) | const

The x coordinate of the left edge of the canvas bounds, in canvas units.

Returns
  A PropertyProxy_ReadOnly that allows you to get the value of the property, or receive notification when the value of the property changes.

Glib::PropertyProxy< double > Goocanvas::Canvas::property_x2 | ( |  | ) |

The x coordinate of the right edge of the canvas bounds, in canvas units.

Returns
  A PropertyProxy that allows you to get or set the value of the property, or receive notification when the value of the property changes.

Glib::PropertyProxy_ReadOnly< double > Goocanvas::Canvas::property_x2 | ( |  | ) | const

The x coordinate of the right edge of the canvas bounds, in canvas units.

Returns
  A PropertyProxy_ReadOnly that allows you to get the value of the property, or receive notification when the value of the property changes.

Glib::PropertyProxy< double > Goocanvas::Canvas::property_y1 | ( |  | ) |

The y coordinate of the top edge of the canvas bounds, in canvas units.

Returns
  A PropertyProxy that allows you to get or set the value of the property, or receive notification when the value of the property changes.

Glib::PropertyProxy_ReadOnly< double > Goocanvas::Canvas::property_y1 | ( |  | ) | const

The y coordinate of the top edge of the canvas bounds, in canvas units.

Returns
  A PropertyProxy_ReadOnly that allows you to get the value of the property, or receive notification when the value of the property changes.

Glib::PropertyProxy< double > Goocanvas::Canvas::property_y2 | ( |  | ) |

The y coordinate of the bottom edge of the canvas bounds, in canvas units.

Returns
  A PropertyProxy that allows you to get or set the value of the property, or receive notification when the value of the property changes.

Glib::PropertyProxy_ReadOnly< double > Goocanvas::Canvas::property_y2 | ( |  | ) | const

The y coordinate of the bottom edge of the canvas bounds, in canvas units.

Returns
  A PropertyProxy_ReadOnly that allows you to get the value of the property, or receive notification when the value of the property changes.

void Goocanvas::Canvas::register_widget_item | ( | const Glib::RefPtr< Goocanvas::Widget >& | widget | ) |

This function should only be used by Goo::CanvasWidget and subclass implementations.

It registers a widget item with the canvas, so that the canvas can do the necessary actions to move and resize the widget as needed.

Parameters

  widget | A Goo::CanvasWidget item.

void Goocanvas::Canvas::render | ( | const Cairo::RefPtr< Cairo::Context > & | context,
|  | const Bounds& | bounds,
|  | double | scale = `0.0`
| ) |  |

Renders all or part of a canvas to the given cairo context.

Parameters

  context | A cairo context.
  bounds | The area to render, or `0` to render the entire canvas.
  scale | The scale to compare with each item's visibility threshold to see if they should be rendered. This only affects items that have their visibility set to Goo::CANVAS_ITEM_VISIBLE_ABOVE_THRESHOLD.

void Goocanvas::Canvas::render | ( | const Cairo::RefPtr< Cairo::Context > & | context,
|  | double | scale = `0.0`
| ) |  |

void Goocanvas::Canvas::request_item_redraw | ( | const Bounds& | bounds,
|  | bool | is_static = `false`
| ) |  |

void Goocanvas::Canvas::request_redraw | ( | const Bounds& | bounds | ) |

This function is only intended to be used by subclasses of Goo::Canvas or Goo::CanvasItem implementations.

Requests that the given bounds be redrawn.

Parameters

  bounds | The bounds to redraw.

void Goocanvas::Canvas::request_update | ( |  | ) |

This function is only intended to be used by subclasses of Goo::Canvas or Goo::CanvasItem implementations.

It schedules an update of the Goo::Canvas. This will be performed in the idle loop, after all pending events have been handled, but before the canvas has been repainted.

void Goocanvas::Canvas::scroll_to | ( | double | left,
|  | double | top
| ) |  |

Scrolls the canvas, placing the given point as close to the top-left of the view as possible.

Parameters

  left | The x coordinate to scroll to.
  top | The y coordinate to scroll to.

void Goocanvas::Canvas::set_bounds | ( | double | left,
|  | double | top,
|  | double | right,
|  | double | bottom
| ) |  |

Sets the bounds of the Goo::Canvas, in canvas units.

By default, canvas units are pixels, though the Goo::Canvas::property_units() property can be used to change the units to points, inches or millimeters.

Parameters

  left | The left edge.
  top | The top edge.
  right | The right edge.
  bottom | The bottom edge.

void Goocanvas::Canvas::set_bounds | ( | const Bounds& | bounds | ) |

void Goocanvas::Canvas::set_root_item | ( | const Glib::RefPtr< Item >& | item | ) |

Sets the root item of the canvas.

Any existing canvas items are removed.

Parameters

  item | The root canvas item.

void Goocanvas::Canvas::set_root_item_model | ( | const Glib::RefPtr< ItemModel >& | model | ) |

Sets the root item model of the canvas.

A hierarchy of canvas items will be created, corresponding to the hierarchy of items in the model. Any current canvas items will be removed.

Parameters

  model | A Goo::CanvasItemModel.

void Goocanvas::Canvas::set_scale | ( | double | scale | ) |

Sets the scale of the canvas.

The scale specifies the magnification factor of the canvas, e.g. if an item has a width of 2 pixels and the scale is set to 3, it will be displayed with a width of 2 x 3 = 6 pixels.

Parameters

  scale | The new scale setting.

void Goocanvas::Canvas::set_static_root_item | ( | const Glib::RefPtr< Item >& | item | ) |

void Goocanvas::Canvas::set_static_root_item_model | ( | const Glib::RefPtr< ItemModel >& | model | ) |

Glib::SignalProxy2< void,const Glib::RefPtr<Item>&,const Glib::RefPtr<ItemModel>& > Goocanvas::Canvas::signal_item_created | ( |  | ) |

Slot Prototype:
  `void on_my_item_created(const Glib::RefPtr<Item>& item, const Glib::RefPtr<ItemModel>& model)`

void Goocanvas::Canvas::unregister_item | ( | const Glib::RefPtr< ItemModel >& | model | ) |

This function is only intended to be used when implementing new canvas items.

It should be called in the finalize method of Goo::CanvasItem objects, to remove the canvas item from the Goo::Canvas's hash table.

Parameters

  model | The item model whose canvas item is being finalized.

void Goocanvas::Canvas::unregister_widget_item | ( | const Glib::RefPtr< Goocanvas::Widget >& | widget | ) |

This function should only be used by Goo::CanvasWidget and subclass implementations.

It unregisters a widget item from the canvas, when the item is no longer in the canvas.

Parameters

  widget | A Goo::CanvasWidget item.

void Goocanvas::Canvas::update | ( |  | ) |

This function is only intended to be used by subclasses of Goo::Canvas or Goo::CanvasItem implementations.

It updates any items that need updating.

If the bounds of items change, they will request a redraw of the old and new bounds so the display is updated correctly.

## Friends And Related Function Documentation

Goocanvas::Canvas* wrap | ( | GooCanvas * | object,
|  | bool | take_copy = `false`
| ) |  |

related

A Glib::wrap() method for this object.

Parameters

  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.

Returns
  A C++ instance that wraps this C instance.

The documentation for this class was generated from the following file:

- goocanvasmm/canvas.h