Next: , Previous: AtkRelation, Up: Top


16 AtkRelationSet

A set of AtkRelations, normally the set of AtkRelations which an AtkObject has.

16.1 Overview

The AtkRelationSet held by an object establishes its relationships with objects beyond the normal "parent/child" hierarchical relationships that all user interface objects have. AtkRelationSets 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.

16.2 Usage

— Class: <atk-relation-set>

Derives from <gobject>.

This class defines no direct slots.

— Function: atk-relation-set-new ⇒  (ret <atk-relation-set>)

Creates a new empty relation set.

ret
a new <atk-relation-set>
— Function: atk-relation-set-contains (self <atk-relation-set>) (relationship <atk-relation-type>) ⇒  (ret bool)
— Method: contains

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

set
an <atk-relation-set>
relationship
an <atk-relation-type>
ret
#t’ if relationship is the relationship type of a relation in set, ‘#f’ otherwise
— Function: atk-relation-set-remove (self <atk-relation-set>) (relation <atk-relation>)
— Method: remove

Removes a relation from the relation set. This function unref's the <atk-relation> so it will be deleted unless there is another reference to it.

set
an <atk-relation-set>
relation
an <atk-relation>
— Function: atk-relation-set-add (self <atk-relation-set>) (relation <atk-relation>)
— Method: add

Add a new relation to the current relation set if it is not already present. This function ref's the AtkRelation so the caller of this function should unref it to ensure that it will be destroyed when the AtkRelationSet is destroyed.

set
an <atk-relation-set>
relation
an <atk-relation>
— Function: atk-relation-set-get-n-relations (self <atk-relation-set>) ⇒  (ret int)
— Method: get-n-relations

Determines the number of relations in a relation set.

set
an <atk-relation-set>
ret
an integer representing the number of relations in the set.
— Function: atk-relation-set-get-relation (self <atk-relation-set>) (int) ⇒  (ret <atk-relation>)
— Method: get-relation

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

set
an <atk-relation-set>
i
a gint representing a position in the set, starting from 0.
ret
a <atk-relation>, which is the relation at position i in the set.