Changeset 20 for branches/Xvcl/Drivers


Ignore:
Timestamp:
May 6, 2013, 12:16:30 AM (12 years ago)
Author:
chronos
Message:
  • Modified: Improved messages passing to controls.
  • Modified: Now TButton change background color during mouse click.
Location:
branches/Xvcl
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • branches/Xvcl

    • Property svn:ignore
      •  

        old new  
        22*.local
        33Win32
         4__history
  • branches/Xvcl/Drivers

    • Property svn:ignore set to
      __history
  • branches/Xvcl/Drivers/Driver.MouseVCL.pas

    r19 r20  
    2424  Shift: TShiftState; X, Y: Integer);
    2525begin
    26   Kernel.Mouse.HandleClick(TPoint.Create(X, Y));
     26  Kernel.Mouse.HandleDown(TPoint.Create(X, Y));
    2727end;
    2828
     
    3030  Shift: TShiftState; X, Y: Integer);
    3131begin
    32 
     32  Kernel.Mouse.HandleUp(TPoint.Create(X, Y));
    3333end;
    3434
  • branches/Xvcl/Drivers/Driver.VideoVCL.pas

    r19 r20  
    44
    55uses
    6   Vcl.Forms, Vcl.Graphics, UFormMain, Xvcl.Classes, Xvcl.Kernel, Xvcl.Graphics;
     6  Vcl.Forms, Vcl.Graphics, System.Types, UFormMain, Xvcl.Classes, Xvcl.Kernel,
     7  Xvcl.Graphics;
    78
    89type
     
    1617    CanvasVCL: Vcl.Graphics.TCanvas;
    1718    function ColorToVCL(Color: TColor): Vcl.Graphics.TColor;
     19    procedure FillRect(Rect: TRectangle; Color: TColor); override;
    1820    procedure Line(Pos1, Pos2: TPoint; Color: TColor); override;
    1921    procedure TextOut(Position: TPoint; Text: string); override;
     
    6264end;
    6365
     66procedure TVideoDeviceVCL.FillRect(Rect: TRectangle; Color: TColor);
     67begin
     68  inherited;
     69  CanvasVCL.Brush.Color := ColorToVCL(Color);
     70  CanvasVCL.FillRect(System.Types.Rect(Rect.Left, Rect.Top, Rect.Right, Rect.Bottom));
     71end;
     72
    6473function TVideoDeviceVCL.GetTextSize(Text: string): TPoint;
    6574begin
     
    7685procedure TVideoDeviceVCL.TextOut(Position: TPoint; Text: string);
    7786begin
     87  CanvasVCL.Brush.Color := clNone;
    7888  CanvasVCL.TextOut(Position.X, Position.Y, Text);
    7989end;
Note: See TracChangeset for help on using the changeset viewer.