// -*- c++ -*-
// Generated by gtkmmproc -- DO NOT MODIFY!
#ifndef _GEGLMM_CURVE_H
#define _GEGLMM_CURVE_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-curve.h>


#ifndef DOXYGEN_SHOULD_SKIP_THIS
typedef struct _GeglCurve GeglCurve;
typedef struct _GeglCurveClass GeglCurveClass;
#endif /* DOXYGEN_SHOULD_SKIP_THIS */


namespace Gegl
{ class Curve_Class; } // namespace Gegl
namespace Gegl {


class Curve 
	: public Glib::Object
{
	
#ifndef DOXYGEN_SHOULD_SKIP_THIS

public:
  typedef Curve CppObjectType;
  typedef Curve_Class CppClassType;
  typedef GeglCurve BaseObjectType;
  typedef GeglCurveClass BaseClassType;

private:  friend class Curve_Class;
  static CppClassType curve_class_;

private:
  // noncopyable
  Curve(const Curve&);
  Curve& operator=(const Curve&);

protected:
  explicit Curve(const Glib::ConstructParams& construct_params);
  explicit Curve(GeglCurve* castitem);

#endif /* DOXYGEN_SHOULD_SKIP_THIS */

public:
  virtual ~Curve();

#ifndef DOXYGEN_SHOULD_SKIP_THIS
  static GType get_type()      G_GNUC_CONST;


  static GType get_base_type() G_GNUC_CONST;
#endif

  ///Provides access to the underlying C GObject.
  GeglCurve*       gobj()       { return reinterpret_cast<GeglCurve*>(gobject_); }

  ///Provides access to the underlying C GObject.
  const GeglCurve* gobj() const { return reinterpret_cast<GeglCurve*>(gobject_); }

  ///Provides access to the underlying C instance. The caller is responsible for unrefing it. Use when directly setting fields in structs.
  GeglCurve* gobj_copy();

private:


protected:
	  explicit Curve(double y_min, double y_max);


public:
	
  static Glib::RefPtr<Curve> create(double y_min, double y_max);

	
  static Glib::RefPtr<Curve> create_default_curve(); //TODO: The default values should be in the C properties or its *_init(), so we don't need to use this C function.

	
  void get_y_bounds(double & min_y, double & max_y) const;
    // this one is defined but still not implemented.
    //	_WRAP_METHOD(void get_bounds(double & min_x, double & max_x, double & min_y, double & max_y), gegl_curve_get_bounds)
	
  guint add_point(double x, double y);
	
  void get_point(guint index, double & x, double & y) const;
	
  void set_point(guint index, double x, double y);
	
  guint num_points() const;
	
  double calc_value(double x);
	
  void calc_values(double x_min, double x_max, guint num_samples, double & xs, double & ys);

	//	_WRAP_METHOD(static GParamSpec* spec_curve(const Glib::ustring & name, const Glib::ustring & nick, const Glib::ustring & blurb, const Glib::RefPtr<Curve> & default_curve, GParamFlags flags), gegl_param_spec_curve)


public:

public:
  //C++ methods used to invoke GTK+ virtual functions:

protected:
  //GTK+ Virtual Functions (override these to change behaviour):

  //Default Signal Handlers::


};

}


namespace Glib
{
  /** A Glib::wrap() method for this object.
   * 
   * @param object The C instance.
   * @param take_copy False if the result should take ownership of the C instance. True if it should take a new copy or ref.
   * @result A C++ instance that wraps this C instance.
   *
   * @relates Gegl::Curve
   */
  Glib::RefPtr<Gegl::Curve> wrap(GeglCurve* object, bool take_copy = false);
}


#endif /* _GEGLMM_CURVE_H */

