Ignore:
Timestamp:
May 19, 2022, 10:39:34 PM (2 years ago)
Author:
chronos
Message:
  • Modified: Use first capital letter in identifiers.
File:
1 edited

Legend:

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

    r431 r447  
    1515    ClickProc: TNotifyEvent;
    1616    DownChangedProc: TNotifyEvent;
    17     procedure SetDown(x: boolean);
     17    procedure SetDown(X: Boolean);
    1818    // procedure PlayDownSound;
    1919    // procedure PlayUpSound;
    2020    procedure MouseDown(Button: TMouseButton; Shift: TShiftState;
    21       x, y: integer); override;
     21      X, Y: Integer); override;
    2222    procedure MouseUp(Button: TMouseButton; Shift: TShiftState;
    23       x, y: integer); override;
    24     procedure MouseMove(Shift: TShiftState; x, y: integer); override;
     23      X, Y: Integer); override;
     24    procedure MouseMove(Shift: TShiftState; X, Y: Integer); override;
    2525  private
    26     Active: boolean;
     26    Active: Boolean;
    2727  public
    2828    constructor Create(aOwner: TComponent); override;
     
    3232  published
    3333    property Visible;
    34     property Down: boolean read FDown write SetDown;
    35     property Permanent: boolean read FPermanent write FPermanent;
     34    property Down: Boolean read FDown write SetDown;
     35    property Permanent: Boolean read FPermanent write FPermanent;
    3636    property OnClick: TNotifyEvent read ClickProc write ClickProc;
    3737    property OnDownChanged: TNotifyEvent read DownChangedProc
     
    5050  // FUpSound:='';
    5151  FGraphic := nil;
    52   Active := false;
    53   FDown := false;
    54   FPermanent := false;
     52  Active := False;
     53  FDown := False;
     54  FPermanent := False;
    5555  ClickProc := nil;
    5656end;
    5757
    5858procedure TButtonBase.MouseDown(Button: TMouseButton; Shift: TShiftState;
    59   x, y: integer);
     59  X, Y: Integer);
    6060begin
    61   Active := true;
    62   MouseMove(Shift, x, y);
     61  Active := True;
     62  MouseMove(Shift, X, Y);
    6363end;
    6464
    6565procedure TButtonBase.MouseUp(Button: TMouseButton; Shift: TShiftState;
    66   x, y: integer);
     66  X, Y: Integer);
    6767begin
    6868  if ssLeft in Shift then
    69     exit;
    70   MouseMove(Shift, x, y);
     69    Exit;
     70  MouseMove(Shift, X, Y);
    7171  if Active and FDown then
    7272  begin
    7373    // PlayUpSound;
    74     Active := false;
     74    Active := False;
    7575    if FDown <> FPermanent then
    7676    begin
     
    8686  begin
    8787    // if FDown then PlayUpSound;
    88     Active := false;
     88    Active := False;
    8989    if FDown then
    9090    begin
    91       FDown := false;
     91      FDown := False;
    9292      Invalidate;
    9393      if @DownChangedProc <> nil then
     
    9797end;
    9898
    99 procedure TButtonBase.MouseMove(Shift: TShiftState; x, y: integer);
     99procedure TButtonBase.MouseMove(Shift: TShiftState; X, Y: Integer);
    100100begin
    101101  if Active then
    102     if (x >= 0) and (x < Width) and (y >= 0) and (y < Height) then
     102    if (X >= 0) and (X < Width) and (Y >= 0) and (Y < Height) then
    103103      if (ssLeft in Shift) and not FDown then
    104104      begin
    105105        { PlayDownSound; }
    106         FDown := true;
     106        FDown := True;
    107107        Paint;
    108108        if @DownChangedProc <> nil then
     
    113113    begin
    114114      { PlayUpSound; }
    115       FDown := false;
     115      FDown := False;
    116116      Paint;
    117117      if @DownChangedProc <> nil then
     
    120120end;
    121121
    122 procedure TButtonBase.SetDown(x: boolean);
     122procedure TButtonBase.SetDown(X: Boolean);
    123123begin
    124   FDown := x;
     124  FDown := X;
    125125  Invalidate;
    126126end;
Note: See TracChangeset for help on using the changeset viewer.