⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 mmvisreg.pas

📁 一套及时通讯的原码
💻 PAS
字号:
{========================================================================}
{=                (c) 1995-98 SwiftSoft Ronald Dittrich                 =}
{========================================================================}
{=                          All Rights Reserved                         =}
{========================================================================}
{=  D 01099 Dresden             = Fax.: +49(0)351-8037944               =}
{=  Loewenstr.7a                = info@swiftsoft.de                     =}
{========================================================================}
{=  Actual versions on http://www.swiftsoft.de/index.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: 08.01.99 - 15:19:15 $                                        =}
{========================================================================}
unit MMVisReg;

{$I COMPILER.INC}

Interface

uses
    Controls,
    Classes,

{$IFDEF DELPHI6}
    DesignIntf,
    DesignEditors
{$ELSE}
    DsgnIntf
{$ENDIF}
    ;
    
type
    {-- TMMSpectrumEditor -----------------------------------------------}
    TMMSpectrumEditor = class(TComponentEditor)
    public
       procedure ExecuteVerb(Index: Integer); override;
       function  GetVerb(Index: Integer): string; override;
       function  GetVerbCount: Integer; override;
    end;

Procedure Register;

Implementation

{$IFDEF WIN32}
   {$R MMVISUAL.D32}
{$ELSE}
   {$R MMVISUAL.D16}
{$ENDIF}

uses
    SysUtils,
    MMDesign,
    MMIde,
    MMConect,
    MMLevel
    {$IFNDEF LEVEL_ONLY}
    ,MMOscope,
    MMMeter,
    MMSpectr,
    MMSpGram,
    MMLight
    {$ENDIF}
    ;

{== TMMSpectrumEditor ===================================================}
procedure TMMSpectrumEditor.ExecuteVerb(Index: Integer);
var
   oWidth: integer;

begin
   with (Component as TMMSpectrum) do
   begin
      oWidth := Width;
      Width := GetOptimalWidth(oWidth);
      if (Width <> oWidth) and (Designer <> nil) then Designer.Modified;
   end;
end;

{-- TMMSpectrumEditor --------------------------------------------------------}
function TMMSpectrumEditor.GetVerb(Index: Integer): string;
begin
   Result := 'Adjust Width for BarDisplay...';
end;

{-- TMMSpectrumEditor --------------------------------------------------------}
function TMMSpectrumEditor.GetVerbCount: Integer;
begin
   Result := 1;
end;

{=========================================================================}
procedure Register;
begin
     RegisterComponents('MMVisual', [TMMConnector,
                                     TMMLevel
                                     {$IFNDEF LEVEL_ONLY}
                                     ,TMMOscope,
                                     TMMMeter,
                                     TMMLevelScale,
                                     TMMSpectrum,
                                     TMMSpectrogram,
                                     TMMLight
                                     {$ENDIF}
                                     ]);

     {$IFNDEF LEVEL_ONLY}
     RegisterComponentEditor(TMMSpectrum, TMMSpectrumEditor);
     {$ENDIF}
end;

initialization
    RegisterProperty(ptOutput,'DSP',TMMConnector,'Level1',TMMLevel,nil);
    RegisterProperty(ptOutput,'DSP',TMMConnector,'Level2',TMMLevel,nil);
    {$IFNDEF LEVEL_ONLY}
    RegisterProperty(ptOutput,'DSP',TMMConnector,'Meter1',TMMMeter,nil);
    RegisterProperty(ptOutput,'DSP',TMMConnector,'Meter2',TMMMeter,nil);
    RegisterProperty(ptOutput,'DSP',TMMConnector,'Oscope1',TMMOscope,nil);
    RegisterProperty(ptOutput,'DSP',TMMConnector,'Oscope2',TMMOscope,nil);
    RegisterProperty(ptOutput,'DSP',TMMConnector,'Light1',TMMLight,nil);
    RegisterProperty(ptOutput,'DSP',TMMConnector,'Light2',TMMLight,nil);
    RegisterProperty(ptOutput,'DSP',TMMConnector,'Spectrogram1',TMMSpectrogram,nil);
    RegisterProperty(ptOutput,'DSP',TMMConnector,'Spectrogram2',TMMSpectrogram,nil);
    RegisterProperty(ptOutput,'DSP',TMMConnector,'Spectrum1',TMMSpectrum,nil);
    RegisterProperty(ptOutput,'DSP',TMMConnector,'Spectrum2',TMMSpectrum,nil);
    RegisterProperty(ptOutput,'DSP',TMMConnector,'Spectrum3',TMMSpectrum,nil);
    RegisterProperty(ptOutput,'DSP',TMMConnector,'Spectrum4',TMMSpectrum,nil);
    {$ENDIF}
end.

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -