gtkmm 4.17.0
Public Member Functions | Static Public Member Functions | Protected Member Functions | Related Symbols | List of all members
Gtk::PrintOperationPreview Class Reference

#include <gtkmm/printoperationpreview.h>

Inheritance diagram for Gtk::PrintOperationPreview:
Inheritance graph
[legend]

Public Member Functions

 PrintOperationPreview (PrintOperationPreview &&src) noexcept
 
PrintOperationPreviewoperator= (PrintOperationPreview &&src) noexcept
 
 ~PrintOperationPreview () noexcept override
 
GtkPrintOperationPreviewgobj ()
 Provides access to the underlying C GObject.
 
const GtkPrintOperationPreviewgobj () const
 Provides access to the underlying C GObject.
 
void render_page (int page_nr)
 Renders a page to the preview.
 
void end_preview ()
 Ends a preview.
 
bool is_selected (int page_nr) const
 Returns whether the given page is included in the set of pages that have been selected for printing.
 
Glib::SignalProxy< void(const Glib::RefPtr< PrintContext > &)> signal_ready ()
 
Glib::SignalProxy< void(const Glib::RefPtr< PrintContext > &, const Glib::RefPtr< PageSetup > &)> signal_got_page_size ()
 
- Public Member Functions inherited from Glib::Interface
 Interface ()
 
 Interface (Interface &&src) noexcept
 
Interfaceoperator= (Interface &&src) noexcept
 
 Interface (const Glib::Interface_Class &interface_class)
 
 Interface (GObject *castitem)
 
 ~Interface () noexcept override
 
 Interface (const Interface &)=delete
 
Interfaceoperator= (const Interface &)=delete
 
GObjectgobj ()
 
const GObjectgobj () const
 
- Public Member Functions inherited from Glib::ObjectBase
 ObjectBase (const ObjectBase &)=delete
 
ObjectBaseoperator= (const ObjectBase &)=delete
 
void set_property_value (const Glib::ustring &property_name, const Glib::ValueBase &value)
 
void get_property_value (const Glib::ustring &property_name, Glib::ValueBase &value) const
 
void set_property (const Glib::ustring &property_name, const PropertyType &value)
 
void get_property (const Glib::ustring &property_name, PropertyType &value) const
 
PropertyType get_property (const Glib::ustring &property_name) const
 
sigc::connection connect_property_changed (const Glib::ustring &property_name, const sigc::slot< void()> &slot)
 
sigc::connection connect_property_changed (const Glib::ustring &property_name, sigc::slot< void()> &&slot)
 
void freeze_notify ()
 
void thaw_notify ()
 
virtual void reference () const
 
virtual void unreference () const
 
GObjectgobj ()
 
const GObjectgobj () const
 
GObjectgobj_copy () const
 
- Public Member Functions inherited from sigc::trackable
 trackable () noexcept
 
 trackable (const trackable &src) noexcept
 
 trackable (trackable &&src) noexcept
 
 ~trackable ()
 
void add_destroy_notify_callback (notifiable *data, func_destroy_notify func) const
 
void notify_callbacks ()
 
trackableoperator= (const trackable &src)
 
trackableoperator= (trackable &&src) noexcept
 
void remove_destroy_notify_callback (notifiable *data) const
 

Static Public Member Functions

static void add_interface (GType gtype_implementer)
 
static GType get_type ()
 Get the GType for this class, for use with the underlying GObject type system.
 

Protected Member Functions

 PrintOperationPreview ()
 You should derive from this class to use it.
 
virtual void render_page_vfunc (int page_nr)
 
virtual void end_preview_vfunc ()
 
virtual bool is_selected_vfunc (int page_nr) const
 
virtual void on_ready (const Glib::RefPtr< PrintContext > &context)
 This is a default handler for the signal signal_ready().
 
virtual void on_got_page_size (const Glib::RefPtr< PrintContext > &context, const Glib::RefPtr< PageSetup > &page_setup)
 This is a default handler for the signal signal_got_page_size().
 
- Protected Member Functions inherited from Glib::ObjectBase
 ObjectBase ()
 
 ObjectBase (const char *custom_type_name)
 
 ObjectBase (const std::type_info &custom_type_info)
 
 ObjectBase (ObjectBase &&src) noexcept
 
ObjectBaseoperator= (ObjectBase &&src) noexcept
 
virtual ~ObjectBase () noexcept=0
 
void initialize (GObject *castitem)
 
void initialize_move (GObject *castitem, Glib::ObjectBase *previous_wrapper)
 

Related Symbols

(Note that these are not member symbols.)

Glib::RefPtr< Gtk::PrintOperationPreviewwrap (GtkPrintOperationPreview *object, bool take_copy=false)
 A Glib::wrap() method for this object.
 

Additional Inherited Members

