// Generated by gtkmmproc -- DO NOT MODIFY!


#include <gtksourceviewmm/gutterrenderer.h>
#include <gtksourceviewmm/private/gutterrenderer_p.h>

/* gutterrenderer.cc
 *
 * Copyright (C) 2009, 2010, 2011 Krzesimir Nowak
 *
 * This library is free software; you can redistribute it and/or
 * modify it under the terms of the GNU Library General Public
 * License as published by the Free Software Foundation; either
 * version 2 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
 * Library General Public License for more details.
 *
 * You should have received a copy of the GNU Library General Public
 * License along with this library; if not, write to the Free
 * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
 */

#include <gtksourceview/gtksourcegutterrenderer.h>

namespace Gsv
{

bool GutterRenderer::is_background_set() const
{
  return gtk_source_gutter_renderer_get_background(const_cast<GtkSourceGutterRenderer*>(gobj()), 0);
}

} // namespace Gsv

namespace
{


static gboolean GutterRenderer_signal_query_tooltip_callback(GtkSourceGutterRenderer* self, GtkTextIter* p0,GdkRectangle* p1,gint p2,gint p3,GtkTooltip* p4,void* data)
{
  using namespace Gsv;
  typedef sigc::slot< bool,const Gtk::TextIter&,const Gdk::Rectangle&,int,int,const Glib::RefPtr<Gtk::Tooltip>& > SlotType;

  // Do not try to call a signal on a disassociated wrapper.
  if(Glib::ObjectBase::_get_current_wrapper((GObject*) self))
  {
    #ifdef GLIBMM_EXCEPTIONS_ENABLED
    try
    {
    #endif //GLIBMM_EXCEPTIONS_ENABLED
      if(sigc::slot_base *const slot = Glib::SignalProxyNormal::data_to_slot(data))
        return static_cast<int>((*static_cast<SlotType*>(slot))(Glib::wrap(p0)
, Glib::wrap(p1)
, p2
, p3
, Glib::wrap(p4, true)
));
    #ifdef GLIBMM_EXCEPTIONS_ENABLED
    }
    catch(...)
    {
      Glib::exception_handlers_invoke();
    }
    #endif //GLIBMM_EXCEPTIONS_ENABLED
  }

  typedef gboolean RType;
  return RType();
}

static gboolean GutterRenderer_signal_query_tooltip_notify_callback(GtkSourceGutterRenderer* self, GtkTextIter* p0,GdkRectangle* p1,gint p2,gint p3,GtkTooltip* p4, void* data)
{
  using namespace Gsv;
  typedef sigc::slot< void,const Gtk::TextIter&,const Gdk::Rectangle&,int,int,const Glib::RefPtr<Gtk::Tooltip>& > SlotType;

  // Do not try to call a signal on a disassociated wrapper.
  if(Glib::ObjectBase::_get_current_wrapper((GObject*) self))
  {
    #ifdef GLIBMM_EXCEPTIONS_ENABLED
    try
    {
    #endif //GLIBMM_EXCEPTIONS_ENABLED
      if(sigc::slot_base *const slot = Glib::SignalProxyNormal::data_to_slot(data))
        (*static_cast<SlotType*>(slot))(Glib::wrap(p0)
, Glib::wrap(p1)
, p2
, p3
, Glib::wrap(p4, true)
);
    #ifdef GLIBMM_EXCEPTIONS_ENABLED
    }
    catch(...)
    {
      Glib::exception_handlers_invoke();
    }
    #endif //GLIBMM_EXCEPTIONS_ENABLED
  }

  typedef gboolean RType;
  return RType();
}

static const Glib::SignalProxyInfo GutterRenderer_signal_query_tooltip_info =
{
  "query-tooltip",
  (GCallback) &GutterRenderer_signal_query_tooltip_callback,
  (GCallback) &GutterRenderer_signal_query_tooltip_notify_callback
};


static void GutterRenderer_signal_activate_callback(GtkSourceGutterRenderer* self, GtkTextIter* p0,GdkRectangle* p1,GdkEvent* p2,void* data)
{
  using namespace Gsv;
  typedef sigc::slot< void,const Gtk::TextIter&,const Gdk::Rectangle&,GdkEvent* > SlotType;

  // Do not try to call a signal on a disassociated wrapper.
  if(Glib::ObjectBase::_get_current_wrapper((GObject*) self))
  {
    #ifdef GLIBMM_EXCEPTIONS_ENABLED
    try
    {
    #endif //GLIBMM_EXCEPTIONS_ENABLED
      if(sigc::slot_base *const slot = Glib::SignalProxyNormal::data_to_slot(data))
        (*static_cast<SlotType*>(slot))(Glib::wrap(p0)
, Glib::wrap(p1)
, p2);
    #ifdef GLIBMM_EXCEPTIONS_ENABLED
    }
    catch(...)
    {
      Glib::exception_handlers_invoke();
    }
    #endif //GLIBMM_EXCEPTIONS_ENABLED
  }
}

static const Glib::SignalProxyInfo GutterRenderer_signal_activate_info =
{
  "activate",
  (GCallback) &GutterRenderer_signal_activate_callback,
  (GCallback) &GutterRenderer_signal_activate_callback
};


static const Glib::SignalProxyInfo GutterRenderer_signal_queue_draw_info =
{
  "queue-draw",
  (GCallback) &Glib::SignalProxyNormal::slot0_void_callback,
  (GCallback) &Glib::SignalProxyNormal::slot0_void_callback
};


static void GutterRenderer_signal_query_data_callback(GtkSourceGutterRenderer* self, GtkTextIter* p0,GtkTextIter* p1,GtkSourceGutterRendererState p2,void* data)
{
  using namespace Gsv;
  typedef sigc::slot< void,const Gtk::TextIter&,const Gtk::TextIter&,GutterRendererState > SlotType;

  // Do not try to call a signal on a disassociated wrapper.
  if(Glib::ObjectBase::_get_current_wrapper((GObject*) self))
  {
    #ifdef GLIBMM_EXCEPTIONS_ENABLED
    try
    {
    #endif //GLIBMM_EXCEPTIONS_ENABLED
      if(sigc::slot_base *const slot = Glib::SignalProxyNormal::data_to_slot(data))
        (*static_cast<SlotType*>(slot))(Glib::wrap(p0)
, Glib::wrap(p1)
, ((GutterRendererState)(p2))
);
    #ifdef GLIBMM_EXCEPTIONS_ENABLED
    }
    catch(...)
    {
      Glib::exception_handlers_invoke();
    }
    #endif //GLIBMM_EXCEPTIONS_ENABLED
  }
}

static const Glib::SignalProxyInfo GutterRenderer_signal_query_data_info =
{
  "query-data",
  (GCallback) &GutterRenderer_signal_query_data_callback,
  (GCallback) &GutterRenderer_signal_query_data_callback
};


static gboolean GutterRenderer_signal_query_activatable_callback(GtkSourceGutterRenderer* self, GtkTextIter* p0,GdkRectangle* p1,GdkEvent* p2,void* data)
{
  using namespace Gsv;
  typedef sigc::slot< bool,const Gtk::TextIter&,const Gdk::Rectangle&,GdkEvent* > SlotType;

  // Do not try to call a signal on a disassociated wrapper.
  if(Glib::ObjectBase::_get_current_wrapper((GObject*) self))
  {
    #ifdef GLIBMM_EXCEPTIONS_ENABLED
    try
    {
    #endif //GLIBMM_EXCEPTIONS_ENABLED
      if(sigc::slot_base *const slot = Glib::SignalProxyNormal::data_to_slot(data))
        return static_cast<int>((*static_cast<SlotType*>(slot))(Glib::wrap(p0)
, Glib::wrap(p1)
, p2));
    #ifdef GLIBMM_EXCEPTIONS_ENABLED
    }
    catch(...)
    {
      Glib::exception_handlers_invoke();
    }
    #endif //GLIBMM_EXCEPTIONS_ENABLED
  }

  typedef gboolean RType;
  return RType();
}

static gboolean GutterRenderer_signal_query_activatable_notify_callback(GtkSourceGutterRenderer* self, GtkTextIter* p0,GdkRectangle* p1,GdkEvent* p2, void* data)
{
  using namespace Gsv;
  typedef sigc::slot< void,const Gtk::TextIter&,const Gdk::Rectangle&,GdkEvent* > SlotType;

  // Do not try to call a signal on a disassociated wrapper.
  if(Glib::ObjectBase::_get_current_wrapper((GObject*) self))
  {
    #ifdef GLIBMM_EXCEPTIONS_ENABLED
    try
    {
    #endif //GLIBMM_EXCEPTIONS_ENABLED
      if(sigc::slot_base *const slot = Glib::SignalProxyNormal::data_to_slot(data))
        (*static_cast<SlotType*>(slot))(Glib::wrap(p0)
, Glib::wrap(p1)
, p2);
    #ifdef GLIBMM_EXCEPTIONS_ENABLED
    }
    catch(...)
    {
      Glib::exception_handlers_invoke();
    }
    #endif //GLIBMM_EXCEPTIONS_ENABLED
  }

  typedef gboolean RType;
  return RType();
}

static const Glib::SignalProxyInfo GutterRenderer_signal_query_activatable_info =
{
  "query-activatable",
  (GCallback) &GutterRenderer_signal_query_activatable_callback,
  (GCallback) &GutterRenderer_signal_query_activatable_notify_callback
};


} // anonymous namespace

