atk.Relation

atk.Relation — an object used to describe a relation between a object and one or more other objects.

Synopsis

class atk.Relation(gobject.GObject):
    atk.Relation(targets, relationship)
def get_relation_type()
def get_target()
Functions

    def atk.relation_type_register(name)
def atk.relation_type_get_name(relationship)
def atk.relation_type_for_name(name)

Ancestry

+-- gobject.GObject
  +-- atk.Relation

atk.Relation Properties

"relation-type"Read-WriteThe type of the relation - one of the Atk Relation Type Constants. Default value: atk.RELATION_NULL.
"target"Read-WriteAn array of the targets for the relation. Default value: None.

atk.Relation Signal Prototypes

gobject.GObject Signal Prototypes

Description

An atk.Relation describes a relation between an object and one or more other objects. The actual relations that an object has with other objects are defined as an atk.RelationSet, which contains a set of atk.Relation objects.

Constructor

atk.Relation

    atk.Relation(targets, relationship)
targets :a sequence of atk.Object objects
relationship :one of the Atk Relation Type Constants with which to create the new atk.Relation
Returns :a new atk.Relation

Create a new relation for the specified relationship type and the specified sequence of targets.

Methods

atk.Relation.get_relation_type

    def get_relation_type()
Returns :the relation type - one of the Atk Relation Type Constants.

Gets the relationship type.

atk.Relation.get_target

    def get_target()
Returns :the target list of relation

Gets the target list of atk.Object objects.

Functions

atk.relation_type_register

    def atk.relation_type_register(name)
name :a name string
Returns :a new one of the Atk Relation Type Constants that is associated with name

Associate name with a new one of the Atk Relation Type Constants.

atk.relation_type_get_name

    def atk.relation_type_get_name(type)
type :one of the Atk Relation Type Constants.
Returns :the string associated with relationship.

Gets the description string describing the relation type specified by type.

atk.relation_type_for_name

    def atk.relation_type_for_name(name)
name :a string which is the (non-localized) name of an ATK relation type.
Returns :the matching type of the Atk Relation Type Constants corresponding to the specified name, or atk.RELATION_NULL if no matching relation type is found.

Get the relation type corresponding to the specified name.