The Gnome Chemistry Utils  0.14.0
Public Member Functions | List of all members
gcugtk::Printable Class Reference

#include <gcugtk/printable.h>

Inheritance diagram for gcugtk::Printable:
gcu::DialogOwner gcp::Document gcugtk::GLView gcugtk::SpectrumDocument gcr::View gcugtk::Chem3dView

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)
GtkPrintSettings * GetPrintSettings (void) const
void SetUnit (GtkUnit val)
GtkUnit GetUnit (void) const
GtkUnit & GetRefUnit (void)
void SetHeaderHeight (double val)
double GetHeaderHeight (void) const
double & GetRefHeaderHeight (void)
void SetFooterHeight (double val)
double GetFooterHeight (void) const
double & GetRefFooterHeight (void)
void SetHorizCentered (bool val)
bool GetHorizCentered (void) const
bool & GetRefHorizCentered (void)
void SetVertCentered (bool val)
bool GetVertCentered (void) const
bool & GetRefVertCentered (void)
void SetScaleType (PrintScaleType val)
PrintScaleType GetScaleType (void) const
PrintScaleTypeGetRefScaleType (void)
void SetScale (double val)
double GetScale (void) const
double & GetRefScale (void)
void SetHorizFit (bool val)
bool GetHorizFit (void) const
bool & GetRefHorizFit (void)
void SetVertFit (bool val)
bool GetVertFit (void) const
bool & GetRefVertFit (void)
void SetHPages (int val)
int GetHPages (void) const
int & GetRefHPages (void)
void SetVPages (int val)
int GetVPages (void) const
int & GetRefVPages (void)
void SetHasBackground (bool val)
bool GetHasBackground (void) const
bool & GetRefHasBackground (void)
void SetPrintBackground (bool val)
bool GetPrintBackground (void) const
bool & GetRefPrintBackground (void)
- Public Member Functions inherited from gcu::DialogOwner
 DialogOwner ()
virtual ~DialogOwner ()
DialogGetDialog (std::string name) const
void ClearDialogs ()

Detailed Description

A base class for everything that might be printed.

Definition at line 55 of file printable.h.

Constructor & Destructor Documentation

gcugtk::Printable::Printable ( )

The constructor.

virtual gcugtk::Printable::~Printable ( )
virtual

The destructor.

Member Function Documentation

virtual void gcugtk::Printable::DoPrint ( GtkPrintOperation *  print,
GtkPrintContext *  context,
int  page 
) const
pure virtual
Parameters
printa GtkPrintOperation*.
contexta GtkPrintContext*.
pagethe 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 gcp::Document, and gcugtk::GLView.

gcugtk::Printable::GetFooterHeight ( void  ) const
inline
Returns
the current page footer height.

Definition at line 158 of file printable.h.

virtual GtkWindow* gcugtk::Printable::GetGtkWindow ( )
pure virtual

Derived classes need to overload this pure virtual method.

Returns
the top level GtkWindow containing the document.

Implemented in gcp::Document, and gcugtk::GLView.

gcugtk::Printable::GetHasBackground ( void  ) const
inline
Returns
whether the Printable owns a background.

Definition at line 264 of file printable.h.

gcugtk::Printable::GetHeaderHeight ( void  ) const
inline
Returns
the current page header height.

Definition at line 146 of file printable.h.

gcugtk::Printable::GetHorizCentered ( void  ) const
inline
Returns
true if printing is horizontally centered.

Definition at line 169 of file printable.h.

gcugtk::Printable::GetHorizFit ( void  ) const
inline
Returns
true if printing fills the page horizontally.

Definition at line 215 of file printable.h.

gcugtk::Printable::GetHPages ( void  ) const
inline
Returns
the current number of pages to which printing is horizontally spread.

Definition at line 238 of file printable.h.

virtual int gcugtk::Printable::GetPagesNumber ( )
inlinevirtual

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 98 of file printable.h.

gcugtk::Printable::GetPrintBackground ( void  ) const
inline
Returns
whether the background should be printed.

Definition at line 276 of file printable.h.

gcugtk::Printable::GetPrintSettings ( void  ) const
inline
Returns
the GtkPrintSettings currently associated with the Printable instance.
the GtkPageSetup currently associated with the Printable instance.

Definition at line 118 of file printable.h.

gcugtk::Printable::GetRefFooterHeight ( void  )
inline
Returns
the current page footer height as a reference.

Definition at line 158 of file printable.h.

gcugtk::Printable::GetRefHasBackground ( void  )
inline
Returns
whether the Printable owns a background as a reference.

Definition at line 264 of file printable.h.

gcugtk::Printable::GetRefHeaderHeight ( void  )
inline
Returns
the current page header height as a reference.

Definition at line 146 of file printable.h.

gcugtk::Printable::GetRefHorizCentered ( void  )
inline
Returns
a reference to the boolean indicating if printing is horizontally centered or not.

Definition at line 169 of file printable.h.

gcugtk::Printable::GetRefHorizFit ( void  )
inline
Returns
a reference to the boolean indicating if printing fills the page horizontally.

Definition at line 215 of file printable.h.

gcugtk::Printable::GetRefHPages ( void  )
inline
Returns
the current GtkUnnumber of pages to which printing is horizontally spread as a reference.

