Class: GOffice::GraphObject

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

Direct Known Subclasses

Graph3DBox, GraphPlot, GraphStyledObject

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(input, user_unserialize) ⇒ GOffice::GraphObject

Parameters:

  • input (Gsf::Input)
  • user_unserialize (GObject)

Class Method Details

.register_roles(klass, roles, n_roles) ⇒ nil

Parameters:

  • klass (GOffice::GraphObjectClass) —

    Gog::ObjectClass

  • roles (GOffice::GraphObjectRole) —

    Gog::ObjectRole

  • n_roles (Integer) —

    number of roles

Returns:

  • (nil)

.sax_push_parser(xin, attrs, handler, user_unserialize, user_data) ⇒ nil

Unserializes a Gog::Object using handler when done.

Parameters:

  • xin (Gsf::XMLIn) —

    Gsf::XMLIn

  • attrs (libxml2::Char) —

    XML attributes

  • handler (GOffice::GraphObjectSaxHandler) —

    callback

  • user_unserialize (GObject) —

    user data for #GOData reading

  • user_data (GObject) —

    user data for handler

Returns:

  • (nil)

.set_arg(name, val, obj) ⇒ nil

Parameters:

Returns:

  • (nil)

Instance Method Details

#add_by_name(role, child) ⇒ GOffice::GraphObject

it is assumed to be an unaffiliated object that will be assigned in role.
On failure return NULL.

Parameters:

Returns:

#add_by_role(role, child) ⇒ GOffice::GraphObject

Absorb a ref to child if it is non-NULL.

Parameters:

Returns:

#alignment ⇒ String

Returns alignment.

Returns:

  • (String) —

    alignment

#alignment=(alignment) ⇒ String

Parameters:

  • alignment (String)

Returns:

  • (String) —

    alignment

  • (String) —

    alignment

#anchor ⇒ String

Returns anchor.

Returns:

  • (String) —

    anchor

#anchor=(anchor) ⇒ String

Parameters:

  • anchor (String)

Returns:

  • (String) —

    anchor

  • (String) —

    anchor

#can_reorder(inc_ok, dec_ok) ⇒ nil

If obj can move forward or backward in its parents child list

Parameters:

  • inc_ok (Boolean) —

    optionally nil pointer for result.

  • dec_ok (Boolean) —

    optionally nil pointer for result.

Returns:

  • (nil)

#clear_parent ⇒ Boolean

Does not unref the child, which in effect adds a ref by freeing up the ref
previously associated with the parent.

Returns:

  • (Boolean) —

    true on success.

#compass ⇒ String

Returns compass.

Returns:

  • (String) —

    compass

#compass=(compass) ⇒ String

Parameters:

  • compass (String)

Returns:

  • (String) —

    compass

  • (String) —

    compass

#document_changed(doc) ⇒ nil

Parameters:

Returns:

  • (nil)

#dup(new_parent, datadup) ⇒ GOffice::GraphObject

Create a deep copy of obj using new_parent as its parent.

Parameters:

  • new_parent (GOffice::GraphObject) —

    Gog::Object the parent tree for the object (can be nil)

  • datadup (GOffice::GraphDataDuplicator) —

    a function to duplicate the data (a default one is used if nil)

Returns:

#emit_changed(size) ⇒ nil

Parameters:

  • size (Boolean)

Returns:

  • (nil)

#find_role_by_name(role) ⇒ GOffice::GraphObjectRole

Parameters:

  • role (String)

Returns:

  • (GOffice::GraphObjectRole)

#get_child_by_name(name) ⇒ GOffice::GraphObject

A convenience routine to find a unique child with role == name

Parameters:

  • name (String) —

    a #char to use as a role name filter

Returns:

#get_child_by_role(role) ⇒ GOffice::GraphObject

A convenience routine to find a unique child with role.

Parameters:

  • role (GOffice::GraphObjectRole) —

    a Gog::ObjectRole to use as a filter

Returns:

#get_children(filter) ⇒ GLib::SList<GOffice::GraphObject>

Children. Caller must free the list, but not the children.

Parameters:

  • filter (GOffice::GraphObjectRole) —

    an optional Gog::ObjectRole to use as a filter

Returns:

#get_editor(dalloc, cc) ⇒ GObject

Builds an object property editor, by calling GogObject::populate_editor
virtual functions.

Parameters:

Returns:

  • (GObject) —

    a Gtk::Notebook widget

#get_manual_allocation(parent_allocation, requisition) ⇒ GOffice::GraphViewAllocation

its size request.

Parameters:

  • parent_allocation (GOffice::GraphViewAllocation) —

    Gog::ViewAllocation

  • requisition (GOffice::GraphViewRequisition) —

    Gog::ViewRequisition

