Ignore:
Timestamp:
Apr 24, 2024, 11:19:11 AM (7 months ago)
Author:
chronos
Message:
  • Added: TButtonG class as a button class component referencing TGraphicSet item.
  • Modified: Code cleanup.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Packages/CevoComponents/GraphicSet.pas

    r471 r554  
    4343  { TGraphicSet }
    4444
    45   TGraphicSet = class
     45  TGraphicSet = class(TComponent)
     46  public
    4647    Name: string;
    4748    Data: TBitmap;
     
    5354    procedure LoadFromFile(FileName: string);
    5455    procedure SaveToFile(FileName: string);
    55     constructor Create;
     56    constructor Create(AOwner: TComponent); override;
    5657    destructor Destroy; override;
    5758  end;
     
    7172  GraphicSetFileExt = '.grs';
    7273
     74procedure Register;
     75
    7376
    7477implementation
     
    7780  SWrongFileFormat = 'Wrong file format.';
    7881  SGraphicItemNotFound = 'Graphic item %s not found in graphic set %s.';
     82
     83procedure Register;
     84begin
     85  RegisterComponents('C-evo', [TGraphicSet]);
     86end;
    7987
    8088{ TGraphicSetItem }
     
    227235end;
    228236
    229 constructor TGraphicSet.Create;
    230 begin
     237constructor TGraphicSet.Create(AOwner: TComponent);
     238begin
     239  inherited;
    231240  Data := TBitmap.Create;
    232241  Data.PixelFormat := TPixelFormat.pf24bit;
     
    259268function TGraphicSets.AddNew(Name: string): TGraphicSet;
    260269begin
    261   Result := TGraphicSet.Create;
     270  Result := TGraphicSet.Create(nil);
    262271  Result.Name := Name;
    263272  Add(Result);
Note: See TracChangeset for help on using the changeset viewer.