(************************************************************************
*    This File is Part of the AHM Triton Tools                          *
*    for Borland Delphi and C++ Builder.                                *
*************************************************************************
* Copyright © 1995-1999 Alexander H. Mehlhorn (AHM) and Tritontools.com *
* All Rights reserved.                                                  *
*                                                                       *
*    For more Information contact us at                                 *
*    E-Mail : support@tritontools.com                                   *
*    URL : http://www.tritontools.com                                   *
*                                                                       *
*    AHM is copyright by Alexander H. Mehlhorn                          *
*    All Parts of this Collection were developed,                       *
*    designed and implemented by AHM                                    *
*                                                                       *
*    Under no Circumstances may you distribute this file                *
*    in this or any other format. This File is supplied                 *
*    as Evaluation of Source only. No Delphi Components may be developed*
*    using extracts or subsets of this code without expressed permission*
*    by AHM.                                                            *
*                                                                       *
*************************************************************************)
unit AHMEnhancedReg;

interface
{$I AHM.INC}
uses Classes,DesignIntf,
  Controls,
  AHMEnhanced,//remove in next version
  AHMEnhancedDsgn,
  AHMEnhancedConst,
  AHMEnhancedClass,
  AHMControls,
  AHMTBackground,
  AHMTSplashScreen,
  AHMTBPButtons,
  AHMTButton,
  AHMTDBLabel,
  AHMTDBNavigator,
  AHMTFileLabel3D,
  AHMTFillBackground,
  AHMTGauge,
  AHMTHeaderList,
  AHMTHint,
  AHMTIEButton,
  AHMTImageScroller,
  AHMTLabel,
  AHMTOfficeButton,
  AHMTPanel,
  AHMTPresentation,
  AHMTRoundButton,
  AHMTScreenCanvas,
  AHMTArrowButton, DesignEditors;
type TAHMAboutEnhancedComponent = class(TPropertyEditor)
     public
       procedure Edit; override;
       function GetValue: string; override;
       function GetAttributes: TPropertyAttributes; override;
     end;
     TAHMExecEnhancedProperty = class(TStringProperty)
     public
       Procedure Edit; override;
       function GetValue: string; override;
       Function GetAttributes: TPropertyAttributes; override;
     end;

procedure Register;
implementation

uses Forms,Dialogs,SysUtils;
{$R AHMEnhanced.res}

procedure Register;
const AHMEnhancedTab='AHM Enhanced';
      AHMDataAwareTab='AHM Data-Aware';
      AHMDialogsTab='AHM Dialogs';
begin
  registerclass(TAHMFont3D);
  registerclass(TAHMGradient);
  registerclass(TAHMTexture);
  registerclass(TAHMFrame);
  RegisterComponents(AHMEnhancedTab,[TAHMBackground,TAHMCheckbox,TAHMRadioButton,
                     TAHMLabel,TAHMButton,TAHMIEButton,TAHMOfficeButton,TAHMPanel,
                     TAHMGauge,TAHMPresentation,TAHMHint,TAHMFillBackground,
                     TAHMArrowButton,TAHMRoundButton,TAHMHeader,TAHMHeaderList,
                     TAHMImageScroller,TAHMScreenCanvas,TAHMFileLabel3D,TAHMFormSlide]);
  RegisterComponents(AHMDataAwareTab,[TAHMDBLabel,TAHMDBNavigator]);
  RegisterComponents(AHMDialogsTab,[TAHMSplashScreen]);
  RegisterPropertyEditor(Typeinfo(TStrings),TAHMGradient,'ColorsInBetween',TAHMColorInBetweenProperty);
  RegisterPropertyEditor(Typeinfo(String),TComponent,'Hint',TAHMHintProperty);
  RegisterPropertyEditor(Typeinfo(TCaption),TControl,'Caption',TAHMCaptionProperty);
  RegisterPropertyEditor(TypeInfo(TAHMSlides),TAHMPresentation,'Slides',TAHMSlidesProperty);
  RegisterPropertyEditor(TypeInfo(TAHMAboutEnhancedStr),TComponent,'About',TAHMAboutEnhancedComponent);
  RegisterPropertyEditor(Typeinfo(TAHMEnhancedExecStr),TAHMEnhancedExecComponent,'DesignExecute',TAHMExecEnhancedProperty);
end;


Procedure TAHMExecEnhancedProperty.Edit;
begin
  TAHMEnhancedExecComponent(GetComponent(0)).Execute;
end;


function TAHMExecEnhancedProperty.GetValue: string;
begin
  FmtStr(Result, '(%s)', ['Execute Test']);
end;


Function TAHMExecEnhancedProperty.GetAttributes: TPropertyAttributes;
begin
  Result := [paDialog, paReadonly];
end;

procedure TAHMAboutEnhancedComponent.Edit;
begin
  ShowEnhancedAbout;
end;

function TAHMAboutEnhancedComponent.GetValue: string;
begin
  FmtStr(Result, '(%s)', ['AHM Enhanced Components']);
end;

function TAHMAboutEnhancedComponent.GetAttributes: TPropertyAttributes;
begin
  Result := [paMultiSelect,paDialog,paReadOnly];
end;

end.
