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


#include <glibmm.h>

#include <gtksourceviewmm/printcompositor.h>
#include <gtksourceviewmm/private/printcompositor_p.h>


/* printcompositor.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/gtksourceprintcompositor.h>

namespace Gsv
{

PrintCompositor::PrintCompositor(const View& view) :
  // Mark this class as non-derived to allow C++ vfuncs to be skipped.
  Glib::ObjectBase(0),
  Glib::Object(Glib::ConstructParams(printcompositor_class_.init(), "buffer",Glib::unwrap(view.get_source_buffer()),"tab-width",view.get_tab_width(),"highlight-syntax",view.get_source_buffer()->get_highlight_syntax(),"wrap-mode",static_cast<GtkWrapMode>(view.get_wrap_mode()),"print-line-numbers",(view.get_show_line_numbers() ? 0 : 1), static_cast<char*>(0)))
{
  set_body_font_name(const_cast<View&>(view).get_pango_context()->get_font_description().to_string());
}

void
PrintCompositor::set_header_format(bool separator, const Glib::ustring& left, const Glib::ustring& center, const Glib::ustring& right)
{
  gtk_source_print_compositor_set_header_format(gobj(), static_cast<gboolean>(separator), (left.empty() ? 0 : left.c_str()), (center.empty() ? 0 : center.c_str()), (right.empty() ? 0 : right.c_str()));
}

void
PrintCompositor::set_footer_format(bool separator, const Glib::ustring& left, const Glib::ustring& center, const Glib::ustring& right)
{
  gtk_source_print_compositor_set_footer_format(gobj(), static_cast<gboolean>(separator), (left.empty() ? 0 : left.c_str()), (center.empty() ? 0 : center.c_str()), (right.empty() ? 0 : right.c_str()));
}

} // namespace Gsv

namespace
{
} // anonymous namespace


namespace Glib
{

Glib::RefPtr<Gsv::PrintCompositor> wrap(GtkSourcePrintCompositor* object, bool take_copy)
{
  return Glib::RefPtr<Gsv::PrintCompositor>( dynamic_cast<Gsv::PrintCompositor*> (Glib::wrap_auto ((GObject*)(object), take_copy)) );
  //We use dynamic_cast<> in case of multiple inheritance.
}

} /* namespace Glib */


namespace Gsv
{


/* The *_Class implementation: */

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

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

  }

  return *this;
}


void PrintCompositor_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* PrintCompositor_Class::wrap_new(GObject* object)
{
  return new PrintCompositor((GtkSourcePrintCompositor*)object);
}


/* The implementation: */

GtkSourcePrintCompositor* PrintCompositor::gobj_copy()
{
  reference();
  return gobj();
}

PrintCompositor::PrintCompositor(const Glib::ConstructParams& construct_params)
:
  Glib::Object(construct_params)
{

}

PrintCompositor::PrintCompositor(GtkSourcePrintCompositor* castitem)
:
  Glib::Object((GObject*)(castitem))
{}


PrintCompositor::~PrintCompositor()
{}


PrintCompositor::CppClassType PrintCompositor::printcompositor_class_; // initialize static member

GType PrintCompositor::get_type()
{
  return printcompositor_class_.init().get_type();
}


GType PrintCompositor::get_base_type()
{
  return gtk_source_print_compositor_get_type();
}


PrintCompositor::PrintCompositor(const Glib::RefPtr<Buffer>& buffer)
:
  // Mark this class as non-derived to allow C++ vfuncs to be skipped.
  Glib::ObjectBase(0),
  Glib::Object(Glib::ConstructParams(printcompositor_class_.init(), "buffer", Glib::unwrap(buffer), static_cast<char*>(0)))
{
  

}

Glib::RefPtr<PrintCompositor> PrintCompositor::create(const Glib::RefPtr<Buffer>& buffer)
{
  return Glib::RefPtr<PrintCompositor>( new PrintCompositor(buffer) );
}

Glib::RefPtr<PrintCompositor> PrintCompositor::create(const View& view)
{
  return Glib::RefPtr<PrintCompositor>( new PrintCompositor(view) );
}

Glib::RefPtr<Buffer> PrintCompositor::get_buffer()
{
  Glib::RefPtr<Buffer> retvalue = Glib::wrap(gtk_source_print_compositor_get_buffer(gobj()));
  if(retvalue)
    retvalue->reference(); //The function does not do a ref for us.
  return retvalue;
}

Glib::RefPtr<const Buffer> PrintCompositor::get_buffer() const
{
  return const_cast<PrintCompositor*>(this)->get_buffer();
}

void PrintCompositor::set_tab_width(guint width)
{
  gtk_source_print_compositor_set_tab_width(gobj(), width);
}

guint PrintCompositor::get_tab_width() const
{
  return gtk_source_print_compositor_get_tab_width(const_cast<GtkSourcePrintCompositor*>(gobj()));
}

