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


#include <glibmm.h>

#include <gtkmm/label.h>
#include <gtkmm/private/label_p.h>


/* Copyright 1998-2002 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>

namespace Gtk
{

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

Label::Label(const Glib::ustring& label, bool mnemonic)
:
  // Mark this class as non-derived to allow C++ vfuncs to be skipped.
  Glib::ObjectBase(nullptr),
  Gtk::Widget(Glib::ConstructParams(label_class_.init(), "label",label.c_str(),"use_underline",gboolean(mnemonic), nullptr))
{}

Label::Label(const Glib::ustring& label, Align halign, Align valign, bool mnemonic)
:
  // Mark this class as non-derived to allow C++ vfuncs to be skipped.
  Glib::ObjectBase(nullptr),
  Gtk::Widget(Glib::ConstructParams(label_class_.init(), "label",label.c_str(),"use_underline",gboolean(mnemonic), nullptr))
{
  set_halign(halign);
  set_valign(valign);
}

void Label::select_region(int start_offset)
{
  gtk_label_select_region(gobj(), start_offset, -1 /* See C docs */);
}

} // namespace Gtk

namespace
{


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

  auto obj = dynamic_cast<Label*>(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))
        return static_cast<int>((*static_cast<SlotType*>(slot))(Glib::convert_const_gchar_ptr_to_ustring(p0)
));
    }
    catch(...)
    {
       Glib::exception_handlers_invoke();
    }
  }

  using RType = gboolean;
  return RType();
}

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

  auto obj = dynamic_cast<Label*>(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();
    }
  }

  using RType = gboolean;
  return RType();
}

static const Glib::SignalProxyInfo Label_signal_activate_link_info =
{
  "activate-link",
  (GCallback) &Label_signal_activate_link_callback,
  (GCallback) &Label_signal_activate_link_notify_callback
};


} // anonymous namespace


namespace Glib
{

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

} /* namespace Glib */

namespace Gtk
{


/* The *_Class implementation: */

const Glib::Class& Label_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_ = &Label_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_label_get_type());

    // Add derived versions of interfaces, if the C type implements any interfaces:

  }

  return *this;
}


void Label_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* Label_Class::wrap_new(GObject* o)
{
  return manage(new Label((GtkLabel*)(o)));

}


/* The implementation: */

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

Label::Label(GtkLabel* castitem)
:
  Gtk::Widget((GtkWidget*)(castitem))
{
  }


Label::Label(Label&& src) noexcept
: Gtk::Widget(std::move(src))
{}

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

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

Label::CppClassType Label::label_class_; // initialize static member

GType Label::get_type()
{
  return label_class_.init().get_type();
}


GType Label::get_base_type()
{
  return gtk_label_get_type();
}


void Label::set_text(const Glib::ustring & str)
{
  gtk_label_set_text(gobj(), str.c_str());
}

Glib::ustring Label::get_text() const
{
  return Glib::convert_const_gchar_ptr_to_ustring(gtk_label_get_text(const_cast<GtkLabel*>(gobj())));
}

void Label::set_attributes(Pango::AttrList& attrs)
{
  gtk_label_set_attributes(gobj(), (attrs).gobj());
}

Pango::AttrList Label::get_attributes() const
{
  return Pango::AttrList((gtk_label_get_attributes(const_cast<GtkLabel*>(gobj()))));
}

void Label::set_label(const Glib::ustring& str)
{
  gtk_label_set_label(gobj(), str.c_str());
}

Glib::ustring Label::get_label() const
{
  return Glib::convert_const_gchar_ptr_to_ustring(gtk_label_get_label(const_cast<GtkLabel*>(gobj())));
}

void Label::set_markup(const Glib::ustring& str)
{
  gtk_label_set_markup(gobj(), str.c_str());
}

void Label::set_use_markup(bool setting)
{
  gtk_label_set_use_markup(gobj(), static_cast<int>(setting));
}

bool Label::get_use_markup() const
{
  return gtk_label_get_use_markup(const_cast<GtkLabel*>(gobj()));
}

void Label::set_use_underline(bool setting)
{
  gtk_label_set_use_underline(gobj(), static_cast<int>(setting));
}

bool Label::get_use_underline() const
{
  return gtk_label_get_use_underline(const_cast<GtkLabel*>(gobj()));
}

void Label::set_markup_with_mnemonic(const Glib::ustring& str)
{
  gtk_label_set_markup_with_mnemonic(gobj(), str.c_str());
}

guint Label::get_mnemonic_keyval() const
{
  return gtk_label_get_mnemonic_keyval(const_cast<GtkLabel*>(gobj()));
}

