atk.RelationSet

atk.RelationSet — a set of atk.Relation objects, normally the set of atk.Relation objects that an atk.Object has.

Synopsis

class atk.RelationSet(gobject.GObject):
    atk.RelationSet()
def contains(relationship)
def remove(relation)
def add(relation)
def get_n_relations()
def get_relation(i)
def get_relation_by_type(relationship)

Ancestry

+-- gobject.GObject
  +-- atk.RelationSet

atk.RelationSet Signal Prototypes

gobject.GObject Signal Prototypes

Description

The atk.RelationSet held by an object establishes its relationships with objects beyond the normal "parent/child" hierarchical relationships that all user interface objects have. atk.RelationSet objects establish whether objects are labelled or controlled by other components, share group membership with other components (for instance within a radio-button group), or share content which "flows" between them, among other types of possible relationships.

Constructor

atk.RelationSet

    atk.RelationSet()
Returns :a new atk.RelationSet

Creates a new empty relation set.

Methods

atk.RelationSet.contains

    def contains(relationship)
relationship :one of the Atk Relation Type Constants.
Returns :TRUE if relationship is the relationship type.

Determines whether the relation set contains a relation that matches the type specified by relationship.

atk.RelationSet.remove

    def remove(relation)
relation :an atk.Relation

Removes a relation from the relation set.

atk.RelationSet.add

    def add(relation)
relation :an atk.Relation

Add a new atk.Relation to the current relation set if it is not already present.

atk.RelationSet.get_n_relations

    def get_n_relations()
Returns :an integer representing the number of relations in the set.

Returns the number of relations in a relation set.

atk.RelationSet.get_relation

    def get_relation(i)
i :an index representing a position in the set, starting from 0.
Returns :the atk.Relation, that is the relation at position i in the set.

Determines the relation at the specified position in the relation set.

atk.RelationSet.get_relation_by_type

    def get_relation_by_type(relationship)
relationship :one of the Atk Relation Type Constants.
Returns :an atk.Relation, which is a relation matching the specified type.

Finds a relation that matches the specified type.