void PrintCompositor::set_wrap_mode(Gtk::WrapMode wrap_mode)
{
  gtk_source_print_compositor_set_wrap_mode(gobj(), ((GtkWrapMode)(wrap_mode)));
}

Gtk::WrapMode PrintCompositor::get_wrap_mode() const
{
  return ((Gtk::WrapMode)(gtk_source_print_compositor_get_wrap_mode(const_cast<GtkSourcePrintCompositor*>(gobj()))));
}

void PrintCompositor::set_highlight_syntax(bool highlight)
{
  gtk_source_print_compositor_set_highlight_syntax(gobj(), static_cast<int>(highlight));
}

bool PrintCompositor::get_highlight_syntax() const
{
  return gtk_source_print_compositor_get_highlight_syntax(const_cast<GtkSourcePrintCompositor*>(gobj()));
}

void PrintCompositor::set_print_line_numbers(guint interval)
{
  gtk_source_print_compositor_set_print_line_numbers(gobj(), interval);
}

guint PrintCompositor::get_print_line_numbers() const
{
  return gtk_source_print_compositor_get_print_line_numbers(const_cast<GtkSourcePrintCompositor*>(gobj()));
}

void PrintCompositor::set_body_font_name(const Glib::ustring& font_name)
{
  gtk_source_print_compositor_set_body_font_name(gobj(), font_name.c_str());
}

Glib::ustring PrintCompositor::get_body_font_name() const
{
  return Glib::convert_return_gchar_ptr_to_ustring(gtk_source_print_compositor_get_body_font_name(const_cast<GtkSourcePrintCompositor*>(gobj())));
}

void PrintCompositor::set_line_numbers_font_name(const Glib::ustring& font_name)
{
  gtk_source_print_compositor_set_line_numbers_font_name(gobj(), font_name.c_str());
}

Glib::ustring PrintCompositor::get_line_numbers_font_name() const
{
  return Glib::convert_return_gchar_ptr_to_ustring(gtk_source_print_compositor_get_line_numbers_font_name(const_cast<GtkSourcePrintCompositor*>(gobj())));
}

void PrintCompositor::set_header_font_name(const Glib::ustring& font_name)
{
  gtk_source_print_compositor_set_header_font_name(gobj(), font_name.c_str());
}

Glib::ustring PrintCompositor::get_header_font_name() const
{
  return Glib::convert_return_gchar_ptr_to_ustring(gtk_source_print_compositor_get_header_font_name(const_cast<GtkSourcePrintCompositor*>(gobj())));
}

void PrintCompositor::set_footer_font_name(const Glib::ustring& font_name)
{
  gtk_source_print_compositor_set_footer_font_name(gobj(), font_name.c_str());
}

Glib::ustring PrintCompositor::get_footer_font_name() const
{
  return Glib::convert_return_gchar_ptr_to_ustring(gtk_source_print_compositor_get_footer_font_name(const_cast<GtkSourcePrintCompositor*>(gobj())));
}

void PrintCompositor::set_top_margin(double margin, Gtk::Unit unit)
{
  gtk_source_print_compositor_set_top_margin(gobj(), margin, ((GtkUnit)(unit)));
}

double PrintCompositor::get_top_margin(Gtk::Unit unit) const
{
  return gtk_source_print_compositor_get_top_margin(const_cast<GtkSourcePrintCompositor*>(gobj()), ((GtkUnit)(unit)));
}

void PrintCompositor::set_bottom_margin(double margin, Gtk::Unit unit)
{
  gtk_source_print_compositor_set_bottom_margin(gobj(), margin, ((GtkUnit)(unit)));
}

double PrintCompositor::get_bottom_margin(Gtk::Unit unit) const
{
  return gtk_source_print_compositor_get_bottom_margin(const_cast<GtkSourcePrintCompositor*>(gobj()), ((GtkUnit)(unit)));
}

void PrintCompositor::set_left_margin(double margin, Gtk::Unit unit)
{
  gtk_source_print_compositor_set_left_margin(gobj(), margin, ((GtkUnit)(unit)));
}

double PrintCompositor::get_left_margin(Gtk::Unit unit) const
{
  return gtk_source_print_compositor_get_left_margin(const_cast<GtkSourcePrintCompositor*>(gobj()), ((GtkUnit)(unit)));
}

void PrintCompositor::set_right_margin(double margin, Gtk::Unit unit)
{
  gtk_source_print_compositor_set_right_margin(gobj(), margin, ((GtkUnit)(unit)));
}

double PrintCompositor::get_right_margin(Gtk::Unit unit) const
{
  return gtk_source_print_compositor_get_right_margin(const_cast<GtkSourcePrintCompositor*>(gobj()), ((GtkUnit)(unit)));
}

void PrintCompositor::set_print_header(bool print)
{
  gtk_source_print_compositor_set_print_header(gobj(), static_cast<int>(print));
}

bool PrintCompositor::get_print_header() const
{
  return gtk_source_print_compositor_get_print_header(const_cast<GtkSourcePrintCompositor*>(gobj()));
}

