atkmm: Atk::StateSet Class Reference

atkmm 2.36.2

Public Member Functions | Static Public Member Functions | Protected Member Functions | Related Functions | List of all members
Atk::StateSet Class Reference

An AtkStateSet determines a component's state set. More...

`#include <atkmm/stateset.h>`

Inheritance diagram for Atk::StateSet:
[legend]

## Public Member Functions
| StateSet (StateSet && src) noexcept
StateSet & | operator= (StateSet && src) noexcept
| ~StateSet () noexcept override
AtkStateSet * | gobj ()
| Provides access to the underlying C GObject. More...
const AtkStateSet * | gobj () const
| Provides access to the underlying C GObject. More...
AtkStateSet * | gobj_copy ()
| Provides access to the underlying C instance. The caller is responsible for unrefing it. Use when directly setting fields in structs. More...
bool | is_empty () const
| Checks whether the state set is empty, i.e. has no states set. More...
bool | add_state (Atk::StateType type)
| Adds the state of the specified type to the state set if it is not already present. More...
void | add_states (const std::vector< Atk::StateType > & types)
void | clear_states ()
| Removes all states from the state set. More...
bool | contains_state (Atk::StateType type)
| Checks whether the state for the specified type is in the specified set. More...
bool | contains_states (const std::vector< Atk::StateType > & types) const
bool | remove_state (Atk::StateType type)
| Removes the state for the specified type from the state set. More...
Glib::RefPtr< StateSet > | and_sets (const Glib::RefPtr< StateSet > & compare_set)
| Constructs the intersection of the two sets, returning `nullptr` if the intersection is empty. More...
Glib::RefPtr< StateSet > | or_sets (const Glib::RefPtr< StateSet > & compare_set)
| Constructs the union of the two sets. More...
Glib::RefPtr< StateSet > | xor_sets (const Glib::RefPtr< StateSet > & compare_set)
| Constructs the exclusive-or of the two sets, returning `nullptr` is empty. More...
Public Member Functions inherited from Glib::Object
| Object (const Object &)=delete
Object & | operator= (const Object &)=delete
| Object (Object &&src) noexcept
Object & | operator= (Object &&src) noexcept
void * | get_data (const QueryQuark &key)
void | set_data (const Quark &key, void *data)
void | set_data (const Quark &key, void *data, DestroyNotify notify)
void | remove_data (const QueryQuark &quark)
void * | steal_data (const QueryQuark &quark)
Glib::RefPtr< Glib::Object > | wrap (GObject *object, bool take_copy=false)
Public Member Functions inherited from Glib::ObjectBase
| ObjectBase (const ObjectBase &)=delete
ObjectBase & | operator= (const ObjectBase &)=delete
void | set_property_value (const Glib::ustring &property_name, const Glib::ValueBase &value)
void | get_property_value (const Glib::ustring &property_name, Glib::ValueBase &value) const
void | set_property (const Glib::ustring &property_name, const PropertyType &value)
void | get_property (const Glib::ustring &property_name, PropertyType &value) const
PropertyType | get_property (const Glib::ustring &property_name) const
sigc::connection | connect_property_changed (const Glib::ustring &property_name, const sigc::slot< void()> &slot)
sigc::connection | connect_property_changed (const Glib::ustring &property_name, sigc::slot< void()> &&slot)
void | freeze_notify ()
void | thaw_notify ()
virtual void | reference () const
virtual void | unreference () const
GObject * | gobj ()
const GObject * | gobj () const
GObject * | gobj_copy () const

## Static Public Member Functions
static GType | get_type ()
| Get the GType for this class, for use with the underlying GObject type system. More...
static Glib::RefPtr< StateSet > | create ()

## Protected Member Functions
| StateSet ()
Protected Member Functions inherited from Glib::Object
| Object ()
| Object (const Glib::ConstructParams &construct_params)
| Object (GObject *castitem)
| ~Object () noexcept override
Protected Member Functions inherited from Glib::ObjectBase
| ObjectBase ()
| ObjectBase (const char *custom_type_name)
| ObjectBase (const std::type_info &custom_type_info)
| ObjectBase (ObjectBase &&src) noexcept
ObjectBase & | operator= (ObjectBase &&src) noexcept
virtual | ~ObjectBase () noexcept=0
void | initialize (GObject *castitem)
void | initialize_move (GObject *castitem, Glib::ObjectBase *previous_wrapper)

