Changeset 23 for branches/Xvcl/Drivers


Ignore:
Timestamp:
May 8, 2013, 1:52:33 PM (12 years ago)
Author:
chronos
Message:
  • Added: Support for mouse move handling. Now forms can be moved by dragging title bar.
  • Fixed: Clearing background during painting in screen and forms.
Location:
branches/Xvcl/Drivers
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/Xvcl/Drivers/Driver.MouseVCL.pas

    r20 r23  
    1313    procedure DoMouseUp(Sender: TObject; Button: TMouseButton;
    1414      Shift: TShiftState; X, Y: Integer);
     15    procedure DoMouseMove(Sender: TObject; Shift: TShiftState;
     16      X, Y: Integer);
    1517  public
    1618    Form: Vcl.Forms.TForm;
     
    2527begin
    2628  Kernel.Mouse.HandleDown(TPoint.Create(X, Y));
     29end;
     30
     31procedure TDriverMouseVCL.DoMouseMove(Sender: TObject; Shift: TShiftState; X,
     32  Y: Integer);
     33begin
     34  Kernel.Mouse.HandleMouseMove(TPoint.Create(X, Y));
    2735end;
    2836
     
    4553  TForm1(Form).Image1.OnMouseDown := DoMouseDown;
    4654  TForm1(Form).Image1.OnMouseUp := DoMouseUp;
     55  TForm1(Form).Image1.OnMouseMove := DoMouseMove;
    4756end;
    4857
  • branches/Xvcl/Drivers/Driver.VideoVCL.pas

    r22 r23  
    5656begin
    5757  case Color of
    58     clBlack: Result := Vcl.Graphics.clBlack;
    59     clWhite: Result := Vcl.Graphics.clWhite;
    60     clBlue: Result := Vcl.Graphics.clBlue;
    61     clGreen: Result := Vcl.Graphics.clGreen;
    62     clRed: Result := Vcl.Graphics.clRed;
    63     clSilver: Result := Vcl.Graphics.clSilver;
    64     clGray: Result := Vcl.Graphics.clGray;
    65     else Result := Vcl.Graphics.clBlack;
     58    clBlack: Result := $000000;
     59    clWhite: Result := $ffffff;
     60    clBlue: Result := $ff0000;
     61    clGreen: Result := $00ff00;
     62    clRed: Result := $0000ff;
     63    clSilver: Result := $c0c0c0;
     64    clGray: Result := $808080;
     65    clLightBlue: Result := $ff8080;
     66    clLightRed: Result := $80ff80;
     67    clLightGreen: Result := $8080ff;
     68    clBrown: Result := $a52a2a;
     69    clMagenta: Result := $ff00ff;
     70    clCyan: Result := $00ffff;
     71    clYellow: Result := $ffff00;
     72    else Result := $000000;
    6673  end;
    6774end;
Note: See TracChangeset for help on using the changeset viewer.