// Generated by gmmproc 2.72.1 -- DO NOT MODIFY!


#include <glibmm.h>

#include <gtkmm/levelbar.h>
#include <gtkmm/private/levelbar_p.h>


/* Copyright (C) 2012 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., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
 */

#include <gtk/gtk.h>

using Mode = Gtk::LevelBar::Mode;

namespace
{


static void LevelBar_signal_offset_changed_callback(GtkLevelBar* self, const gchar* p0,void* data)
{
  using namespace Gtk;
  using SlotType = sigc::slot<void(const Glib::ustring&)>;

  auto obj = dynamic_cast<LevelBar*>(Glib::ObjectBase::_get_current_wrapper((GObject*) self));
  // Do not try to call a signal on a disassociated wrapper.
  if(obj)
  {
    try
    {
      if(const auto slot = Glib::SignalProxyNormal::data_to_slot(data))
        (*static_cast<SlotType*>(slot))(Glib::convert_const_gchar_ptr_to_ustring(p0)
);
    }
    catch(...)
    {
       Glib::exception_handlers_invoke();
    }
  }
}

static const Glib::SignalProxyInfo LevelBar_signal_offset_changed_info =
{
  "offset_changed",
  (GCallback) &LevelBar_signal_offset_changed_callback,
  (GCallback) &LevelBar_signal_offset_changed_callback
};


} // anonymous namespace

// static
GType Glib::Value<Gtk::LevelBar::Mode>::value_type()
{
  return gtk_level_bar_mode_get_type();
}


namespace Glib
{

Gtk::LevelBar* wrap(GtkLevelBar* object, bool take_copy)
{
  return dynamic_cast<Gtk::LevelBar *> (Glib::wrap_auto ((GObject*)(object), take_copy));
}

} /* namespace Glib */