// static
GType Glib::Value<Gsv::GutterRendererState>::value_type()
{
  return gtk_source_gutter_renderer_state_get_type();
}

// static
GType Glib::Value<Gsv::GutterRendererAlignmentMode>::value_type()
{
  return gtk_source_gutter_renderer_alignment_mode_get_type();
}


namespace Glib
{

Gsv::GutterRenderer* wrap(GtkSourceGutterRenderer* object, bool take_copy)
{
  return dynamic_cast<Gsv::GutterRenderer *> (Glib::wrap_auto ((GObject*)(object), take_copy));
}

} /* namespace Glib */

namespace Gsv
{


/* The *_Class implementation: */

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

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

  }

  return *this;
}


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

  klass->begin = &begin_vfunc_callback;
  klass->draw = &draw_vfunc_callback;
  klass->end = &end_vfunc_callback;
  klass->change_view = &change_view_vfunc_callback;
  klass->change_buffer = &change_buffer_vfunc_callback;

  klass->query_tooltip = &query_tooltip_callback;
  klass->activate = &activate_callback;
  klass->queue_draw = &queue_draw_callback;
  klass->query_data = &query_data_callback;
  klass->query_activatable = &query_activatable_callback;
}

void GutterRenderer_Class::begin_vfunc_callback(GtkSourceGutterRenderer* self, cairo_t* cr, GdkRectangle* background_area, GdkRectangle* cell_area, GtkTextIter* start, GtkTextIter* end)
{
  Glib::ObjectBase *const obj_base = static_cast<Glib::ObjectBase*>(
      Glib::ObjectBase::_get_current_wrapper((GObject*)self));

  // Non-gtkmmproc-generated custom classes implicitly call the default
  // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
  // generated classes can use this optimisation, which avoids the unnecessary
  // parameter conversions if there is no possibility of the virtual function
  // being overridden:
  if(obj_base && obj_base->is_derived_())
  {
    CppObjectType *const obj = dynamic_cast<CppObjectType* const>(obj_base);
    if(obj) // This can be NULL during destruction.
    {
      #ifdef GLIBMM_EXCEPTIONS_ENABLED
      try // Trap C++ exceptions which would normally be lost because this is a C callback.
      {
      #endif //GLIBMM_EXCEPTIONS_ENABLED
        // Call the virtual member method, which derived classes might override.
        obj->begin_vfunc(Cairo::RefPtr<Cairo::Context>(new Cairo::Context(cr, false))
, Glib::wrap(background_area)
, Glib::wrap(cell_area)
, Glib::wrap(start)
, Glib::wrap(end)
);
        return;
      #ifdef GLIBMM_EXCEPTIONS_ENABLED
      }
      catch(...)
      {
        Glib::exception_handlers_invoke();
      }
      #endif //GLIBMM_EXCEPTIONS_ENABLED
    }
  }
  
  BaseClassType *const base = static_cast<BaseClassType*>(
      g_type_class_peek_parent(G_OBJECT_GET_CLASS(self)) // Get the parent class of the object class (The original underlying C class).
  );

  // Call the original underlying C function:
  if(base && base->begin)
    (*base->begin)(self, cr, background_area, cell_area, start, end);

}
void GutterRenderer_Class::draw_vfunc_callback(GtkSourceGutterRenderer* self, cairo_t* cr, GdkRectangle* background_area, GdkRectangle* cell_area, GtkTextIter* start, GtkTextIter* end, GtkSourceGutterRendererState state)
{
  Glib::ObjectBase *const obj_base = static_cast<Glib::ObjectBase*>(
      Glib::ObjectBase::_get_current_wrapper((GObject*)self));

  // Non-gtkmmproc-generated custom classes implicitly call the default
  // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
  // generated classes can use this optimisation, which avoids the unnecessary
  // parameter conversions if there is no possibility of the virtual function
  // being overridden:
  if(obj_base && obj_base->is_derived_())
  {
    CppObjectType *const obj = dynamic_cast<CppObjectType* const>(obj_base);
    if(obj) // This can be NULL during destruction.
    {
      #ifdef GLIBMM_EXCEPTIONS_ENABLED
      try // Trap C++ exceptions which would normally be lost because this is a C callback.
      {
      #endif //GLIBMM_EXCEPTIONS_ENABLED
        // Call the virtual member method, which derived classes might override.
        obj->draw_vfunc(Cairo::RefPtr<Cairo::Context>(new Cairo::Context(cr, false))
, Glib::wrap(background_area)
, Glib::wrap(cell_area)
, Glib::wrap(start)
, Glib::wrap(end)
, ((GutterRendererState)(state))
);
        return;
      #ifdef GLIBMM_EXCEPTIONS_ENABLED
      }
      catch(...)
      {
        Glib::exception_handlers_invoke();
      }
      #endif //GLIBMM_EXCEPTIONS_ENABLED
    }
  }
  
  BaseClassType *const base = static_cast<BaseClassType*>(
      g_type_class_peek_parent(G_OBJECT_GET_CLASS(self)) // Get the parent class of the object class (The original underlying C class).
  );

  // Call the original underlying C function:
  if(base && base->draw)
    (*base->draw)(self, cr, background_area, cell_area, start, end, state);

}
void GutterRenderer_Class::end_vfunc_callback(GtkSourceGutterRenderer* self)
{
  Glib::ObjectBase *const obj_base = static_cast<Glib::ObjectBase*>(
      Glib::ObjectBase::_get_current_wrapper((GObject*)self));

  // Non-gtkmmproc-generated custom classes implicitly call the default
  // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
  // generated classes can use this optimisation, which avoids the unnecessary
  // parameter conversions if there is no possibility of the virtual function
  // being overridden:
  if(obj_base && obj_base->is_derived_())
  {
    CppObjectType *const obj = dynamic_cast<CppObjectType* const>(obj_base);
    if(obj) // This can be NULL during destruction.
    {
      #ifdef GLIBMM_EXCEPTIONS_ENABLED
      try // Trap C++ exceptions which would normally be lost because this is a C callback.
      {
      #endif //GLIBMM_EXCEPTIONS_ENABLED
        // Call the virtual member method, which derived classes might override.
        obj->end_vfunc();
        return;
      #ifdef GLIBMM_EXCEPTIONS_ENABLED
      }
      catch(...)
      {
        Glib::exception_handlers_invoke();
      }
      #endif //GLIBMM_EXCEPTIONS_ENABLED
    }
  }
  
  BaseClassType *const base = static_cast<BaseClassType*>(
      g_type_class_peek_parent(G_OBJECT_GET_CLASS(self)) // Get the parent class of the object class (The original underlying C class).
  );

  // Call the original underlying C function:
  if(base && base->end)
    (*base->end)(self);

}
void GutterRenderer_Class::change_view_vfunc_callback(GtkSourceGutterRenderer* self, GtkTextView* old_view)
{
  Glib::ObjectBase *const obj_base = static_cast<Glib::ObjectBase*>(
      Glib::ObjectBase::_get_current_wrapper((GObject*)self));

  // Non-gtkmmproc-generated custom classes implicitly call the default
  // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
  // generated classes can use this optimisation, which avoids the unnecessary
  // parameter conversions if there is no possibility of the virtual function
  // being overridden:
  if(obj_base && obj_base->is_derived_())
  {
    CppObjectType *const obj = dynamic_cast<CppObjectType* const>(obj_base);
    if(obj) // This can be NULL during destruction.
    {
      #ifdef GLIBMM_EXCEPTIONS_ENABLED
      try // Trap C++ exceptions which would normally be lost because this is a C callback.
      {
      #endif //GLIBMM_EXCEPTIONS_ENABLED
        // Call the virtual member method, which derived classes might override.
        obj->change_view_vfunc(Glib::wrap(old_view)
);
        return;
      #ifdef GLIBMM_EXCEPTIONS_ENABLED
      }
      catch(...)
      {
        Glib::exception_handlers_invoke();
      }
      #endif //GLIBMM_EXCEPTIONS_ENABLED
    }
  }
  
  BaseClassType *const base = static_cast<BaseClassType*>(
      g_type_class_peek_parent(G_OBJECT_GET_CLASS(self)) // Get the parent class of the object class (The original underlying C class).
  );

  // Call the original underlying C function:
  if(base && base->change_view)
    (*base->change_view)(self, old_view);

}
void GutterRenderer_Class::change_buffer_vfunc_callback(GtkSourceGutterRenderer* self, GtkTextBuffer* old_buffer)
{
  Glib::ObjectBase *const obj_base = static_cast<Glib::ObjectBase*>(
      Glib::ObjectBase::_get_current_wrapper((GObject*)self));

  // Non-gtkmmproc-generated custom classes implicitly call the default
  // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
  // generated classes can use this optimisation, which avoids the unnecessary
  // parameter conversions if there is no possibility of the virtual function
  // being overridden:
  if(obj_base && obj_base->is_derived_())
  {
    CppObjectType *const obj = dynamic_cast<CppObjectType* const>(obj_base);
    if(obj) // This can be NULL during destruction.
    {
      #ifdef GLIBMM_EXCEPTIONS_ENABLED
      try // Trap C++ exceptions which would normally be lost because this is a C callback.
      {
      #endif //GLIBMM_EXCEPTIONS_ENABLED
        // Call the virtual member method, which derived classes might override.
        obj->change_buffer_vfunc(Glib::wrap(old_buffer, true)
);
        return;
      #ifdef GLIBMM_EXCEPTIONS_ENABLED
      }
      catch(...)
      {
        Glib::exception_handlers_invoke();
      }
      #endif //GLIBMM_EXCEPTIONS_ENABLED
    }
  }
  
  BaseClassType *const base = static_cast<BaseClassType*>(
      g_type_class_peek_parent(G_OBJECT_GET_CLASS(self)) // Get the parent class of the object class (The original underlying C class).
  );

  // Call the original underlying C function:
  if(base && base->change_buffer)
    (*base->change_buffer)(self, old_buffer);

}

gboolean GutterRenderer_Class::query_tooltip_callback(GtkSourceGutterRenderer* self, GtkTextIter* p0, GdkRectangle* p1, gint p2, gint p3, GtkTooltip* p4)
{
  Glib::ObjectBase *const obj_base = static_cast<Glib::ObjectBase*>(
      Glib::ObjectBase::_get_current_wrapper((GObject*)self));

  // Non-gtkmmproc-generated custom classes implicitly call the default
  // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
  // generated classes can use this optimisation, which avoids the unnecessary
  // parameter conversions if there is no possibility of the virtual function
  // being overridden:
  if(obj_base && obj_base->is_derived_())
  {
    CppObjectType *const obj = dynamic_cast<CppObjectType* const>(obj_base);
    if(obj) // This can be NULL during destruction.
    {
      #ifdef GLIBMM_EXCEPTIONS_ENABLED
      try // Trap C++ exceptions which would normally be lost because this is a C callback.
      {
      #endif //GLIBMM_EXCEPTIONS_ENABLED
        // Call the virtual member method, which derived classes might override.
        return static_cast<int>(obj->on_query_tooltip(Glib::wrap(p0)
, Glib::wrap(p1)
, p2
, p3
, Glib::wrap(p4, true)
));
      #ifdef GLIBMM_EXCEPTIONS_ENABLED
      }
      catch(...)
      {
        Glib::exception_handlers_invoke();
      }
      #endif //GLIBMM_EXCEPTIONS_ENABLED
    }
  }
  
  BaseClassType *const base = static_cast<BaseClassType*>(
        g_type_class_peek_parent(G_OBJECT_GET_CLASS(self)) // Get the parent class of the object class (The original underlying C class).
    );

  // Call the original underlying C function:
  if(base && base->query_tooltip)
    return (*base->query_tooltip)(self, p0, p1, p2, p3, p4);

  typedef gboolean RType;
  return RType();
}
void GutterRenderer_Class::activate_callback(GtkSourceGutterRenderer* self, GtkTextIter* p0, GdkRectangle* p1, GdkEvent* p2)
{
  Glib::ObjectBase *const obj_base = static_cast<Glib::ObjectBase*>(
      Glib::ObjectBase::_get_current_wrapper((GObject*)self));

  // Non-gtkmmproc-generated custom classes implicitly call the default
  // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
  // generated classes can use this optimisation, which avoids the unnecessary
  // parameter conversions if there is no possibility of the virtual function
  // being overridden:
  if(obj_base && obj_base->is_derived_())
  {
    CppObjectType *const obj = dynamic_cast<CppObjectType* const>(obj_base);
    if(obj) // This can be NULL during destruction.
    {
      #ifdef GLIBMM_EXCEPTIONS_ENABLED
      try // Trap C++ exceptions which would normally be lost because this is a C callback.
      {
      #endif //GLIBMM_EXCEPTIONS_ENABLED
        // Call the virtual member method, which derived classes might override.
        obj->on_activate(Glib::wrap(p0)
, Glib::wrap(p1)
, p2);
        return;
      #ifdef GLIBMM_EXCEPTIONS_ENABLED
      }
      catch(...)
      {
        Glib::exception_handlers_invoke();
      }
      #endif //GLIBMM_EXCEPTIONS_ENABLED
    }
  }
  
  BaseClassType *const base = static_cast<BaseClassType*>(
        g_type_class_peek_parent(G_OBJECT_GET_CLASS(self)) // Get the parent class of the object class (The original underlying C class).
    );

  // Call the original underlying C function:
  if(base && base->activate)
    (*base->activate)(self, p0, p1, p2);
}
void GutterRenderer_Class::queue_draw_callback(GtkSourceGutterRenderer* self)
{
  Glib::ObjectBase *const obj_base = static_cast<Glib::ObjectBase*>(
      Glib::ObjectBase::_get_current_wrapper((GObject*)self));

  // Non-gtkmmproc-generated custom classes implicitly call the default
  // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
  // generated classes can use this optimisation, which avoids the unnecessary
  // parameter conversions if there is no possibility of the virtual function
  // being overridden:
  if(obj_base && obj_base->is_derived_())
  {
    CppObjectType *const obj = dynamic_cast<CppObjectType* const>(obj_base);
    if(obj) // This can be NULL during destruction.
    {
      #ifdef GLIBMM_EXCEPTIONS_ENABLED
      try // Trap C++ exceptions which would normally be lost because this is a C callback.
      {
      #endif //GLIBMM_EXCEPTIONS_ENABLED
        // Call the virtual member method, which derived classes might override.
        obj->on_queue_draw();
        return;
      #ifdef GLIBMM_EXCEPTIONS_ENABLED
      }
      catch(...)
      {
        Glib::exception_handlers_invoke();
      }
      #endif //GLIBMM_EXCEPTIONS_ENABLED
    }
  }
  
  BaseClassType *const base = static_cast<BaseClassType*>(
        g_type_class_peek_parent(G_OBJECT_GET_CLASS(self)) // Get the parent class of the object class (The original underlying C class).
    );

  // Call the original underlying C function:
  if(base && base->queue_draw)
    (*base->queue_draw)(self);
}
void GutterRenderer_Class::query_data_callback(GtkSourceGutterRenderer* self, GtkTextIter* p0, GtkTextIter* p1, GtkSourceGutterRendererState p2)
{
  Glib::ObjectBase *const obj_base = static_cast<Glib::ObjectBase*>(
      Glib::ObjectBase::_get_current_wrapper((GObject*)self));

  // Non-gtkmmproc-generated custom classes implicitly call the default
  // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
  // generated classes can use this optimisation, which avoids the unnecessary
  // parameter conversions if there is no possibility of the virtual function
  // being overridden:
  if(obj_base && obj_base->is_derived_())
  {
    CppObjectType *const obj = dynamic_cast<CppObjectType* const>(obj_base);
    if(obj) // This can be NULL during destruction.
    {
      #ifdef GLIBMM_EXCEPTIONS_ENABLED
      try // Trap C++ exceptions which would normally be lost because this is a C callback.
      {
      #endif //GLIBMM_EXCEPTIONS_ENABLED
        // Call the virtual member method, which derived classes might override.
        obj->on_query_data(Glib::wrap(p0)
, Glib::wrap(p1)
, ((GutterRendererState)(p2))
);
        return;
      #ifdef GLIBMM_EXCEPTIONS_ENABLED
      }
      catch(...)
      {
        Glib::exception_handlers_invoke();
      }
      #endif //GLIBMM_EXCEPTIONS_ENABLED
    }
  }
  
  BaseClassType *const base = static_cast<BaseClassType*>(
        g_type_class_peek_parent(G_OBJECT_GET_CLASS(self)) // Get the parent class of the object class (The original underlying C class).
    );

  // Call the original underlying C function:
  if(base && base->query_data)
    (*base->query_data)(self, p0, p1, p2);
}
gboolean GutterRenderer_Class::query_activatable_callback(GtkSourceGutterRenderer* self, GtkTextIter* p0, GdkRectangle* p1, GdkEvent* p2)
{
  Glib::ObjectBase *const obj_base = static_cast<Glib::ObjectBase*>(
      Glib::ObjectBase::_get_current_wrapper((GObject*)self));

  // Non-gtkmmproc-generated custom classes implicitly call the default
  // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
  // generated classes can use this optimisation, which avoids the unnecessary
  // parameter conversions if there is no possibility of the virtual function
  // being overridden:
  if(obj_base && obj_base->is_derived_())
  {
    CppObjectType *const obj = dynamic_cast<CppObjectType* const>(obj_base);
    if(obj) // This can be NULL during destruction.
    {
      #ifdef GLIBMM_EXCEPTIONS_ENABLED
      try // Trap C++ exceptions which would normally be lost because this is a C callback.
      {
      #endif //GLIBMM_EXCEPTIONS_ENABLED
        // Call the virtual member method, which derived classes might override.
        return static_cast<int>(obj->on_query_activatable(Glib::wrap(p0)
, Glib::wrap(p1)
, p2));
      #ifdef GLIBMM_EXCEPTIONS_ENABLED
      }
      catch(...)
      {
        Glib::exception_handlers_invoke();
      }
      #endif //GLIBMM_EXCEPTIONS_ENABLED
    }
  }
  
  BaseClassType *const base = static_cast<BaseClassType*>(
        g_type_class_peek_parent(G_OBJECT_GET_CLASS(self)) // Get the parent class of the object class (The original underlying C class).
    );

  // Call the original underlying C function:
  if(base && base->query_activatable)
    return (*base->query_activatable)(self, p0, p1, p2);

  typedef gboolean RType;
  return RType();
}


