goocanvas Reference Manual

Synopsis

public class Canvas : Container, Implementor, Buildable  {
    public    weak CanvasItemModel      root_item_model ;
    public    weak CanvasItem           root_item ;
    public    weak CanvasBounds         bounds ;
    public    uint                      idle_id ;
    public    uint                      need_update ;
    public    uint                      need_entire_subtree_update ;
    public    weak CanvasItem           pointer_item ;
    public    weak CanvasItem           pointer_grab_item ;
    public    weak CanvasItem           pointer_grab_initial_item ;
    public    uint                      pointer_grab_button ;
    public    weak CanvasItem           focused_item ;
    public    weak CanvasItem           keyboard_grab_item ;
    public    weak Gdk.EventCrossing    crossing_event ;
    public    weak Gdk.Window           canvas_window ;
    public    int                       canvas_x_offset ;
    public    int                       canvas_y_offset ;
    public    weak Gtk.Adjustment       hadjustment ;
    public    weak Gtk.Adjustment       vadjustment ;
    public    int                       freeze_count ;
    public    weak Gdk.Window           tmp_window ;
    public    weak GLib.HashTable       model_to_item ;
    public    double                    device_to_pixels_x ;
    public    double                    device_to_pixels_y ;
    public    weak GLib.List            widget_items ;


    public    weak Gtk.AnchorType       anchor                    { get; set; } ;
    public    weak bool                 automatic_bounds          { get; set; } ;
    public    weak string               background_color          { set; } ;
    public    weak uint                 background_color_rgb      { set; } ;
    public    weak bool                 bounds_from_origin        { get; set; } ;
    public    weak double               bounds_padding            { get; set; } ;
    public    weak bool                 integer_layout            { get; set; } ;
    public    weak double               resolution_x              { get; set; } ;
    public    weak double               resolution_y              { get; set; } ;
    public    weak double               scale                     { get; set; } ;
    public    weak double               scale_x                   { get; set; } ;
    public    weak double               scale_y                   { get; set; } ;
    public    weak Gtk.Unit             units                     { get; set; } ;
    public    weak double               x1                        { get; set; } ;
    public    weak double               x2                        { get; set; } ;
    public    weak double               y1                        { get; set; } ;
    public    weak double               y2                        { get; set; } ;


    public                              Canvas                    (  ) ;


    public    signal void               item_created              ( CanvasItem          item,
                                                                    CanvasItemModel     model )  ;
    public    signal void               set_scroll_adjustments    ( Gtk.Adjustment      hadjustment,
                                                                    Gtk.Adjustment      vadjustment )  ;


