/* Copyright (C) 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/>.
 */

_CONFIGINCLUDE(gtkmmconfig.h)

#include <glibmm/refptr.h>
#include <gtkmm/pagesetup.h>
#include <gtkmm/printsettings.h>

_DEFS(gtkmm,gtk)

namespace Gtk
{

/** An auxiliary object for printing that allows decoupling the setup from the printing.
 *
 * A print setup is obtained by calling Gtk::PrintDialog::setup_finish(),
 * and can later be passed to print functions such as Gtk::PrintDialog::print().
 *
 * Print setups can be reused for multiple print calls.
 *
 * Applications may wish to store the page_setup and print_settings from the
 * print setup and copy them to the PrintDialog if they want to keep using them.
 *
 * @ingroup Printing
 * @newin{4,14}
 */
class GTKMM_API PrintSetup final
{
  _CLASS_OPAQUE_REFCOUNTED(PrintSetup, GtkPrintSetup, NONE, gtk_print_setup_ref, gtk_print_setup_unref, GTKMM_API)
  _IGNORE(gtk_print_setup_ref, gtk_print_setup_unref)

public:
  _WRAP_METHOD(Glib::RefPtr<PrintSettings> get_print_settings(), gtk_print_setup_get_print_settings, refreturn)
  _WRAP_METHOD(Glib::RefPtr<const PrintSettings> get_print_settings() const, gtk_print_setup_get_print_settings, refreturn, constversion)
  _WRAP_METHOD(Glib::RefPtr<PageSetup> get_page_setup(), gtk_print_setup_get_page_setup, refreturn)
  _WRAP_METHOD(Glib::RefPtr<const PageSetup> get_page_setup() const, gtk_print_setup_get_page_setup, refreturn, constversion)
};

} // namespace Gtk
