1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71
|
unit SynUniReg;
(*
Tom Lisjac <vlx@users.sourceforge.net> http://theseus.sf.net
Initially adapted for use with Lazarus and FPC - 2003-06-12
Changes can be found by searching for: ////TL
Issues that need review are flagged with one or more ! suffixes after TL
*)
interface
{$I SynEdit.inc}
uses
////TL DsgnIntf,
componenteditors, ////TL added
Classes,
SynUniHighlighter,
SynUniDesigner;
type
////TL! TDefaultEditor doesn't appear to exist... changed to TDefaultComponentEditor
////TL! TSynUniEditor = class(TDefaultEditor)
TSynUniEditor = class(TDefaultComponentEditor)
procedure Edit; override;
procedure ExecuteVerb(Index: Integer); override;
function GetVerb(Index: Integer): string; override;
function GetVerbCount: Integer; override;
end;
procedure Register;
implementation
procedure Register;
begin
// ToDo: port the component editor to lazarus and register it
//RegisterComponentEditor(TSynUniSyn, TSynUniEditor);
end;
{ TSynUniEditor }
procedure TSynUniEditor.Edit;
begin
////TL explicitly passed null string to the formerly optional parm
TSynUniDesigner.EditHighlighter(Component as TSynUniSyn, '' );
end;
procedure TSynUniEditor.ExecuteVerb(Index: Integer);
begin
Edit;
end;
////TL FPC wants resources defined globally... moved from the function below
resourcestring
sEditUni = 'Edit ...';
function TSynUniEditor.GetVerb(Index: Integer): string;
////TL resourcestring
////TL sEditUni = 'Edit ...';
begin
Result := sEditUni;
end;
function TSynUniEditor.GetVerbCount: Integer;
begin
Result := 1;
end;
end.
|