namespace Gtk
{


/* The *_Class implementation: */

const Glib::Class& LevelBar_Class::init()
{
  if(!gtype_) // create the GType if necessary
  {
    // Glib::Class has to know the class init function to clone custom types.
    class_init_func_ = &LevelBar_Class::class_init_function;

    // This is actually just optimized away, apparently with no harm.
    // Make sure that the parent type has been created.
    //CppClassParent::CppObjectType::get_type();

    // Create the wrapper type, with the same class/instance size as the base type.
    register_derived_type(gtk_level_bar_get_type());

    // Add derived versions of interfaces, if the C type implements any interfaces:
  Orientable::add_interface(get_type());

  }

  return *this;
}


void LevelBar_Class::class_init_function(void* g_class, void* class_data)
{
  const auto klass = static_cast<BaseClassType*>(g_class);
  CppClassParent::class_init_function(klass, class_data);


}


Glib::ObjectBase* LevelBar_Class::wrap_new(GObject* o)
{
  return manage(new LevelBar((GtkLevelBar*)(o)));

}


/* The implementation: */

LevelBar::LevelBar(const Glib::ConstructParams& construct_params)
:
  Gtk::Widget(construct_params)
{
  }

LevelBar::LevelBar(GtkLevelBar* castitem)
:
  Gtk::Widget((GtkWidget*)(castitem))
{
  }


LevelBar::LevelBar(LevelBar&& src) noexcept
: Gtk::Widget(std::move(src))
  , Orientable(std::move(src))
{}

LevelBar& LevelBar::operator=(LevelBar&& src) noexcept
{
  Gtk::Widget::operator=(std::move(src));
  Orientable::operator=(std::move(src));
  return *this;
}

LevelBar::~LevelBar() noexcept
{
  destroy_();
}

LevelBar::CppClassType LevelBar::levelbar_class_; // initialize static member

GType LevelBar::get_type()
{
  return levelbar_class_.init().get_type();
}


GType LevelBar::get_base_type()
{
  return gtk_level_bar_get_type();
}


LevelBar::LevelBar()
:
  // Mark this class as non-derived to allow C++ vfuncs to be skipped.
  Glib::ObjectBase(nullptr),
  Gtk::Widget(Glib::ConstructParams(levelbar_class_.init()))
{
  

}

void LevelBar::set_mode(Mode mode)
{
  gtk_level_bar_set_mode(gobj(), static_cast<GtkLevelBarMode>(mode));
}

Mode LevelBar::get_mode() const
{
  return static_cast<Mode>(gtk_level_bar_get_mode(const_cast<GtkLevelBar*>(gobj())));
}

void LevelBar::set_value(double value)
{
  gtk_level_bar_set_value(gobj(), value);
}

double LevelBar::get_value() const
{
  return gtk_level_bar_get_value(const_cast<GtkLevelBar*>(gobj()));
}

void LevelBar::set_min_value(double value)
{
  gtk_level_bar_set_min_value(gobj(), value);
}

double LevelBar::get_min_value() const
{
  return gtk_level_bar_get_min_value(const_cast<GtkLevelBar*>(gobj()));
}

void LevelBar::set_max_value(double value)
{
  gtk_level_bar_set_max_value(gobj(), value);
}

double LevelBar::get_max_value() const
{
  return gtk_level_bar_get_max_value(const_cast<GtkLevelBar*>(gobj()));
}

void LevelBar::set_inverted(bool inverted)
{
  gtk_level_bar_set_inverted(gobj(), static_cast<int>(inverted));
}

bool LevelBar::get_inverted() const
{
  return gtk_level_bar_get_inverted(const_cast<GtkLevelBar*>(gobj()));
}

void LevelBar::add_offset_value(const Glib::ustring& name, double value)
{
  gtk_level_bar_add_offset_value(gobj(), name.c_str(), value);
}

void LevelBar::remove_offset_value(const Glib::ustring& name)
{
  gtk_level_bar_remove_offset_value(gobj(), name.c_str());
}

bool LevelBar::get_offset_value(const Glib::ustring& name, double& value) const
{
  return gtk_level_bar_get_offset_value(const_cast<GtkLevelBar*>(gobj()), name.c_str(), &(value));
}


Glib::SignalProxyDetailed<void(const Glib::ustring&)> LevelBar::signal_offset_changed(const Glib::ustring& offset_name)
{
  return Glib::SignalProxyDetailed<void(const Glib::ustring&)>(this, &LevelBar_signal_offset_changed_info, offset_name);
}


Glib::PropertyProxy< double > LevelBar::property_value() 
{
  return Glib::PropertyProxy< double >(this, "value");
}

Glib::PropertyProxy_ReadOnly< double > LevelBar::property_value() const
{
  return Glib::PropertyProxy_ReadOnly< double >(this, "value");
}

Glib::PropertyProxy< double > LevelBar::property_min_value() 
{
  return Glib::PropertyProxy< double >(this, "min-value");
}

Glib::PropertyProxy_ReadOnly< double > LevelBar::property_min_value() const
{
  return Glib::PropertyProxy_ReadOnly< double >(this, "min-value");
}

Glib::PropertyProxy< double > LevelBar::property_max_value() 
{
  return Glib::PropertyProxy< double >(this, "max-value");
}

Glib::PropertyProxy_ReadOnly< double > LevelBar::property_max_value() const
{
  return Glib::PropertyProxy_ReadOnly< double >(this, "max-value");
}

static_assert(Glib::Traits::ValueCompatibleWithWrapProperty<Mode>::value,
  "Type Mode cannot be used in _WRAP_PROPERTY. "
  "There is no suitable template specialization of Glib::Value<>.");

Glib::PropertyProxy< Mode > LevelBar::property_mode() 
{
  return Glib::PropertyProxy< Mode >(this, "mode");
}

Glib::PropertyProxy_ReadOnly< Mode > LevelBar::property_mode() const
{
  return Glib::PropertyProxy_ReadOnly< Mode >(this, "mode");
}

Glib::PropertyProxy< bool > LevelBar::property_inverted() 
{
  return Glib::PropertyProxy< bool >(this, "inverted");
}

Glib::PropertyProxy_ReadOnly< bool > LevelBar::property_inverted() const
{
  return Glib::PropertyProxy_ReadOnly< bool >(this, "inverted");
}


} // namespace Gtk


