summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJean-Marc Levecque <jean-marc.levecque@jmlesite.fr>2011-11-29 10:35:29 +0200
committerGraeme Geldenhuys <graeme@mastermaths.co.za>2011-11-29 10:35:29 +0200
commit0bae0ea50d9156047b2bbd9cf8febcbb0eb510ff (patch)
tree6be7a634c95968f33ebb3434b7a36d63370b3858
parenta67f35f01313a4329cec17de4e0f18d0525965d5 (diff)
downloadfpGUI-0bae0ea50d9156047b2bbd9cf8febcbb0eb510ff.tar.xz
reporting: Continued translation from French to English
-rw-r--r--extras/contributed/report_tool/demo/u_demo.pas937
-rw-r--r--extras/contributed/report_tool/reportengine/u_command.pas550
-rw-r--r--extras/contributed/report_tool/reportengine/u_pdf.pas24
-rw-r--r--extras/contributed/report_tool/reportengine/u_report.pas1902
-rw-r--r--extras/contributed/report_tool/reportengine/u_reportimages.pas16
-rw-r--r--extras/contributed/report_tool/reportengine/u_visu.pas228
6 files changed, 1827 insertions, 1830 deletions
diff --git a/extras/contributed/report_tool/demo/u_demo.pas b/extras/contributed/report_tool/demo/u_demo.pas
index 675ee271..447c29fd 100644
--- a/extras/contributed/report_tool/demo/u_demo.pas
+++ b/extras/contributed/report_tool/demo/u_demo.pas
@@ -15,7 +15,7 @@ uses
type
TF_Demo = class(TfpgForm)
private
- FImprime: T_Imprime;
+ FReport: T_Report;
L_Pdf: TfpgLabel;
Bt_PdfEmptyPage: TfpgButton;
Bt_PdfSimpleText: TfpgButton;
@@ -52,7 +52,7 @@ type
Bt_PrintGrid: TfpgButton;
Bt_PrintGraph: TfpgButton;
Bt_PrintSurf: TfpgButton;
- Bt_Fermer: TfpgButton;
+ Bt_Exit: TfpgButton;
procedure Bt_PdfEmptyPageClick(Sender: TObject);
procedure Bt_PdfSimpleTextClick(Sender: TObject);
procedure Bt_PdfMultiPagesClick(Sender: TObject);
@@ -86,18 +86,18 @@ type
procedure Bt_PrintGridClick(Sender: TObject);
procedure Bt_PrintGraphClick(Sender: TObject);
procedure Bt_PrintSurfClick(Sender: TObject);
- procedure Bt_FermerClick(Sender: TObject);
- procedure ImprimeEmptyPage(Preview: Boolean);
- procedure ImprimeSimpleText(Preview: Boolean);
- procedure ImprimeMultiPages(Preview: Boolean);
- procedure ImprimeMultiSections(Preview: Boolean);
- procedure ImprimeOutlines(Preview: Boolean);
- procedure ImprimeCadres(Preview: Boolean);
- procedure ImprimeColor(Preview: Boolean);
- procedure ImprimeLines(Preview: Boolean);
- procedure ImprimeGrid(Preview: Boolean);
- procedure ImprimeGraph(Preview: Boolean);
- procedure ImprimeSurf(Preview: Boolean);
+ procedure Bt_ExitClick(Sender: TObject);
+ procedure PrintEmptyPage(Preview: Boolean);
+ procedure PrintSimpleText(Preview: Boolean);
+ procedure PrintMultiPages(Preview: Boolean);
+ procedure PrintMultiSections(Preview: Boolean);
+ procedure PrintOutlines(Preview: Boolean);
+ procedure PrintCadres(Preview: Boolean);
+ procedure PrintColor(Preview: Boolean);
+ procedure PrintLines(Preview: Boolean);
+ procedure PrintGrid(Preview: Boolean);
+ procedure PrintGraph(Preview: Boolean);
+ procedure PrintSurf(Preview: Boolean);
public
constructor Create(AOwner: TComponent); override;
end;
@@ -118,51 +118,51 @@ const
procedure TF_Demo.Bt_PdfEmptyPageClick(Sender: TObject);
var
- Fd_SauvePdf: TfpgFileDialog;
- FichierPdf: string;
- FluxFichier: TFileStream;
+ Fd_SavePdf: TfpgFileDialog;
+ PdfFile: string;
+ PdfFileStream: TFileStream;
begin
-FImprime:= T_Imprime.Create;
-with FImprime do
+FReport:= T_Report.Create;
+with FReport do
begin
// Language:= Version;
- ImprimeEmptyPage(False);
+ PrintEmptyPage(False);
if T_Section(Sections[Pred(Sections.Count)]).TotPages= 0
then
begin
ShowMessage('There is no file to print');
Exit;
end;
- Fd_SauvePdf:= TfpgFileDialog.Create(nil);
- Fd_SauvePdf.InitialDir:= ExtractFilePath(Paramstr(0));
- Fd_SauvePdf.FontDesc:= 'bitstream vera sans-9';
- Fd_SauvePdf.Filter:= 'Fichiers pdf |*.pdf';
- Fd_SauvePdf.FileName:= 'EmptyPage.pdf';
+ Fd_SavePdf:= TfpgFileDialog.Create(nil);
+ Fd_SavePdf.InitialDir:= ExtractFilePath(Paramstr(0));
+ Fd_SavePdf.FontDesc:= 'bitstream vera sans-9';
+ Fd_SavePdf.Filter:= 'Fichiers pdf |*.pdf';
+ Fd_SavePdf.FileName:= 'EmptyPage.pdf';
try
- if Fd_SauvePdf.RunSaveFile
+ if Fd_SavePdf.RunSaveFile
then
begin
- FichierPdf:= Fd_SauvePdf.FileName;
- if Lowercase(Copy(FichierPdf,Length(FichierPdf)-3,4))<> '.pdf'
+ PdfFile:= Fd_SavePdf.FileName;
+ if Lowercase(Copy(PdfFile,Length(PdfFile)-3,4))<> '.pdf'
then
- FichierPdf:= FichierPdf+'.pdf';
+ PdfFile:= PdfFile+'.pdf';
Document:= TPdfDocument.CreateDocument;
with Document do
begin
- FluxFichier:= TFileStream.Create(FichierPdf,fmCreate);
- WriteDocument(FluxFichier);
- FluxFichier.Free;
+ PdfFileStream:= TFileStream.Create(PdfFile,fmCreate);
+ WriteDocument(PdfFileStream);
+ PdfFileStream.Free;
Free;
end;
{$ifdef linux}
- fpgOpenURL(FichierPdf);
+ fpgOpenURL(PdfFile);
{$endif}
{$ifdef win32}
- ShellExecute(0,PChar('OPEN'),PChar(FichierPdf),PChar(''),PChar(''),1);
+ ShellExecute(0,PChar('OPEN'),PChar(PdfFile),PChar(''),PChar(''),1);
{$endif}
end;
finally
- Fd_SauvePdf.Free;
+ Fd_SavePdf.Free;
end;
Free;
end;
@@ -170,51 +170,51 @@ end;
procedure TF_Demo.Bt_PdfSimpleTextClick(Sender: TObject);
var
- Fd_SauvePdf: TfpgFileDialog;
- FichierPdf: string;
- FluxFichier: TFileStream;
+ Fd_SavePdf: TfpgFileDialog;
+ PdfFile: string;
+ PdfFileStream: TFileStream;
begin
-FImprime:= T_Imprime.Create;
-with FImprime do
+FReport:= T_Report.Create;
+with FReport do
begin
// Language:= Version;
- ImprimeSimpleText(False);
+ PrintSimpleText(False);
if T_Section(Sections[Pred(Sections.Count)]).TotPages= 0
then
begin
ShowMessage('There is no file to print');
Exit;
end;
- Fd_SauvePdf:= TfpgFileDialog.Create(nil);
- Fd_SauvePdf.InitialDir:= ExtractFilePath(Paramstr(0));
- Fd_SauvePdf.FontDesc:= 'bitstream vera sans-9';
- Fd_SauvePdf.Filter:= 'Fichiers pdf |*.pdf';
- Fd_SauvePdf.FileName:= 'SimpleText.pdf';
+ Fd_SavePdf:= TfpgFileDialog.Create(nil);
+ Fd_SavePdf.InitialDir:= ExtractFilePath(Paramstr(0));
+ Fd_SavePdf.FontDesc:= 'bitstream vera sans-9';
+ Fd_SavePdf.Filter:= 'Fichiers pdf |*.pdf';
+ Fd_SavePdf.FileName:= 'SimpleText.pdf';
try
- if Fd_SauvePdf.RunSaveFile
+ if Fd_SavePdf.RunSaveFile
then
begin
- FichierPdf:= Fd_SauvePdf.FileName;
- if Lowercase(Copy(FichierPdf,Length(FichierPdf)-3,4))<> '.pdf'
+ PdfFile:= Fd_SavePdf.FileName;
+ if Lowercase(Copy(PdfFile,Length(PdfFile)-3,4))<> '.pdf'
then
- FichierPdf:= FichierPdf+'.pdf';
+ PdfFile:= PdfFile+'.pdf';
Document:= TPdfDocument.CreateDocument;
with Document do
begin
- FluxFichier:= TFileStream.Create(FichierPdf,fmCreate);
- WriteDocument(FluxFichier);
- FluxFichier.Free;
+ PdfFileStream:= TFileStream.Create(PdfFile,fmCreate);
+ WriteDocument(PdfFileStream);
+ PdfFileStream.Free;
Free;
end;
{$ifdef linux}
- fpgOpenURL(FichierPdf);
+ fpgOpenURL(PdfFile);
{$endif}
{$ifdef win32}
- ShellExecute(0,PChar('OPEN'),PChar(FichierPdf),PChar(''),PChar(''),1);
+ ShellExecute(0,PChar('OPEN'),PChar(PdfFile),PChar(''),PChar(''),1);
{$endif}
end;
finally
- Fd_SauvePdf.Free;
+ Fd_SavePdf.Free;
end;
Free;
end;
@@ -222,51 +222,51 @@ end;
procedure TF_Demo.Bt_PdfMultiPagesClick(Sender: TObject);
var
- Fd_SauvePdf: TfpgFileDialog;
- FichierPdf: string;
- FluxFichier: TFileStream;
+ Fd_SavePdf: TfpgFileDialog;
+ PdfFile: string;
+ PdfFileStream: TFileStream;
begin
-FImprime:= T_Imprime.Create;
-with FImprime do
+FReport:= T_Report.Create;
+with FReport do
begin
// Language:= Version;
- ImprimeMultiPages(False);
+ PrintMultiPages(False);
if T_Section(Sections[Pred(Sections.Count)]).TotPages= 0
then
begin
ShowMessage('There is no file to print');
Exit;
end;
- Fd_SauvePdf:= TfpgFileDialog.Create(nil);
- Fd_SauvePdf.InitialDir:= ExtractFilePath(Paramstr(0));
- Fd_SauvePdf.FontDesc:= 'bitstream vera sans-9';
- Fd_SauvePdf.Filter:= 'Fichiers pdf |*.pdf';
- Fd_SauvePdf.FileName:= 'MultiPages.pdf';
+ Fd_SavePdf:= TfpgFileDialog.Create(nil);
+ Fd_SavePdf.InitialDir:= ExtractFilePath(Paramstr(0));
+ Fd_SavePdf.FontDesc:= 'bitstream vera sans-9';
+ Fd_SavePdf.Filter:= 'Fichiers pdf |*.pdf';
+ Fd_SavePdf.FileName:= 'MultiPages.pdf';
try
- if Fd_SauvePdf.RunSaveFile
+ if Fd_SavePdf.RunSaveFile
then
begin
- FichierPdf:= Fd_SauvePdf.FileName;
- if Lowercase(Copy(FichierPdf,Length(FichierPdf)-3,4))<> '.pdf'
+ PdfFile:= Fd_SavePdf.FileName;
+ if Lowercase(Copy(PdfFile,Length(PdfFile)-3,4))<> '.pdf'
then
- FichierPdf:= FichierPdf+'.pdf';
+ PdfFile:= PdfFile+'.pdf';
Document:= TPdfDocument.CreateDocument;
with Document do
begin
- FluxFichier:= TFileStream.Create(FichierPdf,fmCreate);
- WriteDocument(FluxFichier);
- FluxFichier.Free;
+ PdfFileStream:= TFileStream.Create(PdfFile,fmCreate);
+ WriteDocument(PdfFileStream);
+ PdfFileStream.Free;
Free;
end;
{$ifdef linux}
- fpgOpenURL(FichierPdf);
+ fpgOpenURL(PdfFile);
{$endif}
{$ifdef win32}
- ShellExecute(0,PChar('OPEN'),PChar(FichierPdf),PChar(''),PChar(''),1);
+ ShellExecute(0,PChar('OPEN'),PChar(PdfFile),PChar(''),PChar(''),1);
{$endif}
end;
finally
- Fd_SauvePdf.Free;
+ Fd_SavePdf.Free;
end;
Free;
end;
@@ -274,51 +274,51 @@ end;
procedure TF_Demo.Bt_PdfMultiSectionsClick(Sender: TObject);
var
- Fd_SauvePdf: TfpgFileDialog;
- FichierPdf: string;
- FluxFichier: TFileStream;
+ Fd_SavePdf: TfpgFileDialog;
+ PdfFile: string;
+ PdfFileStream: TFileStream;
begin
-FImprime:= T_Imprime.Create;
-with FImprime do
+FReport:= T_Report.Create;
+with FReport do
begin
// Language:= Version;
- ImprimeMultiSections(False);
+ PrintMultiSections(False);
if T_Section(Sections[Pred(Sections.Count)]).TotPages= 0
then
begin
ShowMessage('There is no file to print');
Exit;
end;
- Fd_SauvePdf:= TfpgFileDialog.Create(nil);
- Fd_SauvePdf.InitialDir:= ExtractFilePath(Paramstr(0));
- Fd_SauvePdf.FontDesc:= 'bitstream vera sans-9';
- Fd_SauvePdf.Filter:= 'Fichiers pdf |*.pdf';
- Fd_SauvePdf.FileName:= 'MultiSections.pdf';
+ Fd_SavePdf:= TfpgFileDialog.Create(nil);
+ Fd_SavePdf.InitialDir:= ExtractFilePath(Paramstr(0));
+ Fd_SavePdf.FontDesc:= 'bitstream vera sans-9';
+ Fd_SavePdf.Filter:= 'Fichiers pdf |*.pdf';
+ Fd_SavePdf.FileName:= 'MultiSections.pdf';
try
- if Fd_SauvePdf.RunSaveFile
+ if Fd_SavePdf.RunSaveFile
then
begin
- FichierPdf:= Fd_SauvePdf.FileName;
- if Lowercase(Copy(FichierPdf,Length(FichierPdf)-3,4))<> '.pdf'
+ PdfFile:= Fd_SavePdf.FileName;
+ if Lowercase(Copy(PdfFile,Length(PdfFile)-3,4))<> '.pdf'
then
- FichierPdf:= FichierPdf+'.pdf';
+ PdfFile:= PdfFile+'.pdf';
Document:= TPdfDocument.CreateDocument;
with Document do
begin
- FluxFichier:= TFileStream.Create(FichierPdf,fmCreate);
- WriteDocument(FluxFichier);
- FluxFichier.Free;
+ PdfFileStream:= TFileStream.Create(PdfFile,fmCreate);
+ WriteDocument(PdfFileStream);
+ PdfFileStream.Free;
Free;
end;
{$ifdef linux}
- fpgOpenURL(FichierPdf);
+ fpgOpenURL(PdfFile);
{$endif}
{$ifdef win32}
- ShellExecute(0,PChar('OPEN'),PChar(FichierPdf),PChar(''),PChar(''),1);
+ ShellExecute(0,PChar('OPEN'),PChar(PdfFile),PChar(''),PChar(''),1);
{$endif}
end;
finally
- Fd_SauvePdf.Free;
+ Fd_SavePdf.Free;
end;
Free;
end;
@@ -326,51 +326,51 @@ end;
procedure TF_Demo.Bt_PdfOutlinesClick(Sender: TObject);
var
- Fd_SauvePdf: TfpgFileDialog;
- FichierPdf: string;
- FluxFichier: TFileStream;
+ Fd_SavePdf: TfpgFileDialog;
+ PdfFile: string;
+ PdfFileStream: TFileStream;
begin
-FImprime:= T_Imprime.Create;
-with FImprime do
+FReport:= T_Report.Create;
+with FReport do
begin
// Language:= Version;
- ImprimeOutlines(False);
+ PrintOutlines(False);
if T_Section(Sections[Pred(Sections.Count)]).TotPages= 0
then
begin
ShowMessage('There is no file to print');
Exit;
end;
- Fd_SauvePdf:= TfpgFileDialog.Create(nil);
- Fd_SauvePdf.InitialDir:= ExtractFilePath(Paramstr(0));
- Fd_SauvePdf.FontDesc:= 'bitstream vera sans-9';
- Fd_SauvePdf.Filter:= 'Fichiers pdf |*.pdf';
- Fd_SauvePdf.FileName:= 'Outlines.pdf';
+ Fd_SavePdf:= TfpgFileDialog.Create(nil);
+ Fd_SavePdf.InitialDir:= ExtractFilePath(Paramstr(0));
+ Fd_SavePdf.FontDesc:= 'bitstream vera sans-9';
+ Fd_SavePdf.Filter:= 'Fichiers pdf |*.pdf';
+ Fd_SavePdf.FileName:= 'Outlines.pdf';
try
- if Fd_SauvePdf.RunSaveFile
+ if Fd_SavePdf.RunSaveFile
then
begin
- FichierPdf:= Fd_SauvePdf.FileName;
- if Lowercase(Copy(FichierPdf,Length(FichierPdf)-3,4))<> '.pdf'
+ PdfFile:= Fd_SavePdf.FileName;
+ if Lowercase(Copy(PdfFile,Length(PdfFile)-3,4))<> '.pdf'
then
- FichierPdf:= FichierPdf+'.pdf';
+ PdfFile:= PdfFile+'.pdf';
Document:= TPdfDocument.CreateDocument;
with Document do
begin
- FluxFichier:= TFileStream.Create(FichierPdf,fmCreate);
- WriteDocument(FluxFichier);
- FluxFichier.Free;
+ PdfFileStream:= TFileStream.Create(PdfFile,fmCreate);
+ WriteDocument(PdfFileStream);
+ PdfFileStream.Free;
Free;
end;
{$ifdef linux}
- fpgOpenURL(FichierPdf);
+ fpgOpenURL(PdfFile);
{$endif}
{$ifdef win32}
- ShellExecute(0,PChar('OPEN'),PChar(FichierPdf),PChar(''),PChar(''),1);
+ ShellExecute(0,PChar('OPEN'),PChar(PdfFile),PChar(''),PChar(''),1);
{$endif}
end;
finally
- Fd_SauvePdf.Free;
+ Fd_SavePdf.Free;
end;
Free;
end;
@@ -378,51 +378,51 @@ end;
procedure TF_Demo.Bt_PdfCadresClick(Sender: TObject);
var
- Fd_SauvePdf: TfpgFileDialog;
- FichierPdf: string;
- FluxFichier: TFileStream;
+ Fd_SavePdf: TfpgFileDialog;
+ PdfFile: string;
+ PdfFileStream: TFileStream;
begin
-FImprime:= T_Imprime.Create;
-with FImprime do
+FReport:= T_Report.Create;
+with FReport do
begin
// Language:= Version;
- ImprimeCadres(False);
+ PrintCadres(False);
if T_Section(Sections[Pred(Sections.Count)]).TotPages= 0
then
begin
ShowMessage('There is no file to print');
Exit;
end;
- Fd_SauvePdf:= TfpgFileDialog.Create(nil);
- Fd_SauvePdf.InitialDir:= ExtractFilePath(Paramstr(0));
- Fd_SauvePdf.FontDesc:= 'bitstream vera sans-9';
- Fd_SauvePdf.Filter:= 'Fichiers pdf |*.pdf';
- Fd_SauvePdf.FileName:= 'Cadres.pdf';
+ Fd_SavePdf:= TfpgFileDialog.Create(nil);
+ Fd_SavePdf.InitialDir:= ExtractFilePath(Paramstr(0));
+ Fd_SavePdf.FontDesc:= 'bitstream vera sans-9';
+ Fd_SavePdf.Filter:= 'Fichiers pdf |*.pdf';
+ Fd_SavePdf.FileName:= 'Cadres.pdf';
try
- if Fd_SauvePdf.RunSaveFile
+ if Fd_SavePdf.RunSaveFile
then
begin
- FichierPdf:= Fd_SauvePdf.FileName;
- if Lowercase(Copy(FichierPdf,Length(FichierPdf)-3,4))<> '.pdf'
+ PdfFile:= Fd_SavePdf.FileName;
+ if Lowercase(Copy(PdfFile,Length(PdfFile)-3,4))<> '.pdf'
then
- FichierPdf:= FichierPdf+'.pdf';
+ PdfFile:= PdfFile+'.pdf';
Document:= TPdfDocument.CreateDocument;
with Document do
begin
- FluxFichier:= TFileStream.Create(FichierPdf,fmCreate);
- WriteDocument(FluxFichier);
- FluxFichier.Free;
+ PdfFileStream:= TFileStream.Create(PdfFile,fmCreate);
+ WriteDocument(PdfFileStream);
+ PdfFileStream.Free;
Free;
end;
{$ifdef linux}
- fpgOpenURL(FichierPdf);
+ fpgOpenURL(PdfFile);
{$endif}
{$ifdef win32}
- ShellExecute(0,PChar('OPEN'),PChar(FichierPdf),PChar(''),PChar(''),1);
+ ShellExecute(0,PChar('OPEN'),PChar(PdfFile),PChar(''),PChar(''),1);
{$endif}
end;
finally
- Fd_SauvePdf.Free;
+ Fd_SavePdf.Free;
end;
Free;
end;
@@ -430,51 +430,51 @@ end;
procedure TF_Demo.Bt_PdfColorClick(Sender: TObject);
var
- Fd_SauvePdf: TfpgFileDialog;
- FichierPdf: string;
- FluxFichier: TFileStream;
+ Fd_SavePdf: TfpgFileDialog;
+ PdfFile: string;
+ PdfFileStream: TFileStream;
begin
-FImprime:= T_Imprime.Create;
-with FImprime do
+FReport:= T_Report.Create;
+with FReport do
begin
// Language:= Version;
- ImprimeColor(False);
+ PrintColor(False);
if T_Section(Sections[Pred(Sections.Count)]).TotPages= 0
then
begin
ShowMessage('There is no file to print');
Exit;
end;
- Fd_SauvePdf:= TfpgFileDialog.Create(nil);
- Fd_SauvePdf.InitialDir:= ExtractFilePath(Paramstr(0));
- Fd_SauvePdf.FontDesc:= 'bitstream vera sans-9';
- Fd_SauvePdf.Filter:= 'Fichiers pdf |*.pdf';
- Fd_SauvePdf.FileName:= 'Color.pdf';
+ Fd_SavePdf:= TfpgFileDialog.Create(nil);
+ Fd_SavePdf.InitialDir:= ExtractFilePath(Paramstr(0));
+ Fd_SavePdf.FontDesc:= 'bitstream vera sans-9';
+ Fd_SavePdf.Filter:= 'Fichiers pdf |*.pdf';
+ Fd_SavePdf.FileName:= 'Color.pdf';
try
- if Fd_SauvePdf.RunSaveFile
+ if Fd_SavePdf.RunSaveFile
then
begin
- FichierPdf:= Fd_SauvePdf.FileName;
- if Lowercase(Copy(FichierPdf,Length(FichierPdf)-3,4))<> '.pdf'
+ PdfFile:= Fd_SavePdf.FileName;
+ if Lowercase(Copy(PdfFile,Length(PdfFile)-3,4))<> '.pdf'
then
- FichierPdf:= FichierPdf+'.pdf';
+ PdfFile:= PdfFile+'.pdf';
Document:= TPdfDocument.CreateDocument;
with Document do
begin
- FluxFichier:= TFileStream.Create(FichierPdf,fmCreate);
- WriteDocument(FluxFichier);
- FluxFichier.Free;
+ PdfFileStream:= TFileStream.Create(PdfFile,fmCreate);
+ WriteDocument(PdfFileStream);
+ PdfFileStream.Free;
Free;
end;
{$ifdef linux}
- fpgOpenURL(FichierPdf);
+ fpgOpenURL(PdfFile);
{$endif}
{$ifdef win32}
- ShellExecute(0,PChar('OPEN'),PChar(FichierPdf),PChar(''),PChar(''),1);
+ ShellExecute(0,PChar('OPEN'),PChar(PdfFile),PChar(''),PChar(''),1);
{$endif}
end;
finally
- Fd_SauvePdf.Free;
+ Fd_SavePdf.Free;
end;
Free;
end;
@@ -482,51 +482,51 @@ end;
procedure TF_Demo.Bt_PdfLinesClick(Sender: TObject);
var
- Fd_SauvePdf: TfpgFileDialog;
- FichierPdf: string;
- FluxFichier: TFileStream;
+ Fd_SavePdf: TfpgFileDialog;
+ PdfFile: string;
+ PdfFileStream: TFileStream;
begin
-FImprime:= T_Imprime.Create;
-with FImprime do
+FReport:= T_Report.Create;
+with FReport do
begin
// Language:= Version;
- ImprimeLines(False);
+ PrintLines(False);
if T_Section(Sections[Pred(Sections.Count)]).TotPages= 0
then
begin
ShowMessage('There is no file to print');
Exit;
end;
- Fd_SauvePdf:= TfpgFileDialog.Create(nil);
- Fd_SauvePdf.InitialDir:= ExtractFilePath(Paramstr(0));
- Fd_SauvePdf.FontDesc:= 'bitstream vera sans-9';
- Fd_SauvePdf.Filter:= 'Fichiers pdf |*.pdf';
- Fd_SauvePdf.FileName:= 'Lines.pdf';
+ Fd_SavePdf:= TfpgFileDialog.Create(nil);
+ Fd_SavePdf.InitialDir:= ExtractFilePath(Paramstr(0));
+ Fd_SavePdf.FontDesc:= 'bitstream vera sans-9';
+ Fd_SavePdf.Filter:= 'Fichiers pdf |*.pdf';
+ Fd_SavePdf.FileName:= 'Lines.pdf';
try
- if Fd_SauvePdf.RunSaveFile
+ if Fd_SavePdf.RunSaveFile
then
begin
- FichierPdf:= Fd_SauvePdf.FileName;
- if Lowercase(Copy(FichierPdf,Length(FichierPdf)-3,4))<> '.pdf'
+ PdfFile:= Fd_SavePdf.FileName;
+ if Lowercase(Copy(PdfFile,Length(PdfFile)-3,4))<> '.pdf'
then
- FichierPdf:= FichierPdf+'.pdf';
+ PdfFile:= PdfFile+'.pdf';
Document:= TPdfDocument.CreateDocument;
with Document do
begin
- FluxFichier:= TFileStream.Create(FichierPdf,fmCreate);
- WriteDocument(FluxFichier);
- FluxFichier.Free;
+ PdfFileStream:= TFileStream.Create(PdfFile,fmCreate);
+ WriteDocument(PdfFileStream);
+ PdfFileStream.Free;
Free;
end;
{$ifdef linux}
- fpgOpenURL(FichierPdf);
+ fpgOpenURL(PdfFile);
{$endif}
{$ifdef win32}
- ShellExecute(0,PChar('OPEN'),PChar(FichierPdf),PChar(''),PChar(''),1);
+ ShellExecute(0,PChar('OPEN'),PChar(PdfFile),PChar(''),PChar(''),1);
{$endif}
end;
finally
- Fd_SauvePdf.Free;
+ Fd_SavePdf.Free;
end;
Free;
end;
@@ -534,51 +534,51 @@ end;
procedure TF_Demo.Bt_PdfGridClick(Sender: TObject);
var
- Fd_SauvePdf: TfpgFileDialog;
- FichierPdf: string;
- FluxFichier: TFileStream;
+ Fd_SavePdf: TfpgFileDialog;
+ PdfFile: string;
+ PdfFileStream: TFileStream;
begin
-FImprime:= T_Imprime.Create;
-with FImprime do
+FReport:= T_Report.Create;
+with FReport do
begin
// Language:= Version;
- ImprimeGrid(False);
+ PrintGrid(False);
if T_Section(Sections[Pred(Sections.Count)]).TotPages= 0
then
begin
ShowMessage('There is no file to print');
Exit;
end;
- Fd_SauvePdf:= TfpgFileDialog.Create(nil);
- Fd_SauvePdf.InitialDir:= ExtractFilePath(Paramstr(0));
- Fd_SauvePdf.FontDesc:= 'bitstream vera sans-9';
- Fd_SauvePdf.Filter:= 'Fichiers pdf |*.pdf';
- Fd_SauvePdf.FileName:= 'Grid.pdf';
+ Fd_SavePdf:= TfpgFileDialog.Create(nil);
+ Fd_SavePdf.InitialDir:= ExtractFilePath(Paramstr(0));
+ Fd_SavePdf.FontDesc:= 'bitstream vera sans-9';
+ Fd_SavePdf.Filter:= 'Fichiers pdf |*.pdf';
+ Fd_SavePdf.FileName:= 'Grid.pdf';
try
- if Fd_SauvePdf.RunSaveFile
+ if Fd_SavePdf.RunSaveFile
then
begin
- FichierPdf:= Fd_SauvePdf.FileName;
- if Lowercase(Copy(FichierPdf,Length(FichierPdf)-3,4))<> '.pdf'
+ PdfFile:= Fd_SavePdf.FileName;
+ if Lowercase(Copy(PdfFile,Length(PdfFile)-3,4))<> '.pdf'
then
- FichierPdf:= FichierPdf+'.pdf';
+ PdfFile:= PdfFile+'.pdf';
Document:= TPdfDocument.CreateDocument;
with Document do
begin
- FluxFichier:= TFileStream.Create(FichierPdf,fmCreate);
- WriteDocument(FluxFichier);
- FluxFichier.Free;
+ PdfFileStream:= TFileStream.Create(PdfFile,fmCreate);
+ WriteDocument(PdfFileStream);
+ PdfFileStream.Free;
Free;
end;
{$ifdef linux}
- fpgOpenURL(FichierPdf);
+ fpgOpenURL(PdfFile);
{$endif}
{$ifdef win32}
- ShellExecute(0,PChar('OPEN'),PChar(FichierPdf),PChar(''),PChar(''),1);
+ ShellExecute(0,PChar('OPEN'),PChar(PdfFile),PChar(''),PChar(''),1);
{$endif}
end;
finally
- Fd_SauvePdf.Free;
+ Fd_SavePdf.Free;
end;
Free;
end;
@@ -586,51 +586,51 @@ end;
procedure TF_Demo.Bt_PdfGraphClick(Sender: TObject);
var
- Fd_SauvePdf: TfpgFileDialog;
- FichierPdf: string;
- FluxFichier: TFileStream;
+ Fd_SavePdf: TfpgFileDialog;
+ PdfFile: string;
+ PdfFileStream: TFileStream;
begin
-FImprime:= T_Imprime.Create;
-with FImprime do
+FReport:= T_Report.Create;
+with FReport do
begin
// Language:= Version;
- ImprimeGraph(False);
+ PrintGraph(False);
if T_Section(Sections[Pred(Sections.Count)]).TotPages= 0
then
begin
ShowMessage('There is no file to print');
Exit;
end;
- Fd_SauvePdf:= TfpgFileDialog.Create(nil);
- Fd_SauvePdf.InitialDir:= ExtractFilePath(Paramstr(0));
- Fd_SauvePdf.FontDesc:= 'bitstream vera sans-9';
- Fd_SauvePdf.Filter:= 'Fichiers pdf |*.pdf';
- Fd_SauvePdf.FileName:= 'Graph.pdf';
+ Fd_SavePdf:= TfpgFileDialog.Create(nil);
+ Fd_SavePdf.InitialDir:= ExtractFilePath(Paramstr(0));
+ Fd_SavePdf.FontDesc:= 'bitstream vera sans-9';
+ Fd_SavePdf.Filter:= 'Fichiers pdf |*.pdf';
+ Fd_SavePdf.FileName:= 'Graph.pdf';
try
- if Fd_SauvePdf.RunSaveFile
+ if Fd_SavePdf.RunSaveFile
then
begin
- FichierPdf:= Fd_SauvePdf.FileName;
- if Lowercase(Copy(FichierPdf,Length(FichierPdf)-3,4))<> '.pdf'
+ PdfFile:= Fd_SavePdf.FileName;
+ if Lowercase(Copy(PdfFile,Length(PdfFile)-3,4))<> '.pdf'
then
- FichierPdf:= FichierPdf+'.pdf';
+ PdfFile:= PdfFile+'.pdf';
Document:= TPdfDocument.CreateDocument;
with Document do
begin
- FluxFichier:= TFileStream.Create(FichierPdf,fmCreate);
- WriteDocument(FluxFichier);
- FluxFichier.Free;
+ PdfFileStream:= TFileStream.Create(PdfFile,fmCreate);
+ WriteDocument(PdfFileStream);
+ PdfFileStream.Free;
Free;
end;
{$ifdef linux}
- fpgOpenURL(FichierPdf);
+ fpgOpenURL(PdfFile);
{$endif}
{$ifdef win32}
- ShellExecute(0,PChar('OPEN'),PChar(FichierPdf),PChar(''),PChar(''),1);
+ ShellExecute(0,PChar('OPEN'),PChar(PdfFile),PChar(''),PChar(''),1);
{$endif}
end;
finally
- Fd_SauvePdf.Free;
+ Fd_SavePdf.Free;
end;
Free;
end;
@@ -638,51 +638,51 @@ end;
procedure TF_Demo.Bt_PdfSurfClick(Sender: TObject);
var
- Fd_SauvePdf: TfpgFileDialog;
- FichierPdf: string;
- FluxFichier: TFileStream;
+ Fd_SavePdf: TfpgFileDialog;
+ PdfFile: string;
+ PdfFileStream: TFileStream;
begin
-FImprime:= T_Imprime.Create;
-with FImprime do
+FReport:= T_Report.Create;
+with FReport do
begin
// Language:= Version;
- ImprimeSurf(False);
+ PrintSurf(False);
if T_Section(Sections[Pred(Sections.Count)]).TotPages= 0
then
begin
ShowMessage('There is no file to print');
Exit;
end;
- Fd_SauvePdf:= TfpgFileDialog.Create(nil);
- Fd_SauvePdf.InitialDir:= ExtractFilePath(Paramstr(0));
- Fd_SauvePdf.FontDesc:= 'bitstream vera sans-9';
- Fd_SauvePdf.Filter:= 'Fichiers pdf |*.pdf';
- Fd_SauvePdf.FileName:= 'Surface.pdf';
+ Fd_SavePdf:= TfpgFileDialog.Create(nil);
+ Fd_SavePdf.InitialDir:= ExtractFilePath(Paramstr(0));
+ Fd_SavePdf.FontDesc:= 'bitstream vera sans-9';
+ Fd_SavePdf.Filter:= 'Fichiers pdf |*.pdf';
+ Fd_SavePdf.FileName:= 'Surface.pdf';
try
- if Fd_SauvePdf.RunSaveFile
+ if Fd_SavePdf.RunSaveFile
then
begin
- FichierPdf:= Fd_SauvePdf.FileName;
- if Lowercase(Copy(FichierPdf,Length(FichierPdf)-3,4))<> '.pdf'
+ PdfFile:= Fd_SavePdf.FileName;
+ if Lowercase(Copy(PdfFile,Length(PdfFile)-3,4))<> '.pdf'
then
- FichierPdf:= FichierPdf+'.pdf';
+ PdfFile:= PdfFile+'.pdf';
Document:= TPdfDocument.CreateDocument;
with Document do
begin
- FluxFichier:= TFileStream.Create(FichierPdf,fmCreate);
- WriteDocument(FluxFichier);
- FluxFichier.Free;
+ PdfFileStream:= TFileStream.Create(PdfFile,fmCreate);
+ WriteDocument(PdfFileStream);
+ PdfFileStream.Free;
Free;
end;
{$ifdef linux}
- fpgOpenURL(FichierPdf);
+ fpgOpenURL(PdfFile);
{$endif}
{$ifdef win32}
- ShellExecute(0,PChar('OPEN'),PChar(FichierPdf),PChar(''),PChar(''),1);
+ ShellExecute(0,PChar('OPEN'),PChar(PdfFile),PChar(''),PChar(''),1);
{$endif}
end;
finally
- Fd_SauvePdf.Free;
+ Fd_SavePdf.Free;
end;
Free;
end;
@@ -690,132 +690,132 @@ end;
procedure TF_Demo.Bt_VisuEmptyPageClick(Sender: TObject);
begin
-FImprime:= T_Imprime.Create;
-with FImprime do
+FReport:= T_Report.Create;
+with FReport do
begin
//Language:= Version;
DefaultFile:= 'EmptyPage.pdf';
- ImprimeEmptyPage(True);
+ PrintEmptyPage(True);
Free;
end;
end;
procedure TF_Demo.Bt_VisuSimpleTextClick(Sender: TObject);
begin
-FImprime:= T_Imprime.Create;
-with FImprime do
+FReport:= T_Report.Create;
+with FReport do
begin
//Language:= Version;
DefaultFile:= 'SimpleText.pdf';
- ImprimeSimpleText(True);
+ PrintSimpleText(True);
Free;
end;
end;
procedure TF_Demo.Bt_VisuMultiPagesClick(Sender: TObject);
begin
-FImprime:= T_Imprime.Create;
-with FImprime do
+FReport:= T_Report.Create;
+with FReport do
begin
//Language:= Version;
DefaultFile:= 'MultiPages.pdf';
- ImprimeMultiPages(True);
+ PrintMultiPages(True);
Free;
end;
end;
procedure TF_Demo.Bt_VisuMultiSectionsClick(Sender: TObject);
begin
-FImprime:= T_Imprime.Create;
-with FImprime do
+FReport:= T_Report.Create;
+with FReport do
begin
//Language:= Version;
DefaultFile:= 'MultiSections.pdf';
- ImprimeMultiSections(True);
+ PrintMultiSections(True);
Free;
end;
end;
procedure TF_Demo.Bt_VisuOutlinesClick(Sender: TObject);
begin
-FImprime:= T_Imprime.Create;
-with FImprime do
+FReport:= T_Report.Create;
+with FReport do
begin
//Language:= Version;
DefaultFile:= 'Outlines.pdf';
- ImprimeOutlines(True);
+ PrintOutlines(True);
Free;
end;
end;
procedure TF_Demo.Bt_VisuCadresClick(Sender: TObject);
begin
-FImprime:= T_Imprime.Create;
-with FImprime do
+FReport:= T_Report.Create;
+with FReport do
begin
//Language:= Version;
DefaultFile:= 'Cadres.pdf';
- ImprimeCadres(True);
+ PrintCadres(True);
Free;
end;
end;
procedure TF_Demo.Bt_VisuColorClick(Sender: TObject);
begin
-FImprime:= T_Imprime.Create;
-with FImprime do
+FReport:= T_Report.Create;
+with FReport do
begin
//Language:= Version;
DefaultFile:= 'Color.pdf';
- ImprimeColor(True);
+ PrintColor(True);
Free;
end;
end;
procedure TF_Demo.Bt_VisuLinesClick(Sender: TObject);
begin
-FImprime:= T_Imprime.Create;
-with FImprime do
+FReport:= T_Report.Create;
+with FReport do
begin
//Language:= Version;
DefaultFile:= 'Lines.pdf';
- ImprimeLines(True);
+ PrintLines(True);
Free;
end;
end;
procedure TF_Demo.Bt_VisuGridClick(Sender: TObject);
begin
-FImprime:= T_Imprime.Create;
-with FImprime do
+FReport:= T_Report.Create;
+with FReport do
begin
//Language:= Version;
DefaultFile:= 'Grid.pdf';
- ImprimeGrid(True);
+ PrintGrid(True);
Free;
end;
end;
procedure TF_Demo.Bt_VisuGraphClick(Sender: TObject);
begin
-FImprime:= T_Imprime.Create;
-with FImprime do
+FReport:= T_Report.Create;
+with FReport do
begin
//Language:= Version;
DefaultFile:= 'Graph.pdf';
- ImprimeGraph(True);
+ PrintGraph(True);
Free;
end;
end;
procedure TF_Demo.Bt_VisuSurfClick(Sender: TObject);
begin
-FImprime:= T_Imprime.Create;
-with FImprime do
+FReport:= T_Report.Create;
+with FReport do
begin
//Language:= Version;
DefaultFile:= 'Surface.pdf';
- ImprimeSurf(True);
+ PrintSurf(True);
Free;
end;
end;
@@ -875,14 +875,14 @@ begin
end;
-procedure TF_Demo.Bt_FermerClick(Sender: TObject);
+procedure TF_Demo.Bt_ExitClick(Sender: TObject);
begin
Close;
end;
-procedure TF_Demo.ImprimeEmptyPage(Preview: Boolean);
+procedure TF_Demo.PrintEmptyPage(Preview: Boolean);
begin
-with FImprime do
+with FReport do
begin
// define orientation, page format, measurement unit, language, preview (true) or print (false)
BeginWrite(oPortrait,A4,msMM,Langue,Preview);
@@ -895,51 +895,51 @@ with FImprime do
end;
end;
-procedure TF_Demo.ImprimeSimpleText(Preview: Boolean);
+procedure TF_Demo.PrintSimpleText(Preview: Boolean);
var
- FtTexte1,FtTexte2,FtTexte3: Integer;
+ FtText1,FtText2,FtText3: Integer;
begin
-with FImprime do
+with FReport do
begin
// define orientation, page format, measurement unit, language, preview (true) or print (false)
BeginWrite(oPortrait,A4,msMM,Langue,Preview);
// create a new section and define the margins: 10 mm each side
Section(10,10,10,10);
// create the fonts to be used (use one of the 14 Adobe PDF standard fonts)
- FtTexte1:= Font('helvetica-15:bold',clBlack);
- FtTexte2:= Font('helvetica-8',clBlack);
- FtTexte3:= Font('helvetica-8:italic',clBlack);
+ FtText1:= Font('helvetica-15:bold',clBlack);
+ FtText2:= Font('helvetica-8',clBlack);
+ FtText3:= Font('helvetica-8:italic',clBlack);
// write the text at position 100 mm from left and 120 mm from top
- WritePage(100,120,'Big text at absolute position',-1,FtTexte1);
+ WritePage(100,120,'Big text at absolute position',-1,FtText1);
// write the text aligned to left
- WritePage(cnLeft,50,'Text aligned to left',ColDefaut,FtTexte2);
+ WritePage(cnLeft,50,'Text aligned to left',ColDefaut,FtText2);
// write the text aligned to right
- WritePage(cnRight,75,'Text aligned to right',ColDefaut,FtTexte3);
+ WritePage(cnRight,75,'Text aligned to right',ColDefaut,FtText3);
// write the text aligned to center
- WritePage(cnCenter,100,'Text aligned to center',ColDefaut,FtTexte2);
+ WritePage(cnCenter,100,'Text aligned to center',ColDefaut,FtText2);
// preparation is finished, so create PDF objects
EndWrite;
end;
end;
-procedure TF_Demo.ImprimeMultiPages(Preview: Boolean);
+procedure TF_Demo.PrintMultiPages(Preview: Boolean);
var
- FtTitre,FtTexte: Integer;
+ FtTitle,FtText: Integer;
Cpt: Integer;
begin
-with FImprime do
+with FReport do
begin
// define orientation, page format, measurement unit, language, preview (true) or print (false)
BeginWrite(oPortrait,A4,msMM,Langue,Preview);
// create a new section and define the margins
Section(20,10,10,10);
// create the fonts to be used (use one of the 14 Adobe PDF standard fonts)
- FtTitre:= Font('helvetica-15:bold',clBlack);
- FtTexte:= Font('helvetica-8',clBlack);
+ FtTitle:= Font('helvetica-15:bold',clBlack);
+ FtText:= Font('helvetica-8',clBlack);
// write title on each page
- WriteHeader(cnCenter,lnFin,'MULTIPAGE DOCUMENT',ColDefaut,FtTitre);
+ WriteHeader(cnCenter,lnFin,'MULTIPAGE DOCUMENT',ColDefaut,FtTitle);
// write page number and total of pages on each page
- NumPageFooter(cnRight,lnFin,'Page','of',True,ColDefaut,FtTexte);
+ NumPageFooter(cnRight,lnFin,'Page','of',True,ColDefaut,FtText);
// create five new empty pages
for Cpt:= 1 to 5 do
Page;
@@ -948,27 +948,27 @@ with FImprime do
end;
end;
-procedure TF_Demo.ImprimeMultiSections(Preview: Boolean);
+procedure TF_Demo.PrintMultiSections(Preview: Boolean);
var
- FtTitreS1,FtTitreS2,FtTitreS3,FtTexte,FtNum,FtNumS: Integer;
+ FtTitleS1,FtTitleS2,FtTitleS3,FtText,FtNum,FtNumS: Integer;
ColDefSect2: Integer;
Cpt: Integer;
begin
-with FImprime do
+with FReport do
begin
// define orientation, page format, measurement unit, language, preview (true) or print (false)
BeginWrite(oPortrait,A4,msMM,Langue,Preview);
// create the fonts to be used (use one of the 14 Adobe PDF standard fonts)
- FtTitreS1:= Font('helvetica-15:bold',clBlack);
- FtTitreS2:= Font('helvetica-14:italic',clBlack);
- FtTitreS3:= Font('helvetica-12:bold:italic',clBlack);
- FtTexte:= Font('helvetica-8',clBlack);
+ FtTitleS1:= Font('helvetica-15:bold',clBlack);
+ FtTitleS2:= Font('helvetica-14:italic',clBlack);
+ FtTitleS3:= Font('helvetica-12:bold:italic',clBlack);
+ FtText:= Font('helvetica-8',clBlack);
FtNum:= Font('helvetica-7:italic',clBlack);
FtNumS:= Font('helvetica-7:italic',clGray);
// create a new section and define the margins
Section(20,10,10,10);
// write title on each page of the section
- WriteHeader(cnCenter,lnFin,'MULTI SECTION DOCUMENT',ColDefaut,FtTitreS1);
+ WriteHeader(cnCenter,lnFin,'MULTI SECTION DOCUMENT',ColDefaut,FtTitleS1);
// write section number and total of sections on each page
NumSectionHeader(cnRight,lnFin,'Section','of',True,False,ColDefaut,FtNum);
// write page number for the section and total pages of the section on each page
@@ -984,7 +984,7 @@ with FImprime do
// create a default column for section2 which is landscape oriented
ColDefSect2:= Column(20,257);
// write title on each page of the section
- WriteHeader(cnCenter,lnFin,'MULTI SECTION DOCUMENT',ColDefSect2,FtTitreS2);
+ WriteHeader(cnCenter,lnFin,'MULTI SECTION DOCUMENT',ColDefSect2,FtTitleS2);
// write section number and total of sections on each page
NumSectionHeader(cnRight,lnFin,'Section','of',True,False,ColDefSect2,FtNum);
// write page number for the section and total pages of the section on each page
@@ -998,7 +998,7 @@ with FImprime do
// create a new section and define the margins
Section(20,20,20,20);
// write title on each page of the section
- WriteHeader(cnCenter,lnFin,'MULTI SECTION DOCUMENT',ColDefaut,FtTitreS3);
+ WriteHeader(cnCenter,lnFin,'MULTI SECTION DOCUMENT',ColDefaut,FtTitleS3);
// write section number and total of sections on each page
NumSectionHeader(cnRight,lnFin,'Section','of',True,True,ColDefaut,FtNum);
// write page number for the section and total pages of the section on each page
@@ -1014,27 +1014,27 @@ with FImprime do
end;
end;
-procedure TF_Demo.ImprimeOutlines(Preview: Boolean);
+procedure TF_Demo.PrintOutlines(Preview: Boolean);
var
- FtTitreS1,FtTitreS2,FtTitreS3,FtTexte,FtNum,FtNumS: Integer;
+ FtTitleS1,FtTitleS2,FtTitleS3,FtText,FtNum,FtNumS: Integer;
ColDefSect2: Integer;
Cpt: Integer;
begin
-with FImprime do
+with FReport do
begin
// define orientation, page format, measurement unit, language, preview (true) or print (false)
BeginWrite(oPortrait,A4,msMM,Langue,Preview);
// create the fonts to be used (use one of the 14 Adobe PDF standard fonts)
- FtTitreS1:= Font('helvetica-15:bold',clBlack);
- FtTitreS2:= Font('helvetica-14:italic',clBlack);
- FtTitreS3:= Font('helvetica-12:bold:italic',clBlack);
- FtTexte:= Font('helvetica-8',clBlack);
+ FtTitleS1:= Font('helvetica-15:bold',clBlack);
+ FtTitleS2:= Font('helvetica-14:italic',clBlack);
+ FtTitleS3:= Font('helvetica-12:bold:italic',clBlack);
+ FtText:= Font('helvetica-8',clBlack);
FtNum:= Font('helvetica-7:italic',clBlack);
FtNumS:= Font('helvetica-7:italic',clGray);
// create a new section and define the margins
Section(20,10,10,10);
// write title on each page of the section
- WriteHeader(cnCenter,lnFin,'MULTI SECTION DOCUMENT',ColDefaut,FtTitreS1);
+ WriteHeader(cnCenter,lnFin,'MULTI SECTION DOCUMENT',ColDefaut,FtTitleS1);
// write section number and total of sections on each page
NumSectionHeader(cnRight,lnFin,'Section','of',True,False,ColDefaut,FtNum);
// write page number for the section and total pages of the section on each page
@@ -1049,7 +1049,7 @@ with FImprime do
Section(10,10,10,10,0,oLandscape);
SectionTitle:= 'Landscape oriented';
// write title on each page of the section
- WriteHeader(cnCenter,lnFin,'MULTI SECTION DOCUMENT',ColDefaut,FtTitreS2);
+ WriteHeader(cnCenter,lnFin,'MULTI SECTION DOCUMENT',ColDefaut,FtTitleS2);
// write section number and total of sections on each page
NumSectionHeader(cnRight,lnFin,'Section','of',True,False,ColDefaut,FtNum);
// write page number for the section and total pages of the section on each page
@@ -1063,7 +1063,7 @@ with FImprime do
// create a new section and define the margins
Section(20,20,20,20);
// write title on each page of the section
- WriteHeader(cnCenter,lnFin,'MULTI SECTION DOCUMENT',ColDefaut,FtTitreS3);
+ WriteHeader(cnCenter,lnFin,'MULTI SECTION DOCUMENT',ColDefaut,FtTitleS3);
// write section number and total of sections on each page
NumSectionHeader(cnRight,lnFin,'Section','of',True,True,ColDefaut,FtNum);
// write page number for the section and total pages of the section on each page
@@ -1080,168 +1080,159 @@ with FImprime do
end;
end;
-procedure TF_Demo.ImprimeCadres(Preview: Boolean);
+procedure TF_Demo.PrintCadres(Preview: Boolean);
var
- FtTitre,FtTexte: Integer;
- TsFin,TsNorm,TsEpais: Integer;
- IlTitre,IlTexte: Integer;
+ FtTitle,FtText: Integer;
+ TsThin,TsNorm,TsThick: Integer;
+ IlTitle,IlText: Integer;
begin
-with FImprime do
+with FReport do
begin
// define orientation, page format, measurement unit, language, preview (true) or print (false)
BeginWrite(oPortrait,A4,msMM,Langue,Preview);
// create a new section and define the margins with an additional one due to frames drawing
Section(20,10,10,10,5);
// create the fonts to be used (use one of the 14 Adobe PDF standard fonts)
- FtTitre:= Font('helvetica-15:bold',clBlack);
- FtTexte:= Font('helvetica-8',clBlack);
+ FtTitle:= Font('helvetica-15:bold',clBlack);
+ FtText:= Font('helvetica-8',clBlack);
// create the style of lines to be used
- TsFin:= LineStyle(0.2,clBlack,lsSolid);
+ TsThin:= LineStyle(0.2,clBlack,lsSolid);
TsNorm:= LineStyle(1,clBlack,lsSolid);
- TsEpais:= LineStyle(2,clBlack,lsSolid);
+ TsThick:= LineStyle(2,clBlack,lsSolid);
// create line spacings to be used
- IlTitre:= LineSpace(3,0,3);
- IlTexte:= LineSpace(1,0,1);
+ IlTitle:= LineSpace(3,0,3);
+ IlText:= LineSpace(1,0,1);
// write title on each page
- WriteHeader(cnCenter,lnFin,'SHOWING FRAMES',ColDefaut,FtTitre,IlTitre);
+ WriteHeader(cnCenter,lnFin,'SHOWING FRAMES',ColDefaut,FtTitle,IlTitle);
// write page number and total of pages on each page
- NumPageFooter(cnRight,lnFin,'Page','of',True,ColDefaut,FtTexte,IlTexte);
+ NumPageFooter(cnRight,lnFin,'Page','of',True,ColDefaut,FtText,IlText);
// draw thin frame rectangle at margins
-// CadreMarges(TsFin);
+// FrameMargins(TsThin);
// draw thick frame rectangle at header
- FrameHeader(TsEpais);
+ FrameHeader(TsThick);
// draw thick frame rectangle at footer
FramePage(TsNorm);
// draw normal frame rectangle at page
- FrameFooter(TsEpais);
+ FrameFooter(TsThick);
// preparation is finished, so create PDF objects
EndWrite;
end;
end;
-procedure TF_Demo.ImprimeColor(Preview: Boolean);
+procedure TF_Demo.PrintColor(Preview: Boolean);
var
- FtTitre,FtNormBlack,FtNormRed,FtNormGreen,FtBoldBlue,FtItalGray,FtBoldItalFuchsia: Integer;
- TsFinNoir,TsFinBleu,TsFinRouge,TsEpaisNoir,TsEpaisGris,TsEpaisGreen: Integer;
- FdBlanc,FdBeige,FdEau,FdVertPale: Integer;
- IlTitre,IlTexte: Integer;
+ FtTitle,FtNormBlack,FtNormRed,FtNormGreen,FtBoldBlue,FtItalGray,FtBoldItalFuchsia: Integer;
+ BcBeige,BcAqua,BcPaleGreen: Integer;
+ IlTitle,IlText: Integer;
Col1,Col2,Col3: Integer;
begin
-with FImprime do
+with FReport do
begin
// define orientation, page format, measurement unit, language, preview (true) or print (false)
BeginWrite(oPortrait,A4,msMM,Langue,Preview);
// create a new section and define the margins with an additional one due to frames drawing
Section(20,10,10,10);
// create the filling colors to be used
- FdBlanc:= BackColor(clWhite);
- FdBeige:= BackColor(clBeige);
- FdEau:= BackColor(clAqua);
- FdVertPale:= BackColor(clPaleGreen);
+ BcBeige:= BackColor(clBeige);
+ BcAqua:= BackColor(clAqua);
+ BcPaleGreen:= BackColor(clPaleGreen);
// create the fonts to be used (use one of the 14 Adobe PDF standard fonts)
- FtTitre:= Font('helvetica-15:bold',clBlack);
+ FtTitle:= Font('helvetica-15:bold',clBlack);
FtNormBlack:= Font('helvetica-8',clBlack);
FtNormRed:= Font('helvetica-8',clRed);
FtNormGreen:= Font('helvetica-8',clGreen);
FtBoldBlue:= Font('helvetica-8:bold',clBlue);
FtItalGray:= Font('helvetica-8:italic',clGray);
FtBoldItalFuchsia:= Font('helvetica-8:bold:italic',clFuchsia);
- // create the style of lines to be used
- TsFinNoir:= LineStyle(1,clBlack,lsSolid);
- TsFinBleu:= LineStyle(1,clBlue,lsSolid);
- TsFinRouge:= LineStyle(1,clRed,lsSolid);
- TsEpaisNoir:= LineStyle(3,clBlack,lsSolid);
- TsEpaisGris:= LineStyle(3,clGray,lsdot);
- TsEpaisGreen:= LineStyle(3,clGreen,lsSolid);
// create columns to be used
Col1:= Column(20,100,2);
Col2:= Column(120,80,1);
Col3:= Column(70,100,5);
// create line spacings to be used
- IlTitre:= LineSpace(5,0,5);
- IlTexte:= LineSpace(0,0,0);
+ IlTitle:= LineSpace(5,0,5);
+ IlText:= LineSpace(0,0,0);
// write title on each page
- WriteHeader(cnCenter,lnFin,'SHOWING COLORS',ColDefaut,FtTitre,IlTitre);
+ WriteHeader(cnCenter,lnFin,'SHOWING COLORS',ColDefaut,FtTitle,IlTitle);
// write page number and total of pages on each page
- NumPageFooter(cnRight,lnFin,'Page','of',True,ColDefaut,FtNormRed,IlTexte);
+ NumPageFooter(cnRight,lnFin,'Page','of',True,ColDefaut,FtNormRed,IlText);
// write some example texts
- WritePage(cnLeft,lnFin,'Bold blue text aligned to left',ColDefaut,FtBoldBlue,IlTexte);
- SpacePage(10,ColDefaut,FdVertPale);
- WritePage(cnCenter,lnFin,'followed by centered normal black text after a 1 cm colored space',ColDefaut,FtNormBlack,IlTexte);
+ WritePage(cnLeft,lnFin,'Bold blue text aligned to left',ColDefaut,FtBoldBlue,IlText);
+ SpacePage(10,ColDefaut,BcPaleGreen);
+ WritePage(cnCenter,lnFin,'followed by centered normal black text after a 1 cm colored space',ColDefaut,FtNormBlack,IlText);
SpacePage(15);
- WritePage(cnLeft,lnFin,'text written on colored background after a 1.5 cm colored space',ColDefaut,FtItalGray,IlTexte,FdEau);
+ WritePage(cnLeft,lnFin,'text written on colored background after a 1.5 cm colored space',ColDefaut,FtItalGray,IlText,BcAqua);
SpacePage(10);
- WritePage(cnLeft,lnCourante,'This text starts in column 1',Col1,FtNormGreen,IlTexte,FdBeige);
- WritePage(cnLeft,lnFin,'and ends in column 2',Col2,FtBoldItalFuchsia,IlTexte);
- WritePage(cnCenter,lnFin,'And this one is centered in column 3',Col3,FtNormRed,IlTexte,FdBeige);
+ WritePage(cnLeft,lnCourante,'This text starts in column 1',Col1,FtNormGreen,IlText,BcBeige);
+ WritePage(cnLeft,lnFin,'and ends in column 2',Col2,FtBoldItalFuchsia,IlText);
+ WritePage(cnCenter,lnFin,'And this one is centered in column 3',Col3,FtNormRed,IlText,BcBeige);
// preparation is finished, so create PDF objects
EndWrite;
end;
end;
-procedure TF_Demo.ImprimeLines(Preview: Boolean);
+procedure TF_Demo.PrintLines(Preview: Boolean);
var
- FtTitre,FtTexte: Integer;
- TsFinNoir,TsFinBleu,TsEpais,TsFinRouge: Integer;
- IlTitre,IlTexte: Integer;
+ FtTitle,FtText: Integer;
+ TsThinBlack,TsThinBlue,TsThinRed,TsThick: Integer;
+ IlTitle,IlText: Integer;
Col1,Col2,Col3: Integer;
- BdRect,BdColn,BdFinCol: Integer;
+ BdRect,BdColn,BdEndColn: Integer;
begin
-with FImprime do
+with FReport do
begin
// define orientation, page format, measurement unit, language, preview (true) or print (false)
BeginWrite(oPortrait,A4,msMM,Langue,Preview);
// create a new section and define the margins with an additional one due to frames drawing
Section(20,10,10,10);
// create the fonts to be used (use one of the 14 Adobe PDF standard fonts)
- FtTitre:= Font('helvetica-15:bold',clBlack);
- FtTexte:= Font('helvetica-8',clBlack);
+ FtTitle:= Font('helvetica-15:bold',clBlack);
+ FtText:= Font('helvetica-8',clBlack);
// create the style of lines to be used
- TsFinNoir:= LineStyle(0.2,clBlack,lsSolid);
- TsFinBleu:= LineStyle(0.1,clBlue,lsDash);
- TsEpais:= LineStyle(2,clBlack,lsSolid);
- TsFinRouge:= LineStyle(1,clRed,lsDashDot);
+ TsThinBlack:= LineStyle(0.2,clBlack,lsSolid);
+ TsThinBlue:= LineStyle(0.1,clBlue,lsDash);
+ TsThick:= LineStyle(2,clBlack,lsSolid);
+ TsThinRed:= LineStyle(1,clRed,lsDashDot);
// create line spacings to be used
- IlTitre:= LineSpace(3,0,3);
- IlTexte:= LineSpace(0,0,0);
+ IlTitle:= LineSpace(3,0,3);
+ IlText:= LineSpace(0,0,0);
// define column borders
- BdRect:= Border([bcGauche,bcDroite,bcHaut,bcBas],TsEpais);
- BdColn:= Border([bcGauche,bcDroite,bcHaut],TsFinBleu);
- BdFinCol:= Border([bcGauche,bcDroite,bcHaut,bcBas],TsFinNoir);
+ BdRect:= Border([bfLeft,bfRight,bfTop,bfBottom],TsThick);
+ BdColn:= Border([bfLeft,bfRight,bfTop],TsThinBlue);
+ BdEndColn:= Border([bfLeft,bfRight,bfTop,bfBottom],TsThinBlack);
// create columns to be used
Col1:= Column(20,60,2);
Col2:= Column(80,60,2);
Col3:= Column(140,60,2);
// write title on each page
- WriteHeader(cnCenter,lnFin,'SHOWING LINES',ColDefaut,FtTitre,IlTitre);
+ WriteHeader(cnCenter,lnFin,'SHOWING LINES',ColDefaut,FtTitle,IlTitle);
// write page number and total of pages on each page
- NumPageFooter(cnRight,lnFin,'Page','of',True,ColDefaut,FtTexte,IlTexte);
+ NumPageFooter(cnRight,lnFin,'Page','of',True,ColDefaut,FtText,IlText);
// write some example texts with column borders
- WritePage(cnLeft,lnCourante,'Example of lines',Col1,FtTexte,IlTexte,-1,BdColn);
- WritePage(cnLeft,lnCourante,'with column borders',Col2,FtTexte,IlTexte,-1,BdFinCol);
- WritePage(cnLeft,lnFin,'',Col3,FtTexte);
+ WritePage(cnLeft,lnCourante,'Example of lines',Col1,FtText,IlText,-1,BdColn);
+ WritePage(cnLeft,lnCourante,'with column borders',Col2,FtText,IlText,-1,BdEndColn);
+ WritePage(cnLeft,lnFin,'',Col3,FtText);
SpacePage(5);
- WritePage(cnLeft,lnFin,'A thick border',Col3,FtTexte,IlTexte,-1,BdRect);
- HorizLinePage(2,2,Col2,TsEpais);
- LinePage(30,100,150,150,tsFinNoir);
- LinePage(50,70,180,100,tsFinBleu);
- LinePage(40,140,160,80,tsFinRouge);
- LinePage(60,50,60,120,tsEpais);
+ WritePage(cnLeft,lnFin,'A thick border',Col3,FtText,IlText,-1,BdRect);
+ HorizLinePage(2,2,Col2,TsThick);
+ LinePage(30,100,150,150,TsThinBlack);
+ LinePage(50,70,180,100,TsThinBlue);
+ LinePage(40,140,160,80,TsThinRed);
+ LinePage(60,50,60,120,TsThick);
// preparation is finished, so create PDF objects
EndWrite;
end;
end;
-procedure TF_Demo.ImprimeGrid(Preview: Boolean);
+procedure TF_Demo.PrintGrid(Preview: Boolean);
var
- FtTitre,FtTexte,FtTexteBlue,FtTexteRed,FtSTitre: Integer;
- TsFinNoir,TsEpaisBleu: Integer;
- IlTitre,IlTexte: Integer;
- FdBeige: Integer;
+ FtTitle,FtText,FtTextBlue,FtTextRed,FtSTitle: Integer;
+ TsThinBlack,TsThickBlue: Integer;
+ IlTitle,IlText: Integer;
+ BcBeige: Integer;
Col: array[1..5] of Integer;
- BdColn,BdColnG,BdColnD: Integer;
- CptLig,CptCol: Integer;
+ BdColn,BdColnL,BdColnR: Integer;
+ CptLin,CptCol: Integer;
PosHoriz,PredPosHoriz: Single;
const
Col1Pos= 20;
@@ -1255,30 +1246,30 @@ const
Col5Pos= 165;
Col5Wid= 35;
begin
-with FImprime do
+with FReport do
begin
// define orientation, page format, measurement unit, language, preview (true) or print (false)
BeginWrite(oPortrait,A4,msMM,Langue,Preview);
// create a new section and define the margins with an additional one due to frames drawing
Section(20,10,10,10);
// create the fonts to be used (use one of the 14 Adobe PDF standard fonts)
- FtTitre:= Font('helvetica-15:bold',clBlack);
- FtTexte:= Font('helvetica-7',clBlack);
- FtTexteBlue:= Font('helvetica-7',clBlue);
- FtTexteRed:= Font('helvetica-7',clRed);
- FtSTitre:= Font('helvetica-9:bold:italic',clBlue);
+ FtTitle:= Font('helvetica-15:bold',clBlack);
+ FtText:= Font('helvetica-7',clBlack);
+ FtTextBlue:= Font('helvetica-7',clBlue);
+ FtTextRed:= Font('helvetica-7',clRed);
+ FtSTitle:= Font('helvetica-9:bold:italic',clBlue);
// create the style of lines to be used
- TsFinNoir:= LineStyle(0.5,clBlack,lsSolid);
- TsEpaisBleu:= LineStyle(1.5,clBlue,lsSolid);
+ TsThinBlack:= LineStyle(0.5,clBlack,lsSolid);
+ TsThickBlue:= LineStyle(1.5,clBlue,lsSolid);
// create line spacings to be used
- IlTitre:= LineSpace(3,0,3);
- IlTexte:= LineSpace(1,0,0);
+ IlTitle:= LineSpace(3,0,3);
+ IlText:= LineSpace(1,0,0);
// define column background color
- FdBeige:= BackColor(clBeige);
+ BcBeige:= BackColor(clBeige);
// define column borders
- BdColn:= Border([bcGauche,bcDroite],TsFinNoir);
- BdColnG:= Border([bcGauche],TsEpaisBleu);
- BdColnD:= Border([bcDroite],TsEpaisBleu);
+ BdColn:= Border([bfLeft,bfRight],TsThinBlack);
+ BdColnL:= Border([bfLeft],TsThickBlue);
+ BdColnR:= Border([bfRight],TsThickBlue);
// create columns to be used
Col[1]:= Column(Col1Pos,Col1Wid,2);
Col[2]:= Column(Col2Pos,Col2Wid,2);
@@ -1286,123 +1277,123 @@ with FImprime do
Col[4]:= Column(Col4Pos,Col4Wid,2);
Col[5]:= Column(Col5Pos,Col5Wid,2);
// write title on each page
- WriteHeader(cnCenter,lnFin,'SHOWING GRIDS',ColDefaut,FtTitre,IlTitre);
+ WriteHeader(cnCenter,lnFin,'SHOWING GRIDS',ColDefaut,FtTitle,IlTitle);
// write page number and total of pages on each page
- NumPageFooter(cnRight,lnFin,'Page','of',True,ColDefaut,FtTexte,IlTexte);
+ NumPageFooter(cnRight,lnFin,'Page','of',True,ColDefaut,FtText,IlText);
// write a grid without borders
- WritePage(cnCenter,lnFin,'Grid without borders',ColDefaut,FtSTitre,IlTitre);
- for CptLig:= 1 to 10 do
+ WritePage(cnCenter,lnFin,'Grid without borders',ColDefaut,FtSTitle,IlTitle);
+ for CptLin:= 1 to 10 do
for CptCol:= 1 to 5 do
if CptCol= 5
then
- WritePage(cnLeft,lnFin,'line '+IntToStr(CptLig)+' ; column '+IntToStr(CptCol),Col[CptCol],FtTexte,IlTexte)
+ WritePage(cnLeft,lnFin,'line '+IntToStr(CptLin)+' ; column '+IntToStr(CptCol),Col[CptCol],FtText,IlText)
else
- WritePage(cnLeft,lnCourante,'line '+IntToStr(CptLig)+' ; column '+IntToStr(CptCol),Col[CptCol],FtTexte,IlTexte);
+ WritePage(cnLeft,lnCourante,'line '+IntToStr(CptLin)+' ; column '+IntToStr(CptCol),Col[CptCol],FtText,IlText);
SpacePage(5);
// write a grid with borders
- PosHoriz:= WritePage(cnCenter,lnFin,'Grid with borders and colors',ColDefaut,FtSTitre,IlTitre);
- LinePage(Col1Pos,PosHoriz,Col5Pos+Col5Wid,PosHoriz,TsEpaisBleu);
- for CptLig:= 1 to 10 do
+ PosHoriz:= WritePage(cnCenter,lnFin,'Grid with borders and colors',ColDefaut,FtSTitle,IlTitle);
+ LinePage(Col1Pos,PosHoriz,Col5Pos+Col5Wid,PosHoriz,TsThickBlue);
+ for CptLin:= 1 to 10 do
for CptCol:= 1 to 5 do
if CptCol= 1
then
- if CptLig mod 2= 0
+ if CptLin mod 2= 0
then
- WritePage(cnLeft,lnCourante,'line '+IntToStr(CptLig)+' ; column '+IntToStr(CptCol),Col[CptCol],FtTexte,IlTexte,FdBeige,BdColnG)
+ WritePage(cnLeft,lnCourante,'line '+IntToStr(CptLin)+' ; column '+IntToStr(CptCol),Col[CptCol],FtText,IlText,BcBeige,BdColnL)
else
- WritePage(cnLeft,lnCourante,'line '+IntToStr(CptLig)+' ; column '+IntToStr(CptCol),Col[CptCol],FtTexteBlue,IlTexte,-1,BdColnG)
+ WritePage(cnLeft,lnCourante,'line '+IntToStr(CptLin)+' ; column '+IntToStr(CptCol),Col[CptCol],FtTextBlue,IlText,-1,BdColnL)
else
if CptCol= 5
then
- if CptLig= 10
+ if CptLin= 10
then
begin
PredPosHoriz:= PosHoriz;
- PosHoriz:= WritePage(cnLeft,lnFin,'line '+IntToStr(CptLig)+' ; column '+IntToStr(CptCol),Col[CptCol],FtTexteRed,IlTexte,FdBeige,BdColnD);
- LinePage(Col1Pos,PredPosHoriz,Col5Pos+Col5Wid,PredPosHoriz,TsFinNoir);
- LinePage(Col1Pos,PosHoriz,Col5Pos+Col5Wid,PosHoriz,TsEpaisBleu);
- LinePage(Col5Pos,PredPosHoriz,Col5Pos,PosHoriz,TsFinNoir);
+ PosHoriz:= WritePage(cnLeft,lnFin,'line '+IntToStr(CptLin)+' ; column '+IntToStr(CptCol),Col[CptCol],FtTextRed,IlText,BcBeige,BdColnR);
+ LinePage(Col1Pos,PredPosHoriz,Col5Pos+Col5Wid,PredPosHoriz,TsThinBlack);
+ LinePage(Col1Pos,PosHoriz,Col5Pos+Col5Wid,PosHoriz,TsThickBlue);
+ LinePage(Col5Pos,PredPosHoriz,Col5Pos,PosHoriz,TsThinBlack);
end
else
begin
- if CptLig= 1
+ if CptLin= 1
then
- PosHoriz:= WritePage(cnLeft,lnFin,'line '+IntToStr(CptLig)+' ; column '+IntToStr(CptCol),Col[CptCol],FtTexte,IlTexte,-1,BdColnD)
+ PosHoriz:= WritePage(cnLeft,lnFin,'line '+IntToStr(CptLin)+' ; column '+IntToStr(CptCol),Col[CptCol],FtText,IlText,-1,BdColnR)
else
- if CptLig mod 2= 0
+ if CptLin mod 2= 0
then
begin
PredPosHoriz:= PosHoriz;
- PosHoriz:= WritePage(cnLeft,lnFin,'line '+IntToStr(CptLig)+' ; column '+IntToStr(CptCol),Col[CptCol],FtTexteRed,IlTexte,FdBeige,BdColnD);
- LinePage(Col1Pos,PredPosHoriz,Col5Pos+Col5Wid,PredPosHoriz,TsFinNoir);
- LinePage(Col5Pos,PredPosHoriz,Col5Pos,PosHoriz,TsFinNoir);
+ PosHoriz:= WritePage(cnLeft,lnFin,'line '+IntToStr(CptLin)+' ; column '+IntToStr(CptCol),Col[CptCol],FtTextRed,IlText,BcBeige,BdColnR);
+ LinePage(Col1Pos,PredPosHoriz,Col5Pos+Col5Wid,PredPosHoriz,TsThinBlack);
+ LinePage(Col5Pos,PredPosHoriz,Col5Pos,PosHoriz,TsThinBlack);
end
else
begin
PredPosHoriz:= PosHoriz;
- PosHoriz:= WritePage(cnLeft,lnFin,'line '+IntToStr(CptLig)+' ; column '+IntToStr(CptCol),Col[CptCol],FtTexte,IlTexte,-1,BdColnD);
- LinePage(Col1Pos,PredPosHoriz,Col5Pos+Col5Wid,PredPosHoriz,TsFinNoir);
+ PosHoriz:= WritePage(cnLeft,lnFin,'line '+IntToStr(CptLin)+' ; column '+IntToStr(CptCol),Col[CptCol],FtText,IlText,-1,BdColnR);
+ LinePage(Col1Pos,PredPosHoriz,Col5Pos+Col5Wid,PredPosHoriz,TsThinBlack);
end;
end
else
- if CptLig mod 2= 0
+ if CptLin mod 2= 0
then
- WritePage(cnLeft,lnCourante,'line '+IntToStr(CptLig)+' ; column '+IntToStr(CptCol),Col[CptCol],FtTexte,IlTexte,FdBeige,BdColn)
+ WritePage(cnLeft,lnCourante,'line '+IntToStr(CptLin)+' ; column '+IntToStr(CptCol),Col[CptCol],FtText,IlText,BcBeige,BdColn)
else
- WritePage(cnLeft,lnCourante,'line '+IntToStr(CptLig)+' ; column '+IntToStr(CptCol),Col[CptCol],FtTexteBlue,IlTexte,-1,BdColn);
+ WritePage(cnLeft,lnCourante,'line '+IntToStr(CptLin)+' ; column '+IntToStr(CptCol),Col[CptCol],FtTextBlue,IlText,-1,BdColn);
// preparation is finished, so create PDF objects
EndWrite;
end;
end;
-procedure TF_Demo.ImprimeGraph(Preview: Boolean);
+procedure TF_Demo.PrintGraph(Preview: Boolean);
var
- FtTitre,FtTexte,FtMax: Integer;
- TsNoir,TsGris,TsBleu,TsFuchsia: Integer;
- IlTitre,IlTexte: Integer;
+ FtTitle,FtText,FtMax: Integer;
+ TsBlack,TsGray,TsBlue,TsFuchsia: Integer;
+ IlTitle,IlText: Integer;
Cpt,Max: Integer;
const
Base= 150;
begin
-with FImprime do
+with FReport do
begin
// define orientation, page format, measurement unit, language, preview (true) or print (false)
BeginWrite(oPortrait,A4,msMM,Langue,Preview);
// create a new section and define the margins with an additional one due to frames drawing
Section(10,10,10,10);
// create the fonts to be used (use one of the 14 Adobe PDF standard fonts)
- FtTitre:= Font('helvetica-15:bold',clBlack);
- FtTexte:= Font('helvetica-7',clBlack);
+ FtTitle:= Font('helvetica-15:bold',clBlack);
+ FtText:= Font('helvetica-7',clBlack);
FtMax:= Font('helvetica-7',clFuchsia);
// create line spacings to be used
- IlTitre:= LineSpace(3,0,3);
- IlTexte:= LineSpace(1,0,0);
+ IlTitle:= LineSpace(3,0,3);
+ IlText:= LineSpace(1,0,0);
// create the style of lines to be used
- TsNoir:= LineStyle(1,clBlack,lsSolid);
- TsGris:= LineStyle(1,clGray,lsDot);
- TsBleu:= LineStyle(1,clBlue,lsSolid);
+ TsBlack:= LineStyle(1,clBlack,lsSolid);
+ TsGray:= LineStyle(1,clGray,lsDot);
+ TsBlue:= LineStyle(1,clBlue,lsSolid);
TsFuchsia:= LineStyle(1,clFuchsia,lsDot);
- WriteHeader(cnCenter,lnFin,'SHOWING GRAPH',ColDefaut,FtTitre,IlTitre);
+ WriteHeader(cnCenter,lnFin,'SHOWING GRAPH',ColDefaut,FtTitle,IlTitle);
// write page number and total of pages on each page
- NumPageFooter(cnRight,lnFin,'Page','of',True,ColDefaut,FtTexte,IlTexte);
+ NumPageFooter(cnRight,lnFin,'Page','of',True,ColDefaut,FtText,IlText);
// draw a graph
Max:= 0;
- WritePage(10,Base,'0',-1,FtTexte);
- LinePage(20,Base,200,Base,TsNoir);
+ WritePage(10,Base,'0',-1,FtText);
+ LinePage(20,Base,200,Base,TsBlack);
for Cpt:= 1 to 5 do
begin
- WritePage(10,Base-Cpt*20,IntToStr(Cpt),-1,FtTexte);
- LinePage(20,Base-Cpt*20,200,Base-Cpt*20,TsGris);
+ WritePage(10,Base-Cpt*20,IntToStr(Cpt),-1,FtText);
+ LinePage(20,Base-Cpt*20,200,Base-Cpt*20,TsGray);
end;
for Cpt:= 0 to 18 do
begin
if ChartValues[Cpt]> Max
then
Max:= ChartValues[Cpt];
- WritePage(18+Cpt*10,Base+5,IntToStr(Cpt),-1,FtTexte);
- LinePage(20+Cpt*10,Base,20+Cpt*10,Base-ChartValues[Cpt],TsGris);
+ WritePage(18+Cpt*10,Base+5,IntToStr(Cpt),-1,FtText);
+ LinePage(20+Cpt*10,Base,20+Cpt*10,Base-ChartValues[Cpt],TsGray);
if Cpt>0 then
- LinePage(20+Pred(Cpt)*10,Base-ChartValues[Pred(Cpt)],20+Cpt*10,Base-ChartValues[Cpt],TsBleu);
+ LinePage(20+Pred(Cpt)*10,Base-ChartValues[Pred(Cpt)],20+Cpt*10,Base-ChartValues[Cpt],TsBlue);
end;
WritePage(16,Base-Max,IntToStr(Max),-1,FtMax);
LinePage(20,Base-Max,200,Base-Max,TsFuchsia);
@@ -1411,26 +1402,26 @@ with FImprime do
end;
end;
-procedure TF_Demo.ImprimeSurf(Preview: Boolean);
+procedure TF_Demo.PrintSurf(Preview: Boolean);
var
- FtTitre,FtTexte: Integer;
- IlTitre,IlTexte: Integer;
+ FtTitle,FtText: Integer;
+ IlTitle,IlText: Integer;
begin
-with FImprime do
+with FReport do
begin
// define orientation, page format, measurement unit, language, preview (true) or print (false)
BeginWrite(oPortrait,A4,msMM,Langue,Preview);
// create a new section and define the margins with an additional one due to frames drawing
Section(10,10,10,10);
// create the fonts to be used (use one of the 14 Adobe PDF standard fonts)
- FtTitre:= Font('helvetica-15:bold',clBlack);
- FtTexte:= Font('helvetica-7',clBlack);
+ FtTitle:= Font('helvetica-15:bold',clBlack);
+ FtText:= Font('helvetica-7',clBlack);
// create line spacings to be used
- IlTitre:= LineSpace(3,0,3);
- IlTexte:= LineSpace(1,0,0);
- WriteHeader(cnCenter,lnFin,'SHOWING SURFACE',ColDefaut,FtTitre,IlTitre);
+ IlTitle:= LineSpace(3,0,3);
+ IlText:= LineSpace(1,0,0);
+ WriteHeader(cnCenter,lnFin,'SHOWING SURFACE',ColDefaut,FtTitle,IlTitle);
// write page number and total of pages on each page
- NumPageFooter(cnRight,lnFin,'Page','of',True,ColDefaut,FtTexte,IlTexte);
+ NumPageFooter(cnRight,lnFin,'Page','of',True,ColDefaut,FtText,IlText);
// paint some surfaces
SurfPage([40,40,100],[50,110,80],clGreen);
SurfPage([30,50,150,80,120,130],[120,180,180,160,140,120],clFuchsia);
@@ -1503,8 +1494,8 @@ Bt_PrintGraph:= CreateButton(Self,450,390,150,'Show graph',@Bt_PrintGraphClick,'
Bt_PrintGraph.Enabled:= False;
Bt_PrintSurf:= CreateButton(Self,450,430,150,'Show surface',@Bt_PrintSurfClick,'stdimg.print');
Bt_PrintSurf.Enabled:= False;
-Bt_Fermer:= CreateButton(Self,450,500,150,'Fermer',@Bt_FermerClick,'stdimg.exit');
-Bt_Fermer.BackgroundColor:= clTomato;
+Bt_Exit:= CreateButton(Self,450,500,150,'Fermer',@Bt_ExitClick,'stdimg.exit');
+Bt_Exit.BackgroundColor:= clTomato;
Randomize;
for Cpt:= 0 to 18 do
ChartValues[Cpt]:= Round(Random*100);
diff --git a/extras/contributed/report_tool/reportengine/u_command.pas b/extras/contributed/report_tool/reportengine/u_command.pas
index fc35cf41..292479a3 100644
--- a/extras/contributed/report_tool/reportengine/u_command.pas
+++ b/extras/contributed/report_tool/reportengine/u_command.pas
@@ -27,7 +27,7 @@ uses
type
TZone = (zEnTete,zPied,zPage,zMarges);
TSectPageNum = (PageNum,SectNum,PSectNum);
- TFBordFlags= set of (bcGauche,bcDroite,bcHaut,bcBas);
+ TBorderFlags= set of (bfLeft,bfRight,bfTop,bfBottom);
TDimensions= record
T: Single;
@@ -36,10 +36,10 @@ type
B: Single;
end;
- TPapier= record
+ TPaper= record
H: Integer;
W: Integer;
- Imprimable: TDimensions;
+ Printable: TDimensions;
end;
// document classes
@@ -48,160 +48,160 @@ type
private
FNumSect: Integer;
FNbPages: Integer;
- FPaper: TPapier;
- FMarges: TDimensions;
- FBasEnTete: Single;
- FHautPied: Single;
+ FPaper: TPaper;
+ FMargins: TDimensions;
+ FBotHead: Single;
+ FTopFoot: Single;
FPages: TList;
- FEnTete: TList;
- FPied: TList;
- FCadres: TList;
- FColonnes: TList;
- FTitre: string;
+ FHeader: TList;
+ FFooter: TList;
+ FFrames: TList;
+ FColumns: TList;
+ FTitle: string;
function GetFirstPage: Integer;
function GetTotalPages: Integer;
public
- constructor Create(APaper: TPapier; AMarges: TDimensions; ANum: Integer); virtual;
+ constructor Create(APaper: TPaper; AMargins: TDimensions; ANum: Integer); virtual;
destructor Destroy; override;
procedure LoadPage(APageNum: Integer);
- procedure LoadCmdEnTete;
+ procedure LoadCmdHeader;
procedure LoadCmdPage;
- procedure LoadCmdPied;
- procedure LoadCmdGroupe;
- procedure LoadCmdGroupeToPage;
- procedure LoadEspaceEnTete(APosY: Single; AColonne: Integer; AHeight: Single; AFond: Integer);
- procedure LoadEspacePage(APosY: Single; AColonne: Integer; AHeight: Single; AFond: Integer);
- procedure LoadEspacePied(APosY: Single; AColonne: Integer; AHeight: Single; AFond: Integer);
- procedure LoadEspaceGroupe(AHeight: Single);
- procedure LoadCadre(AStyle: Integer; AZone: TZone);
- procedure LoadTrait(APosXDeb,APosYDeb: Single; AColonne: Integer; APosXFin,APosYFin: Single; AStyle: Integer);
- procedure LoadTraitHorizEnTete(APosXDeb,APosYDeb: Single; AColonne: Integer; APosXFin,APosYFin: Single; AStyle: Integer);
- procedure LoadTraitHorizPage(APosXDeb,APosYDeb: Single; AColonne: Integer; APosXFin,APosYFin: Single; AStyle: Integer);
- procedure LoadTraitHorizPied(APosXDeb,APosYDeb: Single; AColonne: Integer; APosXFin,APosYFin: Single; AStyle: Integer);
- procedure LoadTraitHorizGroupe(AHeight: Single);
+ procedure LoadCmdFooter;
+ procedure LoadCmdGroup;
+ procedure LoadCmdGroupToPage;
+ procedure LoadSpaceHeader(APosY: Single; AColumn: Integer; AHeight: Single; ABackColor: Integer);
+ procedure LoadSpacePage(APosY: Single; AColumn: Integer; AHeight: Single; ABackColor: Integer);
+ procedure LoadSpaceFooter(APosY: Single; AColumn: Integer; AHeight: Single; ABackColor: Integer);
+ procedure LoadSpaceGroup(AHeight: Single);
+ procedure LoadFrame(AStyle: Integer; AZone: TZone);
+ procedure LoadLine(APosXBegin,APosYBegin: Single; AColumn: Integer; APosXEnd,APosYEnd: Single; AStyle: Integer);
+ procedure LoadLineHorizEnTete(APosXBegin,APosYBegin: Single; AColumn: Integer; APosXEnd,APosYEnd: Single; AStyle: Integer);
+ procedure LoadLineHorizPage(APosXBegin,APosYBegin: Single; AColumn: Integer; APosXEnd,APosYEnd: Single; AStyle: Integer);
+ procedure LoadLineHorizPied(APosXBegin,APosYBegin: Single; AColumn: Integer; APosXEnd,APosYEnd: Single; AStyle: Integer);
+ procedure LoadLineHorizGroupe(AHeight: Single);
procedure LoadSurf(APos: T_Points; AColor: TfpgColor);
function GetCmdPage(NumPage: Integer): TList;
- property CmdEnTete: TList read FEntete;
- property CmdPied: TList read FPied;
+ property CmdHeader: TList read FHeader;
+ property CmdFooter: TList read FFooter;
property NbPages: Integer read FNbPages;
property FirstPage: Integer read GetFirstPage;
property Pages: TList read FPages;
property TotPages: Integer read GetTotalPages;
- property Paper: TPapier read FPaper;
- property Marges: TDimensions read FMarges;
- property CmdCadres: TList read FCadres;
- property Colonnes: TList read FColonnes;
- property Titre: string read FTitre write FTitre;
+ property Paper: TPaper read FPaper;
+ property Margins: TDimensions read FMargins;
+ property CmdFrames: TList read FFrames;
+ property Columns: TList read FColumns;
+ property Title: string read FTitle write FTitle;
end;
T_Page = class
private
FNumPageTot: Integer;
FNumPageSect: Integer;
- FCommandes: TList;
+ FCommands: TList;
public
constructor Create(ANumSec,ANumTot: Integer); virtual;
destructor Destroy; override;
- property Commandes: TList read FCommandes write FCommandes;
+ property Commands: TList read FCommands write FCommands;
property PagesTot: Integer read FNumPageTot;
property PagesSect: Integer read FNumPageSect;
end;
- T_Groupe = class
+ T_Group = class
private
FLineHeight: Single;
- FGroupeHeight: Single;
- FCommandes: TList;
+ FGroupHeight: Single;
+ FCommands: TList;
public
constructor Create; virtual;
destructor Destroy; override;
- property Commandes: TList read FCommandes write FCommandes;
+ property Commands: TList read FCommands write FCommands;
property LineHeight: Single read FLineHeight;
- property GroupeHeight: Single read FGroupeHeight;
+ property GroupeHeight: Single read FGroupHeight;
end;
- T_Ligne = class
+ T_WriteLine = class
private
FHeight: Integer;
- FCommandes: TList;
+ FCommands: TList;
public
constructor Create; virtual;
destructor Destroy; override;
- procedure LoadTexte(APosX,APosY: Single; AColonne,ATexte,AFonte,AHeight,AFond,ABord,AInterL: Integer;
+ procedure LoadText(APosX,APosY: Single; AColumn,AText,AFont,AHeight,ABackColor,ABorder,ALineSpace: Integer;
ACurFont: Boolean; AFlags: TfpgTextFlags);
- procedure LoadNumero(APosX,APosY: Single; AColonne,ATexteNum,ATexteTot,AFonte,AHeight,AFond,ABord,AInterL: Integer;
+ procedure LoadNumber(APosX,APosY: Single; AColumn,ATextNum,ATextTot,AFont,AHeight,ABackColor,ABorder,ALineSpace: Integer;
ACurFont: Boolean; AFlags: TfpgTextFlags; ATotal,AAlpha: Boolean; ATypeNum: TSectPageNum);
- property Commandes: TList read FCommandes;
+ property Commands: TList read FCommands;
property LineHeight: Integer read FHeight;
end;
// command classes
- T_Commande = class
+ T_Command = class
end;
PSection = ^T_Section;
PPage = ^T_Page;
- PLigne = ^T_Ligne;
- PCommande = ^T_Commande;
+ PLigne = ^T_WriteLine;
+ PCommande = ^T_Command;
PFont = ^TfpgFont;
- T_EcritTexte = class(T_Commande)
+ T_WriteText = class(T_Command)
private
FPosX: Single;
FPosY: Single;
- FColonne: Integer;
- FTexte: Integer;
- FFonte: Integer;
- FFond: Integer;
- FBord: Integer;
- FInterL: Integer;
+ FColumn: Integer;
+ FText: Integer;
+ FFont: Integer;
+ FBackColor: Integer;
+ FBorder: Integer;
+ FLineSpace: Integer;
FCurFont: Boolean;
FFlags: TfpgTextFlags;
public
- constructor Create(APosX,APosY: Single; AColonne,ATexte,AFonte,AFond,ABord,AInterL: Integer; ACurFont: Boolean; AFlags: TfpgTextFlags); virtual;
+ constructor Create(APosX,APosY: Single; AColumn,AText,AFont,ABackColor,ABorder,ALineSpace: Integer; ACurFont: Boolean; AFlags: TfpgTextFlags); virtual;
procedure SetPosY(const AValue: Single);
property GetPosX: Single read FPosX;
property GetPosY: Single read FPosY;
- property GetColonne: Integer read FColonne;
- property GetTexte: Integer read FTexte;
- property GetFonte: Integer read FFonte;
- property GetFond: Integer read FFond;
- property GetBord: Integer read FBord;
- property GetInterL: Integer read FInterL;
+ property GetColumn: Integer read FColumn;
+ property GetText: Integer read FText;
+ property GetFont: Integer read FFont;
+ property GetBackColor: Integer read FBackColor;
+ property GetBorder: Integer read FBorder;
+ property GetLineSpace: Integer read FLineSpace;
property GetCurFont: Boolean read FCurFont;
property GetFlags: TfpgTextFlags read FFlags;
end;
- T_Numero = class(T_Commande)
+ T_Number = class(T_Command)
private
FPosX: Single;
FPosY: Single;
- FColonne: Integer;
- FTexteNum: Integer;
- FTexteTot: Integer;
- FFonte: Integer;
- FFond: Integer;
- FBord: Integer;
- FInterL: Integer;
+ FColumn: Integer;
+ FTextNum: Integer;
+ FTextTot: Integer;
+ FFont: Integer;
+ FBackColor: Integer;
+ FBorder: Integer;
+ FLineSpace: Integer;
FCurFont: Boolean;
FFlags: TfpgTextFlags;
FTotal: Boolean;
FAlpha: Boolean;
FTypeNum: TSectPageNum;
public
- constructor Create(APosX,APosY: Single; AColonne,ATexteNum,ATexteTot,AFonte,AFond,ABord,AInterL: Integer;
+ constructor Create(APosX,APosY: Single; AColumn,ATextNum,ATextTot,AFont,ABackColor,ABorder,ALineSpace: Integer;
ACurFont: Boolean; AFlags: TfpgTextFlags; ATotal,AAlpha: Boolean; ATypeNum: TSectPageNum); virtual;
procedure SetPosY(const AValue: Single);
property GetPosX: Single read FPosX;
property GetPosY: Single read FPosY;
- property GetColonne: Integer read FColonne;
- property GetTexteNum: Integer read FTexteNum;
- property GetTexteTot: Integer read FTexteTot;
- property GetFonte: Integer read FFonte;
- property GetFond: Integer read FFond;
- property GetBord: Integer read FBord;
- property GetInterL: Integer read FInterL;
+ property GetColumn: Integer read FColumn;
+ property GetTextNum: Integer read FTextNum;
+ property GetTextTot: Integer read FTextTot;
+ property GetFont: Integer read FFont;
+ property GetBackColor: Integer read FBackColor;
+ property GetBorder: Integer read FBorder;
+ property GetLineSpace: Integer read FLineSpace;
property GetCurFont: Boolean read FCurFont;
property GetFlags: TfpgTextFlags read FFlags;
property GetTotal: Boolean read FTotal;
@@ -209,25 +209,25 @@ type
property GetTypeNum: TSectPageNum read FTypeNum;
end;
- T_Trait = class(T_Commande)
+ T_Line = class(T_Command)
private
FPosX: Single;
FPosY: Single;
- FColonne: Integer;
+ FColumn: Integer;
FStyle: Integer;
FEndX: Single;
FEndY: Single;
public
- constructor Create(APosX,APosY: Single; AColonne,AStyle: Integer; AEndX,AEndY: Single); virtual;
+ constructor Create(APosX,APosY: Single; AColumn,AStyle: Integer; AEndX,AEndY: Single); virtual;
property GetPosX: Single read FPosX;
property GetPosY: Single read FPosY;
- property GetColonne: Integer read FColonne;
+ property GetColumn: Integer read FColumn;
property GetStyle: Integer read FStyle;
property GetEndX: Single read FEndX;
property GetEndY: Single read FEndY;
end;
- T_Colonne = class(T_Commande)
+ T_Column = class(T_Command)
private
FPos: Single;
FWidth: Single;
@@ -244,21 +244,21 @@ type
property GetColor: TfpgColor read FColor;
end;
- T_Fonte = class(T_Commande)
+ T_Font = class(T_Command)
private
- FFonte: TfpgFont;
+ FFont: TfpgFont;
FColor: TfpgColor;
FSize: string;
public
- constructor Create(AFonte: string; AColor: TfpgColor); virtual;
+ constructor Create(AFont: string; AColor: TfpgColor); virtual;
destructor Destroy; override;
function GetHeight: Integer;
- property GetFonte: TfpgFont read FFonte;
+ property GetFont: TfpgFont read FFont;
property GetColor: TfpgColor read FColor;
property GetSize: string read FSize;
end;
- T_Interligne = class(T_Commande)
+ T_LineSpace = class(T_Command)
private
FSup: Single;
FInt: Single;
@@ -270,22 +270,22 @@ type
property GetInf: Single read FInf;
end;
- T_Espace = class(T_Commande)
+ T_Space = class(T_Command)
private
FPosY: Single;
- FColonne: Integer;
+ FColumn: Integer;
FHeight: Single;
- FFond: Integer;
+ FBackColor: Integer;
public
- constructor Create(APosY: Single; AColonne: Integer; AHeight: Single; AFond: Integer); virtual;
+ constructor Create(APosY: Single; AColumn: Integer; AHeight: Single; ABackColor: Integer); virtual;
procedure SetPosY(const AValue: Single);
property GetPosY: Single read FPosY;
- property GetColonne: Integer read FColonne;
+ property GetColumn: Integer read FColumn;
property GetHeight: Single read FHeight;
- property GetFond: Integer read FFond;
+ property GetBackColor: Integer read FBackColor;
end;
- T_Fond = class(T_Commande)
+ T_BackColor = class(T_Command)
private
FColor: TfpgColor;
public
@@ -293,29 +293,29 @@ type
property GetColor: TfpgColor read FColor;
end;
- T_TraitStyle = class(T_Commande)
+ T_LineStyle = class(T_Command)
private
- FEpais: Single;
+ FThick: Single;
FColor: TfpgColor;
FStyle: TfpgLineStyle;
public
- constructor Create(AEpais: Single; AColor: Tfpgcolor; AStyle: TfpgLineStyle); virtual;
- property GetEpais: Single read FEpais;
+ constructor Create(AThick: Single; AColor: Tfpgcolor; AStyle: TfpgLineStyle); virtual;
+ property GetThick: Single read FThick;
property GetColor: TfpgColor read FColor;
property GetStyle: TfpgLineStyle read FStyle;
end;
- T_Bord = class(T_Commande)
+ T_Border = class(T_Command)
private
- FFlags: TFBordFlags;
+ FFlags: TBorderFlags;
FStyle: Integer;
public
- constructor Create(AFlags: TFBordFlags; AStyle: Integer);
- property GetFlags: TFBordFlags read FFlags;
+ constructor Create(AFlags: TBorderFlags; AStyle: Integer);
+ property GetFlags: TBorderFlags read FFlags;
property GetStyle: Integer read FStyle;
end;
- T_Cadre = class(T_Commande)
+ T_Frame = class(T_Command)
private
FStyle: Integer;
FZone: TZone;
@@ -325,7 +325,7 @@ type
property GetZone: TZone read FZone;
end;
- T_Surface = class(T_Commande)
+ T_Surface = class(T_Command)
private
FPoints: T_Points;
FColor: TfpgColor;
@@ -337,24 +337,24 @@ type
var
Sections: TList;
-// Colonnes: TList;
- Textes: TStringList;
- Fontes: TList;
- Interlignes: TList;
- Fonds: TList;
- TraitStyles: TList;
- Bords: TList;
- ASection: T_Section;
- APage: T_Page;
- AGroupe: T_Groupe;
- ALigne: T_Ligne;
- ACommande: T_Commande;
- AColonne: T_Colonne;
- AFond: T_Fond;
- AFonte: T_Fonte;
- AInterligne: T_Interligne;
- ATraitStyle: T_TraitStyle;
- ABord: T_Bord;
+// Columns: TList;
+ Texts: TStringList;
+ Fonts: TList;
+ LineSpaces: TList;
+ BackColors: TList;
+ LineStyles: TList;
+ Borders: TList;
+ VSection: T_Section;
+ VPage: T_Page;
+ VGroup: T_Group;
+ VWriteLine: T_WriteLine;
+ VCommand: T_Command;
+ VColumn: T_Column;
+ VBackColor: T_BackColor;
+ VFont: T_Font;
+ VLineSpace: T_LineSpace;
+ VLineStyle: T_LineStyle;
+ VBorder: T_Border;
implementation
@@ -387,19 +387,19 @@ else
Result:= 0;
end;
-constructor T_Section.Create(APaper: TPapier; AMarges: TDimensions; ANum: Integer);
+constructor T_Section.Create(APaper: TPaper; AMargins: TDimensions; ANum: Integer);
begin
FNumSect:= ANum;
FNbPages:= 0;
FPaper:= APaper;
-FMarges:= AMarges;
-FBasEnTete:= FMarges.T;
-FHautPied:= FMarges.B;
+FMargins:= AMargins;
+FBotHead:= FMargins.T;
+FTopFoot:= FMargins.B;
FPages:= TList.Create;
-FEnTete:= TList.Create;
-FPied:= TList.Create;
-FCadres:= TList.Create;
-FColonnes:= TList.Create;
+FHeader:= TList.Create;
+FFooter:= TList.Create;
+FFrames:= TList.Create;
+FColumns:= TList.Create;
end;
destructor T_Section.Destroy;
@@ -411,281 +411,281 @@ then
for Cpt:= 0 to Pred(FPages.Count) do
T_Page(FPages[Cpt]).Free;
FPages.Free;
-if FEntete.Count> 0
+if FHeader.Count> 0
then
- for Cpt:= 0 to Pred(FEntete.Count) do
- T_Commande(FEntete[Cpt]).Free;
-FEnTete.Free;
-if FPied.Count> 0
+ for Cpt:= 0 to Pred(FHeader.Count) do
+ T_Command(FHeader[Cpt]).Free;
+FHeader.Free;
+if FFooter.Count> 0
then
- for Cpt:= 0 to Pred(FPied.Count) do
- T_Commande(FPied[Cpt]).Free;
-FPied.Free;
-if FCadres.Count> 0
+ for Cpt:= 0 to Pred(FFooter.Count) do
+ T_Command(FFooter[Cpt]).Free;
+FFooter.Free;
+if FFrames.Count> 0
then
- for Cpt:= 0 to Pred(FCadres.Count) do
- T_Commande(FCadres[Cpt]).Free;
-FCadres.Free;
-if FColonnes.Count> 0
+ for Cpt:= 0 to Pred(FFrames.Count) do
+ T_Command(FFrames[Cpt]).Free;
+FFrames.Free;
+if FColumns.Count> 0
then
- for Cpt:= 0 to Pred(FColonnes.Count) do
- T_Commande(FColonnes[Cpt]).Free;
-FColonnes.Free;
+ for Cpt:= 0 to Pred(FColumns.Count) do
+ T_Command(FColumns[Cpt]).Free;
+FColumns.Free;
inherited Destroy;
end;
procedure T_Section.LoadPage(APageNum: Integer);
begin
Inc(FNbPages);
-APage:= T_Page.Create(FNbPages,APageNum);
-FPages.Add(APage);
+VPage:= T_Page.Create(FNbPages,APageNum);
+FPages.Add(VPage);
end;
-procedure T_Section.LoadCmdEnTete;
+procedure T_Section.LoadCmdHeader;
var
Cpt: Integer;
begin
-for Cpt:= 0 to Pred(ALigne.Commandes.Count) do
- FEnTete.Add(ALigne.Commandes.Items[Cpt]);
-ALigne.FHeight:= 0;
-ALigne.Commandes.Clear;
+for Cpt:= 0 to Pred(VWriteLine.Commands.Count) do
+ FHeader.Add(VWriteLine.Commands.Items[Cpt]);
+VWriteLine.FHeight:= 0;
+VWriteLine.Commands.Clear;
end;
procedure T_Section.LoadCmdPage;
var
Cpt: Integer;
begin
-for Cpt:= 0 to Pred(ALigne.Commandes.Count) do
- T_Page(Pages[Pred(FPages.Count)]).Commandes.Add(ALigne.Commandes.Items[Cpt]);
-ALigne.FHeight:= 0;
-ALigne.Commandes.Clear;
+for Cpt:= 0 to Pred(VWriteLine.Commands.Count) do
+ T_Page(Pages[Pred(FPages.Count)]).Commands.Add(VWriteLine.Commands.Items[Cpt]);
+VWriteLine.FHeight:= 0;
+VWriteLine.Commands.Clear;
end;
-procedure T_Section.LoadCmdPied;
+procedure T_Section.LoadCmdFooter;
var
Cpt: Integer;
begin
-for Cpt:= 0 to Pred(ALigne.Commandes.Count) do
- FPied.Add(ALigne.Commandes.Items[Cpt]);
-ALigne.FHeight:= 0;
-ALigne.Commandes.Clear;
+for Cpt:= 0 to Pred(VWriteLine.Commands.Count) do
+ FFooter.Add(VWriteLine.Commands.Items[Cpt]);
+VWriteLine.FHeight:= 0;
+VWriteLine.Commands.Clear;
end;
-procedure T_Section.LoadCmdGroupe;
+procedure T_Section.LoadCmdGroup;
var
Cpt: Integer;
begin
-for Cpt:= 0 to Pred(ALigne.Commandes.Count) do
- AGroupe.Commandes.Add(ALigne.Commandes.Items[Cpt]);
-with AGroupe do
+for Cpt:= 0 to Pred(VWriteLine.Commands.Count) do
+ VGroup.Commands.Add(VWriteLine.Commands.Items[Cpt]);
+with VGroup do
begin
- FLineHeight:= ALigne.FHeight;
- FGroupeHeight:= FGroupeHeight+FLineHeight;
+ FLineHeight:= VWriteLine.FHeight;
+ FGroupHeight:= FGroupHeight+FLineHeight;
end;
-ALigne.FHeight:= 0;
-ALigne.Commandes.Clear;
+VWriteLine.FHeight:= 0;
+VWriteLine.Commands.Clear;
end;
-procedure T_Section.LoadCmdGroupeToPage;
+procedure T_Section.LoadCmdGroupToPage;
var
Cpt: Integer;
begin
-for Cpt:= 0 to Pred(AGroupe.Commandes.Count) do
- T_Page(Pages[Pred(FPages.Count)]).Commandes.Add(AGroupe.Commandes.Items[Cpt]);
-AGroupe.FGroupeHeight:= 0;
-AGroupe.Commandes.Clear;
+for Cpt:= 0 to Pred(VGroup.Commands.Count) do
+ T_Page(Pages[Pred(FPages.Count)]).Commands.Add(VGroup.Commands.Items[Cpt]);
+VGroup.FGroupHeight:= 0;
+VGroup.Commands.Clear;
end;
-procedure T_Section.LoadEspaceEnTete(APosY: Single; AColonne: Integer; AHeight: Single; AFond: Integer);
+procedure T_Section.LoadSpaceHeader(APosY: Single; AColumn: Integer; AHeight: Single; ABackColor: Integer);
begin
-ACommande:= T_Espace.Create(APosY,AColonne,AHeight,AFond);
-FEnTete.Add(ACommande);
+VCommand:= T_Space.Create(APosY,AColumn,AHeight,ABackColor);
+FHeader.Add(VCommand);
end;
-procedure T_Section.LoadEspacePage(APosY: Single; AColonne: Integer; AHeight: Single; AFond: Integer);
+procedure T_Section.LoadSpacePage(APosY: Single; AColumn: Integer; AHeight: Single; ABackColor: Integer);
begin
-ACommande:= T_Espace.Create(APosY,AColonne,AHeight,AFond);
-T_Page(Pages[Pred(FPages.Count)]).Commandes.Add(ACommande);
+VCommand:= T_Space.Create(APosY,AColumn,AHeight,ABackColor);
+T_Page(Pages[Pred(FPages.Count)]).Commands.Add(VCommand);
end;
-procedure T_Section.LoadEspacePied(APosY: Single; AColonne: Integer; AHeight: Single; AFond: Integer);
+procedure T_Section.LoadSpaceFooter(APosY: Single; AColumn: Integer; AHeight: Single; ABackColor: Integer);
begin
-ACommande:= T_Espace.Create(APosY,AColonne,AHeight,AFond);
-FPied.Add(ACommande);
+VCommand:= T_Space.Create(APosY,AColumn,AHeight,ABackColor);
+FFooter.Add(VCommand);
end;
-procedure T_Section.LoadEspaceGroupe(AHeight: Single);
+procedure T_Section.LoadSpaceGroup(AHeight: Single);
begin
-AGroupe.FGroupeHeight:= AGroupe.FGroupeHeight+AHeight;
+VGroup.FGroupHeight:= VGroup.FGroupHeight+AHeight;
end;
-procedure T_Section.LoadCadre(AStyle: Integer; AZone: TZone);
+procedure T_Section.LoadFrame(AStyle: Integer; AZone: TZone);
begin
-ACommande:= T_Cadre.Create(AStyle,AZone);
-FCadres.Add(ACommande);
+VCommand:= T_Frame.Create(AStyle,AZone);
+FFrames.Add(VCommand);
end;
-procedure T_Section.LoadTrait(APosXDeb,APosYDeb: Single; AColonne: Integer; APosXFin,APosYFin: Single; AStyle: Integer);
+procedure T_Section.LoadLine(APosXBegin,APosYBegin: Single; AColumn: Integer; APosXEnd,APosYEnd: Single; AStyle: Integer);
begin
-ACommande:= T_Trait.Create(APosXDeb,APosYDeb,AColonne,AStyle,APosXFin,APosYFin);
-T_Page(Pages[Pred(FPages.Count)]).Commandes.Add(ACommande);
+VCommand:= T_Line.Create(APosXBegin,APosYBegin,AColumn,AStyle,APosXEnd,APosYEnd);
+T_Page(Pages[Pred(FPages.Count)]).Commands.Add(VCommand);
end;
-procedure T_Section.LoadTraitHorizEnTete(APosXDeb,APosYDeb: Single; AColonne: Integer; APosXFin,APosYFin: Single;
+procedure T_Section.LoadLineHorizEnTete(APosXBegin,APosYBegin: Single; AColumn: Integer; APosXEnd,APosYEnd: Single;
AStyle: Integer);
begin
-ACommande:= T_Trait.Create(APosXDeb,APosYDeb,AColonne,AStyle,APosXFin,APosYFin);
-FEnTete.Add(ACommande);
+VCommand:= T_Line.Create(APosXBegin,APosYBegin,AColumn,AStyle,APosXEnd,APosYEnd);
+FHeader.Add(VCommand);
end;
-procedure T_Section.LoadTraitHorizPage(APosXDeb,APosYDeb: Single; AColonne: Integer; APosXFin,APosYFin: Single; AStyle: Integer);
+procedure T_Section.LoadLineHorizPage(APosXBegin,APosYBegin: Single; AColumn: Integer; APosXEnd,APosYEnd: Single; AStyle: Integer);
begin
-ACommande:= T_Trait.Create(APosXDeb,APosYDeb,AColonne,AStyle,APosXFin,APosYFin);
-T_Page(Pages[Pred(FPages.Count)]).Commandes.Add(ACommande);
+VCommand:= T_Line.Create(APosXBegin,APosYBegin,AColumn,AStyle,APosXEnd,APosYEnd);
+T_Page(Pages[Pred(FPages.Count)]).Commands.Add(VCommand);
end;
-procedure T_Section.LoadTraitHorizPied(APosXDeb,APosYDeb: Single; AColonne: Integer; APosXFin,APosYFin: Single; AStyle: Integer);
+procedure T_Section.LoadLineHorizPied(APosXBegin,APosYBegin: Single; AColumn: Integer; APosXEnd,APosYEnd: Single; AStyle: Integer);
begin
-ACommande:= T_Trait.Create(APosXDeb,APosYDeb,AColonne,AStyle,APosXFin,APosYFin);
-FPied.Add(ACommande);
+VCommand:= T_Line.Create(APosXBegin,APosYBegin,AColumn,AStyle,APosXEnd,APosYEnd);
+FFooter.Add(VCommand);
end;
-procedure T_Section.LoadTraitHorizGroupe(AHeight: Single);
+procedure T_Section.LoadLineHorizGroupe(AHeight: Single);
begin
-AGroupe.FGroupeHeight:= AGroupe.FGroupeHeight+AHeight;
+VGroup.FGroupHeight:= VGroup.FGroupHeight+AHeight;
end;
procedure T_Section.LoadSurf(APos: T_Points; AColor: TfpgColor);
begin
-Acommande:= T_Surface.Create(APos,AColor);
-T_Page(Pages[Pred(FPages.Count)]).Commandes.Add(ACommande);
+VCommand:= T_Surface.Create(APos,AColor);
+T_Page(Pages[Pred(FPages.Count)]).Commands.Add(VCommand);
end;
function T_Section.GetCmdPage(NumPage: Integer): TList;
begin
-Result:= T_Page(Pages[Pred(NumPage)]).Commandes;
+Result:= T_Page(Pages[Pred(NumPage)]).Commands;
end;
constructor T_Page.Create(ANumSec,ANumTot: Integer);
begin
FNumPageTot:= ANumTot;
FNumPageSect:= ANumSec;
-FCommandes:= TList.Create;
+FCommands:= TList.Create;
end;
destructor T_Page.Destroy;
var
Cpt: Integer;
begin
-if FCommandes.Count> 0
+if FCommands.Count> 0
then
- for Cpt:= 0 to Pred(FCommandes.Count) do
- T_Commande(FCommandes[Cpt]).Free;
-FCommandes.Free;
+ for Cpt:= 0 to Pred(FCommands.Count) do
+ T_Command(FCommands[Cpt]).Free;
+FCommands.Free;
inherited Destroy;
end;
-constructor T_Groupe.Create;
+constructor T_Group.Create;
begin
FLineHeight:= 0;
-FGroupeHeight:= 0;
-FCommandes:= TList.Create;
+FGroupHeight:= 0;
+FCommands:= TList.Create;
end;
-destructor T_Groupe.Destroy;
+destructor T_Group.Destroy;
var
Cpt: Integer;
begin
-if FCommandes.Count> 0
+if FCommands.Count> 0
then
- for Cpt:= 0 to Pred(FCommandes.Count) do
- T_Commande(FCommandes[Cpt]).Free;
-FCommandes.Free;
+ for Cpt:= 0 to Pred(FCommands.Count) do
+ T_Command(FCommands[Cpt]).Free;
+FCommands.Free;
inherited Destroy;
end;
-constructor T_Ligne.Create;
+constructor T_WriteLine.Create;
begin
FHeight:= 0;
-FCommandes:= TList.Create;
+FCommands:= TList.Create;
end;
-destructor T_Ligne.Destroy;
+destructor T_WriteLine.Destroy;
var
Cpt: Integer;
begin
-if FCommandes.Count> 0
+if FCommands.Count> 0
then
- for Cpt:= 0 to Pred(FCommandes.Count) do
- T_Commande(FCommandes[Cpt]).Free;
-FCommandes.Free;
+ for Cpt:= 0 to Pred(FCommands.Count) do
+ T_Command(FCommands[Cpt]).Free;
+FCommands.Free;
inherited Destroy;
end;
-procedure T_Ligne.LoadTexte(APosX,APosY: Single; AColonne,ATexte,AFonte,AHeight,AFond,ABord,AInterL: Integer;
+procedure T_WriteLine.LoadText(APosX,APosY: Single; AColumn,AText,AFont,AHeight,ABackColor,ABorder,ALineSpace: Integer;
ACurFont: Boolean; AFlags: TfpgTextFlags);
begin
if FHeight< AHeight
then
FHeight:= AHeight;
-ACommande:= T_EcritTexte.Create(APosX,APosY,AColonne,ATexte,AFonte,AFond,ABord,AInterL,ACurFont,AFlags);
-Commandes.Add(ACommande);
+VCommand:= T_WriteText.Create(APosX,APosY,AColumn,AText,AFont,ABackColor,ABorder,ALineSpace,ACurFont,AFlags);
+Commands.Add(VCommand);
end;
-procedure T_Ligne.LoadNumero(APosX,APosY: Single; AColonne,ATexteNum,ATexteTot,AFonte,AHeight,AFond,ABord,AInterL: Integer;
+procedure T_WriteLine.LoadNumber(APosX,APosY: Single; AColumn,ATextNum,ATextTot,AFont,AHeight,ABackColor,ABorder,ALineSpace: Integer;
ACurFont: Boolean; AFlags: TfpgTextFlags; ATotal,AAlpha: Boolean; ATypeNum: TSectPageNum);
begin
if FHeight< AHeight
then
FHeight:= AHeight;
-ACommande:= T_Numero.Create(APosX,APosY,AColonne,ATexteNum,ATexteTot,AFonte,AFond,ABord,AInterL,ACurFont,AFlags,ATotal,AAlpha,ATypeNum);
-Commandes.Add(ACommande);
+VCommand:= T_Number.Create(APosX,APosY,AColumn,ATextNum,ATextTot,AFont,ABackColor,ABorder,ALineSpace,ACurFont,AFlags,ATotal,AAlpha,ATypeNum);
+Commands.Add(VCommand);
end;
// command class methods
-procedure T_EcritTexte.SetPosY(const AValue: Single);
+procedure T_WriteText.SetPosY(const AValue: Single);
begin
if FPosY<> AValue
then
FPosY:= AValue;
end;
-constructor T_EcritTexte.Create(APosX,APosY: Single; AColonne,ATexte,AFonte,AFond,ABord,AInterL: Integer; ACurFont: Boolean; AFlags: TfpgTextFlags);
+constructor T_WriteText.Create(APosX,APosY: Single; AColumn,AText,AFont,ABackColor,ABorder,ALineSpace: Integer; ACurFont: Boolean; AFlags: TfpgTextFlags);
begin
inherited Create;
FPosX:= APosX;
FPosY:= APosY;
-FColonne:= AColonne;
-FTexte:= ATexte;
-FFonte:= AFonte;
-FFond:= AFond;
-FBord:= ABord;
-FInterL:= AInterL;
+FColumn:= AColumn;
+FText:= AText;
+FFont:= AFont;
+FBackColor:= ABackColor;
+FBorder:= ABorder;
+FLineSpace:= ALineSpace;
FCurFont:= ACurFont;
FFlags:= AFlags;
end;
-procedure T_Numero.SetPosY(const AValue: Single);
+procedure T_Number.SetPosY(const AValue: Single);
begin
if FPosY<> AValue
then
FPosY:= AValue;
end;
-constructor T_Numero.Create(APosX,APosY: Single; AColonne,ATexteNum,ATexteTot,AFonte,AFond,ABord,AInterL: Integer;
+constructor T_Number.Create(APosX,APosY: Single; AColumn,ATextNum,ATextTot,AFont,ABackColor,ABorder,ALineSpace: Integer;
ACurFont: Boolean; AFlags: TfpgTextFlags; ATotal,AAlpha: Boolean; ATypeNum: TSectPageNum);
begin
inherited Create;
FPosX:= APosX;
FPosY:= APosY;
-FColonne:= AColonne;
-FTexteNum:= ATexteNum;
-FTexteTot:= ATexteTot;
-FFonte:= AFonte;
-FFond:= AFond;
-FBord:= ABord;
-FInterL:= AInterL;
+FColumn:= AColumn;
+FTextNum:= ATextNum;
+FTextTot:= ATextTot;
+FFont:= AFont;
+FBackColor:= ABackColor;
+FBorder:= ABorder;
+FLineSpace:= ALineSpace;
FCurFont:= ACurFont;
FFlags:= AFlags;
FTotal:= ATotal;
@@ -693,17 +693,17 @@ FAlpha:= AAlpha;
FTypeNum:= ATypeNum;
end;
-constructor T_Trait.Create(APosX,APosY: Single; AColonne,AStyle: Integer; AEndX,AEndY: Single);
+constructor T_Line.Create(APosX,APosY: Single; AColumn,AStyle: Integer; AEndX,AEndY: Single);
begin
FPosX:= APosX;
FPosY:= APosY;
-FColonne:= AColonne;
+FColumn:= AColumn;
FStyle:= AStyle;
FEndX:= AEndX;
FEndY:= AEndY;
end;
-constructor T_Colonne.Create(APos,AWidth,AMargin: Single; AColor: TfpgColor);
+constructor T_Column.Create(APos,AWidth,AMargin: Single; AColor: TfpgColor);
begin
inherited Create;
FPos:= APos;
@@ -712,43 +712,43 @@ FMargin:= AMargin;
FColor:= AColor;
end;
-function T_Colonne.GetTextPos: Single;
+function T_Column.GetTextPos: Single;
begin
Result:= FPos+FMargin;
end;
-function T_Colonne.GetTextWidth: Single;
+function T_Column.GetTextWidth: Single;
begin
Result:= FWidth-(FMargin*2);
end;
-procedure T_Colonne.SetColColor(AColor: TfpgColor);
+procedure T_Column.SetColColor(AColor: TfpgColor);
begin
if FColor<> AColor
then
FColor:= AColor;
end;
-constructor T_Fonte.Create(AFonte: string; AColor: TfpgColor);
+constructor T_Font.Create(AFont: string; AColor: TfpgColor);
begin
inherited Create;
-FFonte:= fpgApplication.GetFont(AFonte);
+FFont:= fpgApplication.GetFont(AFont);
FColor:= AColor;
-FSize:= ExtractFontSize(AFonte);
+FSize:= ExtractFontSize(AFont);
end;
-destructor T_Fonte.Destroy;
+destructor T_Font.Destroy;
begin
- FFonte.Free;
- inherited Destroy;
+FFont.Free;
+inherited Destroy;
end;
-function T_Fonte.GetHeight: Integer;
+function T_Font.GetHeight: Integer;
begin
-Result:= TfpgFont(FFonte).Height;
+Result:= TfpgFont(FFont).Height;
end;
-constructor T_Interligne.Create(ASup,AInt,AInf: Single);
+constructor T_LineSpace.Create(ASup,AInt,AInf: Single);
begin
inherited Create;
FSup:= ASup;
@@ -756,13 +756,13 @@ FInt:= AInt;
FInf:= AInf;
end;
-constructor T_Espace.Create(APosY: Single; AColonne: Integer; AHeight: Single; AFond: Integer);
+constructor T_Space.Create(APosY: Single; AColumn: Integer; AHeight: Single; ABackColor: Integer);
begin
inherited Create;
FPosY:= APosY;
-FColonne:= AColonne;
+FColumn:= AColumn;
FHeight:= AHeight;
-FFond:= AFond;
+FBackColor:= ABackColor;
end;
constructor T_Surface.Create(APoints: array of TRefPos; AColor: TfpgColor);
@@ -776,33 +776,33 @@ for Cpt:= 0 to Pred(Length(FPoints)) do
FColor:= AColor;
end;
-procedure T_Espace.SetPosY(const AValue: Single);
+procedure T_Space.SetPosY(const AValue: Single);
begin
if FPosY<> AValue
then
FPosY:= AValue;
end;
-constructor T_Fond.Create(AColor: TfpgColor);
+constructor T_BackColor.Create(AColor: TfpgColor);
begin
FColor:= AColor;
end;
-constructor T_TraitStyle.Create(AEpais: Single; AColor: Tfpgcolor; AStyle: TfpgLineStyle);
+constructor T_LineStyle.Create(AThick: Single; AColor: Tfpgcolor; AStyle: TfpgLineStyle);
begin
inherited Create;
-FEpais:= AEpais;
+FThick:= AThick;
FColor:= AColor;
FStyle:= AStyle;
end;
-constructor T_Bord.Create(AFlags: TFBordFlags; AStyle: Integer);
+constructor T_Border.Create(AFlags: TBorderFlags; AStyle: Integer);
begin
FFlags:= AFlags;
FStyle:= AStyle;
end;
-constructor T_Cadre.Create(AStyle: Integer; AZone: TZone);
+constructor T_Frame.Create(AStyle: Integer; AZone: TZone);
begin
FStyle:= AStyle;
FZone:= AZone;
diff --git a/extras/contributed/report_tool/reportengine/u_pdf.pas b/extras/contributed/report_tool/reportengine/u_pdf.pas
index fab7e236..4d49e3d5 100644
--- a/extras/contributed/report_tool/reportengine/u_pdf.pas
+++ b/extras/contributed/report_tool/reportengine/u_pdf.pas
@@ -951,7 +951,7 @@ then
TPdfDictionary(TPdfXRef(FXRefObjets[AObjet]).FObjet).WriteDictionary(AFlux)
else
begin
- Flux:= TMemoryStream.Create;
+ Flux:= TMemoryStream.Create;
Flux.Position:= 0;
CurrentColor:= '';
CurrentWidth:= '';
@@ -1314,7 +1314,7 @@ for Cpt:= 0 to Pred(PdfPage.Count) do
TPdfStream(TPdfXRef(FXRefObjets[PageNum]).FStream).AddItem(Clr);
end;
end;
- Txt:= TPdfText.CreateText(TextPosX,TextPosY,Ecriture);
+ Txt:= TPdfText.CreateText(TextPosX,TextPosY,Writting);
TPdfStream(TPdfXRef(FXRefObjets[PageNum]).FStream).AddItem(Txt);
end;
if TPdfElement(PdfPage[Cpt]) is TPdfRect
@@ -1323,19 +1323,19 @@ for Cpt:= 0 to Pred(PdfPage.Count) do
then
with TPdfRect(PdfPage[Cpt]) do
begin
- if RectCouleur> -1
+ if RectColor> -1
then
begin
- Clr:= TPdfColor.CreateColor(True,RectCouleur);
+ Clr:= TPdfColor.CreateColor(True,RectColor);
TPdfStream(TPdfXRef(FXRefObjets[PageNum]).FStream).AddItem(Clr);
end;
- if RectTrace
+ if RectStroke
then
begin
Sty:= TPdfLineStyle.CreateLineStyle(RectLineStyle,0);
TPdfStream(TPdfXRef(FXRefObjets[PageNum]).FStream).AddItem(Sty);
end;
- Rct:= TPdfRectangle.CreateRectangle(RectEpais,RectGauche,RectBas,RectLarg,RectHaut,RectEmplit,RectTrace);
+ Rct:= TPdfRectangle.CreateRectangle(RectThickness,RectLeft,RectBottom,RectWidth,RectHeight,RectFill,RectStroke);
TPdfStream(TPdfXRef(FXRefObjets[PageNum]).FStream).AddItem(Rct);
end;
if TPdfElement(PdfPage[Cpt]) is TPdfLine
@@ -1352,7 +1352,7 @@ for Cpt:= 0 to Pred(PdfPage.Count) do
end;
Sty:= TPdfLineStyle.CreateLineStyle(LineStyle,0);
TPdfStream(TPdfXRef(FXRefObjets[PageNum]).FStream).AddItem(Sty);
- Lin:= TPdfLigne.CreateLigne(LineEpais,LineStartX,LineStartY,LineEndX,LineEndY);
+ Lin:= TPdfLigne.CreateLigne(LineThikness,LineBeginX,LineBeginY,LineEndX,LineEndY);
TPdfStream(TPdfXRef(FXRefObjets[PageNum]).FStream).AddItem(Lin);
end;
if TPdfElement(PdfPage[Cpt]) is TPdfSurf
@@ -1402,7 +1402,7 @@ then
end;
TreeRoot:= CreatePages(ParentPage);
end;
-NumPage:= 0; // numéro de page identique à celui de l'appel à ImprimePage
+NumPage:= 0; // numéro de page identique à celui de l'appel à PrintPage
for CptSect:= 0 to Pred(Sections.Count) do
begin
if Sections.Count> 1
@@ -1411,7 +1411,7 @@ for CptSect:= 0 to Pred(Sections.Count) do
if Outline
then
begin
- ParentOutline:= CreateOutline(OutlineRoot,Succ(CptSect),-1,T_Section(Sections[CptSect]).Titre);
+ ParentOutline:= CreateOutline(OutlineRoot,Succ(CptSect),-1,T_Section(Sections[CptSect]).Title);
Dictionaire:= TPdfDictionary(TPdfXRef(FXRefObjets[OutlineRoot]).FObjet);
TPdfInteger(TPdfDicElement(Dictionaire.FElement[Dictionaire.ElementParCle('Count')]).FValue).IncrementeInteger;
if CptSect= 0
@@ -1454,7 +1454,7 @@ for CptSect:= 0 to Pred(Sections.Count) do
if (Sections.Count> 1) and Outline
then
begin
- PageOutline:= CreateOutline(ParentOutline,Succ(CptSect),Succ(Cptpage),T_Section(Sections[CptSect]).Titre);
+ PageOutline:= CreateOutline(ParentOutline,Succ(CptSect),Succ(Cptpage),T_Section(Sections[CptSect]).Title);
Dictionaire:= TPdfDictionary(TPdfXRef(FXRefObjets[ParentOutline]).FObjet);
TPdfInteger(TPdfDicElement(Dictionaire.FElement[Dictionaire.ElementParCle('Count')]).FValue).IncrementeInteger;
// add page reference to outline destination
@@ -1507,9 +1507,9 @@ then
TPdfInteger(TPdfDicElement(Dictionaire.FElement[Dictionaire.ElementParCle('Count')]).FValue).Value:= T_Section(Sections[CptSect]).TotPages;
end;
NumFont:= 0;
-for Cpt:= 0 to Pred(Fontes.Count) do
+for Cpt:= 0 to Pred(Fonts.Count) do
begin
- FontName:= ExtractBaseFontName(T_Fonte(Fontes[Cpt]).GetFonte.FontDesc);
+ FontName:= ExtractBaseFontName(T_Font(Fonts[Cpt]).GetFont.FontDesc);
CreateFont(FontName,NumFont);
Inc(NumFont);
end;
diff --git a/extras/contributed/report_tool/reportengine/u_report.pas b/extras/contributed/report_tool/reportengine/u_report.pas
index 67965fdf..88fb698f 100644
--- a/extras/contributed/report_tool/reportengine/u_report.pas
+++ b/extras/contributed/report_tool/reportengine/u_report.pas
@@ -27,80 +27,80 @@ uses
U_Command, U_Pdf;
type
- TTypePapier= (A4,Letter,Legal,Executive,Comm10,Monarch,DL,C5,B5);
+ TPaperType= (A4,Letter,Legal,Executive,Comm10,Monarch,DL,C5,B5);
TOrient= (oPortrait,oLandscape);
- TMesure = (msMM,msInch);
- TPreparation= (ppPrepare,ppVisualise,ppFichierPDF);
+ TMeasureUnit = (msMM,msInch);
+ TPreparation= (ppPrepare,ppVisualize,ppPdfFile);
- T_Imprime = class(TObject)
+ T_Report = class(TObject)
private
OldSeparator: Char;
FVersion: Char;
- FPapier: TPapier;
- FTypePapier: TTypePapier;
+ FPaper: TPaper;
+ FPaperType: TPaperType;
FOrientation: TOrient;
- FMargeCourante: TDimensions;
- FMesure: TMesure;
+ FCurrentMargin: TDimensions;
+ FMeasureUnit: TMeasureUnit;
FPreparation: TPreparation;
- FVisualisation: Boolean;
- FCanevas: TfpgCanvas;
- FFonteCourante: Integer;
- FInterLCourante: Integer;
- FColorCourante: Integer;
+ FVisualization: Boolean;
+ FCanvas: TfpgCanvas;
+ FCurrentFont: Integer;
+ FCurrentLineSpace: Integer;
+ FCurrentColor: Integer;
FNmSection: Integer;
FNmPage: Integer;
FNmPageSect: Integer;
- FPosRef: TRefPos; // absolute writting position
- FEnTeteHeight: Single; // end of text vertical position in the header
+ FPosRef: TRefPos; // absolute writting position
+ FHeaderHeight: Single; // end of text vertical position in the header
FPageHeight: Single; // end of text vertical position in the page
- FPiedHeight: Single; // beginning of text vertical position in the footer
- FGroupe: Boolean;
+ FFooterHeight: Single; // beginning of text vertical position in the footer
+ FGroup: Boolean;
FDefaultFile: string;
function Dim2Pixels(Value: Single): Single;
function Pixels2Dim(Value: Single): Single;
function AddLineBreaks(const Txt: TfpgString; AMaxLineWidth: integer; AFnt: TfpgFont): string;
function TxtHeight(AWid: Integer; const ATxt: TfpgString; AFnt: TfpgFont; ALSpace: Integer= 2): Integer;
- function ConvertitEnAlpha(Valeur: Integer): string;
- function GetHauteurPapier: Integer;
- function GetLargeurPapier: Integer;
+ function Convert2Alpha(Valeur: Integer): string;
+ function GetPaperHeight: Integer;
+ function GetPaperWidth: Integer;
procedure Bv_VisuPaint(Sender: TObject);
procedure PrepareFormat;
procedure CreateVisu;
- procedure ImprimePage(PageNumero: Integer);
- procedure DecaleLignesPied(Decalage: Single);
- procedure DecaleLigne(Decalage: Single);
- procedure DecaleGroupe(Decalage: Single);
- function EcritLigne(PosX,PosY: Single; Colonne,Texte,FonteNum,FondNum,BordNum,InterL: Integer;
+ procedure PrintPage(PageNumero: Integer);
+ procedure ShiftFooterLines(Shift: Single);
+ procedure ShiftPageLines(Shift: Single);
+ procedure ShiftGroup(Shift: Single);
+ function WriteText(PosX,PosY: Single; Column,Text,FontNum,BkColorNum,BordNum,SpLine: Integer;
TxtFlags: TfpgTextFlags; Zone: TZone): Single;
- function EcritNum(PosX,PosY: Single; Colonne,TexteNum,TexteTot,FonteNum,FondNum,BordNum,InterL: Integer;
+ function WriteNumber(PosX,PosY: Single; Column,TextNum,TextTot,FontNum,BkColorNum,BordNum,SpLine: Integer;
TxtFlags: TfpgTextFlags; Total,Alpha: Boolean; Zone: TZone; SPNum: TSectPageNum): Single;
- function InsereEspace(PosY: Single; Colonne: Integer; EspHeight: Single; FondNum: Integer; Zone: TZone): Single;
- procedure FinLigne(Zone: TZone);
- procedure TraceCadre(StTrait: Integer; Zone: TZone);
- procedure TraceTrait(XDebut,YDebut,XFin,YFin: Single; StTrait: Integer);
- procedure TraceTraitHoriz(XDebut,YDebut: Single; Colonne: Integer; XFin: Single; StTrait: Integer; Zone: TZone);
+ function InsertSpace(PosY: Single; Column: Integer; SpaceHeight: Single; BkColorNum: Integer; Zone: TZone): Single;
+ procedure LineEnd(Zone: TZone);
+ procedure DrawAFrame(StyLine: Integer; Zone: TZone);
+ procedure DrawALine(XBegin,YBegin,XEnd,YEnd: Single; StyLine: Integer);
+ procedure DrawAHorizLine(XBegin,YBegin: Single; Column: Integer; XEnd: Single; StyLine: Integer; Zone: TZone);
procedure PaintSurface(Points: T_Points; Couleur: TfpgColor);
- function GetTitreSection: string;
- procedure SetTitreSection(ATitre: string);
+ function GetSectionTitle: string;
+ procedure SetSectionTitle(ATitle: string);
public
constructor Create;
destructor Destroy; override;
- procedure BeginWrite(IniOriente: TOrient= oPortrait; IniTypePapier: TTypePapier= A4;
- IniMesure: TMesure= msMM; IniVersion: Char= 'F'; IniVisu: Boolean= True);
+ procedure BeginWrite(IniOrientation: TOrient= oPortrait; IniPaperType: TPaperType= A4;
+ IniMeasure: TMeasureUnit= msMM; IniVersion: Char= 'F'; IniVisu: Boolean= True);
// starts preview and printing process with initializations
- // IniOriente = paper orientation >> oPortrait or oLandscape
- // IniTypePapier = (A4, Letter,Legal,Executive,Comm10,Monarch,DL,C5,B5)
- // IniMesure = millimeters (msMM) or inches (msInches)
+ // IniOrientation = paper orientation >> oPortrait or oLandscape
+ // IniPaperType = (A4, Letter,Legal,Executive,Comm10,Monarch,DL,C5,B5)
+ // IniMeasure = millimeters (msMM) or inches (msInches)
// IniVersion = version française 'F' or version English 'E', or other, to come
// IniVisu = True (Preview) or False (direct printing or PDF generation)
procedure EndWrite;
procedure WriteDocument;
procedure PagePreview;
- procedure Section(MgGauche,MgDroite,MgHaute,MgBasse: Single; Retrait: Single= 0;
- IniOriente: TOrient= oPortrait);
+ procedure Section(MgLeft,MgRight,MgTop,MgBottom: Single; BackPos: Single= 0;
+ IniOrientation: TOrient= oPortrait);
// new section with initialization of margins
- // Retrait = additional margin which can be necessary when frames are drawn
- // IniOriente = paper orientation >> oPortrait or oLandscape
+ // BackPos = additional margin which can be necessary when frames are drawn
+ // IniOrientation = paper orientation >> oPortrait or oLandscape
procedure Page;
// new page in the current section
function BackColor(FdColor: TfpgColor): Integer;
@@ -110,12 +110,12 @@ type
// returns the number allocated to the font
// FtNom = FontDesc of the font
// FtColor = font color
- function LineStyle(StEpais: Single; StColor: Tfpgcolor; StStyle: TfpgLineStyle): Integer;
+ function LineStyle(StThick: Single; StColor: Tfpgcolor; StStyle: TfpgLineStyle): Integer;
// returns the number allocated to the line style
- // StEpais = thickness of the line in pixels
+ // StThick = thickness of the line in pixels
// StColor = line color
// StStyle = line style
- function Border(BdFlags: TFBordFlags; BdStyle: Integer): Integer;
+ function Border(BdFlags: TBorderFlags; BdStyle: Integer): Integer;
// returns the number allocated to the border
// BdFlags = position of the border (bdTop,bdBottom,bdLeft,bdRight)
// BdStyle = border line style: thickness, color, style
@@ -125,170 +125,170 @@ type
// ClnWidth = width in numeric value in the measurement unit (msMM or msInch)
// ClnMargin = left and right margins in numeric value in the measurement unit (msMM or msInch)
// ClnColor = column background color
- procedure WriteHeader(Horiz,Verti: Single; Texte: string; ColNum: Integer= 0; FonteNum: Integer= 0;
- InterNum: Integer= 0; CoulFdNum: Integer= -1; BordNum: Integer= -1);
+ procedure WriteHeader(Horiz,Verti: Single; Text: string; ColNum: Integer= 0; FontNum: Integer= 0;
+ LineSpNum: Integer= 0; BkColorNum: Integer= -1; BordNum: Integer= -1);
// Horiz = horizontal position in column (cnLeft,cnCenter,cnRight)
// or numeric value in the measurement unit (msMM or msInch)
// Verti = line position in column (lnCourante,lnFin)
// or numeric value in the measurement unit (msMM or msInch)
- // Texte = texte to be written
+ // Text = text to be written
// ColNum = column reference, default between left and right margins
- // FonteNum = font reference
- // InterNum = space between lines reference
- // CoulFdNum = background color reference, if > -1, replaces the column background color if any
+ // FontNum = font reference
+ // LineSpNum = space between lines reference
+ // BkColorNum = background color reference, if > -1, replaces the column background color if any
// BordNum = border reference, if > -1
- function WritePage(Horiz,Verti: Single; Texte: string; ColNum: Integer= 0; FonteNum: Integer= 0;
- InterNum: Integer= 0; CoulFdNum: Integer= -1; BordNum: Integer= -1): Single;
+ function WritePage(Horiz,Verti: Single; Text: string; ColNum: Integer= 0; FontNum: Integer= 0;
+ LineSpNum: Integer= 0; BkColorNum: Integer= -1; BordNum: Integer= -1): Single;
// Horiz = horizontal position in column (cnLeft,cnCenter,cnRight)
// or numeric value in the measurement unit (msMM or msInch)
// Verti = line position in column (lnCourante,lnFin)
// or numeric value in the measurement unit (msMM or msInch)
- // Texte = texte to be written
+ // Text = text to be written
// ColNum = column reference, default between left and right margins
- // FonteNum = font reference
- // InterNum = space between lines reference
- // CoulFdNum = background color reference, if > -1, replaces the column background color if any
+ // FontNum = font reference
+ // LineSpNum = space between lines reference
+ // BkColorNum = background color reference, if > -1, replaces the column background color if any
// BordNum = border reference, if > -1
- procedure WriteFooter(Horiz,Verti: Single; Texte: string; ColNum: Integer= 0; FonteNum: Integer= 0;
- InterNum: Integer= 0; CoulFdNum: Integer= -1; BordNum: Integer= -1);
+ procedure WriteFooter(Horiz,Verti: Single; Text: string; ColNum: Integer= 0; FontNum: Integer= 0;
+ LineSpNum: Integer= 0; BkColorNum: Integer= -1; BordNum: Integer= -1);
// Horiz = horizontal position in column (cnLeft,cnCenter,cnRight)
// or numeric value in the measurement unit (msMM or msInch)
// Verti = line position in column (lnCourante,lnFin)
// or numeric value in the measurement unit (msMM or msInch)
- // Texte = texte to be written
+ // Text = text to be written
// ColNum = column reference, default between left and right margins
- // FonteNum = font reference
- // InterNum = space between lines reference
- // CoulFdNum = background color reference, if > -1, replaces the column background color if any
+ // FontNum = font reference
+ // LineSpNum = space between lines reference
+ // BkColorNum = background color reference, if > -1, replaces the column background color if any
// BordNum = border reference, if > -1
- procedure NumSectionHeader(Horiz,Verti: Single; TexteSect: string= ''; TexteTot: string= '';
- Total: Boolean= False; Alpha: Boolean= False; ColNum: Integer= 0; FonteNum: Integer= 0;
- InterNum: Integer= 0; CoulFdNum: Integer= -1; BordNum: Integer= -1);
+ procedure NumSectionHeader(Horiz,Verti: Single; TexteSect: string= ''; TextTot: string= '';
+ Total: Boolean= False; Alpha: Boolean= False; ColNum: Integer= 0; FontNum: Integer= 0;
+ LineSpNum: Integer= 0; BkColorNum: Integer= -1; BordNum: Integer= -1);
// Horiz = horizontal position in column (cnLeft,cnCenter,cnRight)
// or numeric value in the measurement unit (msMM or msInch)
// Verti = line position in column (lnCourante,lnFin)
// or numeric value in the measurement unit (msMM or msInch)
// TexteSection = text to be written before the section number
- // TexteTotal = text to be written before the number of sections
+ // TextTot = text to be written before the number of sections
// Total= True => displays the number of sections
// Alpha= True => displays the number of sections using letters in alphabetic order
// ColNum = column reference, default between left and right margins
- // FonteNum = font reference
- // InterNum = space between lines reference
- // CoulFdNum = background color reference, if > -1, replaces the column background color if any
+ // FontNum = font reference
+ // LineSpNum = space between lines reference
+ // BkColorNum = background color reference, if > -1, replaces the column background color if any
// BordNum = border reference, if > -1
- procedure NumSectionFooter(Horiz,Verti: Single; TexteSect: string= ''; TexteTot: string= '';
- Total: Boolean= False; Alpha: Boolean= False; ColNum: Integer= 0; FonteNum: Integer= 0;
- InterNum: Integer= 0; CoulFdNum: Integer= -1; BordNum: Integer= -1);
+ procedure NumSectionFooter(Horiz,Verti: Single; TexteSect: string= ''; TextTot: string= '';
+ Total: Boolean= False; Alpha: Boolean= False; ColNum: Integer= 0; FontNum: Integer= 0;
+ LineSpNum: Integer= 0; BkColorNum: Integer= -1; BordNum: Integer= -1);
// Horiz = horizontal position in column (cnLeft,cnCenter,cnRight)
// or numeric value in the measurement unit (msMM or msInch)
// Verti = line position in column (lnCourante,lnFin)
// or numeric value in the measurement unit (msMM or msInch)
// TexteSection = text to be written before the section number
- // TexteTotal = text to be written before the number of sections
+ // TextTot = text to be written before the number of sections
// Total= True => displays the number of sections
// Alpha= True => displays the number of sections using letters in alphabetic order
// ColNum = column reference, default between left and right margins
- // FonteNum = font reference
- // InterNum = space between lines reference
- // CoulFdNum = background color reference, if > -1, replaces the column background color if any
+ // FontNum = font reference
+ // LineSpNum = space between lines reference
+ // BkColorNum = background color reference, if > -1, replaces the column background color if any
// BordNum = border reference, if > -1
- procedure NumPageHeader(Horiz,Verti: Single; TextePage: string= ''; TexteTotal: string= '';
- Total: Boolean= False; ColNum: Integer= 0; FonteNum: Integer= 0; InterNum: Integer= 0;
- CoulFdNum: Integer= -1; BordNum: Integer= -1);
+ procedure NumPageHeader(Horiz,Verti: Single; TextePage: string= ''; TextTot: string= '';
+ Total: Boolean= False; ColNum: Integer= 0; FontNum: Integer= 0; LineSpNum: Integer= 0;
+ BkColorNum: Integer= -1; BordNum: Integer= -1);
// Horiz = horizontal position in column (cnLeft,cnCenter,cnRight)
// or numeric value in the measurement unit (msMM or msInch)
// Verti = line position in column (lnCourante,lnFin)
// or numeric value in the measurement unit (msMM or msInch)
// TextePage = text to be written before the page number in the document
- // TexteTotal = text to be written before the number of pages of the document
+ // TextTot = text to be written before the number of pages of the document
// Total= True > displays the number of pages of the document
// ColNum = column reference, default between left and right margins
- // FonteNum = font reference
- // InterNum = space between lines reference
- // CoulFdNum = background color reference, if > -1, replaces the column background color if any
+ // FontNum = font reference
+ // LineSpNum = space between lines reference
+ // BkColorNum = background color reference, if > -1, replaces the column background color if any
// BordNum = border reference, if > -1
- procedure NumPageFooter(Horiz,Verti: Single; TextePage: string= ''; TexteTotal: string= '';
- Total: Boolean= False; ColNum: Integer= 0; FonteNum: Integer= 0; InterNum: Integer= 0;
- CoulFdNum: Integer= -1; BordNum: Integer= -1);
+ procedure NumPageFooter(Horiz,Verti: Single; TextePage: string= ''; TextTot: string= '';
+ Total: Boolean= False; ColNum: Integer= 0; FontNum: Integer= 0; LineSpNum: Integer= 0;
+ BkColorNum: Integer= -1; BordNum: Integer= -1);
// Horiz = horizontal position in column (cnLeft,cnCenter,cnRight)
// or numeric value in the measurement unit (msMM or msInch)
// Verti = line position in column (lnCourante,lnFin)
// or numeric value in the measurement unit (msMM or msInch)
// TextePage = text to be written before the page number in the document
- // TexteTotal = text to be written before the number of pages of the document
+ // TextTot = text to be written before the number of pages of the document
// Total= True > displays the number of pages of the document
// ColNum = column reference, default between left and right margins
- // FonteNum = font reference
- // InterNum = space between lines reference
- // CoulFdNum = background color reference, if > -1, replaces the column background color if any
+ // FontNum = font reference
+ // LineSpNum = space between lines reference
+ // BkColorNum = background color reference, if > -1, replaces the column background color if any
// BordNum = border reference, if > -1
- procedure NumPageSectionHeader(Horiz,Verti: Single; TexteSect: string= ''; TexteTot: string= '';
- Total: Boolean= False; Alpha: Boolean= False; ColNum: Integer= 0; FonteNum: Integer= 0;
- InterNum: Integer= 0; CoulFdNum: Integer= -1; BordNum: Integer= -1);
+ procedure NumPageSectionHeader(Horiz,Verti: Single; TexteSect: string= ''; TextTot: string= '';
+ Total: Boolean= False; Alpha: Boolean= False; ColNum: Integer= 0; FontNum: Integer= 0;
+ LineSpNum: Integer= 0; BkColorNum: Integer= -1; BordNum: Integer= -1);
// Horiz = horizontal position in column (cnLeft,cnCenter,cnRight)
// or numeric value in the measurement unit (msMM or msInch)
// Verti = line position in column (lnCourante,lnFin)
// or numeric value in the measurement unit (msMM or msInch)
// TextePage = text to ba written before the page number in the section
- // TexteTotal = text to be written before the number of pages of the section
+ // TextTot = text to be written before the number of pages of the section
// Total= True > displays the number of pages of the section
// ColNum = column reference, default between left and right margins
- // FonteNum = font reference
- // InterNum = space between lines reference
- // CoulFdNum = background color reference, if > -1, replaces the column background color if any
+ // FontNum = font reference
+ // LineSpNum = space between lines reference
+ // BkColorNum = background color reference, if > -1, replaces the column background color if any
// BordNum = border reference, if > -1
- procedure NumPageSectionFooter(Horiz,Verti: Single; TexteSect: string= ''; TexteTot: string= '';
- Total: Boolean= False; Alpha: Boolean= False; ColNum: Integer= 0; FonteNum: Integer= 0;
- InterNum: Integer= 0; CoulFdNum: Integer= -1; BordNum: Integer= -1);
+ procedure NumPageSectionFooter(Horiz,Verti: Single; TexteSect: string= ''; TextTot: string= '';
+ Total: Boolean= False; Alpha: Boolean= False; ColNum: Integer= 0; FontNum: Integer= 0;
+ LineSpNum: Integer= 0; BkColorNum: Integer= -1; BordNum: Integer= -1);
// Horiz = horizontal position in column (cnLeft,cnCenter,cnRight)
// or numeric value in the measurement unit (msMM or msInch)
// Verti = line position in column (lnCourante,lnFin)
// or numeric value in the measurement unit (msMM or msInch)
// TextePage = text to ba written before the page number in the section
- // TexteTotal = text to be written before the number of pages of the section
+ // TextTot = text to be written before the number of pages of the section
// Total= True > displays the number of pages of the section
// ColNum = column reference, default between left and right margins
- // FonteNum = font reference
- // InterNum = space between lines reference
- // CoulFdNum = background color reference, if > -1, replaces the column background color if any
+ // FontNum = font reference
+ // LineSpNum = space between lines reference
+ // BkColorNum = background color reference, if > -1, replaces the column background color if any
// BordNum = border reference, if > -1
- procedure HorizLineHeader(EspAvant,EspApres: Single; ColNum: Integer= 0; StyleNum: Integer= 0);
- // EspAvant = empty space before the horizontal line : numeric value in the measurement unit (msMM or msInch)
- // EspApres = empty space after the horizontal line : numeric value in the measurement unit (msMM or msInch)
+ procedure HorizLineHeader(SpBefore,SpAfter: Single; ColNum: Integer= 0; StyleNum: Integer= 0);
+ // SpBefore = empty space before the horizontal line : numeric value in the measurement unit (msMM or msInch)
+ // SpAfter = empty space after the horizontal line : numeric value in the measurement unit (msMM or msInch)
// ColNum = column reference, default between left and right margins
// StyleNum = reference of the line style
- procedure HorizLinePage(EspAvant,EspApres: Single; ColNum: Integer= 0; StyleNum: Integer= 0);
- // EspAvant = empty space before the horizontal line : numeric value in the measurement unit (msMM or msInch)
- // EspApres = empty space after the horizontal line : numeric value in the measurement unit (msMM or msInch)
+ procedure HorizLinePage(SpBefore,SpAfter: Single; ColNum: Integer= 0; StyleNum: Integer= 0);
+ // SpBefore = empty space before the horizontal line : numeric value in the measurement unit (msMM or msInch)
+ // SpAfter = empty space after the horizontal line : numeric value in the measurement unit (msMM or msInch)
// ColNum = column reference, default between left and right margins
// StyleNum = reference of the line style
- procedure HorizLineFooter(EspAvant,EspApres: Single; ColNum: Integer= 0; StyleNum: Integer= 0);
- // EspAvant = empty space before the horizontal line : numeric value in the measurement unit (msMM or msInch)
- // EspApres = empty space after the horizontal line : numeric value in the measurement unit (msMM or msInch)
+ procedure HorizLineFooter(SpBefore,SpAfter: Single; ColNum: Integer= 0; StyleNum: Integer= 0);
+ // SpBefore = empty space before the horizontal line : numeric value in the measurement unit (msMM or msInch)
+ // SpAfter = empty space after the horizontal line : numeric value in the measurement unit (msMM or msInch)
// ColNum = column reference, default between left and right margins
// StyleNum = reference of the line style
- procedure SpaceHeader(Verti: Single; ColNum: Integer=0; CoulFdNum: Integer= -1);
+ procedure SpaceHeader(Verti: Single; ColNum: Integer=0; BkColorNum: Integer= -1);
// Verti = height of the empty space : numeric value in the measurement unit (msMM or msInch)
// ColNum = column reference, default between left and right margins
- // CoulFdNum = background color reference, if > -1, replaces the column background color if any
- procedure SpacePage(Verti: Single; ColNum: Integer=0; CoulFdNum: Integer= -1);
+ // BkColorNum = background color reference, if > -1, replaces the column background color if any
+ procedure SpacePage(Verti: Single; ColNum: Integer=0; BkColorNum: Integer= -1);
// Verti = height of the empty space : numeric value in the measurement unit (msMM or msInch)
// ColNum = column reference, default between left and right margins
- // CoulFdNum = background color reference, if > -1, replaces the column background color if any
- procedure SpaceFooter(Verti: Single; ColNum: Integer=0; CoulFdNum: Integer= -1);
+ // BkColorNum = background color reference, if > -1, replaces the column background color if any
+ procedure SpaceFooter(Verti: Single; ColNum: Integer=0; BkColorNum: Integer= -1);
// Verti = height of the empty space : numeric value in the measurement unit (msMM or msInch)
// ColNum = column reference, default between left and right margins
- // CoulFdNum = background color reference, if > -1, replaces the column background color if any
- function LineSpace(ItlSup,ItlInt,ItlInf: Single): Integer;
- // IntSup = space between lines, top : numeric value in the measurement unit (msMM or msInch)
- // IntInt = space between lines, internal if wrapping : numeric value in the measurement unit (msMM or msInch)
- // IntInf = space between lines, botom : numeric value in the measurement unit (msMM or msInch)
- procedure BeginGroup(SautPage: Boolean= False);
- // SautPage = True >> forces new page before the group
+ // BkColorNum = background color reference, if > -1, replaces the column background color if any
+ function LineSpace(SpSup,SpInt,SpInf: Single): Integer;
+ // SpSup = space between lines, top : numeric value in the measurement unit (msMM or msInch)
+ // SpInt = space between lines, internal if wrapping : numeric value in the measurement unit (msMM or msInch)
+ // SpInf = space between lines, botom : numeric value in the measurement unit (msMM or msInch)
+ procedure BeginGroup(PageJump: Boolean= False);
+ // PageJump = True >> forces new page before the group
// = False >> does not create a new page if the whole group can stand on the same page as the preceding text
- procedure EndGroup(SautPage: Boolean= False);
- // SautPage = True >> forces new page after the group
+ procedure EndGroup(PageJump: Boolean= False);
+ // PageJump = True >> forces new page after the group
// = False >> lets continue on the same page after the group
procedure ColorColChange(ColNum: Integer; ColColor: TfpgColor);
// Changes the background color of a column
@@ -306,24 +306,24 @@ type
procedure FrameFooter(AStyle: Integer);
// draw a frame at the limits of the footer
// AStyle = reference of the line style of the frame
- procedure LinePage(XDebut,YDebut,XFin,YFin: Single; AStyle: Integer);
+ procedure LinePage(XBegin,YBegin,XEnd,YEnd: Single; AStyle: Integer);
// draw a line at absolute position
- // XDebut = horizontal position of starting point in numeric value in the measurement unit (msMM or msInch)
- // YDebut = vertical position of starting point in numeric value in the measurement unit (msMM or msInch)
- // XFin = horizontal position of ending point in numeric value in the measurement unit (msMM or msInch)
- // YFin = vertical position of ending point in numeric value in the measurement unit (msMM or msInch)
+ // XBegin = horizontal position of starting point in numeric value in the measurement unit (msMM or msInch)
+ // YBegin = vertical position of starting point in numeric value in the measurement unit (msMM or msInch)
+ // XEnd = horizontal position of ending point in numeric value in the measurement unit (msMM or msInch)
+ // YEnd = vertical position of ending point in numeric value in the measurement unit (msMM or msInch)
// AStyle = reference of the line style of the line
procedure SurfPage(XLimits,YLimits: array of Single; AColor: TfpgColor);
property Language: Char read FVersion write FVersion;
- property Visualiser: Boolean read FVisualisation write FVisualisation;
+ property Visualiser: Boolean read FVisualization write FVisualization;
property NumSection: Integer read FNmSection write FNmSection;
property NumPage: Integer read FNmPage write FNmPage;
property NumPageSection: Integer read FNmPageSect write FNmPageSect;
- property PaperHeight: Integer read GetHauteurPapier;
- property PagerWidth: Integer read GetLargeurPapier;
+ property PaperHeight: Integer read GetPaperHeight;
+ property PagerWidth: Integer read GetPaperWidth;
property DefaultFile: string read FDefaultFile write FDefaultFile;
- property CurrentColor: Integer read FColorCourante write FColorCourante;
- property SectionTitle: string read GetTitreSection write SetTitreSection;
+ property CurrentColor: Integer read FCurrentColor write FCurrentColor;
+ property SectionTitle: string read GetSectionTitle write SetSectionTitle;
end;
// classes for interface with PDF generation
@@ -338,7 +338,7 @@ type
FSize: string;
FPosX: Single;
FPosY: Single;
- FLarg: Single;
+ FWidth: Single;
FText: string;
FColor: TfpgColor;
public
@@ -347,19 +347,19 @@ type
property FontSize: string read FSize write FSize;
property TextPosX: Single read FPosX write FPosX;
property TextPosY: Single read FPosY write FPosY;
- property TextLarg: Single read FLarg write FLarg;
- property Ecriture: string read FText write FText;
+ property TextWidt: Single read FWidth write FWidth;
+ property Writting: string read FText write FText;
property Couleur: TfpgColor read FColor write FColor;
end;
TPdfRect = class(TPdfElement)
private
FPage: Integer;
- FEpais: Single;
- FGauche: Single;
- FBas: Single;
- FHaut: Single;
- FLarg: Single;
+ FThick: Single;
+ FLeft: Single;
+ FBottom: Single;
+ FHeight: Single;
+ FWidth: Single;
FColor: Integer;
FFill: Boolean;
FStroke: Boolean;
@@ -367,23 +367,23 @@ type
protected
public
property PageId: Integer read FPage write FPage;
- property RectEpais: Single read FEpais write FEpais;
- property RectGauche: Single read FGauche write FGauche;
- property RectBas: Single read FBas write FBas;
- property RectHaut: Single read FHaut write FHaut;
- property RectLarg: Single read FLarg write FLarg;
- property RectCouleur: Integer read FColor write FColor;
- property RectEmplit: Boolean read FFill write FFill;
- property RectTrace: Boolean read FStroke write FStroke;
+ property RectThickness: Single read FThick write FThick;
+ property RectLeft: Single read FLeft write FLeft;
+ property RectBottom: Single read FBottom write FBottom;
+ property RectHeight: Single read FHeight write FHeight;
+ property RectWidth: Single read FWidth write FWidth;
+ property RectColor: Integer read FColor write FColor;
+ property RectFill: Boolean read FFill write FFill;
+ property RectStroke: Boolean read FStroke write FStroke;
property RectLineStyle: TfpgLineStyle read FLineStyle write FLineStyle;
end;
TPdfLine = class(TPdfElement)
private
FPage: Integer;
- FEpais: Single;
- FStartX: Single;
- FStartY: Single;
+ FThick: Single;
+ FBeginX: Single;
+ FBeginY: Single;
FEndX: Single;
FEndY: Single;
FColor: Integer;
@@ -391,9 +391,9 @@ type
protected
public
property PageId: Integer read FPage write FPage;
- property LineEpais: Single read FEpais write FEpais;
- property LineStartX: Single read FSTartX write FStartX;
- property LineStartY: Single read FStartY write FStartY;
+ property LineThikness: Single read FThick write FThick;
+ property LineBeginX: Single read FBeginX write FBeginX;
+ property LineBeginY: Single read FBeginY write FBeginY;
property LineEndX: Single read FEndX write FEndX;
property LineEndY: Single read FEndY write FEndY;
property LineColor: Integer read FColor write FColor;
@@ -443,25 +443,25 @@ const
PPI= 72;
InchToMM= 25.4;
-function T_Imprime.Dim2Pixels(Value: Single): Single;
+function T_Report.Dim2Pixels(Value: Single): Single;
begin
-if FMesure= msMM
+if FMeasureUnit= msMM
then
Result:= Value*PPI/InchToMM
else
Result:= Value*PPI;
end;
-function T_Imprime.Pixels2Dim(Value: Single): Single;
+function T_Report.Pixels2Dim(Value: Single): Single;
begin
-if FMesure= msMM
+if FMeasureUnit= msMM
then
Result:= Value*InchToMM/PPI
else
Result:= Value/PPI;
end;
-function T_Imprime.AddLineBreaks(const Txt: TfpgString; AMaxLineWidth: integer; AFnt: TfpgFont): string;
+function T_Report.AddLineBreaks(const Txt: TfpgString; AMaxLineWidth: integer; AFnt: TfpgFont): string;
var
i,n,ls: integer;
sub: string;
@@ -507,7 +507,7 @@ while i<= ls do
end;
end;
-function T_Imprime.TxtHeight(AWid: Integer; const ATxt: TfpgString; AFnt: TfpgFont; ALSpace: Integer= 2): Integer;
+function T_Report.TxtHeight(AWid: Integer; const ATxt: TfpgString; AFnt: TfpgFont; ALSpace: Integer= 2): Integer;
var
Cpt: Integer;
Wraplst: TStringList;
@@ -521,7 +521,7 @@ Result:= (AFnt.Height*Wraplst.Count)+(ALSpace*Pred(Wraplst.Count));
WrapLst.Free;
end;
-function T_Imprime.ConvertitEnAlpha(Valeur: Integer): string;
+function T_Report.Convert2Alpha(Valeur: Integer): string;
var
Cpt: Byte;
begin
@@ -543,34 +543,34 @@ repeat
until Valeur< 1;
end;
-function T_Imprime.GetHauteurPapier: Integer;
+function T_Report.GetPaperHeight: Integer;
begin
-Result:= FPapier.H;
+Result:= FPaper.H;
end;
-function T_Imprime.GetLargeurPapier: Integer;
+function T_Report.GetPaperWidth: Integer;
begin
-Result:= FPapier.W;
+Result:= FPaper.W;
end;
-procedure T_Imprime.Bv_VisuPaint(Sender: TObject);
+procedure T_Report.Bv_VisuPaint(Sender: TObject);
begin
-ImprimePage(NumPage);
+PrintPage(NumPage);
end;
-procedure T_Imprime.PrepareFormat;
+procedure T_Report.PrepareFormat;
var
TempH,TempW: Integer;
TempT,TempL,TempR,TempB: Single;
begin
-with FPapier do
+with FPaper do
begin
- case FTypePapier of
+ case FPaperType of
A4:
begin
H:= 842;
W:= 595;
- with Imprimable do
+ with Printable do
begin
T:= 10;
L:= 11;
@@ -582,7 +582,7 @@ with FPapier do
begin
H:= 792;
W:= 612;
- with Imprimable do
+ with Printable do
begin
T:= 13;
L:= 13;
@@ -594,7 +594,7 @@ with FPapier do
begin
H:= 1008;
W:= 612;
- with Imprimable do
+ with Printable do
begin
T:= 13;
L:= 13;
@@ -606,7 +606,7 @@ with FPapier do
begin
H:= 756;
W:= 522;
- with Imprimable do
+ with Printable do
begin
T:= 14;
L:= 13;
@@ -618,7 +618,7 @@ with FPapier do
begin
H:= 684;
W:= 297;
- with Imprimable do
+ with Printable do
begin
T:= 13;
L:= 13;
@@ -630,7 +630,7 @@ with FPapier do
begin
H:= 540;
W:= 279;
- with Imprimable do
+ with Printable do
begin
T:= 13;
L:= 13;
@@ -642,7 +642,7 @@ with FPapier do
begin
H:= 624;
W:= 312;
- with Imprimable do
+ with Printable do
begin
T:= 14;
L:= 13;
@@ -654,7 +654,7 @@ with FPapier do
begin
H:= 649;
W:= 459;
- with Imprimable do
+ with Printable do
begin
T:= 13;
L:= 13;
@@ -666,7 +666,7 @@ with FPapier do
begin
H:= 708;
W:= 499;
- with Imprimable do
+ with Printable do
begin
T:= 14;
L:= 13;
@@ -682,7 +682,7 @@ with FPapier do
TempW:= W;
H:= TempW;
W:= TempH;
- with Imprimable do
+ with Printable do
begin
TempT:= T;
TempL:= L;
@@ -697,23 +697,23 @@ with FPapier do
end;
end;
-procedure T_Imprime.CreateVisu;
+procedure T_Report.CreateVisu;
begin
F_Visu:= TF_Visu.Create(nil, self);
with F_Visu do
begin
- Bv_Visu:= CreateBevel(F_Visu,(F_Visu.Width-FPapier.W) div 2,60+((F_Visu.Height-FPapier.H) div 2),
- FPapier.W,FPapier.H,bsBox,bsRaised);
+ Bv_Visu:= CreateBevel(F_Visu,(F_Visu.Width-FPaper.W) div 2,60+((F_Visu.Height-FPaper.H) div 2),
+ FPaper.W,FPaper.H,bsBox,bsRaised);
Bv_Visu.BackgroundColor:= clWhite;
Bv_Visu.OnPaint:= @Bv_VisuPaint;
end;
end;
-procedure T_Imprime.ImprimePage(PageNumero: Integer);
+procedure T_Report.PrintPage(PageNumero: Integer);
var
CptSect,CptPage,CptCmd: Integer;
- LaPage: T_Page;
- Cmd: T_Commande;
+ ThePage: T_Page;
+ Cmd: T_Command;
begin
CptSect:= 0;
repeat
@@ -722,194 +722,197 @@ repeat
with T_Section(Sections[Pred(CptSect)]) do
repeat
Inc(CptPage);
- LaPage:= T_Page(Pages.Items[Pred(CptPage)]);
- until (LaPage.PagesTot= PageNumero) or (CptPage= Pages.Count);
-until (LaPage.PagesTot= PageNumero) or (CptSect= Sections.Count);
+ ThePage:= T_Page(Pages.Items[Pred(CptPage)]);
+ until (ThePage.PagesTot= PageNumero) or (CptPage= Pages.Count);
+until (ThePage.PagesTot= PageNumero) or (CptSect= Sections.Count);
NumPage:= PageNumero;
NumSection:= CptSect;
-NumPageSection:= LaPage.PagesSect;
+NumPageSection:= ThePage.PagesSect;
with T_Section(Sections[Pred(NumSection)]) do
begin
- if CmdEnTete.Count> 0
+ if CmdHeader.Count> 0
then
- for CptCmd:= 0 to Pred(CmdEnTete.Count) do
+ for CptCmd:= 0 to Pred(CmdHeader.Count) do
begin
- Cmd:= T_Commande(CmdEnTete.Items[CptCmd]);
- if Cmd is T_EcritTexte
+ Cmd:= T_Command(CmdHeader.Items[CptCmd]);
+ if Cmd is T_WriteText
then
- with Cmd as T_EcritTexte do
- EcritLigne(GetPosX,GetPosY,GetColonne,GetTexte,GetFonte,GetFond,GetBord,GetInterL,GetFlags,ZEnTete);
- if Cmd is T_Numero
+ with Cmd as T_WriteText do
+ WriteText(GetPosX,GetPosY,GetColumn,GetText,GetFont,GetBackColor,GetBorder,GetLineSpace,GetFlags,ZEnTete);
+ if Cmd is T_Number
then
- with Cmd as T_Numero do
- EcritNum(GetPosX,GetPosY,GetColonne,GetTexteNum,GetTexteTot,GetFonte,GetFond,GetBord,GetInterL,
+ with Cmd as T_Number do
+ WriteNumber(GetPosX,GetPosY,GetColumn,GetTextNum,GetTextTot,GetFont,GetBackColor,GetBorder,GetLineSpace,
GetFlags,GetTotal,GetAlpha,zEnTete,GetTypeNum);
- if Cmd is T_Espace
+ if Cmd is T_Space
then
- with Cmd as T_Espace do
- InsereEspace(GetPosY,GetColonne,GetHeight,GetFond,zEnTete);
- if Cmd is T_Trait
+ with Cmd as T_Space do
+ InsertSpace(GetPosY,GetColumn,GetHeight,GetBackColor,zEnTete);
+ if Cmd is T_Line
then
- with Cmd as T_Trait do
- TraceTrait(GetPosX,GetPosY,GetEndX,GetEndY,GetStyle);
+ with Cmd as T_Line do
+ DrawALine(GetPosX,GetPosY,GetEndX,GetEndY,GetStyle);
end;
if GetCmdPage(NumPageSection).Count> 0
then
for CptCmd:= 0 to Pred(GetCmdPage(NumPageSection).Count) do
begin
- Cmd:= T_Commande(GetCmdPage(NumPageSection).Items[CptCmd]);
- if Cmd is T_EcritTexte
+ Cmd:= T_Command(GetCmdPage(NumPageSection).Items[CptCmd]);
+ if Cmd is T_WriteText
then
- with Cmd as T_EcritTexte do
- EcritLigne(GetPosX,GetPosY,GetColonne,GetTexte,GetFonte,GetFond,GetBord,GetInterL,GetFlags,ZPage);
- if Cmd is T_Espace
+ with Cmd as T_WriteText do
+ WriteText(GetPosX,GetPosY,GetColumn,GetText,GetFont,GetBackColor,GetBorder,GetLineSpace,GetFlags,ZPage);
+ if Cmd is T_Space
then
- with Cmd as T_Espace do
- InsereEspace(GetPosY,GetColonne,GetHeight,GetFond,zPage);
- if Cmd is T_Trait
+ with Cmd as T_Space do
+ InsertSpace(GetPosY,GetColumn,GetHeight,GetBackColor,zPage);
+ if Cmd is T_Line
then
- with Cmd as T_Trait do
- TraceTrait(GetPosX,GetPosY,GetEndX,GetEndY,GetStyle);
+ with Cmd as T_Line do
+ DrawALine(GetPosX,GetPosY,GetEndX,GetEndY,GetStyle);
if Cmd is T_Surface
then
with Cmd as T_Surface do
PaintSurface(GetPoints,GetColor);
end;
- if CmdPied.Count> 0
+ if CmdFooter.Count> 0
then
- for CptCmd:= 0 to Pred(CmdPied.Count) do
+ for CptCmd:= 0 to Pred(CmdFooter.Count) do
begin
- Cmd:= T_Commande(CmdPied.Items[CptCmd]);
- if Cmd is T_EcritTexte
+ Cmd:= T_Command(CmdFooter.Items[CptCmd]);
+ if Cmd is T_WriteText
then
- with Cmd as T_EcritTexte do
- EcritLigne(GetPosX,GetPosY,GetColonne,GetTexte,GetFonte,GetFond,GetBord,GetInterL,GetFlags,ZPied);
- if Cmd is T_Numero
+ with Cmd as T_WriteText do
+ WriteText(GetPosX,GetPosY,GetColumn,GetText,GetFont,GetBackColor,GetBorder,GetLineSpace,GetFlags,ZPied);
+ if Cmd is T_Number
then
- with Cmd as T_Numero do
- EcritNum(GetPosX,GetPosY,GetColonne,GetTexteNum,GetTexteTot,GetFonte,GetFond,GetBord,GetInterL,
+ with Cmd as T_Number do
+ WriteNumber(GetPosX,GetPosY,GetColumn,GetTextNum,GetTextTot,GetFont,GetBackColor,GetBorder,GetLineSpace,
GetFlags,GetTotal,GetAlpha,zPied,GetTypeNum);
- if Cmd is T_Espace
+ if Cmd is T_Space
then
- with Cmd as T_Espace do
- InsereEspace(GetPosY,GetColonne,GetHeight,GetFond,zPied);
- if Cmd is T_Trait
+ with Cmd as T_Space do
+ InsertSpace(GetPosY,GetColumn,GetHeight,GetBackColor,zPied);
+ if Cmd is T_Line
then
- with Cmd as T_Trait do
- TraceTrait(GetPosX,GetPosY,GetEndX,GetEndY,GetStyle);
+ with Cmd as T_Line do
+ DrawALine(GetPosX,GetPosY,GetEndX,GetEndY,GetStyle);
end;
- if CmdCadres.Count> 0
+ if CmdFrames.Count> 0
then
- for CptCmd:= 0 to Pred(CmdCadres.Count) do
+ for CptCmd:= 0 to Pred(CmdFrames.Count) do
begin
- Cmd:= T_Commande(CmdCadres.Items[CptCmd]);
- if Cmd is T_Cadre
+ Cmd:= T_Command(CmdFrames.Items[CptCmd]);
+ if Cmd is T_Frame
then
- with Cmd as T_Cadre do
- TraceCadre(GetStyle,GetZone);
+ with Cmd as T_Frame do
+ DrawAFrame(GetStyle,GetZone);
end;
end;
end;
-procedure T_Imprime.DecaleLignesPied(Decalage: Single);
+procedure T_Report.ShiftFooterLines(Shift: Single);
var
Cpt: Integer;
- Cmd: T_Commande;
+ Cmd: T_Command;
begin
with T_Section(Sections[Pred(NumSection)]) do
- if CmdPied.Count> 0
+ if CmdFooter.Count> 0
then
- for Cpt:= 0 to Pred(CmdPied.Count) do
+ for Cpt:= 0 to Pred(CmdFooter.Count) do
begin
- Cmd:= T_Commande(CmdPied.Items[Cpt]);
- if Cmd is T_EcritTexte
+ Cmd:= T_Command(CmdFooter.Items[Cpt]);
+ if Cmd is T_WriteText
then
- with Cmd as T_EcritTexte do
- SetPosY(GetPosY-Decalage);
- if Cmd is T_Numero
+ with Cmd as T_WriteText do
+ SetPosY(GetPosY-Shift);
+ if Cmd is T_Number
then
- with Cmd as T_Numero do
- SetPosY(GetPosY-Decalage);
- if Cmd is T_Espace
+ with Cmd as T_Number do
+ SetPosY(GetPosY-Shift);
+ if Cmd is T_Space
then
- with Cmd as T_Espace do
- SetPosY(GetPosY-Decalage);
+ with Cmd as T_Space do
+ SetPosY(GetPosY-Shift);
end;
end;
-procedure T_Imprime.DecaleLigne(Decalage: Single);
+procedure T_Report.ShiftPageLines(Shift: Single);
var
Cpt: Integer;
- Cmd: T_Commande;
+ Cmd: T_Command;
begin
-with ALigne do
- for Cpt:= 0 to Pred(Commandes.Count) do
+with VWriteLine do
+ for Cpt:= 0 to Pred(Commands.Count) do
begin
- Cmd:= T_Commande(Commandes.Items[Cpt]);
- if Cmd is T_EcritTexte
+ Cmd:= T_Command(Commands.Items[Cpt]);
+ if Cmd is T_WriteText
then
- with Cmd as T_EcritTexte do
- SetPosY(GetPosY-Decalage);
+ with Cmd as T_WriteText do
+ SetPosY(GetPosY-Shift);
end;
end;
-procedure T_Imprime.DecaleGroupe(Decalage: Single);
+procedure T_Report.ShiftGroup(Shift: Single);
var
Cpt: Integer;
- Cmd: T_Commande;
+ Cmd: T_Command;
begin
-with AGroupe do
- for Cpt:= 0 to Pred(Commandes.Count) do
+with VGroup do
+ for Cpt:= 0 to Pred(Commands.Count) do
begin
- Cmd:= T_Commande(Commandes.Items[Cpt]);
- if Cmd is T_EcritTexte
+ Cmd:= T_Command(Commands.Items[Cpt]);
+ if Cmd is T_WriteText
then
- with Cmd as T_EcritTexte do
- SetPosY(GetPosY-Decalage);
+ with Cmd as T_WriteText do
+ SetPosY(GetPosY-Shift);
end;
end;
-function T_Imprime.EcritLigne(PosX,PosY: Single; Colonne,Texte,FonteNum,FondNum,BordNum,InterL: Integer;
+function T_Report.WriteText(PosX,PosY: Single; Column,Text,FontNum,BkColorNum,BordNum,SpLine: Integer;
TxtFlags: TfpgTextFlags; Zone: TZone): Single;
var
- PosH,PosV,IntlInt,IntLSup,IntLInf,EpaisTrait: Single;
- HTxt,HautTxt,Half,CoulTrait,Cpt: Integer;
- FinDeLigne,UseCurFont: Boolean;
+ PosH,PosV,LnSpInt,LnSpSup,LnSpInf,ThickLine: Single;
+ HTxt,HeighTxt,Half,ColorLine,Cpt: Integer;
+ EndOfLine,UseCurFont: Boolean;
Fnt: TfpgFont;
- StylTrait: TfpgLineStyle;
+ StyleLine: TfpgLineStyle;
Wraplst: TStringList;
begin
with T_Section(Sections[Pred(NumSection)]) do
begin
- FinDeLigne:= False;
+ EndOfLine:= False;
if FPreparation= ppPrepare
then
- if FFonteCourante<> FonteNum
+ if FCurrentFont<> FontNum
then
begin
- FFonteCourante:= FonteNum;
+ FCurrentFont:= FontNum;
UseCurFont:= False;
end
else
UseCurFont:= True;
- Fnt:= T_Fonte(Fontes[FonteNum]).GetFonte;
- if Interlignes.Count= 0
+ Fnt:= T_Font(Fonts[FontNum]).GetFont;
+ if LineSpaces.Count= 0
then
LineSpace(0,0,0);
- if FInterLCourante<> InterL
+ if FCurrentLineSpace<> SpLine
then
- FInterLCourante:= InterL;
- IntLSup:= T_Interligne(Interlignes[FInterLCourante]).GetSup;
- IntlInt:= T_Interligne(Interlignes[FInterLCourante]).GetInt;
- IntLInf:= T_Interligne(Interlignes[FInterLCourante]).GetInf;
- if Colonne> -1
+ FCurrentLineSpace:= SpLine;
+ with T_LineSpace(LineSpaces[FCurrentLineSpace]) do
+ begin
+ LnSpSup:= GetSup;
+ LnSpInt:= GetInt;
+ LnSpInf:= GetInf;
+ end;
+ if Column> -1
then
- HautTxt:= TxtHeight(Round(T_Colonne(Colonnes[Colonne]).GetTextWidth),Textes[Texte],Fnt,Round(IntlInt))+Round(IntLSup+IntLInf)
+ HeighTxt:= TxtHeight(Round(T_Column(Columns[Column]).GetTextWidth),Texts[Text],Fnt,Round(LnSpInt))+Round(LnSpSup+LnSpInf)
else
- HautTxt:= TxtHeight(Paper.W,Textes[Texte],Fnt,Round(IntlInt))+Round(IntLSup+IntLInf);
- if (Colonne> -1) and (BordNum> -1)
+ HeighTxt:= TxtHeight(Paper.W,Texts[Text],Fnt,Round(LnSpInt))+Round(LnSpSup+LnSpInf);
+ if (Column> -1) and (BordNum> -1)
then
- Half:= Round(T_TraitStyle(TraitStyles[T_Bord(Bords[BordNum]).GetStyle]).GetEpais) div 2
+ Half:= Round(T_LineStyle(LineStyles[T_Border(Borders[BordNum]).GetStyle]).GetThick) div 2
else
Half:= 0;
case FPreparation of
@@ -918,13 +921,13 @@ with T_Section(Sections[Pred(NumSection)]) do
if NbPages= 0
then
Page;
- if Colonne> -1
+ if Column> -1
then
begin
- HTxt:= ALigne.LineHeight;
- if HTxt< HautTxt
+ HTxt:= VWriteLine.LineHeight;
+ if HTxt< HeighTxt
then
- HTxt:= HautTxt;
+ HTxt:= HeighTxt;
end
else
if HTxt< Fnt.Height
@@ -932,82 +935,82 @@ with T_Section(Sections[Pred(NumSection)]) do
HTxt:= Fnt.Height;
case Zone of
zEntete:
- FPosRef.Y:= FMargeCourante.T+FEnTeteHeight;
+ FPosRef.Y:= FCurrentMargin.T+FHeaderHeight;
zPage:
- FPosRef.Y:= FMargeCourante.T+FEnTeteHeight+FPageHeight;
+ FPosRef.Y:= FCurrentMargin.T+FHeaderHeight+FPageHeight;
zPied:
begin
- FPosRef.Y:= FMargeCourante.B-HTxt;
- FPiedHeight:= FPiedHeight+HTxt;
- DecaleLignesPied(HTxt);
+ FPosRef.Y:= FCurrentMargin.B-HTxt;
+ FFooterHeight:= FFooterHeight+HTxt;
+ ShiftFooterLines(HTxt);
end;
end;
if PosY= lnCourante
then
- PosV:= FPosRef.Y+IntLSup
+ PosV:= FPosRef.Y+LnSpSup
else
begin
- FinDeLigne:= True;
+ EndOfLine:= True;
if PosY= lnFin
then
begin
- PosV:= FPosRef.Y+IntLSup;
+ PosV:= FPosRef.Y+LnSpSup;
case Zone of
zEnTete:
FPosRef.Y:= FPosRef.Y+HTxt;
zPage:
begin
- if FPosRef.Y+HTxt> FMargeCourante.B-FPiedHeight
+ if FPosRef.Y+HTxt> FCurrentMargin.B-FFooterHeight
then
- if FGroupe
+ if FGroup
then
begin
- if AGroupe.GroupeHeight+HTxt< FMargeCourante.B-FMargeCourante.T-FEnTeteHeight-FPiedHeight
+ if VGroup.GroupeHeight+HTxt< FCurrentMargin.B-FCurrentMargin.T-FHeaderHeight-FFooterHeight
then
begin
Page;
- if AGroupe.Commandes.Count> 0
+ if VGroup.Commands.Count> 0
then
begin
- FPosRef.Y:= FMargeCourante.T+FEnTeteHeight;
- DecaleGroupe(T_EcritTexte(AGroupe.Commandes[0]).GetPosY-FPosRef.Y);
- FPosRef.Y:= FPosRef.Y+AGroupe.GroupeHeight+Succ(Half);
- if ALigne.Commandes.Count> 0
+ FPosRef.Y:= FCurrentMargin.T+FHeaderHeight;
+ ShiftGroup(T_WriteText(VGroup.Commands[0]).GetPosY-FPosRef.Y);
+ FPosRef.Y:= FPosRef.Y+VGroup.GroupeHeight+Succ(Half);
+ if VWriteLine.Commands.Count> 0
then
- DecaleLigne(T_EcritTexte(ALigne.Commandes[0]).GetPosY-FPosRef.Y);
- PosV:= FPosRef.Y+IntLSup;
+ ShiftPageLines(T_WriteText(VWriteLine.Commands[0]).GetPosY-FPosRef.Y);
+ PosV:= FPosRef.Y+LnSpSup;
FPosRef.Y:= FPosRef.Y+HTxt+Succ(Half);
end
else
begin
- if ALigne.Commandes.Count> 0
+ if VWriteLine.Commands.Count> 0
then
- DecaleLigne(T_EcritTexte(ALigne.Commandes[0]).GetPosY-FPosRef.Y);
- PosV:= FPosRef.Y+IntLSup;
+ ShiftPageLines(T_WriteText(VWriteLine.Commands[0]).GetPosY-FPosRef.Y);
+ PosV:= FPosRef.Y+LnSpSup;
FPosRef.Y:= FPosRef.Y+HTxt+Succ(Half);
end;
end
else
begin
- LoadCmdGroupeToPage;
-// AGroupe.Commandes.Clear;
+ LoadCmdGroupToPage;
+// VGroup.Commands.Clear;
Page;
- FPosRef.Y:= FMargeCourante.T+FEnTeteHeight;
- if ALigne.Commandes.Count> 0
+ FPosRef.Y:= FCurrentMargin.T+FHeaderHeight;
+ if VWriteLine.Commands.Count> 0
then
- DecaleLigne(T_EcritTexte(ALigne.Commandes[0]).GetPosY-FPosRef.Y);
- PosV:= FPosRef.Y+IntLSup;
+ ShiftPageLines(T_WriteText(VWriteLine.Commands[0]).GetPosY-FPosRef.Y);
+ PosV:= FPosRef.Y+LnSpSup;
FPosRef.Y:= FPosRef.Y+HTxt+Succ(Half);
end;
end
else
begin
Page;
- FPosRef.Y:= FMargeCourante.T+FEnTeteHeight;
- if ALigne.Commandes.Count> 0
+ FPosRef.Y:= FCurrentMargin.T+FHeaderHeight;
+ if VWriteLine.Commands.Count> 0
then
- DecaleLigne(T_EcritTexte(ALigne.Commandes[0]).GetPosY-FPosRef.Y);
- PosV:= FPosRef.Y+IntLSup;
+ ShiftPageLines(T_WriteText(VWriteLine.Commands[0]).GetPosY-FPosRef.Y);
+ PosV:= FPosRef.Y+LnSpSup;
FPosRef.Y:= FPosRef.Y+HTxt+Succ(Half);
end
else
@@ -1016,131 +1019,131 @@ with T_Section(Sections[Pred(NumSection)]) do
end;
if BordNum> -1
then
- with T_Bord(Bords[BordNum]) do
- if bcBas in GetFlags
+ with T_Border(Borders[BordNum]) do
+ if bfBottom in GetFlags
then
FPosRef.Y:= FPosRef.Y+1;
end
else
begin
PosV:= PosY;
- FPosRef.Y:= PosV+IntLInf;
+ FPosRef.Y:= PosV+LnSpInf;
end;
case Zone of
zEnTete:
- FEnTeteHeight:= FPosRef.Y-FMargeCourante.T;
+ FHeaderHeight:= FPosRef.Y-FCurrentMargin.T;
zPage:
- FPageHeight:= FPosRef.Y-FEnTeteHeight-FMargeCourante.T;
+ FPageHeight:= FPosRef.Y-FHeaderHeight-FCurrentMargin.T;
end;
end;
//if PosX= cnSuite
//then
//PosH:= FPosRef.X
//else
- if Colonne= -1
+ if Column= -1
then
if PosX> 0
then
PosH:= PosX
else
begin
- PosH:= T_Colonne(Colonnes[ColDefaut]).GetTextPos;
+ PosH:= T_Column(Columns[ColDefaut]).GetTextPos;
if (txtRight in TxtFlags)
then
- PosH:= PosH+T_Colonne(Colonnes[ColDefaut]).ColWidth-Fnt.TextWidth(Textes[Texte])-T_Colonne(Colonnes[ColDefaut]).ColMargin;
+ PosH:= PosH+T_Column(Columns[ColDefaut]).ColWidth-Fnt.TextWidth(Texts[Text])-T_Column(Columns[ColDefaut]).ColMargin;
if (txtHCenter in TxtFlags)
then
- PosH:= PosH+(T_Colonne(Colonnes[ColDefaut]).ColWidth-Fnt.TextWidth(Textes[Texte]))/2;
+ PosH:= PosH+(T_Column(Columns[ColDefaut]).ColWidth-Fnt.TextWidth(Texts[Text]))/2;
end
else
if PosX> 0
then
begin
- if (PosX< T_Colonne(Colonnes[Colonne]).GetTextPos)
- or (PosX> (T_Colonne(Colonnes[Colonne]).GetTextPos+T_Colonne(Colonnes[Colonne]).GetTextWidth))
+ if (PosX< T_Column(Columns[Column]).GetTextPos)
+ or (PosX> (T_Column(Columns[Column]).GetTextPos+T_Column(Columns[Column]).GetTextWidth))
then
- PosH:= T_Colonne(Colonnes[Colonne]).GetTextPos
+ PosH:= T_Column(Columns[Column]).GetTextPos
else
PosH:= PosX;
end
else
begin
- PosH:= T_Colonne(Colonnes[Colonne]).GetTextPos;
+ PosH:= T_Column(Columns[Column]).GetTextPos;
if (txtRight in TxtFlags)
then
- PosH:= PosH+T_Colonne(Colonnes[Colonne]).ColWidth-Fnt.TextWidth(Textes[Texte])-T_Colonne(Colonnes[Colonne]).ColMargin;
+ PosH:= PosH+T_Column(Columns[Column]).ColWidth-Fnt.TextWidth(Texts[Text])-T_Column(Columns[Column]).ColMargin;
if (txtHCenter in TxtFlags)
then
- PosH:= PosH+(T_Colonne(Colonnes[Colonne]).ColWidth-Fnt.TextWidth(Textes[Texte]))/2;
+ PosH:= PosH+(T_Column(Columns[Column]).ColWidth-Fnt.TextWidth(Texts[Text]))/2;
end;
- FPosRef.X:= PosH+Fnt.TextWidth(Textes[Texte]+' ');
- ALigne.LoadTexte(PosH,PosV,Colonne,Texte,FonteNum,HTxt,FondNum,BordNum,InterL,UseCurFont,TxtFlags);
+ FPosRef.X:= PosH+Fnt.TextWidth(Texts[Text]+' ');
+ VWriteLine.LoadText(PosH,PosV,Column,Text,FontNum,HTxt,BkColorNum,BordNum,SpLine,UseCurFont,TxtFlags);
Result:= Pixels2Dim(FPosRef.Y);
- if FinDeLigne
+ if EndOfLine
then
begin
HTxt:= 0;
- FinLigne(Zone);
+ LineEnd(Zone);
end;
end;
- ppVisualise:
- with FCanevas do
+ ppVisualize:
+ with FCanvas do
begin
- Font:= T_Fonte(Fontes[FonteNum]).GetFonte;
- SetTextColor(T_Fonte(Fontes[FonteNum]).GetColor);
- if Colonne> -1
+ Font:= T_Font(Fonts[FontNum]).GetFont;
+ SetTextColor(T_Font(Fonts[FontNum]).GetColor);
+ if Column> -1
then
- with T_Colonne(Colonnes[Colonne]) do
+ with T_Column(Columns[Column]) do
begin
- if FondNum> -1
+ if BkColorNum> -1
then
- SetColor(T_Fond(Fonds[FondNum]).GetColor)
+ SetColor(T_BackColor(BackColors[BkColorNum]).GetColor)
else
SetColor(GetColor);
- FillRectangle(Round(ColPos),Round(PosY-IntLSup),Round(ColWidth),HautTxt);
+ FillRectangle(Round(ColPos),Round(PosY-LnSpSup),Round(ColWidth),HeighTxt);
if BordNum> -1
then
- with T_Bord(Bords[BordNum]) do
+ with T_Border(Borders[BordNum]) do
begin
- SetLineStyle(Round(T_TraitStyle(TraitStyles[GetStyle]).GetEpais),T_TraitStyle(TraitStyles[GetStyle]).GetStyle);
- SetColor(T_TraitStyle(TraitStyles[GetStyle]).GetColor);
- if bcGauche in GetFlags
+ SetLineStyle(Round(T_LineStyle(LineStyles[GetStyle]).GetThick),T_LineStyle(LineStyles[GetStyle]).GetStyle);
+ SetColor(T_LineStyle(LineStyles[GetStyle]).GetColor);
+ if bfLeft in GetFlags
then
- DrawLine(Round(ColPos)+Half,Round(PosY-IntLSup),Round(ColPos)+Half,Round(PosY-IntLSup)+HautTxt);
- if bcDroite in GetFlags
+ DrawLine(Round(ColPos)+Half,Round(PosY-LnSpSup),Round(ColPos)+Half,Round(PosY-LnSpSup)+HeighTxt);
+ if bfRight in GetFlags
then
- DrawLine(Round(ColPos+ColWidth)-Succ(Half),Round(PosY-IntLSup),Round(ColPos+ColWidth)-Succ(Half),Round(PosY-IntLSup)+HautTxt);
- if bcHaut in GetFlags
+ DrawLine(Round(ColPos+ColWidth)-Succ(Half),Round(PosY-LnSpSup),Round(ColPos+ColWidth)-Succ(Half),Round(PosY-LnSpSup)+HeighTxt);
+ if bfTop in GetFlags
then
- DrawLine(Round(ColPos),Round(PosY-IntLSup)+Half,Round(ColPos+ColWidth),Round(PosY-IntLSup)+Half);
- if bcBas in GetFlags
+ DrawLine(Round(ColPos),Round(PosY-LnSpSup)+Half,Round(ColPos+ColWidth),Round(PosY-LnSpSup)+Half);
+ if bfBottom in GetFlags
then
- DrawLine(Round(ColPos),Round(PosY-IntLSup)+HautTxt-Half,Round(ColPos+ColWidth),Round(PosY-IntLSup)+HautTxt-Half);
+ DrawLine(Round(ColPos),Round(PosY-LnSpSup)+HeighTxt-Half,Round(ColPos+ColWidth),Round(PosY-LnSpSup)+HeighTxt-Half);
end;
- DrawText(Round(GetTextPos),Round(PosY),Round(GetTextWidth),0,Textes[Texte],TxtFlags,Round(IntlInt));
+ DrawText(Round(GetTextPos),Round(PosY),Round(GetTextWidth),0,Texts[Text],TxtFlags,Round(LnSpInt));
end
else
- DrawText(Round(PosX),Round(PosY)-Fnt.Ascent,Textes[Texte],TxtFlags);
+ DrawText(Round(PosX),Round(PosY)-Fnt.Ascent,Texts[Text],TxtFlags);
end;
- ppFichierPDF:
- if Colonne> -1
+ ppPdfFile:
+ if Column> -1
then
- with T_Colonne(Colonnes[Colonne]) do
+ with T_Column(Columns[Column]) do
begin
- if (GetColor<> clWhite) or (FondNum> -1)
+ if (GetColor<> clWhite) or (BkColorNum> -1)
then
begin
PdfRect:= TPdfRect.Create;
with PdfRect do
begin
PageId:= NumPage;
- FGauche:= ColPos;
- FBas:= Paper.H-PosY+IntLSup-HautTxt;
- FHaut:= HautTxt;
- FLarg:= ColWidth;
- if FondNum> -1
+ FLeft:= ColPos;
+ FBottom:= Paper.H-PosY+LnSpSup-HeighTxt;
+ FHeight:= HeighTxt;
+ FWidth:= ColWidth;
+ if BkColorNum> -1
then
- FColor:= T_Fond(Fonds[FondNum]).GetColor
+ FColor:= T_BackColor(BackColors[BkColorNum]).GetColor
else
FColor:= GetColor;
FFill:= True;
@@ -1150,107 +1153,107 @@ with T_Section(Sections[Pred(NumSection)]) do
end;
if BordNum> -1
then
- with T_Bord(Bords[BordNum]) do
+ with T_Border(Borders[BordNum]) do
begin
- StylTrait:= T_TraitStyle(TraitStyles[T_Bord(Bords[BordNum]).GetStyle]).GetStyle;
- CoulTrait:= T_TraitStyle(TraitStyles[T_Bord(Bords[BordNum]).GetStyle]).GetColor;
- EpaisTrait:= T_TraitStyle(TraitStyles[T_Bord(Bords[BordNum]).GetStyle]).GetEpais;
- if bcGauche in GetFlags
+ StyleLine:= T_LineStyle(LineStyles[GetStyle]).GetStyle;
+ ColorLine:= T_LineStyle(LineStyles[GetStyle]).GetColor;
+ ThickLine:= T_LineStyle(LineStyles[GetStyle]).GetThick;
+ if bfLeft in GetFlags
then
begin
PdfLine:= TPdfLine.Create;
with PdfLine do
begin
PageId:= NumPage;
- FStartX:= ColPos;
- FStartY:= Paper.H-PosY+IntLSup;
+ FBeginX:= ColPos;
+ FBeginY:= Paper.H-PosY+LnSpSup;
FEndX:= ColPos;
- FEndY:= Paper.H-PosY+IntLSup-HautTxt;
- FStyle:= StylTrait;
- FColor:= CoulTrait;
- FEpais:= EpaisTrait;
+ FEndY:= Paper.H-PosY+LnSpSup-HeighTxt;
+ FStyle:= StyleLine;
+ FColor:= ColorLine;
+ FThick:= ThickLine;
end;
PdfPage.Add(PdfLine);
end;
- if bcDroite in GetFlags
+ if bfRight in GetFlags
then
begin
PdfLine:= TPdfLine.Create;
with PdfLine do
begin
PageId:= NumPage;
- FStartX:= ColPos+ColWidth;
- FStartY:= Paper.H-PosY+IntLSup;
+ FBeginX:= ColPos+ColWidth;
+ FBeginY:= Paper.H-PosY+LnSpSup;
FEndX:= ColPos+ColWidth;
- FEndY:= Paper.H-PosY+IntLSup-HautTxt;
- FStyle:= StylTrait;
- FColor:= CoulTrait;
- FEpais:= EpaisTrait;
+ FEndY:= Paper.H-PosY+LnSpSup-HeighTxt;
+ FStyle:= StyleLine;
+ FColor:= ColorLine;
+ FThick:= ThickLine;
end;
PdfPage.Add(PdfLine);
end;
- if bcHaut in GetFlags
+ if bfTop in GetFlags
then
begin
PdfLine:= TPdfLine.Create;
with PdfLine do
begin
PageId:= NumPage;
- FStartX:= ColPos;
- FStartY:= Paper.H-PosY+IntLSup;
+ FBeginX:= ColPos;
+ FBeginY:= Paper.H-PosY+LnSpSup;
FEndX:= ColPos+ColWidth;
- FEndY:= Paper.H-PosY+IntLSup;
- FStyle:= StylTrait;
- FColor:= CoulTrait;
- FEpais:= EpaisTrait;
+ FEndY:= Paper.H-PosY+LnSpSup;
+ FStyle:= StyleLine;
+ FColor:= ColorLine;
+ FThick:= ThickLine;
end;
PdfPage.Add(PdfLine);
end;
- if bcBas in GetFlags
+ if bfBottom in GetFlags
then
begin
PdfLine:= TPdfLine.Create;
with PdfLine do
begin
PageId:= NumPage;
- FStartX:= ColPos;
- FStartY:= Paper.H-PosY+IntLSup-HautTxt;
+ FBeginX:= ColPos;
+ FBeginY:= Paper.H-PosY+LnSpSup-HeighTxt;
FEndX:= ColPos+ColWidth;
- FEndY:= Paper.H-PosY+IntLSup-HautTxt;
- FStyle:= StylTrait;
- FColor:= CoulTrait;
- FEpais:= EpaisTrait;
+ FEndY:= Paper.H-PosY+LnSpSup-HeighTxt;
+ FStyle:= StyleLine;
+ FColor:= ColorLine;
+ FThick:= ThickLine;
end;
PdfPage.Add(PdfLine);
end;
end;
- if Fnt.TextWidth(Textes[Texte])< GetTextWidth
+ if Fnt.TextWidth(Texts[Text])< GetTextWidth
then
begin
PdfTexte:= TPdfTexte.Create;
with PdfTexte do
begin
PageId:= NumPage;
- FFont:= FonteNum;
- FSize:= T_Fonte(Fontes[FonteNum]).GetSize;
- FColor:= T_Fonte(Fontes[FonteNum]).GetColor;
+ FFont:= FontNum;
+ FSize:= T_Font(Fonts[FontNum]).GetSize;
+ FColor:= T_Font(Fonts[FontNum]).GetColor;
TextPosX:= GetTextPos;
if (txtRight in TxtFlags)
then
- TextPosX:= ColPos+ColWidth-ColMargin-Fnt.TextWidth(Textes[Texte]);
+ TextPosX:= ColPos+ColWidth-ColMargin-Fnt.TextWidth(Texts[Text]);
if (txtHCenter in TxtFlags)
then
- TextPosX:= GetTextPos+(ColWidth-Fnt.TextWidth(Textes[Texte]))/2;
+ TextPosX:= GetTextPos+(ColWidth-Fnt.TextWidth(Texts[Text]))/2;
TextPosY:= Paper.H-PosY-Fnt.Ascent;
- TextLarg:= ColWidth;
- Ecriture:= Textes[Texte];
+ TextWidt:= ColWidth;
+ Writting:= Texts[Text];
end;
PdfPage.Add(PdfTexte);
end
else
begin
Wraplst:= TStringList.Create;
- Wraplst.Text:= Textes[Texte];
+ Wraplst.Text:= Texts[Text];
for Cpt:= 0 to Pred(Wraplst.Count) do
Wraplst[Cpt]:= AddLineBreaks(Wraplst[Cpt],Round(GetTextWidth),Fnt);
Wraplst.Text:= Wraplst.Text;
@@ -1260,9 +1263,9 @@ with T_Section(Sections[Pred(NumSection)]) do
with PdfTexte do
begin
PageId:= NumPage;
- FFont:= FonteNum;
- FSize:= T_Fonte(Fontes[FonteNum]).GetSize;
- FColor:= T_Fonte(Fontes[FonteNum]).GetColor;
+ FFont:= FontNum;
+ FSize:= T_Font(Fonts[FontNum]).GetSize;
+ FColor:= T_Font(Fonts[FontNum]).GetColor;
TextPosX:= GetTextPos;
if (txtRight in TxtFlags)
then
@@ -1270,9 +1273,9 @@ with T_Section(Sections[Pred(NumSection)]) do
if (txtHCenter in TxtFlags)
then
TextPosX:= GetTextPos+(ColWidth-Fnt.TextWidth(Wraplst[Cpt]))/2;
- TextPosY:= Paper.H-PosY-Fnt.Ascent-(Fnt.Height+IntlInt)*Cpt;
- TextLarg:= ColWidth;
- Ecriture:= Wraplst[Cpt];
+ TextPosY:= Paper.H-PosY-Fnt.Ascent-(Fnt.Height+LnSpInt)*Cpt;
+ TextWidt:= ColWidth;
+ Writting:= Wraplst[Cpt];
end;
PdfPage.Add(PdfTexte);
end;
@@ -1285,13 +1288,13 @@ with T_Section(Sections[Pred(NumSection)]) do
with PdfTexte do
begin
PageId:= NumPage;
- FFont:= FonteNum;
- FSize:= T_Fonte(Fontes[FonteNum]).GetSize;
- FColor:= T_Fonte(Fontes[FonteNum]).GetColor;
+ FFont:= FontNum;
+ FSize:= T_Font(Fonts[FontNum]).GetSize;
+ FColor:= T_Font(Fonts[FontNum]).GetColor;
FPosX:= PosX;
FPosY:= Paper.H-PosY;
- FLarg:= Paper.W;
- FText:= Textes[Texte];
+ FWidth:= Paper.W;
+ FText:= Texts[Text];
end;
PdfPage.Add(PdfTexte);
end;
@@ -1299,7 +1302,7 @@ with T_Section(Sections[Pred(NumSection)]) do
end;
end;
-function T_Imprime.EcritNum(PosX,PosY: Single; Colonne,TexteNum,TexteTot,FonteNum,FondNum,BordNum,InterL: Integer;
+function T_Report.WriteNumber(PosX,PosY: Single; Column,TextNum,TextTot,FontNum,BkColorNum,BordNum,SpLine: Integer;
TxtFlags: TfpgTextFlags; Total,Alpha: Boolean; Zone: TZone; SPNum: TSectPageNum): Single;
function BuildChaine: string;
@@ -1310,92 +1313,95 @@ function T_Imprime.EcritNum(PosX,PosY: Single; Colonne,TexteNum,TexteTot,FonteNu
PageNum:
if Total
then
- Result:= Textes[TexteNum]+' '+IntToStr(NumPage)+' '+Textes[TexteTot]+' '
+ Result:= Texts[TextNum]+' '+IntToStr(NumPage)+' '+Texts[TextTot]+' '
+IntToStr(T_Section(Sections[Pred(Sections.Count)]).TotPages)
else
- Result:= Textes[TexteNum]+' '+IntToStr(NumPage);
+ Result:= Texts[TextNum]+' '+IntToStr(NumPage);
SectNum:
begin
if Alpha
then
- NumAlpha:= ConvertitEnAlpha(NumSection)
+ NumAlpha:= Convert2Alpha(NumSection)
else
NumAlpha:= IntToStr(NumSection);
if Total
then
- Result:= Textes[TexteNum]+' '+NumAlpha+' '+Textes[TexteTot]+' '+IntToStr(Sections.Count)
+ Result:= Texts[TextNum]+' '+NumAlpha+' '+Texts[TextTot]+' '+IntToStr(Sections.Count)
else
- Result:= Textes[TexteNum]+' '+NumAlpha;
+ Result:= Texts[TextNum]+' '+NumAlpha;
end;
PSectNum:
begin
if Alpha
then
- NumAlpha:= ConvertitEnAlpha(NumPageSection)
+ NumAlpha:= Convert2Alpha(NumPageSection)
else
NumAlpha:= IntToStr(NumPageSection);
if Total
then
- Result:= Textes[TexteNum]+' '+NumAlpha+' '+Textes[TexteTot]+' '
+ Result:= Texts[TextNum]+' '+NumAlpha+' '+Texts[TextTot]+' '
+IntToStr(T_Section(Sections[Pred(NumSection)]).NbPages)
else
- Result:= Textes[TexteNum]+' '+NumAlpha;
+ Result:= Texts[TextNum]+' '+NumAlpha;
end;
end;
end;
var
- PosH,PosV,IntlInt,IntLSup,IntLInf,EpaisTrait: Single;
- HTxt,HautTxt,Half,CoulTrait: Integer;
- FinDeLigne,UseCurFont: Boolean;
+ PosH,PosV,LnSpInt,LnSpSup,LnSpInf,ThickLine: Single;
+ HTxt,HeighTxt,Half,ColorLine: Integer;
+ EndOfLine,UseCurFont: Boolean;
Fnt: TfpgFont;
- StylTrait: TfpgLineStyle;
+ StyleLine: TfpgLineStyle;
Chaine: string;
begin
with T_Section(Sections[Pred(NumSection)]) do
begin
- FinDeLigne:= False;
+ EndOfLine:= False;
if FPreparation= ppPrepare
then
- if FFonteCourante<> FonteNum
+ if FCurrentFont<> FontNum
then
begin
- FFonteCourante:= FonteNum;
+ FCurrentFont:= FontNum;
UseCurFont:= False;
end
else
UseCurFont:= True;
- Fnt:= T_Fonte(Fontes[FonteNum]).GetFonte;
- if Interlignes.Count= 0
+ Fnt:= T_Font(Fonts[FontNum]).GetFont;
+ if LineSpaces.Count= 0
then
LineSpace(0,0,0);
- if FInterLCourante<> InterL
+ if FCurrentLineSpace<> SpLine
then
- FInterLCourante:= InterL;
- IntLSup:= T_Interligne(Interlignes[FInterLCourante]).GetSup;
- IntlInt:= T_Interligne(Interlignes[FInterLCourante]).GetInt;
- IntLInf:= T_Interligne(Interlignes[FInterLCourante]).GetInf;
- if Colonne> -1
+ FCurrentLineSpace:= SpLine;
+ with T_LineSpace(LineSpaces[FCurrentLineSpace]) do
+ begin
+ LnSpSup:= GetSup;
+ LnSpInt:= GetInt;
+ LnSpInf:= GetInf;
+ end;
+ if Column> -1
then
- HautTxt:= TxtHeight(Round(T_Colonne(Colonnes[Colonne]).GetTextWidth),Textes[TexteNum]+' 0 '+Textes[TexteTot]+' 0',Fnt,Round(IntlInt))+Round(IntLSup+IntLInf)
+ HeighTxt:= TxtHeight(Round(T_Column(Columns[Column]).GetTextWidth),Texts[TextNum]+' 0 '+Texts[TextTot]+' 0',Fnt,Round(LnSpInt))+Round(LnSpSup+LnSpInf)
else
- HautTxt:= TxtHeight(Paper.W,Textes[TexteNum]+' 0 '+Textes[TexteTot]+' 0',Fnt,Round(IntlInt))+Round(IntLSup+IntLInf);
- if (Colonne> -1) and (BordNum> -1)
+ HeighTxt:= TxtHeight(Paper.W,Texts[TextNum]+' 0 '+Texts[TextTot]+' 0',Fnt,Round(LnSpInt))+Round(LnSpSup+LnSpInf);
+ if (Column> -1) and (BordNum> -1)
then
- Half:= Round(T_TraitStyle(TraitStyles[T_Bord(Bords[BordNum]).GetStyle]).GetEpais) div 2;
+ Half:= Round(T_LineStyle(LineStyles[T_Border(Borders[BordNum]).GetStyle]).GetThick) div 2;
case FPreparation of
ppPrepare:
begin
if NbPages= 0
then
Page;
- if Colonne> -1
+ if Column> -1
then
begin
- HTxt:= ALigne.LineHeight;
- if HTxt< HautTxt
+ HTxt:= VWriteLine.LineHeight;
+ if HTxt< HeighTxt
then
- HTxt:= HautTxt;
+ HTxt:= HeighTxt;
end
else
if HTxt< Fnt.Height
@@ -1403,166 +1409,166 @@ with T_Section(Sections[Pred(NumSection)]) do
HTxt:= Fnt.Height;
case Zone of
zEntete:
- FPosRef.Y:= FMargeCourante.T+FEnTeteHeight;
+ FPosRef.Y:= FCurrentMargin.T+FHeaderHeight;
zPied:
begin
- FPosRef.Y:= FMargeCourante.B-HTxt;
- FPiedHeight:= FPiedHeight+HTxt;
- DecaleLignesPied(HTxt);
+ FPosRef.Y:= FCurrentMargin.B-HTxt;
+ FFooterHeight:= FFooterHeight+HTxt;
+ ShiftFooterLines(HTxt);
end;
end;
if PosY= lnCourante
then
- PosV:= FPosRef.Y+IntLSup
+ PosV:= FPosRef.Y+LnSpSup
else
begin
- FinDeLigne:= True;
+ EndOfLine:= True;
if PosY= lnFin
then
begin
- PosV:= FPosRef.Y+IntLSup;
+ PosV:= FPosRef.Y+LnSpSup;
case Zone of
zEnTete:
FPosRef.Y:= FPosRef.Y+HTxt;
end;
if BordNum> -1
then
- with T_Bord(Bords[BordNum]) do
- if bcBas in GetFlags
+ with T_Border(Borders[BordNum]) do
+ if bfBottom in GetFlags
then
FPosRef.Y:= FPosRef.Y+1;
end
else
begin
PosV:= PosY;
- FPosRef.Y:= PosV+IntLInf;
+ FPosRef.Y:= PosV+LnSpInf;
end;
case Zone of
zEnTete:
- FEnTeteHeight:= FPosRef.Y-FMargeCourante.T;
+ FHeaderHeight:= FPosRef.Y-FCurrentMargin.T;
end;
end;
- if Colonne= -1
+ if Column= -1
then
if PosX> 0
then
PosH:= PosX
else
begin
- PosH:= T_Colonne(Colonnes[ColDefaut]).GetTextPos-T_Colonne(Colonnes[0]).ColMargin;
+ PosH:= T_Column(Columns[ColDefaut]).GetTextPos-T_Column(Columns[0]).ColMargin;
if (txtRight in TxtFlags)
then
if Total
then
- PosH:= PosH+T_Colonne(Colonnes[ColDefaut]).ColWidth-Fnt.TextWidth(Textes[TexteNum]+' 0 '+Textes[TexteTot]+' 0 ')-T_Colonne(Colonnes[ColDefaut]).ColMargin
+ PosH:= PosH+T_Column(Columns[ColDefaut]).ColWidth-Fnt.TextWidth(Texts[TextNum]+' 0 '+Texts[TextTot]+' 0 ')-T_Column(Columns[ColDefaut]).ColMargin
else
- PosH:= PosH+T_Colonne(Colonnes[ColDefaut]).ColWidth-Fnt.TextWidth(Textes[TexteNum]+' 0 ')-T_Colonne(Colonnes[ColDefaut]).ColMargin;
+ PosH:= PosH+T_Column(Columns[ColDefaut]).ColWidth-Fnt.TextWidth(Texts[TextNum]+' 0 ')-T_Column(Columns[ColDefaut]).ColMargin;
if (txtHCenter in TxtFlags)
then
if Total
then
- PosH:= PosH+(T_Colonne(Colonnes[ColDefaut]).ColWidth-Fnt.TextWidth(Textes[TexteNum]+' 0 '+Textes[TexteTot]+' 0 '))/2
+ PosH:= PosH+(T_Column(Columns[ColDefaut]).ColWidth-Fnt.TextWidth(Texts[TextNum]+' 0 '+Texts[TextTot]+' 0 '))/2
else
- PosH:= PosH+(T_Colonne(Colonnes[ColDefaut]).ColWidth-Fnt.TextWidth(Textes[TexteNum]+' 0 '))/2;
+ PosH:= PosH+(T_Column(Columns[ColDefaut]).ColWidth-Fnt.TextWidth(Texts[TextNum]+' 0 '))/2;
end
else
if PosX> 0
then
- if (PosX< T_Colonne(Colonnes[Colonne]).GetTextPos)
- or (PosX> (T_Colonne(Colonnes[Colonne]).GetTextPos+T_Colonne(Colonnes[Colonne]).GetTextWidth))
+ if (PosX< T_Column(Columns[Column]).GetTextPos)
+ or (PosX> (T_Column(Columns[Column]).GetTextPos+T_Column(Columns[Column]).GetTextWidth))
then
- PosH:= T_Colonne(Colonnes[Colonne]).GetTextPos
+ PosH:= T_Column(Columns[Column]).GetTextPos
else
PosH:= PosX
else
begin
- PosH:= T_Colonne(Colonnes[Colonne]).GetTextPos-T_Colonne(Colonnes[Colonne]).ColMargin;
+ PosH:= T_Column(Columns[Column]).GetTextPos-T_Column(Columns[Column]).ColMargin;
if (txtRight in TxtFlags)
then
if Total
then
- PosH:= PosH+T_Colonne(Colonnes[Colonne]).ColWidth-Fnt.TextWidth(Textes[TexteNum]+' 0 '+Textes[TexteTot]+' 0 ')-T_Colonne(Colonnes[Colonne]).ColMargin
+ PosH:= PosH+T_Column(Columns[Column]).ColWidth-Fnt.TextWidth(Texts[TextNum]+' 0 '+Texts[TextTot]+' 0 ')-T_Column(Columns[Column]).ColMargin
else
- PosH:= PosH+T_Colonne(Colonnes[Colonne]).ColWidth-Fnt.TextWidth(Textes[TexteNum]+' 0 ')-T_Colonne(Colonnes[Colonne]).ColMargin;
+ PosH:= PosH+T_Column(Columns[Column]).ColWidth-Fnt.TextWidth(Texts[TextNum]+' 0 ')-T_Column(Columns[Column]).ColMargin;
if (txtHCenter in TxtFlags)
then
if Total
then
- PosH:= PosH+(T_Colonne(Colonnes[Colonne]).ColWidth-Fnt.TextWidth(Textes[TexteNum]+' 0 '+Textes[TexteTot]+' 0 '))/2
+ PosH:= PosH+(T_Column(Columns[Column]).ColWidth-Fnt.TextWidth(Texts[TextNum]+' 0 '+Texts[TextTot]+' 0 '))/2
else
- PosH:= PosH+(T_Colonne(Colonnes[Colonne]).ColWidth-Fnt.TextWidth(Textes[TexteNum]+' 0 '))/2;
+ PosH:= PosH+(T_Column(Columns[Column]).ColWidth-Fnt.TextWidth(Texts[TextNum]+' 0 '))/2;
end;
- FPosRef.X:= PosH+Fnt.TextWidth(Textes[TexteNum]+' 0 '+Textes[TexteTot]+' 0 ');
- ALigne.LoadNumero(PosH,PosV,Colonne,TexteNum,TexteTot,FonteNum,HTxt,FondNum,BordNum,InterL,UseCurFont,TxtFlags,Total,Alpha,SPNum);
+ FPosRef.X:= PosH+Fnt.TextWidth(Texts[TextNum]+' 0 '+Texts[TextTot]+' 0 ');
+ VWriteLine.LoadNumber(PosH,PosV,Column,TextNum,TextTot,FontNum,HTxt,BkColorNum,BordNum,SpLine,UseCurFont,TxtFlags,Total,Alpha,SPNum);
Result:= Pixels2Dim(FPosRef.Y);
- if FinDeLigne
+ if EndOfLine
then
begin
HTxt:= 0;
- FinLigne(Zone);
+ LineEnd(Zone);
end;
end;
- ppVisualise:
- with FCanevas do
+ ppVisualize:
+ with FCanvas do
begin
Chaine:= BuildChaine;
- Font:= T_Fonte(Fontes[FonteNum]).GetFonte;
- SetTextColor(T_Fonte(Fontes[FonteNum]).GetColor);
- if Colonne> -1
+ Font:= T_Font(Fonts[FontNum]).GetFont;
+ SetTextColor(T_Font(Fonts[FontNum]).GetColor);
+ if Column> -1
then
- with T_Colonne(Colonnes[Colonne]) do
+ with T_Column(Columns[Column]) do
begin
- if FondNum> -1
+ if BkColorNum> -1
then
- SetColor(T_Fond(Fonds[FondNum]).GetColor)
+ SetColor(T_BackColor(BackColors[BkColorNum]).GetColor)
else
SetColor(GetColor);
- FillRectangle(Round(ColPos),Round(PosY-IntLSup),Round(ColWidth),HautTxt);
+ FillRectangle(Round(ColPos),Round(PosY-LnSpSup),Round(ColWidth),HeighTxt);
if BordNum> -1
then
- with T_Bord(Bords[BordNum]) do
+ with T_Border(Borders[BordNum]) do
begin
- SetLineStyle(Round(T_TraitStyle(TraitStyles[GetStyle]).GetEpais),T_TraitStyle(TraitStyles[GetStyle]).GetStyle);
- SetColor(T_TraitStyle(TraitStyles[GetStyle]).GetColor);
- if bcGauche in GetFlags
+ SetLineStyle(Round(T_LineStyle(LineStyles[GetStyle]).GetThick),T_LineStyle(LineStyles[GetStyle]).GetStyle);
+ SetColor(T_LineStyle(LineStyles[GetStyle]).GetColor);
+ if bfLeft in GetFlags
then
- DrawLine(Round(ColPos)+Half,Round(PosY-IntLSup),Round(ColPos)+Half,Round(PosY-IntLSup)+HautTxt);
- if bcDroite in GetFlags
+ DrawLine(Round(ColPos)+Half,Round(PosY-LnSpSup),Round(ColPos)+Half,Round(PosY-LnSpSup)+HeighTxt);
+ if bfRight in GetFlags
then
- DrawLine(Round(ColPos+ColWidth)-Half,Round(PosY-IntLSup),Round(ColPos+ColWidth)-Half,Round(PosY-IntLSup)+HautTxt);
- if bcHaut in GetFlags
+ DrawLine(Round(ColPos+ColWidth)-Half,Round(PosY-LnSpSup),Round(ColPos+ColWidth)-Half,Round(PosY-LnSpSup)+HeighTxt);
+ if bfTop in GetFlags
then
- DrawLine(Round(ColPos),Round(PosY-IntLSup)+Half,Round(ColPos+ColWidth),Round(PosY-IntLSup)+Half);
- if bcBas in GetFlags
+ DrawLine(Round(ColPos),Round(PosY-LnSpSup)+Half,Round(ColPos+ColWidth),Round(PosY-LnSpSup)+Half);
+ if bfBottom in GetFlags
then
- DrawLine(Round(ColPos),Round(PosY-IntLSup)+HautTxt-Succ(Half),Round(ColPos+ColWidth),Round(PosY-IntLSup)+HautTxt-Succ(Half));
+ DrawLine(Round(ColPos),Round(PosY-LnSpSup)+HeighTxt-Succ(Half),Round(ColPos+ColWidth),Round(PosY-LnSpSup)+HeighTxt-Succ(Half));
end;
- DrawText(Round(GetTextPos),Round(PosY),Round(GetTextWidth),0,Chaine,TxtFlags,Round(IntlInt));
+ DrawText(Round(GetTextPos),Round(PosY),Round(GetTextWidth),0,Chaine,TxtFlags,Round(LnSpInt));
end
else
DrawText(Round(PosX),Round(PosY),Chaine,TxtFlags);
end;
- ppFichierPDF:
+ ppPdfFile:
begin
Chaine:= BuildChaine;
- if Colonne> -1
+ if Column> -1
then
- with T_Colonne(Colonnes[Colonne]) do
+ with T_Column(Columns[Column]) do
begin
- if (GetColor<> clWhite) or (FondNum> -1)
+ if (GetColor<> clWhite) or (BkColorNum> -1)
then
begin
PdfRect:= TPdfRect.Create;
with PdfRect do
begin
PageId:= NumPage;
- FGauche:= ColPos;
- FBas:= Paper.H-PosY+IntLSup-HautTxt;
- FHaut:= HautTxt;
- FLarg:= ColWidth;
- if FondNum> -1
+ FLeft:= ColPos;
+ FBottom:= Paper.H-PosY+LnSpSup-HeighTxt;
+ FHeight:= HeighTxt;
+ FWidth:= ColWidth;
+ if BkColorNum> -1
then
- FColor:= T_Fond(Fonds[FondNum]).GetColor
+ FColor:= T_BackColor(BackColors[BkColorNum]).GetColor
else
FColor:= GetColor;
FFill:= True;
@@ -1572,76 +1578,76 @@ with T_Section(Sections[Pred(NumSection)]) do
end;
if BordNum> -1
then
- with T_Bord(Bords[BordNum]) do
+ with T_Border(Borders[BordNum]) do
begin
- StylTrait:= T_TraitStyle(TraitStyles[T_Bord(Bords[BordNum]).GetStyle]).GetStyle;
- CoulTrait:= T_TraitStyle(TraitStyles[T_Bord(Bords[BordNum]).GetStyle]).GetColor;
- EpaisTrait:= T_TraitStyle(TraitStyles[T_Bord(Bords[BordNum]).GetStyle]).GetEpais;
- if bcGauche in GetFlags
+ StyleLine:= T_LineStyle(LineStyles[GetStyle]).GetStyle;
+ ColorLine:= T_LineStyle(LineStyles[GetStyle]).GetColor;
+ ThickLine:= T_LineStyle(LineStyles[GetStyle]).GetThick;
+ if bfLeft in GetFlags
then
begin
PdfLine:= TPdfLine.Create;
with PdfLine do
begin
PageId:= NumPage;
- FStartX:= ColPos;
- FStartY:= Paper.H-PosY+IntLSup;
+ FBeginX:= ColPos;
+ FBeginY:= Paper.H-PosY+LnSpSup;
FEndX:= ColPos;
- FEndY:= Paper.H-PosY+IntLSup-HautTxt;
- FStyle:= StylTrait;
- FColor:= CoulTrait;
- FEpais:= EpaisTrait;
+ FEndY:= Paper.H-PosY+LnSpSup-HeighTxt;
+ FStyle:= StyleLine;
+ FColor:= ColorLine;
+ FThick:= ThickLine;
end;
PdfPage.Add(PdfLine);
end;
- if bcDroite in GetFlags
+ if bfRight in GetFlags
then
begin
PdfLine:= TPdfLine.Create;
with PdfLine do
begin
PageId:= NumPage;
- FStartX:= ColPos+ColWidth;
- FStartY:= Paper.H-PosY+IntLSup;
+ FBeginX:= ColPos+ColWidth;
+ FBeginY:= Paper.H-PosY+LnSpSup;
FEndX:= ColPos+ColWidth;
- FEndY:= Paper.H-PosY+IntLSup-HautTxt;
- FStyle:= StylTrait;
- FColor:= CoulTrait;
- FEpais:= EpaisTrait;
+ FEndY:= Paper.H-PosY+LnSpSup-HeighTxt;
+ FStyle:= StyleLine;
+ FColor:= ColorLine;
+ FThick:= ThickLine;
end;
PdfPage.Add(PdfLine);
end;
- if bcHaut in GetFlags
+ if bfTop in GetFlags
then
begin
PdfLine:= TPdfLine.Create;
with PdfLine do
begin
PageId:= NumPage;
- FStartX:= ColPos;
- FStartY:= Paper.H-PosY+IntLSup;
+ FBeginX:= ColPos;
+ FBeginY:= Paper.H-PosY+LnSpSup;
FEndX:= ColPos+ColWidth;
- FEndY:= Paper.H-PosY+IntLSup;
- FStyle:= StylTrait;
- FColor:= CoulTrait;
- FEpais:= EpaisTrait;
+ FEndY:= Paper.H-PosY+LnSpSup;
+ FStyle:= StyleLine;
+ FColor:= ColorLine;
+ FThick:= ThickLine;
end;
PdfPage.Add(PdfLine);
end;
- if bcBas in GetFlags
+ if bfBottom in GetFlags
then
begin
PdfLine:= TPdfLine.Create;
with PdfLine do
begin
PageId:= NumPage;
- FStartX:= ColPos;
- FStartY:= Paper.H-PosY+IntLSup-HautTxt;
+ FBeginX:= ColPos;
+ FBeginY:= Paper.H-PosY+LnSpSup-HeighTxt;
FEndX:= ColPos+ColWidth;
- FEndY:= Paper.H-PosY+IntLSup-HautTxt;
- FStyle:= StylTrait;
- FColor:= CoulTrait;
- FEpais:= EpaisTrait;
+ FEndY:= Paper.H-PosY+LnSpSup-HeighTxt;
+ FStyle:= StyleLine;
+ FColor:= ColorLine;
+ FThick:= ThickLine;
end;
PdfPage.Add(PdfLine);
end;
@@ -1650,9 +1656,9 @@ with T_Section(Sections[Pred(NumSection)]) do
with PdfTexte do
begin
PageId:= NumPage;
- FFont:= FonteNum;
- FSize:= T_Fonte(Fontes[FonteNum]).GetSize;
- FColor:= T_Fonte(Fontes[FonteNum]).GetColor;
+ FFont:= FontNum;
+ FSize:= T_Font(Fonts[FontNum]).GetSize;
+ FColor:= T_Font(Fonts[FontNum]).GetColor;
TextPosX:= GetTextPos;
if (txtRight in TxtFlags)
then
@@ -1661,8 +1667,8 @@ with T_Section(Sections[Pred(NumSection)]) do
then
TextPosX:= GetTextPos+(ColWidth-Fnt.TextWidth(Chaine))/2;
TextPosY:= Paper.H-PosY-Fnt.Ascent;
- TextLarg:= ColWidth;
- Ecriture:= Chaine;
+ TextWidt:= ColWidth;
+ Writting:= Chaine;
end;
PdfPage.Add(PdfTexte);
end
@@ -1672,12 +1678,12 @@ with T_Section(Sections[Pred(NumSection)]) do
with PdfTexte do
begin
PageId:= NumPage;
- FFont:= FonteNum;
- FSize:= T_Fonte(Fontes[FonteNum]).GetSize;
- FColor:= T_Fonte(Fontes[FonteNum]).GetColor;
+ FFont:= FontNum;
+ FSize:= T_Font(Fonts[FontNum]).GetSize;
+ FColor:= T_Font(Fonts[FontNum]).GetColor;
FPosX:= PosX;
FPosY:= PosY-Fnt.Ascent;
- FLarg:= Paper.W;
+ FWidth:= Paper.W;
FText:= Chaine;
end;
PdfPage.Add(PdfTexte);
@@ -1687,7 +1693,7 @@ with T_Section(Sections[Pred(NumSection)]) do
end;
end;
-function T_Imprime.InsereEspace(PosY: Single; Colonne: Integer; EspHeight: Single; FondNum: Integer; Zone: TZone): Single;
+function T_Report.InsertSpace(PosY: Single; Column: Integer; SpaceHeight: Single; BkColorNum: Integer; Zone: TZone): Single;
var
PosV: Single;
begin
@@ -1704,70 +1710,70 @@ with T_Section(Sections[Pred(NumSection)]) do
case Zone of
zEnTete:
begin
- FPosRef.Y:= FMargeCourante.T+FEnTeteHeight;
- FPosRef.Y:= FPosRef.Y+EspHeight;
- FEnTeteHeight:= FPosRef.Y-FMargeCourante.T;
- LoadEspaceEnTete(PosV,Colonne,EspHeight,FondNum);
+ FPosRef.Y:= FCurrentMargin.T+FHeaderHeight;
+ FPosRef.Y:= FPosRef.Y+SpaceHeight;
+ FHeaderHeight:= FPosRef.Y-FCurrentMargin.T;
+ LoadSpaceHeader(PosV,Column,SpaceHeight,BkColorNum);
end;
zPage:
begin
- FPosRef.Y:= FMargeCourante.T+FEnTeteHeight+FPageHeight;
- if FPosRef.Y+EspHeight> FMargeCourante.B-FPiedHeight
+ FPosRef.Y:= FCurrentMargin.T+FHeaderHeight+FPageHeight;
+ if FPosRef.Y+SpaceHeight> FCurrentMargin.B-FFooterHeight
then
begin
- FPosRef.Y:= FMargeCourante.T+FEnTeteHeight;
+ FPosRef.Y:= FCurrentMargin.T+FHeaderHeight;
Page;
end
else
- FPosRef.Y:= FPosRef.Y+EspHeight;
- FPageHeight:= FPosRef.Y-FEnTeteHeight-FMargeCourante.T;
- LoadEspacePage(PosV,Colonne,EspHeight,FondNum);
+ FPosRef.Y:= FPosRef.Y+SpaceHeight;
+ FPageHeight:= FPosRef.Y-FHeaderHeight-FCurrentMargin.T;
+ LoadSpacePage(PosV,Column,SpaceHeight,BkColorNum);
end;
zPied:
begin
- FPosRef.Y:= FMargeCourante.B-EspHeight;
- FPiedHeight:= FPiedHeight+EspHeight;
+ FPosRef.Y:= FCurrentMargin.B-SpaceHeight;
+ FFooterHeight:= FFooterHeight+SpaceHeight;
PosV:= FPosRef.Y;
- DecaleLignesPied(EspHeight);
- LoadEspacePied(PosV,Colonne,EspHeight,FondNum);
+ ShiftFooterLines(SpaceHeight);
+ LoadSpaceFooter(PosV,Column,SpaceHeight,BkColorNum);
end;
end;
- if FGroupe
+ if FGroup
then
- LoadEspaceGroupe(EspHeight);
+ LoadSpaceGroup(SpaceHeight);
Result:= Pixels2Dim(FPosRef.Y);
- FinLigne(Zone);
+ LineEnd(Zone);
end;
- ppVisualise:
- with FCanevas,T_Colonne(Colonnes[Colonne]) do
+ ppVisualize:
+ with FCanvas,T_Column(Columns[Column]) do
begin
- if FondNum> -1
+ if BkColorNum> -1
then
- SetColor(T_Fond(Fonds[FondNum]).GetColor)
+ SetColor(T_BackColor(BackColors[BkColorNum]).GetColor)
else
SetColor(GetColor);
- FillRectangle(Round(ColPos),Round(PosV),Round(ColWidth),Round(EspHeight));
+ FillRectangle(Round(ColPos),Round(PosV),Round(ColWidth),Round(SpaceHeight));
end;
- ppFichierPDF:
+ ppPdfFile:
begin
- if Colonne> -1
+ if Column> -1
then
- with T_Colonne(Colonnes[Colonne]) do
+ with T_Column(Columns[Column]) do
begin
- if (GetColor<> clWhite) or (FondNum> -1)
+ if (GetColor<> clWhite) or (BkColorNum> -1)
then
begin
PdfRect:= TPdfRect.Create;
with PdfRect do
begin
PageId:= NumPage;
- FGauche:= ColPos;
- FBas:= Paper.H-PosY-EspHeight;
- FHaut:= EspHeight;
- FLarg:= ColWidth;
- if FondNum> -1
+ FLeft:= ColPos;
+ FBottom:= Paper.H-PosY-SpaceHeight;
+ FHeight:= SpaceHeight;
+ FWidth:= ColWidth;
+ if BkColorNum> -1
then
- FColor:= T_Fond(Fonds[FondNum]).GetColor
+ FColor:= T_BackColor(BackColors[BkColorNum]).GetColor
else
FColor:= GetColor;
FFill:= True;
@@ -1781,121 +1787,121 @@ with T_Section(Sections[Pred(NumSection)]) do
end;
end;
-procedure T_Imprime.FinLigne(Zone: TZone);
+procedure T_Report.LineEnd(Zone: TZone);
begin
with T_Section(Sections[Pred(NumSection)]) do
case Zone of
zEnTete:
- LoadCmdEnTete;
+ LoadCmdHeader;
zPage:
- if FGroupe
+ if FGroup
then
- LoadCmdGroupe
+ LoadCmdGroup
else
LoadCmdPage;
zPied:
- LoadCmdPied;
+ LoadCmdFooter;
end;
end;
-procedure T_Imprime.TraceCadre(StTrait: Integer; Zone: TZone);
+procedure T_Report.DrawAFrame(StyLine: Integer; Zone: TZone);
var
- Half,MargeL,MargeR,MargeT,MargeB,EnTeteH,PiedH: Integer;
+ Half,MarginL,MarginR,MarginT,MarginB,HeaderH,FooterH: Integer;
begin
with T_Section(Sections[Pred(NumSection)]) do
case FPreparation of
ppPrepare:
- LoadCadre(StTrait,Zone);
- ppVisualise:
- with FCanevas do
+ LoadFrame(StyLine,Zone);
+ ppVisualize:
+ with FCanvas do
begin
- with T_TraitStyle(TraitStyles[StTrait]) do
+ with T_LineStyle(LineStyles[StyLine]) do
begin
- SetLineStyle(Round(GetEpais),GetStyle);
- Half:= Round(GetEpais) div 2;
+ SetLineStyle(Round(GetThick),GetStyle);
+ Half:= Round(GetThick) div 2;
SetColor(GetColor);
end;
- with FMargeCourante do
+ with FCurrentMargin do
begin
- MargeL:= Round(L);
- MargeR:= Round(R);
- MargeT:= Round(T);
- MargeB:= Round(B);
- EnTeteH:= Round(FEnTeteHeight);
- PiedH:= Round(FPiedHeight);
+ MarginL:= Round(L);
+ MarginR:= Round(R);
+ MarginT:= Round(T);
+ MarginB:= Round(B);
+ HeaderH:= Round(FHeaderHeight);
+ FooterH:= Round(FFooterHeight);
case Zone of
zEnTete:
begin
- DrawLine(MargeL+Half,MargeT,MargeL+Half,MargeT+EnTeteH); // gauche
- DrawLine(MargeR-Half,MargeT,MargeR-Half,MargeT+EnTeteH); // droite
- DrawLine(MargeL,MargeT+Half,MargeR,MargeT+Half); // haute
- DrawLine(MargeL,MargeT+EnTeteH-Half,MargeR,MargeT+EnTeteH-Half); // basse
+ DrawLine(MarginL+Half,MarginT,MarginL+Half,MarginT+HeaderH); // gauche
+ DrawLine(MarginR-Half,MarginT,MarginR-Half,MarginT+HeaderH); // droite
+ DrawLine(MarginL,MarginT+Half,MarginR,MarginT+Half); // haute
+ DrawLine(MarginL,MarginT+HeaderH-Half,MarginR,MarginT+HeaderH-Half); // basse
end;
zPage:
begin
- DrawLine(MargeL+Half,MargeT+EnTeteH,MargeL+Half,MargeB-PiedH); // gauche
- DrawLine(MargeR-Half,MargeT+EnTeteH,MargeR-Half,MargeB-PiedH); // droite
- DrawLine(MargeL,MargeT+EnTeteH-Half,MargeR,MargeT+EnTeteH-Half); // haute
- DrawLine(MargeL,MargeB-PiedH+Half,MargeR,MargeB-PiedH+Half); // basse
+ DrawLine(MarginL+Half,MarginT+HeaderH,MarginL+Half,MarginB-FooterH); // gauche
+ DrawLine(MarginR-Half,MarginT+HeaderH,MarginR-Half,MarginB-FooterH); // droite
+ DrawLine(MarginL,MarginT+HeaderH-Half,MarginR,MarginT+HeaderH-Half); // haute
+ DrawLine(MarginL,MarginB-FooterH+Half,MarginR,MarginB-FooterH+Half); // basse
end;
zPied:
begin
- DrawLine(MargeL+Half,MargeB-PiedH,MargeL+Half,MargeB); // gauche
- DrawLine(MargeR-Half,MargeB-PiedH,MargeR-Half,MargeB); // droite
- DrawLine(MargeL,MargeB-PiedH+Half,MargeR,MargeB-PiedH+Half); // haute
- DrawLine(MargeL,MargeB-Half,MargeR,MargeB-Half); // basse
+ DrawLine(MarginL+Half,MarginB-FooterH,MarginL+Half,MarginB); // gauche
+ DrawLine(MarginR-Half,MarginB-FooterH,MarginR-Half,MarginB); // droite
+ DrawLine(MarginL,MarginB-FooterH+Half,MarginR,MarginB-FooterH+Half); // haute
+ DrawLine(MarginL,MarginB-Half,MarginR,MarginB-Half); // basse
end;
zMarges:
begin
- DrawLine(MargeL+Half,MargeT,MargeL+Half,MargeB-Succ(Half)); // gauche
- DrawLine(MargeR-Half,MargeT,MargeR-Half,MargeB-Succ(Half)); // droite
- DrawLine(MargeL,MargeT+Half,MargeR,MargeT+Half); // haute
- DrawLine(MargeL,MargeB-Half,MargeR,MargeB-Half); // basse
+ DrawLine(MarginL+Half,MarginT,MarginL+Half,MarginB-Succ(Half)); // gauche
+ DrawLine(MarginR-Half,MarginT,MarginR-Half,MarginB-Succ(Half)); // droite
+ DrawLine(MarginL,MarginT+Half,MarginR,MarginT+Half); // haute
+ DrawLine(MarginL,MarginB-Half,MarginR,MarginB-Half); // basse
end;
end;
end;
end;
- ppFichierPDF:
+ ppPdfFile:
begin
PdfRect:= TPdfRect.Create;
with PdfRect do
begin
PageId:= NumPage;
- with T_TraitStyle(TraitStyles[StTrait]) do
+ with T_LineStyle(LineStyles[StyLine]) do
begin
- FEpais:= GetEpais;
+ FThick:= GetThick;
FColor:= GetColor;
FLineStyle:= GetStyle;
end;
- with FMargeCourante do
+ with FCurrentMargin do
case Zone of
zEnTete:
begin
- FGauche:= L;
- FBas:= Paper.H-T-FEnTeteHeight;
- FHaut:= FEnTeteHeight;
- FLarg:= R-L;
+ FLeft:= L;
+ FBottom:= Paper.H-T-FHeaderHeight;
+ FHeight:= FHeaderHeight;
+ FWidth:= R-L;
end;
zPage:
begin
- FGauche:= L;
- FBas:= Paper.H-B+FPiedHeight;
- FHaut:= B-T-FEnTeteHeight-FPiedHeight;
- FLarg:= R-L;
+ FLeft:= L;
+ FBottom:= Paper.H-B+FFooterHeight;
+ FHeight:= B-T-FHeaderHeight-FFooterHeight;
+ FWidth:= R-L;
end;
zPied:
begin
- FGauche:= L;
- FBas:= Paper.H-B;
- FHaut:= FPiedHeight;
- FLarg:= R-L;
+ FLeft:= L;
+ FBottom:= Paper.H-B;
+ FHeight:= FFooterHeight;
+ FWidth:= R-L;
end;
zMarges:
begin
- FGauche:= L;
- FBas:= Paper.H-B;
- FHaut:= B-T;
- FLarg:= R-L;
+ FLeft:= L;
+ FBottom:= Paper.H-B;
+ FHeight:= B-T;
+ FWidth:= R-L;
end;
end;
FFill:= False;
@@ -1906,42 +1912,42 @@ with T_Section(Sections[Pred(NumSection)]) do
end;
end;
-procedure T_Imprime.TraceTrait(XDebut,YDebut,XFin,YFin: Single; StTrait: Integer);
+procedure T_Report.DrawALine(XBegin,YBegin,XEnd,YEnd: Single; StyLine: Integer);
begin
with T_Section(Sections[Pred(NumSection)]) do
case FPreparation of
ppPrepare:
- LoadTrait(XDebut,YDebut,ColDefaut,XFin,YFin,StTrait);
- ppVisualise:
- with FCanevas do
+ LoadLine(XBegin,YBegin,ColDefaut,XEnd,YEnd,StyLine);
+ ppVisualize:
+ with FCanvas do
begin
- with T_TraitStyle(TraitStyles[StTrait]) do
+ with T_LineStyle(LineStyles[StyLine]) do
begin
- SetLineStyle(Round(GetEpais),GetStyle);
+ SetLineStyle(Round(GetThick),GetStyle);
SetColor(GetColor);
end;
- DrawLine(Round(XDebut),Round(YDebut),Round(XFin),Round(YFin));
+ DrawLine(Round(XBegin),Round(YBegin),Round(XEnd),Round(YEnd));
end;
- ppFichierPdf:
+ ppPdfFile:
begin
PdfLine:= TPdfLine.Create;
with PdfLine do
begin
PageId:= NumPage;
- FStartX:= XDebut;
- FStartY:= Paper.H-YDebut;
- FEndX:= XFin;
- FEndY:= Paper.H-YFin;
- FStyle:= T_TraitStyle(TraitStyles[StTrait]).GetStyle;;
- FColor:= T_TraitStyle(TraitStyles[StTrait]).GetColor;
- FEpais:= T_TraitStyle(TraitStyles[StTrait]).GetEpais;
+ FBeginX:= XBegin;
+ FBeginY:= Paper.H-YBegin;
+ FEndX:= XEnd;
+ FEndY:= Paper.H-YEnd;
+ FStyle:= T_LineStyle(LineStyles[StyLine]).GetStyle;;
+ FColor:= T_LineStyle(LineStyles[StyLine]).GetColor;
+ FThick:= T_LineStyle(LineStyles[StyLine]).GetThick;
end;
PdfPage.Add(PdfLine);
end;
end;
end;
-procedure T_Imprime.TraceTraitHoriz(XDebut,YDebut: Single; Colonne: Integer; XFin: Single; StTrait: Integer; Zone: TZone);
+procedure T_Report.DrawAHorizLine(XBegin,YBegin: Single; Column: Integer; XEnd: Single; StyLine: Integer; Zone: TZone);
var
PosV: Single;
begin
@@ -1952,67 +1958,67 @@ with T_Section(Sections[Pred(NumSection)]) do
case Zone of
zEnTete:
begin
- FPosRef.Y:= FMargeCourante.T+FEnTeteHeight;
- PosV:= FPosRef.Y+XDebut;
- FPosRef.Y:= FPosRef.Y+XDebut+YDebut+T_TraitStyle(TraitStyles[StTrait]).GetEpais;
- FEnTeteHeight:= FPosRef.Y-FMargeCourante.T;
- with T_Colonne(Colonnes[colonne]) do
- LoadTraitHorizEnTete(ColPos,PosV,Colonne,ColPos+ColWidth,PosV,StTrait);
+ FPosRef.Y:= FCurrentMargin.T+FHeaderHeight;
+ PosV:= FPosRef.Y+XBegin;
+ FPosRef.Y:= FPosRef.Y+XBegin+YBegin+T_LineStyle(LineStyles[StyLine]).GetThick;
+ FHeaderHeight:= FPosRef.Y-FCurrentMargin.T;
+ with T_Column(Columns[Column]) do
+ LoadLineHorizEnTete(ColPos,PosV,Column,ColPos+ColWidth,PosV,StyLine);
end;
zPage:
begin
- FPosRef.Y:= FMargeCourante.T+FEnTeteHeight+FPageHeight;
- PosV:= FPosRef.Y+XDebut;
- FPosRef.Y:= FPosRef.Y+XDebut+YDebut+T_TraitStyle(TraitStyles[StTrait]).GetEpais;
- FPageHeight:= FPosRef.Y-FEnTeteHeight-FMargeCourante.T;
- with T_Colonne(Colonnes[colonne]) do
- LoadTraitHorizPage(ColPos,PosV,Colonne,ColPos+ColWidth,PosV,StTrait);
+ FPosRef.Y:= FCurrentMargin.T+FHeaderHeight+FPageHeight;
+ PosV:= FPosRef.Y+XBegin;
+ FPosRef.Y:= FPosRef.Y+XBegin+YBegin+T_LineStyle(LineStyles[StyLine]).GetThick;
+ FPageHeight:= FPosRef.Y-FHeaderHeight-FCurrentMargin.T;
+ with T_Column(Columns[Column]) do
+ LoadLineHorizPage(ColPos,PosV,Column,ColPos+ColWidth,PosV,StyLine);
end;
zPied:
begin
- FPosRef.Y:= FMargeCourante.B-XDebut;
+ FPosRef.Y:= FCurrentMargin.B-XBegin;
PosV:= FPosRef.Y;
- FPosRef.Y:= FPosRef.Y-YDebut-T_TraitStyle(TraitStyles[StTrait]).GetEpais;
- FPiedHeight:= FPiedHeight+XDebut+YDebut+T_TraitStyle(TraitStyles[StTrait]).GetEpais;
- DecaleLignesPied(XDebut+YDebut+T_TraitStyle(TraitStyles[StTrait]).GetEpais);
- with T_Colonne(Colonnes[colonne]) do
- LoadTraitHorizPied(ColPos,PosV,Colonne,ColPos+ColWidth,PosV,StTrait);
+ FPosRef.Y:= FPosRef.Y-YBegin-T_LineStyle(LineStyles[StyLine]).GetThick;
+ FFooterHeight:= FFooterHeight+XBegin+YBegin+T_LineStyle(LineStyles[StyLine]).GetThick;
+ ShiftFooterLines(XBegin+YBegin+T_LineStyle(LineStyles[StyLine]).GetThick);
+ with T_Column(Columns[Column]) do
+ LoadLineHorizPied(ColPos,PosV,Column,ColPos+ColWidth,PosV,StyLine);
end;
end;
- if FGroupe
+ if FGroup
then
- LoadTraitHorizGroupe(T_TraitStyle(TraitStyles[StTrait]).GetEpais);
+ LoadLineHorizGroupe(T_LineStyle(LineStyles[StyLine]).GetThick);
end;
- ppVisualise:
- with FCanevas do
+ ppVisualize:
+ with FCanvas do
begin
- with T_TraitStyle(TraitStyles[StTrait]) do
+ with T_LineStyle(LineStyles[StyLine]) do
begin
- SetLineStyle(Round(GetEpais),GetStyle);
+ SetLineStyle(Round(GetThick),GetStyle);
SetColor(GetColor);
end;
- DrawLine(Round(XDebut),Round(YDebut),Round(XFin),Round(YDebut));
+ DrawLine(Round(XBegin),Round(YBegin),Round(XEnd),Round(YBegin));
end;
- ppFichierPdf:
+ ppPdfFile:
begin
PdfLine:= TPdfLine.Create;
with PdfLine do
begin
PageId:= NumPage;
- FStartX:= XDebut;
- FStartY:= Paper.H-YDebut;
- FEndX:= XFin;
- FEndY:= Paper.H-YDebut;
- FStyle:= T_TraitStyle(TraitStyles[StTrait]).GetStyle;;
- FColor:= T_TraitStyle(TraitStyles[StTrait]).GetColor;
- FEpais:= T_TraitStyle(TraitStyles[StTrait]).GetEpais;
+ FBeginX:= XBegin;
+ FBeginY:= Paper.H-YBegin;
+ FEndX:= XEnd;
+ FEndY:= Paper.H-YBegin;
+ FStyle:= T_LineStyle(LineStyles[StyLine]).GetStyle;;
+ FColor:= T_LineStyle(LineStyles[StyLine]).GetColor;
+ FThick:= T_LineStyle(LineStyles[StyLine]).GetThick;
end;
PdfPage.Add(PdfLine);
end;
end;
end;
-procedure T_Imprime.PaintSurface(Points: T_Points; Couleur: TfpgColor);
+procedure T_Report.PaintSurface(Points: T_Points; Couleur: TfpgColor);
var
OldColor: TfpgColor;
Cpt: Integer;
@@ -2022,20 +2028,20 @@ with T_Section(Sections[Pred(NumSection)]) do
case FPreparation of
ppPrepare:
LoadSurf(Points,Couleur);
- ppVisualise:
+ ppVisualize:
begin
- OldColor:= FCanevas.Color;
- FCanevas.SetColor(Couleur);
+ OldColor:= FCanvas.Color;
+ FCanvas.SetColor(Couleur);
SetLength(Pts,Length(Points));
for Cpt:= 0 to Pred(Length(Pts)) do
begin
Pts[Cpt].X:= Round(Points[Cpt].X);
Pts[Cpt].Y:= Round(Points[Cpt].Y);
end;
- FCanevas.DrawPolygon(Pts);
- FCanevas.SetColor(OldColor);
+ FCanvas.DrawPolygon(Pts);
+ FCanvas.SetColor(OldColor);
end;
- ppFichierPdf:
+ ppPdfFile:
begin
PdfSurf:= TPdfSurf.Create;
SetLength(PdfSurf.FPoints,Length(Points));
@@ -2060,36 +2066,36 @@ with T_Section(Sections[Pred(NumSection)]) do
end;
end;
-function T_Imprime.GetTitreSection: string;
+function T_Report.GetSectionTitle: string;
begin
-Result:= T_Section(Sections[Pred(Sections.Count)]).Titre;
+Result:= T_Section(Sections[Pred(Sections.Count)]).Title;
end;
-procedure T_Imprime.SetTitreSection(ATitre: string);
+procedure T_Report.SetSectionTitle(ATitle: string);
begin
-T_Section(Sections[Pred(Sections.Count)]).Titre:= ATitre;
+T_Section(Sections[Pred(Sections.Count)]).Title:= ATitle;
end;
{ Commandes publiques }
-constructor T_Imprime.Create;
+constructor T_Report.Create;
begin
inherited Create;
OldSeparator:= DecimalSeparator;
DecimalSeparator:= '.';
Sections:= TList.Create;
-Fontes:= TList.Create;
-Interlignes:= TList.Create;
-Fonds:= TList.Create;
-TraitStyles:= TList.Create;
-Bords:= TList.Create;
-Textes:= TStringList.Create;
-ALigne:= T_Ligne.Create;
+Fonts:= TList.Create;
+LineSpaces:= TList.Create;
+BackColors:= TList.Create;
+LineStyles:= TList.Create;
+Borders:= TList.Create;
+Texts:= TStringList.Create;
+VWriteLine:= T_WriteLine.Create;
PdfPage:= TList.Create;
Outline:= False;
end;
-destructor T_Imprime.Destroy;
+destructor T_Report.Destroy;
var
Cpt: Integer;
begin
@@ -2098,33 +2104,33 @@ then
for Cpt:= 0 to Pred(Sections.Count) do
T_Section(Sections[Cpt]).Free;
Sections.Free;
-if Fontes.Count> 0
+if Fonts.Count> 0
then
- for Cpt:= 0 to Pred(Fontes.Count) do
- T_Fonte(Fontes[Cpt]).Free;
-Fontes.Free;
-if Interlignes.Count> 0
+ for Cpt:= 0 to Pred(Fonts.Count) do
+ T_Font(Fonts[Cpt]).Free;
+Fonts.Free;
+if LineSpaces.Count> 0
then
- for Cpt:= 0 to Pred(Interlignes.Count) do
- T_Interligne(Interlignes[Cpt]).Free;
-Interlignes.Free;
-if Fonds.Count> 0
+ for Cpt:= 0 to Pred(LineSpaces.Count) do
+ T_LineSpace(LineSpaces[Cpt]).Free;
+LineSpaces.Free;
+if BackColors.Count> 0
then
- for Cpt:= 0 to Pred(Fonds.Count) do
- T_Fond(Fonds[Cpt]).Free;
-Fonds.Free;
-if TraitStyles.Count> 0
+ for Cpt:= 0 to Pred(BackColors.Count) do
+ T_BackColor(BackColors[Cpt]).Free;
+BackColors.Free;
+if LineStyles.Count> 0
then
- for Cpt:= 0 to Pred(TraitStyles.Count) do
- T_TraitStyle(TraitStyles[Cpt]).Free;
-TraitStyles.Free;
-if Bords.Count> 0
+ for Cpt:= 0 to Pred(LineStyles.Count) do
+ T_LineStyle(LineStyles[Cpt]).Free;
+LineStyles.Free;
+if Borders.Count> 0
then
- for Cpt:= 0 to Pred(Bords.Count) do
- T_Bord(Bords[Cpt]).Free;
-Bords.Free;
-Textes.Free;
-ALigne.Free;
+ for Cpt:= 0 to Pred(Borders.Count) do
+ T_Border(Borders[Cpt]).Free;
+Borders.Free;
+Texts.Free;
+VWriteLine.Free;
if PdfPage.Count> 0
then
for Cpt:= 0 to Pred(PdfPage.Count) do
@@ -2148,29 +2154,29 @@ DecimalSeparator:= OldSeparator;
inherited;
end;
-procedure T_Imprime.BeginWrite(IniOriente: TOrient= oPortrait; IniTypePapier: TTypePapier= A4;
- IniMesure: TMesure= msMM; IniVersion: Char= 'F'; IniVisu: Boolean= True);
+procedure T_Report.BeginWrite(IniOrientation: TOrient= oPortrait; IniPaperType: TPaperType= A4;
+ IniMeasure: TMeasureUnit= msMM; IniVersion: Char= 'F'; IniVisu: Boolean= True);
begin
FVersion:= IniVersion;
-FOrientation:= IniOriente;
-FTypepapier:= IniTypePapier;
-FMesure:= IniMesure;
+FOrientation:= IniOrientation;
+FPaperType:= IniPaperType;
+FMeasureUnit:= IniMeasure;
FPreparation:= ppPrepare;
-FVisualisation:= IniVisu;
+FVisualization:= IniVisu;
PrepareFormat;
if IniVisu
then
CreateVisu;
-FFonteCourante:= -1;
-FInterLCourante:= -1;
-FGroupe:= False;
+FCurrentFont:= -1;
+FCurrentLineSpace:= -1;
+FGroup:= False;
end;
-procedure T_Imprime.EndWrite;
+procedure T_Report.EndWrite;
var
Cpt: Integer;
begin
-FPreparation:= ppFichierPDF;
+FPreparation:= ppPdfFile;
if Sections.Count> 0
then
for Cpt:= 1 to Sections.Count do
@@ -2186,11 +2192,11 @@ then
else
Exit;
for Cpt:= 1 to T_Section(Sections[Pred(NumSection)]).TotPages do
- ImprimePage(Cpt);
-if FVisualisation
+ PrintPage(Cpt);
+if FVisualization
then
begin
- FPreparation:= ppVisualise;
+ FPreparation:= ppVisualize;
try
WriteDocument;
F_Visu.ShowModal;
@@ -2200,134 +2206,134 @@ then
end;
end;
-procedure T_Imprime.WriteDocument;
+procedure T_Report.WriteDocument;
begin
-if FVisualisation
+if FVisualization
then
- FCanevas:= Bv_Visu.Canvas;
+ FCanvas:= Bv_Visu.Canvas;
end;
-procedure T_Imprime.PagePreview;
+procedure T_Report.PagePreview;
begin
-FVisualisation:= not FVisualisation;
-if FVisualisation
+FVisualization:= not FVisualization;
+if FVisualization
then
- FCanevas:= Bv_Visu.Canvas;
+ FCanvas:= Bv_Visu.Canvas;
end;
-procedure T_Imprime.Section(MgGauche,MgDroite,MgHaute,MgBasse: Single; Retrait: Single;
- IniOriente: TOrient= oPortrait);
+procedure T_Report.Section(MgLeft,MgRight,MgTop,MgBottom: Single; BackPos: Single;
+ IniOrientation: TOrient= oPortrait);
var
CMargin: Single;
begin
case FPreparation of
ppPrepare:
begin
- FOrientation:= IniOriente;
+ FOrientation:= IniOrientation;
PrepareFormat;
- with FMargeCourante,FPapier do
+ with FCurrentMargin,FPaper do
begin
- if Dim2Pixels(MgGauche)> Imprimable.L
+ if Dim2Pixels(MgLeft)> Printable.L
then
- L:= Dim2Pixels(MgGauche)
+ L:= Dim2Pixels(MgLeft)
else
- L:= Imprimable.L;
- if (W-Dim2Pixels(MgDroite))< Imprimable.R
+ L:= Printable.L;
+ if (W-Dim2Pixels(MgRight))< Printable.R
then
- R:= W-Dim2Pixels(MgDroite)
+ R:= W-Dim2Pixels(MgRight)
else
- R:= Imprimable.R;
- if Dim2Pixels(MgHaute)> Imprimable.T
+ R:= Printable.R;
+ if Dim2Pixels(MgTop)> Printable.T
then
- T:= Dim2Pixels(MgHaute)
+ T:= Dim2Pixels(MgTop)
else
- T:= Imprimable.T;
- if (H-Dim2Pixels(MgBasse))< Imprimable.B
+ T:= Printable.T;
+ if (H-Dim2Pixels(MgBottom))< Printable.B
then
- B:= H-Dim2Pixels(MgBasse)
+ B:= H-Dim2Pixels(MgBottom)
else
- B:= Imprimable.B;
+ B:= Printable.B;
end;
- FPosRef.X:= FMargeCourante.L;
- FEnTeteHeight:= 0;
+ FPosRef.X:= FCurrentMargin.L;
+ FHeaderHeight:= 0;
FPageHeight:= 0;
- FPiedHeight:= 0;
+ FFooterHeight:= 0;
NumSection:= NumSection+1;
- ASection:= T_Section.Create(FPapier,FMargeCourante,NumSection);
- Sections.Add(ASection);
- CMargin:= Dim2Pixels(Retrait);
- AColonne:= T_Colonne.Create(FMargeCourante.L,FMargeCourante.R-FMargeCourante.L,CMargin,clWhite);
- T_Section(Sections[Pred(Sections.Count)]).Colonnes.Add(AColonne);
+ VSection:= T_Section.Create(FPaper,FCurrentMargin,NumSection);
+ Sections.Add(VSection);
+ CMargin:= Dim2Pixels(BackPos);
+ VColumn:= T_Column.Create(FCurrentMargin.L,FCurrentMargin.R-FCurrentMargin.L,CMargin,clWhite);
+ T_Section(Sections[Pred(Sections.Count)]).Columns.Add(VColumn);
end;
end;
end;
-procedure T_Imprime.Page;
+procedure T_Report.Page;
begin
if FPreparation= ppPrepare
then
begin
NumPage:= NumPage+1;
T_Section(Sections[Pred(Sections.Count)]).LoadPage(NumPage);
- FPosRef.Y:= FMargeCourante.T+FEnTeteHeight;
+ FPosRef.Y:= FCurrentMargin.T+FHeaderHeight;
FPageHeight:= 0;
end;
end;
-function T_Imprime.BackColor(FdColor: TfpgColor): Integer;
+function T_Report.BackColor(FdColor: TfpgColor): Integer;
begin
-AFond:= T_Fond.Create(FdColor);
-Result:= Fonds.Add(AFond);
+VBackColor:= T_BackColor.Create(FdColor);
+Result:= BackColors.Add(VBackColor);
end;
-function T_Imprime.Font(FtNom: string; FtColor: TfpgColor): Integer;
+function T_Report.Font(FtNom: string; FtColor: TfpgColor): Integer;
begin
-AFonte:= T_Fonte.Create(FtNom,FtColor);
-Result:= Fontes.Add(AFonte);
+VFont:= T_Font.Create(FtNom,FtColor);
+Result:= Fonts.Add(VFont);
end;
-function T_Imprime.LineStyle(StEpais: Single; StColor: Tfpgcolor; StStyle: TfpgLineStyle): Integer;
+function T_Report.LineStyle(StThick: Single; StColor: Tfpgcolor; StStyle: TfpgLineStyle): Integer;
begin
-ATraitStyle:= T_TraitStyle.Create(StEpais,StColor,StStyle);
-Result:= TraitStyles.Add(ATraitStyle);
+VLineStyle:= T_LineStyle.Create(StThick,StColor,StStyle);
+Result:= LineStyles.Add(VLineStyle);
end;
-function T_Imprime.Border(BdFlags: TFBordFlags; BdStyle: Integer): Integer;
+function T_Report.Border(BdFlags: TBorderFlags; BdStyle: Integer): Integer;
begin
-ABord:= T_Bord.Create(BdFlags,BdStyle);
-Result:= Bords.Add(ABord);
+VBorder:= T_Border.Create(BdFlags,BdStyle);
+Result:= Borders.Add(VBorder);
end;
-//function T_Imprime.Bordure(BdFlags: TFBordFlags; StFlags: array of Integer): Integer;
+//function T_Report.Bordure(BdFlags: TBorderFlags; StFlags: array of Integer): Integer;
//begin
-//ABord:= T_Bord.Create(BdFlags,BdStyle);
-//Result:= Bords.Add(ABord);
+//VBorder:= T_Border.Create(BdFlags,BdStyle);
+//Result:= Borders.Add(VBorder);
//end;
-function T_Imprime.Column(ClnPos,ClnWidth: Single; ClnMargin: Single= 0; ClnColor: TfpgColor= clWhite): Integer;
+function T_Report.Column(ClnPos,ClnWidth: Single; ClnMargin: Single= 0; ClnColor: TfpgColor= clWhite): Integer;
var
CPos,CWidth,CMargin: Single;
begin
CPos:= Dim2Pixels(ClnPos);
with T_Section(Sections[Pred(NumSection)]) do
begin
- if CPos< Marges.L
+ if CPos< Margins.L
then
- CPos:= Marges.L;
+ CPos:= Margins.L;
CWidth:= Dim2Pixels(ClnWidth);
- if CWidth> (Marges.R-Marges.L)
+ if CWidth> (Margins.R-Margins.L)
then
- CWidth:= Marges.R-Marges.L;
+ CWidth:= Margins.R-Margins.L;
end;
CMargin:= Dim2Pixels(ClnMargin);
-AColonne:= T_Colonne.Create(CPos,CWidth,CMargin,ClnColor);
-Result:= T_Section(Sections[Pred(Sections.Count)]).Colonnes.Add(AColonne);
+VColumn:= T_Column.Create(CPos,CWidth,CMargin,ClnColor);
+Result:= T_Section(Sections[Pred(Sections.Count)]).Columns.Add(VColumn);
end;
-procedure T_Imprime.WriteHeader(Horiz,Verti: Single; Texte: string; ColNum: Integer= 0; FonteNum: Integer= 0;
- InterNum: Integer= 0; CoulFdNum: Integer= -1; BordNum: Integer= -1);
+procedure T_Report.WriteHeader(Horiz,Verti: Single; Text: string; ColNum: Integer= 0; FontNum: Integer= 0;
+ LineSpNum: Integer= 0; BkColorNum: Integer= -1; BordNum: Integer= -1);
var
- RefTexte: Integer;
+ RefText: Integer;
Flags: TfpgTextFlags;
begin
Flags:= [];
@@ -2349,17 +2355,17 @@ else
if Verti> 0
then
Verti:= Dim2Pixels(Verti);
-RefTexte:= Textes.IndexOf(Texte);
-if RefTexte= -1
+RefText:= Texts.IndexOf(Text);
+if RefText= -1
then
- RefTexte:= Textes.Add(Texte);
-EcritLigne(Horiz,Verti,ColNum,RefTexte,FonteNum,CoulFdNum,BordNum,InterNum,Flags,ZEnTete);
+ RefText:= Texts.Add(Text);
+WriteText(Horiz,Verti,ColNum,RefText,FontNum,BkColorNum,BordNum,LineSpNum,Flags,ZEnTete);
end;
-function T_Imprime.WritePage(Horiz,Verti: Single; Texte: string; ColNum: Integer= 0; FonteNum: Integer= 0;
- InterNum: Integer= 0; CoulFdNum: Integer= -1; BordNum: Integer= -1): Single;
+function T_Report.WritePage(Horiz,Verti: Single; Text: string; ColNum: Integer= 0; FontNum: Integer= 0;
+ LineSpNum: Integer= 0; BkColorNum: Integer= -1; BordNum: Integer= -1): Single;
var
- RefTexte: Integer;
+ RefText: Integer;
Flags: TfpgTextFlags;
begin
Flags:= [];
@@ -2381,17 +2387,17 @@ else
if Verti> 0
then
Verti:= Dim2Pixels(Verti);
-RefTexte:= Textes.IndexOf(Texte);
-if RefTexte= -1
+RefText:= Texts.IndexOf(Text);
+if RefText= -1
then
- RefTexte:= Textes.Add(Texte);
-Result:= EcritLigne(Horiz,Verti,ColNum,RefTexte,FonteNum,CoulFdNum,BordNum,InterNum,Flags,ZPage);
+ RefText:= Texts.Add(Text);
+Result:= WriteText(Horiz,Verti,ColNum,RefText,FontNum,BkColorNum,BordNum,LineSpNum,Flags,ZPage);
end;
-procedure T_Imprime.WriteFooter(Horiz,Verti: Single; Texte: string; ColNum: Integer= 0; FonteNum: Integer= 0;
- InterNum: Integer= 0; CoulFdNum: Integer= -1; BordNum: Integer= -1);
+procedure T_Report.WriteFooter(Horiz,Verti: Single; Text: string; ColNum: Integer= 0; FontNum: Integer= 0;
+ LineSpNum: Integer= 0; BkColorNum: Integer= -1; BordNum: Integer= -1);
var
- RefTexte: Integer;
+ RefText: Integer;
Flags: TfpgTextFlags;
begin
Flags:= [];
@@ -2413,18 +2419,18 @@ else
if Verti> 0
then
Verti:= Dim2Pixels(Verti);
-RefTexte:= Textes.IndexOf(Texte);
-if RefTexte= -1
+RefText:= Texts.IndexOf(Text);
+if RefText= -1
then
- RefTexte:= Textes.Add(Texte);
-EcritLigne(Horiz,Verti,ColNum,RefTexte,FonteNum,CoulFdNum,BordNum,InterNum,Flags,ZPied);
+ RefText:= Texts.Add(Text);
+WriteText(Horiz,Verti,ColNum,RefText,FontNum,BkColorNum,BordNum,LineSpNum,Flags,ZPied);
end;
-procedure T_Imprime.NumSectionHeader(Horiz,Verti: Single; TexteSect: string= ''; TexteTot: string= '';
- Total: Boolean= False; Alpha: Boolean= False; ColNum: Integer= 0; FonteNum: Integer= 0;
- InterNum: Integer= 0; CoulFdNum: Integer= -1; BordNum: Integer= -1);
+procedure T_Report.NumSectionHeader(Horiz,Verti: Single; TexteSect: string= ''; TextTot: string= '';
+ Total: Boolean= False; Alpha: Boolean= False; ColNum: Integer= 0; FontNum: Integer= 0;
+ LineSpNum: Integer= 0; BkColorNum: Integer= -1; BordNum: Integer= -1);
var
- RefTextePage,RefTexteTot: Integer;
+ RefTextPage,RefTextTot: Integer;
Flags: TfpgTextFlags;
begin
Flags:= [];
@@ -2446,22 +2452,22 @@ else
if Verti> 0
then
Verti:= Dim2Pixels(Verti);
-RefTextePage:= Textes.IndexOf(TexteSect);
-if RefTextePage= -1
+RefTextPage:= Texts.IndexOf(TexteSect);
+if RefTextPage= -1
then
- RefTextePage:= Textes.Add(TexteSect);
-RefTexteTot:= Textes.IndexOf(TexteTot);
-if RefTexteTot= -1
+ RefTextPage:= Texts.Add(TexteSect);
+RefTextTot:= Texts.IndexOf(TextTot);
+if RefTextTot= -1
then
- RefTexteTot:= Textes.Add(TexteTot);
-EcritNum(Horiz,Verti,ColNum,RefTextePage,RefTexteTot,FonteNum,CoulFdNum,BordNum,InterNum,Flags,Total,Alpha,ZEnTete,SectNum);
+ RefTextTot:= Texts.Add(TextTot);
+WriteNumber(Horiz,Verti,ColNum,RefTextPage,RefTextTot,FontNum,BkColorNum,BordNum,LineSpNum,Flags,Total,Alpha,ZEnTete,SectNum);
end;
-procedure T_Imprime.NumSectionFooter(Horiz,Verti: Single; TexteSect: string= ''; TexteTot: string= '';
- Total: Boolean= False; Alpha: Boolean= False; ColNum: Integer= 0; FonteNum: Integer= 0;
- InterNum: Integer= 0;CoulFdNum: Integer= -1; BordNum: Integer= -1);
+procedure T_Report.NumSectionFooter(Horiz,Verti: Single; TexteSect: string= ''; TextTot: string= '';
+ Total: Boolean= False; Alpha: Boolean= False; ColNum: Integer= 0; FontNum: Integer= 0;
+ LineSpNum: Integer= 0;BkColorNum: Integer= -1; BordNum: Integer= -1);
var
- RefTextePage,RefTexteTot: Integer;
+ RefTextPage,RefTextTot: Integer;
Flags: TfpgTextFlags;
begin
Flags:= [];
@@ -2483,22 +2489,22 @@ else
if Verti> 0
then
Verti:= Dim2Pixels(Verti);
-RefTextePage:= Textes.IndexOf(TexteSect);
-if RefTextePage= -1
+RefTextPage:= Texts.IndexOf(TexteSect);
+if RefTextPage= -1
then
- RefTextePage:= Textes.Add(TexteSect);
-RefTexteTot:= Textes.IndexOf(TexteTot);
-if RefTexteTot= -1
+ RefTextPage:= Texts.Add(TexteSect);
+RefTextTot:= Texts.IndexOf(TextTot);
+if RefTextTot= -1
then
- RefTexteTot:= Textes.Add(TexteTot);
-EcritNum(Horiz,Verti,ColNum,RefTextePage,RefTexteTot,FonteNum,CoulFdNum,BordNum,InterNum,Flags,Total,Alpha,ZPied,SectNum);
+ RefTextTot:= Texts.Add(TextTot);
+WriteNumber(Horiz,Verti,ColNum,RefTextPage,RefTextTot,FontNum,BkColorNum,BordNum,LineSpNum,Flags,Total,Alpha,ZPied,SectNum);
end;
-procedure T_Imprime.NumPageHeader(Horiz,Verti: Single; TextePage: string= ''; TexteTotal: string= '';
- Total: Boolean= False; ColNum: Integer= 0; FonteNum: Integer= 0; InterNum: Integer= 0;
- CoulFdNum: Integer= -1; BordNum: Integer= -1);
+procedure T_Report.NumPageHeader(Horiz,Verti: Single; TextePage: string= ''; TextTot: string= '';
+ Total: Boolean= False; ColNum: Integer= 0; FontNum: Integer= 0; LineSpNum: Integer= 0;
+ BkColorNum: Integer= -1; BordNum: Integer= -1);
var
- RefTextePage,RefTexteTot: Integer;
+ RefTextPage,RefTextTot: Integer;
Flags: TfpgTextFlags;
begin
Flags:= [];
@@ -2520,22 +2526,22 @@ else
if Verti> 0
then
Verti:= Dim2Pixels(Verti);
-RefTextePage:= Textes.IndexOf(TextePage);
-if RefTextePage= -1
+RefTextPage:= Texts.IndexOf(TextePage);
+if RefTextPage= -1
then
- RefTextePage:= Textes.Add(TextePage);
-RefTexteTot:= Textes.IndexOf(TexteTotal);
-if RefTexteTot= -1
+ RefTextPage:= Texts.Add(TextePage);
+RefTextTot:= Texts.IndexOf(TextTot);
+if RefTextTot= -1
then
- RefTexteTot:= Textes.Add(TexteTotal);
-EcritNum(Horiz,Verti,ColNum,RefTextePage,RefTexteTot,FonteNum,CoulFdNum,BordNum,InterNum,Flags,Total,False,ZEnTete,PageNum);
+ RefTextTot:= Texts.Add(TextTot);
+WriteNumber(Horiz,Verti,ColNum,RefTextPage,RefTextTot,FontNum,BkColorNum,BordNum,LineSpNum,Flags,Total,False,ZEnTete,PageNum);
end;
-procedure T_Imprime.NumPageFooter(Horiz,Verti: Single; TextePage: string= ''; TexteTotal: string= '';
- Total: Boolean= False; ColNum: Integer= 0; FonteNum: Integer= 0; InterNum: Integer= 0;
- CoulFdNum: Integer= -1; BordNum: Integer= -1);
+procedure T_Report.NumPageFooter(Horiz,Verti: Single; TextePage: string= ''; TextTot: string= '';
+ Total: Boolean= False; ColNum: Integer= 0; FontNum: Integer= 0; LineSpNum: Integer= 0;
+ BkColorNum: Integer= -1; BordNum: Integer= -1);
var
- RefTextePage,RefTexteTot: Integer;
+ RefTextPage,RefTextTot: Integer;
Flags: TfpgTextFlags;
begin
Flags:= [];
@@ -2557,22 +2563,22 @@ else
if Verti> 0
then
Verti:= Dim2Pixels(Verti);
-RefTextePage:= Textes.IndexOf(TextePage);
-if RefTextePage= -1
+RefTextPage:= Texts.IndexOf(TextePage);
+if RefTextPage= -1
then
- RefTextePage:= Textes.Add(TextePage);
-RefTexteTot:= Textes.IndexOf(TexteTotal);
-if RefTexteTot= -1
+ RefTextPage:= Texts.Add(TextePage);
+RefTextTot:= Texts.IndexOf(TextTot);
+if RefTextTot= -1
then
- RefTexteTot:= Textes.Add(TexteTotal);
-EcritNum(Horiz,Verti,ColNum,RefTextePage,RefTexteTot,FonteNum,CoulFdNum,BordNum,InterNum,Flags,Total,False,ZPied,PageNum);
+ RefTextTot:= Texts.Add(TextTot);
+WriteNumber(Horiz,Verti,ColNum,RefTextPage,RefTextTot,FontNum,BkColorNum,BordNum,LineSpNum,Flags,Total,False,ZPied,PageNum);
end;
-procedure T_Imprime.NumPageSectionHeader(Horiz,Verti: Single; TexteSect: string= ''; TexteTot: string= '';
- Total: Boolean= False; Alpha: Boolean= False; ColNum: Integer= 0; FonteNum: Integer= 0;
- InterNum: Integer= 0; CoulFdNum: Integer= -1; BordNum: Integer= -1);
+procedure T_Report.NumPageSectionHeader(Horiz,Verti: Single; TexteSect: string= ''; TextTot: string= '';
+ Total: Boolean= False; Alpha: Boolean= False; ColNum: Integer= 0; FontNum: Integer= 0;
+ LineSpNum: Integer= 0; BkColorNum: Integer= -1; BordNum: Integer= -1);
var
- RefTextePage,RefTexteTot: Integer;
+ RefTextPage,RefTextTot: Integer;
Flags: TfpgTextFlags;
begin
Flags:= [];
@@ -2594,22 +2600,22 @@ else
if Verti> 0
then
Verti:= Dim2Pixels(Verti);
-RefTextePage:= Textes.IndexOf(TexteSect);
-if RefTextePage= -1
+RefTextPage:= Texts.IndexOf(TexteSect);
+if RefTextPage= -1
then
- RefTextePage:= Textes.Add(TexteSect);
-RefTexteTot:= Textes.IndexOf(TexteTot);
-if RefTexteTot= -1
+ RefTextPage:= Texts.Add(TexteSect);
+RefTextTot:= Texts.IndexOf(TextTot);
+if RefTextTot= -1
then
- RefTexteTot:= Textes.Add(TexteTot);
-EcritNum(Horiz,Verti,ColNum,RefTextePage,RefTexteTot,FonteNum,CoulFdNum,BordNum,InterNum,Flags,Total,Alpha,ZEnTete,PSectNum);
+ RefTextTot:= Texts.Add(TextTot);
+WriteNumber(Horiz,Verti,ColNum,RefTextPage,RefTextTot,FontNum,BkColorNum,BordNum,LineSpNum,Flags,Total,Alpha,ZEnTete,PSectNum);
end;
-procedure T_Imprime.NumPageSectionFooter(Horiz,Verti: Single; TexteSect: string= ''; TexteTot: string= '';
- Total: Boolean= False; Alpha: Boolean= False; ColNum: Integer= 0; FonteNum: Integer= 0;
- InterNum: Integer= 0; CoulFdNum: Integer= -1; BordNum: Integer= -1);
+procedure T_Report.NumPageSectionFooter(Horiz,Verti: Single; TexteSect: string= ''; TextTot: string= '';
+ Total: Boolean= False; Alpha: Boolean= False; ColNum: Integer= 0; FontNum: Integer= 0;
+ LineSpNum: Integer= 0; BkColorNum: Integer= -1; BordNum: Integer= -1);
var
- RefTextePage,RefTexteTot: Integer;
+ RefTextPage,RefTextTot: Integer;
Flags: TfpgTextFlags;
begin
Flags:= [];
@@ -2631,135 +2637,135 @@ else
if Verti> 0
then
Verti:= Dim2Pixels(Verti);
-RefTextePage:= Textes.IndexOf(TexteSect);
-if RefTextePage= -1
+RefTextPage:= Texts.IndexOf(TexteSect);
+if RefTextPage= -1
then
- RefTextePage:= Textes.Add(TexteSect);
-RefTexteTot:= Textes.IndexOf(TexteTot);
-if RefTexteTot= -1
+ RefTextPage:= Texts.Add(TexteSect);
+RefTextTot:= Texts.IndexOf(TextTot);
+if RefTextTot= -1
then
- RefTexteTot:= Textes.Add(TexteTot);
-EcritNum(Horiz,Verti,ColNum,RefTextePage,RefTexteTot,FonteNum,CoulFdNum,BordNum,InterNum,Flags,Total,Alpha,ZPied,PSectNum);
+ RefTextTot:= Texts.Add(TextTot);
+WriteNumber(Horiz,Verti,ColNum,RefTextPage,RefTextTot,FontNum,BkColorNum,BordNum,LineSpNum,Flags,Total,Alpha,ZPied,PSectNum);
end;
-procedure T_Imprime.HorizLineHeader(EspAvant,EspApres: Single; ColNum: Integer= 0; StyleNum: Integer= 0);
+procedure T_Report.HorizLineHeader(SpBefore,SpAfter: Single; ColNum: Integer= 0; StyleNum: Integer= 0);
begin
-TraceTraitHoriz(Dim2Pixels(EspAvant),Dim2Pixels(EspApres),ColNum,-1,StyleNum,zEntete);
+DrawAHorizLine(Dim2Pixels(SpBefore),Dim2Pixels(SpAfter),ColNum,-1,StyleNum,zEntete);
end;
-procedure T_Imprime.HorizLinePage(EspAvant,EspApres: Single; ColNum: Integer= 0; StyleNum: Integer= 0);
+procedure T_Report.HorizLinePage(SpBefore,SpAfter: Single; ColNum: Integer= 0; StyleNum: Integer= 0);
begin
-TraceTraitHoriz(Dim2Pixels(EspAvant),Dim2Pixels(EspApres),ColNum,-1,StyleNum,zPage);
+DrawAHorizLine(Dim2Pixels(SpBefore),Dim2Pixels(SpAfter),ColNum,-1,StyleNum,zPage);
end;
-procedure T_Imprime.HorizLineFooter(EspAvant,EspApres: Single; ColNum: Integer= 0; StyleNum: Integer= 0);
+procedure T_Report.HorizLineFooter(SpBefore,SpAfter: Single; ColNum: Integer= 0; StyleNum: Integer= 0);
begin
-TraceTraitHoriz(Dim2Pixels(EspAvant),Dim2Pixels(EspApres),ColNum,-1,StyleNum,zPied);
+DrawAHorizLine(Dim2Pixels(SpBefore),Dim2Pixels(SpAfter),ColNum,-1,StyleNum,zPied);
end;
-procedure T_Imprime.SpaceHeader(Verti: Single; ColNum: Integer=0; CoulFdNum: Integer= -1);
+procedure T_Report.SpaceHeader(Verti: Single; ColNum: Integer=0; BkColorNum: Integer= -1);
begin
-InsereEspace(-1,ColNum,Dim2Pixels(Verti),CoulFdNum,zEntete);
+InsertSpace(-1,ColNum,Dim2Pixels(Verti),BkColorNum,zEntete);
end;
-procedure T_Imprime.SpacePage(Verti: Single; ColNum: Integer=0; CoulFdNum: Integer= -1);
+procedure T_Report.SpacePage(Verti: Single; ColNum: Integer=0; BkColorNum: Integer= -1);
begin
-InsereEspace(-1,ColNum,Dim2Pixels(Verti),CoulFdNum,zPage);
+InsertSpace(-1,ColNum,Dim2Pixels(Verti),BkColorNum,zPage);
end;
-procedure T_Imprime.SpaceFooter(Verti: Single; ColNum: Integer=0; CoulFdNum: Integer= -1);
+procedure T_Report.SpaceFooter(Verti: Single; ColNum: Integer=0; BkColorNum: Integer= -1);
begin
-InsereEspace(-1,ColNum,Dim2Pixels(Verti),CoulFdNum,zPied);
+InsertSpace(-1,ColNum,Dim2Pixels(Verti),BkColorNum,zPied);
end;
-function T_Imprime.LineSpace(ItlSup,ItlInt,ItlInf: Single): Integer;
+function T_Report.LineSpace(SpSup,SpInt,SpInf: Single): Integer;
var
Sup,Int,Inf: Integer;
begin
-if ItlSup> 0
+if SpSup> 0
then
- Sup:= Round(Dim2Pixels(ItlSup))
+ Sup:= Round(Dim2Pixels(SpSup))
else
Sup:= 0;
-if ItlInt> 0
+if SpInt> 0
then
- Int:= Round(Dim2Pixels(ItlInt))
+ Int:= Round(Dim2Pixels(SpInt))
else
Int:= 0;
-if ItlInf> 0
+if SpInf> 0
then
- Inf:= Round(Dim2Pixels(ItlInf))
+ Inf:= Round(Dim2Pixels(SpInf))
else
Inf:= 0;
-AInterligne:= T_Interligne.Create(Sup,Int,Inf);
-Result:= Interlignes.Add(AInterligne);
+VLineSpace:= T_LineSpace.Create(Sup,Int,Inf);
+Result:= LineSpaces.Add(VLineSpace);
end;
-procedure T_Imprime.BeginGroup(SautPage: Boolean= False);
+procedure T_Report.BeginGroup(PageJump: Boolean= False);
begin
-AGroupe:= T_Groupe.Create;
-FGroupe:= True;
-if SautPage
+VGroup:= T_Group.Create;
+FGroup:= True;
+if PageJump
then
Page;
end;
-procedure T_Imprime.EndGroup(SautPage: Boolean= False);
+procedure T_Report.EndGroup(PageJump: Boolean= False);
begin
-T_Section(Sections[Pred(Sections.Count)]).LoadCmdGroupeToPage;
-FGroupe:= False;
-AGroupe.Free;
-if SautPage
+T_Section(Sections[Pred(Sections.Count)]).LoadCmdGroupToPage;
+FGroup:= False;
+VGroup.Free;
+if PageJump
then
Page;
end;
-procedure T_Imprime.ColorColChange(ColNum: Integer; ColColor: TfpgColor);
+procedure T_Report.ColorColChange(ColNum: Integer; ColColor: TfpgColor);
begin
-T_Colonne(T_Section(Sections[Pred(Sections.Count)]).Colonnes[ColNum]).SetColColor(ColColor);
+T_Column(T_Section(Sections[Pred(Sections.Count)]).Columns[ColNum]).SetColColor(ColColor);
end;
-procedure T_Imprime.FrameMargins(AStyle: Integer);
+procedure T_Report.FrameMargins(AStyle: Integer);
begin
-TraceCadre(AStyle,zMarges);
+DrawAFrame(AStyle,zMarges);
end;
-procedure T_Imprime.FrameHeader(AStyle: Integer);
+procedure T_Report.FrameHeader(AStyle: Integer);
begin
-TraceCadre(AStyle,zEntete);
+DrawAFrame(AStyle,zEntete);
end;
-procedure T_Imprime.FramePage(AStyle: Integer);
+procedure T_Report.FramePage(AStyle: Integer);
begin
-TraceCadre(AStyle,zPage);
+DrawAFrame(AStyle,zPage);
end;
-procedure T_Imprime.FrameFooter(AStyle: Integer);
+procedure T_Report.FrameFooter(AStyle: Integer);
begin
-TraceCadre(AStyle,zPied);
+DrawAFrame(AStyle,zPied);
end;
-procedure T_Imprime.LinePage(XDebut,YDebut,XFin,YFin: Single; AStyle: Integer);
+procedure T_Report.LinePage(XBegin,YBegin,XEnd,YEnd: Single; AStyle: Integer);
begin
-TraceTrait(Dim2Pixels(XDebut),Dim2Pixels(YDebut),Dim2Pixels(XFin),Dim2Pixels(YFin),AStyle);
+DrawALine(Dim2Pixels(XBegin),Dim2Pixels(YBegin),Dim2Pixels(XEnd),Dim2Pixels(YEnd),AStyle);
end;
-procedure T_Imprime.SurfPage(XLimits,YLimits: array of Single; AColor: TfpgColor);
+procedure T_Report.SurfPage(XLimits,YLimits: array of Single; AColor: TfpgColor);
var
- Taille,Cpt: Integer;
+ Size,Cpt: Integer;
Ends: array of TRefPos;
begin
if Length(XLimits)< Length(YLimits)
then
- Taille:= Length(XLimits)
+ Size:= Length(XLimits)
else
if Length(XLimits)> Length(YLimits)
then
- Taille:= Length(YLimits)
+ Size:= Length(YLimits)
else
- Taille:= Length(XLimits);
-SetLength(Ends,Taille);
-for Cpt:= 0 to Pred(Taille) do
+ Size:= Length(XLimits);
+SetLength(Ends,Size);
+for Cpt:= 0 to Pred(Size) do
begin
Ends[Cpt].X:= Dim2Pixels(XLimits[Cpt]);
Ends[Cpt].Y:= Dim2Pixels(YLimits[Cpt]);
diff --git a/extras/contributed/report_tool/reportengine/u_reportimages.pas b/extras/contributed/report_tool/reportengine/u_reportimages.pas
index 5f25090e..7ec901a6 100644
--- a/extras/contributed/report_tool/reportengine/u_reportimages.pas
+++ b/extras/contributed/report_tool/reportengine/u_reportimages.pas
@@ -146,34 +146,34 @@ const
procedure CreateReportImages;
begin
- fpgImages.AddMaskedBMP('repimg.Fin',@repimg_Fin,sizeof(repimg_Fin),0,0);
+ fpgImages.AddMaskedBMP('repimg.Last',@repimg_Fin,sizeof(repimg_Fin),0,0);
- fpgImages.AddMaskedBMP('repimg.Imprimante',@repimg_Imprimante,sizeof(repimg_Imprimante),0,0);
+ fpgImages.AddMaskedBMP('repimg.Printer',@repimg_Imprimante,sizeof(repimg_Imprimante),0,0);
fpgImages.AddMaskedBMP('repimg.Precedent',@repimg_Precedent,sizeof(repimg_Precedent),0,0);
fpgImages.AddMaskedBMP('repimg.Stop',@repimg_Stop,sizeof(repimg_Stop),0,0);
- fpgImages.AddMaskedBMP('repimg.Suivant',@repimg_Suivant,sizeof(repimg_Suivant),0,0);
+ fpgImages.AddMaskedBMP('repimg.Next',@repimg_Suivant,sizeof(repimg_Suivant),0,0);
- fpgImages.AddMaskedBMP('repimg.Debut',@repimg_Debut,sizeof(repimg_Debut),0,0);
+ fpgImages.AddMaskedBMP('repimg.First',@repimg_Debut,sizeof(repimg_Debut),0,0);
end;
function DeleteReportImages: Boolean;
begin
- fpgImages.DeleteImage('repimg.Fin',True);
+ fpgImages.DeleteImage('repimg.Last',True);
- fpgImages.DeleteImage('repimg.Imprimante',True);
+ fpgImages.DeleteImage('repimg.Printer',True);
fpgImages.DeleteImage('repimg.Precedent',True);
fpgImages.DeleteImage('repimg.Stop',True);
- fpgImages.DeleteImage('repimg.Suivant',True);
+ fpgImages.DeleteImage('repimg.Next',True);
- fpgImages.DeleteImage('repimg.Debut',True);
+ fpgImages.DeleteImage('repimg.First',True);
end;
diff --git a/extras/contributed/report_tool/reportengine/u_visu.pas b/extras/contributed/report_tool/reportengine/u_visu.pas
index 4d06db14..8ba3522b 100644
--- a/extras/contributed/report_tool/reportengine/u_visu.pas
+++ b/extras/contributed/report_tool/reportengine/u_visu.pas
@@ -32,52 +32,52 @@ uses
type
TF_Visu = class(TfpgForm)
private
- FImprime: T_Imprime;
- Bv_Commande: TfpgBevel;
- Bt_Fermer: TfpgButton;
- Bt_Imprimer: TfpgButton;
- Bt_Imprimante: TfpgButton;
- Bt_Arreter: TfpgButton;
+ FReport: T_Report;
+ Bv_Command: TfpgBevel;
+ Bt_Close: TfpgButton;
+ Bt_Print: TfpgButton;
+ Bt_Printer: TfpgButton;
+ Bt_Stop: TfpgButton;
Bt_Pdf: TfpgButton;
Bv_Pages: TfpgBevel;
L_Pages: TfpgLabel;
- Bt_PremPage: TfpgButton;
+ Bt_FirstPage: TfpgButton;
Bt_PrecPage: TfpgButton;
E_NumPage: TfpgEditInteger;
- Bt_SuivPage: TfpgButton;
- Bt_DernPage: TfpgButton;
- L_DePage: Tfpglabel;
+ Bt_NextPage: TfpgButton;
+ Bt_LastPage: TfpgButton;
+ L_FromPage: Tfpglabel;
L_NbrPages: TfpgLabel;
Bv_Sections: TfpgBevel;
L_Sections: TfpgLabel;
Bt_PrecSect: TfpgButton;
E_NumSect: TfpgEditInteger;
- Bt_SuivSect: TfpgButton;
- L_DeSect: Tfpglabel;
+ Bt_NextSect: TfpgButton;
+ L_FromSect: Tfpglabel;
L_NbrSect: TfpgLabel;
L_PageSect: Tfpglabel;
L_NumPageSect: Tfpglabel;
- L_DePageSect: TfpgLabel;
+ L_FromPageSect: TfpgLabel;
L_NbrPageSect: TfpgLabel;
procedure FormShow(Sender: TObject);
- procedure Bt_FermerClick(Sender: TObject);
- procedure Bt_ImprimerClick(Sender: TObject);
- procedure Bt_ImprimanteClick(Sender: TObject);
- procedure Bt_ArreterClick(Sender: TObject);
+ procedure Bt_CloseClick(Sender: TObject);
+ procedure Bt_PrintClick(Sender: TObject);
+ procedure Bt_PrinterClick(Sender: TObject);
+ procedure Bt_StopClick(Sender: TObject);
procedure Bt_PdfClick(Sender: TObject);
- procedure Bt_PremPageClick(Sender: TObject);
+ procedure Bt_FirstPageClick(Sender: TObject);
procedure Bt_PrecPageClick(Sender: TObject);
- procedure Bt_SuivPageClick(Sender: TObject);
- procedure Bt_DernPageClick(Sender: TObject);
+ procedure Bt_NextPageClick(Sender: TObject);
+ procedure Bt_LastPageClick(Sender: TObject);
procedure Bt_PrecSectClick(Sender: TObject);
- procedure Bt_SuivSectClick(Sender: TObject);
+ procedure Bt_NextSectClick(Sender: TObject);
procedure E_NumPageKeyPress(Sender: TObject; var KeyCode: word; var ShiftState: TShiftState;
var Consumed: boolean);
procedure E_NumSectKeyPress(Sender: TObject; var KeyCode: word; var ShiftState: TShiftState;
var Consumed: boolean);
- procedure ChangeBoutons;
+ procedure ChangeButtons;
public
- constructor Create(AOwner: TComponent; AImprime: T_Imprime); reintroduce;
+ constructor Create(AOwner: TComponent; AImprime: T_Report); reintroduce;
destructor Destroy; override;
end;
@@ -95,8 +95,8 @@ begin
L_Pages.Text:= 'Page';
L_Sections.Text:= 'Section';
L_PageSect.Text:= 'Page';
-L_DePage.Text:= 'of';
-with FImprime do
+L_FromPage.Text:= 'of';
+with FReport do
begin
if Sections.Count= 1
then
@@ -110,69 +110,69 @@ with FImprime do
L_NbrSect.Text:= IntToStr(Sections.Count);
L_NumPageSect.Text:= IntToStr(NumPageSection);
L_NbrPageSect.Text:= IntToStr(T_Section(Sections[Pred(NumSection)]).NbPages);
- ChangeBoutons;
+ ChangeButtons;
end;
end;
-procedure TF_Visu.Bt_FermerClick(Sender: TObject);
+procedure TF_Visu.Bt_CloseClick(Sender: TObject);
begin
Close;
end;
-procedure TF_Visu.Bt_ImprimerClick(Sender: TObject);
+procedure TF_Visu.Bt_PrintClick(Sender: TObject);
begin
end;
-procedure TF_Visu.Bt_ImprimanteClick(Sender: TObject);
+procedure TF_Visu.Bt_PrinterClick(Sender: TObject);
begin
end;
-procedure TF_Visu.Bt_ArreterClick(Sender: TObject);
+procedure TF_Visu.Bt_StopClick(Sender: TObject);
begin
end;
procedure TF_Visu.Bt_PdfClick(Sender: TObject);
var
- Fd_SauvePdf: TfpgFileDialog;
- FichierPdf: string;
- FluxFichier: TFileStream;
+ Fd_SavePdf: TfpgFileDialog;
+ PdfFile: string;
+ PdfFileStream: TFileStream;
begin
-Fd_SauvePdf:= TfpgFileDialog.Create(nil);
-Fd_SauvePdf.InitialDir:= ExtractFilePath(Paramstr(0));
-Fd_SauvePdf.FontDesc:= 'bitstream vera sans-9';
-Fd_SauvePdf.Filter:= 'Fichiers pdf |*.pdf';
-Fd_SauvePdf.FileName:= FImprime.DefaultFile;
+Fd_SavePdf:= TfpgFileDialog.Create(nil);
+Fd_SavePdf.InitialDir:= ExtractFilePath(Paramstr(0));
+Fd_SavePdf.FontDesc:= 'bitstream vera sans-9';
+Fd_SavePdf.Filter:= 'Fichiers pdf |*.pdf';
+Fd_SavePdf.FileName:= FReport.DefaultFile;
try
- if Fd_SauvePdf.RunSaveFile
+ if Fd_SavePdf.RunSaveFile
then
begin
- FichierPdf:= Fd_SauvePdf.FileName;
- if Lowercase(Copy(FichierPdf,Length(FichierPdf)-3,4))<> '.pdf'
+ PdfFile:= Fd_SavePdf.FileName;
+ if Lowercase(Copy(PdfFile,Length(PdfFile)-3,4))<> '.pdf'
then
- FichierPdf:= FichierPdf+'.pdf';
+ PdfFile:= PdfFile+'.pdf';
Document:= TPdfDocument.CreateDocument;
with Document do
begin
- FluxFichier:= TFileStream.Create(FichierPdf,fmCreate);
- WriteDocument(FluxFichier);
- FluxFichier.Free;
+ PdfFileStream:= TFileStream.Create(PdfFile,fmCreate);
+ WriteDocument(PdfFileStream);
+ PdfFileStream.Free;
Free;
end;
{$ifdef linux}
- fpgOpenURL(FichierPdf);
+ fpgOpenURL(PdfFile);
{$endif}
{$ifdef win32}
- ShellExecute(0,PChar('OPEN'),PChar(FichierPdf),PChar(''),PChar(''),1);
+ ShellExecute(0,PChar('OPEN'),PChar(PdfFile),PChar(''),PChar(''),1);
{$endif}
end;
finally
- Fd_SauvePdf.Free;
+ Fd_SavePdf.Free;
end;
end;
-procedure TF_Visu.Bt_PremPageClick(Sender: TObject);
+procedure TF_Visu.Bt_FirstPageClick(Sender: TObject);
begin
-with FImprime do
+with FReport do
begin
NumPage:= 1;
NumSection:= 1;
@@ -187,7 +187,7 @@ with FImprime do
Bv_Visu.Left:= (F_Visu.Width-Paper.W) div 2;
end;
Bv_Visu.Visible:= True;
- ChangeBoutons;
+ ChangeButtons;
E_NumSect.Text:= IntToStr(NumSection);
L_NumPageSect.Text:= IntToStr(NumPageSection);
L_NbrPageSect.Text:= IntToStr(T_Section(Sections[Pred(NumSection)]).NbPages);
@@ -196,7 +196,7 @@ end;
procedure TF_Visu.Bt_PrecPageClick(Sender: TObject);
begin
-with FImprime do
+with FReport do
begin
NumPage:= NumPage-1;
if NumPageSection= 1
@@ -220,16 +220,16 @@ with FImprime do
Bv_Visu.Invalidate;
end;
E_NumPage.Text:= IntToStr(NumPage);
- ChangeBoutons;
+ ChangeButtons;
E_NumSect.Text:= IntToStr(NumSection);
L_NumPageSect.Text:= IntToStr(NumPageSection);
L_NbrPageSect.Text:= IntToStr(T_Section(Sections[Pred(NumSection)]).NbPages);
end;
end;
-procedure TF_Visu.Bt_SuivPageClick(Sender: TObject);
+procedure TF_Visu.Bt_NextPageClick(Sender: TObject);
begin
-with FImprime do
+with FReport do
begin
NumPage:= NumPage+1;
if NumPageSection= T_Section(Sections[Pred(NumSection)]).NbPages
@@ -253,16 +253,16 @@ with FImprime do
Bv_Visu.Invalidate;
end;
E_NumPage.Text:= IntToStr(NumPage);
- ChangeBoutons;
+ ChangeButtons;
E_NumSect.Text:= IntToStr(NumSection);
L_NumPageSect.Text:= IntToStr(NumPageSection);
L_NbrPageSect.Text:= IntToStr(T_Section(Sections[Pred(NumSection)]).NbPages);
end;
end;
-procedure TF_Visu.Bt_DernPageClick(Sender: TObject);
+procedure TF_Visu.Bt_LastPageClick(Sender: TObject);
begin
-with FImprime do
+with FReport do
begin
NumPage:= T_Section(Sections[Pred(Sections.Count)]).TotPages;
NumSection:= Sections.Count;
@@ -277,7 +277,7 @@ with FImprime do
Bv_Visu.Left:= (F_Visu.Width-Paper.W) div 2;
end;
Bv_Visu.Visible:= True;
- ChangeBoutons;
+ ChangeButtons;
E_NumSect.Text:= IntToStr(NumSection);
L_NumPageSect.Text:= IntToStr(NumPageSection);
L_NbrPageSect.Text:= IntToStr(T_Section(Sections[Pred(NumSection)]).NbPages);
@@ -286,7 +286,7 @@ end;
procedure TF_Visu.Bt_PrecSectClick(Sender: TObject);
begin
-with FImprime do
+with FReport do
begin
NumSection:= NumSection-1;
NumPage:= T_Section(Sections[Pred(NumSection)]).FirstPage;
@@ -301,16 +301,16 @@ with FImprime do
Bv_Visu.Left:= (F_Visu.Width-Paper.W) div 2;
end;
Bv_Visu.Visible:= True;
- ChangeBoutons;
+ ChangeButtons;
E_NumSect.Text:= IntToStr(NumSection);
L_NumPageSect.Text:= IntToStr(NumPageSection);
L_NbrPageSect.Text:= IntToStr(T_Section(Sections[Pred(NumSection)]).NbPages);
end;
end;
-procedure TF_Visu.Bt_SuivSectClick(Sender: TObject);
+procedure TF_Visu.Bt_NextSectClick(Sender: TObject);
begin
-with FImprime do
+with FReport do
begin
NumSection:= NumSection+1;
NumPage:= T_Section(Sections[Pred(NumSection)]).FirstPage;
@@ -325,87 +325,87 @@ with FImprime do
Bv_Visu.Left:= (F_Visu.Width-Paper.W) div 2;
end;
Bv_Visu.Visible:= True;
- ChangeBoutons;
+ ChangeButtons;
E_NumSect.Text:= IntToStr(NumSection);
L_NumPageSect.Text:= IntToStr(NumPageSection);
L_NbrPageSect.Text:= IntToStr(T_Section(Sections[Pred(NumSection)]).NbPages);
end;
end;
-procedure TF_Visu.ChangeBoutons;
+procedure TF_Visu.ChangeButtons;
begin
-with FImprime do
+with FReport do
if T_Section(Sections[Pred(Sections.Count)]).TotPages> 1
then
if NumPage= 1
then
begin
- Bt_PremPage.Enabled:= False;
+ Bt_FirstPage.Enabled:= False;
Bt_PrecPage.Enabled:= False;
- Bt_SuivPage.Enabled:= True;
- Bt_DernPage.Enabled:= True;
+ Bt_NextPage.Enabled:= True;
+ Bt_LastPage.Enabled:= True;
Bt_PrecSect.Enabled:= False;
if Sections.Count> 1
then
- Bt_SuivSect.Enabled:= True
+ Bt_NextSect.Enabled:= True
else
- Bt_SuivSect.Enabled:= False;
+ Bt_NextSect.Enabled:= False;
end
else
if NumPage= T_Section(Sections[Pred(Sections.Count)]).TotPages
then
begin
- Bt_PremPage.Enabled:= True;
+ Bt_FirstPage.Enabled:= True;
Bt_PrecPage.Enabled:= True;
- Bt_SuivPage.Enabled:= False;
- Bt_DernPage.Enabled:= False;
+ Bt_NextPage.Enabled:= False;
+ Bt_LastPage.Enabled:= False;
if Sections.Count> 1
then
Bt_PrecSect.Enabled:= True
else
Bt_PrecSect.Enabled:= False;
- Bt_SuivSect.Enabled:= False;
+ Bt_NextSect.Enabled:= False;
end
else
begin
- Bt_PremPage.Enabled:= True;
+ Bt_FirstPage.Enabled:= True;
Bt_PrecPage.Enabled:= True;
- Bt_SuivPage.Enabled:= True;
- Bt_DernPage.Enabled:= True;
+ Bt_NextPage.Enabled:= True;
+ Bt_LastPage.Enabled:= True;
if Sections.Count> 1
then
if NumSection= 1
then
begin
Bt_PrecSect.Enabled:= False;
- Bt_SuivSect.Enabled:= True;
+ Bt_NextSect.Enabled:= True;
end
else
if NumSection= Sections.Count
then
begin
Bt_PrecSect.Enabled:= True;
- Bt_SuivSect.Enabled:= False;
+ Bt_NextSect.Enabled:= False;
end
else
begin
Bt_PrecSect.Enabled:= True;
- Bt_SuivSect.Enabled:= True;
+ Bt_NextSect.Enabled:= True;
end
else
begin
Bt_PrecSect.Enabled:= False;
- Bt_SuivSect.Enabled:= False;
+ Bt_NextSect.Enabled:= False;
end;
end
else
begin
- Bt_PremPage.Enabled:= False;
+ Bt_FirstPage.Enabled:= False;
Bt_PrecPage.Enabled:= False;
- Bt_SuivPage.Enabled:= False;
- Bt_DernPage.Enabled:= False;
+ Bt_NextPage.Enabled:= False;
+ Bt_LastPage.Enabled:= False;
Bt_PrecSect.Enabled:= False;
- Bt_SuivSect.Enabled:= False;
+ Bt_NextSect.Enabled:= False;
end;
end;
@@ -416,7 +416,7 @@ var
begin
if (KeyCode= KeyReturn) or (KeyCode= KeyPEnter)
then
- with FImprime do
+ with FReport do
begin
if E_NumPage.Value> T_Section(Sections[Pred(Sections.Count)]).TotPages
then
@@ -441,7 +441,7 @@ then
NumSection:= CptSect;
NumPageSection:= CptPagesect;
Bv_Visu.Invalidate;
- ChangeBoutons;
+ ChangeButtons;
E_NumSect.Text:= IntToStr(NumSection);
L_NumPageSect.Text:= IntToStr(NumPageSection);
L_NbrPageSect.Text:= IntToStr(T_Section(Sections[Pred(NumSection)]).NbPages);
@@ -453,7 +453,7 @@ procedure TF_Visu.E_NumSectKeyPress(Sender: TObject; var KeyCode: word; var Shif
begin
if (KeyCode= KeyReturn) or (KeyCode= KeyPEnter)
then
- with FImprime do
+ with FReport do
begin
if E_NumSect.Value> Sections.Count
then
@@ -469,16 +469,16 @@ then
NumPageSection:= 1;
E_NumPage.Value:= NumPage;
Bv_Visu.Invalidate;
- ChangeBoutons;
+ ChangeButtons;
L_NumPageSect.Text:= IntToStr(NumPageSection);
L_NbrPageSect.Text:= IntToStr(T_Section(Sections[Pred(NumSection)]).NbPages);
end;
end;
-constructor TF_Visu.Create(AOwner: TComponent; AImprime: T_Imprime);
+constructor TF_Visu.Create(AOwner: TComponent; AImprime: T_Report);
begin
inherited Create(AOwner);
-FImprime := AImprime;
+FReport := AImprime;
Name := 'F_Visu';
WindowTitle:= 'Preview';
WindowPosition:= wpUser;
@@ -486,44 +486,44 @@ SetPosition(0, 0, FpgApplication.ScreenWidth-2, FpgApplication.ScreenHeight-66);
Sizeable:= False;
BackgroundColor:= clMediumAquamarine;
CreateReportImages;
-Bv_Commande:= CreateBevel(Self,0,0,Width,50,bsBox,bsRaised);
-Bv_Commande.BackgroundColor:= clBisque;
-Bt_Fermer:= CreateButton(Bv_Commande,10,10,26,'',@Bt_FermerClick,'stdimg.exit');
-Bt_Fermer.BackgroundColor:= clOrangeRed;
-Bt_Imprimer:= CreateButton(Bv_Commande,50,10,26,'',@Bt_ImprimerClick,'stdimg.print');
-Bt_Imprimer.BackgroundColor:= clGreen;
-Bt_Imprimer.Enabled:= False;
-Bt_Imprimante:= CreateButton(Bv_Commande,90,10,26,'',@Bt_ImprimanteClick,'repimg.Imprimante');
-Bt_Imprimante.BackgroundColor:= clSilver;
-Bt_Imprimante.Enabled:= False;
-Bt_Arreter:= CreateButton(Bv_Commande,130,10,26,'',@Bt_ArreterClick,'repimg.Stop');
-Bt_Arreter.BackgroundColor:= clRed;
-Bt_Pdf:= CreateButton(Bv_Commande,170,10,26,'',@Bt_PdfClick,'stdimg.Adobe_pdf');
+Bv_Command:= CreateBevel(Self,0,0,Width,50,bsBox,bsRaised);
+Bv_Command.BackgroundColor:= clBisque;
+Bt_Close:= CreateButton(Bv_Command,10,10,26,'',@Bt_CloseClick,'stdimg.exit');
+Bt_Close.BackgroundColor:= clOrangeRed;
+Bt_Print:= CreateButton(Bv_Command,50,10,26,'',@Bt_PrintClick,'stdimg.print');
+Bt_Print.BackgroundColor:= clGreen;
+Bt_Print.Enabled:= False;
+Bt_Printer:= CreateButton(Bv_Command,90,10,26,'',@Bt_PrinterClick,'repimg.Printer');
+Bt_Printer.BackgroundColor:= clSilver;
+Bt_Printer.Enabled:= False;
+Bt_Stop:= CreateButton(Bv_Command,130,10,26,'',@Bt_StopClick,'repimg.Stop');
+Bt_Stop.BackgroundColor:= clRed;
+Bt_Pdf:= CreateButton(Bv_Command,170,10,26,'',@Bt_PdfClick,'stdimg.Adobe_pdf');
Bt_Pdf.BackgroundColor:= clWhite;
Bt_Pdf.ImageMargin:= 0;
-Bv_Pages:= CreateBevel(Bv_Commande,220,5,300,40,bsBox,bsLowered);
+Bv_Pages:= CreateBevel(Bv_Command,220,5,300,40,bsBox,bsLowered);
Bv_Pages.BackgroundColor:= clLinen;
-Bt_PremPage:= CreateButton(Bv_Pages,54,6,26,'',@Bt_PremPageClick,'repimg.Debut');
+Bt_FirstPage:= CreateButton(Bv_Pages,54,6,26,'',@Bt_FirstPageClick,'repimg.First');
Bt_PrecPage:= CreateButton(Bv_Pages,80,6,26,'',@Bt_PrecPageClick,'repimg.Precedent');
E_NumPage:= CreateEditInteger(Bv_Pages,110,8,60,0);
E_NumPage.OnKeyPress:= @E_NumPageKeypress;
-Bt_Suivpage:= CreateButton(Bv_Pages,174,6,26,'',@Bt_SuivPageClick,'repimg.Suivant');
-Bt_DernPage:= CreateButton(Bv_Pages,200,6,26,'',@Bt_DernPageClick,'repimg.Fin');
+Bt_NextPage:= CreateButton(Bv_Pages,174,6,26,'',@Bt_NextPageClick,'repimg.Next');
+Bt_LastPage:= CreateButton(Bv_Pages,200,6,26,'',@Bt_LastPageClick,'repimg.Last');
L_Pages:= CreateLabel(Bv_Pages,5,E_NumPage.Top,'Page',0,E_NumPage.Height,taLeftJustify,tlcenter);
-L_Depage:= CreateLabel(Bv_Pages,235,E_NumPage.Top,'de',0,E_NumPage.Height,taLeftJustify,tlcenter);
+L_FromPage:= CreateLabel(Bv_Pages,235,E_NumPage.Top,'of',0,E_NumPage.Height,taLeftJustify,tlcenter);
L_NbrPages:= CreateLabel(Bv_Pages,265,E_NumPage.Top,' ',30,E_NumPage.Height,taCenter,tlcenter);
-Bv_Sections:= CreateBevel(Bv_Commande,540,5,500,40,bsBox,bsLowered);
+Bv_Sections:= CreateBevel(Bv_Command,540,5,500,40,bsBox,bsLowered);
Bv_Sections.BackgroundColor:= clLinen;
Bt_PrecSect:= CreateButton(Bv_Sections,90,6,26,'',@Bt_PrecSectClick,'repimg.Precedent');
E_NumSect:= CreateEditInteger(Bv_Sections,120,8,60,0);
E_NumSect.OnKeyPress:= @E_NumSectKeyPress;
-Bt_SuivSect:= CreateButton(Bv_Sections,184,6,26,'',@Bt_SuivSectClick,'repimg.Suivant');
+Bt_NextSect:= CreateButton(Bv_Sections,184,6,26,'',@Bt_NextSectClick,'repimg.Next');
L_Sections:= CreateLabel(Bv_Sections,5,E_NumSect.Top,'Section',0,E_NumSect.Height,taLeftJustify,tlcenter);
-L_DeSect:= CreateLabel(Bv_Sections,250,E_NumSect.Top,'of',0,E_NumSect.Height,taLeftJustify,tlcenter);
+L_FromSect:= CreateLabel(Bv_Sections,250,E_NumSect.Top,'of',0,E_NumSect.Height,taLeftJustify,tlcenter);
L_NbrSect:= CreateLabel(Bv_Sections,280,E_NumSect.Top,'-',0,E_NumSect.Height,taLeftJustify,tlcenter);
L_PageSect:= CreateLabel(Bv_Sections,320,E_NumSect.Top,'Page',0,E_NumSect.Height,taLeftJustify,tlcenter);
L_NumPageSect:= CreateLabel(Bv_Sections,365,E_NumSect.Top,'-',0,E_NumSect.Height,taLeftJustify,tlcenter);
-L_DePageSect:= CreateLabel(Bv_Sections,410,E_NumSect.Top,'of',0,E_NumSect.Height,taLeftJustify,tlcenter);
+L_FromPageSect:= CreateLabel(Bv_Sections,410,E_NumSect.Top,'of',0,E_NumSect.Height,taLeftJustify,tlcenter);
L_NbrPageSect:= CreateLabel(Bv_Sections,440,E_NumSect.Top,'-',0,E_NumSect.Height,taLeftJustify,tlcenter);
OnShow:= @FormShow;
end;