Glib::ObjectBase* GutterRenderer_Class::wrap_new(GObject* o)
{
  return manage(new GutterRenderer((GtkSourceGutterRenderer*)(o)));

}


/* The implementation: */

GutterRenderer::GutterRenderer(const Glib::ConstructParams& construct_params)
:
  Gtk::Object(construct_params)
{
  }

GutterRenderer::GutterRenderer(GtkSourceGutterRenderer* castitem)
:
  Gtk::Object((GInitiallyUnowned*)(castitem))
{
  }

GutterRenderer::~GutterRenderer()
{
  destroy_();
}

GutterRenderer::CppClassType GutterRenderer::gutterrenderer_class_; // initialize static member

GType GutterRenderer::get_type()
{
  return gutterrenderer_class_.init().get_type();
}


GType GutterRenderer::get_base_type()
{
  return gtk_source_gutter_renderer_get_type();
}


void GutterRenderer::begin(const Cairo::RefPtr<Cairo::Context>& cr, const Gdk::Rectangle& background_area, const Gdk::Rectangle& cell_area, Gtk::TextIter& start, Gtk::TextIter& end)
{
gtk_source_gutter_renderer_begin(gobj(), ((cr) ? (cr)->cobj() : 0), const_cast<GdkRectangle*>(background_area.gobj()), const_cast<GdkRectangle*>(cell_area.gobj()), (start).gobj(), (end).gobj()); 
}