    public    void                      convert_from_item_space   ( CanvasItem          item,
                                                                    double              x,
                                                                    double              y ) ;
    public    void                      convert_from_pixels       ( double              x,
                                                                    double              y ) ;
    public    void                      convert_to_item_space     ( CanvasItem          item,
                                                                    double              x,
                                                                    double              y ) ;
    public    void                      convert_to_pixels         ( double              x,
                                                                    double              y ) ;
    public    weak Cairo.Context        create_cairo_context      (  ) ;
    public    static void               create_path               ( GLib.Array          commands,
                                                                    Cairo.Context       cr ) ;
    public    void                      get_bounds                ( double              left,
                                                                    double              top,
                                                                    double              right,
                                                                    double              bottom ) ;
    public    double                    get_default_line_width    (  ) ;
    public    weak CanvasItem           get_item                  ( CanvasItemModel     model ) ;
    public    weak CanvasItem           get_item_at               ( double              x,
                                                                    double              y,
                                                                    bool                is_pointer_event ) ;
    public    weak GLib.List            get_items_at              ( double              x,
                                                                    double              y,
                                                                    bool                is_pointer_event ) ;
    public    weak GLib.List            get_items_in_area         ( CanvasBounds        area,
                                                                    bool                inside_area,
                                                                    bool                allow_overlaps,
                                                                    bool                include_containers ) ;
    public    weak CanvasItem           get_root_item             (  ) ;
    public    weak CanvasItemModel      get_root_item_model       (  ) ;
    public    double                    get_scale                 (  ) ;
    public    void                      grab_focus                ( CanvasItem          item ) ;
    public    Gdk.GrabStatus            keyboard_grab             ( CanvasItem          item,
                                                                    bool                owner_events,
                                                                    uint                time ) ;
    public    void                      keyboard_ungrab           ( CanvasItem          item,
                                                                    uint                time ) ;
    public    static void               marshal_BOOLEAN__BOXED    ( GLib.Closure        closure,
                                                                    GLib.Value          return_value,
                                                                    uint                n_param_values,
                                                                    GLib.Value          param_values,
                                                                    void**              invocation_hint,
                                                                    void**              marshal_data ) ;
    public    static void               marshal_BOOLEAN__OBJECT_BOXED ( GLib.Closure        closure,
                                                                    GLib.Value          return_value,
                                                                    uint                n_param_values,
                                                                    GLib.Value          param_values,
                                                                    void**              invocation_hint,
                                                                    void**              marshal_data ) ;
    public    static void               marshal_VOID__INT_INT     ( GLib.Closure        closure,
                                                                    GLib.Value          return_value,
                                                                    uint                n_param_values,
                                                                    GLib.Value          param_values,
                                                                    void**              invocation_hint,
                                                                    void**              marshal_data ) ;
    public    static void               marshal_VOID__OBJECT_OBJECT ( GLib.Closure        closure,
                                                                    GLib.Value          return_value,
                                                                    uint                n_param_values,
                                                                    GLib.Value          param_values,
                                                                    void**              invocation_hint,
                                                                    void**              marshal_data ) ;
    public    static weak GLib.Array    parse_path_data           ( string              path_data ) ;
    public    Gdk.GrabStatus            pointer_grab              ( CanvasItem          item,
                                                                    Gdk.EventMask       event_mask,
                                                                    Gdk.Cursor          cursor,
                                                                    uint                time ) ;
    public    void                      pointer_ungrab            ( CanvasItem          item,
                                                                    uint                time ) ;
    public    void                      register_widget_item      ( CanvasWidget        witem ) ;
    public    void                      render                    ( Cairo.Context       cr,
                                                                    CanvasBounds        bounds,
                                                                    double              scale ) ;
    public    void                      request_redraw            ( CanvasBounds        bounds ) ;
    public    void                      request_update            (  ) ;
    public    void                      scroll_to                 ( double              left,
                                                                    double              top ) ;
    public    void                      set_bounds                ( double              left,
                                                                    double              top,
                                                                    double              right,
                                                                    double              bottom ) ;
    public    void                      set_root_item             ( CanvasItem          item ) ;
    public    void                      set_root_item_model       ( CanvasItemModel     model ) ;
    public    void                      set_scale                 ( double              scale ) ;
    public    void                      unregister_item           ( CanvasItemModel     model ) ;
    public    void                      unregister_widget_item    ( CanvasWidget        witem ) ;
    public    void                      update                    (  ) ;
    public    virtual weak CanvasItem   create_item               ( CanvasItemModel     model ) ;
}

Canvas Description

Details

Constructor Details

Canvas ()
    public                              Canvas                    (  ) ;		

Field Details

root_item_model
    public    weak CanvasItemModel      root_item_model ;		

root_item
    public    weak CanvasItem           root_item ;		

bounds
    public    weak CanvasBounds         bounds ;		

idle_id
    public    uint                      idle_id ;		

need_update
    public    uint                      need_update ;		

need_entire_subtree_update
    public    uint                      need_entire_subtree_update ;		

pointer_item
    public    weak CanvasItem           pointer_item ;		

pointer_grab_item
    public    weak CanvasItem           pointer_grab_item ;		

pointer_grab_initial_item
    public    weak CanvasItem           pointer_grab_initial_item ;		

pointer_grab_button
    public    uint                      pointer_grab_button ;		

focused_item
    public    weak CanvasItem           focused_item ;		

keyboard_grab_item
    public    weak CanvasItem           keyboard_grab_item ;		

