tvplanit: Cosmetic changes in VpPrtPrvDlg

git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@8537 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
wp_xxyyzz
2022-10-12 11:26:53 +00:00
parent d78a678e70
commit d061931e1f

View File

@ -50,113 +50,113 @@ type
{ TfrmPrintPreview } { TfrmPrintPreview }
TfrmPrintPreview = class(TForm) TfrmPrintPreview = class(TForm)
Bevel1: TBevel; Bevel1: TBevel;
PageInfo: TLabel; PageInfo: TLabel;
Panel1: TPanel; Panel1: TPanel;
cboxZoom: TComboBox; cboxZoom: TComboBox;
btnCancel: TToolButton; btnCancel: TToolButton;
Panel2: TPanel; Panel2: TPanel;
pnlPageCount: TPanel; pnlPageCount: TPanel;
VpPrintPreview1: TVpPrintPreview; VpPrintPreview1: TVpPrintPreview;
VpPrintFormatComboBox1: TVpPrintFormatComboBox; VpPrintFormatComboBox1: TVpPrintFormatComboBox;
ToolBar1: TToolBar; ToolBar1: TToolBar;
btnPrint: TToolButton; btnPrint: TToolButton;
ToolButton3: TToolButton; ToolButton3: TToolButton;
btnFirstPage: TToolButton; btnFirstPage: TToolButton;
btnPrevPage: TToolButton; btnPrevPage: TToolButton;
btnNextPage: TToolButton; btnNextPage: TToolButton;
btnLastPage: TToolButton; btnLastPage: TToolButton;
imMain: TImageList; imMain: TImageList;
ToolButton8: TToolButton; ToolButton8: TToolButton;
actMain: TActionList; actMain: TActionList;
actPrint: TAction; actPrint: TAction;
actFirstPage: TAction; actFirstPage: TAction;
actPrevPage: TAction; actPrevPage: TAction;
actNextPage: TAction; actNextPage: TAction;
actLastPage: TAction; actLastPage: TAction;
actCancel: TAction; actCancel: TAction;
procedure OKBtnClick (Sender : TObject); procedure OKBtnClick (Sender : TObject);
procedure cboxZoomChange(Sender: TObject); procedure cboxZoomChange(Sender: TObject);
procedure actPrintExecute(Sender: TObject); procedure actPrintExecute(Sender: TObject);
procedure actFirstPageExecute(Sender: TObject); procedure actFirstPageExecute(Sender: TObject);
procedure actPrevPageExecute(Sender: TObject); procedure actPrevPageExecute(Sender: TObject);
procedure actNextPageExecute(Sender: TObject); procedure actNextPageExecute(Sender: TObject);
procedure actLastPageExecute(Sender: TObject); procedure actLastPageExecute(Sender: TObject);
procedure actMainUpdate(Action: TBasicAction; var Handled: Boolean); procedure actMainUpdate(Action: TBasicAction; var Handled: Boolean);
procedure actCancelExecute(Sender: TObject); procedure actCancelExecute(Sender: TObject);
procedure FormCreate(Sender: TObject); procedure FormCreate(Sender: TObject);
procedure FormShow(Sender: TObject); procedure FormShow(Sender: TObject);
procedure FormKeyDown(Sender: TObject; var Key: Word; Shift: TShiftState); procedure FormKeyDown(Sender: TObject; var Key: Word; Shift: TShiftState);
procedure ToolBar1Resize(Sender: TObject); procedure ToolBar1Resize(Sender: TObject);
procedure VpPrintFormatComboBox1Change(Sender: TObject); procedure VpPrintFormatComboBox1Change(Sender: TObject);
private private
FDrawingStyle: TVpDrawingStyle; FDrawingStyle: TVpDrawingStyle;
procedure PopulateImageList; procedure PopulateImageList;
procedure SetCaptions; procedure SetCaptions;
procedure SetDrawingStyle(AValue: TVpDrawingStyle); procedure SetDrawingStyle(AValue: TVpDrawingStyle);
procedure UpdatePageInfo; procedure UpdatePageInfo;
public public
Resource: TVpResource; Resource: TVpResource;
Contact: TVpContact; Contact: TVpContact;
ReturnCode: TVpEditorReturnCode; ReturnCode: TVpEditorReturnCode;
property DrawingStyle: TVpDrawingStyle read FDrawingStyle write SetDrawingStyle; property DrawingStyle: TVpDrawingStyle read FDrawingStyle write SetDrawingStyle;
end; end;
TVpPrintPreviewDialog = class (TVpBaseDialog) TVpPrintPreviewDialog = class (TVpBaseDialog)
private private
FControlLink: TVpControlLink; FControlLink: TVpControlLink;
FAutoPrint: Boolean; FAutoPrint: Boolean;
FBottomMargin: Extended; FBottomMargin: Extended;
FDrawingStyle: TVpDrawingStyle; FDrawingStyle: TVpDrawingStyle;
FEndDate: TDateTime; FEndDate: TDateTime;
FLeftMargin: Extended; FLeftMargin: Extended;
FMarginUnits: TVpItemMeasurement; FMarginUnits: TVpItemMeasurement;
FRightMargin: Extended; FRightMargin: Extended;
FStartDate: TDateTime; FStartDate: TDateTime;
FTopMargin: Extended; FTopMargin: Extended;
FZoomFactor: TVpPPZoomFactor; FZoomFactor: TVpPPZoomFactor;
FWindowState: TWindowState; FWindowState: TWindowState;
FPrinter: TPrinter; FPrinter: TPrinter;
protected protected
procedure Notification(AComponent: TComponent; Operation: TOperation); override; procedure Notification(AComponent: TComponent; Operation: TOperation); override;
procedure SetAutoPrint(const v: Boolean); procedure SetAutoPrint(const v: Boolean);
procedure SetBottomMargin(const v: Extended); procedure SetBottomMargin(const v: Extended);
procedure SetControlLink(const v: TVpControlLink); procedure SetControlLink(const v: TVpControlLink);
procedure SetEndDate(const v: TDateTime); procedure SetEndDate(const v: TDateTime);
procedure SetLeftMargin(const v: Extended); procedure SetLeftMargin(const v: Extended);
procedure SetMarginUnits(const v: TVpItemMeasurement); procedure SetMarginUnits(const v: TVpItemMeasurement);
procedure SetRightMargin(const v: Extended); procedure SetRightMargin(const v: Extended);
procedure SetStartDate(const v: TDateTime); procedure SetStartDate(const v: TDateTime);
procedure SetTopMargin(const v: Extended); procedure SetTopMargin(const v: Extended);
procedure SetZoomFactor(const v: TVpPPZoomFactor); procedure SetZoomFactor(const v: TVpPPZoomFactor);
public public
constructor Create(AOwner: TComponent); override; constructor Create(AOwner: TComponent); override;
function Execute: Boolean; override; function Execute: Boolean; override;
property Printer: TPrinter read FPrinter write FPrinter; property Printer: TPrinter read FPrinter write FPrinter;
published published
property AutoPrint: Boolean read FAutoPrint write SetAutoPrint default False; property AutoPrint: Boolean read FAutoPrint write SetAutoPrint default False;
property BottomMargin: Extended read FBottomMargin write SetBottomMargin; property BottomMargin: Extended read FBottomMargin write SetBottomMargin;
property ControlLink: TVpControlLink read FControlLink write SetControlLink; property ControlLink: TVpControlLink read FControlLink write SetControlLink;
property DrawingStyle: TVpDrawingStyle read FDrawingStyle write FDrawingStyle default ds3D; property DrawingStyle: TVpDrawingStyle read FDrawingStyle write FDrawingStyle default ds3D;
property EndDate: TDateTime read FEndDate write SetEndDate; property EndDate: TDateTime read FEndDate write SetEndDate;
property LeftMargin: Extended read FLeftMargin write SetLeftMargin; property LeftMargin: Extended read FLeftMargin write SetLeftMargin;
property MarginUnits: TVpItemMeasurement read FMarginUnits write SetMarginUnits default imInches; property MarginUnits: TVpItemMeasurement read FMarginUnits write SetMarginUnits default imInches;
property RightMargin: Extended read FRightMargin write SetRightMargin; property RightMargin: Extended read FRightMargin write SetRightMargin;
property StartDate: TDateTime read FStartDate write SetStartDate; property StartDate: TDateTime read FStartDate write SetStartDate;
property TopMargin: Extended read FTopMargin write SetTopMargin; property TopMargin: Extended read FTopMargin write SetTopMargin;
property WindowState: TWindowState read FWindowState write FWindowState default wsNormal; property WindowState: TWindowState read FWindowState write FWindowState default wsNormal;
property ZoomFactor: TVpPPZoomFactor read FZoomFactor write SetZoomFactor default zfFitToControl; property ZoomFactor: TVpPPZoomFactor read FZoomFactor write SetZoomFactor default zfFitToControl;
property DataStore; property DataStore;
property Options; property Options;
property Placement; property Placement;
end; end;
implementation implementation