Class: Wx::PRT::PrintDialogData
- Defined in:
- lib/wx/doc/gen/prt/print_data.rb,
lib/wx/doc/prt/print_data.rb
Overview
This class is untracked and should not be derived from nor instances extended!
This class holds information related to the visual characteristics of PrintDialog.
It contains a PrintData object with underlying printing settings.
Category: Printing Framework, Common Dialogs, Data Structures
Instance Method Summary collapse
-
#enable_current_page(flag) ⇒ void
Allows or disallows selecting printing the “Current Page” in the dialog.
-
#enable_help(flag) ⇒ void
Enables or disables the “Help” button.
-
#enable_page_numbers(flag) ⇒ void
Enables or disables the “Page numbers” controls.
-
#enable_print_to_file(flag) ⇒ void
Enables or disables the “Print to file” checkbox.
-
#enable_selection(flag) ⇒ void
Enables or disables the “Selection” radio button.
-
#get_all_pages ⇒ Boolean
(also: #all_pages)
Returns true if the user requested that all pages be printed.
-
#get_collate ⇒ Boolean
(also: #collate)
Returns true if the user requested that the document(s) be collated.
-
#get_current_page ⇒ Boolean
(also: #current_page)
Returns true if the user requested that the current page be printed.
-
#get_from_page ⇒ Integer
(also: #from_page)
Returns the from page number, as entered by the user.
-
#get_max_page ⇒ Integer
(also: #max_page)
Returns the maximum page number.
-
#get_max_page_ranges ⇒ Integer
(also: #max_page_ranges)
Returns the maximum number of page ranges that the user can specify.
-
#get_min_page ⇒ Integer
(also: #min_page)
Returns the minimum page number.
-
#get_no_copies ⇒ Integer
(also: #no_copies)
Returns the number of copies requested by the user.
-
#get_page_ranges ⇒ Array<Wx::PRT::PrintPageRange>
(also: #page_ranges)
Returns the page ranges to print.
-
#get_print_data ⇒ Wx::PrintData
(also: #print_data)
Returns a reference to the internal PrintData object.
-
#get_print_to_file ⇒ Boolean
(also: #print_to_file)
Returns true if the user has selected printing to a file.
-
#get_selection ⇒ Boolean
(also: #selection)
Returns true if the user requested that the selection be printed (where “selection” is a concept specific to the application).
-
#get_specified_pages ⇒ Boolean
(also: #specified_pages)
Returns true if the user requested printing only the specified pages.
-
#get_to_page ⇒ Integer
(also: #to_page)
Returns the “print to” page number, as entered by the user.
-
#initialize(*args) ⇒ PrintDialogData
constructor
A new instance of PrintDialogData.
-
#is_ok ⇒ Boolean
(also: #ok?)
Returns true if the print data is valid for using in print dialogs.
-
#set_all_pages(flag = true) ⇒ void
(also: #all_pages=)
Selects the “All pages” radio button.
-
#set_collate(flag) ⇒ void
(also: #collate=)
Sets the “Collate” checkbox to true or false.
-
#set_current_page(flag = true) ⇒ void
(also: #current_page=)
Selects the “Current Page” radio button when the dialog is initially shown.
-
#set_from_page(page) ⇒ void
(also: #from_page=)
Sets the from page number.
-
#set_max_page(page) ⇒ void
(also: #max_page=)
Sets the maximum page number.
-
#set_max_page_ranges(maxRanges) ⇒ void
(also: #max_page_ranges=)
Sets the maximum number of page ranges that the user can specify.
-
#set_min_page(page) ⇒ void
(also: #min_page=)
Sets the minimum page number.
-
#set_no_copies(n) ⇒ void
(also: #no_copies=)
Sets the default number of copies the user has requested to be printed out.
-
#set_page_ranges(pageRanges) ⇒ void
(also: #page_ranges=)
Sets the ranges of pages to print.
-
#set_print_data(printData) ⇒ void
(also: #print_data=)
Sets the internal PrintData.
-
#set_print_to_file(flag) ⇒ void
(also: #print_to_file=)
Sets the “Print to file” checkbox to true or false.
-
#set_selection(flag = true) ⇒ void
(also: #selection=)
Selects the “Selection” radio button.
-
#set_to_page(page) ⇒ void
(also: #to_page=)
Sets the “print to” page number.
Methods inherited from Object
#clone, #dup, #is_same_as, #un_share
Constructor Details
#initialize ⇒ Wx::PRT::PrintDialogData #initialize(dialogData) ⇒ Wx::PRT::PrintDialogData #initialize(printData) ⇒ Wx::PRT::PrintDialogData
Returns a new instance of PrintDialogData.
310 |
# File 'lib/wx/doc/gen/prt/print_data.rb', line 310 def initialize(*args) end |
Instance Method Details
#enable_current_page(flag) ⇒ void
This method returns an undefined value.
Allows or disallows selecting printing the “Current Page” in the dialog.
This currently only has an effect under MSW, where the native dialog enables the “Current Page” radio button if this function is called to allow the user to print the current page only.
337 |
# File 'lib/wx/doc/gen/prt/print_data.rb', line 337 def enable_current_page(flag) end |
#enable_help(flag) ⇒ void
This method returns an undefined value.
Enables or disables the “Help” button.
315 |
# File 'lib/wx/doc/gen/prt/print_data.rb', line 315 def enable_help(flag) end |
#enable_page_numbers(flag) ⇒ void
This method returns an undefined value.
Enables or disables the “Page numbers” controls.
320 |
# File 'lib/wx/doc/gen/prt/print_data.rb', line 320 def enable_page_numbers(flag) end |
#enable_print_to_file(flag) ⇒ void
This method returns an undefined value.
Enables or disables the “Print to file” checkbox.
325 |
# File 'lib/wx/doc/gen/prt/print_data.rb', line 325 def enable_print_to_file(flag) end |
#enable_selection(flag) ⇒ void
This method returns an undefined value.
Enables or disables the “Selection” radio button.
330 |
# File 'lib/wx/doc/gen/prt/print_data.rb', line 330 def enable_selection(flag) end |
#get_all_pages ⇒ Boolean Also known as: all_pages
Returns true if the user requested that all pages be printed.
341 |
# File 'lib/wx/doc/gen/prt/print_data.rb', line 341 def get_all_pages; end |
#get_collate ⇒ Boolean Also known as: collate
Returns true if the user requested that the document(s) be collated.
346 |
# File 'lib/wx/doc/gen/prt/print_data.rb', line 346 def get_collate; end |
#get_current_page ⇒ Boolean Also known as: current_page
Returns true if the user requested that the current page be printed.
Note that the “current page” is defined by the application. It only makes sense to call this function if #enable_current_page had been called before, otherwise it always returns false.
391 |
# File 'lib/wx/doc/gen/prt/print_data.rb', line 391 def get_current_page; end |
#get_from_page ⇒ Integer Also known as: from_page
Returns the from page number, as entered by the user.
This function can’t be used if multiple page ranges were specified, use #get_page_ranges instead.
353 |
# File 'lib/wx/doc/gen/prt/print_data.rb', line 353 def get_from_page; end |
#get_max_page ⇒ Integer Also known as: max_page
Returns the maximum page number.
358 |
# File 'lib/wx/doc/gen/prt/print_data.rb', line 358 def get_max_page; end |
#get_max_page_ranges ⇒ Integer Also known as: max_page_ranges
Returns the maximum number of page ranges that the user can specify.
522 |
# File 'lib/wx/doc/gen/prt/print_data.rb', line 522 def get_max_page_ranges; end |
#get_min_page ⇒ Integer Also known as: min_page
Returns the minimum page number.
363 |
# File 'lib/wx/doc/gen/prt/print_data.rb', line 363 def get_min_page; end |
#get_no_copies ⇒ Integer Also known as: no_copies
Returns the number of copies requested by the user.
368 |
# File 'lib/wx/doc/gen/prt/print_data.rb', line 368 def get_no_copies; end |
#get_page_ranges ⇒ Array<Wx::PRT::PrintPageRange> Also known as: page_ranges
Returns the page ranges to print.
This vector contains the page ranges to be printed. If it is empty, all pages are printed, otherwise only the pages in the specified ranges are.
530 |
# File 'lib/wx/doc/gen/prt/print_data.rb', line 530 def get_page_ranges; end |
#get_print_data ⇒ Wx::PrintData Also known as: print_data
Returns a reference to the internal Wx::PRT::PrintData object.
16 |
# File 'lib/wx/doc/prt/print_data.rb', line 16 def get_print_data; end |
#get_print_to_file ⇒ Boolean Also known as: print_to_file
Returns true if the user has selected printing to a file.
378 |
# File 'lib/wx/doc/gen/prt/print_data.rb', line 378 def get_print_to_file; end |
#get_selection ⇒ Boolean Also known as: selection
Returns true if the user requested that the selection be printed (where “selection” is a concept specific to the application).
383 |
# File 'lib/wx/doc/gen/prt/print_data.rb', line 383 def get_selection; end |
#get_specified_pages ⇒ Boolean Also known as: specified_pages
Returns true if the user requested printing only the specified pages.
The pages to print can be retrieved using #get_page_ranges.
398 |
# File 'lib/wx/doc/gen/prt/print_data.rb', line 398 def get_specified_pages; end |
#get_to_page ⇒ Integer Also known as: to_page
Returns the “print to” page number, as entered by the user.
This function can’t be used if multiple page ranges were specified, use #get_page_ranges instead.
405 |
# File 'lib/wx/doc/gen/prt/print_data.rb', line 405 def get_to_page; end |
#is_ok ⇒ Boolean Also known as: ok?
Returns true if the print data is valid for using in print dialogs.
This can return false on Windows if the current printer is not set, for example. On all other platforms, it returns true.
412 |
# File 'lib/wx/doc/gen/prt/print_data.rb', line 412 def is_ok; end |
#set_all_pages(flag = true) ⇒ void Also known as: all_pages=
This method returns an undefined value.
Selects the “All pages” radio button.
When called with true value, enables printing all pages. This is the default behaviour. If flag is false, this function doesn’t do anything unless it had been called with true value before and in this case it switches to printing the selected pages only (see #get_specified_pages).
421 |
# File 'lib/wx/doc/gen/prt/print_data.rb', line 421 def set_all_pages(flag=true) end |
#set_collate(flag) ⇒ void Also known as: collate=
This method returns an undefined value.
Sets the “Collate” checkbox to true or false.
427 |
# File 'lib/wx/doc/gen/prt/print_data.rb', line 427 def set_collate(flag) end |
#set_current_page(flag = true) ⇒ void Also known as: current_page=
This method returns an undefined value.
Selects the “Current Page” radio button when the dialog is initially shown.
This function can only be called when #enable_current_page is used as well. If flag is false, this function doesn’t do anything unless it had been called with true value before and in this case it switches to printing the selected pages only (see #get_specified_pages).
491 |
# File 'lib/wx/doc/gen/prt/print_data.rb', line 491 def set_current_page(flag=true) end |
#set_from_page(page) ⇒ void Also known as: from_page=
This method returns an undefined value.
Sets the from page number.
Together with #set_to_page, this function can be used to define a single range of pages to print. If you need to specify multiple ranges, use #set_page_ranges instead.
If #set_page_ranges was used to specify multiple ranges, this function cannot be used as there is no single "from" page to set.
441 |
# File 'lib/wx/doc/gen/prt/print_data.rb', line 441 def set_from_page(page) end |
#set_max_page(page) ⇒ void Also known as: max_page=
This method returns an undefined value.
Sets the maximum page number.
447 |
# File 'lib/wx/doc/gen/prt/print_data.rb', line 447 def set_max_page(page) end |
#set_max_page_ranges(maxRanges) ⇒ void Also known as: max_page_ranges=
This method returns an undefined value.
Sets the maximum number of page ranges that the user can specify.
This value is used as a limit for the number of page ranges that can be used in the print dialog. The default value is 64. Currently this is only used in WXMSW.
514 |
# File 'lib/wx/doc/gen/prt/print_data.rb', line 514 def set_max_page_ranges(maxRanges) end |
#set_min_page(page) ⇒ void Also known as: min_page=
This method returns an undefined value.
Sets the minimum page number.
453 |
# File 'lib/wx/doc/gen/prt/print_data.rb', line 453 def set_min_page(page) end |
#set_no_copies(n) ⇒ void Also known as: no_copies=
This method returns an undefined value.
Sets the default number of copies the user has requested to be printed out.
459 |
# File 'lib/wx/doc/gen/prt/print_data.rb', line 459 def set_no_copies(n) end |
#set_page_ranges(pageRanges) ⇒ void Also known as: page_ranges=
This method returns an undefined value.
Sets the ranges of pages to print.
Each element of the vector represents a range of pages to print. All ranges should be disjoint and be specified in increasing order. Currently only WXMSW supports the full functionality of this function, all other ports only allow specifying a single range. Passing an empty vector is equivalent to printing all pages.
540 |
# File 'lib/wx/doc/gen/prt/print_data.rb', line 540 def set_page_ranges(pageRanges) end |
#set_print_data(printData) ⇒ void Also known as: print_data=
This method returns an undefined value.
Sets the internal Wx::PRT::PrintData.
465 |
# File 'lib/wx/doc/gen/prt/print_data.rb', line 465 def set_print_data(printData) end |
#set_print_to_file(flag) ⇒ void Also known as: print_to_file=
This method returns an undefined value.
Sets the “Print to file” checkbox to true or false.
471 |
# File 'lib/wx/doc/gen/prt/print_data.rb', line 471 def set_print_to_file(flag) end |
#set_selection(flag = true) ⇒ void Also known as: selection=
This method returns an undefined value.
Selects the “Selection” radio button.
The effect of printing the selection depends on how the application implements this command, if at all. This function should only be called when #enable_selection is used as well. If flag is false, this function doesn’t do anything unless it had been called with true value before and in this case it switches to printing the selected pages only (see #get_specified_pages).
481 |
# File 'lib/wx/doc/gen/prt/print_data.rb', line 481 def set_selection(flag=true) end |
#set_to_page(page) ⇒ void Also known as: to_page=
This method returns an undefined value.
Sets the “print to” page number.
Together with #set_from_page, this function can be used to define a single range of pages to print. If you need to specify multiple ranges, use #set_page_ranges instead.
If #set_page_ranges was used to specify multiple ranges, this function cannot be used as there is no single "to" page to set.
505 |
# File 'lib/wx/doc/gen/prt/print_data.rb', line 505 def set_to_page(page) end |