MMFltPrp.pas
上传用户:hylc_2004
上传日期:2014-01-23
资源大小:46800k
文件大小:6k
- {========================================================================}
- {= (c) 1995-98 SwiftSoft Ronald Dittrich =}
- {========================================================================}
- {= All Rights Reserved =}
- {========================================================================}
- {= D 01099 Dresden = Tel.: +0351-8012255 =}
- {= Loewenstr.7a = info@swiftsoft.de =}
- {========================================================================}
- {= Actual versions on http://www.swiftsoft.de/mmtools.html =}
- {========================================================================}
- {= This code is for reference purposes only and may not be copied or =}
- {= distributed in any format electronic or otherwise except one copy =}
- {= for backup purposes. =}
- {= =}
- {= No Delphi Component Kit or Component individually or in a collection=}
- {= subclassed or otherwise from the code in this unit, or associated =}
- {= .pas, .dfm, .dcu, .asm or .obj files may be sold or distributed =}
- {= without express permission from SwiftSoft. =}
- {= =}
- {= For more licence informations please refer to the associated =}
- {= HelpFile. =}
- {========================================================================}
- {= $Date: 20.01.1998 - 18:00:00 $ =}
- {========================================================================}
- unit MMFltPrp;
- {$I COMPILER.INC}
- interface
- uses
- {$IFDEF WIN32}
- Windows,
- {$ELSE}
- WinTypes,
- WinProcs,
- {$ENDIF}
- {$IFDEF DELPHI6}
- DesignIntf,
- DesignEditors,
- {$ELSE}
- DsgnIntf,
- {$ENDIF}
- SysUtils,
- Messages,
- Consts,
- Classes,
- Dialogs,
- StdCtrls,
- Controls,
- MMEQ,
- MMEQDlg,
- MMFIR,
- MMFIRDlg;
- type
- {-- TMMEQFilterProperty -----------------------------------------------------}
- TMMEQFilterProperty = class(TClassProperty)
- public
- procedure Edit; override;
- function GetAttributes: TPropertyAttributes; override;
- end;
- {-- TMMEQEditor -------------------------------------------------------------}
- TMMEQEditor = class(TComponentEditor)
- public
- procedure ExecuteVerb(Index: Integer); override;
- function GetVerb(Index: Integer): string; override;
- function GetVerbCount: Integer; override;
- end;
- {-- TMMFIRFilterProperty ----------------------------------------------------}
- TMMFIRFilterProperty = class(TClassProperty)
- public
- procedure Edit; override;
- function GetAttributes: TPropertyAttributes; override;
- end;
- {-- TMMFIREditor ------------------------------------------------------------}
- TMMFIREditor = class(TComponentEditor)
- public
- procedure ExecuteVerb(Index: Integer); override;
- function GetVerb(Index: Integer): string; override;
- function GetVerbCount: Integer; override;
- end;
- implementation
- {== TMMEQFilterProperty =======================================================}
- function TMMEQFilterProperty.GetAttributes: TPropertyAttributes;
- begin
- Result := [paDialog];
- end;
- {-- TMMEQFilterProperty -------------------------------------------------------}
- procedure TMMEQFilterProperty.Edit;
- begin
- with TMMEqualizerDialog.Create(nil) do
- try
- //Preview := False;
- Source := (GetComponent(0) as TMMEqualizer);
- if Execute and (Designer <> nil) then Designer.Modified;
- finally
- Free;
- end;
- end;
- {== TMMEQEditor ===============================================================}
- procedure TMMEQEditor.ExecuteVerb(Index: Integer);
- begin
- with TMMEqualizerDialog.Create(nil) do
- try
- //Preview := False;
- Source := (Component as TMMEqualizer);
- if Execute and (Designer <> nil) then Designer.Modified;
- finally
- Free;
- end;
- end;
- {-- TMMEQEditor ---------------------------------------------------------------}
- function TMMEQEditor.GetVerb(Index: Integer): string;
- begin
- Result := 'Equalizer Editor...';
- end;
- {-- TMMEQEditor ---------------------------------------------------------------}
- function TMMEQEditor.GetVerbCount: Integer;
- begin
- Result := 1;
- end;
- {== TMMFIRFilterProperty ======================================================}
- function TMMFIRFilterProperty.GetAttributes: TPropertyAttributes;
- begin
- Result := [paDialog];
- end;
- {-- TMMFIRFilterProperty ------------------------------------------------------}
- procedure TMMFIRFilterProperty.Edit;
- begin
- with TMMFIRFilterDialog.Create(nil) do
- try
- //Preview := False;
- Source := (GetComponent(0) as TMMFIRFilter);
- if Execute and (Designer <> nil) then Designer.Modified;
- finally
- Free;
- end;
- end;
- {== TMMFIREditor ==============================================================}
- procedure TMMFIREditor.ExecuteVerb(Index: Integer);
- begin
- with TMMFIRFilterDialog.Create(nil) do
- try
- //Preview := False;
- Source := (Component as TMMFIRFilter);
- if Execute and (Designer <> nil) then Designer.Modified;
- finally
- Free;
- end;
- end;
- {-- TMMFIREditor --------------------------------------------------------------}
- function TMMFIREditor.GetVerb(Index: Integer): string;
- begin
- Result := 'FIR-Filter Editor...';
- end;
- {-- TMMFIREditor --------------------------------------------------------------}
- function TMMFIREditor.GetVerbCount: Integer;
- begin
- Result := 1;
- end;
- end.