# :stopdoc: # This file is automatically generated by the WXRuby3 documentation # generator. Do not alter this file. # :startdoc: module Wx::RTC # This class provides a simple interface for performing {Wx::RTC::RichTextBuffer} printing and previewing. # It uses {Wx::RTC::RichTextPrintout} for layout and rendering. # === # # Category: Rich Text # class RichTextPrinting < Object # Constructor. # Optionally pass a title to be used in the preview frame and printing wait dialog, and also a parent window for these windows. # @param name [String] # @param parentWindow [Wx::Window] # @return [RichTextPrinting] def initialize(name=("Wx::PRINTING"), parentWindow=nil) end # A convenience function to get the footer text. # See {Wx::RTC::RichTextHeaderFooterData} for details. # @param page [RichTextOddEvenPage] # @param location [RichTextPageLocation] # @return [String] def get_footer_text(page=Wx::RICHTEXT_PAGE_EVEN, location=Wx::RICHTEXT_PAGE_CENTRE) end alias_method :footer_text, :get_footer_text # Returns the internal {Wx::RTC::RichTextHeaderFooterData} object. # @return [Wx::RichTextHeaderFooterData] def get_header_footer_data; end alias_method :header_footer_data, :get_header_footer_data # A convenience function to get the header text. # See {Wx::RTC::RichTextHeaderFooterData} for details. # @param page [RichTextOddEvenPage] # @param location [RichTextPageLocation] # @return [String] def get_header_text(page=Wx::RICHTEXT_PAGE_EVEN, location=Wx::RICHTEXT_PAGE_CENTRE) end alias_method :header_text, :get_header_text # Returns the parent window to be used for the preview window and printing wait dialog. # @return [Wx::Window] def get_parent_window; end alias_method :parent_window, :get_parent_window # Returns the dimensions to be used for the preview window. # @return [Wx::Rect] def get_preview_rect; end alias_method :preview_rect, :get_preview_rect # Returns the title of the preview window or printing wait caption. # @return [Wx::String] def get_title; end alias_method :title, :get_title # Shows the page setup dialog. # @return [void] def page_setup; end # Shows a preview window for the given buffer. # The function takes its own copy of buffer. # @param buffer [Wx::RichTextBuffer] # @return [true,false] def preview_buffer(buffer) end # Shows a preview window for the given file. # richTextFile can be a text file or XML file, or other file depending on the available file handlers. # @param richTextFile [String] # @return [true,false] def preview_file(richTextFile) end # Prints the given buffer. # The function takes its own copy of buffer. showPrintDialog can be true to show the print dialog, or false to print quietly. # @param buffer [Wx::RichTextBuffer] # @param showPrintDialog [true,false] # @return [true,false] def print_buffer(buffer, showPrintDialog=true) end # Prints the given file. # richTextFile can be a text file or XML file, or other file depending on the available file handlers. showPrintDialog can be true to show the print dialog, or false to print quietly. # @param richTextFile [String] # @param showPrintDialog [true,false] # @return [true,false] def print_file(richTextFile, showPrintDialog=true) end # A convenience function to set the footer text. # See {Wx::RTC::RichTextHeaderFooterData} for details. # @param text [String] # @param page [RichTextOddEvenPage] # @param location [RichTextPageLocation] # @return [void] def set_footer_text(text, page=Wx::RICHTEXT_PAGE_ALL, location=Wx::RICHTEXT_PAGE_CENTRE) end alias_method :footer_text=, :set_footer_text # Sets the internal {Wx::RTC::RichTextHeaderFooterData} object. # @param data [Wx::RichTextHeaderFooterData] # @return [void] def set_header_footer_data(data) end alias_method :header_footer_data=, :set_header_footer_data # Sets the {Wx::RTC::RichTextHeaderFooterData} font. # @param font [Wx::Font,Wx::FontInfo] # @return [void] def set_header_footer_font(font) end alias_method :header_footer_font=, :set_header_footer_font # Sets the {Wx::RTC::RichTextHeaderFooterData} text colour. # @param colour [Wx::Colour,String,Symbol] # @return [void] def set_header_footer_text_colour(colour) end alias_method :header_footer_text_colour=, :set_header_footer_text_colour # A convenience function to set the header text. # See {Wx::RTC::RichTextHeaderFooterData} for details. # @param text [String] # @param page [RichTextOddEvenPage] # @param location [RichTextPageLocation] # @return [void] def set_header_text(text, page=Wx::RICHTEXT_PAGE_ALL, location=Wx::RICHTEXT_PAGE_CENTRE) end alias_method :header_text=, :set_header_text # Sets the page setup data. # @param pageSetupData [Wx::PageSetupDialogData] # @return [void] def set_page_setup_data(pageSetupData) end alias_method :page_setup_data=, :set_page_setup_data # Sets the parent window to be used for the preview window and printing wait dialog. # @param parent [Wx::Window] # @return [void] def set_parent_window(parent) end alias_method :parent_window=, :set_parent_window # Sets the dimensions to be used for the preview window. # @param rect [Wx::Rect] # @return [void] def set_preview_rect(rect) end alias_method :preview_rect=, :set_preview_rect # Sets the print data. # @param printData [Wx::PrintData] # @return [void] def set_print_data(printData) end alias_method :print_data=, :set_print_data # Pass true to show the header and footer on the first page. # @param show [true,false] # @return [void] def set_show_on_first_page(show) end alias_method :show_on_first_page=, :set_show_on_first_page # Pass the title of the preview window or printing wait caption. # @param title [String] # @return [void] def set_title(title) end alias_method :title=, :set_title end # RichTextPrinting # This class implements print layout for {Wx::RTC::RichTextBuffer}. # Instead of using it directly, you should normally use the {Wx::RTC::RichTextPrinting} class. # === # # Category: Rich Text # class RichTextPrintout < Printout # Constructor. # @param title [String] # @return [RichTextPrintout] def initialize(title=("Wx::PRINTOUT")) end # Calculates scaling and text, header and footer rectangles. # @param dc [Wx::DC] # @param textRect [Wx::Rect] # @param headerRect [Wx::Rect] # @param footerRect [Wx::Rect] # @return [void] def calculate_scaling(dc, textRect, headerRect, footerRect) end # Returns the header and footer data associated with the printout. # @return [Wx::RichTextHeaderFooterData] def get_header_footer_data; end alias_method :header_footer_data, :get_header_footer_data # Gets the page information. # @return [Array(Integer,Integer,Integer,Integer)] def get_page_info; end alias_method :page_info, :get_page_info # Returns a pointer to the buffer being rendered. # @return [Wx::RichTextBuffer] def get_rich_text_buffer; end alias_method :rich_text_buffer, :get_rich_text_buffer # Returns true if the given page exists in the printout. # @param page [Integer] # @return [true,false] def has_page(page) end alias_method :has_page?, :has_page # Prepares for printing, laying out the buffer and calculating pagination. # @return [void] def on_prepare_printing; end # Does the actual printing for this page. # @param page [Integer] # @return [true,false] def on_print_page(page) end # Sets the header and footer data associated with the printout. # @param data [Wx::RichTextHeaderFooterData] # @return [void] def set_header_footer_data(data) end alias_method :header_footer_data=, :set_header_footer_data # Sets margins in 10ths of millimetre. # Defaults to 1 inch for margins. # @param top [Integer] # @param bottom [Integer] # @param left [Integer] # @param right [Integer] # @return [void] def set_margins(top=254, bottom=254, left=254, right=254) end alias_method :margins=, :set_margins # Sets the buffer to print. # {Wx::RTC::RichTextPrintout} does not manage this pointer; it should be managed by the calling code, such as {Wx::RTC::RichTextPrinting}. # @param buffer [Wx::RichTextBuffer] # @return [void] def set_rich_text_buffer(buffer) end alias_method :rich_text_buffer=, :set_rich_text_buffer end # RichTextPrintout end