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

#undef GTK_DISABLE_DEPRECATED
#define GDK_DISABLE_DEPRECATION_WARNINGS 1
 

#ifndef GTKMM_DISABLE_DEPRECATED


#include <glibmm.h>

#include <gtkmm/statusbar.h>
#include <gtkmm/private/statusbar_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
{


extern "C" {
static void Statusbar_signal_text_pushed_connect_callback(GtkStatusbar* self, guint p0,const gchar* p1,void* data)
{
  using namespace Gtk;
  using SlotType = sigc::slot<void(guint, const Glib::ustring&)>;

  auto obj = dynamic_cast<Statusbar*>(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))(p0, Glib::convert_const_gchar_ptr_to_ustring(p1)
);
    }
    catch(...)
    {
       Glib::exception_handlers_invoke();
    }
  }
}
} // extern "C"

static const Glib::SignalProxyInfo Statusbar_signal_text_pushed_info =
{
  "text_pushed",
  (GCallback) &Statusbar_signal_text_pushed_connect_callback,
  (GCallback) &Statusbar_signal_text_pushed_connect_callback
};


extern "C" {
static void Statusbar_signal_text_popped_connect_callback(GtkStatusbar* self, guint p0,const gchar* p1,void* data)
{
  using namespace Gtk;
  using SlotType = sigc::slot<void(guint, const Glib::ustring&)>;

  auto obj = dynamic_cast<Statusbar*>(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))(p0, Glib::convert_const_gchar_ptr_to_ustring(p1)
);
    }
    catch(...)
    {
       Glib::exception_handlers_invoke();
    }
  }
}
} // extern "C"

static const Glib::SignalProxyInfo Statusbar_signal_text_popped_info =
{
  "text_popped",
  (GCallback) &Statusbar_signal_text_popped_connect_callback,
  (GCallback) &Statusbar_signal_text_popped_connect_callback
};


} // anonymous namespace


namespace Glib
{

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

} /* namespace Glib */

namespace Gtk
{


/* The *_Class implementation: */

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

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

  }

  return *this;
}


void Statusbar_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* Statusbar_Class::wrap_new(GObject* o)
{
  return manage(new Statusbar((GtkStatusbar*)(o)));

}


/* The implementation: */

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

Statusbar::Statusbar(GtkStatusbar* castitem)
:
  Gtk::Widget((GtkWidget*)(castitem))
{
  }


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

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

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

Statusbar::CppClassType Statusbar::statusbar_class_; // initialize static member

GType Statusbar::get_type()
{
  return statusbar_class_.init().get_type();
}


GType Statusbar::get_base_type()
{
  return gtk_statusbar_get_type();
}


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

}

guint Statusbar::get_context_id(const Glib::ustring& context_description)
{
  return gtk_statusbar_get_context_id(gobj(), context_description.c_str());
}

guint Statusbar::push(const Glib::ustring& text, guint context_id)
{
  return gtk_statusbar_push(gobj(), context_id, text.c_str());
}

void Statusbar::pop(guint context_id)
{
  gtk_statusbar_pop(gobj(), context_id);
}

void Statusbar::remove_message(guint message_id, guint context_id)
{
  gtk_statusbar_remove(gobj(), context_id, message_id);
}

void Statusbar::remove_all_messages(guint context_id)
{
  gtk_statusbar_remove_all(gobj(), context_id);
}


Glib::SignalProxy<void(guint, const Glib::ustring&)> Statusbar::signal_text_pushed()
{
  return Glib::SignalProxy<void(guint, const Glib::ustring&) >(this, &Statusbar_signal_text_pushed_info);
}


Glib::SignalProxy<void(guint, const Glib::ustring&)> Statusbar::signal_text_popped()
{
  return Glib::SignalProxy<void(guint, const Glib::ustring&) >(this, &Statusbar_signal_text_popped_info);
}


} // namespace Gtk

#endif // GTKMM_DISABLE_DEPRECATED


