mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-04-21 23:19:29 +02:00
added printer4lazarus package from Olivier
git-svn-id: trunk@6926 -
This commit is contained in:
parent
8a344c0ff0
commit
9e5168c0c5
15
.gitattributes
vendored
15
.gitattributes
vendored
@ -149,6 +149,21 @@ components/mysql/registermysql.lrs svneol=native#text/pascal
|
||||
components/mysql/registermysql.pas svneol=native#text/pascal
|
||||
components/mysql/tmysqldatabase.xpm -text svneol=native#image/x-xpixmap
|
||||
components/mysql/tmysqldataset.xpm -text svneol=native#image/x-xpixmap
|
||||
components/printers/cupsprintersdlgs.pp svneol=native#text/pascal
|
||||
components/printers/lazprinter.pp svneol=native#text/pascal
|
||||
components/printers/printer4lazarus.lpk svneol=native#text/pascal
|
||||
components/printers/printer4lazarus.pas svneol=native#text/pascal
|
||||
components/printers/printersdlgs.lrs svneol=native#text/pascal
|
||||
components/printers/printersdlgs.pp svneol=native#text/pascal
|
||||
components/printers/readme.txt svneol=native#text/plain
|
||||
components/printers/sample/frmselprinter.lfm svneol=native#text/plain
|
||||
components/printers/sample/frmselprinter.lrs svneol=native#text/pascal
|
||||
components/printers/sample/frmselprinter.pas svneol=native#text/pascal
|
||||
components/printers/sample/selectprinter.lpi svneol=native#text/plain
|
||||
components/printers/sample/selectprinter.lpr svneol=native#text/pascal
|
||||
components/printers/winprinters.pas svneol=native#text/pascal
|
||||
components/printers/winutilprn.pas svneol=native#text/pascal
|
||||
components/printers/winutilprnconst.inc svneol=native#text/pascal
|
||||
components/rtticontrols/baseicon.png -text svneol=unset#image/png
|
||||
components/rtticontrols/examples/example1.lfm svneol=native#text/plain
|
||||
components/rtticontrols/examples/example1.lrs svneol=native#text/pascal
|
||||
|
80
components/printers/cupsprintersdlgs.pp
Normal file
80
components/printers/cupsprintersdlgs.pp
Normal file
@ -0,0 +1,80 @@
|
||||
{*****************************************************************************
|
||||
* *
|
||||
* This file is part of the Lazarus Component Library (LCL) *
|
||||
* *
|
||||
* See the file COPYING.LCL, included in this distribution, *
|
||||
* for details about the copyright. *
|
||||
* *
|
||||
* This program is distributed in the hope that it will be useful, *
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. *
|
||||
* *
|
||||
*****************************************************************************
|
||||
|
||||
Author: Olivier GUILBAUD
|
||||
|
||||
Abstract:
|
||||
Common component dialogs for setup and more printers
|
||||
|
||||
See : /usr/share/doc/cups/licence.txt for the CUPS licence
|
||||
|
||||
History
|
||||
Fev 26 2004 - Create
|
||||
Mar 09 2004 OG - Add TPrintJobsDialog component
|
||||
Mar 16 2004 OG - add LResources units
|
||||
------------------------------------------------------------------------------}
|
||||
unit CUPSPrintersDlgs;
|
||||
|
||||
{$mode objfpc}{$H+}
|
||||
|
||||
interface
|
||||
|
||||
uses
|
||||
Classes, SysUtils,dialogs,CupsPrinters,udlgPrintersJobs,LResources;
|
||||
|
||||
type
|
||||
TPrinterSetupDialog = class(TCommonDialog)
|
||||
public
|
||||
function Execute: Boolean; override;
|
||||
end;
|
||||
|
||||
TPrintJobsDialog = class(TCommonDialog)
|
||||
public
|
||||
function Execute: Boolean; override;
|
||||
end;
|
||||
|
||||
procedure Register;
|
||||
|
||||
|
||||
implementation
|
||||
|
||||
|
||||
procedure Register;
|
||||
begin
|
||||
RegisterComponents('Dialogs',[TPrinterSetupDialog,TPrintJobsDialog]);
|
||||
end;
|
||||
|
||||
{ TPrinterSetupDialog }
|
||||
|
||||
function TPrinterSetupDialog.Execute: Boolean;
|
||||
begin
|
||||
Result:=(Printer.ExecuteSetup<>srCancel);
|
||||
end;
|
||||
|
||||
{ TPrintJobsDialog }
|
||||
|
||||
function TPrintJobsDialog.Execute: Boolean;
|
||||
begin
|
||||
Result:=True;
|
||||
With TdlgPrintersJobs.Create(nil) do
|
||||
try
|
||||
ShowModal;
|
||||
finally
|
||||
Free;
|
||||
end;
|
||||
end;
|
||||
|
||||
INITIALIZATION
|
||||
{$I cupsprintersdlgs.lrs}
|
||||
end.
|
||||
|
32
components/printers/lazprinter.pp
Normal file
32
components/printers/lazprinter.pp
Normal file
@ -0,0 +1,32 @@
|
||||
{*****************************************************************************
|
||||
* *
|
||||
* This file is part of the Lazarus Component Library (LCL) *
|
||||
* *
|
||||
* See the file COPYING.LCL, included in this distribution, *
|
||||
* for details about the copyright. *
|
||||
* *
|
||||
* This program is distributed in the hope that it will be useful, *
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. *
|
||||
* *
|
||||
*****************************************************************************
|
||||
|
||||
Author: Olivier GUILBAUD
|
||||
|
||||
Abstract:
|
||||
This unit initialize the printer system
|
||||
|
||||
------------------------------------------------------------------------------}
|
||||
unit LazPrinter;
|
||||
|
||||
{$mode objfpc}{$H+}
|
||||
|
||||
interface
|
||||
|
||||
uses
|
||||
Classes, SysUtils;
|
||||
|
||||
implementation
|
||||
|
||||
end.
|
||||
|
56
components/printers/printer4lazarus.lpk
Normal file
56
components/printers/printer4lazarus.lpk
Normal file
@ -0,0 +1,56 @@
|
||||
<?xml version="1.0"?>
|
||||
<CONFIG>
|
||||
<Package Version="2">
|
||||
<PathDelim Value="\"/>
|
||||
<Name Value="Printer4Lazarus"/>
|
||||
<Author Value="Olivier Guilbaud"/>
|
||||
<CompilerOptions>
|
||||
<Version Value="2"/>
|
||||
<PathDelim Value="\"/>
|
||||
<SearchPaths>
|
||||
<UnitOutputDirectory Value="lib\"/>
|
||||
</SearchPaths>
|
||||
<CodeGeneration>
|
||||
<Generate Value="Faster"/>
|
||||
</CodeGeneration>
|
||||
<Other>
|
||||
<CompilerPath Value="$(CompPath)"/>
|
||||
</Other>
|
||||
</CompilerOptions>
|
||||
<Description Value="Printer implementation for Lazarus"/>
|
||||
<License Value="LGPL"/>
|
||||
<Version Build="1"/>
|
||||
<Files Count="4">
|
||||
<Item1>
|
||||
<Filename Value="printersdlgs.lrs"/>
|
||||
<Type Value="LRS"/>
|
||||
</Item1>
|
||||
<Item2>
|
||||
<Filename Value="printersdlgs.pp"/>
|
||||
<HasRegisterProc Value="True"/>
|
||||
<UnitName Value="PrintersDlgs"/>
|
||||
</Item2>
|
||||
<Item3>
|
||||
<Filename Value="winprinters.pas"/>
|
||||
<UnitName Value="WinPrinters"/>
|
||||
</Item3>
|
||||
<Item4>
|
||||
<Filename Value="winutilprn.pas"/>
|
||||
<UnitName Value="WinUtilPrn"/>
|
||||
</Item4>
|
||||
</Files>
|
||||
<Type Value="RunAndDesignTime"/>
|
||||
<RequiredPkgs Count="2">
|
||||
<Item1>
|
||||
<PackageName Value="LCL"/>
|
||||
</Item1>
|
||||
<Item2>
|
||||
<PackageName Value="FCL"/>
|
||||
<MinVersion Major="1" Valid="True"/>
|
||||
</Item2>
|
||||
</RequiredPkgs>
|
||||
<UsageOptions>
|
||||
<UnitPath Value="$(PkgOutDir)\"/>
|
||||
</UsageOptions>
|
||||
</Package>
|
||||
</CONFIG>
|
22
components/printers/printer4lazarus.pas
Normal file
22
components/printers/printer4lazarus.pas
Normal file
@ -0,0 +1,22 @@
|
||||
{ This file was automatically created by Lazarus. Do not edit!
|
||||
This source is only used to compile and install
|
||||
the package Printer4Lazarus 0.0.0.1.
|
||||
}
|
||||
|
||||
unit Printer4Lazarus;
|
||||
|
||||
interface
|
||||
|
||||
uses
|
||||
PrintersDlgs, WinPrinters, WinUtilPrn, LazarusPackageIntf;
|
||||
|
||||
implementation
|
||||
|
||||
procedure Register;
|
||||
begin
|
||||
RegisterUnit('PrintersDlgs', @PrintersDlgs.Register);
|
||||
end;
|
||||
|
||||
initialization
|
||||
RegisterPackage('Printer4Lazarus', @Register);
|
||||
end.
|
324
components/printers/printersdlgs.lrs
Normal file
324
components/printers/printersdlgs.lrs
Normal file
@ -0,0 +1,324 @@
|
||||
LazarusResources.Add('TPrintDialog','XPM',[
|
||||
'/* XPM */'#10'static char *TPrintDialog[]={'#10'"24 24 321 2",'#10'"Qt c Non'
|
||||
+'e",'#10'"a5 c #000000",'#10'"aa c #000002",'#10'"#j c #000004",'#10'"#X c #'
|
||||
+'000005",'#10'"b# c #000009",'#10'"bq c #00000a",'#10'"aA c #00000c",'#10'".'
|
||||
+'W c #00000e",'#10'"aG c #000011",'#10'".t c #00001e",'#10'".F c #000024",'
|
||||
+#10'".M c #000030",'#10'".U c #000035",'#10'".N c #000043",'#10'".T c #00004'
|
||||
+'6",'#10'".O c #000050",'#10'".S c #000051",'#10'".P c #000055",'#10'".R c #'
|
||||
+'000058",'#10'".Q c #000059",'#10'"#7 c #000100",'#10'".J c #000200",'#10'"#'
|
||||
+'O c #000300",'#10'"#P c #000400",'#10'"bj c #000500",'#10'"cL c #000600",'
|
||||
+#10'"cb c #000700",'#10'"cK c #000a00",'#10'"cM c #000b03",'#10'"aK c #01000'
|
||||
+'0",'#10'"a0 c #010005",'#10'"br c #010006",'#10'"#D c #010008",'#10'"bu c #'
|
||||
+'010101",'#10'".H c #010300",'#10'".X c #010302",'#10'"#N c #010600",'#10'".'
|
||||
+'V c #020028",'#10'"as c #020100",'#10'".Z c #020300",'#10'"#R c #020700",'
|
||||
+#10'"#Q c #020a00",'#10'"c9 c #030000",'#10'"cP c #030104",'#10'"a7 c #03010'
|
||||
+'6",'#10'"ba c #030305",'#10'".Y c #030400",'#10'"#M c #030801",'#10'"c8 c #'
|
||||
+'040000",'#10'"aV c #040114",'#10'"a6 c #040301",'#10'"co c #040404",'#10'".'
|
||||
+'L c #04040e",'#10'"#S c #040601",'#10'"bp c #040615",'#10'"bo c #05000b",'
|
||||
+#10'"c6 c #050100",'#10'"bb c #050400",'#10'"c4 c #050505",'#10'"cO c #06000'
|
||||
+'0",'#10'"bn c #060004",'#10'"be c #06030c",'#10'"cF c #060606",'#10'"bm c #'
|
||||
+'070000",'#10'"cN c #090303",'#10'"d. c #0a0a0a",'#10'"aS c #0c0642",'#10'"a'
|
||||
+'l c #0c082b",'#10'"aj c #0c0a2f",'#10'"c7 c #0d0000",'#10'"aR c #0d0a41",'
|
||||
+#10'"aQ c #0d0b30",'#10'"ai c #0d0c2b",'#10'"ak c #0f0d34",'#10'"aT c #120c3'
|
||||
+'a",'#10'".D c #140d5d",'#10'".C c #150b6b",'#10'".z c #161074",'#10'".x c #'
|
||||
+'170f72",'#10'".y c #170f74",'#10'".w c #17116b",'#10'".v c #171360",'#10'".'
|
||||
+'B c #181075",'#10'".A c #191178",'#10'".E c #1a1452",'#10'".u c #1b184f",'
|
||||
+#10'"cz c #737979",'#10'"bK c #757575",'#10'"cn c #777777",'#10'"bf c #787d7'
|
||||
+'9",'#10'".K c #797b76",'#10'"bW c #7a7a7a",'#10'".i c #7a7a9e",'#10'"cu c #'
|
||||
+'7a7f79",'#10'"cQ c #7a7f7b",'#10'"cr c #7a8a80",'#10'"a1 c #7b7c7e",'#10'".'
|
||||
+'b c #7b7e91",'#10'".e c #7b7e9d",'#10'".d c #7b7e9f",'#10'".g c #7b7f98",'
|
||||
+#10'".f c #7b7f9a",'#10'"cw c #7c7676",'#10'"c. c #7c7c7c",'#10'".h c #7c7c9'
|
||||
+'e",'#10'"cA c #7c8685",'#10'"cD c #7d7d7d",'#10'".o c #7d7e79",'#10'".# c #'
|
||||
+'7d8180",'#10'".m c #7e7d8b",'#10'"#k c #7e7f7a",'#10'".c c #7e7f9b",'#10'"c'
|
||||
+'t c #7e8981",'#10'".l c #7f7d95",'#10'"bP c #7f7e79",'#10'".n c #7f7e83",'
|
||||
+#10'".k c #7f7e9d",'#10'"bs c #7f7f7f",'#10'"cp c #7f817e",'#10'"ab c #80807'
|
||||
+'e",'#10'"cB c #808483",'#10'"cH c #808682",'#10'".j c #817fa4",'#10'"#E c #'
|
||||
+'818177",'#10'"cE c #818181",'#10'"at c #818183",'#10'".a c #81848b",'#10'"b'
|
||||
+'2 c #823549",'#10'"#Y c #828278",'#10'"aL c #828387",'#10'"c5 c #838182",'
|
||||
+#10'"cC c #838383",'#10'".r c #838580",'#10'"b1 c #84394d",'#10'"cv c #84838'
|
||||
+'1",'#10'".p c #84857d",'#10'".0 c #858583",'#10'".q c #85877c",'#10'"bX c #'
|
||||
+'878787",'#10'"bN c #887378",'#10'"c# c #887f80",'#10'"cy c #898083",'#10'"b'
|
||||
+'l c #89817f",'#10'"bw c #8c8887",'#10'"bY c #907b80",'#10'"cx c #908488",'
|
||||
+#10'"cs c #b0c1b7",'#10'"cJ c #b3c3b9",'#10'"#x c #b6c0b8",'#10'"#3 c #b8b8b'
|
||||
+'8",'#10'"#I c #b9b8be",'#10'"c2 c #b9b9b9",'#10'"#p c #b9b9c1",'#10'"cR c #'
|
||||
+'b9c2bd",'#10'"cT c #b9c3bb",'#10'"an c #bab9be",'#10'".6 c #bab9db",'#10'"a'
|
||||
+'e c #bababa",'#10'"#c c #babadc",'#10'"bH c #babcbb",'#10'"b7 c #babebf",'
|
||||
+#10'"bh c #bac5bd",'#10'".4 c #bbb7da",'#10'"#J c #bbbdbc",'#10'"af c #bbbeb'
|
||||
+'7",'#10'"#. c #bbbedf",'#10'"#B c #bbbfc2",'#10'"cq c #bbc0bc",'#10'"ck c #'
|
||||
+'bbc5c4",'#10'"ch c #bcb3b6",'#10'"bE c #bcb8b9",'#10'"#U c #bcbdb7",'#10'"b'
|
||||
+'x c #bcbdb8",'#10'"b8 c #bcbdbf",'#10'"#a c #bcbfde",'#10'"cl c #bcc0bf",'
|
||||
+#10'"#t c #bcc3bc",'#10'"ap c #bdbcb7",'#10'"bk c #bdbcb8",'#10'"b9 c #bdbdb'
|
||||
+'d",'#10'"cV c #bdbfba",'#10'"#C c #bdbfbe",'#10'"#9 c #bdc0b7",'#10'"#L c #'
|
||||
+'bdc2bb",'#10'"#Z c #bebeb6",'#10'"aI c #bebebc",'#10'"c0 c #bebebe",'#10'"a'
|
||||
+'P c #bec0bd",'#10'"bG c #bec2c3",'#10'"#r c #bec3bf",'#10'"cj c #bec7c6",'
|
||||
+#10'"aY c #bfbdbe",'#10'"bc c #bfbdc2",'#10'"au c #bfbec3",'#10'"bI c #bfbfb'
|
||||
+'f",'#10'"b6 c #bfc1c0",'#10'"am c #c0bdd8",'#10'"bt c #c0c0be",'#10'"#W c #'
|
||||
+'c0c0c0",'#10'"#g c #c0c0c8",'#10'"b5 c #c0c2c1",'#10'"a4 c #c0c4c3",'#10'"#'
|
||||
+'v c #c0c9c6",'#10'"cm c #c1c1c1",'#10'"#e c #c1c1db",'#10'"bF c #c1c2c4",'
|
||||
+#10'"aU c #c2bcde",'#10'"ci c #c2bebf",'#10'"aZ c #c2bfc6",'#10'"#1 c #c2c0c'
|
||||
+'1",'#10'"#n c #c2c0cd",'#10'"ar c #c2c1bd",'#10'"aW c #c2c1bf",'#10'"bL c #'
|
||||
+'c2c2c2",'#10'".8 c #c2c3e2",'#10'"cW c #c3bfbe",'#10'"aw c #c3c2c7",'#10'"#'
|
||||
+'l c #c3c3c3",'#10'"#i c #c3c3c5",'#10'"a. c #c3c4be",'#10'"a2 c #c3c7c8",'
|
||||
+#10'"#z c #c3c8cb",'#10'"aM c #c4c3c8",'#10'"bJ c #c4c4c4",'#10'".2 c #c5c3d'
|
||||
+'8",'#10'"aJ c #c5c4c0",'#10'"bD c #c6bdc0",'#10'"cY c #c6c0c2",'#10'"cZ c #'
|
||||
+'c6c0c4",'#10'"aN c #c6c6c6",'#10'"ay c #c6c7c2",'#10'"#5 c #c6c8c3",'#10'"a'
|
||||
+'z c #c6c8c7",'#10'"cg c #c7c3c2",'#10'"ac c #c7c5c8",'#10'"#G c #c8c7c5",'
|
||||
,#10'"cd c #c9b6b8",'#10'"bC c #c9bfbe",'#10'"cf c #c9bfc0",'#10'"b4 c #c9c9c'
|
||||
+'7",'#10'"b3 c #cbb0b5",'#10'"bB c #cebbbd",'#10'"ce c #d1b8bc",'#10'"bA c #'
|
||||
+'d3b9bc",'#10'"bz c #d3bfc0",'#10'"bZ c #d4c0c2",'#10'"#u c #f5fbf9",'#10'"a'
|
||||
+'g c #f6f8f5",'#10'".I c #f7f9ee",'#10'"## c #f7faff",'#10'"#A c #f7fbfe",'
|
||||
+#10'"cI c #f7fffb",'#10'"c1 c #f8f8f8",'#10'".7 c #f8f9ff",'#10'"#b c #f8fbf'
|
||||
+'f",'#10'"a3 c #f8fcfd",'#10'"bi c #f8fffb",'#10'"cS c #f8fffd",'#10'"aE c #'
|
||||
+'f9f2ff",'#10'"aC c #f9f6ff",'#10'"#d c #f9faff",'#10'".9 c #f9fcff",'#10'"#'
|
||||
+'s c #f9fef8",'#10'"#K c #f9fefa",'#10'"by c #f9fffa",'#10'"#w c #f9fffb",'
|
||||
+#10'"av c #faf7fe",'#10'".3 c #faf7ff",'#10'".1 c #faf9ff",'#10'"cG c #fafaf'
|
||||
+'a",'#10'"#h c #fafbfd",'#10'"aO c #fafcf9",'#10'"bg c #fafffc",'#10'"bV c #'
|
||||
+'fbfbfb",'#10'"#H c #fbfbfd",'#10'"#f c #fbfcff",'#10'"#8 c #fbfeff",'#10'"c'
|
||||
+'U c #fbfffb",'#10'"#6 c #fbfffc",'#10'"#y c #fbffff",'#10'"aD c #fcf7ff",'
|
||||
+#10'"b. c #fcf9ff",'#10'".5 c #fcfaff",'#10'"#0 c #fcfbf7",'#10'"#m c #fcfbf'
|
||||
+'f",'#10'"ax c #fcfcfa",'#10'"c3 c #fcfcfc",'#10'"bv c #fcfcfe",'#10'"aB c #'
|
||||
+'fcfcff",'#10'"ah c #fcfeff",'#10'"cc c #fcfffb",'#10'".s c #fcffff",'#10'"b'
|
||||
+'d c #fdfaff",'#10'"ad c #fdfbfe",'#10'"aq c #fdfcf7",'#10'"bU c #fdfeff",'
|
||||
+#10'"aF c #fef8ff",'#10'"ca c #fef9f6",'#10'"a9 c #fefbff",'#10'"aX c #fefdf'
|
||||
+'9",'#10'".G c #fefdff",'#10'"a# c #fefefc",'#10'"bM c #fefefe",'#10'"#T c #'
|
||||
+'fefffa",'#10'"#4 c #fefffd",'#10'"#q c #feffff",'#10'"bR c #ffdff3",'#10'"b'
|
||||
+'S c #ffe5fa",'#10'"bT c #fff6fb",'#10'"bQ c #fff9fa",'#10'"bO c #fff9fb",'
|
||||
+#10'"b0 c #fffafa",'#10'"cX c #fffcfe",'#10'"a8 c #fffcff",'#10'"#o c #fffdf'
|
||||
+'f",'#10'"aH c #fffeff",'#10'"#F c #fffff8",'#10'"#V c #fffffb",'#10'"ao c #'
|
||||
+'fffffd",'#10'"#2 c #ffffff",'#10'"QtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQ'
|
||||
+'tQtQtQt",'#10'"QtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQt",'#10'"Qt.#'
|
||||
+'.a.b.c.d.d.e.f.g.g.f.e.h.i.j.k.l.m.n.o.p.qQt",'#10'"Qt.r.s.t.u.v.w.x.y.z.z.'
|
||||
+'z.z.A.B.C.D.E.F.G.H.I.JQt",'#10'"Qt.K.L.t.M.N.O.P.Q.Q.Q.Q.Q.Q.R.S.T.U.V.W.X'
|
||||
+'.Y.ZQt",'#10'"Qt.0.1.2.3.4.5.6.7.8.9#.###a#b#c#d#e#f#g#h#i#jQt",'#10'"Qt#k#'
|
||||
+'l#m#n#o#p#q#r#s#t#u#v#w#x#y#z#A#B#q#C.G#DQt",'#10'"Qt#E#F#G#H#I#q#J#K#L#M#N'
|
||||
+'#O#P#Q#R.J#S#T#U#V#W#XQt",'#10'"Qt#Y#Z#0#1#2#3#4#5#6#7#8#8.s###y.s#S#9#Fa.a'
|
||||
+'#aaQt",'#10'"Qtab#2acadae#Vafag#Xahaiajakalam.WanaoapaqarasQt",'#10'"Qtatau'
|
||||
+'avawaxay#TazaAaBaCaDaEaFaCaGaHaIaoaJaoaKQt",'#10'"QtaL#faM#HaNaOaP#X#daQaRa'
|
||||
+'SaTaUaV.1aWaXaYaHaZa0Qt",'#10'"Qta1a2a3a4aOa5a6a7a8a9.3b.b.a8b#baaKbbaHbcbd'
|
||||
+'beQt",'#10'"Qtbfbgbhbibjbkblbmbnbobp.Wbqbr#jbsbtaobubv#iaaQt",'#10'"Qtbwbxb'
|
||||
+'y.JbzbAbBbCbDbEbFbGbH#lbIbJ#2bKa5bLbMbuQt",'#10'"QtbNbObPbQbRbSbT#0#q#qbU#2'
|
||||
+'#2#2bVbMbWbXa5#2#Wa5Qt",'#10'"QtbYbZaKb0b1b2b3b4b5b6b7b8#W#Wb9bJbXc.a5bIbMa'
|
||||
+'5Qt",'#10'"Qtc#cacbcccdcecfcgchcicjckcl#WcmbIcncobJ#2cmbuQt",'#10'"Qtcpcqcr'
|
||||
+'csctcucvcwcxcyczcAcBcCcDcEcFcmcG#W#2a5Qt",'#10'"QtcHcIcJcKcLcMa5cNbmcOcPaaa'
|
||||
+'5a5a5a5bLbMb9#2cma5Qt",'#10'"QtcQcRcScTcUcVaocWcXcYa8cZaHc0#2#lc1cm#2c2c3c4'
|
||||
+'Qt",'#10'"Qtc5a5#7c6c7c7c8a5a5c9bmbmc9a5a5a5a5a5a5a5a5d.Qt",'#10'"QtQtQtQtQ'
|
||||
+'tQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQt",'#10'"QtQtQtQtQtQtQtQtQtQtQtQtQtQt'
|
||||
+'QtQtQtQtQtQtQtQtQtQt"};'#10
|
||||
]);
|
||||
LazarusResources.Add('TPrinterSetupDialog','XPM',[
|
||||
'/* XPM */'#10'static char *TPrinterSetupDialog[]={'#10'"24 24 350 2",'#10'"Q'
|
||||
+'t c None",'#10'"bu c #000000",'#10'".3 c #000010",'#10'".w c #000020",'#10
|
||||
+'".R c #000022",'#10'".K c #00002b",'#10'".S c #00002e",'#10'".T c #00003c",'
|
||||
+#10'".1 c #00003e",'#10'".U c #000047",'#10'".V c #000050",'#10'".0 c #00005'
|
||||
+'1",'#10'".W c #000055",'#10'".X c #000057",'#10'".Z c #00005b",'#10'".Y c #'
|
||||
+'00005c",'#10'"dx c #000100",'#10'"bw c #000104",'#10'".2 c #00012c",'#10'"b'
|
||||
+'M c #000200",'#10'"b0 c #000204",'#10'"by c #000301",'#10'"df c #000400",'
|
||||
+#10'"bx c #000404",'#10'"a. c #00040c",'#10'"#0 c #000508",'#10'"a# c #00050'
|
||||
+'c",'#10'"aa c #00060c",'#10'"cM c #000700",'#10'"bz c #000705",'#10'"ac c #'
|
||||
+'00070b",'#10'"#9 c #000710",'#10'"#F c #000907",'#10'"ad c #00090d",'#10'"d'
|
||||
+'d c #000a00",'#10'"bk c #000a08",'#10'"as c #000a13",'#10'"ab c #000b10",'
|
||||
+#10'"ae c #000c13",'#10'"a0 c #000e1b",'#10'"de c #000f05",'#10'"#E c #000f0'
|
||||
+'c",'#10'"#D c #000f0f",'#10'"aP c #000f17",'#10'"aQ c #00121b",'#10'"af c #'
|
||||
+'001416",'#10'"bA c #00141c",'#10'"bB c #00151e",'#10'"bD c #001719",'#10'"a'
|
||||
+'j c #001821",'#10'"aS c #00191e",'#10'"bC c #001a1f",'#10'"aT c #001d1e",'
|
||||
+#10'"aU c #001e1a",'#10'"aV c #001f19",'#10'"aR c #002026",'#10'"aX c #00221'
|
||||
+'c",'#10'"ai c #002229",'#10'"aW c #00241d",'#10'"aD c #002827",'#10'"ah c #'
|
||||
+'00877f",'#10'"bt c #010000",'#10'"#n c #010002",'#10'"an c #010100",'#10'"c'
|
||||
+'g c #010101",'#10'"a4 c #010200",'#10'"bv c #010204",'#10'".M c #010206",'
|
||||
+#10'"aJ c #010400",'#10'"#J c #020003",'#10'"#3 c #030000",'#10'".4 c #03010'
|
||||
+'4",'#10'".6 c #030200",'#10'".O c #040000",'#10'".5 c #040301",'#10'"ct c #'
|
||||
+'040404",'#10'"dy c #050100",'#10'".Q c #05011a",'#10'"dv c #050505",'#10'"b'
|
||||
+'n c #060000",'#10'"dA c #070000",'#10'"dh c #080808",'#10'"dB c #0a0a0a",'
|
||||
+#10'"#W c #0a7d78",'#10'"dg c #0b0004",'#10'".H c #0b0f70",'#10'"bH c #0c010'
|
||||
+'5",'#10'"dz c #0d0000",'#10'".I c #0e0e66",'#10'".G c #0f1573",'#10'".E c #'
|
||||
+'101370",'#10'".F c #101772",'#10'"aZ c #107d82",'#10'".D c #121272",'#10'".'
|
||||
+'B c #121274",'#10'".C c #121276",'#10'".A c #12136f",'#10'".z c #131466",'
|
||||
+#10'".y c #161559",'#10'".J c #171459",'#10'".x c #1b184d",'#10'"bg c #1d767'
|
||||
+'c",'#10'"au c #33717e",'#10'"ag c #49e4dc",'#10'"aC c #4be2dd",'#10'"#X c #'
|
||||
+'51e0da",'#10'"aY c #5adcda",'#10'"aB c #62d5d0",'#10'"#Y c #63cfd1",'#10'"#'
|
||||
+'C c #668588",'#10'"bh c #68cfd8",'#10'"#V c #698589",'#10'"aO c #699097",'
|
||||
+#10'"c2 c #6a756d",'#10'"bX c #6b8488",'#10'"ay c #6bcac6",'#10'"aA c #6bcbc'
|
||||
+'9",'#10'"ak c #6e8784",'#10'"bY c #6f8b8e",'#10'"a1 c #718c7d",'#10'"bW c #'
|
||||
+'728486",'#10'"bi c #74d2da",'#10'"ax c #75cfd0",'#10'"aw c #76c6cd",'#10'"a'
|
||||
+'z c #76d6d2",'#10'"#8 c #787f85",'#10'"d. c #797979",'#10'"c8 c #798382",'
|
||||
+#10'"bj c #79c0c4",'#10'"cz c #7a2d41",'#10'".P c #7a7885",'#10'"d# c #7a7a7'
|
||||
+'a",'#10'"bI c #7a7c77",'#10'"bS c #7a7e7f",'#10'"dj c #7a7f7b",'#10'".f c #'
|
||||
+'7a7f9f",'#10'"c0 c #7a8a80",'#10'".e c #7b7e9d",'#10'".h c #7b7f9a",'#10'".'
|
||||
+'g c #7b7f9c",'#10'"bT c #7b8181",'#10'"av c #7bc3cf",'#10'"cy c #7c3145",'
|
||||
+#10'".q c #7c7f88",'#10'"bo c #7d7c78",'#10'".r c #7d7c82",'#10'"cf c #7d7d7'
|
||||
+'d",'#10'".d c #7d7e9a",'#10'".i c #7d7f96",'#10'"bV c #7d8685",'#10'".l c #'
|
||||
+'7e7b8e",'#10'".b c #7e7d8b",'#10'"cs c #7e7e7e",'#10'".j c #7e7f93",'#10'"b'
|
||||
+'U c #7e8281",'#10'"#o c #7f7d7e",'#10'"cj c #7f7e79",'#10'".n c #7f7f99",'
|
||||
+#10'".c c #7f8094",'#10'"cY c #7f817e",'#10'"ao c #7f8180",'#10'".p c #807c8'
|
||||
+'d",'#10'".k c #807d90",'#10'"c4 c #807f7d",'#10'"ce c #808080",'#10'"da c #'
|
||||
+'808682",'#10'".o c #817c92",'#10'".# c #817f84",'#10'"#K c #81807b",'#10'"a'
|
||||
+'K c #818183",'#10'".m c #818199",'#10'"#4 c #82817c",'#10'"cd c #828282",'
|
||||
+#10'"c9 c #828685",'#10'"bP c #837978",'#10'"dw c #838182",'#10'"#G c #83838'
|
||||
+'3",'#10'"c5 c #847e7e",'#10'".u c #84828f",'#10'"a5 c #848381",'#10'".a c #'
|
||||
+'84838b",'#10'"c3 c #848983",'#10'"c7 c #857c7f",'#10'".7 c #85848a",'#10'"c'
|
||||
+'X c #858585",'#10'"bR c #868283",'#10'"bO c #877f7c",'#10'"ci c #887378",'
|
||||
+#10'"cK c #887f80",'#10'"#Z c #89cad0",'#10'"c6 c #8a7e82",'#10'"bQ c #8a818'
|
||||
+'2",'#10'".s c #8b7f89",'#10'"b3 c #8c8887",'#10'".t c #8d8089",'#10'"cv c #'
|
||||
+'907b80",'#10'"at c #90c2cd",'#10'"aE c #9ed8e3",'#10'"be c #a3cac5",'#10'"b'
|
||||
+'c c #a8cccc",'#10'"ba c #abc9c9",'#10'"aG c #aec5b5",'#10'"aN c #afcbcc",'
|
||||
+#10'"c1 c #b0c1b7",'#10'"bE c #b0c9cd",'#10'"dc c #b3c3b9",'#10'"#j c #b4bfd'
|
||||
+'3",'#10'"a2 c #b4c7b1",'#10'"b# c #b4cac8",'#10'"#f c #b6b7d3",'#10'"cU c #'
|
||||
+'b6c0bf",'#10'"a9 c #b6c1bd",'#10'"#c c #b7bdd7",'#10'"cI c #b9b9b9",'#10'"#'
|
||||
+'v c #b9beb8",'#10'"dk c #b9c2bd",'#10'"aL c #b9c2c1",'#10'"dm c #b9c3bb",'
|
||||
+#10'"aq c #b9cbcb",'#10'"cG c #bababa",'#10'"#. c #bbbdd4",'#10'"cV c #bbbfb'
|
||||
+'e",'#10'"#x c #bbc0ba",'#10'"cZ c #bbc0bc",'#10'"#a c #bbc1d9",'#10'"#d c #'
|
||||
+'bbc1db",'#10'"bK c #bbc5bc",'#10'"aI c #bbc7af",'#10'"di c #bcbcbc",'#10'"b'
|
||||
+'4 c #bcbdb8",'#10'"cC c #bcbebd",'#10'"cT c #bcc5c4",'#10'"#P c #bdb8bc",'
|
||||
+#10'"dt c #bdbdbd",'#10'"#5 c #bdbeb9",'#10'"cb c #bdbfbe",'#10'"al c #bdc0b'
|
||||
,'7",'#10'"#B c #bdc1c2",'#10'"cB c #bebebc",'#10'"cc c #bebebe",'#10'"do c #'
|
||||
+'bec0bb",'#10'"#7 c #bec2c3",'#10'"#l c #bfb8bf",'#10'"bF c #bfbfc1",'#10'"#'
|
||||
+'z c #bfc0bb",'#10'"cD c #bfc1c0",'#10'"ca c #bfc3c4",'#10'"ch c #c0c0c0",'
|
||||
+#10'"c# c #c0c1c3",'#10'"#t c #c0c2c1",'#10'"#U c #c1b4bb",'#10'"ds c #c1bbb'
|
||||
+'f",'#10'"cQ c #c1bdbc",'#10'"cF c #c1c1c1",'#10'"cE c #c1c2c4",'#10'"b9 c #'
|
||||
+'c2b9bc",'#10'"c. c #c2bebf",'#10'"cH c #c2c2c2",'#10'"dp c #c3bfbe",'#10'"#'
|
||||
+'2 c #c3c0bb",'#10'"#r c #c3c1c6",'#10'"#T c #c4bfc3",'#10'"cS c #c4c0c1",'
|
||||
+#10'"bm c #c4c1bc",'#10'"b2 c #c4c2c3",'#10'"#p c #c4c2c7",'#10'"br c #c4c4b'
|
||||
+'c",'#10'"a7 c #c4c4c2",'#10'"cJ c #c4c4c4",'#10'"cR c #c5bcbf",'#10'"#N c #'
|
||||
+'c5bfc1",'#10'"#h c #c5bfe5",'#10'"cW c #c5c5c5",'#10'"#m c #c6c1c5",'#10'".'
|
||||
+'9 c #c6c3d6",'#10'"#H c #c7bbbd",'#10'"bN c #c7c6c1",'#10'"bp c #c7c6c2",'
|
||||
+#10'"cP c #c8bebf",'#10'"#R c #c8c6c9",'#10'"dr c #c9c3c5",'#10'"b8 c #cbc1c'
|
||||
+'0",'#10'"#L c #cbc5c5",'#10'"b5 c #ccb8b9",'#10'"b7 c #ccb9bb",'#10'"cO c #'
|
||||
+'cdb4b8",'#10'"b6 c #d1b7ba",'#10'"cw c #d4c0c2",'#10'"cN c #d7c4c6",'#10'"b'
|
||||
+'f c #d7ffff",'#10'"cA c #d8bdc2",'#10'"bd c #e4ffff",'#10'"bb c #e5ffff",'
|
||||
+#10'"ar c #e8ffff",'#10'"aF c #ebffff",'#10'"aM c #ecfefe",'#10'"bZ c #edfff'
|
||||
+'f",'#10'"b. c #f1fffe",'#10'"aH c #f4ffef",'#10'"## c #f6faff",'#10'"#e c #'
|
||||
+'f6fcff",'#10'"#b c #f7feff",'#10'"db c #f7fffb",'#10'"#k c #f7ffff",'#10'"#'
|
||||
+'i c #f8f7ff",'#10'"a8 c #f8fdf9",'#10'"dl c #f8fffd",'#10'"#S c #f9f7fa",'
|
||||
+#10'"dn c #f9fff9",'#10'"bL c #f9fffa",'#10'"ap c #f9ffff",'#10'".N c #faf6f'
|
||||
+'7",'#10'".8 c #faf8ff",'#10'"cr c #fafafa",'#10'"#6 c #fafcf9",'#10'"#y c #'
|
||||
+'fafff9",'#10'"cq c #fbfcfe",'#10'".L c #fbfeff",'#10'"a3 c #fbfff1",'#10'"b'
|
||||
+'J c #fbfffa",'#10'"bl c #fbfffd",'#10'"bq c #fcfbf6",'#10'"du c #fcfcfc",'
|
||||
+#10'"#w c #fcfffb",'#10'"#u c #fcfffd",'#10'"#q c #fdfbff",'#10'"a6 c #fdfcf'
|
||||
+'a",'#10'"cu c #fdfdfd",'#10'"cL c #fef9f6",'#10'"#g c #fefaff",'#10'"b1 c #'
|
||||
+'fefefe",'#10'"am c #fefff3",'#10'"cp c #feffff",'#10'"cl c #ffe4f8",'#10'"c'
|
||||
+'m c #ffe5fa",'#10'"cn c #ffeff4",'#10'"ck c #fff9fa",'#10'"#M c #fff9fb",'
|
||||
+#10'"bG c #fff9fc",'#10'"cx c #fffafa",'#10'".v c #fffbff",'#10'"#1 c #fffcf'
|
||||
+'c",'#10'"dq c #fffcfe",'#10'"#I c #fffcff",'#10'"#O c #fffdff",'#10'"#A c #'
|
||||
+'fffefb",'#10'"#Q c #fffeff",'#10'"bs c #fffff8",'#10'"co c #fffffb",'#10'"#'
|
||||
+'s c #ffffff",'#10'"QtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQt",'#10'"'
|
||||
+'QtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQt",'#10'"Qt.#.a.b.c.d.e.f.f.'
|
||||
+'g.h.i.j.k.l.m.n.o.p.q.r.s.tQt",'#10'"Qt.u.v.w.x.y.z.A.B.C.B.D.E.F.G.H.I.J.K'
|
||||
+'.L.M.N.OQt",'#10'"Qt.P.Q.R.S.T.U.V.W.X.X.X.W.X.Y.Z.0.1.2.3.4.5.6Qt",'#10'"Q'
|
||||
+'t.7.8.9.8#.###a#b#c#b#d#e#f#g#h#i#j#k#l.v#m#nQt",'#10'"Qt#o#p#q#r#s#t#u#v#w'
|
||||
+'#x#y#z#A#B#C#D#E#F#G#H#I#JQt",'#10'"Qt#K#A#L#M#N#O#P#Q#R#S#T#O#U#V#W#X#Y#Z#'
|
||||
+'0#1#2#3Qt",'#10'"Qt#4#5#6#7#8#9a.a#aaabacadaeafagahaiajakalamanQt",'#10'"Qt'
|
||||
+'aoapaqarasatauavawaxayazaAaBaCaDaEaFaGaHaIaJQt",'#10'"QtaKaLaMaNaOaPaQaRaSa'
|
||||
+'TaUaVaWaXaYaZa0aba1a2a3a4Qt",'#10'"Qta5a6a7a8a9b.b#arbabbbcbdbebfbgbhbibjbk'
|
||||
+'blbmbnQt",'#10'"QtbobpbqbrbsanbtbtbubvbwbxbybzbAbBbCbDbEbFbGbHQt",'#10'"Qtb'
|
||||
+'IbJbKbLbMbNbObPbQbRbSbTbUbVbWbXbYbZb0b1b2#3Qt",'#10'"Qtb3b4bLbMb5b6b7b8b9c.'
|
||||
+'c#cacbcccdce#scfcgchb1cgQt",'#10'"Qtci#Mcjckclcmcncocpcpcq#s#s#scr#scscsctc'
|
||||
+'uchbuQt",'#10'"QtcvcwbtcxcyczcAcBcCcD#BcEcFcGcHcIcecdbucJb1buQt",'#10'"QtcK'
|
||||
+'cLcM#wcNcOcPcQcRcScTcUcVchcHcWcXbucGcucFcgQt",'#10'"QtcYcZc0c1c2c3c4c5c6c7b'
|
||||
+'Tc8c9d.d#cdbucG#sch#sbuQt",'#10'"Qtdadbdcdddedfanbndgbn#nbvbuctdhbuch#sdib1'
|
||||
+'cFbuQt",'#10'"Qtdjdkdldmdndoa6dpdqdr#Ids#Qch#scc#sdtcuchdudvQt",'#10'"Qtdwb'
|
||||
+'udxdydzdz.Obubu#3dAdA#3bubububububububudBQt",'#10'"QtQtQtQtQtQtQtQtQtQtQtQt'
|
||||
+'QtQtQtQtQtQtQtQtQtQtQtQt",'#10'"QtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQ'
|
||||
+'tQtQt"};'#10
|
||||
]);
|
||||
LazarusResources.Add('TPrintJobsDialog','XPM',[
|
||||
'/* XPM */'#10'static char *TPrintJobsDialog[]={'#10'"24 24 304 2",'#10'"Qt c'
|
||||
+' None",'#10'"aW c #000000",'#10'"#5 c #000002",'#10'"#j c #000004",'#10'"#T'
|
||||
+' c #000005",'#10'"a2 c #000009",'#10'"bg c #00000a",'#10'"at c #00000c",'#10
|
||||
+'".W c #00000e",'#10'"az c #000011",'#10'".t c #00001e",'#10'".F c #000024",'
|
||||
+#10'".M c #000030",'#10'".U c #000035",'#10'".N c #000043",'#10'".T c #00004'
|
||||
+'6",'#10'".O c #000050",'#10'".S c #000051",'#10'".P c #000055",'#10'".R c #'
|
||||
+'000058",'#10'".Q c #000059",'#10'"#3 c #000100",'#10'".J c #000200",'#10'"#'
|
||||
+'O c #000300",'#10'"#P c #000400",'#10'"b# c #000500",'#10'"cv c #000600",'
|
||||
+#10'"b1 c #000700",'#10'"cu c #000a00",'#10'"cw c #000b03",'#10'"aC c #01000'
|
||||
+'0",'#10'"aR c #010005",'#10'"bh c #010006",'#10'"#D c #010008",'#10'"bA c #'
|
||||
+'010101",'#10'".H c #010300",'#10'".X c #010302",'#10'"#N c #010600",'#10'".'
|
||||
+'V c #020028",'#10'"ak c #020100",'#10'".Z c #020300",'#10'"#R c #020700",'
|
||||
+#10'"#Q c #020a00",'#10'"cS c #030000",'#10'"cz c #030104",'#10'"aY c #03010'
|
||||
+'6",'#10'"a3 c #030305",'#10'".Y c #030400",'#10'"#M c #030801",'#10'"cR c #'
|
||||
+'040000",'#10'"aN c #040114",'#10'"aX c #040301",'#10'"cb c #040404",'#10'".'
|
||||
+'L c #04040e",'#10'"bf c #040615",'#10'"be c #05000b",'#10'"cP c #050100",'
|
||||
+#10'"a4 c #050400",'#10'"cN c #050505",'#10'"cy c #060000",'#10'"bd c #06000'
|
||||
+'4",'#10'"a6 c #06030c",'#10'"cq c #060606",'#10'"bc c #070000",'#10'"cx c #'
|
||||
+'090303",'#10'"cT c #0a0a0a",'#10'"aK c #0c0642",'#10'"af c #0c082b",'#10'"a'
|
||||
+'d c #0c0a2f",'#10'"cQ c #0d0000",'#10'"aJ c #0d0a41",'#10'"aI c #0d0b30",'
|
||||
+#10'"ac c #0d0c2b",'#10'"ae c #0f0d34",'#10'"aL c #120c3a",'#10'".D c #140d5'
|
||||
+'d",'#10'".C c #150b6b",'#10'".z c #161074",'#10'".x c #170f72",'#10'".y c #'
|
||||
+'170f74",'#10'".w c #17116b",'#10'".v c #171360",'#10'".B c #181075",'#10'".'
|
||||
+'A c #191178",'#10'".E c #1a1452",'#10'".u c #1b184f",'#10'"cn c #737979",'
|
||||
+#10'"by c #757575",'#10'"ca c #777777",'#10'"a7 c #787d79",'#10'".K c #797b7'
|
||||
+'6",'#10'"bK c #7a7a7a",'#10'".i c #7a7a9e",'#10'"ci c #7a7f79",'#10'"cA c #'
|
||||
+'7a7f7b",'#10'"cf c #7a8a80",'#10'"aS c #7b7c7e",'#10'".b c #7b7e91",'#10'".'
|
||||
+'e c #7b7e9d",'#10'".d c #7b7e9f",'#10'".g c #7b7f98",'#10'".f c #7b7f9a",'
|
||||
+#10'"ck c #7c7676",'#10'"bY c #7c7c7c",'#10'".h c #7c7c9e",'#10'"co c #7c868'
|
||||
+'5",'#10'".o c #7d7e79",'#10'".# c #7d8180",'#10'".m c #7e7d8b",'#10'"#k c #'
|
||||
+'7e7f7a",'#10'".c c #7e7f9b",'#10'"ch c #7e8981",'#10'".l c #7f7d95",'#10'"b'
|
||||
+'D c #7f7e79",'#10'".n c #7f7e83",'#10'".k c #7f7e9d",'#10'"bi c #7f7f7f",'
|
||||
+#10'"cd c #7f817e",'#10'"#6 c #80807e",'#10'"cp c #808483",'#10'"cr c #80868'
|
||||
+'2",'#10'".j c #817fa4",'#10'"#E c #818177",'#10'"al c #818183",'#10'".a c #'
|
||||
+'81848b",'#10'"bR c #823549",'#10'"#U c #828278",'#10'"aD c #828387",'#10'"c'
|
||||
+'O c #838182",'#10'".r c #838580",'#10'"bQ c #84394d",'#10'"cj c #848381",'
|
||||
+#10'".p c #84857d",'#10'".0 c #858583",'#10'".q c #85877c",'#10'"bL c #87878'
|
||||
+'7",'#10'"bB c #887378",'#10'"bZ c #887f80",'#10'"cm c #898083",'#10'"bb c #'
|
||||
+'89817f",'#10'"bk c #8c8887",'#10'"bN c #907b80",'#10'"cl c #908488",'#10'"c'
|
||||
+'g c #b0c1b7",'#10'"ct c #b3c3b9",'#10'"#x c #b6c0b8",'#10'"#Z c #b8b8b8",'
|
||||
+#10'"#I c #b9b8be",'#10'"cL c #b9b9b9",'#10'"#p c #b9b9c1",'#10'"cB c #b9c2b'
|
||||
+'d",'#10'"cD c #b9c3bb",'#10'"ah c #bab9be",'#10'".6 c #bab9db",'#10'"#9 c #'
|
||||
+'bababa",'#10'"#c c #babadc",'#10'"bv c #babcbb",'#10'"bW c #babebf",'#10'"a'
|
||||
+'9 c #bac5bd",'#10'".4 c #bbb7da",'#10'"#J c #bbbdbc",'#10'"a# c #bbbeb7",'
|
||||
+#10'"#. c #bbbedf",'#10'"#B c #bbbfc2",'#10'"ce c #bbc0bc",'#10'"c. c #bbc5c'
|
||||
+'4",'#10'"b7 c #bcb3b6",'#10'"bs c #bcb8b9",'#10'"bl c #bcbdb8",'#10'"bX c #'
|
||||
+'bcbdbf",'#10'"#a c #bcbfde",'#10'"c# c #bcc0bf",'#10'"#t c #bcc3bc",'#10'"b'
|
||||
+'a c #bdbcb8",'#10'"cF c #bdbfba",'#10'"#C c #bdbfbe",'#10'"#L c #bdc2bb",'
|
||||
+#10'"#V c #bebeb6",'#10'"aB c #bebebc",'#10'"cK c #bebebe",'#10'"aH c #bec0b'
|
||||
+'d",'#10'"bu c #bec2c3",'#10'"#r c #bec3bf",'#10'"b9 c #bec7c6",'#10'"am c #'
|
||||
+'bfbec3",'#10'"bw c #bfbfbf",'#10'"bV c #bfc1c0",'#10'"ag c #c0bdd8",'#10'"b'
|
||||
+'j c #c0c0be",'#10'"bM c #c0c0c0",'#10'"#g c #c0c0c8",'#10'"bU c #c0c2c1",'
|
||||
+#10'"aV c #c0c4c3",'#10'"#v c #c0c9c6",'#10'"cc c #c1c1c1",'#10'"#e c #c1c1d'
|
||||
+'b",'#10'"bt c #c1c2c4",'#10'"aM c #c2bcde",'#10'"b8 c #c2bebf",'#10'"aQ c #'
|
||||
+'c2bfc6",'#10'"#X c #c2c0c1",'#10'"#n c #c2c0cd",'#10'"aj c #c2c1bd",'#10'"a'
|
||||
+'O c #c2c1bf",'#10'".8 c #c2c3e2",'#10'"cG c #c3bfbe",'#10'"ao c #c3c2c7",'
|
||||
+#10'"#l c #c3c3c3",'#10'"#i c #c3c3c5",'#10'"aT c #c3c7c8",'#10'"#z c #c3c8c'
|
||||
+'b",'#10'"aE c #c4c3c8",'#10'"bx c #c4c4c4",'#10'".2 c #c5c3d8",'#10'"br c #'
|
||||
+'c6bdc0",'#10'"cI c #c6c0c2",'#10'"cJ c #c6c0c4",'#10'"aF c #c6c6c6",'#10'"a'
|
||||
+'q c #c6c7c2",'#10'"#1 c #c6c8c3",'#10'"as c #c6c8c7",'#10'"b6 c #c7c3c2",'
|
||||
+#10'"#7 c #c7c5c8",'#10'"#G c #c8c7c5",'#10'"b3 c #c9b6b8",'#10'"bq c #c9bfb'
|
||||
+'e",'#10'"b5 c #c9bfc0",'#10'"bT c #c9c9c7",'#10'"bS c #cbb0b5",'#10'"bp c #'
|
||||
+'cebbbd",'#10'"b4 c #d1b8bc",'#10'"bo c #d3b9bc",'#10'"bn c #d3bfc0",'#10'"b'
|
||||
+'O c #d4c0c2",'#10'"#u c #f5fbf9",'#10'"aa c #f6f8f5",'#10'".I c #f7f9ee",'
|
||||
,#10'"## c #f7faff",'#10'"#A c #f7fbfe",'#10'"cs c #f7fffb",'#10'".7 c #f8f9f'
|
||||
+'f",'#10'"#b c #f8fbff",'#10'"aU c #f8fcfd",'#10'"b. c #f8fffb",'#10'"cC c #'
|
||||
+'f8fffd",'#10'"ax c #f9f2ff",'#10'"av c #f9f6ff",'#10'"#d c #f9faff",'#10'".'
|
||||
+'9 c #f9fcff",'#10'"#s c #f9fef8",'#10'"#K c #f9fefa",'#10'"bm c #f9fffa",'
|
||||
+#10'"#w c #f9fffb",'#10'"an c #faf7fe",'#10'".3 c #faf7ff",'#10'".1 c #faf9f'
|
||||
+'f",'#10'"#h c #fafbfd",'#10'"aG c #fafcf9",'#10'"a8 c #fafffc",'#10'"bJ c #'
|
||||
+'fbfbfb",'#10'"#H c #fbfbfd",'#10'"#f c #fbfcff",'#10'"#4 c #fbfeff",'#10'"c'
|
||||
+'E c #fbfffb",'#10'"#2 c #fbfffc",'#10'"#y c #fbffff",'#10'"aw c #fcf7ff",'
|
||||
+#10'"a1 c #fcf9ff",'#10'".5 c #fcfaff",'#10'"#W c #fcfbf7",'#10'"#m c #fcfbf'
|
||||
+'f",'#10'"ap c #fcfcfa",'#10'"cM c #fcfcfc",'#10'"au c #fcfcff",'#10'"ab c #'
|
||||
+'fcfeff",'#10'"b2 c #fcfffb",'#10'".s c #fcffff",'#10'"a5 c #fdfaff",'#10'"#'
|
||||
+'8 c #fdfbfe",'#10'"bI c #fdfeff",'#10'"ay c #fef8ff",'#10'"b0 c #fef9f6",'
|
||||
+#10'"a0 c #fefbff",'#10'"aP c #fefdf9",'#10'".G c #fefdff",'#10'"bz c #fefef'
|
||||
+'e",'#10'"ar c #fefffa",'#10'"#0 c #fefffd",'#10'"#q c #feffff",'#10'"#S c #'
|
||||
+'ff0000",'#10'"bF c #ffdff3",'#10'"bG c #ffe5fa",'#10'"bH c #fff6fb",'#10'"b'
|
||||
+'E c #fff9fa",'#10'"bC c #fff9fb",'#10'"bP c #fffafa",'#10'"cH c #fffcfe",'
|
||||
+#10'"aZ c #fffcff",'#10'"#o c #fffdff",'#10'"aA c #fffeff",'#10'"#F c #fffff'
|
||||
+'8",'#10'"a. c #fffffb",'#10'"ai c #fffffd",'#10'"#Y c #ffffff",'#10'"QtQtQt'
|
||||
+'QtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQt",'#10'"QtQtQtQtQtQtQtQtQtQtQtQtQ'
|
||||
+'tQtQtQtQtQtQtQtQtQtQtQt",'#10'"Qt.#.a.b.c.d.d.e.f.g.g.f.e.h.i.j.k.l.m.n.o.p'
|
||||
+'.qQt",'#10'"Qt.r.s.t.u.v.w.x.y.z.z.z.z.A.B.C.D.E.F.G.H.I.JQt",'#10'"Qt.K.L.'
|
||||
+'t.M.N.O.P.Q.Q.Q.Q.Q.Q.R.S.T.U.V.W.X.Y.ZQt",'#10'"Qt.0.1.2.3.4.5.6.7.8.9#.##'
|
||||
+'#a#b#c#d#e#f#g#h#i#jQt",'#10'"Qt#k#l#m#n#o#p#q#r#s#t#u#v#w#x#y#z#A#B#q#C.G#'
|
||||
+'DQt",'#10'"Qt#E#F#G#H#I#q#J#K#L#M#N#O#P#Q#R#S#S#S#S#S#S#TQt",'#10'"Qt#U#V#W'
|
||||
+'#X#Y#Z#0#1#2#3#4#4.s###y#S#S#S#S#S#S#5Qt",'#10'"Qt#6#Y#7#8#9a.a#aa#Tabacada'
|
||||
+'eafag.Wahai#S#SajakQt",'#10'"QtalamanaoapaqarasatauavawaxayavazaAaB#S#SaiaC'
|
||||
+'Qt",'#10'"QtaD#faE#HaFaGaH#T#daIaJaKaLaMaN.1aOaP#S#SaQaRQt",'#10'"QtaSaTaUa'
|
||||
+'VaGaWaXaYaZa0.3a1a1aZa2a3aCa4#S#Sa5a6Qt",'#10'"Qta7a8a9b.b#babbbcbdbebf.Wbg'
|
||||
+'bh#jbibjai#S#S#i#5Qt",'#10'"Qtbkblbm.Jbnbobpbqbrbsbtbubv#lbwbx#Yby#S#SbzbAQ'
|
||||
+'t",'#10'"QtbBbCbDbEbFbGbH#W#q#qbI#Y#Y#YbJbzbKbL#S#SbMaWQt",'#10'"QtbNbOaCbP'
|
||||
+'bQbRbSbTbUbVbWbXbM#S#SbxbLbY#S#SbzaWQt",'#10'"QtbZb0b1b2b3b4b5b6b7b8b9c.c##'
|
||||
+'S#Sbwcacb#S#SccbAQt",'#10'"Qtcdcecfcgchcicjckclcmcncocp#S#S#Scq#S#S#S#YaWQt'
|
||||
+'",'#10'"QtcrcsctcucvcwaWcxbccycz#5aWaW#S#S#S#S#S#YccaWQt",'#10'"QtcAcBcCcDc'
|
||||
+'EcFaicGcHcIaZcJaAcK#Y#S#S#S#ScLcMcNQt",'#10'"QtcOaW#3cPcQcQcRaWaWcSbcbccSaW'
|
||||
+'aWaWaWaWaWaWaWcTQt",'#10'"QtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQt"'
|
||||
+','#10'"QtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQt"};'#10
|
||||
]);
|
72
components/printers/printersdlgs.pp
Normal file
72
components/printers/printersdlgs.pp
Normal file
@ -0,0 +1,72 @@
|
||||
{*****************************************************************************
|
||||
* *
|
||||
* This file is part of the Lazarus Component Library (LCL) *
|
||||
* *
|
||||
* See the file COPYING.LCL, included in this distribution, *
|
||||
* for details about the copyright. *
|
||||
* *
|
||||
* This program is distributed in the hope that it will be useful, *
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. *
|
||||
* *
|
||||
*****************************************************************************
|
||||
|
||||
Author: Olivier GUILBAUD
|
||||
|
||||
Abstract:
|
||||
Common component dialogs for select or setup printers
|
||||
|
||||
------------------------------------------------------------------------------}
|
||||
unit PrintersDlgs;
|
||||
|
||||
{$mode objfpc}{$H+}
|
||||
|
||||
interface
|
||||
|
||||
uses
|
||||
Classes, SysUtils,dialogs,Printers,
|
||||
{$IFDEF WIN32}
|
||||
WinPrinters,
|
||||
{$ENDIF}
|
||||
LResources;
|
||||
|
||||
type
|
||||
TPrinterSetupDialog = class(TCommonDialog)
|
||||
public
|
||||
function Execute: Boolean; override;
|
||||
end;
|
||||
|
||||
TPrinterDialog = class(TCommonDialog)
|
||||
public
|
||||
function Execute: Boolean; override;
|
||||
end;
|
||||
|
||||
procedure Register;
|
||||
|
||||
|
||||
implementation
|
||||
|
||||
|
||||
procedure Register;
|
||||
begin
|
||||
RegisterComponents('Dialogs',[TPrinterSetupDialog,TPrinterDialog]);
|
||||
end;
|
||||
|
||||
{ TPrinterSetupDialog }
|
||||
|
||||
function TPrinterSetupDialog.Execute: Boolean;
|
||||
begin
|
||||
Result:=Printer.ExecuteSetup;
|
||||
end;
|
||||
|
||||
{ TPrinterDialog }
|
||||
|
||||
function TPrinterDialog.Execute: Boolean;
|
||||
begin
|
||||
Result:=Printer.ExecuteSetup;
|
||||
end;
|
||||
|
||||
INITIALIZATION
|
||||
{$I printersdlgs.lrs}
|
||||
end.
|
||||
|
17
components/printers/readme.txt
Normal file
17
components/printers/readme.txt
Normal file
@ -0,0 +1,17 @@
|
||||
Printer4Lazarus package
|
||||
=======================
|
||||
|
||||
This package add some components.
|
||||
|
||||
Win32 :
|
||||
TPrinterSetupDialog : for update properties of selected printer
|
||||
TPrinterDialog : for select and/or update an printer
|
||||
|
||||
|
||||
Linux :
|
||||
For moment, not use this package, use the cups4lazarus project (if you have CUPS installed)
|
||||
|
||||
|
||||
FAQ :
|
||||
Q:If I use Printers unit, the call of printer object générate an exception "Access Violation"
|
||||
R:Add in uses clause of your project, WinPrinters (for Win32) or CUPSPrinter (for linux)
|
25
components/printers/sample/frmselprinter.lfm
Normal file
25
components/printers/sample/frmselprinter.lfm
Normal file
@ -0,0 +1,25 @@
|
||||
object Form1: TForm1
|
||||
Caption = 'Form1'
|
||||
ClientHeight = 300
|
||||
ClientWidth = 400
|
||||
PixelsPerInch = 96
|
||||
HorzScrollBar.Page = 401
|
||||
VertScrollBar.Page = 301
|
||||
Left = 290
|
||||
Height = 300
|
||||
Top = 156
|
||||
Width = 400
|
||||
object Button1: TButton
|
||||
Caption = 'Select a printer'
|
||||
OnClick = Button1Click
|
||||
TabOrder = 0
|
||||
Left = 16
|
||||
Height = 25
|
||||
Top = 16
|
||||
Width = 171
|
||||
end
|
||||
object PD: TPrinterDialog
|
||||
left = 16
|
||||
top = 224
|
||||
end
|
||||
end
|
11
components/printers/sample/frmselprinter.lrs
Normal file
11
components/printers/sample/frmselprinter.lrs
Normal file
@ -0,0 +1,11 @@
|
||||
{ Ceci est un fichier ressource généré automatiquement par Lazarus }
|
||||
|
||||
LazarusResources.Add('TForm1','FORMDATA',[
|
||||
'TPF0'#6'TForm1'#5'Form1'#7'Caption'#6#5'Form1'#12'ClientHeight'#3','#1#11'Cl'
|
||||
+'ientWidth'#3#144#1#13'PixelsPerInch'#2'`'#18'HorzScrollBar.Page'#3#145#1#18
|
||||
+'VertScrollBar.Page'#3'-'#1#4'Left'#3'"'#1#6'Height'#3','#1#3'Top'#3#156#0#5
|
||||
+'Width'#3#144#1#0#7'TButton'#7'Button1'#7'Caption'#6#16'Select a printer'#7
|
||||
+'OnClick'#7#12'Button1Click'#8'TabOrder'#2#0#4'Left'#2#16#6'Height'#2#25#3'T'
|
||||
+'op'#2#16#5'Width'#3#171#0#0#0#14'TPrinterDialog'#2'PD'#4'left'#2#16#3'top'#3
|
||||
+#224#0#0#0#0
|
||||
]);
|
58
components/printers/sample/frmselprinter.pas
Normal file
58
components/printers/sample/frmselprinter.pas
Normal file
@ -0,0 +1,58 @@
|
||||
{*****************************************************************************
|
||||
* *
|
||||
* This file is part of the Lazarus Component Library (LCL) *
|
||||
* *
|
||||
* See the file COPYING.LCL, included in this distribution, *
|
||||
* for details about the copyright. *
|
||||
* *
|
||||
* This program is distributed in the hope that it will be useful, *
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. *
|
||||
* *
|
||||
*****************************************************************************
|
||||
|
||||
Author: Olivier GUILBAUD
|
||||
|
||||
Abstract:
|
||||
Little sample for show call printer unit
|
||||
|
||||
------------------------------------------------------------------------------}
|
||||
|
||||
unit frmSelPrinter;
|
||||
|
||||
{$mode objfpc}{$H+}
|
||||
|
||||
interface
|
||||
|
||||
uses
|
||||
Classes, SysUtils, LResources, Forms, Controls, Graphics, Dialogs, Buttons,
|
||||
PrintersDlgs;
|
||||
|
||||
type
|
||||
TForm1 = class(TForm)
|
||||
Button1: TButton;
|
||||
PD: TPrinterDialog;
|
||||
procedure Button1Click(Sender: TObject);
|
||||
private
|
||||
{ private declarations }
|
||||
public
|
||||
{ public declarations }
|
||||
end;
|
||||
|
||||
var
|
||||
Form1: TForm1;
|
||||
|
||||
implementation
|
||||
|
||||
{ TForm1 }
|
||||
|
||||
procedure TForm1.Button1Click(Sender: TObject);
|
||||
begin
|
||||
PD.Execute;
|
||||
end;
|
||||
|
||||
initialization
|
||||
{$I frmselprinter.lrs}
|
||||
|
||||
end.
|
||||
|
104
components/printers/sample/selectprinter.lpi
Normal file
104
components/printers/sample/selectprinter.lpi
Normal file
@ -0,0 +1,104 @@
|
||||
<?xml version="1.0"?>
|
||||
<CONFIG>
|
||||
<ProjectOptions>
|
||||
<Version Value="5"/>
|
||||
<General>
|
||||
<MainUnit Value="0"/>
|
||||
<ActiveEditorIndexAtStart Value="1"/>
|
||||
<TargetFileExt Value=".exe"/>
|
||||
<Title Value="selectprinter"/>
|
||||
</General>
|
||||
<JumpHistory Count="1" HistoryIndex="0">
|
||||
<Position1>
|
||||
<Filename Value="frmselprinter.pas"/>
|
||||
<Caret Line="9" Column="10" TopLine="1"/>
|
||||
</Position1>
|
||||
</JumpHistory>
|
||||
<Units Count="3">
|
||||
<Unit0>
|
||||
<Filename Value="selectprinter.lpr"/>
|
||||
<IsPartOfProject Value="True"/>
|
||||
<UnitName Value="selectprinter"/>
|
||||
<UsageCount Value="20"/>
|
||||
</Unit0>
|
||||
<Unit1>
|
||||
<CursorPos X="31" Y="41"/>
|
||||
<EditorIndex Value="0"/>
|
||||
<Filename Value="frmselprinter.pas"/>
|
||||
<ComponentName Value="Form1"/>
|
||||
<IsPartOfProject Value="True"/>
|
||||
<Loaded Value="True"/>
|
||||
<ResourceFilename Value="frmselprinter.lrs"/>
|
||||
<TopLine Value="5"/>
|
||||
<UnitName Value="frmSelPrinter"/>
|
||||
<UsageCount Value="20"/>
|
||||
</Unit1>
|
||||
<Unit2>
|
||||
<CursorPos X="15" Y="29"/>
|
||||
<EditorIndex Value="1"/>
|
||||
<Filename Value="G:\projects\winspl\PrintersDlgs.pp"/>
|
||||
<Loaded Value="True"/>
|
||||
<TopLine Value="1"/>
|
||||
<UnitName Value="PrintersDlgs"/>
|
||||
<UsageCount Value="10"/>
|
||||
</Unit2>
|
||||
</Units>
|
||||
<PublishOptions>
|
||||
<Version Value="2"/>
|
||||
<IgnoreBinaries Value="False"/>
|
||||
<IncludeFileFilter Value="*.(pas|pp|inc|lfm|lpr|lrs|lpi|lpk|sh|xml)"/>
|
||||
<ExcludeFileFilter Value="*.(bak|ppu|ppw|o|so);*~;backup"/>
|
||||
</PublishOptions>
|
||||
<RunParams>
|
||||
<local>
|
||||
<FormatVersion Value="1"/>
|
||||
<LaunchingApplication PathPlusParams="/usr/X11R6/bin/xterm -T 'Lazarus Run Output' -e $(LazarusDir)/tools/runwait.sh $(TargetCmdLine)"/>
|
||||
</local>
|
||||
</RunParams>
|
||||
<RequiredPackages Count="2">
|
||||
<Item1>
|
||||
<PackageName Value="Printer4Lazarus"/>
|
||||
<MinVersion Build="1" Valid="True"/>
|
||||
</Item1>
|
||||
<Item2>
|
||||
<PackageName Value="LCL"/>
|
||||
</Item2>
|
||||
</RequiredPackages>
|
||||
</ProjectOptions>
|
||||
<CompilerOptions>
|
||||
<Version Value="2"/>
|
||||
<PathDelim Value="\"/>
|
||||
<SearchPaths>
|
||||
<SrcPath Value="$(LazarusDir)\lcl\;$(LazarusDir)\lcl\interfaces\$(LCLWidgetType)\"/>
|
||||
</SearchPaths>
|
||||
<CodeGeneration>
|
||||
<Generate Value="Faster"/>
|
||||
</CodeGeneration>
|
||||
<Linking>
|
||||
<Options>
|
||||
<Win32>
|
||||
<GraphicApplication Value="True"/>
|
||||
</Win32>
|
||||
</Options>
|
||||
</Linking>
|
||||
<Other>
|
||||
<CompilerPath Value="$(CompPath)"/>
|
||||
</Other>
|
||||
</CompilerOptions>
|
||||
<Debugging>
|
||||
<BreakPoints Count="3">
|
||||
<Item1>
|
||||
<Source Value="G:\projects\udf_ib\udf_glob.pas"/>
|
||||
<Line Value="117"/>
|
||||
</Item1>
|
||||
<Item2>
|
||||
<Source Value="G:\projects\udf_ib\udf_glob.pas"/>
|
||||
<Line Value="119"/>
|
||||
</Item2>
|
||||
<Item3>
|
||||
<Source Value="G:\projects\udf_ib\TimeFncs.pas"/>
|
||||
<Line Value="185"/>
|
||||
</Item3>
|
||||
</BreakPoints>
|
||||
</Debugging>
|
||||
</CONFIG>
|
15
components/printers/sample/selectprinter.lpr
Normal file
15
components/printers/sample/selectprinter.lpr
Normal file
@ -0,0 +1,15 @@
|
||||
program selectprinter;
|
||||
|
||||
{$mode objfpc}{$H+}
|
||||
|
||||
uses
|
||||
Interfaces, // this includes the LCL widgetset
|
||||
Forms
|
||||
{ add your units here }, frmselprinter;
|
||||
|
||||
begin
|
||||
Application.Initialize;
|
||||
Application.CreateForm(TForm1, Form1);
|
||||
Application.Run;
|
||||
end.
|
||||
|
593
components/printers/winprinters.pas
Normal file
593
components/printers/winprinters.pas
Normal file
@ -0,0 +1,593 @@
|
||||
{
|
||||
Author: Olivier Guilbaud
|
||||
|
||||
*****************************************************************************
|
||||
* *
|
||||
* This file is part of the Lazarus Component Library (LCL) *
|
||||
* *
|
||||
* See the file COPYING.LCL, included in this distribution, *
|
||||
* for details about the copyright. *
|
||||
* *
|
||||
* This program is distributed in the hope that it will be useful, *
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. *
|
||||
* *
|
||||
*****************************************************************************
|
||||
|
||||
Abstract:
|
||||
This unit provide an access at Printers for Win32
|
||||
|
||||
History
|
||||
04/03/2005 OG - Fix build (from Jesus)
|
||||
- Fix select printer dialog.
|
||||
|
||||
}
|
||||
|
||||
unit WinPrinters;
|
||||
|
||||
{$mode objfpc}{$H+}
|
||||
|
||||
interface
|
||||
|
||||
uses
|
||||
Classes, SysUtils,Printers,LCLType,Forms,Windows,dialogs;
|
||||
|
||||
Type
|
||||
TWinPrinter = class(TPrinter)
|
||||
private
|
||||
fLastHandleType : Byte; //0=None 1=IC 2=DC
|
||||
fDC : HDC;
|
||||
fPrinterHandle : THandle;
|
||||
|
||||
procedure SetIC;
|
||||
procedure SetDC;
|
||||
procedure ClearDC;
|
||||
protected
|
||||
procedure DoBeginDoc; override;
|
||||
procedure DoNewPage; override;
|
||||
procedure DoEndDoc(aAborded : Boolean); override;
|
||||
procedure DoAbort; override;
|
||||
|
||||
procedure DoEnumPrinters(Lst : TStrings); override;
|
||||
procedure DoResetPrintersList; override;
|
||||
|
||||
procedure DoEnumPapers(Lst : TStrings); override;
|
||||
function DoGetDefaultPaperName: string; override;
|
||||
procedure DoSetPaperName(aName : string); override;
|
||||
function DoGetPaperRect(aName : string; Var aPaperRc : TPaperRect) : Integer; override;
|
||||
|
||||
function DoSetPrinter(aName : string): Integer; override;
|
||||
|
||||
function DoGetCopies : Integer; override;
|
||||
procedure DoSetCopies(aValue : Integer); override;
|
||||
function DoGetOrientation: TPrinterOrientation; override;
|
||||
procedure DoSetOrientation(aValue : TPrinterOrientation); override;
|
||||
public
|
||||
constructor Create; override;
|
||||
destructor Destroy; override;
|
||||
|
||||
function ExecuteProperties : Boolean; override;
|
||||
function ExecuteSetup : Boolean; override;
|
||||
end;
|
||||
|
||||
implementation
|
||||
Uses WinUtilPrn;
|
||||
|
||||
Const
|
||||
Win32Orientations: array [TPrinterOrientation] of Integer = (
|
||||
DMORIENT_PORTRAIT, DMORIENT_LANDSCAPE, DMORIENT_PORTRAIT, DMORIENT_LANDSCAPE);
|
||||
|
||||
Type
|
||||
TPrinterDevice = class
|
||||
Name : String;
|
||||
Driver : String;
|
||||
Device : String;
|
||||
Port : String;
|
||||
|
||||
DefaultPaper : Short;
|
||||
|
||||
DevMode: TDeviceMode;
|
||||
end;
|
||||
|
||||
{ TWinPrinter }
|
||||
|
||||
constructor TWinPrinter.Create;
|
||||
begin
|
||||
inherited Create;
|
||||
|
||||
fLastHandleType:=0; //None
|
||||
fPrinterHandle :=0; //None
|
||||
end;
|
||||
|
||||
destructor TWinPrinter.Destroy;
|
||||
begin
|
||||
ClearDC;
|
||||
DoResetPrintersList;
|
||||
|
||||
if fPrinterHandle<>0 then
|
||||
ClosePrinter(fPrinterHandle);
|
||||
|
||||
inherited Destroy;
|
||||
end;
|
||||
|
||||
function TWinPrinter.ExecuteProperties: Boolean;
|
||||
Var NewDevMode : TDeviceMode;
|
||||
PDev : TPrinterDevice;
|
||||
begin
|
||||
if Printers.Count>0 then
|
||||
begin
|
||||
if fPrinterHandle=0 then
|
||||
SetPrinter(Printers.Strings[PrinterIndex]);
|
||||
|
||||
if fPrinterHandle=0 then
|
||||
raise EPrinter.Create('Printer handle not defined');
|
||||
|
||||
PDev:=TPrinterDevice(Printers.Objects[PrinterIndex]);
|
||||
FillChar(NewDevMode,SizeOf(NewDevMode),0);
|
||||
|
||||
Result:=(AdvancedDocumentProperties(0,fPrinterHandle,PChar(PDev.Name),@PDev.DevMode,@NewDevMode)<>0);
|
||||
|
||||
if Result then
|
||||
PDev.DevMode:=NewDevMode;
|
||||
end;
|
||||
end;
|
||||
|
||||
function TWinPrinter.ExecuteSetup: Boolean;
|
||||
var lpp : tagPD;
|
||||
PDev : TPrinterDevice;
|
||||
DevMode : PDeviceMode;
|
||||
DeviceMode : THandle;
|
||||
|
||||
DevNames : PDevNames;
|
||||
St : PChar;
|
||||
begin
|
||||
if Printers.Count>0 then
|
||||
begin
|
||||
FillChar(lpp,SizeOf(lpp),0);
|
||||
|
||||
with lpp do
|
||||
begin
|
||||
lStructSize:=SizeOf(lpp);
|
||||
hInstance:=LCLType.HInstance;
|
||||
Flags:=PD_COLLATE or PD_USEDEVMODECOPIES; //PD_PRINTSETUP ;
|
||||
hWndOwner:=Application.Handle;
|
||||
|
||||
PDev:=TPrinterDevice(Printers.Objects[PrinterIndex]);
|
||||
|
||||
DeviceMode:=GlobalAlloc(GHND,SizeOf(PDev.DevMode)+1);
|
||||
DevMode:=PDeviceMode(GlobalLock(DeviceMode));
|
||||
try
|
||||
DevMode^:=PDev.DevMode;
|
||||
finally
|
||||
GlobalUnLock(DeviceMode);
|
||||
end;
|
||||
|
||||
hDevMode:=DeviceMode;
|
||||
nCopies:=1;
|
||||
try
|
||||
if PrintDlg(lpp) then
|
||||
begin
|
||||
St:='';
|
||||
//Change Selected printer
|
||||
if lpp.hDevNames<>0 then
|
||||
begin
|
||||
DevNames:=PDevNames(GlobalLock(lpp.hDevNames));
|
||||
try
|
||||
St:=PChar(DevNames)+DevNames^.wDeviceOffset;
|
||||
SetPrinter(St);
|
||||
finally
|
||||
GlobalUnlock(lpp.hDevNames);
|
||||
GlobalFree(lpp.hDevNames);
|
||||
end;
|
||||
end;
|
||||
|
||||
if lpp.hDevMode<>0 then
|
||||
begin
|
||||
DevMode:=PDeviceMode(GlobalLock(lpp.hDevMode));
|
||||
try
|
||||
//Set the properties for the selected printer
|
||||
PDev:=TPrinterDevice(Printers.Objects[PrinterIndex]);
|
||||
PDev.DevMode:=DevMode^;
|
||||
finally
|
||||
GlobalUnlock(lpp.hDevMode);
|
||||
GlobalFree(lpp.hDevMode);
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
finally
|
||||
if DeviceMode<>0 then
|
||||
GlobalFree(DeviceMode);
|
||||
|
||||
if hDevNames<>0 then
|
||||
GlobalFree(hDevNames);
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TWinPrinter.SetIC;
|
||||
var PDev : TPrinterDevice;
|
||||
begin
|
||||
if (fLastHandleType=0) and (Printers.Count>0) then
|
||||
begin
|
||||
PDev:=TPrinterDevice(Printers.Objects[PrinterIndex]);
|
||||
fDC:=CreateIC(PChar(PDev.Driver),PChar(PDev.Device),
|
||||
PChar(PDev.Port),@PDev.DevMode);
|
||||
if fDC=0 then
|
||||
raise EPrinter.Create('Invalide printer');
|
||||
if Assigned(Canvas) then
|
||||
Canvas.Handle:=fDC;
|
||||
fLastHandleType:=1;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TWinPrinter.SetDC;
|
||||
var PDev : TPrinterDevice;
|
||||
begin
|
||||
if (fLastHandleType<>2) and (Printers.Count>0) then
|
||||
begin
|
||||
ClearDC;
|
||||
|
||||
PDev:=TPrinterDevice(Printers.Objects[PrinterIndex]);
|
||||
fDC:=CreateDC(PChar(PDev.Driver),PChar(PDev.Device),
|
||||
PChar(PDev.Port),@PDev.DevMode);
|
||||
if fDC=0 then
|
||||
raise EPrinter.Create('Invalide printer');
|
||||
if Assigned(Canvas) then
|
||||
Canvas.Handle:=fDC;
|
||||
fLastHandleType:=2;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TWinPrinter.ClearDC;
|
||||
begin
|
||||
if Assigned(Canvas) then
|
||||
Canvas.Handle:=0;
|
||||
if fDC<>0 then
|
||||
DeleteDC(fDC);
|
||||
fLastHandleType:=0;
|
||||
end;
|
||||
|
||||
procedure TWinPrinter.DoBeginDoc;
|
||||
var Inf: TDocInfo;
|
||||
begin
|
||||
inherited DoBeginDoc;
|
||||
|
||||
if fPrinterHandle=0 then
|
||||
raise EPrinter.Create('Printer handle not defined');
|
||||
|
||||
SetDC;
|
||||
Canvas.Refresh;
|
||||
|
||||
FillChar(Inf,SizeOf(Inf),0);
|
||||
Inf.cbSize:=SizeOf(Inf);
|
||||
Inf.lpszDocName:=PChar(Title);
|
||||
|
||||
StartDoc(fDC,Inf);
|
||||
StartPage(fDC);
|
||||
end;
|
||||
|
||||
procedure TWinPrinter.DoNewPage;
|
||||
begin
|
||||
inherited DoNewPage;
|
||||
|
||||
EndPage(fDC);
|
||||
StartPage(fDC);
|
||||
Canvas.Refresh;
|
||||
end;
|
||||
|
||||
procedure TWinPrinter.DoEndDoc(aAborded: Boolean);
|
||||
begin
|
||||
inherited DoEndDoc(aAborded);
|
||||
|
||||
EndPage(fDC);
|
||||
if not aAborded then
|
||||
WinUtilPrn.EndDoc(fDC);
|
||||
end;
|
||||
|
||||
procedure TWinPrinter.DoAbort;
|
||||
begin
|
||||
inherited DoAbort;
|
||||
AbortDoc(fDC);
|
||||
end;
|
||||
|
||||
|
||||
//Enum all defined printers. First printer it's default
|
||||
procedure TWinPrinter.DoEnumPrinters(Lst: TStrings);
|
||||
Var Flags : DWORD;
|
||||
Level : DWORD;
|
||||
PrtCount : DWORD;
|
||||
Needed : DWORD;
|
||||
Buffer : PChar;
|
||||
InfoPrt : PChar;
|
||||
i : Integer;
|
||||
DefaultPrinter : array[0..79] of Char;
|
||||
LstStr : TStringList;
|
||||
PDev : TPrinterDevice;
|
||||
|
||||
begin
|
||||
Level:=5; //Compatible with all Win32 versions
|
||||
DefaultPrinter:='';
|
||||
|
||||
//Retrieve Default printer
|
||||
Flags:=PRINTER_ENUM_DEFAULT;
|
||||
//Evaluate buffer size
|
||||
Needed:=0;
|
||||
EnumPrinters(Flags,nil,Level,nil,0,Needed,PrtCount);
|
||||
if Needed<>0 then
|
||||
begin
|
||||
GetMem(Buffer,Needed);
|
||||
try
|
||||
//Get default printer
|
||||
if EnumPrinters(Flags,nil,Level,Buffer,Needed,Needed,PrtCount) then
|
||||
DefaultPrinter:=PPRINTER_INFO_5(Buffer)^.pPrinterName;
|
||||
finally
|
||||
FreeMem(Buffer);
|
||||
end;
|
||||
end
|
||||
else
|
||||
begin
|
||||
LstStr:=TStringList.Create;
|
||||
try
|
||||
GetProfileString(PChar('windows'),PChar('device'),PChar(''),DefaultPrinter,SizeOf(DefaultPrinter));
|
||||
LstStr.CommaText:=DefaultPrinter;
|
||||
if LstStr.Count>0 then
|
||||
DefaultPrinter:=LstStr.Strings[0];
|
||||
finally
|
||||
LstStr.Free;
|
||||
end;
|
||||
end;
|
||||
|
||||
Flags:=PRINTER_ENUM_CONNECTIONS or PRINTER_ENUM_LOCAL;
|
||||
Level:=2;
|
||||
|
||||
//Evaluate buffer size
|
||||
Needed:=0;
|
||||
EnumPrinters(Flags,nil,Level,nil,0,Needed,PrtCount);
|
||||
if Needed<>0 then
|
||||
begin
|
||||
GetMem(Buffer,Needed);
|
||||
try
|
||||
//Enumerate Printers
|
||||
if EnumPrinters(Flags,nil,Level,Buffer,Needed,Needed,PrtCount) then
|
||||
begin
|
||||
InfoPrt:=Buffer;
|
||||
for i:=0 to PrtCount-1 do
|
||||
begin
|
||||
if Level=2 then
|
||||
begin
|
||||
PDev:=TPrinterDevice.Create;
|
||||
PDev.Name :=PPRINTER_INFO_2(InfoPrt)^.pPrinterName;
|
||||
PDev.Device :=PPRINTER_INFO_2(InfoPrt)^.PDevMode^.dmDeviceName;
|
||||
PDev.Driver :=PPRINTER_INFO_2(InfoPrt)^.pDriverName;
|
||||
PDev.Port :=PPRINTER_INFO_2(InfoPrt)^.pPortName;
|
||||
PDev.DevMode:=PPRINTER_INFO_2(InfoPrt)^.PDevMode^;
|
||||
PDev.DefaultPaper:=PPRINTER_INFO_2(InfoPrt)^.PDevMode^.dmPaperSize;
|
||||
|
||||
if AnsiCompareText(PDev.Name,DefaultPrinter)<>0 then
|
||||
Lst.AddObject(PDev.Name,PDev)
|
||||
else
|
||||
begin
|
||||
Lst.Insert(0,PDev.Name);
|
||||
Lst.Objects[0]:=PDev;
|
||||
end;
|
||||
Inc(InfoPrt,SizeOf(_PRINTER_INFO_2));
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
finally
|
||||
FreeMem(Buffer);
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TWinPrinter.DoResetPrintersList;
|
||||
var i : Integer;
|
||||
Obj : TObject;
|
||||
begin
|
||||
inherited DoResetPrintersList;
|
||||
|
||||
if Printers.Count>0 then
|
||||
begin
|
||||
for i:=0 to Printers.Count-1 do
|
||||
begin
|
||||
Obj:=Printers.Objects[i];
|
||||
Printers.Objects[i]:=nil;
|
||||
FreeAndNil(Obj);
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TWinPrinter.DoEnumPapers(Lst: TStrings);
|
||||
var Buffer : PChar;
|
||||
PaperN : String;
|
||||
PaperC,i : Integer;
|
||||
PDev : TPrinterDevice;
|
||||
ArPapers : Array[0..255] of Word;
|
||||
begin
|
||||
inherited DoEnumPapers(Lst);
|
||||
|
||||
if (Printers.Count>0) then
|
||||
begin
|
||||
PDev:=TPrinterDevice(Printers.Objects[PrinterIndex]);
|
||||
|
||||
if fPrinterHandle=0 then
|
||||
SetPrinter(Printers.Strings[PrinterIndex]);
|
||||
|
||||
if fPrinterHandle=0 then
|
||||
raise EPrinter.Create('Printer handle not defined');
|
||||
|
||||
//Reteive the supported papers
|
||||
PaperC:=0;
|
||||
GetMem(Buffer,64*255);
|
||||
try
|
||||
PaperC:=DeviceCapabilities(PChar(Pdev.Name),PCHar(PDev.Port),
|
||||
DC_PAPERNAMES,Buffer,@PDev.DevMode);
|
||||
for i:=0 to PaperC-1 do
|
||||
begin
|
||||
PaperN:=StrPas(Buffer+i*64);
|
||||
Lst.Add(PaperN);
|
||||
end;
|
||||
finally
|
||||
FreeMem(Buffer);
|
||||
end;
|
||||
|
||||
//Retreive the code of papers
|
||||
FillChar(ArPapers,SizeOf(ArPapers),0);
|
||||
PaperC:=DeviceCapabilities(PChar(Pdev.Name),PCHar(PDev.Port),
|
||||
DC_PAPERS,@ArPapers,@PDev.DevMode);
|
||||
for i:=0 to PaperC-1 do
|
||||
Lst.Objects[i]:=TObject(Pointer(Integer(ArPapers[i])));
|
||||
end;
|
||||
|
||||
end;
|
||||
|
||||
function TWinPrinter.DoGetDefaultPaperName: string;
|
||||
var i : Integer;
|
||||
PDev : TPrinterDevice;
|
||||
begin
|
||||
Result:=inherited DoGetDefaultPaperName;
|
||||
|
||||
if (Printers.Count>0) then
|
||||
begin
|
||||
PDev:=TPrinterDevice(Printers.Objects[PrinterIndex]);
|
||||
|
||||
i:=PaperSize.SupportedPapers.IndexOfObject(TObject(Pointer(Integer(PDev.DefaultPaper))));
|
||||
if i<>-1 then
|
||||
Result:=PaperSize.SupportedPapers.Strings[i];
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TWinPrinter.DoSetPaperName(aName: string);
|
||||
var i : Integer;
|
||||
PDev : TPrinterDevice;
|
||||
j : SHORT;
|
||||
begin
|
||||
inherited DoSetPaperName(aName);
|
||||
|
||||
if (Printers.Count>0) then
|
||||
begin
|
||||
ClearDC;
|
||||
|
||||
PDev:=TPrinterDevice(Printers.Objects[PrinterIndex]);
|
||||
|
||||
i:=PaperSize.SupportedPapers.IndexOf(aName);
|
||||
if i<>-1 then
|
||||
begin
|
||||
j:=SHORT(Pointer(PaperSize.SupportedPapers.Objects[i]));
|
||||
PDev.DevMode.dmPaperSize:=j;
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
|
||||
function TWinPrinter.DoGetPaperRect(aName: string; var aPaperRc: TPaperRect): Integer;
|
||||
var NSize, i : Integer;
|
||||
PDev : TPrinterDevice;
|
||||
ArSizes : Array[0..255] of TPoint;
|
||||
begin
|
||||
Result:=Inherited DoGetPaperRect(aName,aPaperRc);
|
||||
|
||||
if (Printers.Count>0) then
|
||||
begin
|
||||
PDev:=TPrinterDevice(Printers.Objects[PrinterIndex]);
|
||||
|
||||
//Retreive the Width and Height of aName paper
|
||||
FillChar(ArSizes,SizeOf(ArSizes),0);
|
||||
NSize:=DeviceCapabilities(PChar(Pdev.Name),PChar(PDev.Port),
|
||||
DC_PAPERSIZE,@ArSizes,@PDev.DevMode);
|
||||
i:=PaperSize.SupportedPapers.IndexOf(aName);
|
||||
if (i>=0) and (i<NSize) and (NSize<>0) then
|
||||
begin
|
||||
aPaperRc.PhysicalRect:=Classes.Rect(0,0,ArSizes[i].X,ArSizes[i].Y);
|
||||
aPaperRc.WorkRect:=Classes.Rect(0,0,ArSizes[i].X,ArSizes[i].Y);
|
||||
|
||||
Result:=1;
|
||||
end;
|
||||
end;
|
||||
|
||||
end;
|
||||
|
||||
function TWinPrinter.DoSetPrinter(aName: string): Integer;
|
||||
var i : Integer;
|
||||
PDev : TPrinterDevice;
|
||||
begin
|
||||
Result:=inherited DoSetPrinter(aName);
|
||||
|
||||
i:=Printers.IndexOf(aName);
|
||||
if i<>-1 then
|
||||
begin
|
||||
ClearDC;
|
||||
|
||||
PDev:=TPrinterDevice(Printers.Objects[PrinterIndex]);
|
||||
if fPrinterHandle<>0 then
|
||||
ClosePrinter(fPrinterHandle);
|
||||
|
||||
if OpenPrinter(PChar(PDev.Name),fPrinterHandle,nil) then
|
||||
Result:=i;
|
||||
end;
|
||||
end;
|
||||
|
||||
function TWinPrinter.DoGetCopies: Integer;
|
||||
var PDev : TPrinterDevice;
|
||||
begin
|
||||
Result:=inherited DoGetCopies;
|
||||
|
||||
if (Printers.Count>0) then
|
||||
begin
|
||||
PDev:=TPrinterDevice(Printers.Objects[PrinterIndex]);
|
||||
|
||||
if PDev.DevMode.dmCopies<>0 then
|
||||
Result:=PDev.DevMode.dmCopies;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TWinPrinter.DoSetCopies(aValue: Integer);
|
||||
var PDev : TPrinterDevice;
|
||||
begin
|
||||
inherited DoSetCopies(aValue);
|
||||
|
||||
if (Printers.Count>0) and (aValue>0) then
|
||||
begin
|
||||
PDev:=TPrinterDevice(Printers.Objects[PrinterIndex]);
|
||||
|
||||
ClearDC;
|
||||
PDev.DevMode.dmCopies:=aValue;
|
||||
end;
|
||||
end;
|
||||
|
||||
function TWinPrinter.DoGetOrientation: TPrinterOrientation;
|
||||
var PDev : TPrinterDevice;
|
||||
begin
|
||||
Result:=inherited DoGetOrientation;
|
||||
|
||||
if (Printers.Count>0) then
|
||||
begin
|
||||
PDev:=TPrinterDevice(Printers.Objects[PrinterIndex]);
|
||||
|
||||
Case PDev.DevMode.dmOrientation of
|
||||
DMORIENT_PORTRAIT : Result:=poPortrait;
|
||||
DMORIENT_LANDSCAPE : Result:=poLandscape;
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TWinPrinter.DoSetOrientation(aValue: TPrinterOrientation);
|
||||
var PDev : TPrinterDevice;
|
||||
begin
|
||||
inherited DoSetOrientation(aValue);
|
||||
|
||||
if (Printers.Count>0) then
|
||||
begin
|
||||
PDev:=TPrinterDevice(Printers.Objects[PrinterIndex]);
|
||||
|
||||
ClearDC;
|
||||
PDev.DevMode.dmOrientation:=Win32Orientations[aValue];
|
||||
end;
|
||||
end;
|
||||
|
||||
|
||||
INITIALIZATION
|
||||
Printer:=TWinPrinter.Create;
|
||||
|
||||
end.
|
||||
|
252
components/printers/winutilprn.pas
Normal file
252
components/printers/winutilprn.pas
Normal file
@ -0,0 +1,252 @@
|
||||
{
|
||||
Author: Olivier Guilbaud
|
||||
|
||||
*****************************************************************************
|
||||
* *
|
||||
* This file is part of the Lazarus Component Library (LCL) *
|
||||
* *
|
||||
* See the file COPYING.LCL, included in this distribution, *
|
||||
* for details about the copyright. *
|
||||
* *
|
||||
* This program is distributed in the hope that it will be useful, *
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. *
|
||||
* *
|
||||
*****************************************************************************
|
||||
|
||||
Abstract:
|
||||
This unit provide an access at Printers spool and other functions for manage
|
||||
the printers on Win32
|
||||
|
||||
Documentations
|
||||
- Wine project
|
||||
- Microsoft MSDN Web
|
||||
}
|
||||
|
||||
unit WinUtilPrn;
|
||||
|
||||
{$mode objfpc}{$H+}
|
||||
|
||||
interface
|
||||
|
||||
{$IFNDEF WIN32}
|
||||
//This unit it's reserved to Win32
|
||||
{$ENDIF}
|
||||
|
||||
uses
|
||||
Classes, SysUtils,LCLType;
|
||||
|
||||
const
|
||||
{$i winutilprnconst.inc}
|
||||
|
||||
LibWinSpool = 'winspool.drv';
|
||||
|
||||
type
|
||||
PDevNames = ^tagDEVNAMES;
|
||||
tagDEVNAMES = record
|
||||
wDriverOffset: Word;
|
||||
wDeviceOffset: Word;
|
||||
wOutputOffset: Word;
|
||||
wDefault: Word;
|
||||
end;
|
||||
|
||||
TFcntHook = function(Wnd: HWND; uiMsg: UINT; wParam: WPARAM; lParam: LPARAM): UINT stdcall;
|
||||
|
||||
tagPD=packed Record
|
||||
lStructSize : DWORD;
|
||||
hWndOwner : HWND;
|
||||
hDevMode : HGLOBAL;
|
||||
hDevNames : HGLOBAL;
|
||||
hDC : HDC;
|
||||
Flags : DWORD;
|
||||
nFromPage : Word;
|
||||
nToPage : Word;
|
||||
nMinPage : Word;
|
||||
nMaxPage : Word;
|
||||
nCopies : Word;
|
||||
hInstance : HINST;
|
||||
lCustData : LPARAM;
|
||||
lpfnPrintHook: TFcntHook;
|
||||
lpfnSetupHook: TFcntHook;
|
||||
lpPrintTemplateName: PChar;
|
||||
lpSetupTemplateName: PChar;
|
||||
hPrintTemplate : HGLOBAL;
|
||||
hSetupTemplate : HGLOBAL;
|
||||
end;
|
||||
|
||||
PDeviceMode = ^TDeviceMode;
|
||||
TDeviceMode = packed Record
|
||||
dmDeviceName : array[0..31] of AnsiChar;
|
||||
dmSpecVersion : Word;
|
||||
dmDriverVersion : Word;
|
||||
dmSize : Word;
|
||||
dmDriverExtra : Word;
|
||||
dmFields : DWORD;
|
||||
dmOrientation : SHORT;
|
||||
dmPaperSize : SHORT;
|
||||
dmPaperLength : SHORT;
|
||||
dmPaperWidth : SHORT;
|
||||
dmScale : SHORT;
|
||||
dmCopies : SHORT;
|
||||
dmDefaultSource : SHORT;
|
||||
dmPrintQuality : SHORT;
|
||||
dmColor : SHORT;
|
||||
dmDuplex : SHORT;
|
||||
dmYResolution : SHORT;
|
||||
dmTTOption : SHORT;
|
||||
dmCollate : SHORT;
|
||||
dmFormName : Array[0..31] of AnsiChar;
|
||||
dmLogPixels : Word;
|
||||
dmBitsPerPel : DWORD;
|
||||
dmPelsWidth : DWORD;
|
||||
dmPelsHeight : DWORD;
|
||||
dmDisplayFlags : DWORD;
|
||||
dmDisplayFrequency: DWORD;
|
||||
dmICMMethod : DWORD;
|
||||
dmICMIntent : DWORD;
|
||||
dmMediaType : DWORD;
|
||||
dmDitherType : DWORD;
|
||||
dmICCManufacturer : DWORD;
|
||||
dmICCModel : DWORD;
|
||||
dmPanningWidth : DWORD;
|
||||
dmPanningHeight : DWORD;
|
||||
end;
|
||||
|
||||
PPrinterDefaults = ^_PRINTER_DEFAULTS;
|
||||
_PRINTER_DEFAULTS = record
|
||||
pDatatype : PChar;
|
||||
pDevMode : PDeviceMode;
|
||||
DesiredAccess: DWord;
|
||||
end;
|
||||
|
||||
//Size and ImageableArea Specifies the width and height,
|
||||
//in thousandths of millimeters, of the form
|
||||
PFORM_INFO_1 =^_FORM_INFO_1;
|
||||
_FORM_INFO_1 = Record
|
||||
Flags : DWORD;
|
||||
pName : PChar;
|
||||
Size : TSize;
|
||||
ImageableArea: TRect;
|
||||
end;
|
||||
|
||||
TDocInfo = record
|
||||
cbSize : Integer;
|
||||
lpszDocName : PChar;
|
||||
lpszOutput : PChar;
|
||||
lpszDatatype: PChar;
|
||||
fwType : DWORD;
|
||||
end;
|
||||
|
||||
PPRINTER_INFO_1 = ^_PRINTER_INFO_1;
|
||||
_PRINTER_INFO_1 = Record
|
||||
Flags : DWORD;
|
||||
pDescription : PChar;
|
||||
pName : PChar;
|
||||
pComment : PChar;
|
||||
end;
|
||||
|
||||
PPRINTER_INFO_2 = ^_PRINTER_INFO_2;
|
||||
_PRINTER_INFO_2 = Record
|
||||
pServerName : PChar;
|
||||
pPrinterName : PChar;
|
||||
pShareName : PChar;
|
||||
pPortName : PChar;
|
||||
pDriverName : PChar;
|
||||
pComment : PChar;
|
||||
pLocation : PChar;
|
||||
pDevMode : PDeviceMode;
|
||||
pSepFile : PChar;
|
||||
pPrintProcessor : PChar;
|
||||
pDatatype : PChar;
|
||||
pParameters : PChar;
|
||||
pSecurityDescriptor : Pointer;
|
||||
Attributes : DWORD;
|
||||
Priority : DWORD;
|
||||
DefaultPriority : DWORD;
|
||||
StartTime : DWORD;
|
||||
UntilTime : DWORD;
|
||||
Status : DWORD;
|
||||
cJobs : DWORD;
|
||||
AveragePPM : DWORD;
|
||||
end;
|
||||
|
||||
PPRINTER_INFO_4 = ^_PRINTER_INFO_4;
|
||||
_PRINTER_INFO_4 = Record
|
||||
pPrinterName : PChar;
|
||||
pServerName : PChar;
|
||||
Attributes : DWORD;
|
||||
end;
|
||||
|
||||
PPRINTER_INFO_5 = ^_PRINTER_INFO_5;
|
||||
_PRINTER_INFO_5 = Record
|
||||
pPrinterName : PChar;
|
||||
pPortName : PChar;
|
||||
Attributes : DWORD;
|
||||
DeviceNotSelectedTimeout : DWORD;
|
||||
TransmissionRetryTimeout : DWORD;
|
||||
end;
|
||||
|
||||
|
||||
function OpenPrinter(pPrinterName : PChar; // printer or server name
|
||||
var phPrinter : THandle; // printer or server handle
|
||||
pDefaults : PPrinterDefaults // printer defaults
|
||||
) : BOOL; stdCall; external LibWinSpool name 'OpenPrinterA';
|
||||
|
||||
function ClosePrinter(hPrinter : THandle //handle to printer object
|
||||
) : BOOL; stdCall; external LibWinSpool name 'ClosePrinter';
|
||||
|
||||
function EnumPrinters(Flags: DWORD; //Printer objet type
|
||||
Name : PChar; //Name of printer object
|
||||
Level: DWORD; //Information level
|
||||
pPrinterEnum: Pointer; //Printer information buffer
|
||||
cbBuf: DWORD; //Size of printer information buffer
|
||||
var pcbNeeded, //Bytes recieved or required
|
||||
pcReturned: DWORD //Number of printers enumerated
|
||||
): BOOL; stdcall; external LibWinSpool name 'EnumPrintersA';
|
||||
{Unsuported on W95/98/Me :o(
|
||||
Function EnumForms(
|
||||
hPrinter : THandle; // handle to printer object
|
||||
Level : DWORD; // data level
|
||||
pForm : Pointer; // form information buffer
|
||||
cbBuf : DWord; // size of form information buffer
|
||||
var pcbNeeded : DWORD; // bytes received or required
|
||||
var pcReturned: DWORD // number of forms received
|
||||
|
||||
): BOOL; stdcall; external LibWinSpool name 'EnumFormsA';}
|
||||
|
||||
{Function not compatible with all versions of Windows
|
||||
function GetDefaultPrinter(
|
||||
pszBuffer : PChar; // printer name buffer
|
||||
var pcchBuffer : DWord // size of name buffer
|
||||
) : BOOL stdcall; external LibWinSpool name 'GetDefaultPrinterA';
|
||||
}
|
||||
|
||||
function AdvancedDocumentProperties(
|
||||
hWnd : HWND; // handle to parent window
|
||||
hPrinter : THandle; // handle to printer object
|
||||
pDeviceName : PChar; // driver name
|
||||
pDevModeOutput : PDeviceMode; // modified device mode data
|
||||
pDevModeInput : PDeviceMode // original device mode data
|
||||
): Longint; stdcall; external LibWinSpool name 'AdvancedDocumentPropertiesA';
|
||||
|
||||
function DeviceCapabilities(pDevice, pPort: PChar; fwCapability: Word; pOutput: PChar;
|
||||
DevMode: PDeviceMode): Integer; stdcall; external LibWinSpool name 'DeviceCapabilitiesA';
|
||||
|
||||
function GetProfileString(lpAppName:PChar; lpKeyName:PChar; lpDefault:PChar; lpReturnedString:PChar; nSize:DWORD):DWORD; stdcall; external 'kernel32' name 'GetProfileStringA';
|
||||
|
||||
function PrintDlg(var lppd : tagPD): BOOL; stdcall; external 'comdlg32.dll' name 'PrintDlgA';
|
||||
function CommDlgExtendedError: DWORD; stdcall; external 'comdlg32.dll' name 'CommDlgExtendedError';
|
||||
|
||||
function CreateIC(lpszDriver, lpszDevice, lpszOutput: PChar; lpdvmInit: PDeviceMode): HDC; stdcall; external 'gdi32.dll' name 'CreateICA';
|
||||
function CreateDC(lpszDriver, lpszDevice, lpszOutput: PChar; lpdvmInit: PDeviceMode): HDC; stdcall; external 'gdi32.dll' name 'CreateDCA';
|
||||
function DeleteDC(DC: HDC): BOOL; stdcall; external 'gdi32.dll' name 'DeleteDC';
|
||||
function StartDoc(DC: HDC; Inf : TDocInfo): Integer; stdcall; external 'gdi32.dll' name 'StartDocA';
|
||||
function EndDoc(DC: HDC): Integer; stdcall; external 'gdi32.dll' name 'EndDoc';
|
||||
function StartPage(DC: HDC): Integer; stdcall; external 'gdi32.dll' name 'StartPage';
|
||||
function EndPage(DC: HDC): Integer; stdcall; external 'gdi32.dll' name 'EndPage';
|
||||
function AbortDoc(DC: HDC): Integer; stdcall; external 'gdi32.dll' name 'AbortDoc';
|
||||
|
||||
implementation
|
||||
|
||||
end.
|
||||
|
249
components/printers/winutilprnconst.inc
Normal file
249
components/printers/winutilprnconst.inc
Normal file
@ -0,0 +1,249 @@
|
||||
//WinSpool consts
|
||||
|
||||
//Commands printer
|
||||
PRINTER_CONTROL_PAUSE = 1; //Pauses the printer
|
||||
PRINTER_CONTROL_RESUME = 2; //Resumes a paused printer
|
||||
PRINTER_CONTROL_PURGE = 3; //Deletes all print jobs in the printer
|
||||
PRINTER_CONTROL_SET_STATUS = 4; //Sets the printer status.
|
||||
|
||||
//Status of Printer
|
||||
PRINTER_STATUS_PAUSED = $00000001; //The printer is paused
|
||||
PRINTER_STATUS_ERROR = $00000002; //The printer is in an error state
|
||||
PRINTER_STATUS_PENDING_DELETION = $00000004; //The printer is being deleted
|
||||
PRINTER_STATUS_PAPER_JAM = $00000008; //Paper is jammed in the printer
|
||||
PRINTER_STATUS_PAPER_OUT = $00000010; //The printer is out of paper
|
||||
PRINTER_STATUS_MANUAL_FEED = $00000020; //The printer is in a manual feed state
|
||||
PRINTER_STATUS_PAPER_PROBLEM = $00000040; //The printer has a paper problem
|
||||
PRINTER_STATUS_OFFLINE = $00000080; //The printer is offline
|
||||
PRINTER_STATUS_IO_ACTIVE = $00000100; //The printer is in an active input/output state
|
||||
PRINTER_STATUS_BUSY = $00000200; //The printer is busy
|
||||
PRINTER_STATUS_PRINTING = $00000400; //The printer is printing
|
||||
PRINTER_STATUS_OUTPUT_BIN_FULL = $00000800; //The printer's output bin is full
|
||||
PRINTER_STATUS_NOT_AVAILABLE = $00001000; //The printer is not available for printing
|
||||
PRINTER_STATUS_WAITING = $00002000; //The printer is waiting
|
||||
PRINTER_STATUS_PROCESSING = $00004000; //The printer is processing a print job
|
||||
PRINTER_STATUS_INITIALIZING = $00008000; //The printer is initializing
|
||||
PRINTER_STATUS_WARMING_UP = $00010000; //The printer is warming up
|
||||
PRINTER_STATUS_TONER_LOW = $00020000; //The printer is low on toner
|
||||
PRINTER_STATUS_NO_TONER = $00040000; //The printer is out of toner
|
||||
PRINTER_STATUS_PAGE_PUNT = $00080000; //The printer cannot print the current page.
|
||||
PRINTER_STATUS_USER_INTERVENTION = $00100000; //The printer has an error that requires the user to do something
|
||||
PRINTER_STATUS_OUT_OF_MEMORY = $00200000; //The printer has run out of memory
|
||||
PRINTER_STATUS_DOOR_OPEN = $00400000; //The printer door is open
|
||||
PRINTER_STATUS_SERVER_UNKNOWN = $00800000; //The printer status is unknown
|
||||
PRINTER_STATUS_POWER_SAVE = $01000000; //The printer is in power save mode
|
||||
|
||||
//Attribute of printer
|
||||
PRINTER_ATTRIBUTE_QUEUED = $00000001; //if set, the printer spools and starts printing after the last page is spooled. If not set and PRINTER_ATTRIBUTE_DIRECT is not set, the printer spools and prints while spooling
|
||||
PRINTER_ATTRIBUTE_DIRECT = $00000002; //Job is sent directly to the printer (it is not spooled).
|
||||
PRINTER_ATTRIBUTE_DEFAULT = $00000004; //Win9x/Me: Indicates the printer is the default printer in the system
|
||||
PRINTER_ATTRIBUTE_SHARED = $00000008; //Printer is shared
|
||||
PRINTER_ATTRIBUTE_NETWORK = $00000010; //Printer is a network printer connection
|
||||
PRINTER_ATTRIBUTE_HIDDEN = $00000020; //Reserved
|
||||
PRINTER_ATTRIBUTE_LOCAL = $00000040; //Printer is a local printer
|
||||
PRINTER_ATTRIBUTE_ENABLE_DEVQ = $00000080;
|
||||
PRINTER_ATTRIBUTE_KEEPPRINTEDJOBS = $00000100; //If set, jobs are kept after they are printed. If unset, jobs are deleted
|
||||
PRINTER_ATTRIBUTE_DO_COMPLETE_FIRST = $00000200; //If set and printer is set for print-while-spooling, any jobs that have completed spooling are scheduled to print before jobs that have not completed spooling
|
||||
PRINTER_ATTRIBUTE_WORK_OFFLINE = $00000400; //Win9x/Me: Indicates whether the printer is currently connected. If the printer is not currently connected, print jobs will continue to spool.
|
||||
PRINTER_ATTRIBUTE_ENABLE_BIDI = $00000800; //Win9x/Me: Indicates whether bi-directional communications are enabled for the printer
|
||||
PRINTER_ATTRIBUTE_RAW_ONLY = $00001000; //Indicates that only raw data type print jobs can be spooled
|
||||
|
||||
|
||||
//Jobs priorities of printer
|
||||
NO_PRIORITY = 0; //no priority
|
||||
MAX_PRIORITY = 99; //Maximum priority value
|
||||
MIN_PRIORITY = 1; //Minimum priority value
|
||||
DEF_PRIORITY = 1; //Default value of priority
|
||||
|
||||
JOB_CONTROL_PAUSE = 1;
|
||||
JOB_CONTROL_RESUME = 2;
|
||||
JOB_CONTROL_CANCEL = 3;
|
||||
JOB_CONTROL_RESTART = 4;
|
||||
JOB_CONTROL_DELETE = 5;
|
||||
JOB_CONTROL_SENT_TO_PRINTER = 6;
|
||||
JOB_CONTROL_LAST_PAGE_EJECTED = 7;
|
||||
|
||||
JOB_STATUS_PAUSED = $00000001;
|
||||
JOB_STATUS_ERROR = $00000002;
|
||||
JOB_STATUS_DELETING = $00000004;
|
||||
JOB_STATUS_SPOOLING = $00000008;
|
||||
JOB_STATUS_PRINTING = $00000010;
|
||||
JOB_STATUS_OFFLINE = $00000020;
|
||||
JOB_STATUS_PAPEROUT = $00000040;
|
||||
JOB_STATUS_PRINTED = $00000080;
|
||||
JOB_STATUS_DELETED = $00000100;
|
||||
JOB_STATUS_BLOCKED_DEVQ = $00000200;
|
||||
JOB_STATUS_USER_INTERVENTION = $00000400;
|
||||
JOB_STATUS_RESTART = $00000800;
|
||||
|
||||
JOB_POSITION_UNSPECIFIED = 0;
|
||||
|
||||
DI_CHANNEL = 1;
|
||||
DI_READ_SPOOL_JOB = 3;
|
||||
|
||||
FORM_USER = $00000000;
|
||||
FORM_BUILTIN = $00000001;
|
||||
FORM_PRINTER = $00000002;
|
||||
|
||||
PORT_TYPE_WRITE = $0001;
|
||||
PORT_TYPE_READ = $0002;
|
||||
PORT_TYPE_REDIRECTED = $0004;
|
||||
PORT_TYPE_NET_ATTACHED = $0008;
|
||||
|
||||
PORT_STATUS_TYPE_ERROR = 1;
|
||||
PORT_STATUS_TYPE_WARNING= 2;
|
||||
PORT_STATUS_TYPE_INFO = 3;
|
||||
|
||||
PORT_STATUS_OFFLINE = 1;
|
||||
PORT_STATUS_PAPER_JAM = 2;
|
||||
PORT_STATUS_PAPER_OUT = 3;
|
||||
PORT_STATUS_OUTPUT_BIN_FULL = 4;
|
||||
PORT_STATUS_PAPER_PROBLEM = 5;
|
||||
PORT_STATUS_NO_TONER = 6;
|
||||
PORT_STATUS_DOOR_OPEN = 7;
|
||||
PORT_STATUS_USER_INTERVENTION= 8;
|
||||
PORT_STATUS_OUT_OF_MEMORY = 9;
|
||||
PORT_STATUS_TONER_LOW = 10;
|
||||
PORT_STATUS_WARMING_UP = 11;
|
||||
PORT_STATUS_POWER_SAVE = 12;
|
||||
|
||||
PRINTER_ENUM_DEFAULT = $00000001;
|
||||
PRINTER_ENUM_LOCAL = $00000002;
|
||||
PRINTER_ENUM_CONNECTIONS = $00000004;
|
||||
PRINTER_ENUM_FAVORITE = $00000004;
|
||||
PRINTER_ENUM_NAME = $00000008;
|
||||
PRINTER_ENUM_REMOTE = $00000010;
|
||||
PRINTER_ENUM_SHARED = $00000020;
|
||||
PRINTER_ENUM_NETWORK = $00000040;
|
||||
PRINTER_ENUM_EXPAND = $00004000;
|
||||
PRINTER_ENUM_CONTAINER = $00008000;
|
||||
PRINTER_ENUM_ICONMASK = $00ff0000;
|
||||
PRINTER_ENUM_ICON1 = $00010000;
|
||||
PRINTER_ENUM_ICON2 = $00020000;
|
||||
PRINTER_ENUM_ICON3 = $00040000;
|
||||
PRINTER_ENUM_ICON4 = $00080000;
|
||||
PRINTER_ENUM_ICON5 = $00100000;
|
||||
PRINTER_ENUM_ICON6 = $00200000;
|
||||
PRINTER_ENUM_ICON7 = $00400000;
|
||||
PRINTER_ENUM_ICON8 = $00800000;
|
||||
|
||||
PRINTER_NOTIFY_TYPE = $00;
|
||||
JOB_NOTIFY_TYPE = $01;
|
||||
|
||||
PRINTER_NOTIFY_FIELD_SERVER_NAME = $00;
|
||||
PRINTER_NOTIFY_FIELD_PRINTER_NAME = $01;
|
||||
PRINTER_NOTIFY_FIELD_SHARE_NAME = $02;
|
||||
PRINTER_NOTIFY_FIELD_PORT_NAME = $03;
|
||||
PRINTER_NOTIFY_FIELD_DRIVER_NAME = $04;
|
||||
PRINTER_NOTIFY_FIELD_COMMENT = $05;
|
||||
PRINTER_NOTIFY_FIELD_LOCATION = $06;
|
||||
PRINTER_NOTIFY_FIELD_DEVMODE = $07;
|
||||
PRINTER_NOTIFY_FIELD_SEPFILE = $08;
|
||||
PRINTER_NOTIFY_FIELD_PRINT_PROCESSOR = $09;
|
||||
PRINTER_NOTIFY_FIELD_PARAMETERS = $0A;
|
||||
PRINTER_NOTIFY_FIELD_DATATYPE = $0B;
|
||||
PRINTER_NOTIFY_FIELD_SECURITY_DESCRIPTOR= $0C;
|
||||
PRINTER_NOTIFY_FIELD_ATTRIBUTES = $0D;
|
||||
PRINTER_NOTIFY_FIELD_PRIORITY = $0E;
|
||||
PRINTER_NOTIFY_FIELD_DEFAULT_PRIORITY = $0F;
|
||||
PRINTER_NOTIFY_FIELD_START_TIME = $10;
|
||||
PRINTER_NOTIFY_FIELD_UNTIL_TIME = $11;
|
||||
PRINTER_NOTIFY_FIELD_STATUS = $12;
|
||||
PRINTER_NOTIFY_FIELD_STATUS_STRING = $13;
|
||||
PRINTER_NOTIFY_FIELD_CJOBS = $14;
|
||||
PRINTER_NOTIFY_FIELD_AVERAGE_PPM = $15;
|
||||
PRINTER_NOTIFY_FIELD_TOTAL_PAGES = $16;
|
||||
PRINTER_NOTIFY_FIELD_PAGES_PRINTED = $17;
|
||||
PRINTER_NOTIFY_FIELD_TOTAL_BYTES = $18;
|
||||
PRINTER_NOTIFY_FIELD_BYTES_PRINTED = $19;
|
||||
|
||||
JOB_NOTIFY_FIELD_PRINTER_NAME = $00;
|
||||
JOB_NOTIFY_FIELD_MACHINE_NAME = $01;
|
||||
JOB_NOTIFY_FIELD_PORT_NAME = $02;
|
||||
JOB_NOTIFY_FIELD_USER_NAME = $03;
|
||||
JOB_NOTIFY_FIELD_NOTIFY_NAME = $04;
|
||||
JOB_NOTIFY_FIELD_DATATYPE = $05;
|
||||
JOB_NOTIFY_FIELD_PRINT_PROCESSOR = $06;
|
||||
JOB_NOTIFY_FIELD_PARAMETERS = $07;
|
||||
JOB_NOTIFY_FIELD_DRIVER_NAME = $08;
|
||||
JOB_NOTIFY_FIELD_DEVMODE = $09;
|
||||
JOB_NOTIFY_FIELD_STATUS = $0A;
|
||||
JOB_NOTIFY_FIELD_STATUS_STRING = $0B;
|
||||
JOB_NOTIFY_FIELD_SECURITY_DESCRIPTOR = $0C;
|
||||
JOB_NOTIFY_FIELD_DOCUMENT = $0D;
|
||||
JOB_NOTIFY_FIELD_PRIORITY = $0E;
|
||||
JOB_NOTIFY_FIELD_POSITION = $0F;
|
||||
JOB_NOTIFY_FIELD_SUBMITTED = $10;
|
||||
JOB_NOTIFY_FIELD_START_TIME = $11;
|
||||
JOB_NOTIFY_FIELD_UNTIL_TIME = $12;
|
||||
JOB_NOTIFY_FIELD_TIME = $13;
|
||||
JOB_NOTIFY_FIELD_TOTAL_PAGES = $14;
|
||||
JOB_NOTIFY_FIELD_PAGES_PRINTED = $15;
|
||||
JOB_NOTIFY_FIELD_TOTAL_BYTES = $16;
|
||||
JOB_NOTIFY_FIELD_BYTES_PRINTED = $17;
|
||||
|
||||
PRINTER_NOTIFY_OPTIONS_REFRESH = $01;
|
||||
PRINTER_NOTIFY_INFO_DISCARDED = $01;
|
||||
|
||||
PRINTER_CHANGE_ADD_PRINTER = $00000001;
|
||||
PRINTER_CHANGE_SET_PRINTER = $00000002;
|
||||
PRINTER_CHANGE_DELETE_PRINTER = $00000004;
|
||||
PRINTER_CHANGE_FAILED_CONNECTION_PRINTER= $00000008;
|
||||
PRINTER_CHANGE_PRINTER = $000000FF;
|
||||
PRINTER_CHANGE_ADD_JOB = $00000100;
|
||||
PRINTER_CHANGE_SET_JOB = $00000200;
|
||||
PRINTER_CHANGE_DELETE_JOB = $00000400;
|
||||
PRINTER_CHANGE_WRITE_JOB = $00000800;
|
||||
PRINTER_CHANGE_JOB = $0000FF00;
|
||||
PRINTER_CHANGE_ADD_FORM = $00010000;
|
||||
PRINTER_CHANGE_SET_FORM = $00020000;
|
||||
PRINTER_CHANGE_DELETE_FORM = $00040000;
|
||||
PRINTER_CHANGE_FORM = $00070000;
|
||||
PRINTER_CHANGE_ADD_PORT = $00100000;
|
||||
PRINTER_CHANGE_CONFIGURE_PORT = $00200000;
|
||||
PRINTER_CHANGE_DELETE_PORT = $00400000;
|
||||
PRINTER_CHANGE_PORT = $00700000;
|
||||
PRINTER_CHANGE_ADD_PRINT_PROCESSOR = $01000000;
|
||||
PRINTER_CHANGE_DELETE_PRINT_PROCESSOR = $04000000;
|
||||
PRINTER_CHANGE_PRINT_PROCESSOR = $07000000;
|
||||
PRINTER_CHANGE_ADD_PRINTER_DRIVER = $10000000;
|
||||
PRINTER_CHANGE_SET_PRINTER_DRIVER = $20000000;
|
||||
PRINTER_CHANGE_DELETE_PRINTER_DRIVER = $40000000;
|
||||
PRINTER_CHANGE_PRINTER_DRIVER = $70000000;
|
||||
PRINTER_CHANGE_TIMEOUT = $80000000;
|
||||
PRINTER_CHANGE_ALL = $7777FFFF;
|
||||
|
||||
PRINTER_ERROR_INFORMATION = $80000000;
|
||||
PRINTER_ERROR_WARNING = $40000000;
|
||||
PRINTER_ERROR_SEVERE = $20000000;
|
||||
PRINTER_ERROR_OUTOFPAPER = $00000001;
|
||||
PRINTER_ERROR_JAM = $00000002;
|
||||
PRINTER_ERROR_OUTOFTONER = $00000004;
|
||||
|
||||
//PrintDlg Flags
|
||||
PD_ALLPAGES = $00000000;
|
||||
PD_SELECTION = $00000001;
|
||||
PD_PAGENUMS = $00000002;
|
||||
PD_NOSELECTION = $00000004;
|
||||
PD_NOPAGENUMS = $00000008;
|
||||
PD_COLLATE = $00000010;
|
||||
PD_PRINTTOFILE = $00000020;
|
||||
PD_PRINTSETUP = $00000040;
|
||||
PD_NOWARNING = $00000080;
|
||||
PD_RETURNDC = $00000100;
|
||||
PD_RETURNIC = $00000200;
|
||||
PD_RETURNDEFAULT = $00000400;
|
||||
PD_SHOWHELP = $00000800;
|
||||
PD_ENABLEPRINTHOOK = $00001000;
|
||||
PD_ENABLESETUPHOOK = $00002000;
|
||||
PD_ENABLEPRINTTEMPLATE = $00004000;
|
||||
PD_ENABLESETUPTEMPLATE = $00008000;
|
||||
PD_ENABLEPRINTTEMPLATEHANDLE = $00010000;
|
||||
PD_ENABLESETUPTEMPLATEHANDLE = $00020000;
|
||||
PD_USEDEVMODECOPIES = $00040000;
|
||||
PD_USEDEVMODECOPIESANDCOLLATE = $00040000;
|
||||
PD_DISABLEPRINTTOFILE = $00080000;
|
||||
PD_HIDEPRINTTOFILE = $00100000;
|
||||
PD_NONETWORKBUTTON = $00200000;
|
||||
|
||||
|
2
packager/globallinks/printer4lazarus-0.lpl
Normal file
2
packager/globallinks/printer4lazarus-0.lpl
Normal file
@ -0,0 +1,2 @@
|
||||
$(LazarusDir)/components/printers/printer4lazarus.lpk
|
||||
|
Loading…
Reference in New Issue
Block a user