unit ButtonBase;

{ Replacement ButtonBase as original buttons       }
{ do not work in QT5                               }
{ Need to avoid using Bitblt SCRAND & SCRPAINT     }
{  PB Nov-20                                       }
{}


interface

uses
   Classes, Graphics, Buttons, LCLExceptionStackTrace;

type
   TButtonBase = class(TSpeedButton)
   protected
      FDown,
      FPermanent: boolean;
      FIndex: integer;
      FGraphic: TBitmap;
      DownChangedProc: TNotifyEvent;
    public
      constructor Create(aOwner: TComponent); override;
  published
      property Graphic: TBitmap read FGraphic write FGraphic;
      property Visible;
      property Down: boolean read FDown write FDown;
      property Permanent: boolean read FPermanent write FPermanent;
      property OnDownChanged: TNotifyEvent read DownChangedProc write DownChangedProc;
      property ButtonIndex: integer read FIndex write FIndex;
  end;


implementation

constructor TButtonBase.Create(aOwner: TComponent);
begin
   inherited;
   FGraphic    := nil;
   FDown       := false;
   FPermanent  := false;
   ShowHint    := True;
   Visible     := True;
   Findex      := -1;
end;

end.
