You've already forked lazarus-ccr
tvplanit: Add component editor for TVpPrintPreviewDialog
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@8491 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
@ -26,7 +26,7 @@
|
||||
{* *}
|
||||
{* ***** END LICENSE BLOCK ***** *}
|
||||
|
||||
{$I Vp.INC} { Compiler Version Defines }
|
||||
{$I vp.inc} { Compiler Version Defines }
|
||||
|
||||
{$R vpreg.res} { Palette Glyphs }
|
||||
|
||||
@ -91,9 +91,9 @@ type
|
||||
TVpDateProperty = class (TFloatProperty)
|
||||
public
|
||||
procedure Edit; override;
|
||||
function GetAttributes : TPropertyAttributes; override;
|
||||
function GetValue : string; override;
|
||||
procedure SetValue (const Value : string); override;
|
||||
function GetAttributes: TPropertyAttributes; override;
|
||||
function GetValue: string; override;
|
||||
procedure SetValue(const Value: string); override;
|
||||
end;
|
||||
|
||||
TVpGeneralFileNameProperty = class (TStringProperty)
|
||||
@ -139,10 +139,8 @@ type
|
||||
|
||||
TVpAboutProperty = class(TStringProperty)
|
||||
public
|
||||
function GetAttributes: TPropertyAttributes;
|
||||
override;
|
||||
procedure Edit;
|
||||
override;
|
||||
function GetAttributes: TPropertyAttributes; override;
|
||||
procedure Edit; override;
|
||||
end;
|
||||
|
||||
TVpFlexDSEditor = class(TComponentEditor)
|
||||
@ -151,6 +149,15 @@ type
|
||||
function GetVerbCount: Integer; override;
|
||||
end;
|
||||
|
||||
TVpBaseDialogComponentEditor = class(TComponentEditor)
|
||||
private
|
||||
procedure TestDialog;
|
||||
public
|
||||
function GetVerbCount: Integer; override;
|
||||
function GetVerb(Index: Integer): string; override;
|
||||
procedure ExecuteVerb(Index: Integer); override;
|
||||
end;
|
||||
|
||||
procedure Register;
|
||||
|
||||
|
||||
@ -161,7 +168,7 @@ uses
|
||||
DbTables, { VCL - BDE runtime unit }
|
||||
VpWavPE, { Wav File Finder - Property Editor }
|
||||
{$ENDIF}
|
||||
VpMisc,
|
||||
VpSR, VpMisc,
|
||||
|
||||
{ Component Units }
|
||||
VpBase, { Base classes for Vp }
|
||||
@ -568,6 +575,37 @@ begin
|
||||
end;
|
||||
|
||||
|
||||
{ TVpBaseDialogComponentEditor }
|
||||
|
||||
procedure TVpBaseDialogComponentEditor.TestDialog;
|
||||
begin
|
||||
with Component as TVpBaseDialog do Execute;
|
||||
end;
|
||||
|
||||
function TVpBaseDialogComponentEditor.GetVerbCount: Integer;
|
||||
begin
|
||||
Result := 1;
|
||||
end;
|
||||
|
||||
function TVpBaseDialogComponentEditor.GetVerb(Index: integer): string;
|
||||
begin
|
||||
case Index of
|
||||
0: Result := RSTestDialog;
|
||||
else
|
||||
Result := inherited GetVerb(Index);
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TVpBaseDialogComponentEditor.ExecuteVerb(Index: Integer);
|
||||
begin
|
||||
case Index of
|
||||
0: TestDialog;
|
||||
else
|
||||
inherited ExecuteVerb(Index);
|
||||
end;
|
||||
end;
|
||||
|
||||
|
||||
{******************************************************************************}
|
||||
{ Component registration }
|
||||
{******************************************************************************}
|
||||
@ -580,6 +618,18 @@ begin
|
||||
RegisterComponentEditor(TVpNavBar, TVpNavBarEditor);
|
||||
RegisterComponentEditor(TVpControlLink, TVpPrtFmtPropertyEditor);
|
||||
RegisterComponentEditor(TVpFlexDataStore, TVpFlexDSEditor);
|
||||
RegisterComponentEditor(TVpPrintPreviewDialog, TVpBaseDialogComponentEditor);
|
||||
{ The next dialog is already handled by the TVpPrtFmtPropertyEditor:
|
||||
RegisterComponentEditor(TVpPrintFormatEditDialog, TVpBaseDialogComponentEditor);
|
||||
}
|
||||
{ The following dialogs have a different Execute method and require existing
|
||||
planner item data and, thus, are not useful at design-time:
|
||||
RegisterComponentEditor(TVpResourceEditDialog, TVpBaseDialogComponentEditor);
|
||||
RegisterComponentEditor(TVpEventEditDialog, TVpBaseDialogComponentEditor);
|
||||
RegisterComponentEditor(TVpContactEditDialog, TVpBaseDialogComponentEditor);
|
||||
RegisterComponentEditor(TVpTaskEditDialog, TVpBaseDialogComponentEditor);
|
||||
RegisterComponentEditor(TVpNotificationDialog, TVpBaseDialogComponentEditor);
|
||||
}
|
||||
|
||||
{----------------------------------------------------------------------------}
|
||||
{ register property editors }
|
||||
|
Reference in New Issue
Block a user