mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-04-16 06:09:29 +02:00
printers: added property XDPI and YPDI, renamed ExecuteSetup+ExecuteProperties to PrintDialog+PrinterSetup from Olivier
git-svn-id: trunk@6918 -
This commit is contained in:
parent
cf3580e354
commit
27d716057f
@ -118,6 +118,8 @@ type
|
||||
property PaperRectOf[aName : string] : TPaperRect read PaperRectOfName;
|
||||
end;
|
||||
|
||||
{ TPrinter }
|
||||
|
||||
TPrinter = class(TObject)
|
||||
private
|
||||
fCanvas : TCanvas; //Active canvas object
|
||||
@ -171,6 +173,8 @@ type
|
||||
function DoGetPrinterState: TPrinterState; virtual;
|
||||
function GetPrinterType : TPrinterType; virtual;
|
||||
function GetCanPrint : Boolean; virtual;
|
||||
function GetXDPI: Integer; virtual;
|
||||
function GetYDPI: Integer; virtual;
|
||||
public
|
||||
constructor Create; virtual;
|
||||
destructor Destroy; override;
|
||||
@ -182,8 +186,8 @@ type
|
||||
procedure Refresh;
|
||||
procedure SetPrinter(aName : String);
|
||||
|
||||
function ExecuteSetup : Boolean; virtual; abstract;
|
||||
function ExecuteProperties : Boolean; virtual; abstract;
|
||||
function PrintDialog : Boolean; virtual; abstract;
|
||||
function PrinterSetup: Boolean; virtual; abstract;
|
||||
|
||||
property PrinterIndex : integer read GetPrinterIndex write SetPrinterIndex;
|
||||
property PaperSize : TPaperSize read GetPaperSize;
|
||||
@ -201,6 +205,9 @@ type
|
||||
property Title: string read fTitle write fTitle;
|
||||
property PrinterType : TPrinterType read GetPrinterType;
|
||||
property CanPrint : Boolean read GetCanPrint;
|
||||
|
||||
property XDPI : Integer read GetXDPI;
|
||||
property YDPI : Integer read GetYDPI;
|
||||
end;
|
||||
|
||||
var
|
||||
@ -427,6 +434,18 @@ begin
|
||||
DoEnumPrinters(fPrinters);
|
||||
end;
|
||||
|
||||
//Return XDPI
|
||||
function TPrinter.GetXDPI: Integer;
|
||||
begin
|
||||
Result:=1;
|
||||
end;
|
||||
|
||||
//Return YDPI
|
||||
function TPrinter.GetYDPI: Integer;
|
||||
begin
|
||||
Result:=1;
|
||||
end;
|
||||
|
||||
|
||||
//Set the copies numbers
|
||||
procedure TPrinter.SetCopies(AValue: Integer);
|
||||
|
Loading…
Reference in New Issue
Block a user