// -*- c++ -*-
// Generated by gtkmmproc -- DO NOT MODIFY!
#ifndef _GEGLMM_RECTANGLE_H
#define _GEGLMM_RECTANGLE_H


#include <glibmm.h>

/* libgeglmm - a C++ wrapper for libgegl
 *
 * (c) 2008 Hubert Figuiere
 *
 * 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 3 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 GEGL; if not, see <http://www.gnu.org/licenses/>.
 */

#include <gegl.h>
#include <gegl-utils.h>


namespace Gegl {

class Rectangle 
{
	public:
#ifndef DOXYGEN_SHOULD_SKIP_THIS
  typedef Rectangle CppObjectType;
  typedef GeglRectangle BaseObjectType;

  static GType get_type() G_GNUC_CONST;
#endif /* DOXYGEN_SHOULD_SKIP_THIS */

  Rectangle();

  explicit Rectangle(const GeglRectangle* gobject); // always takes a copy

  ///Provides access to the underlying C instance.
  GeglRectangle*       gobj()       { return &gobject_; }

  ///Provides access to the underlying C instance.
  const GeglRectangle* gobj() const { return &gobject_; }

protected:
  GeglRectangle gobject_;

private:
  
public:
	//	_CTOR_DEFAULT
	Rectangle(const GeglRectangle & rect); //TODO: Doesn't _CLASS_BOXEDTYPE_STATIC() create a GegRectangle* constructor already?

	
  void set(int x, int y, guint witdth, guint height);
	
  bool equal(const Rectangle & s) const; //TODO: Rename to operator==() const?
	
  bool equal_coords(int x, int y, int width, int heght) const;
  
  bool is_empty() const;
	
  void copy(const Rectangle & from); //Rename to copy constructor?
	
  void bounding_box(const Rectangle & src1, const Rectangle & src2);
	
  bool intersect(const Rectangle & src1, const Rectangle & src2); //TODO: Make this const?
	
  bool contains(const Rectangle & s) const;
  
  bool is_infinite_plane() const;
  
  void dump() const;


};

}


namespace Glib
{

/** @relates Gegl::Rectangle
 * @param object The C instance
 * @result A C++ instance that wraps this C instance.
 */
Gegl::Rectangle& wrap(GeglRectangle* object);

/** @relates Gegl::Rectangle
 * @param object The C instance
 * @result A C++ instance that wraps this C instance.
 */
const Gegl::Rectangle& wrap(const GeglRectangle* object);

#ifndef DOXYGEN_SHOULD_SKIP_THIS
template <>
class Value<Gegl::Rectangle> : public Glib::Value_Boxed<Gegl::Rectangle>
{};
#endif /* DOXYGEN_SHOULD_SKIP_THIS */

} // namespace Glib


#endif /* _GEGLMM_RECTANGLE_H */