crossing_event
    public    weak Gdk.EventCrossing    crossing_event ;		

canvas_window
    public    weak Gdk.Window           canvas_window ;		

canvas_x_offset
    public    int                       canvas_x_offset ;		

canvas_y_offset
    public    int                       canvas_y_offset ;		

hadjustment
    public    weak Gtk.Adjustment       hadjustment ;		

vadjustment
    public    weak Gtk.Adjustment       vadjustment ;		

freeze_count
    public    int                       freeze_count ;		

tmp_window
    public    weak Gdk.Window           tmp_window ;		

model_to_item
    public    weak GLib.HashTable       model_to_item ;		

device_to_pixels_x
    public    double                    device_to_pixels_x ;		

device_to_pixels_y
    public    double                    device_to_pixels_y ;		

widget_items
    public    weak GLib.List            widget_items ;		

Signal Details

item_created
    public    signal void               item_created              ( CanvasItem          item,
                                                                    CanvasItemModel     model )  ;		

set_scroll_adjustments
    public    signal void               set_scroll_adjustments    ( Gtk.Adjustment      hadjustment,
                                                                    Gtk.Adjustment      vadjustment )  ;		

Property Details

anchor
    public    weak Gtk.AnchorType       anchor                    { get; set; } ;		

automatic_bounds
    public    weak bool                 automatic_bounds          { get; set; } ;		

background_color
    public    weak string               background_color          { set; } ;		

background_color_rgb
    public    weak uint                 background_color_rgb      { set; } ;		

bounds_from_origin
    public    weak bool                 bounds_from_origin        { get; set; } ;		

bounds_padding
    public    weak double               bounds_padding            { get; set; } ;		

integer_layout
    public    weak bool                 integer_layout            { get; set; } ;		

resolution_x
    public    weak double               resolution_x              { get; set; } ;		

resolution_y
    public    weak double               resolution_y              { get; set; } ;		

scale
    public    weak double               scale                     { get; set; } ;		

scale_x
    public    weak double               scale_x                   { get; set; } ;		

scale_y
    public    weak double               scale_y                   { get; set; } ;		

units
    public    weak Gtk.Unit             units                     { get; set; } ;		

x1
    public    weak double               x1                        { get; set; } ;		

x2
    public    weak double               x2                        { get; set; } ;		

y1
    public    weak double               y1                        { get; set; } ;		

y2
    public    weak double               y2                        { get; set; } ;		

Method Details

convert_from_item_space ()
    public    void                      convert_from_item_space   ( CanvasItem          item,
                                                                    double              x,
                                                                    double              y ) ;		

convert_from_pixels ()
    public    void                      convert_from_pixels       ( double              x,
                                                                    double              y ) ;		

convert_to_item_space ()
    public    void                      convert_to_item_space     ( CanvasItem          item,
                                                                    double              x,
                                                                    double              y ) ;		

convert_to_pixels ()
    public    void                      convert_to_pixels         ( double              x,
                                                                    double              y ) ;		

create_cairo_context ()
    public    weak Cairo.Context        create_cairo_context      (  ) ;		

create_path ()
    public    static void               create_path               ( GLib.Array          commands,
                                                                    Cairo.Context       cr ) ;		

get_bounds ()
    public    void                      get_bounds                ( double              left,
                                                                    double              top,
                                                                    double              right,
                                                                    double              bottom ) ;		

get_default_line_width ()
    public    double                    get_default_line_width    (  ) ;		

get_item ()
    public    weak CanvasItem           get_item                  ( CanvasItemModel     model ) ;		

get_item_at ()
    public    weak CanvasItem           get_item_at               ( double              x,
                                                                    double              y,
                                                                    bool                is_pointer_event ) ;		

get_items_at ()
    public    weak GLib.List            get_items_at              ( double              x,
                                                                    double              y,
                                                                    bool                is_pointer_event ) ;		

get_items_in_area ()
    public    weak GLib.List            get_items_in_area         ( CanvasBounds        area,
                                                                    bool                inside_area,
                                                                    bool                allow_overlaps,
                                                                    bool                include_containers ) ;		

