Class: Wx::PRT::PrintDialogData

Inherits:
Object
  • Object
show all
Defined in:
lib/wx/doc/gen/prt/print_data.rb,
lib/wx/doc/prt/print_data.rb

Overview

Note:

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

See Also:

Requires:

  • USE_PRINTING_ARCHITECTURE

Instance Method Summary collapse

Methods inherited from Object

#clone, #dup, #is_same_as, #un_share

Constructor Details

#initializeWx::PRT::PrintDialogData #initialize(dialogData) ⇒ Wx::PRT::PrintDialogData #initialize(printData) ⇒ Wx::PRT::PrintDialogData

Returns a new instance of PrintDialogData.

Overloads:



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.

Parameters:

  • flag (Boolean)


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.

Parameters:

  • flag (Boolean)


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.

Parameters:

  • flag (Boolean)


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.

Parameters:

  • flag (Boolean)


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.

Parameters:

  • flag (Boolean)


330
# File 'lib/wx/doc/gen/prt/print_data.rb', line 330

def enable_selection(flag) end

#get_all_pagesBoolean Also known as: all_pages

Returns true if the user requested that all pages be printed.

Returns:

  • (Boolean)


341
# File 'lib/wx/doc/gen/prt/print_data.rb', line 341

def get_all_pages; end

#get_collateBoolean Also known as: collate

Returns true if the user requested that the document(s) be collated.

Returns:

  • (Boolean)


346
# File 'lib/wx/doc/gen/prt/print_data.rb', line 346

def get_collate; end

#get_current_pageBoolean 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.

Returns:

  • (Boolean)


391
# File 'lib/wx/doc/gen/prt/print_data.rb', line 391

def get_current_page; end

#get_from_pageInteger 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.

Returns:

  • (Integer)


353
# File 'lib/wx/doc/gen/prt/print_data.rb', line 353

def get_from_page; end

#get_max_pageInteger Also known as: max_page

Returns the maximum page number.

Returns:

  • (Integer)


358
# File 'lib/wx/doc/gen/prt/print_data.rb', line 358

def get_max_page; end

#get_max_page_rangesInteger Also known as: max_page_ranges

Returns the maximum number of page ranges that the user can specify.

Returns:

  • (Integer)

See Also:

  • SetMaxRanges()


522
# File 'lib/wx/doc/gen/prt/print_data.rb', line 522

def get_max_page_ranges; end

#get_min_pageInteger Also known as: min_page

Returns the minimum page number.

Returns:

  • (Integer)


363
# File 'lib/wx/doc/gen/prt/print_data.rb', line 363

def get_min_page; end

#get_no_copiesInteger Also known as: no_copies

Returns the number of copies requested by the user.

Returns:

  • (Integer)


368
# File 'lib/wx/doc/gen/prt/print_data.rb', line 368

def get_no_copies; end

#get_page_rangesArray<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.

Returns:

See Also:



530
# File 'lib/wx/doc/gen/prt/print_data.rb', line 530

def get_page_ranges; end

#get_print_dataWx::PrintData Also known as: print_data

Returns a reference to the internal Wx::PRT::PrintData object.

Returns:

  • (Wx::PrintData)


16
# File 'lib/wx/doc/prt/print_data.rb', line 16

def get_print_data; end

#get_print_to_fileBoolean Also known as: print_to_file

Returns true if the user has selected printing to a file.

Returns:

  • (Boolean)


378
# File 'lib/wx/doc/gen/prt/print_data.rb', line 378

def get_print_to_file; end

#get_selectionBoolean Also known as: selection

Returns true if the user requested that the selection be printed (where “selection” is a concept specific to the application).

Returns:

  • (Boolean)


383
# File 'lib/wx/doc/gen/prt/print_data.rb', line 383

def get_selection; end

#get_specified_pagesBoolean 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.

Returns:

  • (Boolean)


398
# File 'lib/wx/doc/gen/prt/print_data.rb', line 398

def get_specified_pages; end

#get_to_pageInteger 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.

Returns:

  • (Integer)


405
# File 'lib/wx/doc/gen/prt/print_data.rb', line 405

def get_to_page; end

#is_okBoolean 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.

Returns:

  • (Boolean)


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).

Parameters:

  • flag (Boolean) (defaults to: true)


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.

Parameters:

  • flag (Boolean)


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).

Parameters:

  • flag (Boolean) (defaults to: true)

See Also:



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.

Note:

If #set_page_ranges was used to specify multiple ranges, this function cannot be used as there is no single "from" page to set.

Parameters:

  • page (Integer)


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.

Parameters:

  • page (Integer)


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.

Parameters:

  • maxRanges (Integer)


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.

Parameters:

  • page (Integer)


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.

Parameters:

  • n (Integer)


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.

Parameters:



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.

Parameters:



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.

Parameters:

  • flag (Boolean)


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).

Parameters:

  • flag (Boolean) (defaults to: true)


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.

Note:

If #set_page_ranges was used to specify multiple ranges, this function cannot be used as there is no single "to" page to set.

Parameters:

  • page (Integer)


505
# File 'lib/wx/doc/gen/prt/print_data.rb', line 505

def set_to_page(page) end