Class TPrintSet (unit EDSPrint)

Inherits from

TComponent

Constructors


constructor Create (AOwner: TComponent);

Public declarations

-registers the printset component



Functions

destructor Destroy;

-initializes object

TPrintSet.


function GetBinSourceList: TStringList;

-destroys class

TPrintSet.


function GetPaperList: TStringList;

-returns the current list of bins

TPrintSet.


procedure ResetPrinterDialogs;

-saves the current printer as the Window's default

TPrintSet.


procedure SavePrinterAsDefault;

-updates the default settings for the current printer

TPrintSet.


procedure SaveToDefaults;

-updates the printers TDevMode structure

TPrintSet.


procedure SetDeviceMode;

-returns the current list of paper sizes

TPrintSet.


procedure UpdateDeviceMode;

-sets the internal pointer to the printers TDevMode structure

TPrintSet.


function GetBin: integer;

TPrintSet.

function GetBinIndex: byte;

-sets the bin for the current item from the bin source list

TPrintSet.


function GetColor: integer;

TPrintSet.

function GetCopies: integer;

TPrintSet.

function GetDuplex: integer;

TPrintSet.

function GetOrientation: integer;

TPrintSet.

function GetPaperIndex: byte;

-sets the paper for the current item from the paper list

TPrintSet.


function GetPaperLength: integer;

TPrintSet.

function GetPaperSize: integer;

TPrintSet.

function GetPaperWidth: integer;

TPrintSet.

function GetPrinterDriver: string;

-returns the port of the current printer

TPrintSet.


function GetPrinterName: string;

-sets/gets the TrueType option

TPrintSet.


function GetPrinterPort: string;

-returns the name of the current printer

TPrintSet.


function GetPrintQuality: integer;

TPrintSet.

function GetScale: integer;

TPrintSet.

function GetTTOption: integer;

TPrintSet.

function GetYResolution: integer;

TPrintSet.

procedure SetBin (Bin: integer);

-sets/gets the number of copies

TPrintSet.


procedure SetBinFromList (BinNum: byte);

-returns the printer driver name of the current printer

TPrintSet.


procedure SetColor (Color: integer);

-sets/gets the print quality

TPrintSet.


procedure SetCopies (Copies: integer);

