Class: Gnm::SheetObject
- Inherits:
-
Object
- Object
- Gnm::SheetObject
- Defined in:
- (unknown)
Direct Known Subclasses
CellCombo, Comment, FilterCombo, SOFilled, SOLine, SOPath, SOPolygon, SheetObjectComponent, SheetObjectGraph, SheetObjectImage, SheetObjectWidget
Class Method Summary collapse
-
.build_menu(view, actions, i) ⇒ Gtk::Widget
Builds the contextual menu for view.
-
.move_do(objects, anchors, objects_created) ⇒ GOffice::Undo
The newly allocated #GOUndo.
-
.move_undo(objects, objects_created) ⇒ GOffice::Undo
The newly allocated #GOUndo.
- .pts_to_anchor(anchor, sheet, res_pts) ⇒ nil
Instance Method Summary collapse
- #adjust_stacking(positions) ⇒ Integer
-
#anchor ⇒ Gnm::SheetObjectAnchor
The Sheet::ObjectAnchor for so.
- #anchor=(anchor) ⇒ nil
- #anchor_mode=(mode) ⇒ nil
- #can_edit ⇒ Boolean
- #can_print ⇒ Boolean
- #can_resize ⇒ Boolean
-
#clear_sheet ⇒ nil
Removes so from its container, unrealizes all views, disconnects the associated data and unrefs the object.
-
#component_get_component ⇒ GOffice::Component
The embedded #GOComponent or nil on error.
- #component_set_component(component) ⇒ nil
-
#default_size(w, h) ⇒ nil
Measurements are in pts.
-
#direction_set(coords) ⇒ nil
Sets the object direction from the given the new coordinates The original coordinates are assumed to be normalized (so that top is above bottom and right is at the right of left).
-
#draw_cairo(cr, rtl) ⇒ nil
Draw a sheet object using cairo.
- #draw_cairo_sized(cr, width, height) ⇒ nil
-
#dup ⇒ Gnm::SheetObject
to a sheet.
- #exportable_get_target_list ⇒ Gtk::TargetList
-
#foreach_dep(func, user) ⇒ nil
Loops over each dependent contained in a sheet object and call the handler.
- #get_editor(sc) ⇒ nil
-
#get_view(container) ⇒ Gnm::SheetObjectView
The found Sheet::ObjectView or nil.
-
#graph_ensure_size ⇒ nil
Updates the size of the graph item in the canvas for graph sheets objects.
-
#graph_get_gog ⇒ GOffice::GraphGraph
The embedded Gog::Graph or nil on error.
-
#graph_set_gog(graph) ⇒ nil
If graph is non-nil add a reference to it, otherwise create a new graph.
- #invalidate_sheet(sheet) ⇒ nil
-
#name ⇒ String
Name.
- #name=(name) ⇒ String
-
#new_view(container) ⇒ Gnm::SheetObjectView
Asks so to create a view for container.
-
#populate_menu(actions) ⇒ nil
Get a list of the actions that can be performed on so.
-
#position_pts_get(coords) ⇒ nil
Calculate the position of the object so in pts from the logical position in the object.
- #print_flag ⇒ Boolean
- #print_flag=(print) ⇒ nil
-
#range ⇒ Gnm::Range
The Gnm::Range used for so.
-
#rubber_band_directly ⇒ Boolean
an sheet.
-
#save_as_image(format, resolution, url) ⇒ nil
Saves a sheet object as an image to url.
-
#sheet ⇒ Gnm::Sheet
A small utility to help keep the implementation of SheetObjects modular.
-
#sheet=(sheet) ⇒ nil
Adds a reference to the object.
-
#stacking ⇒ Integer
so's position in the stack of sheet objects.
- #target_list ⇒ Gtk::TargetList
-
#update_bounds(p) ⇒ nil
update the bounds of an object that intersects the region whose top left is p.
-
#write_image(format, resolution, output) ⇒ nil
Saves a sheet object as an image to output.
- #write_object(format, output, err, convs) ⇒ nil
Class Method Details
.build_menu(view, actions, i) ⇒ Gtk::Widget
Builds the contextual menu for view.
.move_do(objects, anchors, objects_created) ⇒ GOffice::Undo
Returns the newly allocated #GOUndo.
.move_undo(objects, objects_created) ⇒ GOffice::Undo
Returns the newly allocated #GOUndo.
.pts_to_anchor(anchor, sheet, res_pts) ⇒ nil
Instance Method Details
#adjust_stacking(positions) ⇒ Integer
#anchor ⇒ Gnm::SheetObjectAnchor
Returns the Sheet::ObjectAnchor for so.
#anchor=(anchor) ⇒ nil
#anchor_mode=(mode) ⇒ nil
#can_edit ⇒ Boolean
#can_print ⇒ Boolean
#can_resize ⇒ Boolean
#clear_sheet ⇒ nil
Removes so from its container, unrealizes all views, disconnects the associated data and unrefs the object
#component_get_component ⇒ GOffice::Component
Returns the embedded #GOComponent or nil on error.
#component_set_component(component) ⇒ nil
#default_size(w, h) ⇒ nil
Measurements are in pts.
#direction_set(coords) ⇒ nil
Sets the object direction from the given the new coordinates The original coordinates are assumed to be normalized (so that top is above bottom and right is at the right of left)
#draw_cairo(cr, rtl) ⇒ nil
Draw a sheet object using cairo.
We are assuming that the cairo context is set up so that the top left of the bounds is (0,0). Note that this is the real top left cell, not necessarily the cell with to which we are anchored.
#draw_cairo_sized(cr, width, height) ⇒ nil
#dup ⇒ Gnm::SheetObject
to a sheet.
#exportable_get_target_list ⇒ Gtk::TargetList
#foreach_dep(func, user) ⇒ nil
Loops over each dependent contained in a sheet object and call the handler.
#get_editor(sc) ⇒ nil
#get_view(container) ⇒ Gnm::SheetObjectView
Returns the found Sheet::ObjectView or nil.
#graph_ensure_size ⇒ nil
Updates the size of the graph item in the canvas for graph sheets objects.
#graph_get_gog ⇒ GOffice::GraphGraph
Returns the embedded Gog::Graph or nil on error.
#graph_set_gog(graph) ⇒ nil
If graph is non-nil add a reference to it, otherwise create a new graph. Assign the graph to its SheetObjectGraph wrapper and initialize the handlers, disconnecting any existing connection for the preceding graph.
#invalidate_sheet(sheet) ⇒ nil
#name ⇒ String
Returns name.
#name=(name) ⇒ String
#new_view(container) ⇒ Gnm::SheetObjectView
Asks so to create a view for container.
#populate_menu(actions) ⇒ nil
Get a list of the actions that can be performed on so
#position_pts_get(coords) ⇒ nil
Calculate the position of the object so in pts from the logical position in the object.
#print_flag ⇒ Boolean
#print_flag=(print) ⇒ nil
#range ⇒ Gnm::Range
Returns the Gnm::Range used for so.
#rubber_band_directly ⇒ Boolean
an sheet. If false we draw a rectangle where the object is going to go
#save_as_image(format, resolution, url) ⇒ nil
Saves a sheet object as an image to url. If an error occurs, err will be set.
#sheet ⇒ Gnm::Sheet
A small utility to help keep the implementation of SheetObjects modular.
#sheet=(sheet) ⇒ nil
Adds a reference to the object.
#stacking ⇒ Integer
Returns so's position in the stack of sheet objects.
#target_list ⇒ Gtk::TargetList
#update_bounds(p) ⇒ nil
update the bounds of an object that intersects the region whose top left is p. This is used when an objects position is anchored to cols/rows and they change position.
#write_image(format, resolution, output) ⇒ nil
Saves a sheet object as an image to output. If an error occurs, err will be set.