get_root_item ()
    public    weak CanvasItem           get_root_item             (  ) ;		

get_root_item_model ()
    public    weak CanvasItemModel      get_root_item_model       (  ) ;		

get_scale ()
    public    double                    get_scale                 (  ) ;		

grab_focus ()
    public    void                      grab_focus                ( CanvasItem          item ) ;		

keyboard_grab ()
    public    Gdk.GrabStatus            keyboard_grab             ( CanvasItem          item,
                                                                    bool                owner_events,
                                                                    uint                time ) ;		

keyboard_ungrab ()
    public    void                      keyboard_ungrab           ( CanvasItem          item,
                                                                    uint                time ) ;		

marshal_BOOLEAN__BOXED ()
    public    static void               marshal_BOOLEAN__BOXED    ( GLib.Closure        closure,
                                                                    GLib.Value          return_value,
                                                                    uint                n_param_values,
                                                                    GLib.Value          param_values,
                                                                    void**              invocation_hint,
                                                                    void**              marshal_data ) ;		

marshal_BOOLEAN__OBJECT_BOXED ()
    public    static void               marshal_BOOLEAN__OBJECT_BOXED ( GLib.Closure        closure,
                                                                    GLib.Value          return_value,
                                                                    uint                n_param_values,
                                                                    GLib.Value          param_values,
                                                                    void**              invocation_hint,
                                                                    void**              marshal_data ) ;		

marshal_VOID__INT_INT ()
    public    static void               marshal_VOID__INT_INT     ( GLib.Closure        closure,
                                                                    GLib.Value          return_value,
                                                                    uint                n_param_values,
                                                                    GLib.Value          param_values,
                                                                    void**              invocation_hint,
                                                                    void**              marshal_data ) ;		

marshal_VOID__OBJECT_OBJECT ()
    public    static void               marshal_VOID__OBJECT_OBJECT ( GLib.Closure        closure,
                                                                    GLib.Value          return_value,
                                                                    uint                n_param_values,
                                                                    GLib.Value          param_values,
                                                                    void**              invocation_hint,
                                                                    void**              marshal_data ) ;		

parse_path_data ()
    public    static weak GLib.Array    parse_path_data           ( string              path_data ) ;		

pointer_grab ()
    public    Gdk.GrabStatus            pointer_grab              ( CanvasItem          item,
                                                                    Gdk.EventMask       event_mask,
                                                                    Gdk.Cursor          cursor,
                                                                    uint                time ) ;		

pointer_ungrab ()
    public    void                      pointer_ungrab            ( CanvasItem          item,
                                                                    uint                time ) ;		

register_widget_item ()
    public    void                      register_widget_item      ( CanvasWidget        witem ) ;		

render ()
    public    void                      render                    ( Cairo.Context       cr,
                                                                    CanvasBounds        bounds,
                                                                    double              scale ) ;		

request_redraw ()
    public    void                      request_redraw            ( CanvasBounds        bounds ) ;		

request_update ()
    public    void                      request_update            (  ) ;		

scroll_to ()
    public    void                      scroll_to                 ( double              left,
                                                                    double              top ) ;		

set_bounds ()
    public    void                      set_bounds                ( double              left,
                                                                    double              top,
                                                                    double              right,
                                                                    double              bottom ) ;		

set_root_item ()
    public    void                      set_root_item             ( CanvasItem          item ) ;		

set_root_item_model ()
    public    void                      set_root_item_model       ( CanvasItemModel     model ) ;		

set_scale ()
    public    void                      set_scale                 ( double              scale ) ;		

unregister_item ()
    public    void                      unregister_item           ( CanvasItemModel     model ) ;		

unregister_widget_item ()
    public    void                      unregister_widget_item    ( CanvasWidget        witem ) ;		

update ()
    public    void                      update                    (  ) ;		

create_item ()
    public    virtual weak CanvasItem   create_item               ( CanvasItemModel     model ) ;		


Created by Valadoc