2 // Generated by gtkmmproc -- DO NOT MODIFY!
3 #ifndef _ATKMM_RELATIONSET_H
4 #define _ATKMM_RELATIONSET_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 #include <atkmm/relation.h>
30 #include <atkmm/object.h>
33 #ifndef DOXYGEN_SHOULD_SKIP_THIS
34 typedef struct _AtkRelationSet AtkRelationSet;
35 typedef struct _AtkRelationSetClass AtkRelationSetClass;
36 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
40 { class RelationSet_Class; } // namespace Atk
44 /** A set of Atk::Relations, normally the set of AtkRelations which an Atk::Object has.
47 class RelationSet : public Glib::Object
50 #ifndef DOXYGEN_SHOULD_SKIP_THIS
53 typedef RelationSet CppObjectType;
54 typedef RelationSet_Class CppClassType;
55 typedef AtkRelationSet BaseObjectType;
56 typedef AtkRelationSetClass BaseClassType;
58 private: friend class RelationSet_Class;
59 static CppClassType relationset_class_;
63 RelationSet(const RelationSet&);
64 RelationSet& operator=(const RelationSet&);
67 explicit RelationSet(const Glib::ConstructParams& construct_params);
68 explicit RelationSet(AtkRelationSet* castitem);
70 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
73 virtual ~RelationSet();
75 #ifndef DOXYGEN_SHOULD_SKIP_THIS
76 static GType get_type() G_GNUC_CONST;
77 static GType get_base_type() G_GNUC_CONST;
80 ///Provides access to the underlying C GObject.
81 AtkRelationSet* gobj() { return reinterpret_cast<AtkRelationSet*>(gobject_); }
83 ///Provides access to the underlying C GObject.
84 const AtkRelationSet* gobj() const { return reinterpret_cast<AtkRelationSet*>(gobject_); }
86 ///Provides access to the underlying C instance. The caller is responsible for unrefing it. Use when directly setting fields in structs.
87 AtkRelationSet* gobj_copy();
96 static Glib::RefPtr<RelationSet> create();
99 /** Determines whether the relation set contains a relation that matches the
101 * @param relationship An Atk::RelationType.
102 * @return <tt>true</tt> if @a relationship is the relationship type of a relation
103 * in @a set , <tt>false</tt> otherwise.
105 bool set_contains(RelationType relationship);
107 /** Removes a relation from the relation set.
108 * This function unref's the Atk::Relation so it will be deleted unless there
109 * is another reference to it.
110 * @param relation An Atk::Relation.
112 void set_remove(const Glib::RefPtr<Relation>& relation);
114 /** Add a new relation to the current relation set if it is not already
116 * This function ref's the AtkRelation so the caller of this function
117 * should unref it to ensure that it will be destroyed when the AtkRelationSet
119 * @param relation An Atk::Relation.
121 void set_add(const Glib::RefPtr<Relation>& relation);
123 /** Determines the number of relations in a relation set.
124 * @return An integer representing the number of relations in the set.
126 int get_n_relations() const;
128 /** Determines the relation at the specified position in the relation set.
129 * @param i A <tt>int</tt> representing a position in the set, starting from 0.
130 * @return A Atk::Relation, which is the relation at position i in the set.
132 Glib::RefPtr<Relation> get_relation(gint i);
134 /** Finds a relation that matches the specified type.
135 * @param relationship An Atk::RelationType.
136 * @return An Atk::Relation, which is a relation matching the specified type.
138 Glib::RefPtr<Relation> get_relation(RelationType relationship);
141 /** Add a new relation of the specified type with the specified target to
142 * the current relation set if the relation set does not contain a relation
143 * of that type. If it is does contain a relation of that typea the target
144 * is added to the relation.
147 * @param relationship An Atk::RelationType.
148 * @param target An Atk::Object.
150 void add_relation_by_type(RelationType relationship, const Glib::RefPtr<Atk::Object>& target);
156 //C++ methods used to invoke GTK+ virtual functions:
157 #ifdef GLIBMM_VFUNCS_ENABLED
158 #endif //GLIBMM_VFUNCS_ENABLED
161 //GTK+ Virtual Functions (override these to change behaviour):
162 #ifdef GLIBMM_VFUNCS_ENABLED
163 #endif //GLIBMM_VFUNCS_ENABLED
165 //Default Signal Handlers::
166 #ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED
167 #endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED
177 /** A Glib::wrap() method for this object.
179 * @param object The C instance.
180 * @param take_copy False if the result should take ownership of the C instance. True if it should take a new copy or ref.
181 * @result A C++ instance that wraps this C instance.
183 * @relates Atk::RelationSet
185 Glib::RefPtr<Atk::RelationSet> wrap(AtkRelationSet* object, bool take_copy = false);
189 #endif /* _ATKMM_RELATIONSET_H */