# :stopdoc: # This file is automatically generated by the WXRuby3 documentation # generator. Do not alter this file. # :startdoc: module Wx::HTML # # PAGE_ODD = 0 # # PAGE_EVEN = 1 # # PAGE_ALL = 2 # 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 # class HtmlEasyPrinting < Object # Controls when the print dialog should be shown. # # # @see Wx::HTML::HtmlEasyPrinting#set_prompt_mode # # class PromptMode < Wx::Enum # Do not show the print dialog. # Prompt_Never = Wx::HTML::HtmlEasyPrinting::PromptMode.new(0) # Show the print dialog only the first time. # Prompt_Once = Wx::HTML::HtmlEasyPrinting::PromptMode.new(1) # Show the print dialog every time (default value). # Prompt_Always = Wx::HTML::HtmlEasyPrinting::PromptMode.new(2) end # PromptMode # Constructor. # @param name [String] Name of the printing object. Used by preview frames and setup dialogs. # @param parentWindow [Wx::Window] pointer to the window that will own the preview frame and setup dialogs. May be NULL. # @return [HtmlEasyPrinting] def initialize(name=("Wx::PRINTING"), parentWindow=nil) end # Returns the current name being used for preview frames and setup dialogs. # @return [Wx::String] def get_name; end alias_method :name, :get_name # Returns a pointer to {Wx::PRT::PageSetupDialogData} instance used by this class. # You can set its parameters (via SetXXXX methods). # @return [Wx::PageSetupDialogData] def get_page_setup_data; end alias_method :page_setup_data, :get_page_setup_data # Gets the parent window for dialogs. # @return [Wx::Window] def get_parent_window; end alias_method :parent_window, :get_parent_window # Returns pointer to {Wx::PRT::PrintData} instance used by this class. # You can set its parameters (via SetXXXX methods). # @return [Wx::PrintData] def get_print_data; end alias_method :print_data, :get_print_data # Display page setup dialog and allows the user to modify settings. # @return [void] def page_setup; end # Preview HTML file. # Returns false in case of error call {Wx::PRT::Printer.get_last_error} to get detailed information about the kind of the error. # @param htmlfile [String] # @return [true,false] def preview_file(htmlfile) end # Preview HTML text (not file!). # Returns false in case of error call {Wx::PRT::Printer.get_last_error} to get detailed information about the kind of the error. # @param htmltext [String] HTML text. # @param basepath [String] base directory (html string would be stored there if it was in file). It is used to determine path for loading images, for example. # @return [true,false] def preview_text(htmltext, basepath=Wx::EMPTY_STRING) end # Print HTML file. # Returns false in case of error call {Wx::PRT::Printer.get_last_error} to get detailed information about the kind of the error. # @param htmlfile [String] # @return [true,false] def print_file(htmlfile) end # Print HTML text (not file!). # Returns false in case of error call {Wx::PRT::Printer.get_last_error} to get detailed information about the kind of the error. # @param htmltext [String] HTML text. # @param basepath [String] base directory (html string would be stored there if it was in file). It is used to determine path for loading images, for example. # @return [true,false] def print_text(htmltext, basepath=Wx::EMPTY_STRING) end # Sets fonts. # See Wx::HtmlDCRenderer::SetFonts for detailed description. # @param normal_face [String] # @param fixed_face [String] # @param sizes [Array(Integer,Integer,Integer,Integer,Integer,Integer,Integer), nil] # @return [void] def set_fonts(normal_face, fixed_face, sizes=nil) end # Sets the name used for preview frames and setup dialogs. # @param name [String] # @return [void] def set_name(name) end alias_method :name=, :set_name # Sets default font sizes and/or default font size. # See Wx::HtmlDCRenderer::SetStandardFonts for detailed description. # @see Wx::HTML::HtmlEasyPrinting#set_fonts # @param size [Integer] # @param normal_face [String] # @param fixed_face [String] # @return [void] def set_standard_fonts(size=-1, normal_face=Wx::EMPTY_STRING, fixed_face=Wx::EMPTY_STRING) end alias_method :standard_fonts=, :set_standard_fonts # 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 # @param footer [String] HTML text to be used as footer. # @param pg [Integer] one of {Wx::HTML::PAGE_ODD}, {Wx::HTML::PAGE_EVEN} and {Wx::HTML::PAGE_ALL} constants. # @return [void] def set_footer(footer, pg=Wx::PAGE_ALL) end alias_method :footer=, :set_footer # 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 # @param header [String] HTML text to be used as header. # @param pg [Integer] one of {Wx::HTML::PAGE_ODD}, {Wx::HTML::PAGE_EVEN} and {Wx::HTML::PAGE_ALL} constants. # @return [void] def set_header(header, pg=Wx::PAGE_ALL) end alias_method :header=, :set_header # Sets the parent window for dialogs. # @param window [Wx::Window] # @return [void] def set_parent_window(window) end alias_method :parent_window=, :set_parent_window # Enable or disable showing the dialog before printing. # The prompt mode determines the value of the prompt parameter passed to {Wx::PRT::Printer#print} when it is called by this class. # Default prompt mode value is Prompt_Always. # @param promptMode [PromptMode] # @return [void] def set_prompt_mode(promptMode) end alias_method :prompt_mode=, :set_prompt_mode end # HtmlEasyPrinting end