2 // Generated by gtkmmproc -- DO NOT MODIFY!
3 #ifndef _ATKMM_RELATION_H
4 #define _ATKMM_RELATION_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 _AtkRelation AtkRelation;
31 typedef struct _AtkRelationClass AtkRelationClass;
32 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
36 { class Relation_Class; } // namespace Atk
41 /** @addtogroup atkmmEnums Enums and Flags */
49 RELATION_CONTROLLED_BY,
50 RELATION_CONTROLLER_FOR,
54 RELATION_NODE_CHILD_OF,
57 RELATION_SUBWINDOW_OF,
61 RELATION_PARENT_WINDOW_OF,
68 #ifndef DOXYGEN_SHOULD_SKIP_THIS
73 class Value<Atk::RelationType> : public Glib::Value_Enum<Atk::RelationType>
76 static GType value_type() G_GNUC_CONST;
80 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
89 /** An Atk::Relation describes a relation between an object and one or more other objects.
90 * The actual relations that an object has with other objects are defined as an Atk::RelationSet,
91 * which is a set of Atk::Relations.
94 class Relation : public Glib::Object
97 #ifndef DOXYGEN_SHOULD_SKIP_THIS
100 typedef Relation CppObjectType;
101 typedef Relation_Class CppClassType;
102 typedef AtkRelation BaseObjectType;
103 typedef AtkRelationClass BaseClassType;
105 private: friend class Relation_Class;
106 static CppClassType relation_class_;
110 Relation(const Relation&);
111 Relation& operator=(const Relation&);
114 explicit Relation(const Glib::ConstructParams& construct_params);
115 explicit Relation(AtkRelation* castitem);
117 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
122 #ifndef DOXYGEN_SHOULD_SKIP_THIS
123 static GType get_type() G_GNUC_CONST;
124 static GType get_base_type() G_GNUC_CONST;
127 ///Provides access to the underlying C GObject.
128 AtkRelation* gobj() { return reinterpret_cast<AtkRelation*>(gobject_); }
130 ///Provides access to the underlying C GObject.
131 const AtkRelation* gobj() const { return reinterpret_cast<AtkRelation*>(gobject_); }
133 ///Provides access to the underlying C instance. The caller is responsible for unrefing it. Use when directly setting fields in structs.
134 AtkRelation* gobj_copy();
140 explicit Relation(const Glib::ArrayHandle< Glib::RefPtr<Atk::Object> >& targets,
141 RelationType relationship);
145 static Glib::RefPtr<Relation> create(const Glib::ArrayHandle< Glib::RefPtr<Atk::Object> >& targets, RelationType relationship = RELATION_NULL);
148 /** Gets the type of @a relation
149 * @return The type of @a relation .
151 RelationType get_relation_type() const;
153 Glib::ArrayHandle< Glib::RefPtr<Atk::Object> > get_target();
154 Glib::ArrayHandle< Glib::RefPtr<const Atk::Object> > get_target() const;
157 /** Adds the specified AtkObject to the target for the relation, if it is
158 * not already present.
161 * @param target An Atk::Object.
163 void add_target(const Glib::RefPtr<Atk::Object>& target);
169 //C++ methods used to invoke GTK+ virtual functions:
170 #ifdef GLIBMM_VFUNCS_ENABLED
171 #endif //GLIBMM_VFUNCS_ENABLED
174 //GTK+ Virtual Functions (override these to change behaviour):
175 #ifdef GLIBMM_VFUNCS_ENABLED
176 #endif //GLIBMM_VFUNCS_ENABLED
178 //Default Signal Handlers::
179 #ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED
180 #endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED
190 /** A Glib::wrap() method for this object.
192 * @param object The C instance.
193 * @param take_copy False if the result should take ownership of the C instance. True if it should take a new copy or ref.
194 * @result A C++ instance that wraps this C instance.
196 * @relates Atk::Relation
198 Glib::RefPtr<Atk::Relation> wrap(AtkRelation* object, bool take_copy = false);
202 #endif /* _ATKMM_RELATION_H */