#include <gcu/printable.h>
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 |
( |
| ) |
|
virtual gcu::Printable::~Printable |
( |
| ) |
|
|
virtual |
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 gcp::Document, and gcu::GLView.
gcu::Printable::GetFooterHeight |
( |
void |
| ) |
const |
|
inline |
- Returns
- the current page footer height.
Definition at line 161 of file printable.h.
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 gcp::Document, and gcu::GLView.
gcu::Printable::GetHeaderHeight |
( |
void |
| ) |
const |
|
inline |
- Returns
- the current page header height.
Definition at line 149 of file printable.h.
gcu::Printable::GetHorizCentered |
( |
void |
| ) |
const |
|
inline |
- Returns
- true if printing is horizontally centered.
Definition at line 172 of file printable.h.
gcu::Printable::GetHorizFit |
( |
void |
| ) |
const |
|
inline |
- Returns
- true if printing fills the page horizontally.
Definition at line 218 of file printable.h.
gcu::Printable::GetHPages |
( |
void |
| ) |
const |
|
inline |
- Returns
- the current number of pages to which printing is horizontally spread.
Definition at line 241 of file printable.h.
virtual int gcu::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 101 of file printable.h.
gcu::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 121 of file printable.h.
gcu::Printable::GetRefFooterHeight |
( |
void |
| ) |
|
|
inline |
- Returns
- the current page footer height as a reference.
Definition at line 161 of file printable.h.
gcu::Printable::GetRefHeaderHeight |
( |
void |
| ) |
|
|
inline |
- Returns
- the current page header height as a reference.
Definition at line 149 of file printable.h.
gcu::Printable::GetRefHorizCentered |
( |
void |
| ) |
|
|
inline |
- Returns
- a reference to the boolean indicating if printing is horizontally centered or not.
Definition at line 172 of file printable.h.
gcu::Printable::GetRefHorizFit |
( |
void |
| ) |
|
|
inline |
- Returns
- a reference to the boolean indicating if printing fills the page horizontally.
Definition at line 218 of file printable.h.
gcu::Printable::GetRefHPages |
( |
void |
| ) |
|
|
inline |
- Returns
- the current GtkUnnumber of pages to which printing is horizontally spread as a reference.
Definition at line 241 of file printable.h.
gcu::Printable::GetRefScale |
( |
void |
| ) |
|
|
inline |
- Returns
- the current scale as a reference.
Definition at line 207 of file printable.h.
gcu::Printable::GetRefScaleType |
( |
void |
| ) |
|
|
inline |
- Returns
- the current printing scale type as a reference.
Definition at line 195 of file printable.h.
gcu::Printable::GetRefUnit |
( |
void |
| ) |
|
|
inline |
- Returns
- the current GtkUnit as a reference.
Definition at line 137 of file printable.h.
gcu::Printable::GetRefVertCentered |
( |
void |
| ) |
|
|
inline |
- Returns
- a reference to the boolean indicating if printing is vertically centered or not.
Definition at line 183 of file printable.h.
gcu::Printable::GetRefVertFit |
( |
void |
| ) |
|
|
inline |
- Returns
- a reference to the boolean indicating if printing fills the page vertically.
Definition at line 228 of file printable.h.
gcu::Printable::GetRefVPages |
( |
void |
| ) |
|
|
inline |
- Returns
- the current GtkUnnumber of pages to which printing is vertically spread as a reference.
Definition at line 254 of file printable.h.
gcu::Printable::GetScale |
( |
void |
| ) |
const |
|
inline |
gcu::Printable::GetScaleType |
( |
void |
| ) |
const |
|
inline |
- Returns
- the current printing scale type.
Definition at line 195 of file printable.h.
gcu::Printable::GetUnit |
( |
void |
| ) |
const |
|
inline |
- Returns
- the current GtkUnit.
Definition at line 137 of file printable.h.
gcu::Printable::GetVertCentered |
( |
void |
| ) |
const |
|
inline |
- Returns
- true if printing is vertically centered.
Definition at line 183 of file printable.h.
gcu::Printable::GetVertFit |
( |
void |
| ) |
const |
|
inline |
gcu::Printable::GetVPages |
( |
void |
| ) |
const |
|
inline |
- Returns
- the current number of pages to which printing is vertically spread.
Definition at line 254 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.
gcu::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 161 of file printable.h.
gcu::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 149 of file printable.h.
gcu::Printable::SetHorizCentered |
( |
bool |
HorizCentered | ) |
|
|
inline |
- Parameters
-
HorizCentered | whether to center horizontally or not. |
Definition at line 172 of file printable.h.
gcu::Printable::SetHorizFit |
( |
bool |
HorizFit | ) |
|
|
inline |
- Parameters
-
HorizFit | whether to fill the page horizontally. |
Definition at line 218 of file printable.h.
gcu::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 241 of file printable.h.
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.
gcu::Printable::SetScale |
( |
double |
Scale | ) |
|
|
inline |
- Parameters
-
Sets the scale to use when the printing scale type is GCU_PRINT_SCALE_FIXED.
Definition at line 207 of file printable.h.
- Parameters
-
ScaleType | how to scale when printing. |
Sets the printing scale type.
Definition at line 195 of file printable.h.
gcu::Printable::SetUnit |
( |
GtkUnit |
Unit | ) |
|
|
inline |
- Parameters
-
Sets the current unit used in settings.
Definition at line 137 of file printable.h.
gcu::Printable::SetVertCentered |
( |
bool |
VertCentered | ) |
|
|
inline |
- Parameters
-
VertCentered | whether to center vertically or not. |
Definition at line 183 of file printable.h.
gcu::Printable::SetVertFit |
( |
bool |
VertFit | ) |
|
|
inline |
- Parameters
-
VertFit | whether to fill the page vertically. |
Definition at line 228 of file printable.h.
gcu::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 254 of file printable.h.
virtual bool gcu::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 91 of file printable.h.
virtual bool gcu::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 85 of file printable.h.
The documentation for this class was generated from the following file: