home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
PC World Komputer 1997 May
/
Pcwk0597.iso
/
borland
/
cb
/
setup
/
cbuilder
/
data.z
/
PRINTERS.HPP
< prev
next >
Wrap
C/C++ Source or Header
|
1997-02-28
|
6KB
|
141 lines
//----------------------------------------------------------------------------
// Printers.hpp - bcbdcc32 generated hdr (DO NOT EDIT) rev: 0
// From: Printers.pas
//----------------------------------------------------------------------------
#ifndef PrintersHPP
#define PrintersHPP
//----------------------------------------------------------------------------
#include <Forms.hpp>
#include <Graphics.hpp>
#include <Classes.hpp>
#include <SysUtils.hpp>
#include <WinSpool.hpp>
#include <Windows.hpp>
#include <System.hpp>
#pragma warn -par
#pragma warn -hid
#pragma warn -inl
namespace Printers
{
//-- type declarations -------------------------------------------------------
class __declspec(delphiclass) EPrinter;
class __declspec(pascalimplementation) EPrinter : public Sysutils::Exception
{
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 System::TVarRec *
Args, const int Args_Size) : Sysutils::Exception(Msg, Args, Args_Size) { }
/* Exception.CreateRes */ __fastcall EPrinter(int Ident) : Sysutils::Exception(Ident) { }
/* Exception.CreateResFmt */ __fastcall EPrinter(int Ident, const System::TVarRec * Args, const int
Args_Size) : Sysutils::Exception(Ident, Args, Args_Size) { }
/* Exception.CreateHelp */ __fastcall EPrinter(const System::AnsiString Msg, int AHelpContext) : Sysutils::
Exception(Msg, AHelpContext) { }
/* Exception.CreateFmtHelp */ __fastcall EPrinter(const System::AnsiString Msg, const System::TVarRec
* Args, const int Args_Size, int AHelpContext) : Sysutils::Exception(Msg, Args, Args_Size, AHelpContext
) { }
/* Exception.CreateResHelp */ __fastcall EPrinter(int Ident, int AHelpContext) : Sysutils::Exception(
Ident, AHelpContext) { }
/* Exception.CreateResFmtHelp */ __fastcall EPrinter(int Ident, const System::TVarRec * Args, const
int Args_Size, int 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 System::TObject inherited;
private:
Graphics::TCanvas* FCanvas;
Classes::TStrings* FFonts;
int FPageNumber;
Classes::TStrings* FPrinters;
int FPrinterIndex;
System::AnsiString FTitle;
bool FPrinting;
bool FAborted;
TPrinterCapabilities FCapabilities;
TPrinterState State;
HDC DC;
DEVMODEA *DevMode;
int DeviceMode;
int FPrinterHandle;
void __fastcall SetState(TPrinterState Value);
Graphics::TCanvas* __fastcall GetCanvas(void);
int __fastcall GetNumCopies(void);
Classes::TStrings* __fastcall GetFonts(void);
HDC __fastcall GetHandle(void);
TPrinterOrientation __fastcall GetOrientation(void);
int __fastcall GetPageHeight(void);
int __fastcall GetPageWidth(void);
int __fastcall GetPrinterIndex(void);
void __fastcall SetPrinterCapabilities(int Value);
void __fastcall SetPrinterIndex(int Value);
Classes::TStrings* __fastcall GetPrinters(void);
void __fastcall SetNumCopies(int Value);
void __fastcall SetOrientation(TPrinterOrientation Value);
void __fastcall SetToDefaultPrinter(void);
void __fastcall CheckPrinting(bool 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(char * ADevice, char * ADriver, char * APort, int &ADeviceMode);
void __fastcall SetPrinter(char * ADevice, char * ADriver, char * APort, int ADeviceMode);
__property bool Aborted = {read=FAborted, nodefault};
__property Graphics::TCanvas* Canvas = {read=GetCanvas, nodefault};
__property TPrinterCapabilities Capabilities = {read=FCapabilities, nodefault};
__property int Copies = {read=GetNumCopies, write=SetNumCopies, nodefault};
__property Classes::TStrings* Fonts = {read=GetFonts, nodefault};
__property HDC Handle = {read=GetHandle, nodefault};
__property TPrinterOrientation Orientation = {read=GetOrientation, write=SetOrientation, nodefault}
;
__property int PageHeight = {read=GetPageHeight, nodefault};
__property int PageWidth = {read=GetPageWidth, nodefault};
__property int PageNumber = {read=FPageNumber, nodefault};
__property int PrinterIndex = {read=GetPrinterIndex, write=SetPrinterIndex, nodefault};
__property bool 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 void __fastcall finalization(void);
//-- template instantiations -------------------------------------------------
template class TPrinterCapabilities ;
} /* namespace Printers */
#pragma warn .par
#pragma warn .hid
#pragma warn .inl
#if !defined(NO_IMPLICIT_NAMESPACE_USE)
using namespace Printers;
#endif
//-- end unit ----------------------------------------------------------------
#endif // Printers