## Related Functions
(Note that these are not member functions.)
Glib::RefPtr< Atk::StateSet > | wrap (AtkStateSet * object, bool take_copy=false)
| A Glib::wrap() method for this object. More...

## Additional Inherited Members
Public Types inherited from Glib::Object
typedef void(*)(gpointer data | DestroyNotify)

## Detailed Description

An AtkStateSet determines a component's state set.

It is composed of a set of Atk::States.

## Constructor & Destructor Documentation

## ◆ StateSet() [1/2]

Atk::StateSet::StateSet | ( | StateSet && | src | ) |
| noexcept

## ◆ ~StateSet()

Atk::StateSet::~StateSet | ( |  | ) |
| overridenoexcept

## ◆ StateSet() [2/2]

Atk::StateSet::StateSet | ( |  | ) |
| protected

## Member Function Documentation

## ◆ add_state()

bool Atk::StateSet::add_state | ( | Atk::StateType | 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 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

  type | An Atk::StateType.

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

## ◆ add_states()

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

## ◆ and_sets()

Glib::RefPtr< StateSet > Atk::StateSet::and_sets | ( | const Glib::RefPtr< StateSet > & | compare_set | ) |

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

Parameters

  compare_set | Another Atk::StateSet.

Returns
  A new Atk::StateSet which is the intersection of the two sets.

## ◆ clear_states()

void Atk::StateSet::clear_states | ( |  | ) |

Removes all states from the state set.

## ◆ contains_state()

bool Atk::StateSet::contains_state | ( | Atk::StateType | type | ) |

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

Parameters

  type | An Atk::StateType.

Returns
  `true` if type is the state type is in set.

## ◆ contains_states()

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

## ◆ create()

static Glib::RefPtr< StateSet > Atk::StateSet::create | ( |  | ) |
| static

## ◆ get_type()

static GType Atk::StateSet::get_type | ( |  | ) |
| static

Get the GType for this class, for use with the underlying GObject type system.

## ◆ gobj() [1/2]

AtkStateSet * Atk::StateSet::gobj | ( |  | ) |
| inline

Provides access to the underlying C GObject.

## ◆ gobj() [2/2]

const AtkStateSet * Atk::StateSet::gobj | ( |  | ) | const
| inline

Provides access to the underlying C GObject.

## ◆ gobj_copy()

AtkStateSet * Atk::StateSet::gobj_copy | ( |  | ) |

Provides access to the underlying C instance. The caller is responsible for unrefing it. Use when directly setting fields in structs.

## ◆ is_empty()

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

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

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

## ◆ operator=()

StateSet & Atk::StateSet::operator= | ( | StateSet && | src | ) |
| noexcept

## ◆ or_sets()

Glib::RefPtr< StateSet > Atk::StateSet::or_sets | ( | const Glib::RefPtr< StateSet > & | compare_set | ) |

Constructs the union of the two sets.

Parameters

  compare_set | Another Atk::StateSet.

Returns
  A new Atk::StateSet which is the union of the two sets, returning `nullptr` is empty.

## ◆ remove_state()

bool Atk::StateSet::remove_state | ( | Atk::StateType | 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 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

  type | An Atk::Type.

Returns
  `true` if type was the state type is in set.

## ◆ xor_sets()

Glib::RefPtr< StateSet > Atk::StateSet::xor_sets | ( | const Glib::RefPtr< StateSet > & | compare_set | ) |

Constructs the exclusive-or of the two sets, returning `nullptr` is empty.

The set returned by this operation contains the states in exactly one of the two sets.

Parameters

  compare_set | Another Atk::StateSet.

Returns
  A new Atk::StateSet which contains the states which are in exactly one of the two sets.

## Friends And Related Function Documentation

## ◆ wrap()

Glib::RefPtr< Atk::StateSet > wrap | ( | AtkStateSet * | object,
|  | bool | take_copy = `false`
| ) |  |
| related

A Glib::wrap() method for this object.

Parameters

  object | The C instance.
  take_copy | False if the result should take ownership of the C instance. True if it should take a new copy or ref.

Returns
  A C++ instance that wraps this C instance.