Class: Gnm::SheetObject

Inherits:
Object
  • Object
show all
Defined in:
(unknown)

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.build_menu(view, actions, i) ⇒ Gtk::Widget

Builds the contextual menu for view.

Parameters:

  • view (Gnm::SheetObjectView)

    Sheet::ObjectView

  • actions (Array<Gnm::SheetObjectAction>)

    array of actions.

  • i (Integer)

    index of first action to add in the array.

Returns:

  • (Gtk::Widget)

    the newly constructed Gtk::Menu.

.move_do(objects, anchors, objects_created) ⇒ GOffice::Undo

Returns the newly allocated #GOUndo.

Parameters:

  • objects (GLib::SList<Gnm::SheetObject>)
  • anchors (GLib::SList<Gnm::SheetObjectAnchor>)
  • objects_created (Boolean)

Returns:

  • (GOffice::Undo)

    the newly allocated #GOUndo.

.move_undo(objects, objects_created) ⇒ GOffice::Undo

Returns the newly allocated #GOUndo.

Parameters:

Returns:

  • (GOffice::Undo)

    the newly allocated #GOUndo.

.pts_to_anchor(anchor, sheet, res_pts) ⇒ nil

Parameters:

  • anchor (Gnm::SheetObjectAnchor)
  • sheet (Gnm::Sheet)
  • res_pts (Float)

Returns:

  • (nil)

Instance Method Details

#adjust_stacking(positions) ⇒ Integer

Parameters:

  • positions (Integer)

Returns:

  • (Integer)

#anchorGnm::SheetObjectAnchor

Returns the Sheet::ObjectAnchor for so.

Returns:

  • (Gnm::SheetObjectAnchor)

    the Sheet::ObjectAnchor for so.

#anchor=(anchor) ⇒ nil

Parameters:

  • anchor (Gnm::SheetObjectAnchor)

Returns:

  • (nil)

#anchor_mode=(mode) ⇒ nil

Parameters:

Returns:

  • (nil)

#can_editBoolean

Returns:

  • (Boolean)

#can_printBoolean

Returns:

  • (Boolean)

#can_resizeBoolean

Returns:

  • (Boolean)

#clear_sheetnil

Removes so from its container, unrealizes all views, disconnects the associated data and unrefs the object

Returns:

  • (nil)

#component_get_componentGOffice::Component

Returns the embedded #GOComponent or nil on error.

Returns:

  • (GOffice::Component)

    the embedded #GOComponent or nil on error.

#component_set_component(component) ⇒ nil

Parameters:

  • component (GOffice::Component)

Returns:

  • (nil)

#default_size(w, h) ⇒ nil

Measurements are in pts.

Parameters:

  • w (Float)

    a ptr into which to store the default_width.

  • h (Float)

    a ptr into which to store the default_height.

Returns:

  • (nil)

#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)

Parameters:

  • coords (Array<Float>)

    array of coordinates in L,T,R,B order

Returns:

  • (nil)

#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.

Parameters:

  • cr (cairo::Context)
  • rtl (Boolean)

Returns:

  • (nil)

#draw_cairo_sized(cr, width, height) ⇒ nil

Parameters:

  • cr (cairo::Context)
  • width (Float)
  • height (Float)

Returns:

  • (nil)

#dupGnm::SheetObject

to a sheet.

Returns:

#exportable_get_target_listGtk::TargetList

Returns:

  • (Gtk::TargetList)

#foreach_dep(func, user) ⇒ nil

Loops over each dependent contained in a sheet object and call the handler.

Parameters:

  • func (Gnm::SheetObjectForeachDepFunc)

    Sheet::ObjectForeachDepFunc

  • user (GObject)

    user data

Returns:

  • (nil)

#get_editor(sc) ⇒ nil

Parameters:

Returns:

  • (nil)

#get_view(container) ⇒ Gnm::SheetObjectView

Returns the found Sheet::ObjectView or nil.

Parameters:

Returns:

#graph_ensure_sizenil

Updates the size of the graph item in the canvas for graph sheets objects.

Returns:

  • (nil)

#graph_get_gogGOffice::GraphGraph

Returns the embedded Gog::Graph or nil on error.

Returns:

  • (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. Assign the graph to its SheetObjectGraph wrapper and initialize the handlers, disconnecting any existing connection for the preceding graph.

Parameters:

  • graph (GOffice::GraphGraph)

    Gog::Graph

Returns:

  • (nil)

#invalidate_sheet(sheet) ⇒ nil

Parameters:

Returns:

  • (nil)

#nameString

Returns name.

Returns:

  • (String)

    name

#name=(name) ⇒ String

Parameters:

  • name (String)

Returns:

  • (String)

    name

  • (String)

    name

#new_view(container) ⇒ Gnm::SheetObjectView

Asks so to create a view for container.

Parameters:

Returns:

#populate_menu(actions) ⇒ nil

Get a list of the actions that can be performed on so

Parameters:

  • actions (Array<Gnm::SheetObjectAction>)

    GPtr::Array

Returns:

  • (nil)

#position_pts_get(coords) ⇒ nil

Calculate the position of the object so in pts from the logical position in the object.

Parameters:

  • coords (Array<Float>)

    coordinates

Returns:

  • (nil)

Returns:

  • (Boolean)

Parameters:

  • print (Boolean)

Returns:

  • (nil)

#rangeGnm::Range

Returns the Gnm::Range used for so.

Returns:

  • (Gnm::Range)

    the Gnm::Range used for so.

#rubber_band_directlyBoolean

an sheet. If false we draw a rectangle where the object is going to go

Returns:

  • (Boolean)

    true if we should draw the object as we are laying it out on

#save_as_image(format, resolution, url) ⇒ nil

Saves a sheet object as an image to url. If an error occurs, err will be set.

Parameters:

  • format (String)

    image format to use

  • resolution (Float)

    export resolution

  • url (String)

    destination url

Returns:

  • (nil)

#sheetGnm::Sheet

A small utility to help keep the implementation of SheetObjects modular.

Returns:

#sheet=(sheet) ⇒ nil

Adds a reference to the object.

Parameters:

Returns:

  • (nil)

#stackingInteger

Returns so's position in the stack of sheet objects.

Returns:

  • (Integer)

    so's position in the stack of sheet objects.

#target_listGtk::TargetList

Returns:

  • (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.

Parameters:

  • p (Gnm::CellPos)

    A position marking the top left of the region needing relocation (default == A1)

Returns:

  • (nil)

#write_image(format, resolution, output) ⇒ nil

Saves a sheet object as an image to output. If an error occurs, err will be set.

Parameters:

  • format (String)

    image format to use

  • resolution (Float)

    export resolution

  • output (Gsf::Output)

    destination

Returns:

  • (nil)

#write_object(format, output, err, convs) ⇒ nil

Parameters:

  • format (String)
  • output (Gsf::Output)
  • err (GLib::Error)
  • convs (Gnm::Conventions)

Returns:

  • (nil)