2 // Generated by gtkmmproc -- DO NOT MODIFY!
3 #ifndef _ATKMM_STATESET_H
4 #define _ATKMM_STATESET_H
11 /* Copyright (C) 1998-2002 The gtkmm Development Team
13 * This library is free software; you can redistribute it and/or
14 * modify it under the terms of the GNU Library General Public
15 * License as published by the Free Software Foundation; either
16 * version 2 of the License, or (at your option) any later version.
18 * This library is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
21 * Library General Public License for more details.
23 * You should have received a copy of the GNU Library General Public
24 * License along with this library; if not, write to the Free
25 * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
29 #ifndef DOXYGEN_SHOULD_SKIP_THIS
30 typedef struct _AtkStateSet AtkStateSet;
31 typedef struct _AtkStateSetClass AtkStateSetClass;
32 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
36 { class StateSet_Class; } // namespace Atk
41 /** @addtogroup atkmmEnums Enums and Flags */
64 STATE_MULTISELECTABLE,
77 STATE_MANAGES_DESCENDANTS,
87 #ifndef DOXYGEN_SHOULD_SKIP_THIS
92 class Value<Atk::StateType> : public Glib::Value_Enum<Atk::StateType>
95 static GType value_type() G_GNUC_CONST;
99 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
106 /** An AtkStateSet determines a component's state set.
107 * It is composed of a set of Atk::States.
110 class StateSet : public Glib::Object
113 #ifndef DOXYGEN_SHOULD_SKIP_THIS
116 typedef StateSet CppObjectType;
117 typedef StateSet_Class CppClassType;
118 typedef AtkStateSet BaseObjectType;
119 typedef AtkStateSetClass BaseClassType;
121 private: friend class StateSet_Class;
122 static CppClassType stateset_class_;
126 StateSet(const StateSet&);
127 StateSet& operator=(const StateSet&);
130 explicit StateSet(const Glib::ConstructParams& construct_params);
131 explicit StateSet(AtkStateSet* castitem);
133 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
138 #ifndef DOXYGEN_SHOULD_SKIP_THIS
139 static GType get_type() G_GNUC_CONST;
140 static GType get_base_type() G_GNUC_CONST;
143 ///Provides access to the underlying C GObject.
144 AtkStateSet* gobj() { return reinterpret_cast<AtkStateSet*>(gobject_); }
146 ///Provides access to the underlying C GObject.
147 const AtkStateSet* gobj() const { return reinterpret_cast<AtkStateSet*>(gobject_); }
149 ///Provides access to the underlying C instance. The caller is responsible for unrefing it. Use when directly setting fields in structs.
150 AtkStateSet* gobj_copy();
160 static Glib::RefPtr<StateSet> create();
163 /** Checks whether the state set is empty, i.e.\ has no states set.
164 * @return <tt>true</tt> if @a set has no states set, otherwise <tt>false</tt>.
166 bool is_empty() const;
168 //Note that we use Atk::StateType instead of StateType, because there is a Gtk::StateType too, and Doxygen gets confused.
170 /** Add a new state for the specified type to the current state set if
171 * it is not already present.
172 * @param type An Atk::StateType.
173 * @return <tt>true</tt> if the state for @a type is not already in @a set .
175 bool add_state(Atk::StateType type);
176 void add_states(const Glib::ArrayHandle<Atk::StateType>& types);
179 /** Removes all states from the state set.
183 /** Checks whether the state for the specified type is in the specified set.
184 * @param type An Atk::StateType.
185 * @return <tt>true</tt> if @a type is the state type is in @a set .
187 bool contains_state(Atk::StateType type);
188 bool contains_states(const Glib::ArrayHandle<Atk::StateType>& types) const;
191 /** Removes the state for the specified type from the state set.
192 * @param type An Atk::Type.
193 * @return <tt>true</tt> if @a type was the state type is in @a set .
195 bool remove_state(Atk::StateType type);
197 /** Constructs the intersection of the two sets, returning <tt>0</tt> if the
198 * intersection is empty.
199 * @param compare_set Another Atk::StateSet.
200 * @return A new Atk::StateSet which is the intersection of the two sets.
202 Glib::RefPtr<StateSet> and_sets(const Glib::RefPtr<StateSet>& compare_set);
204 /** Constructs the union of the two sets.
205 * @param compare_set Another Atk::StateSet.
206 * @return A new Atk::StateSet which is the union of the two sets,
207 * returning <tt>0</tt> is empty.
209 Glib::RefPtr<StateSet> or_sets(const Glib::RefPtr<StateSet>& compare_set);
211 /** Constructs the exclusive-or of the two sets, returning <tt>0</tt> is empty.
212 * The set returned by this operation contains the states in exactly
213 * one of the two sets.
214 * @param compare_set Another Atk::StateSet.
215 * @return A new Atk::StateSet which contains the states which are
216 * in exactly one of the two sets.
218 Glib::RefPtr<StateSet> xor_sets(const Glib::RefPtr<StateSet>& compare_set);
224 //C++ methods used to invoke GTK+ virtual functions:
225 #ifdef GLIBMM_VFUNCS_ENABLED
226 #endif //GLIBMM_VFUNCS_ENABLED
229 //GTK+ Virtual Functions (override these to change behaviour):
230 #ifdef GLIBMM_VFUNCS_ENABLED
231 #endif //GLIBMM_VFUNCS_ENABLED
233 //Default Signal Handlers::
234 #ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED
235 #endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED
245 /** A Glib::wrap() method for this object.
247 * @param object The C instance.
248 * @param take_copy False if the result should take ownership of the C instance. True if it should take a new copy or ref.
249 * @result A C++ instance that wraps this C instance.
251 * @relates Atk::StateSet
253 Glib::RefPtr<Atk::StateSet> wrap(AtkStateSet* object, bool take_copy = false);
257 #endif /* _ATKMM_STATESET_H */