Definition at line 238 of file printable.h.

gcugtk::Printable::GetRefPrintBackground ( void  )
inline
Returns
whether the background should be printed as a reference.

Definition at line 276 of file printable.h.

gcugtk::Printable::GetRefScale ( void  )
inline
Returns
the current scale as a reference.

Definition at line 204 of file printable.h.

gcugtk::Printable::GetRefScaleType ( void  )
inline
Returns
the current printing scale type as a reference.

Definition at line 192 of file printable.h.

gcugtk::Printable::GetRefUnit ( void  )
inline
Returns
the current GtkUnit as a reference.

Definition at line 134 of file printable.h.

gcugtk::Printable::GetRefVertCentered ( void  )
inline
Returns
a reference to the boolean indicating if printing is vertically centered or not.

Definition at line 180 of file printable.h.

gcugtk::Printable::GetRefVertFit ( void  )
inline
Returns
a reference to the boolean indicating if printing fills the page vertically.

Definition at line 225 of file printable.h.

gcugtk::Printable::GetRefVPages ( void  )
inline
Returns
the current GtkUnnumber of pages to which printing is vertically spread as a reference.

Definition at line 251 of file printable.h.

gcugtk::Printable::GetScale ( void  ) const
inline
Returns
the current scale.

Definition at line 204 of file printable.h.

gcugtk::Printable::GetScaleType ( void  ) const
inline
Returns
the current printing scale type.

Definition at line 192 of file printable.h.

gcugtk::Printable::GetUnit ( void  ) const
inline
Returns
the current GtkUnit.

Definition at line 134 of file printable.h.

gcugtk::Printable::GetVertCentered ( void  ) const
inline
Returns
true if printing is vertically centered.

Definition at line 180 of file printable.h.

gcugtk::Printable::GetVertFit ( void  ) const
inline

vertically

Definition at line 225 of file printable.h.

gcugtk::Printable::GetVPages ( void  ) const
inline
Returns
the current number of pages to which printing is vertically spread.

Definition at line 251 of file printable.h.

void gcugtk::Printable::Print ( bool  preview)
Parameters
previewwhether preview or real printing is requested.

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

gcugtk::Printable::SetFooterHeight ( double  FooterHeight)
inline
Parameters
FooterHeightthe height of the header.

Sets the height of the footer to be printed at the bottom of each page.

Definition at line 158 of file printable.h.

gcugtk::Printable::SetHasBackground ( bool  HasBackground)
inline
Parameters
HasBackgroundwhether the Printable owns a background.

Sets whether the Printable owns a background. Should only used from constructors of derived classes.

Definition at line 264 of file printable.h.

gcugtk::Printable::SetHeaderHeight ( double  HeaderHeight)
inline
Parameters
HeaderHeightthe height of the header.

Sets the height of the header to be printed on top of each page.

Definition at line 146 of file printable.h.

gcugtk::Printable::SetHorizCentered ( bool  HorizCentered)
inline
Parameters
HorizCenteredwhether to center horizontally or not.

Definition at line 169 of file printable.h.

gcugtk::Printable::SetHorizFit ( bool  HorizFit)
inline
Parameters
HorizFitwhether to fill the page horizontally.

Definition at line 215 of file printable.h.

gcugtk::Printable::SetHPages ( int  HPages)
inline
Parameters
HPagesthe number of pages to which horizontally spread the print output.

Sets the full width in pages of the printing, when printing to several pages.

Definition at line 238 of file printable.h.

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

gcugtk::Printable::SetPrintBackground ( bool  PrintBackground)
inline
Parameters
PrintBackgroundwhether the background should be printed.

Sets whether the background should be printed.

Definition at line 276 of file printable.h.

gcugtk::Printable::SetScale ( double  Scale)
inline
Parameters
Scalethe scale to use.

Sets the scale to use when the printing scale type is GCU_PRINT_SCALE_FIXED.

Definition at line 204 of file printable.h.

gcugtk::Printable::SetScaleType ( PrintScaleType  ScaleType)
inline
Parameters
ScaleTypehow to scale when printing.

Sets the printing scale type.

Definition at line 192 of file printable.h.

gcugtk::Printable::SetUnit ( GtkUnit  Unit)
inline
Parameters
Unita GtkUnit.

Sets the current unit used in settings.

Definition at line 134 of file printable.h.

gcugtk::Printable::SetVertCentered ( bool  VertCentered)
inline
Parameters
VertCenteredwhether to center vertically or not.

Definition at line 180 of file printable.h.

gcugtk::Printable::SetVertFit ( bool  VertFit)
inline
Parameters
VertFitwhether to fill the page vertically.

Definition at line 225 of file printable.h.

gcugtk::Printable::SetVPages ( int  VPages)
inline
Parameters
VPagesthe number of pages to which vertically spread the print output.

Sets the full height in pages of the printing, when printing to several pages.

Definition at line 251 of file printable.h.

virtual bool gcugtk::Printable::SupportMultiplePages ( )
inlinevirtual

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 88 of file printable.h.

virtual bool gcugtk::Printable::SupportsHeaders ( )
inlinevirtual

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 82 of file printable.h.


The documentation for this class was generated from the following file: