Next: , Previous: AtkSelection, Up: Top


19 AtkStateSet

An AtkStateSet determines a component's state set.

19.1 Overview

An AtkStateSet determines a component's state set. It is composed of a set of AtkStates.

19.2 Usage

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

Creates a new empty state set.

ret
a new <atk-state-set>
— Function: atk-state-set-is-empty (self <atk-state-set>) ⇒  (ret bool)
— Method: is-empty

Checks whether the state set is empty, i.e. has no states set.

set
an <atk-state-type>
ret
#t’ if set has no states set, otherwise ‘#f
— Function: atk-state-set-add-state (self <atk-state-set>) (type <atk-state-type>) ⇒  (ret bool)
— Method: add-state

Add a new state for the specified type to the current state set if it is not already present.

set
an <atk-state-set>
type
an <atk-state-type>
ret
#t’ if the state for type is not already in set.
— Function: atk-state-set-clear-states (self <atk-state-set>)
— Method: clear-states

Removes all states from the state set.

set
an <atk-state-set>
— Function: atk-state-set-contains-state (self <atk-state-set>) (type <atk-state-type>) ⇒  (ret bool)
— Method: contains-state

Checks whether the state for the specified type is in the specified set.

set
an <atk-state-set>
type
an <atk-state-type>
ret
#t’ if type is the state type is in set.
— Function: atk-state-set-remove-state (self <atk-state-set>) (type <atk-state-type>) ⇒  (ret bool)
— Method: remove-state

Removes the state for the specified type from the state set.

set
an <atk-state-set>
type
an <atk-type>
ret
#t’ if type was the state type is in set.
— Function: atk-state-set-and-sets (self <atk-state-set>) (compare_set <atk-state-set>) ⇒  (ret <atk-state-set>)
— Method: and-sets

Constructs the intersection of the two sets, returning ‘#f’ if the intersection is empty.

set
an <atk-state-set>
compare-set
another <atk-state-set>
ret
a new <atk-state-set> which is the intersection of the two sets.
— Function: atk-state-set-or-sets (self <atk-state-set>) (compare_set <atk-state-set>) ⇒  (ret <atk-state-set>)
— Method: or-sets

Constructs the union of the two sets.

set
an <atk-state-set>
compare-set
another <atk-state-set>
ret
a new <atk-state-set> which is the union of the two sets, returning ‘#f’ is empty.
— Function: atk-state-set-xor-sets (self <atk-state-set>) (compare_set <atk-state-set>) ⇒  (ret <atk-state-set>)
— Method: xor-sets

Constructs the exclusive-or of the two sets, returning ‘#f’ is empty. The set returned by this operation contains the states in exactly one of the two sets.

set
an <atk-state-set>
compare-set
another <atk-state-set>
ret
a new <atk-state-set> which contains the states which are in exactly one of the two sets.