RelationSetProtocol
public protocol RelationSetProtocol : ObjectProtocol
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.
The RelationSetProtocol
protocol exposes the methods and properties of an underlying AtkRelationSet
instance.
The default implementation of these can be found in the protocol extension below.
For a concrete class that implements these methods and properties, see RelationSet
.
Alternatively, use RelationSetRef
as a lighweight, unowned
reference if you already have an instance you just want to use.
-
Untyped pointer to the underlying
AtkRelationSet
instance.Declaration
Swift
var ptr: UnsafeMutableRawPointer! { get }
-
relation_set_ptr
Default implementationTyped pointer to the underlying
AtkRelationSet
instance.Default Implementation
Return the stored, untyped pointer as a typed pointer to the
AtkRelationSet
instance.Declaration
Swift
var relation_set_ptr: UnsafeMutablePointer<AtkRelationSet>! { get }
-
Required Initialiser for types conforming to
RelationSetProtocol
Declaration
Swift
init(raw: UnsafeMutableRawPointer)
-
add(relation:
Extension method) 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.
Declaration
Swift
@inlinable func add<RelationT>(relation: RelationT) where RelationT : RelationProtocol
-
addRelationByType(relationship:
Extension methodtarget: ) 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.
Declaration
Swift
@inlinable func addRelationByType<ObjectT>(relationship: AtkRelationType, target: ObjectT) where ObjectT : ObjectProtocol
-
contains(relationship:
Extension method) Determines whether the relation set contains a relation that matches the specified type.
Declaration
Swift
@inlinable func contains(relationship: AtkRelationType) -> Bool
-
containsTarget(relationship:
Extension methodtarget: ) Determines whether the relation set contains a relation that matches the specified pair formed by type
relationship
and objecttarget
.Declaration
Swift
@inlinable func containsTarget<ObjectT>(relationship: AtkRelationType, target: ObjectT) -> Bool where ObjectT : ObjectProtocol
-
getNRelations()
Extension methodDetermines the number of relations in a relation set.
Declaration
Swift
@inlinable func getNRelations() -> Int
-
getRelation(i:
Extension method) Determines the relation at the specified position in the relation set.
Declaration
Swift
@inlinable func getRelation(i: Int) -> Atk.RelationRef!
-
getRelationByType(relationship:
Extension method) Finds a relation that matches the specified type.
Declaration
Swift
@inlinable func getRelationByType(relationship: AtkRelationType) -> Atk.RelationRef!
-
remove(relation:
Extension method) 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.Declaration
Swift
@inlinable func remove<RelationT>(relation: RelationT) where RelationT : RelationProtocol
-
nRelations
Extension methodDetermines the number of relations in a relation set.
Declaration
Swift
@inlinable var nRelations: Int { get }
-
parent
Extension methodUndocumented
Declaration
Swift
@inlinable var parent: GObject { get }
-
relations
Extension methodUndocumented
Declaration
Swift
@inlinable var relations: PtrArrayRef! { get }