atk.StateSet

atk.StateSet — an atk.StateSet determines a component's state set.

Synopsis

class atk.StateSet(gobject.GObject):
    atk.StateSet()
def is_empty()
def add_state(type)
def add_states(types)
def clear_states()
def contains_state(type)
def contains_states(types)
def remove_state(type)
def and_sets(compare_set)
def or_sets(compare_set)
def xor_sets(compare_set)
Functions

    def atk.state_type_register(name)
def atk.state_type_get_name(type)
def atk.state_type_for_name(name)

Ancestry

+-- gobject.GObject
  +-- atk.StateSet

atk.StateSet Signal Prototypes

gobject.GObject Signal Prototypes

Description

An atk.StateSet determines a component's state set. It is composed of a set of ATK states specified using the Atk State Type Constants.

Constructor

atk.StateSet

    atk.StateSet()
Returns :a new atk.StateSet

Creates a new empty state set.

Methods

atk.StateSet.is_empty

    def is_empty()
Returns :TRUE if the set has no states set, otherwise FALSE

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

atk.StateSet.add_state

    def add_state(type)
type :one of the Atk State Type Constants
Returns :TRUE if the state for type is not already in the set.

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

atk.StateSet.add_states

    def add_states(types)
types :a sequence of Atk State Type Constants.

Add the states for the specified types to the current state set.

atk.StateSet.clear_states

    def clear_states()

Removes all states from the state set.

atk.StateSet.contains_state

    def contains_state(type)
type :one of the Atk State Type Constants.
Returns :TRUE if type is the state type is in the set.

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

atk.StateSet.contains_states

    def contains_states(types)
types :a sequence of Atk State Type Constants
Returns :TRUE if all the states in types are in the set.

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

atk.StateSet.remove_state

    def remove_state(type)
type :one of the Atk State Type Constants
Returns :TRUE if type was in the set.

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

atk.StateSet.and_sets

    def and_sets(compare_set)
compare_set :another atk.StateSet
Returns :a new atk.StateSet which is the intersection of the two sets.

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

atk.StateSet.or_sets

    def or_sets(compare_set)
compare_set :another atk.StateSet
Returns :a new atk.StateSet which is the union of the two sets, returning None is empty.

Constructs the union of the two sets.

atk.StateSet.xor_sets

    def xor_sets(compare_set)
compare_set :another atk.StateSet
Returns :a new atk.StateSet which contains the states which are in exactly one of the two sets.

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.

Functions

atk.state_type_register

    def atk.state_type_register(name)
name :a character string describing the new state.
Returns :a new state type value for the new state.

Registers a new object state and adds it to the Atk State Type Constants.

atk.state_type_get_name

    def atk.state_type_get_name(type)
type :one of the Atk State Type Constants.
Returns :the string describing the state type

Gets the description string describing the state type specified bytype.

atk.state_type_for_name

    def atk.state_type_for_name(name)
name :a character string state name
Returns :one of the Atk State Type Constants.

Gets the state type corresponding to the description string name.