wPrintDialog

This class represents the print and print setup common dialogs. You may obtain a wPrintData object from a successfully dismissed print dialog. And then you can use it to create wPrinterDC object. Only modal dialog is supported.

Superclass:wDialog
Seealso:wPrinterDC wPrintData wPageSetupDialog
Events:wDialogEvent
wDialogEventDescription
wEvent_DialogCreatedWhen the dialog is created but not yet shown.
wEvent_DialogClosedWhen the dialog is being closed.
wEvent_DialogHelpWhen the Help button is pressed.
wEvent_PrinterChangedWhen the selected printer is changed.

Procs

proc getPrintData(self: wPrintDialog): wPrintData {...}{.inline, raises: [], tags: [].}
Returns the current wPrintData object for the dialog. The result may be nil.
proc setPrintData(self: wPrintDialog; printData: wPrintData) {...}{.inline, raises: [],
    tags: [].}
Sets a wPrintData object as default setting.
proc getMinMaxPage(self: wPrintDialog): Slice[int] {...}{.inline, raises: [], tags: [].}
Returns the page number range.
proc setMinMaxPage(self: wPrintDialog; minmax: Slice[int]) {...}{.inline, raises: [],
    tags: [].}
Sets the minimum..maximum number range.
proc getPrintToFile(self: wPrintDialog): bool {...}{.inline, raises: [], tags: [].}
Returns true if the user has selected printing to a file.
proc setPrintToFile(self: wPrintDialog; flag: bool) {...}{.inline, raises: [], tags: [].}
Sets the "Print to file" checkbox to true or false.
proc enablePrintToFile(self: wPrintDialog; flag = true) {...}{.inline, raises: [], tags: [].}
Enables or disables the "Print to file" checkbox.
proc getSelection(self: wPrintDialog): bool {...}{.inline, raises: [], tags: [].}
Returns true if the user requested that the selection be printed.
proc setSelection(self: wPrintDialog; flag: bool) {...}{.inline, raises: [], tags: [].}
Selects the "Selection" radio button.
proc enableSelection(self: wPrintDialog; flag = true) {...}{.inline, raises: [], tags: [].}
Enables or disables the "Selection" radio button.
proc getCurrentPage(self: wPrintDialog): bool {...}{.inline, raises: [], tags: [].}
Returns true if the user requested that the current page be printed.
proc setCurrentPage(self: wPrintDialog; flag: bool) {...}{.inline, raises: [], tags: [].}
Selects the "Current Page" radio button.
proc enableCurrentPage(self: wPrintDialog; flag = true) {...}{.inline, raises: [], tags: [].}
Enables or disables the "Current Page" radio button.
proc getPageRanges(self: wPrintDialog): seq[Slice[int]] {...}{.raises: [], tags: [].}
Returns page ranges specified by the user.
proc setPageRanges(self: wPrintDialog; ranges: openArray[Slice[int]]) {...}{.raises: [],
    tags: [].}
Sets default page ranges.
proc enablePageRanges(self: wPrintDialog; flag = true) {...}{.inline, raises: [], tags: [].}
Enables or disables the page ranges edit controls.
proc getCopies(self: wPrintDialog): int {...}{.inline, raises: [], tags: [].}
Returns the number of copies requested by the user.
proc setCopies(self: wPrintDialog; copies: int) {...}{.inline, raises: [], tags: [].}
Sets the default number of copies the user has requested to be printed out.
proc getCollate(self: wPrintDialog): bool {...}{.inline, raises: [], tags: [].}
Returns true if the user requested that the document(s) be collated.
proc setCollate(self: wPrintDialog; flag: bool) {...}{.inline, raises: [], tags: [].}
Sets the "Collate" checkbox to true or false.
proc init(self: wPrintDialog; owner: wWindow) {...}{.
    raises: [wNilAccess, wWindowError, wCursorError, IndexDefect, wFontError],
    tags: [RootEffect].}
Initializer.
proc PrintDialog(owner: wWindow): wPrintDialog {...}{.inline, discardable,
    raises: [wNilAccess, wWindowError, wCursorError, IndexDefect, wFontError],
    tags: [RootEffect].}
Constructor.
proc init(self: wPrintDialog; owner: wWindow; data: wPrintData) {...}{.
    raises: [wNilAccess, wWindowError, wCursorError, IndexDefect, wFontError],
    tags: [RootEffect].}
Initializer. Uses specified printData as default setting. Nil to reset to the system default setting.
proc PrintDialog(owner: wWindow; data: wPrintData): wPrintDialog {...}{.inline, discardable,
    raises: [wNilAccess, wWindowError, wCursorError, IndexDefect, wFontError],
    tags: [RootEffect].}
Constructor.
proc showModal(self: wPrintDialog): wId {...}{.discardable, raises: [], tags: [].}
Shows the dialog, returning wIdOk if the user pressed Print, wIdApply if the user pressed Apply, and wIdCancel otherwise.
proc display(self: wPrintDialog): wPrintData {...}{.inline, discardable, raises: [], tags: [].}
Shows the dialog in modal mode, returning a wPrintData object if the user pressed Print, and nil otherwise.