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/ButtonN.pas

    r290 r447  
    1010    constructor Create(aOwner: TComponent); override;
    1111  private
    12     FPossible, FLit: boolean;
     12    FPossible, FLit: Boolean;
    1313    FGraphic, FMask, FBackGraphic: TBitmap;
    14     FIndex, BackIndex: integer;
     14    FIndex, BackIndex: Integer;
    1515    FSmartHint: string;
    1616    ChangeProc: TNotifyEvent;
    17     procedure SetPossible(x: boolean);
    18     procedure SetLit(x: boolean);
    19     procedure SetIndex(x: integer);
    20     procedure SetSmartHint(x: string);
     17    procedure SetPossible(X: Boolean);
     18    procedure SetLit(X: Boolean);
     19    procedure SetIndex(X: Integer);
     20    procedure SetSmartHint(X: string);
    2121  published
    22     property Possible: boolean read FPossible write SetPossible;
    23     property Lit: boolean read FLit write SetLit;
     22    property Possible: Boolean read FPossible write SetPossible;
     23    property Lit: Boolean read FLit write SetLit;
    2424    property SmartHint: string read FSmartHint write SetSmartHint;
    2525    property Graphic: TBitmap read FGraphic write FGraphic;
    2626    property Mask: TBitmap read FMask write FMask;
    2727    property BackGraphic: TBitmap read FBackGraphic write FBackGraphic;
    28     property ButtonIndex: integer read FIndex write SetIndex;
     28    property ButtonIndex: Integer read FIndex write SetIndex;
    2929    property OnClick: TNotifyEvent read ChangeProc write ChangeProc;
    3030  protected
    3131    procedure Paint; override;
    3232    procedure MouseDown(Button: TMouseButton; Shift: TShiftState;
    33       x, y: integer); override;
     33      X, Y: Integer); override;
    3434  end;
    3535
     
    4646begin
    4747  inherited;
    48   ShowHint := true;
     48  ShowHint := True;
    4949  FGraphic := nil;
    5050  FBackGraphic := nil;
    51   FPossible := true;
    52   FLit := false;
     51  FPossible := True;
     52  FLit := False;
    5353  FIndex := -1;
    5454  ChangeProc := nil;
     
    6363    begin
    6464      BitBltCanvas(Canvas, 1, 1, 40, 40, FBackGraphic.Canvas,
    65         1 + 80 * BackIndex + 40 * byte(FPossible and FLit), 176);
     65        1 + 80 * BackIndex + 40 * Byte(FPossible and FLit), 176);
    6666      if FPossible then
    6767      begin
     
    8383
    8484procedure TButtonN.MouseDown(Button: TMouseButton; Shift: TShiftState;
    85   x, y: integer);
     85  X, Y: Integer);
    8686begin
    8787  if FPossible and (Button = mbLeft) and (@ChangeProc <> nil) then
     
    8989end;
    9090
    91 procedure TButtonN.SetPossible(x: boolean);
     91procedure TButtonN.SetPossible(X: Boolean);
    9292begin
    93   if x <> FPossible then
     93  if X <> FPossible then
    9494  begin
    95     FPossible := x;
    96     if x then
     95    FPossible := X;
     96    if X then
    9797      Hint := FSmartHint
    9898    else
     
    102102end;
    103103
    104 procedure TButtonN.SetLit(x: boolean);
     104procedure TButtonN.SetLit(X: Boolean);
    105105begin
    106   if x <> FLit then
     106  if X <> FLit then
    107107  begin
    108     FLit := x;
     108    FLit := X;
    109109    Invalidate;
    110110  end;
    111111end;
    112112
    113 procedure TButtonN.SetIndex(x: integer);
     113procedure TButtonN.SetIndex(X: Integer);
    114114begin
    115   if x <> FIndex then
     115  if X <> FIndex then
    116116  begin
    117     FIndex := x;
    118     if x < 6 then
     117    FIndex := X;
     118    if X < 6 then
    119119      BackIndex := 1
    120120    else
     
    124124end;
    125125
    126 procedure TButtonN.SetSmartHint(x: string);
     126procedure TButtonN.SetSmartHint(X: string);
    127127begin
    128   if x <> FSmartHint then
     128  if X <> FSmartHint then
    129129  begin
    130     FSmartHint := x;
     130    FSmartHint := X;
    131131    if FPossible then
    132       Hint := x;
     132      Hint := X;
    133133  end;
    134134end;
Note: See TracChangeset for help on using the changeset viewer.