Class: Gnm::Pane

Inherits:
SimpleCanvas show all
Defined in:
(unknown)

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from SimpleCanvas

grab, ungrab

Constructor Details

#initialize(scg, col_headers, row_headers, index) ⇒ Gnm::Pane

Parameters:

Class Method Details

.object_register(so, view, selectable) ⇒ Gnm::SheetObjectView

Setup some standard callbacks for manipulating a view of a sheet object.

Parameters:

  • so (Gnm::SheetObject)

    A sheet object

  • view (GOffice::CanvasItem)

    A canvas item acting as a view for so

  • selectable (Boolean)

    Add handlers for selecting and editing the object

Returns:

.widget_register(so, w, view) ⇒ nil

Setup some standard callbacks for manipulating widgets as views of sheet objects.

Parameters:

  • so (Gnm::SheetObject)

    A sheet object

  • w (Gtk::Widget)

    The widget for the sheet object view

  • view (GOffice::CanvasItem)

    A canvas item acting as a view for so

Returns:

  • (nil)

Instance Method Details

#bound_set(start_col, start_row, end_col, end_row) ⇒ nil

Parameters:

  • start_col (Integer)
  • start_row (Integer)
  • end_col (Integer)
  • end_row (Integer)

Returns:

  • (nil)

#compute_visible_region(full_recompute) ⇒ nil

Parameters:

  • full_recompute (Boolean)

Returns:

  • (nil)

#cursor_bound_set(r) ⇒ Boolean

Parameters:

  • r (Gnm::Range)

Returns:

  • (Boolean)

#direction=(direction) ⇒ nil

Parameters:

  • direction (GOffice::CanvasDirection)

Returns:

  • (nil)

#display_object_menu(so, event) ⇒ nil

Parameters:

Returns:

  • (nil)

#edit_startnil

Returns:

  • (nil)

#edit_stopnil

Returns:

  • (nil)

#expr_cursor_bound_set(r, color) ⇒ nil

Parameters:

  • r (Gnm::Range)
  • color (GOffice::Color)

Returns:

  • (nil)

#expr_cursor_stopnil

Returns:

  • (nil)

#find_col(x, col_origin) ⇒ Integer

Returns the column containing canvas coord x

Parameters:

  • x (Integer)

    In canvas coords

  • col_origin (Integer)

    optionally return the canvas coord of the col

Returns:

  • (Integer)

#find_row(y, row_origin) ⇒ Integer

Returns the column containing canvas coord y

Parameters:

  • y (Integer)

    In canvas coords

  • row_origin (Integer)

    optionally return the canvas coord of the row

Returns:

  • (Integer)

#handle_motion(canvas, x, y, slide_flags, handler, user_data) ⇒ Boolean

Handle a motion event from a canvas and scroll the pane depending on how far outside the bounds of pane the event is. Usually canvas == pane however as long as the canvases share a basis space they can be different.

Parameters:

  • canvas (GOffice::Canvas)

    The Canvas the event comes from

  • x (Integer)
  • y (Integer)
  • slide_flags (Gnm::PaneSlideFlags)
  • handler (Gnm::PaneSlideHandler)

    The handler when sliding

  • user_data (GObject)

    closure data

Returns:

  • (Boolean)

#mouse_cursor_set(c) ⇒ nil

Parameters:

  • c (Gdk::Cursor)

Returns:

  • (nil)

#object_autoscroll(context, x, y, time) ⇒ nil

Parameters:

  • context (Gdk::DragContext)
  • x (Integer)
  • y (Integer)
  • time (Integer)

Returns:

  • (nil)

#object_groupGOffice::CanvasGroup

instances in pane.

Returns:

  • (GOffice::CanvasGroup)

    the Goc::Group including all #SheetObjectView

#object_start_resize(button, x, y, so, drag_type, is_creation) ⇒ nil

Parameters:

  • button (Integer)
  • x (Integer)
  • y (Integer)
  • so (Gnm::SheetObject)
  • drag_type (Integer)
  • is_creation (Boolean)

Returns:

  • (nil)

#object_unselect(so) ⇒ nil

Parameters:

Returns:

  • (nil)

#object_update_bbox(so) ⇒ nil

Updates the position and potentially creates control points for manipulating the size/position of so.

Parameters:

Returns:

  • (nil)

#objects_drag(so, new_x, new_y, drag_type, symmetric, snap_to_grid) ⇒ nil

Parameters:

  • so (Gnm::SheetObject)
  • new_x (Float)
  • new_y (Float)
  • drag_type (Integer)
  • symmetric (Boolean)
  • snap_to_grid (Boolean)

Returns:

  • (nil)

#rangesel_bound_set(r) ⇒ Boolean

Parameters:

  • r (Gnm::Range)

Returns:

  • (Boolean)

#rangesel_start(r) ⇒ nil

Parameters:

  • r (Gnm::Range)

Returns:

  • (nil)

#rangesel_stopnil

Returns:

  • (nil)

#redraw_range(r) ⇒ nil

Parameters:

  • r (Gnm::Range)

Returns:

  • (nil)

#reposition_cursorsnil

Returns:

  • (nil)

#size_guide_motion(vert, guide_pos) ⇒ nil

Moves the guide line to guide_pos. NOTE : gnm_pane_size_guide_start must be called before any calls to gnm_pane_size_guide_motion

Parameters:

  • vert (Boolean)

    true for a vertical guide, false for horizontal

  • guide_pos (Integer)

    in unscaled sheet pixel coords

Returns:

  • (nil)

#size_guide_start(vert, colrow, is_colrow_resize) ⇒ nil

Parameters:

  • vert (Boolean)
  • colrow (Integer)
  • is_colrow_resize (Boolean)

Returns:

  • (nil)

#size_guide_stopnil

Returns:

  • (nil)

#slide_initnil

Returns:

  • (nil)

#slide_stopnil

Returns:

  • (nil)

#special_cursor_bound_set(r) ⇒ Boolean

Parameters:

  • r (Gnm::Range)

Returns:

  • (Boolean)

#special_cursor_start(style, button) ⇒ nil

Parameters:

  • style (Integer)
  • button (Integer)

Returns:

  • (nil)

#special_cursor_stopnil

Returns:

  • (nil)