void GutterRenderer::draw(const Cairo::RefPtr<Cairo::Context>& cr, const Gdk::Rectangle& background_area, const Gdk::Rectangle& cell_area, Gtk::TextIter& start, Gtk::TextIter& end, GutterRendererState p6)
{
gtk_source_gutter_renderer_draw(gobj(), ((cr) ? (cr)->cobj() : 0), const_cast<GdkRectangle*>(background_area.gobj()), const_cast<GdkRectangle*>(cell_area.gobj()), (start).gobj(), (end).gobj(), ((GtkSourceGutterRendererState)(p6))); 
}

void GutterRenderer::end()
{
gtk_source_gutter_renderer_end(gobj()); 
}

int GutterRenderer::get_size() const
{
  return gtk_source_gutter_renderer_get_size(const_cast<GtkSourceGutterRenderer*>(gobj()));
}

void GutterRenderer::set_size(int size)
{
gtk_source_gutter_renderer_set_size(gobj(), size); 
}

bool GutterRenderer::get_visible() const
{
  return gtk_source_gutter_renderer_get_visible(const_cast<GtkSourceGutterRenderer*>(gobj()));
}

void GutterRenderer::set_visible(bool visible)
{
gtk_source_gutter_renderer_set_visible(gobj(), static_cast<int>(visible)); 
}

