/* $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 Lesser General Public
 * License as published by the Free Software Foundation; either
 * version 2.1 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
 * Lesser General Public License for more details.
 *
 * You should have received a copy of the GNU Lesser General Public
 * License along with this library; if not, write to the Free
 * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
 */


_CONFIGINCLUDE(atkmmconfig.h)

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

#include <glibmm/object.h>
#include <glibmm/arrayhandle.h>

namespace Atk
{

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

class ATKMM_API 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 ATKMM_API Relation : public Glib::Object
{
  _CLASS_GOBJECT(Relation, AtkRelation, ATK_RELATION, Glib::Object, GObject, , , ATKMM_API)

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

