Class: DF_Printer
*** Our intention was to be able to use escape seq from WinPrint
*** but for some reasons the PASSTHRUE is not working. It will
*** MAYBE be implemented later.
//*** Returns PRN_TRUE=Ok PRN_FALSE=Cancel
//***
External_Function32 WriteEscape "WriteEscape" DFPRINT.DLL ;
Integer iPageNr;
Integer iEsc;
String sSeq;
Integer iSeqlen;
Returns Integer
//*** Returns PRN_TRUE=Ok PRN_FALSE=Cancel
//***
External_Function32 QueryWriteEscape "QueryWriteEscape" DFPRINT.DLL ;
Integer iEsc;
Returns Integer
************************************************************************//
//
$Module type: CLASS //
$Module name: DF_PRINTER //
$Author : Janne Wassberg //
Created : 96-01-30 @ 20.39.19 //
//
Description Class for Windows printsystem and DataFlex 3.05 and 4.x //
//
//
//
$Rev History //
96-04-23 Ready for version 1.1 //
96-01-30 Module header created //
//
************************************************************************//
This will have a handle. //JT
Class Hierarchy:
DFBasePanelDF_PrinterClass Definition
Properties
NumberDFBottom_Margin
IntegerDFCurrent_Color
*** internal properties
IntegerDFCurrent_Diagram
StringDFCurrent_Font
NumberDFCurrent_FontSize
IntegerDFCurrent_HeaderNr
IntegerDFCurrent_HeaderType
StringDFCurrent_Metrics
*** You can use CM or INCH
StringDFCurrent_OutPut
IntegerDFCurrent_Page
NumberDFLeft_Margin
*** Default values for margins 2.53 CM = 1 inch
IntegerDFPageBottomCount
IntegerDFPageFooterCount
IntegerDFPageHeaderCount
IntegerDFPageTitleCount
IntegerDFPageTopCount
*** Internal object counters
IntegerDFPageTotalCount
IntegerDFReportFooterCount
IntegerDFReportHeaderCount
NumberDFright_Margin
IntegerDFSubHeader1Count
*** Can be increased to a maximum of 20 for
*** each sub. The DLL handles 20 options
*** If you increase them to more then 9
*** options you also have to change the
*** functions for Zero and Calculation
***
IntegerDFSubHeader2Count
IntegerDFSubHeader3Count
IntegerDFSubHeader4Count
IntegerDFSubHeader5Count
IntegerDFSubHeader6Count
IntegerDFSubHeader7Count
IntegerDFSubHeader8Count
IntegerDFSubHeader9Count
IntegerDFSubTotal1Count
IntegerDFSubTotal2Count
IntegerDFSubTotal3Count
IntegerDFSubTotal4Count
IntegerDFSubTotal5Count
IntegerDFSubTotal6Count
IntegerDFSubTotal7Count
IntegerDFSubTotal8Count
IntegerDFSubTotal9Count
NumberDFTop_Margin
IntegerDFTotalCount
IntegerEnablePrintFromPreview
IntegerEnablePrintSetupFromPreview
IntegerPrintDlgInPreview
Functions and Procedures
Construct_Object()
Destroy_Object()
DFBeginHeaderType(Integer HeaderNr Integer HeaderType)
***
IntegerDFCalcCounters(Integer HeaderNr Integer HeaderType)
Only for internal use
IntegerDFCheckPrintDialogFlag(Dword PDFlag)
***
*** Returns PRN_TRUE= if the flag is set (1)
*** Returns PRN_FALSE= If the flag not is set (0)
***
DFClearDiagramList()
DFClearDoc()
***
DFClearPrinter()
***
DFCreateDiagram(Integer iType Integer iFx Number nHeight Number nWidth Integer bXyAxis)
***
IntegerDFCurrentCounters(Integer HeaderNr Integer HeaderType)
*** Only for internal use
DFDiagram_Item(Integer iDiagram String sLabel Number nValue Dword BColor Dword FColor Integer iFill Integer iDec Integer iVP Integer iExt)
***
DFDiagramLabel(Integer iDiagram String sLabel)
***
DFDiagramXLabel(Integer iDiagram String sLabel)
***
DFDiagramYLabel(Integer iDiagram String sLabel Integer iVert)
***
DFDrawDiagram(Integer iDiagram Number nYPos Number nXPos Integer iUCp)
***
SF 11/07/97 - Added an extra param.
DFDrawDiagramToPage(Integer iPage Integer iDiagram Number nYPos Number nXPos Integer iUCp)
***
SF 11/07/97 - Added an extra param.
DFEndHeaderType()
***
DwordDFGetColor(Integer iColor)
DwordDFGetCurrentColor()
StringDFGetCurrentDevice()
***
IntegerDFGetCurrentDiagram()
*** Escape will not work, see comment att dll call
//***
Procedure DFWriteEsc Integer EscFunc String EscSeq
Integer iRetVal
Integer CurrPage
integer iEscLen
Get DFCurrent_Page To CurrPage
Get ToAnsi EscSeq To EscSeq
Move (Length(EscSeq)) To iEscLen
Move (WriteEscape(CurrPage,EscFunc,EscSeq,iEscLen)) To iRetVal
If iRetVal Eq PRN_TRUE Begin
End
If iRetVal Eq PRN_FALSE Begin
Error DFERR_WINPRINT DFPrintError958
End
End_Procedure
//***
Procedure DFQueryEsc Integer EscFunc
Integer iRetVal
Move (QueryWriteEscape(EscFunc)) To iRetVal
If iRetVal Eq PRN_TRUE Begin
End
If iRetVal Eq PRN_FALSE Begin
Error DFERR_WINPRINT DFPrintError959
End
End_Procedure
*************************************************************
*** This procedures and functions are used when building ***
*** complex graphics when you need to change value of the ***
*** current diagram, so you can mix diagrams within each ***
*** other. ***
*************************************************************
StringDFGetCurrentDriver()
***
StringDFGetCurrentPort()
***
DWORDDFGetDFColor(Integer iRed Integer iGreen Integer iBlue)
***
IntegerDFGetDiagramList(Integer Item#)
DwordDFGetPrintDialogFlags()
***
NumberDFGetUserDefinedLength()
***
NumberDFGetUserDefinedWidth()
***
DFHeaderFrameType(Integer Frame Dword dwColor Number nWeight Dword FColor Integer iFill)
***
DFHeaderLineCheck(Integer Lines)
***
DFHeaderPosition(Integer Place)
***
DFHeaderWrap(Integer OnOff)
***
DFLineCheck(Integer Lines)
***
DFLockDiagram(Integer iDiagram)
***
IntegerDFNewPage(Integer Columns)
***
DFPreview()
***
IntegerDFPrintDialog()
***
DFPrintDoc()
***
DFPrinterBinFirstPage(Integer Flags)
***
DFPrintFlags(Integer Flags)
***
DFPrintSetup()
***
DFSelectPrinter(String sDriver String sDevice String sPort Integer iUpdate)
***
DFSetBold(Integer Bold)
***
DFSetBottomMargin(Number Bottom)
***
DFSetCurrentDiagram(Integer iDiagram)
DFSetDFColor(DWORD dwColor)
***
DFSetDiagramList(Integer Item# Integer iDiagram)
DFSetFont(String FontName)
***
DFSetFontSize(Integer Height Integer Width)
***
DFSetFontStyle(DWORD Style)
***
DFSetItalic(Integer Italic)
***
DFSetJMode(Integer iAlign)
***
DFSetLeftMargin(Number Left)
***
DFSetMargins(Number Left Number Top Number Right Number Bottom)
***
DFSetMetrics(String Metrics)
***
DFSetNumberOfCopies(Integer iNrOfCopies)
DFSetRightMargin(Number Right)
***
DFSetSpecPrintFlag(Dword PDFlag)
***
DFSetStrikeout(Integer Strikeout)
***
DFSetTopBottom(Number nTop Number nBottom Integer iAll)
***
DFSetTopMargin(Number Top)
***
DFSetUnderline(Integer Underline)
***
DFSetUserDefinedPapersize(Number nLength Number nWidth)
*** To be set in CM
DFWrite(String sText DWORD iStyle Integer Column Integer Dec)
***
DFWriteBMP(String sFileName Number StartX Number StartY Number Height Number Width Integer iUCp)
***
SF 21/8 - Modified to support GR_USECURRPOS better
DFWriteBMPToPage(Integer iPage String sFileName Number StartX Number StartY Number Height Number Width Integer iUCp)
***
SF 21/8 - Modified to support GR_USECURRPOS better
DFWriteEllip(Number StartX Number StartY Number Height Number Width Dword BColor Dword FColor Integer iFill Number nWeight Integer Wrap Integer iUCp)
***
SF 21/8 - Modified to support GR_USECURRPOS better
DFWriteEllipToPage(Integer iPage Number StartX Number StartY Number Height Number Width Dword BColor Dword FColor Integer iFill Number nWeight Integer Wrap Integer iUCp)
***
SF 21/8 - Modified to support GR_USECURRPOS better
DFWriteHeaderType(Integer HeaderNr Integer HeaderType)
***
DFWriteHeaderTypeToPage(Integer PageNr Integer HeaderNr Integer HeaderType)
***
DFWriteLine(Number StartX Number StartY Number Lenght Integer iHorVert Dword Color Number nWeight Integer iUCp)
***
DFWriteln(String sText DWORD iStyle Integer Column Integer Dec)
***
DFWritelnPos(String sText DWORD iStyle Number Pos Integer Dec Number nLen)
***
DFWritelnPosToPage(Integer Page String sText DWORD iStyle Number Pos Integer Dec Number nLen)
***
DFWritelnToPage(Integer Page String sText DWORD iStyle Integer Column Integer Dec)
***
DFWritePos(String sText DWORD iStyle Number Pos Integer Dec Number nLen)
***
DFWritePosToPage(Integer Page String sText DWORD iStyle Number Pos Integer Dec Number nLen)
***
DFWriteRect(Number StartX Number StartY Number Height Number Width Dword BColor Dword FColor Integer iFill Number nWeight Integer Wrap Integer iUCp)
***
SF 21/8 - Modified to support GR_USECURRPOS better
DFWriteRectToPage(Integer iPage Number StartX Number StartY Number Height Number Width Dword BColor Dword FColor Integer iFill Number nWeight Integer Wrap Integer iUCp)
***
SF 21/8 - Modified to support GR_USECURRPOS better
DFWriteToPage(Integer Page String sText DWORD iStyle Integer Column Integer Dec)
***
DFWriteXYLine(Number StartX Number StartY Number StoppX Number StoppY Dword Color Number nWeight Integer Wrap Integer iUCp)
***
DFZeroCounters()
End_Construct_Object()
*************************************************************
*** This procedures and functions are used when building ***
*** complex graphics when you need to change value of the ***
*** current diagram, so you can mix diagrams within each ***
*** other. ***
*************************************************************
handleReport_Window_Handle()
JT
***Return handle to use for winprint dialog. If main_window
exists, use it. Else, get object's handle
References (1):