void PrintCompositor::set_print_footer(bool print)
{
  gtk_source_print_compositor_set_print_footer(gobj(), static_cast<int>(print));
}

bool PrintCompositor::get_print_footer() const
{
  return gtk_source_print_compositor_get_print_footer(const_cast<GtkSourcePrintCompositor*>(gobj()));
}

int PrintCompositor::get_n_pages() const
{
  return gtk_source_print_compositor_get_n_pages(const_cast<GtkSourcePrintCompositor*>(gobj()));
}

bool PrintCompositor::paginate(const Glib::RefPtr<Gtk::PrintContext>& context)
{
  return gtk_source_print_compositor_paginate(gobj(), Glib::unwrap(context));
}

double PrintCompositor::get_pagination_process()
{
  return gtk_source_print_compositor_get_pagination_progress(gobj());
}

void PrintCompositor::draw_page(const Glib::RefPtr<Gtk::PrintContext>& context, int page_nr)
{
  gtk_source_print_compositor_draw_page(gobj(), Glib::unwrap(context), page_nr);
}


Glib::PropertyProxy< Glib::ustring > PrintCompositor::property_body_font_name() 
{
  return Glib::PropertyProxy< Glib::ustring >(this, "body-font-name");
}

Glib::PropertyProxy_ReadOnly< Glib::ustring > PrintCompositor::property_body_font_name() const
{
  return Glib::PropertyProxy_ReadOnly< Glib::ustring >(this, "body-font-name");
}

Glib::PropertyProxy_ReadOnly< Glib::RefPtr<Buffer> > PrintCompositor::property_buffer() const
{
  return Glib::PropertyProxy_ReadOnly< Glib::RefPtr<Buffer> >(this, "buffer");
}

Glib::PropertyProxy< Glib::ustring > PrintCompositor::property_footer_font_name() 
{
  return Glib::PropertyProxy< Glib::ustring >(this, "footer-font-name");
}

Glib::PropertyProxy_ReadOnly< Glib::ustring > PrintCompositor::property_footer_font_name() const
{
  return Glib::PropertyProxy_ReadOnly< Glib::ustring >(this, "footer-font-name");
}

Glib::PropertyProxy< Glib::ustring > PrintCompositor::property_header_font_name() 
{
  return Glib::PropertyProxy< Glib::ustring >(this, "header-font-name");
}

Glib::PropertyProxy_ReadOnly< Glib::ustring > PrintCompositor::property_header_font_name() const
{
  return Glib::PropertyProxy_ReadOnly< Glib::ustring >(this, "header-font-name");
}

Glib::PropertyProxy< bool > PrintCompositor::property_highlight_syntax() 
{
  return Glib::PropertyProxy< bool >(this, "highlight-syntax");
}

Glib::PropertyProxy_ReadOnly< bool > PrintCompositor::property_highlight_syntax() const
{
  return Glib::PropertyProxy_ReadOnly< bool >(this, "highlight-syntax");
}

Glib::PropertyProxy< Glib::ustring > PrintCompositor::property_line_numbers_font_name() 
{
  return Glib::PropertyProxy< Glib::ustring >(this, "line-numbers-font-name");
}

Glib::PropertyProxy_ReadOnly< Glib::ustring > PrintCompositor::property_line_numbers_font_name() const
{
  return Glib::PropertyProxy_ReadOnly< Glib::ustring >(this, "line-numbers-font-name");
}

Glib::PropertyProxy_ReadOnly< int > PrintCompositor::property_n_pages() const
{
  return Glib::PropertyProxy_ReadOnly< int >(this, "n-pages");
}

Glib::PropertyProxy< bool > PrintCompositor::property_print_footer() 
{
  return Glib::PropertyProxy< bool >(this, "print-footer");
}

Glib::PropertyProxy_ReadOnly< bool > PrintCompositor::property_print_footer() const
{
  return Glib::PropertyProxy_ReadOnly< bool >(this, "print-footer");
}

Glib::PropertyProxy< bool > PrintCompositor::property_print_header() 
{
  return Glib::PropertyProxy< bool >(this, "print-header");
}

Glib::PropertyProxy_ReadOnly< bool > PrintCompositor::property_print_header() const
{
  return Glib::PropertyProxy_ReadOnly< bool >(this, "print-header");
}

Glib::PropertyProxy< guint > PrintCompositor::property_print_line_numbers() 
{
  return Glib::PropertyProxy< guint >(this, "print-line-numbers");
}

Glib::PropertyProxy_ReadOnly< guint > PrintCompositor::property_print_line_numbers() const
{
  return Glib::PropertyProxy_ReadOnly< guint >(this, "print-line-numbers");
}

Glib::PropertyProxy< guint > PrintCompositor::property_tab_width() 
{
  return Glib::PropertyProxy< guint >(this, "tab-width");
}

Glib::PropertyProxy_ReadOnly< guint > PrintCompositor::property_tab_width() const
{
  return Glib::PropertyProxy_ReadOnly< guint >(this, "tab-width");
}

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

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


} // namespace Gsv


