gcu::Printable Class Reference

#include <gcu/printable.h>

Inheritance diagram for gcu::Printable:
gcu::DialogOwner gcp::Document gcu::GLView gcu::SpectrumDocument gcu::CrystalView

List of all members.

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)

Detailed Description

A base class for everything that might be printed.

Definition at line 58 of file printable.h.


Constructor & Destructor Documentation

gcu::Printable::Printable (  ) 

The constructor.

virtual gcu::Printable::~Printable (  )  [virtual]

The destructor.


Member Function Documentation

virtual void gcu::Printable::DoPrint ( GtkPrintOperation *  print,
GtkPrintContext *  context,
int  page 
) const [pure virtual]
Parameters:
print 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.

Returns:
the top level GtkWindow containing the document.

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.

Returns:
the page number for the document. Default implementation returns 1.

Definition at line 101 of file printable.h.

void gcu::Printable::Print ( bool  preview  ) 
Parameters:
preview whether preview or real printing is requested.

Prints the documennt. It initializes printing, and then calls DoPrint.

void gcu::Printable::SetPageSetup ( GtkPageSetup *  PageSetup  ) 
Parameters:
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.

Returns:
true if the document supports pagination. Default implementation returns false.

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.

Returns:
true if the document headers and footers. Default implementation returns false.

Definition at line 85 of file printable.h.


The documentation for this class was generated from the following file:
Generated on Tue Apr 13 14:55:05 2010 for The Gnome Chemistry Utils by  doxygen 1.6.3