void Label::set_mnemonic_widget(Widget& widget)
{
  gtk_label_set_mnemonic_widget(gobj(), (widget).gobj());
}

Widget* Label::get_mnemonic_widget()
{
  return Glib::wrap(gtk_label_get_mnemonic_widget(gobj()));
}

const Widget* Label::get_mnemonic_widget() const
{
  return Glib::wrap(gtk_label_get_mnemonic_widget(const_cast<GtkLabel*>(gobj())));
}

void Label::set_text_with_mnemonic(const Glib::ustring& str)
{
  gtk_label_set_text_with_mnemonic(gobj(), str.c_str());
}

void Label::set_justify(Justification jtype)
{
  gtk_label_set_justify(gobj(), static_cast<GtkJustification>(jtype));
}

Justification Label::get_justify() const
{
  return static_cast<Justification>(gtk_label_get_justify(const_cast<GtkLabel*>(gobj())));
}

void Label::set_ellipsize(Pango::EllipsizeMode mode)
{
  gtk_label_set_ellipsize(gobj(), static_cast<PangoEllipsizeMode>(mode));
}

Pango::EllipsizeMode Label::get_ellipsize() const
{
  return static_cast<Pango::EllipsizeMode>(gtk_label_get_ellipsize(const_cast<GtkLabel*>(gobj())));
}

void Label::set_width_chars(int n_chars)
{
  gtk_label_set_width_chars(gobj(), n_chars);
}

int Label::get_width_chars() const
{
  return gtk_label_get_width_chars(const_cast<GtkLabel*>(gobj()));
}

void Label::set_max_width_chars(int n_chars)
{
  gtk_label_set_max_width_chars(gobj(), n_chars);
}

int Label::get_max_width_chars() const
{
  return gtk_label_get_max_width_chars(const_cast<GtkLabel*>(gobj()));
}

void Label::set_lines(int lines)
{
  gtk_label_set_lines(gobj(), lines);
}

int Label::get_lines() const
{
  return gtk_label_get_lines(const_cast<GtkLabel*>(gobj()));
}

void Label::set_wrap(bool wrap)
{
  gtk_label_set_wrap(gobj(), static_cast<int>(wrap));
}

bool Label::get_wrap() const
{
  return gtk_label_get_wrap(const_cast<GtkLabel*>(gobj()));
}

void Label::set_wrap_mode(Pango::WrapMode wrap_mode)
{
  gtk_label_set_wrap_mode(gobj(), static_cast<PangoWrapMode>(wrap_mode));
}

Pango::WrapMode Label::get_wrap_mode() const
{
  return static_cast<Pango::WrapMode>(gtk_label_get_wrap_mode(const_cast<GtkLabel*>(gobj())));
}

void Label::set_natural_wrap_mode(NaturalWrapMode wrap_mode)
{
  gtk_label_set_natural_wrap_mode(gobj(), static_cast<GtkNaturalWrapMode>(wrap_mode));
}

NaturalWrapMode Label::get_natural_wrap_mode() const
{
  return static_cast<NaturalWrapMode>(gtk_label_get_natural_wrap_mode(const_cast<GtkLabel*>(gobj())));
}

void Label::set_selectable(bool setting)
{
  gtk_label_set_selectable(gobj(), static_cast<int>(setting));
}

bool Label::get_selectable() const
{
  return gtk_label_get_selectable(const_cast<GtkLabel*>(gobj()));
}

void Label::select_region(int start_offset, int end_offset)
{
  gtk_label_select_region(gobj(), start_offset, end_offset);
}

bool Label::get_selection_bounds(int& start, int& end) const
{
  return gtk_label_get_selection_bounds(const_cast<GtkLabel*>(gobj()), &(start), &(end));
}

Glib::RefPtr<Pango::Layout> Label::get_layout()
{
  auto retvalue = Glib::wrap(gtk_label_get_layout(gobj()));
  if(retvalue)
    retvalue->reference(); //The function does not do a ref for us.
  return retvalue;
}

Glib::RefPtr<const Pango::Layout> Label::get_layout() const
{
  return const_cast<Label*>(this)->get_layout();
}

void Label::get_layout_offsets(int& x, int& y) const
{
  gtk_label_get_layout_offsets(const_cast<GtkLabel*>(gobj()), &(x), &(y));
}

void Label::set_single_line_mode(bool single_line_mode)
{
  gtk_label_set_single_line_mode(gobj(), static_cast<int>(single_line_mode));
}

