// Generated by gtkmmproc -- DO NOT MODIFY!


#include <glibmm.h>

#include <gxwmm/controlparameter.h>
#include <gxwmm/private/controlparameter_p.h>


/*
 * Copyright (C) 2009, 2010 Hermann Meyer, James Warden, Andreas Degert
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; either version 2 of the License, or
 * (at your option) any later version.
 *
 * This program 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 General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
 */

#include <gxw/GxControlParameter.h>

namespace
{
} // anonymous namespace


namespace Glib
{

Glib::RefPtr<Gxw::ControlParameter> wrap(GxControlParameter* object, bool take_copy)
{
  return Glib::RefPtr<Gxw::ControlParameter>( dynamic_cast<Gxw::ControlParameter*> (Glib::wrap_auto_interface<Gxw::ControlParameter> ((GObject*)(object), take_copy)) );
  //We use dynamic_cast<> in case of multiple inheritance.
}

} // namespace Glib


namespace Gxw
{


/* The *_Class implementation: */

const Glib::Interface_Class& ControlParameter_Class::init()
{
  if(!gtype_) // create the GType if necessary
  {
    // Glib::Interface_Class has to know the interface init function
    // in order to add interfaces to implementing types.
    class_init_func_ = &ControlParameter_Class::iface_init_function;

    // We can not derive from another interface, and it is not necessary anyway.
    gtype_ = gx_control_parameter_get_type();
  }

  return *this;
}

void ControlParameter_Class::iface_init_function(void* g_iface, void*)
{
  BaseClassType *const klass = static_cast<BaseClassType*>(g_iface);

  //This is just to avoid an "unused variable" warning when there are no vfuncs or signal handlers to connect.
  //This is a temporary fix until I find out why I can not seem to derive a GtkFileChooser interface. murrayc
  g_assert(klass != 0); 


}


Glib::ObjectBase* ControlParameter_Class::wrap_new(GObject* object)
{
  return new ControlParameter((GxControlParameter*)(object));
}


/* The implementation: */

ControlParameter::ControlParameter()
:
  Glib::Interface(controlparameter_class_.init())
{}

ControlParameter::ControlParameter(GxControlParameter* castitem)
:
  Glib::Interface((GObject*)(castitem))
{}

ControlParameter::ControlParameter(const Glib::Interface_Class& interface_class)
: Glib::Interface(interface_class)
{
}

ControlParameter::~ControlParameter()
{}

// static
void ControlParameter::add_interface(GType gtype_implementer)
{
  controlparameter_class_.init().add_interface(gtype_implementer);
}

ControlParameter::CppClassType ControlParameter::controlparameter_class_; // initialize static member

GType ControlParameter::get_type()
{
  return controlparameter_class_.init().get_type();
}


GType ControlParameter::get_base_type()
{
  return gx_control_parameter_get_type();
}


void ControlParameter::cp_configure(Glib::ustring group, Glib::ustring name, double lower, double upper, double step)
{
  gx_control_parameter_cp_configure(gobj(), g_strdup((group).c_str()), g_strdup((name).c_str()), lower, upper, step); 
}

void ControlParameter::cp_set_value(double value)
{
  gx_control_parameter_cp_set_value(gobj(), value); 
}

double ControlParameter::cp_get_value()
{
  return gx_control_parameter_cp_get_value(gobj());
}

int ControlParameter::cp_get_int_value()
{
  return gx_control_parameter_cp_get_int_value(gobj());
}

Glib::ustring ControlParameter::cp_get_var()
{
  return Glib::convert_return_gchar_ptr_to_ustring(gx_control_parameter_cp_get_var(gobj()));
}

void ControlParameter::cp_set_var(Glib::ustring p1)
{
  gx_control_parameter_cp_set_var(gobj(), g_strdup((p1).c_str())); 
}


#ifdef GLIBMM_PROPERTIES_ENABLED
Glib::PropertyProxy< Glib::ustring > ControlParameter::property_var_id() 
{
  return Glib::PropertyProxy< Glib::ustring >(this, "var-id");
}
#endif //GLIBMM_PROPERTIES_ENABLED

#ifdef GLIBMM_PROPERTIES_ENABLED
Glib::PropertyProxy_ReadOnly< Glib::ustring > ControlParameter::property_var_id() const
{
  return Glib::PropertyProxy_ReadOnly< Glib::ustring >(this, "var-id");
}
#endif //GLIBMM_PROPERTIES_ENABLED


} // namespace Gxw