- Public Types inherited from sigc::trackable
typedef internal::func_destroy_notify func_destroy_notify
 
- Public Types inherited from sigc::notifiable
typedef internal::func_destroy_notify func_destroy_notify
 

Constructor & Destructor Documentation

◆ PrintOperationPreview() [1/2]

Gtk::PrintOperationPreview::PrintOperationPreview ( )
protected

You should derive from this class to use it.

◆ PrintOperationPreview() [2/2]

Gtk::PrintOperationPreview::PrintOperationPreview ( PrintOperationPreview &&  src)
noexcept

◆ ~PrintOperationPreview()

Gtk::PrintOperationPreview::~PrintOperationPreview ( )
overridenoexcept

Member Function Documentation

◆ add_interface()

static void Gtk::PrintOperationPreview::add_interface ( GType  gtype_implementer)
static

◆ end_preview()

void Gtk::PrintOperationPreview::end_preview ( )

Ends a preview.

This function must be called to finish a custom print preview.

◆ end_preview_vfunc()

virtual void Gtk::PrintOperationPreview::end_preview_vfunc ( )
protectedvirtual

◆ get_type()

static GType Gtk::PrintOperationPreview::get_type ( )
static

Get the GType for this class, for use with the underlying GObject type system.

◆ gobj() [1/2]

GtkPrintOperationPreview * Gtk::PrintOperationPreview::gobj ( )
inline

Provides access to the underlying C GObject.

◆ gobj() [2/2]

const GtkPrintOperationPreview * Gtk::PrintOperationPreview::gobj ( ) const
inline

Provides access to the underlying C GObject.

◆ is_selected()

bool Gtk::PrintOperationPreview::is_selected ( int  page_nr) const

Returns whether the given page is included in the set of pages that have been selected for printing.

Parameters
page_nrA page number.
Returns
true if the page has been selected for printing.

◆ is_selected_vfunc()

virtual bool Gtk::PrintOperationPreview::is_selected_vfunc ( int  page_nr) const
protectedvirtual

◆ on_got_page_size()

virtual void Gtk::PrintOperationPreview::on_got_page_size ( const Glib::RefPtr< PrintContext > &  context,
const Glib::RefPtr< PageSetup > &  page_setup 
)
protectedvirtual

This is a default handler for the signal signal_got_page_size().

◆ on_ready()

virtual void Gtk::PrintOperationPreview::on_ready ( const Glib::RefPtr< PrintContext > &  context)
protectedvirtual

This is a default handler for the signal signal_ready().

◆ operator=()

PrintOperationPreview & Gtk::PrintOperationPreview::operator= ( PrintOperationPreview &&  src)
noexcept

◆ render_page()

void Gtk::PrintOperationPreview::render_page ( int  page_nr)

Renders a page to the preview.

This is using the print context that was passed to the Gtk::PrintOperation::signal_preview() handler together with preview.

A custom print preview should use this function to render the currently selected page.

Note that this function requires a suitable cairo context to be associated with the print context.

Parameters
page_nrThe page to render.

◆ render_page_vfunc()

virtual void Gtk::PrintOperationPreview::render_page_vfunc ( int  page_nr)
protectedvirtual

◆ signal_got_page_size()

Glib::SignalProxy< void(const Glib::RefPtr< PrintContext > &, const Glib::RefPtr< PageSetup > &)> Gtk::PrintOperationPreview::signal_got_page_size ( )
Slot Prototype:
void on_my_got_page_size(const Glib::RefPtr<PrintContext>& context, const Glib::RefPtr<PageSetup>& page_setup)

Flags: Run Last

Emitted once for each page that gets rendered to the preview.

A handler for this signal should update the context according to page_setup and set up a suitable cairo context, using Gtk::PrintContext::set_cairo_context().

Parameters
contextThe current Gtk::PrintContext.
page_setupThe Gtk::PageSetup for the current page.

◆ signal_ready()

Glib::SignalProxy< void(const Glib::RefPtr< PrintContext > &)> Gtk::PrintOperationPreview::signal_ready ( )
Slot Prototype:
void on_my_ready(const Glib::RefPtr<PrintContext>& context)

Flags: Run Last

The signal_ready() signal gets emitted once per preview operation, before the first page is rendered.

A handler for this signal can be used for setup tasks.

Parameters
contextThe current Gtk::PrintContext.

Friends And Related Symbol Documentation

◆ wrap()

Glib::RefPtr< Gtk::PrintOperationPreview > wrap ( GtkPrintOperationPreview object,
bool  take_copy = false 
)
related

A Glib::wrap() method for this object.

Parameters
objectThe C instance.
take_copyFalse if the result should take ownership of the C instance. True if it should take a new copy or ref.
Returns
A C++ instance that wraps this C instance.