#include <gcugtk/printable.h>
A base class for everything that might be printed.
Definition at line 55 of file printable.h.
◆ Printable()
gcugtk::Printable::Printable |
( |
| ) |
|
◆ ~Printable()
virtual gcugtk::Printable::~Printable |
( |
| ) |
|
|
virtual |
◆ DoPrint()
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.
◆ GetFooterHeight()
gcugtk::Printable::GetFooterHeight |
( |
void |
| ) |
const |
|
inline |
- Returns
- the current page footer height.
Definition at line 158 of file printable.h.
◆ GetGtkWindow()
virtual GtkWindow* gcugtk::Printable::GetGtkWindow |
( |
| ) |
|
|
pure virtual |
◆ GetHasBackground()
gcugtk::Printable::GetHasBackground |
( |
void |
| ) |
const |
|
inline |
◆ GetHeaderHeight()
gcugtk::Printable::GetHeaderHeight |
( |
void |
| ) |
const |
|
inline |
- Returns
- the current page header height.
Definition at line 146 of file printable.h.
◆ GetHorizCentered()
gcugtk::Printable::GetHorizCentered |
( |
void |
| ) |
const |
|
inline |
- Returns
- true if printing is horizontally centered.
Definition at line 169 of file printable.h.
◆ GetHorizFit()
gcugtk::Printable::GetHorizFit |
( |
void |
| ) |
const |
|
inline |
- Returns
- true if printing fills the page horizontally.
Definition at line 215 of file printable.h.
◆ GetHPages()
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.
◆ GetPageSetup()
gcugtk::Printable::GetPageSetup |
( |
void |
| ) |
const |
|
inline |
- Returns
- the GtkPageSetup currently associated with the Printable instance.
Definition at line 122 of file printable.h.
◆ GetPagesNumber()
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.
References Print(), and SetPageSetup().
◆ GetPrintBackground()
gcugtk::Printable::GetPrintBackground |
( |
void |
| ) |
const |
|
inline |
- Returns
- whether the background should be printed.
Definition at line 276 of file printable.h.
◆ GetPrintSettings()
gcugtk::Printable::GetPrintSettings |
( |
void |
| ) |
const |
|
inline |
- Returns
- the GtkPrintSettings currently associated with the Printable instance.
Definition at line 118 of file printable.h.
◆ GetRefFooterHeight()
gcugtk::Printable::GetRefFooterHeight |
( |
void |
| ) |
|
|
inline |
- Returns
- the current page footer height as a reference.
Definition at line 158 of file printable.h.
◆ GetRefHasBackground()
gcugtk::Printable::GetRefHasBackground |
( |
void |
| ) |
|
|
inline |
◆ GetRefHeaderHeight()
gcugtk::Printable::GetRefHeaderHeight |
( |
void |
| ) |
|
|
inline |
- Returns
- the current page header height as a reference.
Definition at line 146 of file printable.h.
◆ GetRefHorizCentered()
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.
◆ GetRefHorizFit()
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.
◆ GetRefHPages()
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.
◆ GetRefPrintBackground()
gcugtk::Printable::GetRefPrintBackground |
( |
void |
| ) |
|
|
inline |
- Returns
- whether the background should be printed as a reference.
Definition at line 276 of file printable.h.
◆ GetRefScale()
gcugtk::Printable::GetRefScale |
( |
void |
| ) |
|
|
inline |
- Returns
- the current scale as a reference.
Definition at line 204 of file printable.h.
◆ GetRefScaleType()
gcugtk::Printable::GetRefScaleType |
( |
void |
| ) |
|
|
inline |
- Returns
- the current printing scale type as a reference.
Definition at line 192 of file printable.h.
◆ GetRefUnit()
gcugtk::Printable::GetRefUnit |
( |
void |
| ) |
|
|
inline |
- Returns
- the current GtkUnit as a reference.
Definition at line 134 of file printable.h.
◆ GetRefVertCentered()
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.
◆ GetRefVertFit()
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.
◆ GetRefVPages()
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.
◆ GetScale()
gcugtk::Printable::GetScale |
( |
void |
| ) |
const |
|
inline |
◆ GetScaleType()
gcugtk::Printable::GetScaleType |
( |
void |
| ) |
const |
|
inline |
- Returns
- the current printing scale type.
Definition at line 192 of file printable.h.
◆ GetUnit()
gcugtk::Printable::GetUnit |
( |
void |
| ) |
const |
|
inline |
- Returns
- the current GtkUnit.
Definition at line 134 of file printable.h.
◆ GetVertCentered()
gcugtk::Printable::GetVertCentered |
( |
void |
| ) |
const |
|
inline |
- Returns
- true if printing is vertically centered.
Definition at line 180 of file printable.h.
◆ GetVertFit()
gcugtk::Printable::GetVertFit |
( |
void |
| ) |
const |
|
inline |
◆ GetVPages()
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.
◆ Print()
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.
Referenced by GetPagesNumber().
◆ SetFooterHeight()
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.
◆ SetHasBackground()
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.
◆ SetHeaderHeight()
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.
◆ SetHorizCentered()
gcugtk::Printable::SetHorizCentered |
( |
bool |
HorizCentered | ) |
|
|
inline |
- Parameters
-
HorizCentered | whether to center horizontally or not. |
Definition at line 169 of file printable.h.
◆ SetHorizFit()
gcugtk::Printable::SetHorizFit |
( |
bool |
HorizFit | ) |
|
|
inline |
- Parameters
-
HorizFit | whether to fill the page horizontally. |
Definition at line 215 of file printable.h.
◆ SetHPages()
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.
◆ SetPageSetup()
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.
Referenced by GetPagesNumber().
◆ SetPrintBackground()
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.
◆ SetScale()
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.
◆ SetScaleType()
- Parameters
-
ScaleType | how to scale when printing. |
Sets the printing scale type.
Definition at line 192 of file printable.h.
◆ SetUnit()
gcugtk::Printable::SetUnit |
( |
GtkUnit |
Unit | ) |
|
|
inline |
- Parameters
-
Sets the current unit used in settings.
Definition at line 134 of file printable.h.
◆ SetVertCentered()
gcugtk::Printable::SetVertCentered |
( |
bool |
VertCentered | ) |
|
|
inline |
- Parameters
-
VertCentered | whether to center vertically or not. |
Definition at line 180 of file printable.h.
◆ SetVertFit()
gcugtk::Printable::SetVertFit |
( |
bool |
VertFit | ) |
|
|
inline |
- Parameters
-
VertFit | whether to fill the page vertically. |
Definition at line 225 of file printable.h.
◆ SetVPages()
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.
◆ SupportMultiplePages()
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.
References GetGtkWindow().
◆ SupportsHeaders()
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: