// Generated by gmmproc 2.64.2 -- 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*)
{
  const auto 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 != nullptr);


}


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(ControlParameter&& src) noexcept
: Glib::Interface(std::move(src))
{}

ControlParameter& ControlParameter::operator=(ControlParameter&& src) noexcept
{
  Glib::Interface::operator=(std::move(src));
  return *this;
}

ControlParameter::~ControlParameter() noexcept
{}

// 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(const std::string& group, const std::string& name, double lower, double upper, double step)
{
  gx_control_parameter_cp_configure(gobj(), group.c_str(), 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());
}

std::string ControlParameter::cp_get_var()
{
  return Glib::convert_const_gchar_ptr_to_stdstring(gx_control_parameter_cp_get_var(gobj()));
}

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


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

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


} // namespace Gxw


