RelationSet

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.

Constructors

this
this(AtkRelationSet* atkRelationSet, bool ownedRef = false)

Sets our main struct and passes it to the parent class.

this
this()

Creates a new empty relation set.

Members

Functions

add
void add(Relation relation)

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.

addRelationByType
void addRelationByType(AtkRelationType relationship, ObjectAtk target)

Add a new relation of the specified type with the specified target to the current relation set if the relation set does not contain a relation of that type. If it is does contain a relation of that typea the target is added to the relation.

contains
bool contains(AtkRelationType relationship)

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

containsTarget
bool containsTarget(AtkRelationType relationship, ObjectAtk target)

Determines whether the relation set contains a relation that matches the specified pair formed by type relationship and object target.

getNRelations
int getNRelations()

Determines the number of relations in a relation set.

getRelation
Relation getRelation(int i)

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

getRelationByType
Relation getRelationByType(AtkRelationType relationship)

Finds a relation that matches the specified type.

getRelationSetStruct
AtkRelationSet* getRelationSetStruct(bool transferOwnership = false)

Get the main Gtk struct

getStruct
void* getStruct()

the main Gtk struct as a void*

remove
void remove(Relation relation)

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

Static functions

getType
GType getType()

Variables

atkRelationSet
AtkRelationSet* atkRelationSet;

the main Gtk struct