Version: 2.9.4
Public Member Functions | Static Public Member Functions
wxHtmlPrintout Class Reference

#include </home/zeitlin/src/wx/github/interface/wx/html/htmprint.h>

Inheritance diagram for wxHtmlPrintout:

Detailed Description

This class serves as printout class for HTML documents.

Library:  wxHTML
Category:  HTML, Printing Framework

Public Member Functions

 wxHtmlPrintout (const wxString &title="Printout")
 Constructor.
void SetFonts (const wxString &normal_face, const wxString &fixed_face, const int *sizes=NULL)
 This function sets font sizes and faces.
void SetFooter (const wxString &footer, int pg=wxPAGE_ALL)
 Set page footer.
void SetHeader (const wxString &header, int pg=wxPAGE_ALL)
 Set page header.
void SetHtmlFile (const wxString &htmlfile)
 Prepare the class for printing this HTML file.
void SetHtmlText (const wxString &html, const wxString &basepath=wxEmptyString, bool isdir=true)
 Prepare the class for printing this HTML text.
void SetMargins (float top=25.2, float bottom=25.2, float left=25.2, float right=25.2, float spaces=5)
 Sets margins in millimeters.

Static Public Member Functions

static void AddFilter (wxHtmlFilter *filter)
 Adds a filter to the static list of filters for wxHtmlPrintout.

List of all members.


Constructor & Destructor Documentation

wxHtmlPrintout::wxHtmlPrintout ( const wxString title = "Printout")

Constructor.


Member Function Documentation

static void wxHtmlPrintout::AddFilter ( wxHtmlFilter filter) [static]

Adds a filter to the static list of filters for wxHtmlPrintout.

See wxHtmlFilter for further information.

void wxHtmlPrintout::SetFonts ( const wxString normal_face,
const wxString fixed_face,
const int *  sizes = NULL 
)

This function sets font sizes and faces.

See wxHtmlWindow::SetFonts for detailed description.

void wxHtmlPrintout::SetFooter ( const wxString footer,
int  pg = wxPAGE_ALL 
)

Set page footer.

The following macros can be used inside it:

  • @DATE@ is replaced by the current date in default format
  • @PAGENUM@ is replaced by page number
  • @PAGESCNT@ is replaced by total number of pages
  • @TIME@ is replaced by the current time in default format
  • @TITLE@ is replaced with the title of the document
Parameters:
footerHTML text to be used as footer.
pgone of wxPAGE_ODD, wxPAGE_EVEN and wxPAGE_ALL constants.
void wxHtmlPrintout::SetHeader ( const wxString header,
int  pg = wxPAGE_ALL 
)

Set page header.

The following macros can be used inside it:

  • @DATE@ is replaced by the current date in default format
  • @PAGENUM@ is replaced by page number
  • @PAGESCNT@ is replaced by total number of pages
  • @TIME@ is replaced by the current time in default format
  • @TITLE@ is replaced with the title of the document
Parameters:
headerHTML text to be used as header.
pgone of wxPAGE_ODD, wxPAGE_EVEN and wxPAGE_ALL constants.
void wxHtmlPrintout::SetHtmlFile ( const wxString htmlfile)

Prepare the class for printing this HTML file.

The file may be located on any virtual file system or it may be normal file.

void wxHtmlPrintout::SetHtmlText ( const wxString html,
const wxString basepath = wxEmptyString,
bool  isdir = true 
)

Prepare the class for printing this HTML text.

Parameters:
htmlHTML text. (NOT file!)
basepathbase directory (html string would be stored there if it was in file). It is used to determine path for loading images, for example.
isdirfalse if basepath is filename, true if it is directory name (see wxFileSystem for detailed explanation).
void wxHtmlPrintout::SetMargins ( float  top = 25.2,
float  bottom = 25.2,
float  left = 25.2,
float  right = 25.2,
float  spaces = 5 
)

Sets margins in millimeters.

Defaults to 1 inch for margins and 0.5cm for space between text and header and/or footer.

 All Classes Files Functions Variables Typedefs Enumerations Enumerator Friends Defines