GOffice.GraphObject¶
- Subclasses:
GOffice.Graph3DBox,GOffice.GraphPlot,GOffice.GraphStyledObject
Methods¶
- Inherited:
- Structs:
class |
|
class |
|
class |
|
class |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Virtual Methods¶
- Inherited:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Properties¶
Name |
Type |
Flags |
Short Description |
|---|---|---|---|
r/w |
Alignment flag |
||
r/w |
Anchor for manual position |
||
r/w |
Compass auto position flags |
||
r/w |
Object numerical ID |
||
r/w |
Should the object be hidden |
||
r/w |
Is position manual |
||
r/w |
Whether the height or width are manually set |
||
r/w |
Position and size of object, in percentage of parent size |
Signals¶
- Inherited:
Name |
Short Description |
|---|---|
The |
|
The |
|
Fields¶
- Inherited:
Name |
Type |
Access |
Description |
|---|---|---|---|
auto_name |
r |
||
base |
r |
||
being_updated |
r |
||
children |
[ |
r |
|
explicitly_typed_role |
r |
||
id |
r |
||
invisible |
r |
||
manual_position |
r |
||
needs_update |
r |
||
parent |
r |
||
position |
r |
||
role |
r |
||
user_name |
r |
Class Details¶
- class GOffice.GraphObject(**kwargs)¶
- Bases:
- Abstract:
Yes
- Structure:
- classmethod new_from_input(input, user_unserialize)¶
- Parameters:
- Return type:
- classmethod sax_push_parser(xin, attrs, handler, user_unserialize, *user_data)¶
- Parameters:
attrs (
libxml2.Char) – XML attributeshandler (
GOffice.GraphObjectSaxHandler) – callbackuser_unserialize (
objectorNone) – user data forGOffice.Datareading
Unserializes a
GOffice.GraphObjectusing handler when done.
- classmethod set_arg(name, val, obj)¶
- Parameters:
name (
str) –val (
str) –obj (
GOffice.GraphObject) –
- add_by_name(role, child)¶
- Parameters:
role (
str) –child (
GOffice.GraphObjectorNone) – optionally nullGOffice.GraphObject
- Returns:
a newly created child of self in role. If child is provided, it is assumed to be an unaffiliated object that will be assigned in role. On failure return
None.- Return type:
- add_by_role(role, child)¶
- Parameters:
child (
GOffice.GraphObjectorNone) –GOffice.GraphObject
- Returns:
child or a newly created object with role.
- Return type:
Absorb a ref to child if it is non-
None.
- can_reorder(inc_ok, dec_ok)¶
- Parameters:
If self can move forward or backward in its parents child list
- clear_parent()¶
-
Does _not_ unref the child, which in effect adds a ref by freeing up the ref previously associated with the parent.
- document_changed(doc)¶
- Parameters:
doc (
GOffice.Doc) –
- dup(new_parent, datadup)¶
- Parameters:
new_parent (
GOffice.GraphObject) –GOffice.GraphObjectthe parent tree for the object (can beNone)datadup (
GOffice.GraphDataDuplicator) – a function to duplicate the data (a default one is used ifNone)
- Returns:
the duplicated object
- Return type:
Create a deep copy of obj using new_parent as its parent.
- get_child_by_name(name)¶
- Parameters:
- Returns:
Noneand spews an error if there is more than one.- Return type:
A convenience routine to find a unique child with role == name
- get_child_by_role(role)¶
- Parameters:
role (
GOffice.GraphObjectRole) – aGOffice.GraphObjectRoleto use as a filter- Returns:
Noneand spews an error if there is more than one.- Return type:
A convenience routine to find a unique child with role.
- get_children(filter)¶
- Parameters:
filter (
GOffice.GraphObjectRole) – an optionalGOffice.GraphObjectRoleto use as a filter- Returns:
list of self's Children. Caller must free the list, but not the children.
- Return type:
- get_editor(dalloc, cc)¶
- Parameters:
dalloc (
GOffice.GraphDataAllocator) – aGOffice.GraphDataAllocatorcc (
GOffice.CmdContext) – aGOffice.CmdContext
- Returns:
a
Gtk.Notebookwidget- Return type:
Builds an object property editor, by calling GogObject::populate_editor virtual functions.
- get_graph()¶
- Returns:
the parent graph.
- Return type:
- get_manual_allocation(parent_allocation, requisition)¶
- Parameters:
parent_allocation (
GOffice.GraphViewAllocation) –GOffice.GraphViewAllocationrequisition (
GOffice.GraphViewRequisition) –GOffice.GraphViewRequisition
- Returns:
manual allocation of a
GOffice.GraphObjectgiven its parent allocation and its size request.- Return type:
- get_manual_position(pos)¶
- Parameters:
pos (
GOffice.GraphViewAllocation) –GOffice.GraphViewAllocation
FIXME
- get_manual_size_mode()¶
- Return type:
- get_parent()¶
- Returns:
self's parent, potentially
Noneif it has not been added to a heirarchy yet. does not change ref-GOffice.countin any way.- Return type:
- get_parent_typed(t)¶
- Parameters:
t (
GObject.GType) – aGObject.GType- Returns:
self's parent of type type, potentially
Noneif it has not been added to a hierarchy yet or none of the parents are of type type.- Return type:
- get_position_flags(mask)¶
- Parameters:
mask (
GOffice.GraphObjectPosition) –GOffice.GraphObjectPosition- Returns:
self's position flags, masked by mask.
- Return type:
- get_theme()¶
- Returns:
the parent graph theme.
- Return type:
- new_view(parent)¶
- Parameters:
parent (
GOffice.GraphView) – parent view- Returns:
a new
GOffice.GraphView- Return type:
Creates a new
GOffice.GraphViewassociated to self, and sets its parent to parent.
- possible_additions()¶
- Returns:
a list of GogObjectRoles that could be added. The resulting list needs to be freed
- Return type:
- reorder(inc, goto_max)¶
- Parameters:
- Returns:
the object just before self in the new ordering.
- Return type:
- request_editor_update()¶
Emits a update-editor signal. This signal should be used by object editors in order to refresh their states.
- set_manual_position(pos)¶
- Parameters:
pos (
GOffice.GraphViewAllocation) –GOffice.GraphViewAllocation
set manual position of given object, in points.
- set_name(name)¶
- Parameters:
name (
str) – The new name for self- Raises:
Assign the new name and signals that it has changed. NOTE : it _absorbs_ name rather than copying it, and generates a new name if name ==
None
- set_parent(parent, role, id)¶
- Parameters:
parent (
GOffice.GraphObject) –GOffice.GraphObject.role (
GOffice.GraphObjectRole) – a static string that can be sent to parent::add
- Returns:
Trueon success- Return type:
Absorbs a ref to self
- set_position_flags(flags, mask)¶
- Parameters:
- Returns:
Trueif the new flags are permitted.- Return type:
Attempts to set the position flags of self to flags.
- update()¶
- write_xml_sax(output, user)¶
- Parameters:
output (
Gsf.XMLOut) –
- do_child_added(child) virtual¶
- Parameters:
child (
GOffice.GraphObject) –
- do_child_name_changed(child) virtual¶
- Parameters:
child (
GOffice.GraphObject) –
- do_child_removed(child) virtual¶
- Parameters:
child (
GOffice.GraphObject) –
- do_children_reordered() virtual¶
- do_document_changed(doc) virtual¶
- Parameters:
doc (
GOffice.Doc) –
- do_extra_signal1() virtual¶
- do_extra_signal2() virtual¶
- do_get_manual_size_mode() virtual¶
- Return type:
- do_name_changed() virtual¶
- do_populate_editor(editor, dalloc, cc) virtual¶
- Parameters:
editor (
GOffice.Editor) –dalloc (
GOffice.GraphDataAllocator) –cc (
GOffice.CmdContext) –
- do_possible_additions_changed() virtual¶
- do_reserved1() virtual¶
- do_reserved2() virtual¶
- do_update() virtual¶
- do_update_editor() virtual¶
Signal Details¶
- GOffice.GraphObject.signals.changed(graph_object, object)¶
- Signal Name:
changed- Flags:
- Parameters:
graph_object (
GOffice.GraphObject) – The object which received the signalobject (
bool) –
- GOffice.GraphObject.signals.child_added(graph_object, child)¶
- Signal Name:
child-added- Flags:
- Parameters:
graph_object (
GOffice.GraphObject) – The object which received the signalchild (
GObject.Object) – The newGOffice.GraphObjectwhose parent is object
The
::child-addedsignal is emitted AFTER the child has been added and AFTER the parent-changed signal has been called for it.
- GOffice.GraphObject.signals.child_name_changed(graph_object, object)¶
- Signal Name:
child-name-changed- Flags:
- Parameters:
graph_object (
GOffice.GraphObject) – The object which received the signalobject (
GObject.Object) –
- GOffice.GraphObject.signals.child_removed(graph_object, child)¶
- Signal Name:
child-removed- Flags:
- Parameters:
graph_object (
GOffice.GraphObject) – The object which received the signalchild (
GObject.Object) – The newGOffice.GraphObjectwhose parent is object
The
::child-removedsignal is emitted BEFORE the child has been added and BEFORE the parent-changed signal has been called for it.
- GOffice.GraphObject.signals.children_reordered(graph_object)¶
- Signal Name:
children-reordered- Flags:
- Parameters:
graph_object (
GOffice.GraphObject) – The object which received the signal
- GOffice.GraphObject.signals.name_changed(graph_object)¶
- Signal Name:
name-changed- Flags:
- Parameters:
graph_object (
GOffice.GraphObject) – The object which received the signal
- GOffice.GraphObject.signals.update_editor(graph_object)¶
- Signal Name:
update-editor- Flags:
- Parameters:
graph_object (
GOffice.GraphObject) – The object which received the signal
Property Details¶
- GOffice.GraphObject.props.alignment¶
-
Alignment flag
- GOffice.GraphObject.props.anchor¶
-
Anchor for manual position
- GOffice.GraphObject.props.compass¶
-
Compass auto position flags
- GOffice.GraphObject.props.id¶
-
Object numerical ID
- GOffice.GraphObject.props.invisible¶
-
Should the object be hidden
- GOffice.GraphObject.props.is_position_manual¶
-
Is position manual
- GOffice.GraphObject.props.manual_size¶
-
Whether the height or width are manually set