Initial GTK2 support

Started workaround to horizontal scrolling bug

git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@146 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
blikblum
2007-04-21 19:56:33 +00:00
parent 7d05065529
commit a7da3fa782
4 changed files with 1726 additions and 5 deletions

View File

@ -12567,7 +12567,8 @@ begin
else
begin
Brush.Color := Self.Color;
Logger.Send([lcPaintDetails],'Setting the color of a NOT selected node - Brush.Color',Brush.Color);
Logger.SendColor([lcPaintDetails],'Setting the color of a NOT selected node - Brush.Color',Brush.Color);
Logger.Send([lcPaintDetails],'Clearing rectangle (R)',R);
FillRect(R);
end;
end;
@ -20437,7 +20438,7 @@ end;
procedure TBaseVirtualTree.DrawDottedVLine(const PaintInfo: TVTPaintInfo; Top, Bottom, Left: Integer);
// Draws a horizontal line with alternating pixels (this style is not supported for pens under Win9x).
// Draws a vertical line with alternating pixels (this style is not supported for pens under Win9x).
var
R: TRect;
@ -22434,9 +22435,9 @@ begin
Logger.Send([lcPaintDetails],'FEffectiveOffsetX: %d, RTLOffset: %d, OffsetY: %d',[FEffectiveOffsetX,RTLOffset,FOffsetY]);
OffsetRect(Window, FEffectiveOffsetX - RTLOffset, -FOffsetY);
Logger.Active:=Logger.CalledBy('DoDragging');
//Logger.Active:=Logger.CalledBy('DoDragging');
PaintTree(Canvas, Window, Target, Options);
Logger.Active:=True;
//Logger.Active:=True;
end
else
begin
@ -27627,11 +27628,18 @@ begin
PaintInfo.PaintOptions := PaintOptions;
Logger.Watch([lcPaintDetails],'Brush.Color',PaintInfo.Canvas.Brush.Color);
// The node background can contain a single color, a bitmap or can be drawn by the application.
{$ifdef Windows}
ClearNodeBackground(PaintInfo, UseBackground, True, Rect(Window.Left, TargetRect.Top, Window.Right,
TargetRect.Bottom));
{$else}
ClearNodeBackground(PaintInfo, UseBackground, True, Rect(0, TargetRect.Top, Window.Right - Window.Left,
TargetRect.Bottom));
{$endif}
Logger.SendBitmap([lcPaintBitmap],'After Clear BackGround',NodeBitmap);
Logger.Watch([lcPaintDetails],'Brush.Color',PaintInfo.Canvas.Brush.Color);
// Prepare column, position and node clipping rectangle.
PaintInfo.CellRect := R;
Logger.Send([lcPaintDetails],'PaintInfo.CellRect',PaintInfo.CellRect);
if UseColumns then
InitializeFirstColumnValues(PaintInfo);
@ -27857,7 +27865,7 @@ begin
+' '+Logger.PointToStr(Target),TargetRect.Top < Target.Y);
// Put the constructed node image onto the target canvas.
with TargetRect, NodeBitmap do
BitBlt(TargetCanvas.Handle, Left, Top, Width, Height, Canvas.Handle, Window.Left, 0, SRCCOPY);
BitBlt(TargetCanvas.Handle, Left, Top, Width, Height, Canvas.Handle,{$ifdef Windows} Window.Left {$else} 0{$endif}, 0, SRCCOPY);
end;
end;

View File

@ -0,0 +1,34 @@
unit mmsystem;
{$mode objfpc}{$H+}
interface
uses
Classes, SysUtils, Types;
function timeBeginPeriod(x1: DWord): DWord;
function timeEndPeriod(x1: DWord): DWord;
function timeGetTime: DWORD;
implementation
function timeBeginPeriod(x1: DWord): DWord;
begin
end;
function timeEndPeriod(x1: DWord): DWord;
begin
end;
function timeGetTime: DWORD;
begin
end;
end.

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,56 @@
unit virtualpanningwindow;
{$mode objfpc}{$H+}
interface
uses
LCLType, Graphics, Classes, SysUtils;
type
{ TVirtualPanningWindow }
TVirtualPanningWindow = class
private
FHandle: THandle;
FOwnerHandle: THandle;
FImage: TBitmap;
procedure HandlePaintMessage;
public
procedure Start(OwnerHandle: THandle; const Position: TPoint);
procedure Stop;
procedure Show(ClipRegion: HRGN);
property Image: TBitmap read FImage;
property Handle: THandle read FHandle;
end;
implementation
uses
vtlogger;
{ TVirtualPanningWindow }
procedure TVirtualPanningWindow.HandlePaintMessage;
begin
end;
procedure TVirtualPanningWindow.Start(OwnerHandle: THandle; const Position: TPoint);
begin
FImage := TBitmap.Create;
end;
procedure TVirtualPanningWindow.Stop;
begin
FImage.Free;
FImage := nil;
end;
procedure TVirtualPanningWindow.Show(ClipRegion: HRGN);
begin
Logger.SendBitmap([lcPanning],'Panning Image',FImage);
end;
end.