Class: Atk::StateSet

Inherits:
Object
  • Object
show all
Defined in:
(unknown)

Instance Method Summary collapse

Instance Method Details

#add_state(type) ⇒ TrueClass

Adds the state of the specified type to the state set if it is not already present.

Note that because an Atk::StateSet is a read-only object, this method should be used to add a state to a newly-created set which will then be returned by #atk_object_ref_state_set. It should not be used to modify the existing state of an object. See also #atk_object_notify_state_change.

Parameters:

Returns:

  • (TrueClass)

    true if the state for type is not already in set.

#add_states(types, n_types) ⇒ nil

Adds the states of the specified types to the state set.

Note that because an Atk::StateSet is a read-only object, this method should be used to add states to a newly-created set which will then be returned by #atk_object_ref_state_set. It should not be used to modify the existing state of an object. See also #atk_object_notify_state_change.

Parameters:

  • types (Array<Atk::StateType>)

    an array of Atk::StateType

  • n_types (Integer)

    The number of elements in the array

Returns:

  • (nil)

#and_sets(compare_set) ⇒ Atk::StateSet

Constructs the intersection of the two sets, returning nil if the intersection is empty. the two sets.

Parameters:

Returns:

  • (Atk::StateSet)

    a new Atk::StateSet which is the intersection of

#clear_statesnil

Removes all states from the state set.

Returns:

  • (nil)

#contains_state(type) ⇒ TrueClass

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

Parameters:

Returns:

  • (TrueClass)

    true if type is the state type is in set.

#contains_states(types, n_types) ⇒ TrueClass

Checks whether the states for all the specified types are in the specified set.

Parameters:

  • types (Array<Atk::StateType>)

    an array of Atk::StateType

  • n_types (Integer)

    The number of elements in the array

Returns:

  • (TrueClass)

    true if all the states for type are in set.

#is_emptyTrueClass

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

Returns:

  • (TrueClass)

    true if set has no states set, otherwise false

#newAtk::StateSet

Creates a new empty state set.

Returns:

#or_sets(compare_set) ⇒ Atk::StateSet

Constructs the union of the two sets. the union of the two sets, returning nil is empty.

Parameters:

Returns:

#remove_state(type) ⇒ TrueClass

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

Note that because an Atk::StateSet is a read-only object, this method should be used to remove a state to a newly-created set which will then be returned by #atk_object_ref_state_set. It should not be used to modify the existing state of an object. See also #atk_object_notify_state_change.

Parameters:

Returns:

  • (TrueClass)

    true if type was the state type is in set.

#xor_sets(compare_set) ⇒ Atk::StateSet

Constructs the exclusive-or of the two sets, returning nil is empty. The set returned by this operation contains the states in exactly one of the two sets. which are in exactly one of the two sets.

Parameters:

Returns:

  • (Atk::StateSet)

    a new Atk::StateSet which contains the states