You've already forked lazarus-ccr
* Renamed TScrollBarStyle to TVTScrollBarStyle
* Fix compilation with fpc222rc1 under win32 * Move the call to SetMapMode to the places where the buffer bitmap is resized git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@507 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
@ -326,7 +326,7 @@ type
|
|||||||
);
|
);
|
||||||
TVirtualNodeInitStates = set of TVirtualNodeInitState;
|
TVirtualNodeInitStates = set of TVirtualNodeInitState;
|
||||||
|
|
||||||
TScrollBarStyle = (
|
TVTScrollBarStyle = (
|
||||||
sbmRegular,
|
sbmRegular,
|
||||||
sbmFlat,
|
sbmFlat,
|
||||||
sbm3D
|
sbm3D
|
||||||
@ -711,7 +711,7 @@ type
|
|||||||
constructor Create(Tree: TBaseVirtualTree; AFormatEtcArray: TFormatEtcArray);
|
constructor Create(Tree: TBaseVirtualTree; AFormatEtcArray: TFormatEtcArray);
|
||||||
|
|
||||||
function Clone(out Enum: IEnumFormatEtc): HResult; stdcall;
|
function Clone(out Enum: IEnumFormatEtc): HResult; stdcall;
|
||||||
function Next(celt: LongWord; out elt: FormatEtc; out pceltFetched: LongWord): HResult; stdcall;
|
function Next(celt: LongWord; out elt: FormatEtc;pceltFetched:pULong=nil): HResult; stdcall;
|
||||||
function Reset: HResult; stdcall;
|
function Reset: HResult; stdcall;
|
||||||
function Skip(celt: LongWord): HResult; stdcall;
|
function Skip(celt: LongWord): HResult; stdcall;
|
||||||
end;
|
end;
|
||||||
@ -787,9 +787,9 @@ type
|
|||||||
function DAdvise(const FormatEtc: TFormatEtc; advf: DWord; const advSink: IAdviseSink; out dwConnection: DWord):
|
function DAdvise(const FormatEtc: TFormatEtc; advf: DWord; const advSink: IAdviseSink; out dwConnection: DWord):
|
||||||
HResult; virtual; stdcall;
|
HResult; virtual; stdcall;
|
||||||
function DUnadvise(dwConnection: DWord): HResult; virtual; stdcall;
|
function DUnadvise(dwConnection: DWord): HResult; virtual; stdcall;
|
||||||
Function EnumDAvise(Out enumAdvise : IEnumStatData):HResult;virtual;StdCall;
|
Function EnumDAdvise(out enumAdvise : IEnumStatData):HResult;virtual;StdCall;
|
||||||
function EnumFormatEtc(Direction: DWord; out EnumFormatEtc: IEnumFormatEtc): HResult; virtual; stdcall;
|
function EnumFormatEtc(Direction: DWord; out EnumFormatEtc: IEnumFormatEtc): HResult; virtual; stdcall;
|
||||||
Function GetCanonicalFormatTEtc(const pformatetcIn : FORMATETC;Out pformatetcOut : FORMATETC):HResult; virtual; STDCALl;
|
function GetCanonicalFormatEtc(const pformatetcIn : FORMATETC;Out pformatetcOut : FORMATETC):HResult; virtual; STDCALl;
|
||||||
function GetData(const FormatEtcIn: TFormatEtc; out Medium: TStgMedium): HResult; virtual; stdcall;
|
function GetData(const FormatEtcIn: TFormatEtc; out Medium: TStgMedium): HResult; virtual; stdcall;
|
||||||
function GetDataHere(const FormatEtc: TFormatEtc; out Medium: TStgMedium): HResult; virtual; stdcall;
|
function GetDataHere(const FormatEtc: TFormatEtc; out Medium: TStgMedium): HResult; virtual; stdcall;
|
||||||
function QueryGetData(const FormatEtc: TFormatEtc): HResult; virtual; stdcall;
|
function QueryGetData(const FormatEtc: TFormatEtc): HResult; virtual; stdcall;
|
||||||
@ -1450,12 +1450,12 @@ type
|
|||||||
FAlwaysVisible: Boolean;
|
FAlwaysVisible: Boolean;
|
||||||
FOwner: TBaseVirtualTree;
|
FOwner: TBaseVirtualTree;
|
||||||
FScrollBars: TScrollStyle; // used to hide or show vertical and/or horizontal scrollbar
|
FScrollBars: TScrollStyle; // used to hide or show vertical and/or horizontal scrollbar
|
||||||
FScrollBarStyle: TScrollBarStyle; // kind of scrollbars to use
|
FScrollBarStyle: TVTScrollBarStyle; // kind of scrollbars to use
|
||||||
FIncrementX,
|
FIncrementX,
|
||||||
FIncrementY: TVTScrollIncrement; // number of pixels to scroll in one step (when auto scrolling)
|
FIncrementY: TVTScrollIncrement; // number of pixels to scroll in one step (when auto scrolling)
|
||||||
procedure SetAlwaysVisible(Value: Boolean);
|
procedure SetAlwaysVisible(Value: Boolean);
|
||||||
procedure SetScrollBars(Value: TScrollStyle);
|
procedure SetScrollBars(Value: TScrollStyle);
|
||||||
procedure SetScrollBarStyle(Value: TScrollBarStyle);
|
procedure SetScrollBarStyle(Value: TVTScrollBarStyle);
|
||||||
protected
|
protected
|
||||||
function GetOwner: TPersistent; override;
|
function GetOwner: TPersistent; override;
|
||||||
public
|
public
|
||||||
@ -1466,7 +1466,7 @@ type
|
|||||||
property AlwaysVisible: Boolean read FAlwaysVisible write SetAlwaysVisible default False;
|
property AlwaysVisible: Boolean read FAlwaysVisible write SetAlwaysVisible default False;
|
||||||
property HorizontalIncrement: TVTScrollIncrement read FIncrementX write FIncrementX default 20;
|
property HorizontalIncrement: TVTScrollIncrement read FIncrementX write FIncrementX default 20;
|
||||||
property ScrollBars: TScrollStyle read FScrollbars write SetScrollBars default ssBoth;
|
property ScrollBars: TScrollStyle read FScrollbars write SetScrollBars default ssBoth;
|
||||||
property ScrollBarStyle: TScrollBarStyle read FScrollBarStyle write SetScrollBarStyle default sbmRegular;
|
property ScrollBarStyle: TVTScrollBarStyle read FScrollBarStyle write SetScrollBarStyle default sbmRegular;
|
||||||
property VerticalIncrement: TVTScrollIncrement read FIncrementY write FIncrementY default 20;
|
property VerticalIncrement: TVTScrollIncrement read FIncrementY write FIncrementY default 20;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
@ -10462,7 +10462,7 @@ end;
|
|||||||
|
|
||||||
//----------------------------------------------------------------------------------------------------------------------
|
//----------------------------------------------------------------------------------------------------------------------
|
||||||
|
|
||||||
procedure TScrollBarOptions.SetScrollBarStyle(Value: TScrollBarStyle);
|
procedure TScrollBarOptions.SetScrollBarStyle(Value: TVTScrollBarStyle);
|
||||||
|
|
||||||
begin
|
begin
|
||||||
{$ifndef UseFlatScrollbars}
|
{$ifndef UseFlatScrollbars}
|
||||||
@ -19073,7 +19073,7 @@ begin
|
|||||||
if Failed(Result) then
|
if Failed(Result) then
|
||||||
Abort;
|
Abort;
|
||||||
// create a list of available formats
|
// create a list of available formats
|
||||||
while EnumFormat.Next(1, OLEFormat, Fetched) = S_OK do
|
while EnumFormat.Next(1, OLEFormat, @Fetched) = S_OK do
|
||||||
begin
|
begin
|
||||||
SetLength(Formats, Length(Formats) + 1);
|
SetLength(Formats, Length(Formats) + 1);
|
||||||
Formats[High(Formats)] := OLEFormat.cfFormat;
|
Formats[High(Formats)] := OLEFormat.cfFormat;
|
||||||
@ -21552,9 +21552,6 @@ end;
|
|||||||
|
|
||||||
procedure TBaseVirtualTree.PaintImage(var PaintInfo: TVTPaintInfo; ImageInfoIndex: TVTImageInfoIndex; DoOverlay: Boolean);
|
procedure TBaseVirtualTree.PaintImage(var PaintInfo: TVTPaintInfo; ImageInfoIndex: TVTImageInfoIndex; DoOverlay: Boolean);
|
||||||
|
|
||||||
const
|
|
||||||
Style: array[TImageType] of Cardinal = (0, ILD_MASK);
|
|
||||||
|
|
||||||
var
|
var
|
||||||
CutNode: Boolean;
|
CutNode: Boolean;
|
||||||
PaintFocused: Boolean;
|
PaintFocused: Boolean;
|
||||||
@ -26655,9 +26652,6 @@ begin
|
|||||||
// that the tree is fully displayed on screen.
|
// that the tree is fully displayed on screen.
|
||||||
R := Rect(0, 0, Max(FRangeX, ClientWidth), 0);
|
R := Rect(0, 0, Max(FRangeX, ClientWidth), 0);
|
||||||
NodeBitmap.Width := Window.Right - Window.Left;
|
NodeBitmap.Width := Window.Right - Window.Left;
|
||||||
Logger.Send([lcPaintDetails],'NodeBitmap.Width',NodeBitmap.Width);
|
|
||||||
// Make sure the buffer bitmap and target bitmap use the same transformation mode.
|
|
||||||
SetMapMode(NodeBitmap.Canvas.Handle, GetMapMode(TargetCanvas.Handle));
|
|
||||||
|
|
||||||
// For quick checks some intermediate variables are used.
|
// For quick checks some intermediate variables are used.
|
||||||
UseBackground := (toShowBackground in FOptions.FPaintOptions) and (FBackground.Graphic is TBitmap) and
|
UseBackground := (toShowBackground in FOptions.FPaintOptions) and (FBackground.Graphic is TBitmap) and
|
||||||
@ -26681,6 +26675,7 @@ begin
|
|||||||
if PaintInfo.Node = nil then
|
if PaintInfo.Node = nil then
|
||||||
BaseOffset := Window.Top;
|
BaseOffset := Window.Top;
|
||||||
Logger.Send([lcPaint, lcHeaderOffset],'BaseOffset',BaseOffset);
|
Logger.Send([lcPaint, lcHeaderOffset],'BaseOffset',BaseOffset);
|
||||||
|
|
||||||
// Transform selection rectangle into node bitmap coordinates.
|
// Transform selection rectangle into node bitmap coordinates.
|
||||||
if DrawSelectionRect then
|
if DrawSelectionRect then
|
||||||
OffsetRect(SelectionRect, 0, -BaseOffset);
|
OffsetRect(SelectionRect, 0, -BaseOffset);
|
||||||
@ -26742,9 +26737,9 @@ begin
|
|||||||
if Height <> PaintInfo.Node.NodeHeight then
|
if Height <> PaintInfo.Node.NodeHeight then
|
||||||
begin
|
begin
|
||||||
Logger.Send([lcPaintDetails],'Setting the Node Height');
|
Logger.Send([lcPaintDetails],'Setting the Node Height');
|
||||||
// Avoid that the VCL copies the bitmap while changing its height.
|
|
||||||
Height := 0;
|
|
||||||
Height := PaintInfo.Node.NodeHeight;
|
Height := PaintInfo.Node.NodeHeight;
|
||||||
|
// Make sure the buffer bitmap and target bitmap use the same transformation mode.
|
||||||
|
SetMapMode(Canvas.Handle, GetMapMode(TargetCanvas.Handle));
|
||||||
//Workaround to LCL bug 8626
|
//Workaround to LCL bug 8626
|
||||||
SetWindowOrgEx(Canvas.Handle, {$ifdef Gtk}-{$endif}Window.Left, 0, nil);
|
SetWindowOrgEx(Canvas.Handle, {$ifdef Gtk}-{$endif}Window.Left, 0, nil);
|
||||||
R.Bottom := PaintInfo.Node.NodeHeight;
|
R.Bottom := PaintInfo.Node.NodeHeight;
|
||||||
@ -27096,6 +27091,8 @@ begin
|
|||||||
NodeBitmap.PixelFormat := pf32Bit;
|
NodeBitmap.PixelFormat := pf32Bit;
|
||||||
NodeBitmap.Width := TargetRect.Right - TargetRect.Left;
|
NodeBitmap.Width := TargetRect.Right - TargetRect.Left;
|
||||||
NodeBitmap.Height := TargetRect.Bottom - TargetRect.Top;
|
NodeBitmap.Height := TargetRect.Bottom - TargetRect.Top;
|
||||||
|
// Make sure the buffer bitmap and target bitmap use the same transformation mode.
|
||||||
|
SetMapMode(NodeBitmap.Canvas.Handle, GetMapMode(TargetCanvas.Handle));
|
||||||
Logger.Send([lcPaintDetails],'NodeBitmap.Handle after changing height to background',NodeBitmap.Handle);
|
Logger.Send([lcPaintDetails],'NodeBitmap.Handle after changing height to background',NodeBitmap.Handle);
|
||||||
Logger.Send([lcPaintDetails],'TargetRect',TargetRect);
|
Logger.Send([lcPaintDetails],'TargetRect',TargetRect);
|
||||||
Logger.Send([lcPaintDetails],'NodeBitmap Width: %d Height: %d',[NodeBitmap.Width,NodeBitmap.Height]);
|
Logger.Send([lcPaintDetails],'NodeBitmap Width: %d Height: %d',[NodeBitmap.Width,NodeBitmap.Height]);
|
||||||
|
@ -43,8 +43,7 @@ end;
|
|||||||
|
|
||||||
//----------------------------------------------------------------------------------------------------------------------
|
//----------------------------------------------------------------------------------------------------------------------
|
||||||
|
|
||||||
function TEnumFormatEtc.Next(celt: LongWord; out elt: FormatEtc; out pceltFetched: LongWord): HResult;
|
function TEnumFormatEtc.Next(celt: LongWord; out elt: FormatEtc; pceltFetched:pULong=nil): HResult;
|
||||||
|
|
||||||
var
|
var
|
||||||
CopyCount: LongWord;
|
CopyCount: LongWord;
|
||||||
|
|
||||||
@ -62,8 +61,8 @@ begin
|
|||||||
//todo_lcl_check Delphi treats pceltFetched an PInteger. Implemented like in fpc.activex. What heappens with
|
//todo_lcl_check Delphi treats pceltFetched an PInteger. Implemented like in fpc.activex. What heappens with
|
||||||
// a C Program call with a NULL in pCeltFetcjed??
|
// a C Program call with a NULL in pCeltFetcjed??
|
||||||
//Answer: Yes. Is necessary a check here
|
//Answer: Yes. Is necessary a check here
|
||||||
if @pceltFetched <> nil then
|
if pceltFetched <> nil then
|
||||||
pceltFetched := CopyCount;
|
pceltFetched^ := CopyCount;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
//----------------------------------------------------------------------------------------------------------------------
|
//----------------------------------------------------------------------------------------------------------------------
|
||||||
@ -348,7 +347,7 @@ end;
|
|||||||
|
|
||||||
//----------------------------------------------------------------------------------------------------------------------
|
//----------------------------------------------------------------------------------------------------------------------
|
||||||
|
|
||||||
function TVTDataObject.EnumDAvise(Out enumAdvise : IEnumStatData):HResult;
|
function TVTDataObject.EnumDAdvise(Out enumAdvise : IEnumStatData):HResult;
|
||||||
|
|
||||||
begin
|
begin
|
||||||
if FAdviseHolder = nil then
|
if FAdviseHolder = nil then
|
||||||
@ -380,7 +379,7 @@ end;
|
|||||||
|
|
||||||
//----------------------------------------------------------------------------------------------------------------------
|
//----------------------------------------------------------------------------------------------------------------------
|
||||||
|
|
||||||
Function TVTDataObject.GetCanonicalFormatTEtc(const pformatetcIn : FORMATETC;Out pformatetcOut : FORMATETC):HResult;
|
Function TVTDataObject.GetCanonicalFormatEtc(const pformatetcIn : FORMATETC;Out pformatetcOut : FORMATETC):HResult;
|
||||||
|
|
||||||
begin
|
begin
|
||||||
Result := DATA_S_SAMEFORMATETC;
|
Result := DATA_S_SAMEFORMATETC;
|
||||||
|
@ -159,7 +159,7 @@ type
|
|||||||
|
|
||||||
IEnumSTATDATA = Interface (IUnknown)
|
IEnumSTATDATA = Interface (IUnknown)
|
||||||
['{00000105-0000-0000-C000-000000000046}']
|
['{00000105-0000-0000-C000-000000000046}']
|
||||||
Function Next(Celt:ULong;Out Rgelt:statdata;Out pceltFetched:ULong):HResult; StdCall;
|
Function Next (Celt:ULong;Out xcelt;pceltfetched : PUlong):HResult; StdCall;
|
||||||
// Function RemoteNext(Celt:ULong;Out Rgelt:statdata;Out pceltFetched:ULong):HResult; StdCall;
|
// Function RemoteNext(Celt:ULong;Out Rgelt:statdata;Out pceltFetched:ULong):HResult; StdCall;
|
||||||
Function Skip(Celt:ULong):HResult;StdCall;
|
Function Skip(Celt:ULong):HResult;StdCall;
|
||||||
Function Reset:HResult;StdCall;
|
Function Reset:HResult;StdCall;
|
||||||
@ -168,7 +168,7 @@ type
|
|||||||
|
|
||||||
IEnumFORMATETC = Interface (IUnknown)
|
IEnumFORMATETC = Interface (IUnknown)
|
||||||
['{00000103-0000-0000-C000-000000000046}']
|
['{00000103-0000-0000-C000-000000000046}']
|
||||||
Function Next(Celt:ULong;Out Rgelt:FormatEtc;Out pceltFetched:ULong):HResult; StdCall;
|
Function Next(Celt:ULong;Out Rgelt:FormatEtc;pceltFetched:pULong=nil):HResult; StdCall;
|
||||||
// Function RemoteNext(Celt:ULong;Out Rgelt:FormatEtc;Out pceltFetched:ULong):HResult; StdCall;
|
// Function RemoteNext(Celt:ULong;Out Rgelt:FormatEtc;Out pceltFetched:ULong):HResult; StdCall;
|
||||||
Function Skip(Celt:ULong):HResult;StdCall;
|
Function Skip(Celt:ULong):HResult;StdCall;
|
||||||
Function Reset:HResult;StdCall;
|
Function Reset:HResult;StdCall;
|
||||||
@ -260,12 +260,12 @@ type
|
|||||||
Function GetData(Const formatetcIn : FORMATETC;Out medium : STGMEDIUM):HRESULT; STDCALL;
|
Function GetData(Const formatetcIn : FORMATETC;Out medium : STGMEDIUM):HRESULT; STDCALL;
|
||||||
Function GetDataHere(CONST pformatetc : FormatETC; Out medium : STGMEDIUM):HRESULT; STDCALL;
|
Function GetDataHere(CONST pformatetc : FormatETC; Out medium : STGMEDIUM):HRESULT; STDCALL;
|
||||||
Function QueryGetData(const pformatetc : FORMATETC):HRESULT; STDCALL;
|
Function QueryGetData(const pformatetc : FORMATETC):HRESULT; STDCALL;
|
||||||
Function GetCanonicalFormatTEtc(const pformatetcIn : FORMATETC;Out pformatetcOut : FORMATETC):HResult; STDCALl;
|
Function GetCanonicalFormatEtc(const pformatetcIn : FORMATETC;Out pformatetcOut : FORMATETC):HResult; STDCALl;
|
||||||
Function SetData (Const pformatetc : FORMATETC;const medium:STGMEDIUM;FRelease : BOOL):HRESULT; StdCall;
|
Function SetData (Const pformatetc : FORMATETC;const medium:STGMEDIUM;FRelease : BOOL):HRESULT; StdCall;
|
||||||
Function EnumFormatEtc(dwDirection : DWord; OUT enumformatetcpara : IENUMFORMATETC):HRESULT; StdCall;
|
Function EnumFormatEtc(dwDirection : DWord; OUT enumformatetcpara : IENUMFORMATETC):HRESULT; StdCall;
|
||||||
Function DAdvise(const formatetc : FORMATETC;advf :DWORD; CONST AdvSink : IAdviseSink;OUT dwConnection:DWORD):HRESULT;StdCall;
|
Function DAdvise(const formatetc : FORMATETC;advf :DWORD; CONST AdvSink : IAdviseSink;OUT dwConnection:DWORD):HRESULT;StdCall;
|
||||||
Function DUnadvise(dwconnection :DWord) :HRESULT;StdCall;
|
Function DUnadvise(dwconnection :DWord) :HRESULT;StdCall;
|
||||||
Function EnumDAvise(Out enumAdvise : IEnumStatData):HResult;StdCall;
|
Function EnumDAdvise(Out enumAdvise : IEnumStatData):HResult;StdCall;
|
||||||
End;
|
End;
|
||||||
|
|
||||||
IDropTarget = interface(IUnknown)
|
IDropTarget = interface(IUnknown)
|
||||||
|
Reference in New Issue
Block a user