void GutterRenderer::get_padding(int& xpad, int& ypad) const
{
gtk_source_gutter_renderer_get_padding(const_cast<GtkSourceGutterRenderer*>(gobj()), &(xpad), &(ypad)); 
}

void GutterRenderer::set_padding(int xpad, int ypad)
{
gtk_source_gutter_renderer_set_padding(gobj(), xpad, ypad); 
}

void GutterRenderer::get_alignment(float& xalign, float& yalign) const
{
gtk_source_gutter_renderer_get_alignment(const_cast<GtkSourceGutterRenderer*>(gobj()), &(xalign), &(yalign)); 
}

void GutterRenderer::set_alignment(float xalign, float yalign)
{
gtk_source_gutter_renderer_set_alignment(gobj(), xalign, yalign); 
}

GutterRendererAlignmentMode GutterRenderer::get_alignment_mode() const
{
  return ((GutterRendererAlignmentMode)(gtk_source_gutter_renderer_get_alignment_mode(const_cast<GtkSourceGutterRenderer*>(gobj()))));
}

void GutterRenderer::set_alignment_mode(GutterRendererAlignmentMode mode)
{
gtk_source_gutter_renderer_set_alignment_mode(gobj(), ((GtkSourceGutterRendererAlignmentMode)(mode))); 
}

Gtk::TextWindowType GutterRenderer::get_window_type() const
{
  return ((Gtk::TextWindowType)(gtk_source_gutter_renderer_get_window_type(const_cast<GtkSourceGutterRenderer*>(gobj()))));
}

Gtk::TextView* GutterRenderer::get_view()
{
  return Glib::wrap(gtk_source_gutter_renderer_get_view(gobj()));
}

const Gtk::TextView* GutterRenderer::get_view() const
{
  return const_cast<GutterRenderer*>(this)->get_view();
}

bool GutterRenderer::get_background(Gdk::RGBA& color) const
{
  return gtk_source_gutter_renderer_get_background(const_cast<GtkSourceGutterRenderer*>(gobj()), (color).gobj());
}

void GutterRenderer::set_background(const Gdk::RGBA& color)
{
gtk_source_gutter_renderer_set_background(gobj(), (color).gobj()); 
}

void GutterRenderer::queue_draw()
{
gtk_source_gutter_renderer_queue_draw(gobj()); 
}

GutterRenderer::GutterRenderer()
:
  // Mark this class as non-derived to allow C++ vfuncs to be skipped.
  Glib::ObjectBase(0),
  Gtk::Object(Glib::ConstructParams(gutterrenderer_class_.init()))
{
  

}


Glib::SignalProxy5< bool,const Gtk::TextIter&,const Gdk::Rectangle&,int,int,const Glib::RefPtr<Gtk::Tooltip>& > GutterRenderer::signal_query_tooltip()
{
  return Glib::SignalProxy5< bool,const Gtk::TextIter&,const Gdk::Rectangle&,int,int,const Glib::RefPtr<Gtk::Tooltip>& >(this, &GutterRenderer_signal_query_tooltip_info);
}


Glib::SignalProxy3< void,const Gtk::TextIter&,const Gdk::Rectangle&,GdkEvent* > GutterRenderer::signal_activate()
{
  return Glib::SignalProxy3< void,const Gtk::TextIter&,const Gdk::Rectangle&,GdkEvent* >(this, &GutterRenderer_signal_activate_info);
}


Glib::SignalProxy0< void > GutterRenderer::signal_queue_draw()
{
  return Glib::SignalProxy0< void >(this, &GutterRenderer_signal_queue_draw_info);
}


Glib::SignalProxy3< void,const Gtk::TextIter&,const Gtk::TextIter&,GutterRendererState > GutterRenderer::signal_query_data()
{
  return Glib::SignalProxy3< void,const Gtk::TextIter&,const Gtk::TextIter&,GutterRendererState >(this, &GutterRenderer_signal_query_data_info);
}


Glib::SignalProxy3< bool,const Gtk::TextIter&,const Gdk::Rectangle&,GdkEvent* > GutterRenderer::signal_query_activatable()
{
  return Glib::SignalProxy3< bool,const Gtk::TextIter&,const Gdk::Rectangle&,GdkEvent* >(this, &GutterRenderer_signal_query_activatable_info);
}


