/* $Id: relation.hg,v 1.3 2005/01/05 18:21:30 murrayc Exp $ */

/* Copyright (C) 1998-2002 The gtkmm Development Team
 *
 * This library is free software; you can redistribute it and/or
 * modify it under the terms of the GNU Library General Public
 * License as published by the Free Software Foundation; either
 * version 2 of the License, or (at your option) any later version.
 *
 * This library is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 * Library General Public License for more details.
 *
 * You should have received a copy of the GNU Library General Public
 * License along with this library; if not, write to the Free
 * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
 */


_DEFS(atkmm,atk)
_PINCLUDE(glibmm/private/object_p.h)


namespace Atk
{

_CC_INCLUDE(atk/atk-enum-types.h)
_WRAP_ENUM(RelationType, AtkRelationType)

class Object;

/** An Atk::Relation describes a relation between an object and one or more other objects.
 * The actual relations that an object has with other objects are defined as an Atk::RelationSet,
 * which is a set of Atk::Relations.
 */
class Relation : public Glib::Object
{
  _CLASS_GOBJECT(Relation, AtkRelation, ATK_RELATION, Glib::Object, GObject)

protected:
  explicit Relation(const Glib::ArrayHandle< Glib::RefPtr<Atk::Object> >& targets,
                    RelationType relationship);

public:
  _WRAP_CREATE(const Glib::ArrayHandle< Glib::RefPtr<Atk::Object> >& targets,
               RelationType relationship = RELATION_NULL)

  _WRAP_METHOD(RelationType get_relation_type() const, atk_relation_get_relation_type)

  Glib::ArrayHandle< Glib::RefPtr<Atk::Object> > get_target();
  Glib::ArrayHandle< Glib::RefPtr<const Atk::Object> > get_target() const;
  _IGNORE(atk_relation_get_target)
  
  _WRAP_METHOD(void add_target(const Glib::RefPtr<Atk::Object>& target), atk_relation_add_target)
};

} // namespace Atk

