#include <gcu/printable.h>
Public Member Functions | |
Printable () | |
virtual | ~Printable () |
virtual void | DoPrint (GtkPrintOperation *print, GtkPrintContext *context, int page) const =0 |
virtual bool | SupportsHeaders () |
virtual bool | SupportMultiplePages () |
virtual GtkWindow * | GetGtkWindow ()=0 |
virtual int | GetPagesNumber () |
void | Print (bool preview) |
void | SetPageSetup (GtkPageSetup *PageSetup) |
A base class for everything that might be printed.
Definition at line 58 of file printable.h.
gcu::Printable::Printable | ( | ) |
The constructor.
virtual gcu::Printable::~Printable | ( | ) | [virtual] |
The destructor.
virtual void gcu::Printable::DoPrint | ( | GtkPrintOperation * | print, | |
GtkPrintContext * | context, | |||
int | page | |||
) | const [pure virtual] |
a GtkPrintOperation*. | ||
context | a GtkPrintContext*. | |
page | the page to print. |
This is the method doing the real printing. It mustbe overloaded by derived classes and take parameters defined in gcu::Printable into account. Default implementation does not do anything.
Implemented in gcu::GLView, and gcp::Document.
virtual GtkWindow* gcu::Printable::GetGtkWindow | ( | ) | [pure virtual] |
Derived classes need to overload this pure virtual method.
Implemented in gcu::GLView, and gcp::Document.
virtual int gcu::Printable::GetPagesNumber | ( | ) | [inline, virtual] |
Derived classes able to print several pages must overload this method.
Definition at line 101 of file printable.h.
void gcu::Printable::Print | ( | bool | preview | ) |
preview | whether preview or real printing is requested. |
Prints the documennt. It initializes printing, and then calls DoPrint.
void gcu::Printable::SetPageSetup | ( | GtkPageSetup * | PageSetup | ) |
PageSetup | a GtkPageSetup*. |
This methods sets the page setup for the current printable object. Note that this does not increase the reference count of the GtkPageSetup*. The page setup will be unrefed when the Printable is destroyed or when a new page setup is set.
virtual bool gcu::Printable::SupportMultiplePages | ( | ) | [inline, virtual] |
Derived classes able to print several pages must overload this method.
Definition at line 91 of file printable.h.
virtual bool gcu::Printable::SupportsHeaders | ( | ) | [inline, virtual] |
Derived classes supporting headers and footers must overload this method.
Definition at line 85 of file printable.h.