Class: GOffice::Canvas
- Inherits:
-
Gtk::Layout
- Object
- Gtk::Layout
- GOffice::Canvas
- Defined in:
- (unknown)
Instance Method Summary collapse
-
#c2w(x, y, x_, y_) ⇒ nil
Retrieves the position in the widget given the canvas coordinates.
-
#cur_event ⇒ Gdk::Event
The Gdk::Event being processed.
-
#direction ⇒ GOffice::CanvasDirection
The current canvas direction.
-
#direction=(direction) ⇒ nil
Sets the direction used by the canvas.
-
#document ⇒ GOffice::Doc
The #GODoc associated with the Goc::Canvas.
-
#document=(document) ⇒ nil
Associates the #GODoc with the Goc::Canvas.
- #get_bounds(x0, y0, x1, y1) ⇒ nil
-
#get_item_at(x, y) ⇒ GOffice::CanvasItem
The Goc::Item displayed at (x,y) if any.
-
#get_scroll_position(x, y) ⇒ nil
Retrieves the origin of the visible region of the canvas.
-
#grab_item(item) ⇒ nil
Grabs Goc::Item.
-
#grabbed_item ⇒ GOffice::CanvasItem
The currently grabbed Goc::Item.
-
#height ⇒ Integer
Height.
- #height=(height) ⇒ Integer
-
#invalidate(x0, y0, x1, y1) ⇒ nil
Invalidates a region of the canvas.
-
#invalidate_region(item, region) ⇒ nil
Invalidates a region of the canvas.
-
#pixels_per_unit ⇒ Float
How many pixels are used for each unit when displaying the canvas.
-
#pixels_per_unit=(pixels_per_unit) ⇒ nil
Sets the scale as the number of pixels used for each unit when displaying the canvas.
-
#realized ⇒ Boolean
True if the canvas has been realized as a Gtk::Widget.
- #render(cr, x0, y0, x1, y1) ⇒ nil
-
#root ⇒ GOffice::CanvasGroup
The top level item of canvas, always a Goc::Group.
-
#scroll_to(x, y) ⇒ nil
Scrolls the canvas so that the origin of the visible region is at (x,y).
-
#ungrab_item ⇒ nil
Ungrabs the currently grabbed Goc::Item.
-
#w2c(x, y, x_, y_) ⇒ nil
Retrieves the canvas coordinates given the position in the widget.
-
#width ⇒ Integer
Width.
- #width=(width) ⇒ Integer
Instance Method Details
#c2w(x, y, x_, y_) ⇒ nil
Retrieves the position in the widget given the canvas coordinates.
#cur_event ⇒ Gdk::Event
Returns The Gdk::Event being processed.
#direction ⇒ GOffice::CanvasDirection
Returns the current canvas direction.
#direction=(direction) ⇒ nil
Sets the direction used by the canvas.
#document ⇒ GOffice::Doc
Returns The #GODoc associated with the Goc::Canvas.
#document=(document) ⇒ nil
Associates the #GODoc with the Goc::Canvas. This is needed to use images when filling styled items (see Goc::StyledItem).
#get_bounds(x0, y0, x1, y1) ⇒ nil
#get_item_at(x, y) ⇒ GOffice::CanvasItem
Returns the Goc::Item displayed at (x,y) if any.
#get_scroll_position(x, y) ⇒ nil
Retrieves the origin of the visible region of the canvas.
#grab_item(item) ⇒ nil
Grabs Goc::Item. All subsequent events will be passed to #GocItem. This function fails if an item is already grabbed.
#grabbed_item ⇒ GOffice::CanvasItem
Returns The currently grabbed Goc::Item.
#height ⇒ Integer
Returns height.
#height=(height) ⇒ Integer
#invalidate(x0, y0, x1, y1) ⇒ nil
Invalidates a region of the canvas. The canvas will be redrawn only if the invalidated region intersects the visible area.
#invalidate_region(item, region) ⇒ nil
Invalidates a region of the canvas. Only item will be redrawn if the next draw event is called with a cairo contest clipped to region. Used in gnumeric for the walking ants cursor.
#pixels_per_unit ⇒ Float
Returns how many pixels are used for each unit when displaying the canvas.
#pixels_per_unit=(pixels_per_unit) ⇒ nil
Sets the scale as the number of pixels used for each unit when displaying the canvas.
#realized ⇒ Boolean
Returns true if the canvas has been realized as a Gtk::Widget.
#render(cr, x0, y0, x1, y1) ⇒ nil
#root ⇒ GOffice::CanvasGroup
Returns the top level item of canvas, always a Goc::Group.
#scroll_to(x, y) ⇒ nil
Scrolls the canvas so that the origin of the visible region is at (x,y). The origin position depends on the canvas direction (see Goc::Direction).
#ungrab_item ⇒ nil
Ungrabs the currently grabbed Goc::Item. This function fails if no item is grabbed.
#w2c(x, y, x_, y_) ⇒ nil
Retrieves the canvas coordinates given the position in the widget.
#width ⇒ Integer
Returns width.