#ifdef GLIBMM_PROPERTIES_ENABLED
Glib::PropertyProxy<bool> GutterRenderer::property_visible() 
{
  return Glib::PropertyProxy<bool>(this, "visible");
}
#endif //GLIBMM_PROPERTIES_ENABLED

#ifdef GLIBMM_PROPERTIES_ENABLED
Glib::PropertyProxy_ReadOnly<bool> GutterRenderer::property_visible() const
{
  return Glib::PropertyProxy_ReadOnly<bool>(this, "visible");
}
#endif //GLIBMM_PROPERTIES_ENABLED

#ifdef GLIBMM_PROPERTIES_ENABLED
Glib::PropertyProxy<int> GutterRenderer::property_xpad() 
{
  return Glib::PropertyProxy<int>(this, "xpad");
}
#endif //GLIBMM_PROPERTIES_ENABLED

#ifdef GLIBMM_PROPERTIES_ENABLED
Glib::PropertyProxy_ReadOnly<int> GutterRenderer::property_xpad() const
{
  return Glib::PropertyProxy_ReadOnly<int>(this, "xpad");
}
#endif //GLIBMM_PROPERTIES_ENABLED

#ifdef GLIBMM_PROPERTIES_ENABLED
Glib::PropertyProxy<int> GutterRenderer::property_ypad() 
{
  return Glib::PropertyProxy<int>(this, "ypad");
}
#endif //GLIBMM_PROPERTIES_ENABLED

#ifdef GLIBMM_PROPERTIES_ENABLED
Glib::PropertyProxy_ReadOnly<int> GutterRenderer::property_ypad() const
{
  return Glib::PropertyProxy_ReadOnly<int>(this, "ypad");
}
#endif //GLIBMM_PROPERTIES_ENABLED

#ifdef GLIBMM_PROPERTIES_ENABLED
Glib::PropertyProxy<float> GutterRenderer::property_xalign() 
{
  return Glib::PropertyProxy<float>(this, "xalign");
}
#endif //GLIBMM_PROPERTIES_ENABLED

#ifdef GLIBMM_PROPERTIES_ENABLED
Glib::PropertyProxy_ReadOnly<float> GutterRenderer::property_xalign() const
{
  return Glib::PropertyProxy_ReadOnly<float>(this, "xalign");
}
#endif //GLIBMM_PROPERTIES_ENABLED

#ifdef GLIBMM_PROPERTIES_ENABLED
Glib::PropertyProxy<float> GutterRenderer::property_yalign() 
{
  return Glib::PropertyProxy<float>(this, "yalign");
}
#endif //GLIBMM_PROPERTIES_ENABLED

#ifdef GLIBMM_PROPERTIES_ENABLED
Glib::PropertyProxy_ReadOnly<float> GutterRenderer::property_yalign() const
{
  return Glib::PropertyProxy_ReadOnly<float>(this, "yalign");
}
#endif //GLIBMM_PROPERTIES_ENABLED

#ifdef GLIBMM_PROPERTIES_ENABLED
Glib::PropertyProxy_ReadOnly<Gtk::TextView*> GutterRenderer::property_view() const
{
  return Glib::PropertyProxy_ReadOnly<Gtk::TextView*>(this, "view");
}
#endif //GLIBMM_PROPERTIES_ENABLED

#ifdef GLIBMM_PROPERTIES_ENABLED
Glib::PropertyProxy<GutterRendererAlignmentMode> GutterRenderer::property_alignment_mode() 
{
  return Glib::PropertyProxy<GutterRendererAlignmentMode>(this, "alignment-mode");
}
#endif //GLIBMM_PROPERTIES_ENABLED

#ifdef GLIBMM_PROPERTIES_ENABLED
Glib::PropertyProxy_ReadOnly<GutterRendererAlignmentMode> GutterRenderer::property_alignment_mode() const
{
  return Glib::PropertyProxy_ReadOnly<GutterRendererAlignmentMode>(this, "alignment-mode");
}
#endif //GLIBMM_PROPERTIES_ENABLED

#ifdef GLIBMM_PROPERTIES_ENABLED
Glib::PropertyProxy_ReadOnly<Gtk::TextWindowType> GutterRenderer::property_window_type() const
{
  return Glib::PropertyProxy_ReadOnly<Gtk::TextWindowType>(this, "window-type");
}
#endif //GLIBMM_PROPERTIES_ENABLED

#ifdef GLIBMM_PROPERTIES_ENABLED
Glib::PropertyProxy<int> GutterRenderer::property_size() 
{
  return Glib::PropertyProxy<int>(this, "size");
}
#endif //GLIBMM_PROPERTIES_ENABLED

#ifdef GLIBMM_PROPERTIES_ENABLED
Glib::PropertyProxy_ReadOnly<int> GutterRenderer::property_size() const
{
  return Glib::PropertyProxy_ReadOnly<int>(this, "size");
}
#endif //GLIBMM_PROPERTIES_ENABLED

#ifdef GLIBMM_PROPERTIES_ENABLED
Glib::PropertyProxy<Gdk::RGBA> GutterRenderer::property_background_rgba() 
{
  return Glib::PropertyProxy<Gdk::RGBA>(this, "background-rgba");
}
#endif //GLIBMM_PROPERTIES_ENABLED

#ifdef GLIBMM_PROPERTIES_ENABLED
Glib::PropertyProxy_ReadOnly<Gdk::RGBA> GutterRenderer::property_background_rgba() const
{
  return Glib::PropertyProxy_ReadOnly<Gdk::RGBA>(this, "background-rgba");
}
#endif //GLIBMM_PROPERTIES_ENABLED

#ifdef GLIBMM_PROPERTIES_ENABLED
Glib::PropertyProxy<bool> GutterRenderer::property_background_set() 
{
  return Glib::PropertyProxy<bool>(this, "background-set");
}
#endif //GLIBMM_PROPERTIES_ENABLED