-sets/gets the printer scale (whatever that is

TPrintSet.


procedure SetDuplex (Duplex: integer);

-sets/gets the color (monochrome or color

TPrintSet.


procedure SetOrientation (Orientation: integer);

Protected declarations

TPrintSet.


procedure SetPaperFromList (PaperNum: byte);

-returns the current bin from the bin list

TPrintSet.


procedure SetPaperLength (Length: integer);

-sets/gets the paper size

TPrintSet.


procedure SetPaperSize (Size: integer);

-sets/gets the paper orientation

TPrintSet.


procedure SetPaperWidth (Width: integer);

-sets/gets the paper length

TPrintSet.


procedure SetPrintQuality (Quality: integer);

-sets/gets the paper bin

TPrintSet.


procedure SetScale (Scale: integer);

-sets/gets the paper width

TPrintSet.


procedure SetTTOption (Option: integer);

-sets/gets the y-resolution of the printer

TPrintSet.


procedure SetYResolution (YRes: integer);

-sets/gets the duplex setting

TPrintSet.


procedure CheckPrinter;

number of paper sizes

TPrintSet.


function DefaultPaperName (PaperID: word): String;

-sets the paper array

TPrintSet.


procedure SetBinArray;

-checks to see if the printer has changed and calls SetDeviceMode if it has

CheckPrinter


procedure SetPaperArray;

-sets the bin array

TPrintSet.


Properties

property BinIndex : byte


property Color : integer


property Copies : integer


property DefaultSource : integer


property Duplex : integer


property Orientation : integer

-resets the printer dialogs to insure they come up} { Property declarations

property PaperIndex : byte


property PaperLength : integer


property PaperSize : integer


property PaperWidth : integer


property PrinterDriver : String


property PrinterName : String


property PrinterPort : String


property PrintQuality : integer


property Scale : integer


property TTOption : integer


property YResolution : integer


Events

Variables

FBinArray : PWordArray;

same as Printer.

FDevice : PChar;

Private declarations

FDeviceMode : PDevMode;


FDriver : PChar;


FHandle : THandle;


FNumBins : byte;

array of bin sources

FNumPapers : byte;

array of paper sizes

FPaperArray : PWordArray;

number of bins

FPort : PChar;


FPrinter : integer;



Constructors


constructor Create (AOwner: TComponent);

Public declarations

-registers the printset component


Functions


destructor Destroy;

-initializes object

TPrintSet.GetPaperIndex


function GetBinSourceList: TStringList;

-destroys class

TPrintSet.DefaultPaperName


function GetPaperList: TStringList;

-returns the current list of bins

TPrintSet.GetBinSourceList


procedure ResetPrinterDialogs;

-saves the current printer as the Window's default

TPrintSet.SavePrinterAsDefault


procedure SavePrinterAsDefault;

-updates the default settings for the current printer

TPrintSet.SaveToDefaults


procedure SaveToDefaults;

-updates the printers TDevMode structure

TPrintSet.UpdateDeviceMode


procedure SetDeviceMode;

-returns the current list of paper sizes

TPrintSet.GetPaperList


procedure UpdateDeviceMode;

-sets the internal pointer to the printers TDevMode structure

TPrintSet.SetDeviceMode


function GetBin: integer;

TPrintSet.SetBin


function GetBinIndex: byte;

-sets the bin for the current item from the bin source list

TPrintSet.SetBinFromList


function GetColor: integer;

TPrintSet.SetColor


function GetCopies: integer;

TPrintSet.SetCopies


function GetDuplex: integer;

TPrintSet.SetDuplex


function GetOrientation: integer;

TPrintSet.SetOrientation


function GetPaperIndex: byte;

-sets the paper for the current item from the paper list

TPrintSet.SetPaperFromList


function GetPaperLength: integer;

TPrintSet.SetPaperLength


function GetPaperSize: integer;

TPrintSet.SetPaperSize


function GetPaperWidth: integer;

TPrintSet.SetPaperWidth


function GetPrinterDriver: string;

-returns the port of the current printer

TPrintSet.GetPrinterPort


function GetPrinterName: string;

-sets/gets the TrueType option

TPrintSet.GetTTOption


function GetPrinterPort: string;

-returns the name of the current printer

TPrintSet.GetPrinterName


function GetPrintQuality: integer;

TPrintSet.SetPrintQuality


function GetScale: integer;

TPrintSet.SetScale


function GetTTOption: integer;

TPrintSet.SetTTOption


function GetYResolution: integer;

TPrintSet.SetYResolution


procedure SetBin (Bin: integer);

-sets/gets the number of copies

TPrintSet.GetCopies


procedure SetBinFromList (BinNum: byte);

-returns the printer driver name of the current printer

TPrintSet.GetPrinterDriver


procedure SetColor (Color: integer);

-sets/gets the print quality

TPrintSet.GetPrintQuality


procedure SetCopies (Copies: integer);

-sets/gets the printer scale (whatever that is

TPrintSet.GetScale


procedure SetDuplex (Duplex: integer);

-sets/gets the color (monochrome or color

TPrintSet.GetColor


procedure SetOrientation (Orientation: integer);

Protected declarations

TPrintSet.ResetPrinterDialogs


procedure SetPaperFromList (PaperNum: byte);

-returns the current bin from the bin list

TPrintSet.GetBinIndex


procedure SetPaperLength (Length: integer);

-sets/gets the paper size

TPrintSet.GetPaperSize


procedure SetPaperSize (Size: integer);

-sets/gets the paper orientation

TPrintSet.GetOrientation


procedure SetPaperWidth (Width: integer);

-sets/gets the paper length

TPrintSet.GetPaperLength


procedure SetPrintQuality (Quality: integer);

-sets/gets the paper bin

TPrintSet.GetBin


procedure SetScale (Scale: integer);

-sets/gets the paper width

TPrintSet.GetPaperWidth


procedure SetTTOption (Option: integer);

-sets/gets the y-resolution of the printer

TPrintSet.GetYResolution


procedure SetYResolution (YRes: integer);

-sets/gets the duplex setting

TPrintSet.GetDuplex


procedure CheckPrinter;

number of paper sizes

TPrintSet.Create


function DefaultPaperName (PaperID: word): String;

-sets the paper array

TPrintSet.SetPaperArray


procedure SetBinArray;

-checks to see if the printer has changed and calls SetDeviceMode if it has

CheckPrinter


procedure SetPaperArray;

-sets the bin array

TPrintSet.SetBinArray


Properties


property BinIndex : byte


property Color : integer


property Copies : integer


property DefaultSource : integer


property Duplex : integer


property Orientation : integer

-resets the printer dialogs to insure they come up} { Property declarations


property PaperIndex : byte


property PaperLength : integer


property PaperSize : integer


property PaperWidth : integer


property PrinterDriver : String


property PrinterName : String


property PrinterPort : String


property PrintQuality : integer


property Scale : integer


property TTOption : integer


property YResolution : integer


Events


Variables


FBinArray : PWordArray;

same as Printer.PrinterIndex


FDevice : PChar;

Private declarations


FDeviceMode : PDevMode;


FDriver : PChar;


FHandle : THandle;


FNumBins : byte;

array of bin sources


FNumPapers : byte;

array of paper sizes


FPaperArray : PWordArray;

number of bins


FPort : PChar;


FPrinter : integer;