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


#include <glibmm.h>

#include <gtkmm/printdialog.h>
#include <gtkmm/private/printdialog_p.h>


/* Copyright 2023 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, see <http://www.gnu.org/licenses/>.
 */

#include <gdkmm/slot_async.h>
#include <gtkmm/window.h>

namespace
{
} // anonymous namespace


namespace Glib
{

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

} /* namespace Glib */


namespace Gtk
{


/* The *_Class implementation: */

const Glib::Class& PrintDialog_Class::init()
{
  if(!gtype_) // create the GType if necessary
  {
    // Do not derive a GType, or use a derived class:
    gtype_ = gtk_print_dialog_get_type();

  }

  return *this;
}


Glib::ObjectBase* PrintDialog_Class::wrap_new(GObject* object)
{
  return new PrintDialog((GtkPrintDialog*)object);
}


/* The implementation: */

GtkPrintDialog* PrintDialog::gobj_copy()
{
  reference();
  return gobj();
}

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

}

PrintDialog::PrintDialog(GtkPrintDialog* castitem)
:
  Glib::Object((GObject*)(castitem))
{}


PrintDialog::PrintDialog(PrintDialog&& src) noexcept
: Glib::Object(std::move(src))
{}

PrintDialog& PrintDialog::operator=(PrintDialog&& src) noexcept
{
  Glib::Object::operator=(std::move(src));
  return *this;
}


PrintDialog::~PrintDialog() noexcept
{}


PrintDialog::CppClassType PrintDialog::printdialog_class_; // initialize static member

GType PrintDialog::get_type()
{
  return printdialog_class_.init().get_type();
}


GType PrintDialog::get_base_type()
{
  return gtk_print_dialog_get_type();
}


PrintDialog::PrintDialog()
:
  // Mark this class as non-derived to allow C++ vfuncs to be skipped.
  Glib::ObjectBase(nullptr),
  Glib::Object(Glib::ConstructParams(printdialog_class_.init()))
{
  

}

Glib::RefPtr<PrintDialog> PrintDialog::create()
{
  return Glib::make_refptr_for_instance<PrintDialog>( new PrintDialog() );
}

Glib::ustring PrintDialog::get_title() const
{
  return Glib::convert_const_gchar_ptr_to_ustring(gtk_print_dialog_get_title(const_cast<GtkPrintDialog*>(gobj())));
}

void PrintDialog::set_title(const Glib::ustring& title)
{
  gtk_print_dialog_set_title(gobj(), title.c_str());
}

Glib::ustring PrintDialog::get_accept_label() const
{
  return Glib::convert_const_gchar_ptr_to_ustring(gtk_print_dialog_get_accept_label(const_cast<GtkPrintDialog*>(gobj())));
}

void PrintDialog::set_accept_label(const Glib::ustring& accept_label)
{
  gtk_print_dialog_set_accept_label(gobj(), accept_label.c_str());
}

bool PrintDialog::get_modal() const
{
  return gtk_print_dialog_get_modal(const_cast<GtkPrintDialog*>(gobj()));
}

void PrintDialog::set_modal(bool modal)
{
  gtk_print_dialog_set_modal(gobj(), static_cast<int>(modal));
}

Glib::RefPtr<PageSetup> PrintDialog::get_page_setup()
{
  auto retvalue = Glib::wrap(gtk_print_dialog_get_page_setup(gobj()));
  if(retvalue)
    retvalue->reference(); //The function does not do a ref for us.
  return retvalue;
}

Glib::RefPtr<const PageSetup> PrintDialog::get_page_setup() const
{
  return const_cast<PrintDialog*>(this)->get_page_setup();
}

void PrintDialog::set_page_setup(const Glib::RefPtr<PageSetup>& page_setup)
{
  gtk_print_dialog_set_page_setup(gobj(), Glib::unwrap(page_setup));
}

Glib::RefPtr<PrintSettings> PrintDialog::get_print_settings()
{
  auto retvalue = Glib::wrap(gtk_print_dialog_get_print_settings(gobj()));
  if(retvalue)
    retvalue->reference(); //The function does not do a ref for us.
  return retvalue;
}

Glib::RefPtr<const PrintSettings> PrintDialog::get_print_settings() const
{
  return const_cast<PrintDialog*>(this)->get_print_settings();
}

void PrintDialog::set_print_settings(const Glib::RefPtr<PrintSettings>& print_settings)
{
  gtk_print_dialog_set_print_settings(gobj(), Glib::unwrap(print_settings));
}

void PrintDialog::setup(Window& parent, const Gio::SlotAsyncReady& slot, const Glib::RefPtr<Gio::Cancellable>& cancellable)
{
  // Create a copy of the slot.
  auto slot_copy = new Gio::SlotAsyncReady(slot); 

  gtk_print_dialog_setup(gobj(), (parent).gobj(), const_cast<GCancellable*>(Glib::unwrap(cancellable)), &Gdk::gdkmm_SignalProxy_async_callback, slot_copy);
}

void PrintDialog::setup(const Gio::SlotAsyncReady& slot, const Glib::RefPtr<Gio::Cancellable>& cancellable)
{
  // Create a copy of the slot.
  auto slot_copy = new Gio::SlotAsyncReady(slot); 

  gtk_print_dialog_setup(gobj(), nullptr, const_cast<GCancellable*>(Glib::unwrap(cancellable)), &Gdk::gdkmm_SignalProxy_async_callback, slot_copy);
}

Glib::RefPtr<PrintSetup> PrintDialog::setup_finish(const Glib::RefPtr<Gio::AsyncResult>& result)
{
  GError* gerror = nullptr;
  auto retvalue = Glib::wrap(gtk_print_dialog_setup_finish(gobj(), Glib::unwrap(result), &(gerror)));
  if(gerror)
    ::Glib::Error::throw_exception(gerror);
  return retvalue;
}

void PrintDialog::print(Window& parent, const Gio::SlotAsyncReady& slot, const Glib::RefPtr<PrintSetup>& setup, const Glib::RefPtr<Gio::Cancellable>& cancellable)
{
  // Create a copy of the slot.
  auto slot_copy = new Gio::SlotAsyncReady(slot); 

  gtk_print_dialog_print(gobj(), (parent).gobj(), Glib::unwrap(setup), const_cast<GCancellable*>(Glib::unwrap(cancellable)), &Gdk::gdkmm_SignalProxy_async_callback, slot_copy);
}

void PrintDialog::print(const Gio::SlotAsyncReady& slot, const Glib::RefPtr<PrintSetup>& setup, const Glib::RefPtr<Gio::Cancellable>& cancellable)
{
  // Create a copy of the slot.
  auto slot_copy = new Gio::SlotAsyncReady(slot); 

  gtk_print_dialog_print(gobj(), nullptr, Glib::unwrap(setup), const_cast<GCancellable*>(Glib::unwrap(cancellable)), &Gdk::gdkmm_SignalProxy_async_callback, slot_copy);
}

Glib::RefPtr<Gio::OutputStream> PrintDialog::print_finish(const Glib::RefPtr<Gio::AsyncResult>& result)
{
  GError* gerror = nullptr;
  auto retvalue = Glib::wrap(gtk_print_dialog_print_finish(gobj(), Glib::unwrap(result), &(gerror)));
  if(gerror)
    ::Glib::Error::throw_exception(gerror);
  return retvalue;
}

void PrintDialog::print_file(Window& parent, const Gio::SlotAsyncReady& slot, const Glib::RefPtr<Gio::File>& file, const Glib::RefPtr<PrintSetup>& setup, const Glib::RefPtr<Gio::Cancellable>& cancellable)
{
  // Create a copy of the slot.
  auto slot_copy = new Gio::SlotAsyncReady(slot); 

  gtk_print_dialog_print_file(gobj(), (parent).gobj(), Glib::unwrap(setup), const_cast<GFile*>(Glib::unwrap<Gio::File>(file)), const_cast<GCancellable*>(Glib::unwrap(cancellable)), &Gdk::gdkmm_SignalProxy_async_callback, slot_copy);
}

void PrintDialog::print_file(const Gio::SlotAsyncReady& slot, const Glib::RefPtr<Gio::File>& file, const Glib::RefPtr<PrintSetup>& setup, const Glib::RefPtr<Gio::Cancellable>& cancellable)
{
  // Create a copy of the slot.
  auto slot_copy = new Gio::SlotAsyncReady(slot); 

  gtk_print_dialog_print_file(gobj(), nullptr, Glib::unwrap(setup), const_cast<GFile*>(Glib::unwrap<Gio::File>(file)), const_cast<GCancellable*>(Glib::unwrap(cancellable)), &Gdk::gdkmm_SignalProxy_async_callback, slot_copy);
}

bool PrintDialog::print_file_finish(const Glib::RefPtr<Gio::AsyncResult>& result)
{
  GError* gerror = nullptr;
  auto retvalue = gtk_print_dialog_print_file_finish(gobj(), Glib::unwrap(result), &(gerror));
  if(gerror)
    ::Glib::Error::throw_exception(gerror);
  return retvalue;
}


Glib::PropertyProxy< Glib::ustring > PrintDialog::property_title() 
{
  return Glib::PropertyProxy< Glib::ustring >(this, "title");
}

Glib::PropertyProxy_ReadOnly< Glib::ustring > PrintDialog::property_title() const
{
  return Glib::PropertyProxy_ReadOnly< Glib::ustring >(this, "title");
}

Glib::PropertyProxy< Glib::ustring > PrintDialog::property_accept_label() 
{
  return Glib::PropertyProxy< Glib::ustring >(this, "accept-label");
}

Glib::PropertyProxy_ReadOnly< Glib::ustring > PrintDialog::property_accept_label() const
{
  return Glib::PropertyProxy_ReadOnly< Glib::ustring >(this, "accept-label");
}

Glib::PropertyProxy< bool > PrintDialog::property_modal() 
{
  return Glib::PropertyProxy< bool >(this, "modal");
}

Glib::PropertyProxy_ReadOnly< bool > PrintDialog::property_modal() const
{
  return Glib::PropertyProxy_ReadOnly< bool >(this, "modal");
}

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

Glib::PropertyProxy< Glib::RefPtr<PageSetup> > PrintDialog::property_page_setup() 
{
  return Glib::PropertyProxy< Glib::RefPtr<PageSetup> >(this, "page-setup");
}

Glib::PropertyProxy_ReadOnly< Glib::RefPtr<PageSetup> > PrintDialog::property_page_setup() const
{
  return Glib::PropertyProxy_ReadOnly< Glib::RefPtr<PageSetup> >(this, "page-setup");
}

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

Glib::PropertyProxy< Glib::RefPtr<PrintSettings> > PrintDialog::property_print_settings() 
{
  return Glib::PropertyProxy< Glib::RefPtr<PrintSettings> >(this, "print-settings");
}

Glib::PropertyProxy_ReadOnly< Glib::RefPtr<PrintSettings> > PrintDialog::property_print_settings() const
{
  return Glib::PropertyProxy_ReadOnly< Glib::RefPtr<PrintSettings> >(this, "print-settings");
}


} // namespace Gtk


