home *** CD-ROM | disk | FTP | other *** search
- //----------------------------------------------------------------------------
- // Printers.hpp - dcc32 generated hdr (DO NOT EDIT) rev: -2
- // From: Printers.pas
- //----------------------------------------------------------------------------
- #ifndef PrintersHPP
- #define PrintersHPP
- //----------------------------------------------------------------------------
- #ifndef FormsHPP
- #include <Forms.hpp>
- #endif
-
- #ifndef GraphicsHPP
- #include <Graphics.hpp>
- #endif
-
- #ifndef ClassesHPP
- #include <Classes.hpp>
- #endif
-
- #ifndef SysUtilsHPP
- #include <SysUtils.hpp>
- #endif
-
- #ifndef WinSpoolHPP
- #include <WinSpool.hpp>
- #endif
-
- #ifndef WindowsHPP
- #include <Windows.hpp>
- #endif
-
- #ifndef SystemHPP
- #include <System.hpp>
- #endif
-
- namespace Printers
- {
- //-- type declarations -------------------------------------------------------
- class __declspec(delphiclass) EPrinter;
- class __declspec(pascalimplementation) EPrinter : public Sysutils::Exception
- {
- typedef EPrinter ThisClass;
- typedef Sysutils::Exception inherited;
-
- public:
- /* !! Exception.Create */ __fastcall EPrinter(const System::AnsiString Msg) : Sysutils::Exception(Msg
- ) { }
- /* !! Exception.CreateFmt */ __fastcall EPrinter(const System::AnsiString Msg, const TVarRec *Args,
- const System::Integer Args_Size) : Sysutils::Exception(Msg, Args, Args_Size) { }
- /* !! Exception.CreateRes */ __fastcall EPrinter(System::Integer Ident) : Sysutils::Exception(Ident
- ) { }
- /* !! Exception.CreateResFmt */ __fastcall EPrinter(System::Integer Ident, const TVarRec *Args, const
- System::Integer Args_Size) : Sysutils::Exception(Ident, Args, Args_Size) { }
- /* !! Exception.CreateHelp */ __fastcall EPrinter(const System::AnsiString Msg, System::Integer AHelpContext
- ) : Sysutils::Exception(Msg, AHelpContext) { }
- /* !! Exception.CreateFmtHelp */ __fastcall EPrinter(const System::AnsiString Msg, const TVarRec *Args
- , const System::Integer Args_Size, System::Integer AHelpContext) : Sysutils::Exception(Msg, Args,
- Args_Size, AHelpContext) { }
- /* !! Exception.CreateResHelp */ __fastcall EPrinter(System::Integer Ident, System::Integer AHelpContext
- ) : Sysutils::Exception(Ident, AHelpContext) { }
- /* !! Exception.CreateResFmtHelp */ __fastcall EPrinter(System::Integer Ident, const TVarRec *Args,
- const System::Integer Args_Size, System::Integer AHelpContext) : Sysutils::Exception(Ident, Args,
- Args_Size, AHelpContext) { }
-
- public:
- /* !! TObject.Destroy */ __fastcall virtual ~EPrinter(void) { }
-
- };
-
- enum TPrinterState { psNoHandle, psHandleIC, psHandleDC };
-
- enum TPrinterOrientation { poPortrait, poLandscape };
-
- enum TPrinterCapability { pcCopies, pcOrientation, pcCollation };
-
- typedef Set<TPrinterCapability, pcCopies, pcCollation> TPrinterCapabilities;
-
- class __declspec(delphiclass) TPrinter;
- class __declspec(pascalimplementation) TPrinter : public System::TObject
- {
- typedef TPrinter ThisClass;
- typedef System::TObject inherited;
-
- private:
- Graphics::TCanvas *FCanvas;
- Classes::TStrings *FFonts;
- System::Integer FPageNumber;
- Classes::TStrings *FPrinters;
- System::Integer FPrinterIndex;
- System::AnsiString FTitle;
- System::Boolean FPrinting;
- System::Boolean FAborted;
- TPrinterCapabilities FCapabilities;
- TPrinterState State;
- System::Integer DC;
- Windows::TDeviceModeA *DevMode;
- System::Integer DeviceMode;
- System::Integer FPrinterHandle;
- void __fastcall SetState(TPrinterState Value);
- Graphics::TCanvas *__fastcall GetCanvas(void);
- System::Integer __fastcall GetNumCopies(void);
- Classes::TStrings *__fastcall GetFonts(void);
- System::Integer __fastcall GetHandle(void);
- TPrinterOrientation __fastcall GetOrientation(void);
- System::Integer __fastcall GetPageHeight(void);
- System::Integer __fastcall GetPageWidth(void);
- System::Integer __fastcall GetPrinterIndex(void);
- void __fastcall SetPrinterCapabilities(System::Integer Value);
- void __fastcall SetPrinterIndex(System::Integer Value);
- Classes::TStrings *__fastcall GetPrinters(void);
- void __fastcall SetNumCopies(System::Integer Value);
- void __fastcall SetOrientation(TPrinterOrientation Value);
- void __fastcall SetToDefaultPrinter(void);
- void __fastcall CheckPrinting(System::Boolean Value);
- void __fastcall FreePrinters(void);
- void __fastcall FreeFonts(void);
-
- public:
- __fastcall TPrinter(void);
- __fastcall virtual ~TPrinter(void);
- void __fastcall Abort(void);
- void __fastcall BeginDoc(void);
- void __fastcall EndDoc(void);
- void __fastcall NewPage(void);
- void __fastcall GetPrinter(System::PChar ADevice, System::PChar ADriver, System::PChar APort, System::Integer
- &ADeviceMode);
- void __fastcall SetPrinter(System::PChar ADevice, System::PChar ADriver, System::PChar APort, System::Integer
- ADeviceMode);
- __property System::Boolean Aborted = {read=FAborted, nodefault};
- __property Graphics::TCanvas * Canvas = {read=GetCanvas, nodefault};
- __property TPrinterCapabilities Capabilities = {read=FCapabilities, nodefault};
- __property System::Integer Copies = {read=GetNumCopies, write=SetNumCopies, nodefault};
- __property Classes::TStrings * Fonts = {read=GetFonts, nodefault};
- __property System::Integer Handle = {read=GetHandle, nodefault};
- __property TPrinterOrientation Orientation = {read=GetOrientation, write=SetOrientation, nodefault}
- ;
- __property System::Integer PageHeight = {read=GetPageHeight, nodefault};
- __property System::Integer PageWidth = {read=GetPageWidth, nodefault};
- __property System::Integer PageNumber = {read=FPageNumber, nodefault};
- __property System::Integer PrinterIndex = {read=GetPrinterIndex, write=SetPrinterIndex, nodefault};
-
- __property System::Boolean Printing = {read=FPrinting, nodefault};
- __property Classes::TStrings * Printers = {read=GetPrinters, nodefault};
- __property System::AnsiString Title = {read=FTitle, write=FTitle, nodefault};
- };
-
- //-- var, const, procedure ---------------------------------------------------
- extern void __fastcall AssignPrn(System::TextFile &F);
- extern TPrinter *__fastcall Printer(void);
- extern TPrinter *__fastcall SetPrinter(TPrinter *NewPrinter);
- //-- template instantiations -------------------------------------------------
- template class TPrinterCapabilities ;
-
- } /* namespace Printers */
- #if !defined(NO_IMPLICIT_NAMESPACE_USE)
- using namespace Printers;
- #endif
- //-- end unit ----------------------------------------------------------------
- #endif // Printers
-