Class: Wx::HTML::HtmlEasyPrinting
- Defined in:
- lib/wx/doc/gen/html/html_easy_printing.rb
Overview
This class provides very simple interface to printing architecture.
It allows you to print HTML documents using only a few commands.
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.
Category: Wx::HTML, Printing Framework
Defined Under Namespace
Classes: PromptMode
Instance Method Summary collapse
-
#get_name ⇒ Wx::String
(also: #name)
Returns the current name being used for preview frames and setup dialogs.
-
#get_page_setup_data ⇒ Wx::PRT::PageSetupDialogData
(also: #page_setup_data)
Returns a pointer to PRT::PageSetupDialogData instance used by this class.
-
#get_parent_window ⇒ Wx::Window
(also: #parent_window)
Gets the parent window for dialogs.
-
#get_print_data ⇒ Wx::PRT::PrintData
(also: #print_data)
Returns pointer to PRT::PrintData instance used by this class.
-
#initialize(name = ("PRINTING"), parentWindow = nil) ⇒ Wx::HTML::HtmlEasyPrinting
constructor
Constructor.
-
#page_setup ⇒ void
Display page setup dialog and allows the user to modify settings.
-
#preview_file(htmlfile) ⇒ Boolean
Preview HTML file.
-
#preview_text(htmltext, basepath = ('')) ⇒ Boolean
Preview HTML text (not file!).
-
#print_file(htmlfile) ⇒ Boolean
Print HTML file.
-
#print_text(htmltext, basepath = ('')) ⇒ Boolean
Print HTML text (not file!).
-
#set_fonts(normal_face, fixed_face, sizes = nil) ⇒ void
Sets fonts.
-
#set_footer(footer, pg = Wx::HTML::PAGE_ALL) ⇒ void
(also: #footer=)
Set page footer.
-
#set_header(header, pg = Wx::HTML::PAGE_ALL) ⇒ void
(also: #header=)
Set page header.
-
#set_name(name) ⇒ void
(also: #name=)
Sets the name used for preview frames and setup dialogs.
-
#set_parent_window(window) ⇒ void
(also: #parent_window=)
Sets the parent window for dialogs.
-
#set_prompt_mode(promptMode) ⇒ void
(also: #prompt_mode=)
Enable or disable showing the dialog before printing.
-
#set_standard_fonts(size = -1,, normal_face = (''), fixed_face = ('')) ⇒ void
(also: #standard_fonts=)
Sets default font sizes and/or default font size.
Methods inherited from Object
#clone, #dup, #is_same_as, #un_share
Constructor Details
#initialize(name = ("PRINTING"), parentWindow = nil) ⇒ Wx::HTML::HtmlEasyPrinting
Constructor.
65 |
# File 'lib/wx/doc/gen/html/html_easy_printing.rb', line 65 def initialize(name=("PRINTING"), parentWindow=nil) end |
Instance Method Details
#get_name ⇒ Wx::String Also known as: name
Returns the current name being used for preview frames and setup dialogs.
69 |
# File 'lib/wx/doc/gen/html/html_easy_printing.rb', line 69 def get_name; end |
#get_page_setup_data ⇒ Wx::PRT::PageSetupDialogData Also known as: page_setup_data
Returns a pointer to PRT::PageSetupDialogData instance used by this class.
You can set its parameters (via SetXXXX methods).
76 |
# File 'lib/wx/doc/gen/html/html_easy_printing.rb', line 76 def get_page_setup_data; end |
#get_parent_window ⇒ Wx::Window Also known as: parent_window
Gets the parent window for dialogs.
81 |
# File 'lib/wx/doc/gen/html/html_easy_printing.rb', line 81 def get_parent_window; end |
#get_print_data ⇒ Wx::PRT::PrintData Also known as: print_data
Returns pointer to PRT::PrintData instance used by this class.
You can set its parameters (via SetXXXX methods).
88 |
# File 'lib/wx/doc/gen/html/html_easy_printing.rb', line 88 def get_print_data; end |
#page_setup ⇒ void
This method returns an undefined value.
Display page setup dialog and allows the user to modify settings.
93 |
# File 'lib/wx/doc/gen/html/html_easy_printing.rb', line 93 def page_setup; end |
#preview_file(htmlfile) ⇒ Boolean
Preview HTML file.
Returns false in case of error call PRT::Printer.get_last_error to get detailed information about the kind of the error.
100 |
# File 'lib/wx/doc/gen/html/html_easy_printing.rb', line 100 def preview_file(htmlfile) end |
#preview_text(htmltext, basepath = ('')) ⇒ Boolean
Preview HTML text (not file!).
Returns false in case of error call PRT::Printer.get_last_error to get detailed information about the kind of the error.
108 |
# File 'lib/wx/doc/gen/html/html_easy_printing.rb', line 108 def preview_text(htmltext, basepath=('')) end |
#print_file(htmlfile) ⇒ Boolean
Print HTML file.
Returns false in case of error call PRT::Printer.get_last_error to get detailed information about the kind of the error.
115 |
# File 'lib/wx/doc/gen/html/html_easy_printing.rb', line 115 def print_file(htmlfile) end |
#print_text(htmltext, basepath = ('')) ⇒ Boolean
Print HTML text (not file!).
Returns false in case of error call PRT::Printer.get_last_error to get detailed information about the kind of the error.
123 |
# File 'lib/wx/doc/gen/html/html_easy_printing.rb', line 123 def print_text(htmltext, basepath=('')) end |
#set_fonts(normal_face, fixed_face, sizes = nil) ⇒ void
This method returns an undefined value.
Sets fonts.
See Wx::HtmlDCRenderer::SetFonts for detailed description.
132 |
# File 'lib/wx/doc/gen/html/html_easy_printing.rb', line 132 def set_fonts(normal_face, fixed_face, sizes=nil) end |
#set_footer(footer, pg = Wx::HTML::PAGE_ALL) ⇒ void Also known as:
This method returns an undefined value.
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
157 |
# File 'lib/wx/doc/gen/html/html_easy_printing.rb', line 157 def (, pg=Wx::HTML::PAGE_ALL) end |
#set_header(header, pg = Wx::HTML::PAGE_ALL) ⇒ void Also known as: header=
This method returns an undefined value.
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
172 |
# File 'lib/wx/doc/gen/html/html_easy_printing.rb', line 172 def set_header(header, pg=Wx::HTML::PAGE_ALL) end |
#set_name(name) ⇒ void Also known as: name=
This method returns an undefined value.
Sets the name used for preview frames and setup dialogs.
137 |
# File 'lib/wx/doc/gen/html/html_easy_printing.rb', line 137 def set_name(name) end |
#set_parent_window(window) ⇒ void Also known as: parent_window=
This method returns an undefined value.
Sets the parent window for dialogs.
178 |
# File 'lib/wx/doc/gen/html/html_easy_printing.rb', line 178 def set_parent_window(window) end |
#set_prompt_mode(promptMode) ⇒ void Also known as: prompt_mode=
This method returns an undefined value.
Enable or disable showing the dialog before printing.
The prompt mode determines the value of the prompt parameter passed to PRT::Printer#print when it is called by this class. Default prompt mode value is Prompt_Always.
187 |
# File 'lib/wx/doc/gen/html/html_easy_printing.rb', line 187 def set_prompt_mode(promptMode) end |
#set_standard_fonts(size = -1,, normal_face = (''), fixed_face = ('')) ⇒ void Also known as: standard_fonts=
This method returns an undefined value.
Sets default font sizes and/or default font size.
See Wx::HtmlDCRenderer::SetStandardFonts for detailed description.
148 |
# File 'lib/wx/doc/gen/html/html_easy_printing.rb', line 148 def set_standard_fonts(size=-1, normal_face=(''), fixed_face=('')) end |