bool Label::get_single_line_mode() const
{
  return gtk_label_get_single_line_mode(const_cast<GtkLabel*>(gobj()));
}

Glib::ustring Label::get_current_uri() const
{
  return Glib::convert_const_gchar_ptr_to_ustring(gtk_label_get_current_uri(const_cast<GtkLabel*>(gobj())));
}

void Label::set_xalign(float xalign)
{
  gtk_label_set_xalign(gobj(), xalign);
}

float Label::get_xalign() const
{
  return gtk_label_get_xalign(const_cast<GtkLabel*>(gobj()));
}

void Label::set_yalign(float yalign)
{
  gtk_label_set_yalign(gobj(), yalign);
}

float Label::get_yalign() const
{
  return gtk_label_get_yalign(const_cast<GtkLabel*>(gobj()));
}

void Label::set_extra_menu(const Glib::RefPtr<Gio::MenuModel>& model)
{
  gtk_label_set_extra_menu(gobj(), Glib::unwrap(model));
}

Glib::RefPtr<Gio::MenuModel> Label::get_extra_menu()
{
  auto retvalue = Glib::wrap(gtk_label_get_extra_menu(gobj()));
  if(retvalue)
    retvalue->reference(); //The function does not do a ref for us.
  return retvalue;
}

Glib::RefPtr<const Gio::MenuModel> Label::get_extra_menu() const
{
  return const_cast<Label*>(this)->get_extra_menu();
}

void Label::set_tabs(const Pango::TabArray& tabs)
{
  gtk_label_set_tabs(gobj(), const_cast<Pango::TabArray&>(tabs).gobj());
}

Pango::TabArray Label::get_tabs() const
{
  return Pango::TabArray((gtk_label_get_tabs(const_cast<GtkLabel*>(gobj()))), false);
}


Glib::SignalProxy<bool(const Glib::ustring&)> Label::signal_activate_link()
{
  return Glib::SignalProxy<bool(const Glib::ustring&) >(this, &Label_signal_activate_link_info);
}


Glib::PropertyProxy< Glib::ustring > Label::property_label() 
{
  return Glib::PropertyProxy< Glib::ustring >(this, "label");
}

Glib::PropertyProxy_ReadOnly< Glib::ustring > Label::property_label() const
{
  return Glib::PropertyProxy_ReadOnly< Glib::ustring >(this, "label");
}

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

Glib::PropertyProxy< Pango::AttrList > Label::property_attributes() 
{
  return Glib::PropertyProxy< Pango::AttrList >(this, "attributes");
}

Glib::PropertyProxy_ReadOnly< Pango::AttrList > Label::property_attributes() const
{
  return Glib::PropertyProxy_ReadOnly< Pango::AttrList >(this, "attributes");
}

Glib::PropertyProxy< bool > Label::property_use_markup() 
{
  return Glib::PropertyProxy< bool >(this, "use-markup");
}

Glib::PropertyProxy_ReadOnly< bool > Label::property_use_markup() const
{
  return Glib::PropertyProxy_ReadOnly< bool >(this, "use-markup");
}

Glib::PropertyProxy< bool > Label::property_use_underline() 
{
  return Glib::PropertyProxy< bool >(this, "use-underline");
}

Glib::PropertyProxy_ReadOnly< bool > Label::property_use_underline() const
{
  return Glib::PropertyProxy_ReadOnly< bool >(this, "use-underline");
}

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

Glib::PropertyProxy< Justification > Label::property_justify() 
{
  return Glib::PropertyProxy< Justification >(this, "justify");
}

Glib::PropertyProxy_ReadOnly< Justification > Label::property_justify() const
{
  return Glib::PropertyProxy_ReadOnly< Justification >(this, "justify");
}

Glib::PropertyProxy< bool > Label::property_wrap() 
{
  return Glib::PropertyProxy< bool >(this, "wrap");
}

Glib::PropertyProxy_ReadOnly< bool > Label::property_wrap() const
{
  return Glib::PropertyProxy_ReadOnly< bool >(this, "wrap");
}

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

Glib::PropertyProxy< Pango::WrapMode > Label::property_wrap_mode() 
{
  return Glib::PropertyProxy< Pango::WrapMode >(this, "wrap-mode");
}

Glib::PropertyProxy_ReadOnly< Pango::WrapMode > Label::property_wrap_mode() const
{
  return Glib::PropertyProxy_ReadOnly< Pango::WrapMode >(this, "wrap-mode");
}

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

Glib::PropertyProxy< NaturalWrapMode > Label::property_natural_wrap_mode() 
{
  return Glib::PropertyProxy< NaturalWrapMode >(this, "natural-wrap-mode");
}

Glib::PropertyProxy_ReadOnly< NaturalWrapMode > Label::property_natural_wrap_mode() const
{
  return Glib::PropertyProxy_ReadOnly< NaturalWrapMode >(this, "natural-wrap-mode");
}

Glib::PropertyProxy< bool > Label::property_selectable() 
{
  return Glib::PropertyProxy< bool >(this, "selectable");
}

Glib::PropertyProxy_ReadOnly< bool > Label::property_selectable() const
{
  return Glib::PropertyProxy_ReadOnly< bool >(this, "selectable");
}

Glib::PropertyProxy_ReadOnly< guint > Label::property_mnemonic_keyval() const
{
  return Glib::PropertyProxy_ReadOnly< guint >(this, "mnemonic-keyval");
}

Glib::PropertyProxy< Widget* > Label::property_mnemonic_widget() 
{
  return Glib::PropertyProxy< Widget* >(this, "mnemonic-widget");
}

Glib::PropertyProxy_ReadOnly< Widget* > Label::property_mnemonic_widget() const
{
  return Glib::PropertyProxy_ReadOnly< Widget* >(this, "mnemonic-widget");
}

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

Glib::PropertyProxy< Pango::EllipsizeMode > Label::property_ellipsize() 
{
  return Glib::PropertyProxy< Pango::EllipsizeMode >(this, "ellipsize");
}

Glib::PropertyProxy_ReadOnly< Pango::EllipsizeMode > Label::property_ellipsize() const
{
  return Glib::PropertyProxy_ReadOnly< Pango::EllipsizeMode >(this, "ellipsize");
}

Glib::PropertyProxy< int > Label::property_width_chars() 
{
  return Glib::PropertyProxy< int >(this, "width-chars");
}

Glib::PropertyProxy_ReadOnly< int > Label::property_width_chars() const
{
  return Glib::PropertyProxy_ReadOnly< int >(this, "width-chars");
}

Glib::PropertyProxy< bool > Label::property_single_line_mode() 
{
  return Glib::PropertyProxy< bool >(this, "single-line-mode");
}

Glib::PropertyProxy_ReadOnly< bool > Label::property_single_line_mode() const
{
  return Glib::PropertyProxy_ReadOnly< bool >(this, "single-line-mode");
}

Glib::PropertyProxy< int > Label::property_max_width_chars() 
{
  return Glib::PropertyProxy< int >(this, "max-width-chars");
}

Glib::PropertyProxy_ReadOnly< int > Label::property_max_width_chars() const
{
  return Glib::PropertyProxy_ReadOnly< int >(this, "max-width-chars");
}

Glib::PropertyProxy< int > Label::property_lines() 
{
  return Glib::PropertyProxy< int >(this, "lines");
}

Glib::PropertyProxy_ReadOnly< int > Label::property_lines() const
{
  return Glib::PropertyProxy_ReadOnly< int >(this, "lines");
}

Glib::PropertyProxy< float > Label::property_xalign() 
{
  return Glib::PropertyProxy< float >(this, "xalign");
}

Glib::PropertyProxy_ReadOnly< float > Label::property_xalign() const
{
  return Glib::PropertyProxy_ReadOnly< float >(this, "xalign");
}

Glib::PropertyProxy< float > Label::property_yalign() 
{
  return Glib::PropertyProxy< float >(this, "yalign");
}

Glib::PropertyProxy_ReadOnly< float > Label::property_yalign() const
{
  return Glib::PropertyProxy_ReadOnly< float >(this, "yalign");
}

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

Glib::PropertyProxy< Glib::RefPtr<Gio::MenuModel> > Label::property_extra_menu() 
{
  return Glib::PropertyProxy< Glib::RefPtr<Gio::MenuModel> >(this, "extra-menu");
}

Glib::PropertyProxy_ReadOnly< Glib::RefPtr<Gio::MenuModel> > Label::property_extra_menu() const
{
  return Glib::PropertyProxy_ReadOnly< Glib::RefPtr<Gio::MenuModel> >(this, "extra-menu");
}

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

Glib::PropertyProxy< Pango::TabArray > Label::property_tabs() 
{
  return Glib::PropertyProxy< Pango::TabArray >(this, "tabs");
}

Glib::PropertyProxy_ReadOnly< Pango::TabArray > Label::property_tabs() const
{
  return Glib::PropertyProxy_ReadOnly< Pango::TabArray >(this, "tabs");
}


} // namespace Gtk