#ifdef GLIBMM_PROPERTIES_ENABLED
Glib::PropertyProxy_ReadOnly<bool> GutterRenderer::property_background_set() const
{
  return Glib::PropertyProxy_ReadOnly<bool>(this, "background-set");
}
#endif //GLIBMM_PROPERTIES_ENABLED


bool Gsv::GutterRenderer::on_query_tooltip(const Gtk::TextIter& iter, const Gdk::Rectangle& area, int x, int y, const Glib::RefPtr<Gtk::Tooltip>& tooltip)
{
  BaseClassType *const base = static_cast<BaseClassType*>(
      g_type_class_peek_parent(G_OBJECT_GET_CLASS(gobject_)) // Get the parent class of the object class (The original underlying C class).
  );

  if(base && base->query_tooltip)
    return (*base->query_tooltip)(gobj(),const_cast<GtkTextIter*>((iter).gobj()),const_cast<GdkRectangle*>(area.gobj()),x,y,const_cast<GtkTooltip*>(Glib::unwrap(tooltip)));

  typedef bool RType;
  return RType();
}
void Gsv::GutterRenderer::on_activate(const Gtk::TextIter& iter, const Gdk::Rectangle& area, GdkEvent* event)
{
  BaseClassType *const base = static_cast<BaseClassType*>(
      g_type_class_peek_parent(G_OBJECT_GET_CLASS(gobject_)) // Get the parent class of the object class (The original underlying C class).
  );

  if(base && base->activate)
    (*base->activate)(gobj(),const_cast<GtkTextIter*>((iter).gobj()),const_cast<GdkRectangle*>(area.gobj()),event);
}
void Gsv::GutterRenderer::on_queue_draw()
{
  BaseClassType *const base = static_cast<BaseClassType*>(
      g_type_class_peek_parent(G_OBJECT_GET_CLASS(gobject_)) // Get the parent class of the object class (The original underlying C class).
  );

  if(base && base->queue_draw)
    (*base->queue_draw)(gobj());
}
void Gsv::GutterRenderer::on_query_data(const Gtk::TextIter& start, const Gtk::TextIter& end, GutterRendererState state)
{
  BaseClassType *const base = static_cast<BaseClassType*>(
      g_type_class_peek_parent(G_OBJECT_GET_CLASS(gobject_)) // Get the parent class of the object class (The original underlying C class).
  );

  if(base && base->query_data)
    (*base->query_data)(gobj(),const_cast<GtkTextIter*>((start).gobj()),const_cast<GtkTextIter*>((end).gobj()),((GtkSourceGutterRendererState)(state)));
}
bool Gsv::GutterRenderer::on_query_activatable(const Gtk::TextIter& iter, const Gdk::Rectangle& area, GdkEvent* event)
{
  BaseClassType *const base = static_cast<BaseClassType*>(
      g_type_class_peek_parent(G_OBJECT_GET_CLASS(gobject_)) // Get the parent class of the object class (The original underlying C class).
  );

  if(base && base->query_activatable)
    return (*base->query_activatable)(gobj(),const_cast<GtkTextIter*>((iter).gobj()),const_cast<GdkRectangle*>(area.gobj()),event);

  typedef bool RType;
  return RType();
}

void Gsv::GutterRenderer::begin_vfunc(const Cairo::RefPtr<Cairo::Context>& cr, const Gdk::Rectangle& background_area, const Gdk::Rectangle& cell_area, Gtk::TextIter& start, Gtk::TextIter& end) 
{
  BaseClassType *const base = static_cast<BaseClassType*>(
      g_type_class_peek_parent(G_OBJECT_GET_CLASS(gobject_)) // Get the parent class of the object class (The original underlying C class).
  );

  if(base && base->begin)
    (*base->begin)(gobj(),((cr) ? (cr)->cobj() : 0),const_cast<GdkRectangle*>(background_area.gobj()),const_cast<GdkRectangle*>(cell_area.gobj()),(start).gobj(),(end).gobj());
}
void Gsv::GutterRenderer::draw_vfunc(const Cairo::RefPtr<Cairo::Context>& cr, const Gdk::Rectangle& background_area, const Gdk::Rectangle& cell_area, Gtk::TextIter& start, Gtk::TextIter& end, GutterRendererState p6) 
{
  BaseClassType *const base = static_cast<BaseClassType*>(
      g_type_class_peek_parent(G_OBJECT_GET_CLASS(gobject_)) // Get the parent class of the object class (The original underlying C class).
  );

  if(base && base->draw)
    (*base->draw)(gobj(),((cr) ? (cr)->cobj() : 0),const_cast<GdkRectangle*>(background_area.gobj()),const_cast<GdkRectangle*>(cell_area.gobj()),(start).gobj(),(end).gobj(),((GtkSourceGutterRendererState)(p6)));
}
void Gsv::GutterRenderer::end_vfunc() 
{
  BaseClassType *const base = static_cast<BaseClassType*>(
      g_type_class_peek_parent(G_OBJECT_GET_CLASS(gobject_)) // Get the parent class of the object class (The original underlying C class).
  );

  if(base && base->end)
    (*base->end)(gobj());
}
void Gsv::GutterRenderer::change_view_vfunc(Gtk::TextView* old_view) 
{
  BaseClassType *const base = static_cast<BaseClassType*>(
      g_type_class_peek_parent(G_OBJECT_GET_CLASS(gobject_)) // Get the parent class of the object class (The original underlying C class).
  );

  if(base && base->change_view)
    (*base->change_view)(gobj(),Glib::unwrap(old_view));
}
void Gsv::GutterRenderer::change_buffer_vfunc(const Glib::RefPtr<Gtk::TextBuffer>& old_buffer) 
{
  BaseClassType *const base = static_cast<BaseClassType*>(
      g_type_class_peek_parent(G_OBJECT_GET_CLASS(gobject_)) // Get the parent class of the object class (The original underlying C class).
  );

  if(base && base->change_buffer)
    (*base->change_buffer)(gobj(),Glib::unwrap(old_buffer));
}


} // namespace Gsv


