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


Public Member Functions
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

Constructors


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:
setA pointer to a AtkStateSet.
owns_referenceSet 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

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

Parameters:
typeA 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:
typesA vector of StateType.

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

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

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

Parameters:
typeA 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:
typesA vector of StateType
Returns:
true if all the states in types are in set.

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

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

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

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

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

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

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

Parameters:
compare_setAnother 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