27 #include <gtkmm/printcontext.h> 28 #include <gtkmm/printoperation.h> 39 static Glib::RefPtr<KitPrintOperation>
create();
42 void set_page_title(
const Glib::ustring page_title) {m_page_title = page_title;}
47 virtual void on_begin_print(
const Glib::RefPtr<Gtk::PrintContext>& context);
48 virtual void on_draw_page(
const Glib::RefPtr<Gtk::PrintContext>& context,
int page_number);
virtual void on_begin_print(const Glib::RefPtr< Gtk::PrintContext > &context)
void set_items(ItemContainer *items)
Sets the list of items to be printed.
layout_refptr new_header(const Glib::RefPtr< Gtk::PrintContext > &context)
std::vector< int > m_page_breaks
A list of line numbers where a page break is required.
std::vector< Item * > ItemContainer
std::vector< layout_refptr > m_ref_footers
A list of footers, one for each page.
layout_refptr new_footer(const Glib::RefPtr< Gtk::PrintContext > &context)
std::vector< layout_refptr > m_ref_headers
A list of headers, one for each page.
virtual void on_draw_page(const Glib::RefPtr< Gtk::PrintContext > &context, int page_number)
void set_page_title(const Glib::ustring page_title)
static Glib::RefPtr< KitPrintOperation > create()
Factory to create instances.
Glib::RefPtr< Pango::Layout > layout_refptr
layout_refptr m_ref_layout
A layout to hold the body of the entire kitlist to be printed.
Glib::ustring m_page_title
~KitPrintOperation()
Destructor.