Class: GOffice::GraphView

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

Direct Known Subclasses

Graph3DBoxView, GraphOutlinedView, GraphPlotView

Instance Method Summary collapse

Instance Method Details

#find_child_view(target_model) ⇒ GOffice::GraphView

Find the GogView contained in container that corresponds to model.

Parameters:

Returns:

#get_natural_size(requisition) ⇒ nil

Parameters:

  • requisition (GOffice::GraphViewRequisition)

Returns:

  • (nil)

#get_tip_at_point(x, y) ⇒ String

Gets a tip string related to the position as defined by (x,y) in view. that or nil.

Parameters:

  • x (Float)

    x position

  • y (Float)

    y position

Returns:

  • (String)

    the newly allocated tip string if the view class supports

#get_tool_at_point(x, y, gobj) ⇒ GOffice::GraphTool

Returns tool under cursor for a given view, or nil.

Parameters:

  • x (Float)

    in coords

  • y (Float)

    in coords

  • gobj (GOffice::GraphObject)

    pointed object or nil

Returns:

  • (GOffice::GraphTool)

    tool under cursor for a given view, or nil

#get_view_at_point(x, y, obj, tool) ⇒ GOffice::GraphView

Gets view under cursor, searching recursively from view. Corresponding object is stored in obj. This object may or may not be view->model of pointed view. This function also stores tool under cursor, for the pointed view.

Parameters:

  • x (Float)

    cursor x position

  • y (Float)

    cursor y position

  • obj (GOffice::GraphObject)

    pointed object or nil

  • tool (GOffice::GraphTool)

    pointed tool or nil

Returns:

#modelGOffice::GraphObject

Returns the Gog::Object owning the view.

Returns:

#model=(model) ⇒ GOffice::GraphObject

Returns model.

Parameters:

Returns:

#padding_request(bbox, padding) ⇒ nil

Parameters:

  • bbox (GOffice::GraphViewAllocation)
  • padding (GOffice::GraphViewPadding)

Returns:

  • (nil)

#parent=(parent) ⇒ GOffice::GraphView

Returns parent.

Parameters:

Returns:

#queue_redrawnil

Requests a redraw for the entire graph.

Returns:

  • (nil)

#queue_resizenil

Flags a view to have its size renegotiated; should be called when a model for some reason has a new size request. For example, when you change the size of a legend.

Returns:

  • (nil)

#render(bbox) ⇒ nil

Parameters:

  • bbox (GOffice::GraphViewAllocation)

Returns:

  • (nil)

#render_toolkitnil

Render toolkit elements.

Returns:

  • (nil)

#size_allocate(allocation) ⇒ nil

Assign a size and position to a GogView. Primarilly used by containers.

Parameters:

  • allocation (GOffice::GraphViewAllocation)

    position and size to be allocated to view

Returns:

  • (nil)

#size_child_request(available, req, min_req) ⇒ nil

Computes additional requision in req which must be added to parent requisition, and minimum requisition in min_req which is minimum space for displaying all children.

Parameters:

  • available (GOffice::GraphViewRequisition)

    the amount of space available in total

  • req (GOffice::GraphViewRequisition)

    additionnal requisition

  • min_req (GOffice::GraphViewRequisition)

    minimum size for displaying all children

Returns:

  • (nil)

#size_request(available, requisition) ⇒ nil

Determines the desired size of a view.

Note, that the virtual method deviates slightly from this function. This function will zero requisition before calling the virtual method.

Remember that the size request is not necessarily the size a view will actually be allocated.

Parameters:

  • available (GOffice::GraphViewRequisition)

    available space.

  • requisition (GOffice::GraphViewRequisition)

    a Gog::ViewRequisition.

Returns:

  • (nil)

#toolkitGLib::SList<GOffice::GraphTool>

Returns toolkit associated with given view.

Returns:

  • (GLib::SList<GOffice::GraphTool>)

    toolkit associated with given view.

#update_sizesBoolean

Returns true if a redraw is necessary.

Returns:

  • (Boolean)

    true if a redraw is necessary.