FastReport_2022_VCL/LibD28x64/frxExportSVGDialog.pas
2024-01-01 16:13:08 +01:00

119 lines
2.7 KiB
ObjectPascal

{******************************************}
{ }
{ FastReport VCL }
{ SVG 1.1 Export dialog }
{ }
{ Copyright (c) 1998-2021 }
{ by Fast Reports Inc. }
{ }
{******************************************}
unit frxExportSVGDialog;
interface
{$I frx.inc}
uses
Windows,
Classes,
Controls,
Forms,
Dialogs,
StdCtrls,
StrUtils,
Graphics,
frxExportBaseDialog,
{$IFDEF DELPHI16}
System.UITypes,
{$ENDIF}
{$IFDEF Delphi10}
WideStrings,
{$ENDIF}
ComCtrls;
type
TfrxSVGExportDialog = class(TfrxBaseExportDialog)
PicturesL: TLabel;
StylesCB: TCheckBox;
UnifiedPicturesCB: TCheckBox;
PicturesCB: TCheckBox;
MultipageCB: TCheckBox;
PFormatCB: TComboBox;
FormattedCB: TCheckBox;
NavigationCB: TCheckBox;
protected
procedure InitControlsFromFilter(ExportFilter: TfrxBaseDialogExportFilter); override;
procedure InitFilterFromDialog(ExportFilter: TfrxBaseDialogExportFilter); override;
end;
implementation
uses frxRes, frxExportHelpers, frxExportSVG;
{$R *.dfm}
{ TfrxSVGExportDialog}
procedure TfrxSVGExportDialog.InitControlsFromFilter(
ExportFilter: TfrxBaseDialogExportFilter);
procedure DisableCB(CB: TCheckBox);
begin
CB.State := cbGrayed;
CB.Enabled := False;
end;
begin
inherited;
with TfrxSVGExport(ExportFilter) do
begin
if SlaveExport then
begin
EmbeddedCSS := True;
DisableCB(StylesCB);
EmbeddedPictures := True;
DisableCB(PicturesCB);
MultiPage := False;
DisableCB(MultipageCB);
Navigation := False;
DisableCB(NavigationCB);
PictureFormat := pfPNG;
PFormatCB.Enabled := False;
UnifiedPictures := True;
DisableCB(UnifiedPicturesCB);
end;
StylesCB.Checked := EmbeddedCSS;
PicturesCB.Checked := EmbeddedPictures;
MultipageCB.Checked := MultiPage;
NavigationCB.Checked := Navigation;
UnifiedPicturesCB.Checked := UnifiedPictures;
FormattedCB.Checked := Formatted;
PFormatCB.ItemIndex := Integer(PictureFormat);
PicturesL.Caption := frxGet(8002);
end;
end;
procedure TfrxSVGExportDialog.InitFilterFromDialog(
ExportFilter: TfrxBaseDialogExportFilter);
begin
inherited;
with TfrxSVGExport(ExportFilter) do
begin
EmbeddedCSS := StylesCB.Checked;
EmbeddedPictures := PicturesCB.Checked;
MultiPage := MultipageCB.Checked;
Navigation := NavigationCB.Checked;
UnifiedPictures := UnifiedPicturesCB.Checked;
Formatted := FormattedCB.Checked;
PictureFormat := TfrxPictureFormat(PFormatCB.ItemIndex);
end;
end;
end.