Atk.StateSet¶
- Subclasses:
None
Methods¶
- Inherited:
- Structs:
class |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Virtual Methods¶
- Inherited:
Properties¶
None
Signals¶
- Inherited:
Fields¶
- Inherited:
Name |
Type |
Access |
Description |
---|---|---|---|
parent |
r |
Class Details¶
- class Atk.StateSet(**kwargs)¶
- Bases:
- Abstract:
No
- Structure:
An
Atk.StateSet
contains the states of an object.An
Atk.StateSet
is a read-only representation of the full set of #AtkStates that apply to an object at a given time. This set is not meant to be modified, but rather created whenAtk.Object.ref_state_set
() is called.- classmethod new()[source]¶
- Returns:
a new
Atk.StateSet
- Return type:
Creates a new empty state set.
- add_state(type)[source]¶
- Parameters:
type (
Atk.StateType
) – anAtk.StateType
- Returns:
True
if the state for type is not already in self.- Return type:
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 byAtk.Object.ref_state_set
. It should not be used to modify the existing state of an object. See alsoAtk.Object.notify_state_change
.
- add_states(types)[source]¶
- Parameters:
types ([
Atk.StateType
]) – an array ofAtk.StateType
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 byAtk.Object.ref_state_set
. It should not be used to modify the existing state of an object. See alsoAtk.Object.notify_state_change
.
- and_sets(compare_set)[source]¶
- Parameters:
compare_set (
Atk.StateSet
) – anotherAtk.StateSet
- Returns:
a new
Atk.StateSet
which is the intersection of the two sets.- Return type:
Constructs the intersection of the two sets, returning
None
if the intersection is empty.
- contains_state(type)[source]¶
- Parameters:
type (
Atk.StateType
) – anAtk.StateType
- Returns:
True
if type is the state type is in self.- Return type:
Checks whether the state for the specified type is in the specified set.
- contains_states(types)[source]¶
- Parameters:
types ([
Atk.StateType
]) – an array ofAtk.StateType
- Returns:
True
if all the states for type are in self.- Return type:
Checks whether the states for all the specified types are in the specified set.
- or_sets(compare_set)[source]¶
- Parameters:
compare_set (
Atk.StateSet
) – anotherAtk.StateSet
- Returns:
a new
Atk.StateSet
which is the union of the two sets, returningNone
is empty.- Return type:
Atk.StateSet
orNone
Constructs the union of the two sets.
- remove_state(type)[source]¶
- Parameters:
type (
Atk.StateType
) – an #AtkType- Returns:
True
if type was the state type is in self.- Return type:
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 byAtk.Object.ref_state_set
. It should not be used to modify the existing state of an object. See alsoAtk.Object.notify_state_change
.
- xor_sets(compare_set)[source]¶
- Parameters:
compare_set (
Atk.StateSet
) – anotherAtk.StateSet
- Returns:
a new
Atk.StateSet
which contains the states which are in exactly one of the two sets.- Return type:
Constructs the exclusive-or of the two sets, returning
None
is empty. The set returned by this operation contains the states in exactly one of the two sets.