wPageSetupDialog

This class represents the page setup common dialog.The page setup dialog contains controls for paper size (letter, A4, A5 etc.), orientation (landscape or portrait), and left, top, right and bottom margin sizes.

Superclass:wDialog
Seealso:wPrinterDC wPrintData wPrintDialog
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.

Types

wPageSetupDialogError = object of wError
  
An error raised when wPageSetupDialog creation failed.

Procs

proc getPrintData(self: wPageSetupDialog): wPrintData {...}{.inline, raises: [], tags: [].}
Returns the current wPrintData object for the dialog. The result may be nil.
proc setPrintData(self: wPageSetupDialog; printData: wPrintData) {...}{.inline, raises: [],
    tags: [].}
Sets a wPrintData object as default setting.
proc enableHelp(self: wPageSetupDialog; flag = true) {...}{.inline, raises: [], tags: [].}
Display a Help button, the dialog got wEvent_DialogHelp event when the button pressed.
proc enablePaper(self: wPageSetupDialog; flag = true) {...}{.inline, raises: [], tags: [].}
Enables or disables the paper size control.
proc enableMargins(self: wPageSetupDialog; flag = true) {...}{.inline, raises: [], tags: [].}
Enables or disables the margin controls.
proc enableOrientation(self: wPageSetupDialog; flag = true) {...}{.inline, raises: [],
    tags: [].}
Enables or disables the orientation control.
proc enablePrinter(self: wPageSetupDialog; flag = true) {...}{.inline, raises: [], tags: [].}
Enables or disables the "Printer" button (Windows XP only).
proc getPaperSize(self: wPageSetupDialog): wSize {...}{.inline, raises: [], tags: [].}
Returns the paper size selected by the user, in millimetres.
proc getMinMargin(self: wPageSetupDialog): wDirection {...}{.raises: [], tags: [].}
Returns the minimum margins the user can enter, in millimetres.
proc setMinMargin(self: wPageSetupDialog; margin: wDirection) {...}{.raises: [], tags: [].}
Sets the minimum margins the user can enter, in millimetres.
proc setMinMargin(self: wPageSetupDialog; margin: int) {...}{.raises: [], tags: [].}
Sets the minimum margins the user can enter to the same value, in millimetres.
proc getMinMarginTopLeft(self: wPageSetupDialog): wPoint {...}{.raises: [], tags: [].}
Returns the left (x) and top (y) minimum margins the user can enter, in millimetres.
proc getMinMarginBottomRight(self: wPageSetupDialog): wPoint {...}{.raises: [], tags: [].}
Returns the right (x) and bottom (y) minimum margins the user can enter, in millimetres.
proc setMinMarginTopLeft(self: wPageSetupDialog; point: wPoint) {...}{.inline, raises: [],
    tags: [].}
Sets the left (x) and top (y) minimum margins the user can enter, in millimetres.
proc setMinMarginBottomRight(self: wPageSetupDialog; point: wPoint) {...}{.inline,
    raises: [], tags: [].}
Sets the right (x) and bottom (y) minimum margins the user can enter, in millimetres.
proc getMargin(self: wPageSetupDialog): wDirection {...}{.raises: [], tags: [].}
Returns the margins in millimetres.
proc setMargin(self: wPageSetupDialog; margin: wDirection) {...}{.raises: [], tags: [].}
Sets the margins in millimetres.
proc setMargin(self: wPageSetupDialog; margin: int) {...}{.raises: [], tags: [].}
Sets the margins to the same value in millimetres.
proc getMarginTopLeft(self: wPageSetupDialog): wPoint {...}{.raises: [], tags: [].}
Returns the left (x) and top (y) margins in millimetres.
proc getMarginBottomRight(self: wPageSetupDialog): wPoint {...}{.raises: [], tags: [].}
Returns the right (x) and bottom (y) margins in millimetres.
proc setMarginTopLeft(self: wPageSetupDialog; point: wPoint) {...}{.raises: [], tags: [].}
Sets the left (x) and top (y) margins in millimetres.
proc setMarginBottomRight(self: wPageSetupDialog; point: wPoint) {...}{.raises: [], tags: [].}
Sets the right (x) and bottom (y) margins in millimetres.
proc init(self: wPageSetupDialog; owner: wWindow; initDefault = false) {...}{.raises: [
    wNilAccess, wWindowError, wCursorError, IndexDefect, wFontError,
    wPageSetupDialogError], tags: [RootEffect].}
Initializer. If initDefault is true, the dialog is initialized for the system default printer.
proc PageSetupDialog(owner: wWindow; initDefault = false): wPageSetupDialog {...}{.inline,
    discardable, raises: [wNilAccess, wWindowError, wCursorError, IndexDefect,
                        wFontError, wPageSetupDialogError], tags: [RootEffect].}
Constructor.
proc init(self: wPageSetupDialog; owner: wWindow; data: wPrintData) {...}{.raises: [
    wNilAccess, wWindowError, wCursorError, IndexDefect, wFontError,
    wPageSetupDialogError], tags: [RootEffect].}
Initializer. Uses specified printData as default setting. Nil to reset to the system default setting.
proc PageSetupDialog(owner: wWindow; data: wPrintData): wPageSetupDialog {...}{.inline,
    discardable, raises: [wNilAccess, wWindowError, wCursorError, IndexDefect,
                        wFontError, wPageSetupDialogError], tags: [RootEffect].}
Constructor.
proc showModal(self: wPageSetupDialog): wId {...}{.discardable, raises: [], tags: [].}
Shows the dialog, returning wIdOk if the user pressed OK, and wIdCancel otherwise.
proc display(self: wPageSetupDialog): wPrintData {...}{.inline, discardable, raises: [],
    tags: [].}
Shows the dialog in modal mode, returning a wPrintData object or nil.