GOffice.GraphView

g GObject.Object GObject.Object GOffice.GraphView GOffice.GraphView GObject.Object->GOffice.GraphView

Subclasses:

GOffice.Graph3DBoxView, GOffice.GraphOutlinedView, GOffice.GraphPlotView

Methods

Inherited:

GObject.Object (37)

Structs:

GObject.ObjectClass (5)

find_child_view (target_model)

get_model ()

get_natural_size (requisition)

get_tip_at_point (x, y)

get_tool_at_point (x, y, gobj)

get_toolkit ()

get_view_at_point (x, y, obj, tool)

padding_request (bbox, padding)

queue_redraw ()

queue_resize ()

render (bbox)

render_toolkit ()

size_allocate (allocation)

size_child_request (available, req, min_req)

size_request (available, requisition)

update_sizes ()

Virtual Methods

Inherited:

GObject.Object (7)

do_build_toolkit ()

do_get_tip_at_point (x, y)

do_natural_size (req)

do_padding_request (bbox, padding)

do_render (bbox)

do_reserved1 ()

do_reserved2 ()

do_size_allocate (allocation)

do_size_request (available, requisition)

do_state_init ()

Properties

Name

Type

Flags

Short Description

model

GOffice.GraphObject

w

The GOffice.GraphObject this view displays

parent

GOffice.GraphView

w

the GOffice.GraphView parent

Signals

Inherited:

GObject.Object (1)

Fields

Inherited:

GObject.Object (1)

Name

Type

Access

Description

allocation

GOffice.GraphViewAllocation

r

allocation_valid

int

r

base

GObject.Object

r

being_updated

int

r

child_allocations_valid

int

r

children

[object]

r

model

GOffice.GraphObject

r

parent

GOffice.GraphView

r

renderer

GOffice.GraphRenderer

r

residual

GOffice.GraphViewAllocation

r

toolkit

[object]

r

Class Details

class GOffice.GraphView(**kwargs)
Bases:

GObject.Object

Abstract:

Yes

Structure:

GOffice.GraphViewClass

find_child_view(target_model)
Parameters:

target_model (GOffice.GraphObject) – GOffice.GraphObject

Returns:

None on error or if target_model has no view.

Return type:

GOffice.GraphView

Find the GOffice.GraphView contained in self that corresponds to model.

get_model()
Returns:

the GOffice.GraphObject owning the view.

Return type:

GOffice.GraphObject

get_natural_size(requisition)
Parameters:

requisition (GOffice.GraphViewRequisition) –

get_tip_at_point(x, y)
Parameters:
  • x (float) – x position

  • y (float) – y position

Returns:

the newly allocated tip string if the view class supports that or None.

Return type:

str

Gets a tip string related to the position as defined by (x,`y`) in self.

get_tool_at_point(x, y, gobj)
Parameters:
Returns:

tool under cursor for a given view, or None

Return type:

GOffice.GraphTool

get_toolkit()
Returns:

toolkit associated with given view.

Return type:

[GOffice.GraphTool]

get_view_at_point(x, y, obj, tool)
Parameters:
Returns:

the GOffice.GraphView at x,y position

Return type:

GOffice.GraphView

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

padding_request(bbox, padding)
Parameters:
queue_redraw()

Requests a redraw for the entire graph.

queue_resize()

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.

render(bbox)
Parameters:

bbox (GOffice.GraphViewAllocation) –

render_toolkit()

Render toolkit elements.

size_allocate(allocation)
Parameters:

allocation (GOffice.GraphViewAllocation) – position and size to be allocated to self

Assign a size and position to a GOffice.GraphView. Primarilly used by containers.

size_child_request(available, req, min_req)
Parameters:

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.

size_request(available, requisition)
Parameters:

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.

update_sizes()
Returns:

True if a redraw is necessary.

Return type:

bool

do_build_toolkit() virtual
do_get_tip_at_point(x, y) virtual
Parameters:
  • x (float) – x position

  • y (float) – y position

Returns:

the newly allocated tip string if the view class supports that or None.

Return type:

str

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

do_natural_size(req) virtual
Parameters:

req (GOffice.GraphViewRequisition) –

do_padding_request(bbox, padding) virtual
Parameters:
do_render(bbox) virtual
Parameters:

bbox (GOffice.GraphViewAllocation) –

do_reserved1() virtual
do_reserved2() virtual
do_size_allocate(allocation) virtual
Parameters:

allocation (GOffice.GraphViewAllocation) – position and size to be allocated to view

Assign a size and position to a GOffice.GraphView. Primarilly used by containers.

do_size_request(available, requisition) virtual
Parameters:

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.

do_state_init() virtual

Property Details

GOffice.GraphView.props.model
Name:

model

Type:

GOffice.GraphObject

Default Value:

None

Flags:

WRITABLE

The GOffice.GraphObject this view displays

GOffice.GraphView.props.parent
Name:

parent

Type:

GOffice.GraphView

Default Value:

None

Flags:

WRITABLE

the GOffice.GraphView parent