Class: Wx::RTC::RichTextPrinting

Inherits:
Object
  • Object
show all
Defined in:
lib/wx/doc/gen/rtc/rich_text_printing.rb,
lib/wx/doc/rtc/richtext_printing.rb

Overview

This class provides a simple interface for performing RichTextBuffer printing and previewing.

It uses RichTextPrintout for layout and rendering.

Category: Rich Text

Requires:

  • USE_PRINTING_ARCHITECTURE
  • USE_RICHTEXT

Instance Method Summary collapse

Methods inherited from Object

#clone, #dup, #is_same_as, #un_share

Constructor Details

#initialize(name = ("PRINTING"), parentWindow = nil) ⇒ Wx::RTC::RichTextPrinting

Constructor.

Optionally pass a title to be used in the preview frame and printing wait dialog, and also a parent window for these windows.

Parameters:

  • name (String) (defaults to: ("PRINTING"))
  • parentWindow (Wx::Window) (defaults to: nil)


26
# File 'lib/wx/doc/gen/rtc/rich_text_printing.rb', line 26

def initialize(name=("PRINTING"), parentWindow=nil) end

Instance Method Details

A convenience function to get the footer text.

See Wx::RTC::RichTextHeaderFooterData for details.

Parameters:

  • page (Wx::RichTextOddEvenPage) (defaults to: Wx::RTC::RichTextOddEvenPage::RICHTEXT_PAGE_EVEN)
  • location (Wx::RichTextPageLocation) (defaults to: Wx::RTC::RichTextPageLocation::RICHTEXT_PAGE_CENTRE)

Returns:

  • (String)


34
# File 'lib/wx/doc/gen/rtc/rich_text_printing.rb', line 34

def get_footer_text(page=Wx::RTC::RichTextOddEvenPage::RICHTEXT_PAGE_EVEN, location=Wx::RTC::RichTextPageLocation::RICHTEXT_PAGE_CENTRE) end

Returns the internal Wx::RTC::RichTextHeaderFooterData object.



39
# File 'lib/wx/doc/gen/rtc/rich_text_printing.rb', line 39

def get_header_footer_data; end

#get_header_text(page = Wx::RTC::RichTextOddEvenPage::RICHTEXT_PAGE_EVEN, location = Wx::RTC::RichTextPageLocation::RICHTEXT_PAGE_CENTRE) ⇒ String Also known as: header_text

A convenience function to get the header text.

See Wx::RTC::RichTextHeaderFooterData for details.

Parameters:

  • page (Wx::RichTextOddEvenPage) (defaults to: Wx::RTC::RichTextOddEvenPage::RICHTEXT_PAGE_EVEN)
  • location (Wx::RichTextPageLocation) (defaults to: Wx::RTC::RichTextPageLocation::RICHTEXT_PAGE_CENTRE)

Returns:

  • (String)


48
# File 'lib/wx/doc/gen/rtc/rich_text_printing.rb', line 48

def get_header_text(page=Wx::RTC::RichTextOddEvenPage::RICHTEXT_PAGE_EVEN, location=Wx::RTC::RichTextPageLocation::RICHTEXT_PAGE_CENTRE) end

#get_page_setup_dataWx::PRT::PageSetupDialogData Also known as: page_setup_data

Returns (a copy of) the page setup data.

Returns:



21
# File 'lib/wx/doc/rtc/richtext_printing.rb', line 21

def get_page_setup_data; end

#get_parent_windowWx::Window Also known as: parent_window

Returns the parent window to be used for the preview window and printing wait dialog.

Returns:



53
# File 'lib/wx/doc/gen/rtc/rich_text_printing.rb', line 53

def get_parent_window; end

#get_preview_rectWx::Rect Also known as: preview_rect

Returns the dimensions to be used for the preview window.

Returns:



58
# File 'lib/wx/doc/gen/rtc/rich_text_printing.rb', line 58

def get_preview_rect; end

#get_print_dataWx::PRT::PrintData Also known as: print_data

Returns (a copy of) the print data.

Returns:



16
# File 'lib/wx/doc/rtc/richtext_printing.rb', line 16

def get_print_data; end

#get_titleWx::String Also known as: title

Returns the title of the preview window or printing wait caption.

Returns:

  • (Wx::String)


63
# File 'lib/wx/doc/gen/rtc/rich_text_printing.rb', line 63

def get_title; end

#page_setupvoid

This method returns an undefined value.

Shows the page setup dialog.



68
# File 'lib/wx/doc/gen/rtc/rich_text_printing.rb', line 68

def page_setup; end

#preview_buffer(buffer) ⇒ Boolean

Shows a preview window for the given buffer.

The function takes its own copy of buffer.

Parameters:

Returns:

  • (Boolean)


75
# File 'lib/wx/doc/gen/rtc/rich_text_printing.rb', line 75

def preview_buffer(buffer) end

#preview_file(richTextFile) ⇒ Boolean

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.

