Debian Codegraph @

atk/src/relation.hg

raw
1 /* $Id: relation.hg,v 1.3 2005/01/05 18:21:30 murrayc Exp $ */
2
3 /* Copyright (C) 1998-2002 The gtkmm Development Team
4 *
5 * This library is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU Lesser General Public
7 * License as published by the Free Software Foundation; either
8 * version 2.1 of the License, or (at your option) any later version.
9 *
10 * This library is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 * Lesser General Public License for more details.
14 *
15 * You should have received a copy of the GNU Lesser General Public
16 * License along with this library; if not, see <https://www.gnu.org/licenses/>.
17 */
18
19 _CONFIGINCLUDE(atkmmconfig.h)
20
21 _DEFS(atkmm,atk)
22 _PINCLUDE(glibmm/private/object_p.h)
23
24 #include <glibmm/object.h>
25 #include <glibmm/arrayhandle.h>
26
27 namespace Atk
28 {
29
30 _CC_INCLUDE(atk/atk-enum-types.h)
31 _WRAP_ENUM(RelationType, AtkRelationType, decl_prefix ATKMM_API)
32
33 class ATKMM_API Object;
34
35 /** An Atk::Relation describes a relation between an object and one or more other objects.
36 * The actual relations that an object has with other objects are defined as an Atk::RelationSet,
37 * which is a set of Atk::Relations.
38 */
39 class ATKMM_API Relation : public Glib::Object
40 {
41 _CLASS_GOBJECT(Relation, AtkRelation, ATK_RELATION, Glib::Object, GObject, , , ATKMM_API)
42
43 protected:
44 explicit Relation(const Glib::ArrayHandle< Glib::RefPtr<Atk::Object> >& targets,
45 RelationType relationship);
46
47 public:
48 _WRAP_CREATE(const Glib::ArrayHandle< Glib::RefPtr<Atk::Object> >& targets,
49 RelationType relationship = RELATION_NULL)
50
51 _WRAP_METHOD(RelationType get_relation_type() const, atk_relation_get_relation_type)
52
53 Glib::ArrayHandle< Glib::RefPtr<Atk::Object> > get_target();
54 Glib::ArrayHandle< Glib::RefPtr<const Atk::Object> > get_target() const;
55 _IGNORE(atk_relation_get_target)
56
57 _WRAP_METHOD(void add_target(const Glib::RefPtr<Atk::Object>& target), atk_relation_add_target)
58 };
59
60 } // namespace Atk