Scroll to navigation

wxHtmlEasyPrinting(3erl) Erlang Module Definition wxHtmlEasyPrinting(3erl)

NAME

wxHtmlEasyPrinting - Functions for wxHtmlEasyPrinting class

DESCRIPTION

This class provides very simple interface to printing architecture. It allows you to print HTML documents using only a few commands.

Note: Do not create this class on the stack only. You should create an instance on app startup and use this instance for all printing operations. The reason is that this class stores various settings in it.

wxWidgets docs: wxHtmlEasyPrinting

DATA TYPES

wxHtmlEasyPrinting() = wx:wx_object()

EXPORTS


new() -> wxHtmlEasyPrinting()



new(Options :: [Option]) -> wxHtmlEasyPrinting()


Types:

Option =
{name, unicode:chardata()} |
{parentWindow, wxWindow:wxWindow()}

Constructor.


getPrintData(This) -> wxPrintData:wxPrintData()


Types:

This = wxHtmlEasyPrinting()

Returns pointer to wxPrintData instance used by this class.

You can set its parameters (via SetXXXX methods).


getPageSetupData(This) ->


wxPageSetupDialogData:wxPageSetupDialogData()


Types:

This = wxHtmlEasyPrinting()

Returns a pointer to wxPageSetupDialogData instance used by this class.

You can set its parameters (via SetXXXX methods).


previewFile(This, Htmlfile) -> boolean()


Types:

This = wxHtmlEasyPrinting()
Htmlfile = unicode:chardata()

Preview HTML file.

Returns false in case of error - call wxPrinter:getLastError/0 to get detailed information about the kind of the error.


previewText(This, Htmltext) -> boolean()


Types:

This = wxHtmlEasyPrinting()
Htmltext = unicode:chardata()


previewText(This, Htmltext, Options :: [Option]) -> boolean()


Types:

This = wxHtmlEasyPrinting()
Htmltext = unicode:chardata()
Option = {basepath, unicode:chardata()}

Preview HTML text (not file!).

Returns false in case of error - call wxPrinter:getLastError/0 to get detailed information about the kind of the error.


printFile(This, Htmlfile) -> boolean()


Types:

This = wxHtmlEasyPrinting()
Htmlfile = unicode:chardata()

Print HTML file.

Returns false in case of error - call wxPrinter:getLastError/0 to get detailed information about the kind of the error.


printText(This, Htmltext) -> boolean()


Types:

This = wxHtmlEasyPrinting()
Htmltext = unicode:chardata()


printText(This, Htmltext, Options :: [Option]) -> boolean()


Types:

This = wxHtmlEasyPrinting()
Htmltext = unicode:chardata()
Option = {basepath, unicode:chardata()}

Print HTML text (not file!).

Returns false in case of error - call wxPrinter:getLastError/0 to get detailed information about the kind of the error.


pageSetup(This) -> ok


Types:

This = wxHtmlEasyPrinting()

Display page setup dialog and allows the user to modify settings.


setFonts(This, Normal_face, Fixed_face) -> ok


Types:

This = wxHtmlEasyPrinting()
Normal_face = Fixed_face = unicode:chardata()


setFonts(This, Normal_face, Fixed_face, Options :: [Option]) -> ok


Types:

This = wxHtmlEasyPrinting()
Normal_face = Fixed_face = unicode:chardata()
Option = {sizes, [integer()]}

Sets fonts.

See wxHtmlDCRenderer::SetFonts (not implemented in wx) for detailed description.


setHeader(This, Header) -> ok


Types:

This = wxHtmlEasyPrinting()
Header = unicode:chardata()


setHeader(This, Header, Options :: [Option]) -> ok


Types:

This = wxHtmlEasyPrinting()
Header = unicode:chardata()
Option = {pg, integer()}

Set page header.

The following macros can be used inside it:


setFooter(This, Footer) -> ok


Types:

This = wxHtmlEasyPrinting()
Footer = unicode:chardata()


setFooter(This, Footer, Options :: [Option]) -> ok


Types:

This = wxHtmlEasyPrinting()
Footer = unicode:chardata()
Option = {pg, integer()}

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


destroy(This :: wxHtmlEasyPrinting()) -> ok


Destroys the object.

wx 2.2.2.1 wxWidgets team.