Parameters:

  • richTextFile (String)

Returns:

  • (Boolean)


82
# File 'lib/wx/doc/gen/rtc/rich_text_printing.rb', line 82

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.

Parameters:

Returns:

  • (Boolean)


90
# File 'lib/wx/doc/gen/rtc/rich_text_printing.rb', line 90

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.

Parameters:

  • richTextFile (String)
  • showPrintDialog (Boolean) (defaults to: true)

Returns:

  • (Boolean)


98
# File 'lib/wx/doc/gen/rtc/rich_text_printing.rb', line 98

def print_file(richTextFile, showPrintDialog=true) end

This method returns an undefined value.

A convenience function to set the footer text.

See Wx::RTC::RichTextHeaderFooterData for details.

Parameters:

  • text (String)
  • page (Wx::RichTextOddEvenPage) (defaults to: Wx::RTC::RichTextOddEvenPage::RICHTEXT_PAGE_ALL)
  • location (Wx::RichTextPageLocation) (defaults to: Wx::RTC::RichTextPageLocation::RICHTEXT_PAGE_CENTRE)


107
# File 'lib/wx/doc/gen/rtc/rich_text_printing.rb', line 107

def set_footer_text(text, page=Wx::RTC::RichTextOddEvenPage::RICHTEXT_PAGE_ALL, location=Wx::RTC::RichTextPageLocation::RICHTEXT_PAGE_CENTRE) end

This method returns an undefined value.

Sets the internal Wx::RTC::RichTextHeaderFooterData object.



113
# File 'lib/wx/doc/gen/rtc/rich_text_printing.rb', line 113

def set_header_footer_data(data) end

This method returns an undefined value.

Sets the Wx::RTC::RichTextHeaderFooterData font.

Parameters:



119
# File 'lib/wx/doc/gen/rtc/rich_text_printing.rb', line 119

def set_header_footer_font(font) end

This method returns an undefined value.

Sets the Wx::RTC::RichTextHeaderFooterData text colour.

Parameters:



125
# File 'lib/wx/doc/gen/rtc/rich_text_printing.rb', line 125

def set_header_footer_text_colour(colour) end

#set_header_text(text, page = Wx::RTC::RichTextOddEvenPage::RICHTEXT_PAGE_ALL, location = Wx::RTC::RichTextPageLocation::RICHTEXT_PAGE_CENTRE) ⇒ void Also known as: header_text=

This method returns an undefined value.

A convenience function to set the header text.

See Wx::RTC::RichTextHeaderFooterData for details.

Parameters:

  • text (String)
  • page (Wx::RichTextOddEvenPage) (defaults to: Wx::RTC::RichTextOddEvenPage::RICHTEXT_PAGE_ALL)
  • location (Wx::RichTextPageLocation) (defaults to: Wx::RTC::RichTextPageLocation::RICHTEXT_PAGE_CENTRE)


135
# File 'lib/wx/doc/gen/rtc/rich_text_printing.rb', line 135

def set_header_text(text, page=Wx::RTC::RichTextOddEvenPage::RICHTEXT_PAGE_ALL, location=Wx::RTC::RichTextPageLocation::RICHTEXT_PAGE_CENTRE) end

#set_page_setup_data(pageSetupData) ⇒ void Also known as: page_setup_data=

This method returns an undefined value.

Sets the page setup data.

Parameters:



141
# File 'lib/wx/doc/gen/rtc/rich_text_printing.rb', line 141

def set_page_setup_data(pageSetupData) end

#set_parent_window(parent) ⇒ void Also known as: parent_window=

This method returns an undefined value.

Sets the parent window to be used for the preview window and printing wait dialog.

Parameters:



147
# File 'lib/wx/doc/gen/rtc/rich_text_printing.rb', line 147

def set_parent_window(parent) end

#set_preview_rect(rect) ⇒ void Also known as: preview_rect=

This method returns an undefined value.

Sets the dimensions to be used for the preview window.

Parameters:



153
# File 'lib/wx/doc/gen/rtc/rich_text_printing.rb', line 153

def set_preview_rect(rect) end

#set_print_data(printData) ⇒ void Also known as: print_data=

This method returns an undefined value.

Sets the print data.

Parameters:



159
# File 'lib/wx/doc/gen/rtc/rich_text_printing.rb', line 159

def set_print_data(printData) end

#set_show_on_first_page(show) ⇒ void Also known as: show_on_first_page=

This method returns an undefined value.

Pass true to show the header and footer on the first page.

Parameters:

  • show (Boolean)


165
# File 'lib/wx/doc/gen/rtc/rich_text_printing.rb', line 165

def set_show_on_first_page(show) end

#set_title(title) ⇒ void Also known as: title=

This method returns an undefined value.

Pass the title of the preview window or printing wait caption.

Parameters:

  • title (String)


171
# File 'lib/wx/doc/gen/rtc/rich_text_printing.rb', line 171

def set_title(title) end