/* Copyright (C) 2006 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 .
*/
#include
#include
#include
#include
#include
#include
_DEFS(gtkmm,gtk)
_PINCLUDE(glibmm/private/object_p.h)
namespace Gtk
{
/** A PrintContext encapsulates context information that is required when
* drawing pages for printing, such as the cairo context and important
* parameters like page size and resolution. It also lets you easily
* create Pango::Layout and Pango::Context objects that match the font metrics
* of the cairo surface.
*
* PrintContext objects gets passed to the begin-print, end-print,
* request-page-setup and draw-page signals on the PrintOperation.
*
* @newin{2,10}
*
* @ingroup Printing
*/
class GTKMM_API PrintContext : public Glib::Object
{
_CLASS_GOBJECT(PrintContext, GtkPrintContext, GTK_PRINT_CONTEXT, Glib::Object, GObject, , , GTKMM_API)
public:
#m4 _CONVERSION(`cairo_t*',`::Cairo::RefPtr< ::Cairo::Context>',`::Cairo::RefPtr< ::Cairo::Context>(new ::Cairo::Context($3, false /* take ref */))')
#m4 _CONVERSION(`cairo_t*',`::Cairo::RefPtr',`::Cairo::RefPtr< ::Cairo::Context>(new ::Cairo::Context($3, false /* take ref */))')
_WRAP_METHOD(::Cairo::RefPtr< ::Cairo::Context> get_cairo_context(), gtk_print_context_get_cairo_context)
_WRAP_METHOD(::Cairo::RefPtr get_cairo_context() const, gtk_print_context_get_cairo_context, constversion)
_WRAP_METHOD(Glib::RefPtr get_page_setup(), gtk_print_context_get_page_setup, refreturn)
_WRAP_METHOD(Glib::RefPtr get_page_setup() const, gtk_print_context_get_page_setup, refreturn, constversion)
_WRAP_METHOD(double get_width() const, gtk_print_context_get_width)
_WRAP_METHOD(double get_height() const, gtk_print_context_get_height)
_WRAP_METHOD(double get_dpi_x() const, gtk_print_context_get_dpi_x)
_WRAP_METHOD(double get_dpi_y() const, gtk_print_context_get_dpi_y)
_WRAP_METHOD(bool get_hard_margins(double& top, double& bottom, double& left, double& right) const, gtk_print_context_get_hard_margins)
_WRAP_METHOD(Glib::RefPtr get_pango_fontmap(), gtk_print_context_get_pango_fontmap, refreturn)
_WRAP_METHOD(Glib::RefPtr get_pango_fontmap() const, gtk_print_context_get_pango_fontmap, refreturn, constversion)
_WRAP_METHOD(Glib::RefPtr create_pango_context(), gtk_print_context_create_pango_context, refreturn)
_WRAP_METHOD(Glib::RefPtr create_pango_layout(), gtk_print_context_create_pango_layout, refreturn)
_WRAP_METHOD(void set_cairo_context(const ::Cairo::RefPtr< ::Cairo::Context>& cr, double dpi_x, double dpi_y), gtk_print_context_set_cairo_context)
};
} // namespace Gtk