* Added directive to compile without lcl extensions package

git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@1241 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
blikblum
2010-06-30 18:52:28 +00:00
parent 0a7ffce366
commit ba542f1d1f
2 changed files with 35 additions and 7 deletions

View File

@ -31,6 +31,7 @@
{.$define EnableAccessible} {.$define EnableAccessible}
{$define ThemeSupport} {$define ThemeSupport}
{.$define DEBUG_VTV} {.$define DEBUG_VTV}
{$define USE_DELPHICOMPAT}
//under linux the performance is poor with threading enabled //under linux the performance is poor with threading enabled
{$ifdef Windows} {$ifdef Windows}

View File

@ -321,8 +321,10 @@ uses
{$endif} {$endif}
OleUtils, OleUtils,
LCLIntf, LCLIntf,
{$ifdef USE_DELPHICOMPAT}
DelphiCompat, DelphiCompat,
LclExt, LclExt,
{$endif}
virtualpanningwindow, virtualpanningwindow,
LCLVersion, LCLVersion,
VTGraphics, //alpha blend functions VTGraphics, //alpha blend functions
@ -5738,7 +5740,7 @@ begin
FBackImage.Canvas.Handle, 0, 0, SRCCOPY); FBackImage.Canvas.Handle, 0, 0, SRCCOPY);
if ForceRepaint then if ForceRepaint then
DelphiCompat.UpdateWindow(FOwner.Handle); UpdateWindow(FOwner.Handle);
Inc(FImagePosition.X, -DeltaX); Inc(FImagePosition.X, -DeltaX);
Inc(FImagePosition.Y, -DeltaY); Inc(FImagePosition.Y, -DeltaY);
@ -8696,9 +8698,16 @@ begin
begin begin
CheckImageListNeeded; CheckImageListNeeded;
ColImageIndex := GetCheckImage(nil, FCheckType, FCheckState, IsEnabled); ColImageIndex := GetCheckImage(nil, FCheckType, FCheckState, IsEnabled);
{$ifdef USE_DELPHICOMPAT}
with FCheckImages do with FCheckImages do
DirectMaskBlt(FHeaderBitmap.Canvas.Handle, GlyphPos.X, GlyphPos.Y, DirectMaskBlt(FHeaderBitmap.Canvas.Handle, GlyphPos.X, GlyphPos.Y,
Height, Height, Canvas.Handle, ColImageIndex * Height, 0, MaskHandle); Height, Height, Canvas.Handle, ColImageIndex * Height, 0, MaskHandle);
{$else}
with FCheckImages do
StretchMaskBlt(FHeaderBitmap.Canvas.Handle, GlyphPos.X, GlyphPos.Y,
Height, Height, Canvas.Handle, ColImageIndex * Height, 0,
Height, Height, MaskHandle, ColImageIndex * Height, 0, SRCCOPY);
{$endif}
end; end;
end; end;
@ -8726,9 +8735,13 @@ begin
if not (hpeSortGlyph in ActualElements) and ShowSortGlyph then if not (hpeSortGlyph in ActualElements) and ShowSortGlyph then
begin begin
SortIndex := SortGlyphs[FHeader.FSortDirection, tsUseThemes in FHeader.Treeview.FStates]; SortIndex := SortGlyphs[FHeader.FSortDirection, tsUseThemes in FHeader.Treeview.FStates];
{$ifdef USE_DELPHICOMPAT}
DirectMaskBlt(FHeaderBitmap.Canvas.Handle, SortGlyphPos.X, SortGlyphPos.Y, UtilityImageSize, UtilityImageSize, UtilityImages.Canvas.Handle, DirectMaskBlt(FHeaderBitmap.Canvas.Handle, SortGlyphPos.X, SortGlyphPos.Y, UtilityImageSize, UtilityImageSize, UtilityImages.Canvas.Handle,
SortIndex * UtilityImageSize, 0, UtilityImages.MaskHandle); SortIndex * UtilityImageSize, 0, UtilityImages.MaskHandle);
//UtilityImages.Draw(FHeaderBitmap.Canvas, SortGlyphPos.X, SortGlyphPos.X, SortIndex); {$else}
StretchMaskBlt(FHeaderBitmap.Canvas.Handle, SortGlyphPos.X, SortGlyphPos.Y, UtilityImageSize, UtilityImageSize, UtilityImages.Canvas.Handle,
SortIndex * UtilityImageSize, 0, UtilityImageSize, UtilityImageSize, UtilityImages.MaskHandle,SortIndex * UtilityImageSize, 0, SRCCOPY);
{$endif}
end; end;
// Show an indication if this column is the current drop target in a header drag operation. // Show an indication if this column is the current drop target in a header drag operation.
@ -8736,13 +8749,21 @@ begin
begin begin
Y := (PaintRectangle.Top + PaintRectangle.Bottom - UtilityImages.Height) div 2; Y := (PaintRectangle.Top + PaintRectangle.Bottom - UtilityImages.Height) div 2;
if DropMark = dmmLeft then if DropMark = dmmLeft then
{$ifdef USE_DELPHICOMPAT}
DirectMaskBlt(FHeaderBitmap.Canvas.Handle, PaintRectangle.Left, Y, UtilityImageSize, UtilityImageSize, UtilityImages.Canvas.Handle, DirectMaskBlt(FHeaderBitmap.Canvas.Handle, PaintRectangle.Left, Y, UtilityImageSize, UtilityImageSize, UtilityImages.Canvas.Handle,
0 * UtilityImageSize, 0, UtilityImages.MaskHandle) 0, 0, UtilityImages.MaskHandle)
//UtilityImages.Draw(FHeaderBitmap.Canvas, PaintRectangle.Left, Y, 0) {$else}
StretchMaskBlt(FHeaderBitmap.Canvas.Handle, PaintRectangle.Left, Y, UtilityImageSize, UtilityImageSize, UtilityImages.Canvas.Handle,
0, 0, UtilityImageSize, UtilityImageSize, UtilityImages.MaskHandle, 0, 0, SRCCOPY)
{$endif}
else else
DirectMaskBlt(FHeaderBitmap.Canvas.Handle, PaintRectangle.Right - 16, Y, UtilityImageSize, UtilityImageSize, UtilityImages.Canvas.Handle, {$ifdef USE_DELPHICOMPAT}
1 * UtilityImageSize, 0, UtilityImages.MaskHandle); DirectMaskBlt(FHeaderBitmap.Canvas.Handle, PaintRectangle.Right - 16, Y, UtilityImageSize, UtilityImageSize, UtilityImages.Canvas.Handle,
//UtilityImages.Draw(FHeaderBitmap.Canvas, PaintRectangle.Right - 16 , Y, 1); UtilityImageSize, 0, UtilityImages.MaskHandle);
{$else}
StretchMaskBlt(FHeaderBitmap.Canvas.Handle, PaintRectangle.Right - 16, Y, UtilityImageSize, UtilityImageSize, UtilityImages.Canvas.Handle,
UtilityImageSize, 0, UtilityImageSize, UtilityImageSize, UtilityImages.MaskHandle, UtilityImageSize, 0, SRCCOPY);
{$endif}
end; end;
if ActualElements <> [] then if ActualElements <> [] then
@ -16341,8 +16362,10 @@ begin
//todo: //todo:
//Windows.GetUpdateRect is always empty because BeginPaint was called //Windows.GetUpdateRect is always empty because BeginPaint was called
//see if PaintStruct has the same rect //see if PaintStruct has the same rect
{$ifdef USE_DELPHICOMPAT}
if tsVCLDragging in FStates then if tsVCLDragging in FStates then
ImageList_DragShowNolock(False); ImageList_DragShowNolock(False);
{$endif}
if csPaintCopy in ControlState then if csPaintCopy in ControlState then
FUpdateRect := ClientRect FUpdateRect := ClientRect
else else
@ -16352,8 +16375,10 @@ begin
inherited WMPaint(Message); inherited WMPaint(Message);
{$ifdef USE_DELPHICOMPAT}
if tsVCLDragging in FStates then if tsVCLDragging in FStates then
ImageList_DragShowNolock(True); ImageList_DragShowNolock(True);
{$endif}
{$ifdef DEBUG_VTV}Logger.ExitMethod([lcMessages],'WMPaint');{$endif} {$ifdef DEBUG_VTV}Logger.ExitMethod([lcMessages],'WMPaint');{$endif}
end; end;
@ -19077,8 +19102,10 @@ begin
if FUpdateCount = 0 then if FUpdateCount = 0 then
begin begin
// The drag image from VCL controls need special consideration. // The drag image from VCL controls need special consideration.
{$ifdef USE_DELPHICOMPAT}
if tsVCLDragging in FStates then if tsVCLDragging in FStates then
ImageList_DragShowNolock(False); ImageList_DragShowNolock(False);
{$endif}
if (suoScrollClientArea in Options) and not (tsToggling in FStates) then if (suoScrollClientArea in Options) and not (tsToggling in FStates) then
begin begin