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.GraphObjectthis view displays | 
| parent | GOffice.GraphView | w | the GOffice.GraphViewparent | 
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: - Noneon error or if target_model has no view.- Return type: - GOffice.GraphView- Find the - GOffice.GraphViewcontained in self that corresponds to model.
 - 
get_model()¶
- Returns: - the - GOffice.GraphObjectowning the view.- Return type: - GOffice.GraphObject
 - 
get_natural_size(requisition)¶
- Parameters: - requisition ( - GOffice.GraphViewRequisition) –
 - 
get_tip_at_point(x, y)¶
- Parameters: - Returns: - the newly allocated tip string if the view class supports that or - None.- Return type: - Gets a tip string related to the position as defined by (x,`y`) in self. 
 - 
get_tool_at_point(x, y, gobj)¶
- Parameters: - x (float) – inGOffice.coords
- y (float) – inGOffice.coords
- gobj (GOffice.GraphObject) – pointed object orNone
 - Returns: - tool under cursor for a given view, or - None- Return type: 
- x (
 - 
get_toolkit()¶
- Returns: - toolkit associated with given view. - Return type: - [ - GOffice.GraphTool]
 - 
get_view_at_point(x, y, obj, tool)¶
- Parameters: - x (float) – cursor x position
- y (float) – cursor y position
- obj (GOffice.GraphObject) – pointed object orNone
- tool (GOffice.GraphTool) – pointed tool orNone
 - Returns: - the - GOffice.GraphViewat x,y position- Return type: - 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. 
- x (
 - 
padding_request(bbox, padding)¶
- Parameters: - bbox (GOffice.GraphViewAllocation) –
- padding (GOffice.GraphViewPadding) –
 
- bbox (
 - 
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: - 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
 - 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. 
- available (
 - 
size_request(available, requisition)¶
- Parameters: - available (GOffice.GraphViewRequisition) – available space.
- requisition (GOffice.GraphViewRequisition) – aGOffice.GraphViewRequisition.
 - 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. 
- available (
 - 
do_build_toolkit() virtual¶
 - 
do_get_tip_at_point(x, y) virtual¶
- Parameters: - Returns: - the newly allocated tip string if the view class supports that or - None.- Return type: - 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: - bbox (GOffice.GraphViewAllocation) –
- padding (GOffice.GraphViewPadding) –
 
- bbox (
 - 
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: - available (GOffice.GraphViewRequisition) – available space.
- requisition (GOffice.GraphViewRequisition) – aGOffice.GraphViewRequisition.
 - 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. 
- available (
 - 
do_state_init() virtual¶
 
- 
Property Details¶
- 
GOffice.GraphView.props.model¶
- Name: - model- Type: - GOffice.GraphObject- Default Value: - None- Flags: - WRITABLE- The - GOffice.GraphObjectthis view displays
- 
GOffice.GraphView.props.parent¶
- Name: - parent- Type: - GOffice.GraphView- Default Value: - None- Flags: - WRITABLE- the - GOffice.GraphViewparent