#include <gcugtk/printable.h>
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 |
( |
| ) |
|
virtual gcugtk::Printable::~Printable |
( |
| ) |
|
|
virtual |
Member Function Documentation
virtual void gcugtk::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 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 |
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 |
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 |
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 |
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
-
preview | whether preview or real printing is requested. |
Prints the documennt. It initializes printing, and then calls DoPrint.
gcugtk::Printable::SetFooterHeight |
( |
double |
FooterHeight | ) |
|
|
inline |
- Parameters
-
FooterHeight | the 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
-
HasBackground | whether 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
-
HeaderHeight | the 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
-
HorizCentered | whether to center horizontally or not. |
Definition at line 169 of file printable.h.
gcugtk::Printable::SetHorizFit |
( |
bool |
HorizFit | ) |
|
|
inline |
- Parameters
-
HorizFit | whether to fill the page horizontally. |
Definition at line 215 of file printable.h.
gcugtk::Printable::SetHPages |
( |
int |
HPages | ) |
|
|
inline |
- Parameters
-
HPages | the 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
-
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.
gcugtk::Printable::SetPrintBackground |
( |
bool |
PrintBackground | ) |
|
|
inline |
- Parameters
-
PrintBackground | whether 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
-
Sets the scale to use when the printing scale type is GCU_PRINT_SCALE_FIXED.
Definition at line 204 of file printable.h.
- Parameters
-
ScaleType | how to scale when printing. |
Sets the printing scale type.
Definition at line 192 of file printable.h.
gcugtk::Printable::SetUnit |
( |
GtkUnit |
Unit | ) |
|
|
inline |
- Parameters
-
Sets the current unit used in settings.
Definition at line 134 of file printable.h.
gcugtk::Printable::SetVertCentered |
( |
bool |
VertCentered | ) |
|
|
inline |
- Parameters
-
VertCentered | whether to center vertically or not. |
Definition at line 180 of file printable.h.
gcugtk::Printable::SetVertFit |
( |
bool |
VertFit | ) |
|
|
inline |
- Parameters
-
VertFit | whether to fill the page vertically. |
Definition at line 225 of file printable.h.
gcugtk::Printable::SetVPages |
( |
int |
VPages | ) |
|
|
inline |
- Parameters
-
VPages | the 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: