Xfce Foundation Classes
Main Page  | IndexNamespace List  |  Alphabetical List  |  Class List  |  File List


Xfc::Atk::StateSet Class Reference

An AtkStateSet C++ wrapper class. More...

#include <xfc/atk/stateset.hh>

Inheritance diagram for Xfc::Atk::StateSet:

Xfc::G::Object Xfc::G::TypeInstance Xfc::Trackable List of all members.

Public Member Functions

Accessors
Methods

Detailed Description

An AtkStateSet C++ wrapper class.

A StateSet determines a component's state set. It is composed of a set of states.

Note: dynamically allocated objects must either be unreferenced or assigned to a smart pointer. Stack objects are automatically unreferenced when they go out of scope.


Constructor & Destructor Documentation

Xfc::Atk::StateSet::StateSet ( AtkStateSet *  set,
bool  owns_reference = true 
) [explicit, protected]

Construct a new StateSet from an existing AtkStateSet.

Parameters:
set A pointer to a AtkStateSet.
owns_reference Set false if the initial reference count is floating, set true if it's not.
The set can be a newly created AtkStateSet or an existing AtkStateSet. (see G::Object::Object).

Xfc::Atk::StateSet::StateSet ( AtkStateSet *  set,
bool  owns_reference = true 
) [explicit, protected]

Construct a new StateSet from an existing AtkStateSet.

Parameters:
set A pointer to a AtkStateSet.
owns_reference Set false if the initial reference count is floating, set true if it's not.
The set can be a newly created AtkStateSet or an existing AtkStateSet. (see G::Object::Object).


Member Function Documentation

bool Xfc::Atk::StateSet::is_empty (  )  const

Checks whether the state set is empty (that is, has no states set).

Returns:
true if set has no states set, otherwise false.

bool Xfc::Atk::StateSet::contains_state ( StateType  type  )  const

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

Parameters:
type A StateType.
Returns:
trueif type is the state type is in set.

bool Xfc::Atk::StateSet::contains_states ( const std::vector< StateType > &  types  )  const

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

Parameters:
types A vector of StateType
Returns:
true if all the states in types are in set.

bool Xfc::Atk::StateSet::add_state ( StateType  type  ) 

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

Parameters:
type A StateType.
Returns:
true if the state for type is not already in set.

void Xfc::Atk::StateSet::add_states ( const std::vector< StateType > &  types  ) 

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

Parameters:
types A vector of StateType.

bool Xfc::Atk::StateSet::remove_state ( StateType  type  ) 

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

Parameters:
type A StateType
Returns:
true if type was in the state set and was removed.

Pointer<StateSet> Xfc::Atk::StateSet::and_sets ( StateSet compare_set  ) 

Constructs the intersection of the states in this set and compare_set.

Parameters:
compare_set Another StateSet.
Returns:
A new StateSet which is the intersection of the two sets, or null if the intersection is empty.

Pointer<StateSet> Xfc::Atk::StateSet::or_sets ( StateSet compare_set  ) 

Constructs the union of the states in this set and compare_set.

Parameters:
compare_set Another StateSet.
Returns:
A new StateSet which is the union of the two sets.

Pointer<StateSet> Xfc::Atk::StateSet::xor_sets ( StateSet compare_set  ) 

Constructs the exclusive-or of the states in this set and compare_set.

Parameters:
compare_set Another StateSet.
Returns:
A new StateSet which contains the states which are in exactly one of the two sets, or null if the exclusive-or is empty.
The set returned by this operation contains the states in exactly one of the two sets.


The documentation for this class was generated from the following file: Xfce Foundation Classes
Copyright © 2004-2005 The XFC Development Team XFC 4.3