Returns:

  • (GOffice::GraphViewAllocation) —

    manual allocation of a GogObject given its parent allocation and

#get_manual_position(pos) ⇒ nil

FIXME

Parameters:

  • pos (GOffice::GraphViewAllocation) —

    Gog::ViewAllocation

Returns:

  • (nil)

#get_parent_typed(t) ⇒ GOffice::GraphObject

added to a hierarchy yet or none of the parents are of type type.

Parameters:

  • t (GLib::Type) —

    a #GType

Returns:

#get_position_flags(mask) ⇒ GOffice::GraphObjectPosition

Returns obj's position flags, masked by mask.

Parameters:

Returns:

#graph ⇒ GOffice::GraphGraph

Returns the parent graph.

Returns:

#id ⇒ Integer

Returns id.

Returns:

  • (Integer) —

    id

#id=(id) ⇒ Integer

Parameters:

  • id (Integer)

Returns:

  • (Integer) —

    id

  • (Integer) —

    id

#invisible=(invisible) ⇒ Boolean

Parameters:

  • invisible (Boolean)

Returns:

  • (Boolean) —

    invisible

  • (Boolean) —

    invisible

#invisible? ⇒ Boolean

Returns invisible.

Returns:

  • (Boolean) —

    invisible

#is_default_position_flags(name) ⇒ Boolean

Parameters:

  • name (String)

Returns:

  • (Boolean)

#is_deletable ⇒ Boolean

Returns true if obj can be deleted.

Returns:

  • (Boolean) —

    true if obj can be deleted.

#is_position_manual=(is_position_manual) ⇒ Boolean

Parameters:

  • is_position_manual (Boolean)

Returns:

  • (Boolean) —

    is-position-manual

  • (Boolean) —

    is-position-manual

#is_position_manual? ⇒ Boolean

Returns is-position-manual.

Returns:

  • (Boolean) —

    is-position-manual

#manual_position=(pos) ⇒ nil

set manual position of given object, in points.

Parameters:

  • pos (GOffice::GraphViewAllocation) —

    Gog::ViewAllocation

Returns:

  • (nil)

#manual_size ⇒ String

Returns manual-size.

Returns:

  • (String) —

    manual-size

#manual_size=(manual_size) ⇒ String

Parameters:

  • manual_size (String)

Returns:

  • (String) —

    manual-size

  • (String) —

    manual-size

#name ⇒ String

No need to free the result

Returns:

  • (String) —

    a name.

#name=(name) ⇒ nil

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 == nil

Parameters:

  • name (String) —

    The new name for obj

Returns:

  • (nil)

#new_view(parent) ⇒ GOffice::GraphView

Creates a new Gog::View associated to obj, and sets its parent to parent.

Parameters:

Returns:

#parent ⇒ GOffice::GraphObject

Returns obj's parent, potentially nil if it has not been added to a
heirarchy yet. does not change ref-count in any way.

Returns:

  • (GOffice::GraphObject) —

    obj's parent, potentially nil if it has not been added to a
    heirarchy yet. does not change ref-count in any way.

#position ⇒ String

Returns position.

Returns:

  • (String) —

    position

#position=(position) ⇒ String

Parameters:

  • position (String)

Returns:

  • (String) —

    position

  • (String) —

    position

#possible_additions ⇒ GLib::SList<GOffice::GraphObjectRole>

of GogObjectRoles that could be added. The resulting list needs to be freed

Returns:

  • (GLib::SList<GOffice::GraphObjectRole>) —

    a list

#reorder(inc, goto_max) ⇒ GOffice::GraphObject

Returns the object just before obj in the new ordering.

Parameters:

  • inc (Boolean)
  • goto_max (Boolean)

Returns:

#request_editor_update ⇒ nil

Emits a update-editor signal. This signal should be used by object editors
in order to refresh their states.

Returns:

  • (nil)

#request_update ⇒ Boolean

Returns:

  • (Boolean)

#set_parent(parent, role, id) ⇒ Boolean

Absorbs a ref to child

Parameters:

  • parent (GOffice::GraphObject) —

    Gog::Object.

  • role (GOffice::GraphObjectRole) —

    a static string that can be sent to parent::add

  • id (Integer) —

    optionally nil.

Returns:

  • (Boolean) —

    true on success

#set_position_flags(flags, mask) ⇒ Boolean

Attempts to set the position flags of obj to flags.

Parameters:

Returns:

  • (Boolean) —

    TRUE the new flags are permitted.

#theme ⇒ GOffice::GraphTheme

Returns the parent graph theme.

Returns:

#update ⇒ nil

Returns:

  • (nil)

#write_xml_sax(output, user) ⇒ nil

Parameters:

  • output (Gsf::XMLOut)
  • user (GObject)

Returns:

  • (nil)