You've already forked lazarus-ccr
* Synchronize with main VTV repository up to svn rev 404
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@3345 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
@ -2700,7 +2700,7 @@ type
|
|||||||
property OnAfterColumnExport : TVTColumnExportEvent read FOnAfterColumnExport write FOnAfterColumnExport;
|
property OnAfterColumnExport : TVTColumnExportEvent read FOnAfterColumnExport write FOnAfterColumnExport;
|
||||||
property OnAfterColumnWidthTracking: TVTAfterColumnWidthTrackingEvent read FOnAfterColumnWidthTracking write FOnAfterColumnWidthTracking;
|
property OnAfterColumnWidthTracking: TVTAfterColumnWidthTrackingEvent read FOnAfterColumnWidthTracking write FOnAfterColumnWidthTracking;
|
||||||
property OnAfterGetMaxColumnWidth: TVTAfterGetMaxColumnWidthEvent read FOnAfterGetMaxColumnWidth write FOnAfterGetMaxColumnWidth;
|
property OnAfterGetMaxColumnWidth: TVTAfterGetMaxColumnWidthEvent read FOnAfterGetMaxColumnWidth write FOnAfterGetMaxColumnWidth;
|
||||||
property OnAfterHeaderExport: TVTTreeExportEvent read FOnBeforeHeaderExport write FOnBeforeHeaderExport;
|
property OnAfterHeaderExport: TVTTreeExportEvent read FOnAfterHeaderExport write FOnAfterHeaderExport;
|
||||||
property OnAfterHeaderHeightTracking: TVTAfterHeaderHeightTrackingEvent read FOnAfterHeaderHeightTracking
|
property OnAfterHeaderHeightTracking: TVTAfterHeaderHeightTrackingEvent read FOnAfterHeaderHeightTracking
|
||||||
write FOnAfterHeaderHeightTracking;
|
write FOnAfterHeaderHeightTracking;
|
||||||
property OnAfterItemErase: TVTAfterItemEraseEvent read FOnAfterItemErase write FOnAfterItemErase;
|
property OnAfterItemErase: TVTAfterItemEraseEvent read FOnAfterItemErase write FOnAfterItemErase;
|
||||||
@ -2897,6 +2897,7 @@ type
|
|||||||
function GetNextNoInit(Node: PVirtualNode; ConsiderChildrenAbove: Boolean = False): PVirtualNode;
|
function GetNextNoInit(Node: PVirtualNode; ConsiderChildrenAbove: Boolean = False): PVirtualNode;
|
||||||
function GetNextSelected(Node: PVirtualNode; ConsiderChildrenAbove: Boolean = False): PVirtualNode;
|
function GetNextSelected(Node: PVirtualNode; ConsiderChildrenAbove: Boolean = False): PVirtualNode;
|
||||||
function GetNextSibling(Node: PVirtualNode): PVirtualNode;
|
function GetNextSibling(Node: PVirtualNode): PVirtualNode;
|
||||||
|
function GetNextSiblingNoInit(Node: PVirtualNode): PVirtualNode;
|
||||||
function GetNextVisible(Node: PVirtualNode; ConsiderChildrenAbove: Boolean = True): PVirtualNode;
|
function GetNextVisible(Node: PVirtualNode; ConsiderChildrenAbove: Boolean = True): PVirtualNode;
|
||||||
function GetNextVisibleNoInit(Node: PVirtualNode; ConsiderChildrenAbove: Boolean = True): PVirtualNode;
|
function GetNextVisibleNoInit(Node: PVirtualNode; ConsiderChildrenAbove: Boolean = True): PVirtualNode;
|
||||||
function GetNextVisibleSibling(Node: PVirtualNode; IncludeFiltered: Boolean = False): PVirtualNode;
|
function GetNextVisibleSibling(Node: PVirtualNode; IncludeFiltered: Boolean = False): PVirtualNode;
|
||||||
@ -2915,6 +2916,7 @@ type
|
|||||||
function GetPreviousNoInit(Node: PVirtualNode; ConsiderChildrenAbove: Boolean = False): PVirtualNode;
|
function GetPreviousNoInit(Node: PVirtualNode; ConsiderChildrenAbove: Boolean = False): PVirtualNode;
|
||||||
function GetPreviousSelected(Node: PVirtualNode; ConsiderChildrenAbove: Boolean = False): PVirtualNode;
|
function GetPreviousSelected(Node: PVirtualNode; ConsiderChildrenAbove: Boolean = False): PVirtualNode;
|
||||||
function GetPreviousSibling(Node: PVirtualNode): PVirtualNode;
|
function GetPreviousSibling(Node: PVirtualNode): PVirtualNode;
|
||||||
|
function GetPreviousSiblingNoInit(Node: PVirtualNode): PVirtualNode;
|
||||||
function GetPreviousVisible(Node: PVirtualNode; ConsiderChildrenAbove: Boolean = True): PVirtualNode;
|
function GetPreviousVisible(Node: PVirtualNode; ConsiderChildrenAbove: Boolean = True): PVirtualNode;
|
||||||
function GetPreviousVisibleNoInit(Node: PVirtualNode; ConsiderChildrenAbove: Boolean = True): PVirtualNode;
|
function GetPreviousVisibleNoInit(Node: PVirtualNode; ConsiderChildrenAbove: Boolean = True): PVirtualNode;
|
||||||
function GetPreviousVisibleSibling(Node: PVirtualNode; IncludeFiltered: Boolean = False): PVirtualNode;
|
function GetPreviousVisibleSibling(Node: PVirtualNode; IncludeFiltered: Boolean = False): PVirtualNode;
|
||||||
@ -3902,6 +3904,7 @@ type
|
|||||||
class function GetElementDetails(Detail: TThemedHeader): TThemedElementDetails; overload;
|
class function GetElementDetails(Detail: TThemedHeader): TThemedElementDetails; overload;
|
||||||
class function GetElementDetails(Detail: TThemedToolTip): TThemedElementDetails; overload;
|
class function GetElementDetails(Detail: TThemedToolTip): TThemedElementDetails; overload;
|
||||||
class function GetElementDetails(Detail: TThemedWindow): TThemedElementDetails; overload;
|
class function GetElementDetails(Detail: TThemedWindow): TThemedElementDetails; overload;
|
||||||
|
class function GetElementDetails(Detail: TThemedButton): TThemedElementDetails; overload;
|
||||||
class procedure PaintBorder(Control: TWinControl; EraseLRCorner: Boolean);
|
class procedure PaintBorder(Control: TWinControl; EraseLRCorner: Boolean);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
@ -3939,6 +3942,11 @@ type
|
|||||||
Result := ThemeServices.GetElementDetails(Detail);
|
Result := ThemeServices.GetElementDetails(Detail);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
class function StyleServices.GetElementDetails(Detail: TThemedButton): TThemedElementDetails;
|
||||||
|
begin
|
||||||
|
Result := ThemeServices.GetElementDetails(Detail);
|
||||||
|
end;
|
||||||
|
|
||||||
class procedure StyleServices.PaintBorder(Control: TWinControl; EraseLRCorner: Boolean);
|
class procedure StyleServices.PaintBorder(Control: TWinControl; EraseLRCorner: Boolean);
|
||||||
begin
|
begin
|
||||||
ThemeServices.PaintBorder(Control, EraseLRCorner);
|
ThemeServices.PaintBorder(Control, EraseLRCorner);
|
||||||
@ -17871,7 +17879,7 @@ begin
|
|||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
if Offset < (Indent + Margin{See issue #259}) then
|
if (MainColumnHit and (Offset < (Indent + Margin{See issue #259}))) then
|
||||||
begin
|
begin
|
||||||
// Position is to the left of calculated indentation which can only happen for the main column.
|
// Position is to the left of calculated indentation which can only happen for the main column.
|
||||||
// Check whether it corresponds to a button/checkbox.
|
// Check whether it corresponds to a button/checkbox.
|
||||||
@ -25099,15 +25107,10 @@ end;
|
|||||||
//----------------------------------------------------------------------------------------------------------------------
|
//----------------------------------------------------------------------------------------------------------------------
|
||||||
|
|
||||||
procedure TBaseVirtualTree.CutToClipBoard;
|
procedure TBaseVirtualTree.CutToClipBoard;
|
||||||
|
|
||||||
var
|
|
||||||
DataObject: IDataObject;
|
|
||||||
|
|
||||||
begin
|
begin
|
||||||
if (FSelectionCount > 0) and not (toReadOnly in FOptions.FMiscOptions) then
|
if (FSelectionCount > 0) and not (toReadOnly in FOptions.FMiscOptions) then
|
||||||
begin
|
begin
|
||||||
DataObject := TVTDataObject.Create(Self, True) as IDataObject;
|
if OleSetClipBoard(TVTDataObject.Create(Self, True)) = S_OK then
|
||||||
if OleSetClipBoard(DataObject) = S_OK then
|
|
||||||
begin
|
begin
|
||||||
MarkCutCopyNodes;
|
MarkCutCopyNodes;
|
||||||
DoStateChange([tsCutPending], [tsCopyPending]);
|
DoStateChange([tsCutPending], [tsCopyPending]);
|
||||||
@ -26078,7 +26081,7 @@ begin
|
|||||||
InitNode(Result);
|
InitNode(Result);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
// If there a no visible siblings take the parent.
|
// If there are no visible siblings take the parent.
|
||||||
if not (vsVisible in Result.States) then
|
if not (vsVisible in Result.States) then
|
||||||
begin
|
begin
|
||||||
Result := Result.Parent;
|
Result := Result.Parent;
|
||||||
@ -26496,23 +26499,21 @@ function TBaseVirtualTree.GetLastVisible(Node: PVirtualNode = nil; ConsiderChild
|
|||||||
IncludeFiltered: Boolean = False): PVirtualNode;
|
IncludeFiltered: Boolean = False): PVirtualNode;
|
||||||
|
|
||||||
// Returns the very last visible node in the tree while optionally considering toChildrenAbove.
|
// Returns the very last visible node in the tree while optionally considering toChildrenAbove.
|
||||||
// The nodes are intialized all the way down including the result node.
|
// The nodes are intialized all the way up including the result node.
|
||||||
|
|
||||||
var
|
var
|
||||||
Next: PVirtualNode;
|
Run: PVirtualNode;
|
||||||
|
|
||||||
begin
|
begin
|
||||||
Result := GetLastVisibleChild(Node, IncludeFiltered);
|
Result := GetLastVisibleNoInit(Node, ConsiderChildrenAbove);
|
||||||
if not ConsiderChildrenAbove or not (toChildrenAbove in FOptions.FPaintOptions) then
|
|
||||||
while Assigned(Result) do
|
Run := Result;
|
||||||
begin
|
while Assigned(Run) and (Run <> Node) and (Run <> RootNode) do
|
||||||
// Test if there is a next last visible child. If not keep the node from the last run.
|
begin
|
||||||
// Otherwise use the next last visible child.
|
if not (vsInitialized in Run.States) then
|
||||||
Next := GetLastVisibleChild(Result, IncludeFiltered);
|
InitNode(Run);
|
||||||
if Next = nil then
|
Run := Run.Parent;
|
||||||
Break;
|
end;
|
||||||
Result := Next;
|
|
||||||
end;
|
|
||||||
end;
|
end;
|
||||||
|
|
||||||
//----------------------------------------------------------------------------------------------------------------------
|
//----------------------------------------------------------------------------------------------------------------------
|
||||||
@ -26566,21 +26567,18 @@ function TBaseVirtualTree.GetLastVisibleNoInit(Node: PVirtualNode = nil;
|
|||||||
// Returns the very last visible node in the tree while optionally considering toChildrenAbove.
|
// Returns the very last visible node in the tree while optionally considering toChildrenAbove.
|
||||||
// No initialization is performed.
|
// No initialization is performed.
|
||||||
|
|
||||||
var
|
|
||||||
Next: PVirtualNode;
|
|
||||||
|
|
||||||
begin
|
begin
|
||||||
Result := GetLastVisibleChildNoInit(Node, IncludeFiltered);
|
Result := GetLastNoInit(Node, ConsiderChildrenAbove);
|
||||||
if not ConsiderChildrenAbove or not (toChildrenAbove in FOptions.FPaintOptions) then
|
while Assigned(Result) and (Result <> Node) do
|
||||||
while Assigned(Result) do
|
begin
|
||||||
begin
|
if FullyVisible[Result] and
|
||||||
// Test if there is a next last visible child. If not keep the node from the last run.
|
(IncludeFiltered or not IsEffectivelyFiltered[Result]) then
|
||||||
// Otherwise use the next last visible child.
|
Break;
|
||||||
Next := GetLastVisibleChildNoInit(Result, IncludeFiltered);
|
Result := GetPreviousNoInit(Result, ConsiderChildrenAbove);
|
||||||
if Next = nil then
|
end;
|
||||||
Break;
|
|
||||||
Result := Next;
|
if (Result = Node) then // i.e. there is no visible node
|
||||||
end;
|
Result := nil;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
//----------------------------------------------------------------------------------------------------------------------
|
//----------------------------------------------------------------------------------------------------------------------
|
||||||
@ -27027,6 +27025,20 @@ begin
|
|||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
function TBaseVirtualTree.GetNextSiblingNoInit(Node: PVirtualNode): PVirtualNode;
|
||||||
|
|
||||||
|
// Returns the next sibling of Node.
|
||||||
|
|
||||||
|
begin
|
||||||
|
Result := Node;
|
||||||
|
if Assigned(Result) then
|
||||||
|
begin
|
||||||
|
Assert(Result <> FRoot, 'Node must not be the hidden root node.');
|
||||||
|
|
||||||
|
Result := Result.NextSibling;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
//----------------------------------------------------------------------------------------------------------------------
|
//----------------------------------------------------------------------------------------------------------------------
|
||||||
|
|
||||||
function TBaseVirtualTree.GetNextVisible(Node: PVirtualNode; ConsiderChildrenAbove: Boolean = True): PVirtualNode;
|
function TBaseVirtualTree.GetNextVisible(Node: PVirtualNode; ConsiderChildrenAbove: Boolean = True): PVirtualNode;
|
||||||
@ -27637,7 +27649,7 @@ end;
|
|||||||
|
|
||||||
function TBaseVirtualTree.GetPreviousSibling(Node: PVirtualNode): PVirtualNode;
|
function TBaseVirtualTree.GetPreviousSibling(Node: PVirtualNode): PVirtualNode;
|
||||||
|
|
||||||
// Get next sibling of Node, initialize it if necessary.
|
// Returns the previous sibling of Node and initializes it if necessary.
|
||||||
|
|
||||||
begin
|
begin
|
||||||
Result := Node;
|
Result := Node;
|
||||||
@ -27651,6 +27663,20 @@ begin
|
|||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
function TBaseVirtualTree.GetPreviousSiblingNoInit(Node: PVirtualNode): PVirtualNode;
|
||||||
|
|
||||||
|
// Returns the previous sibling of Node
|
||||||
|
|
||||||
|
begin
|
||||||
|
Result := Node;
|
||||||
|
if Assigned(Result) then
|
||||||
|
begin
|
||||||
|
Assert(Result <> FRoot, 'Node must not be the hidden root node.');
|
||||||
|
|
||||||
|
Result := Result.PrevSibling;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
//----------------------------------------------------------------------------------------------------------------------
|
//----------------------------------------------------------------------------------------------------------------------
|
||||||
|
|
||||||
function TBaseVirtualTree.GetPreviousVisible(Node: PVirtualNode; ConsiderChildrenAbove: Boolean = True): PVirtualNode;
|
function TBaseVirtualTree.GetPreviousVisible(Node: PVirtualNode; ConsiderChildrenAbove: Boolean = True): PVirtualNode;
|
||||||
@ -29650,19 +29676,17 @@ begin
|
|||||||
begin
|
begin
|
||||||
if OleGetClipboard(Data) <> S_OK then
|
if OleGetClipboard(Data) <> S_OK then
|
||||||
ShowError(SClipboardFailed, hcTFClipboardFailed)
|
ShowError(SClipboardFailed, hcTFClipboardFailed)
|
||||||
else
|
else begin
|
||||||
try
|
|
||||||
// Try to get the source tree of the operation to optimize the operation.
|
// Try to get the source tree of the operation to optimize the operation.
|
||||||
Source := GetTreeFromDataObject(Data);
|
Source := GetTreeFromDataObject(Data);
|
||||||
Result := ProcessOLEData(Source, Data, FFocusedNode, FDefaultPasteMode, Assigned(Source) and
|
Result := ProcessOLEData(Source, Data, FFocusedNode, FDefaultPasteMode, Assigned(Source) and
|
||||||
(tsCutPending in Source.FStates));
|
(tsCutPending in Source.FStates));
|
||||||
if Assigned(Source) then
|
if Assigned(Source) then begin
|
||||||
if Source <> Self then
|
if Source <> Self then
|
||||||
Source.FinishCutOrCopy
|
Source.FinishCutOrCopy
|
||||||
else
|
else
|
||||||
DoStateChange([], [tsCutPending]);
|
DoStateChange([], [tsCutPending]);
|
||||||
finally
|
end;
|
||||||
Data := nil;
|
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
@ -30484,13 +30508,13 @@ procedure TBaseVirtualTree.SortTree(Column: TColumnIndex; Direction: TSortDirect
|
|||||||
|
|
||||||
begin
|
begin
|
||||||
Sort(Node, Column, Direction, DoInit);
|
Sort(Node, Column, Direction, DoInit);
|
||||||
|
// Recurse to next level
|
||||||
Run := Node.FirstChild;
|
Run := Node.FirstChild;
|
||||||
while Assigned(Run) and not FOperationCanceled do
|
while Assigned(Run) and not FOperationCanceled do
|
||||||
begin
|
begin
|
||||||
if DoInit and not (vsInitialized in Run.States) then
|
if DoInit and not (vsInitialized in Run.States) then
|
||||||
InitNode(Run);
|
InitNode(Run);
|
||||||
if vsInitialized in Run.States then
|
if (vsInitialized in Run.States) and Expanded[Node] then // There is no need to sort collapsed branches
|
||||||
DoSort(Run);
|
DoSort(Run);
|
||||||
Run := Run.NextSibling;
|
Run := Run.NextSibling;
|
||||||
end;
|
end;
|
||||||
@ -31463,7 +31487,7 @@ var
|
|||||||
LastFont: THandle;
|
LastFont: THandle;
|
||||||
|
|
||||||
begin
|
begin
|
||||||
if not (vsMultiline in FLink.FNode.States) then
|
if not (vsMultiline in FLink.FNode.States) and not (toGridExtensions in FLink.FTree.FOptions.FMiscOptions{see issue #252}) then
|
||||||
begin
|
begin
|
||||||
DC := GetDC(Handle);
|
DC := GetDC(Handle);
|
||||||
LastFont := SelectObject(DC, Font.Reference.Handle);
|
LastFont := SelectObject(DC, Font.Reference.Handle);
|
||||||
|
@ -10,3 +10,4 @@
|
|||||||
* Review ASM procedures
|
* Review ASM procedures
|
||||||
* Review DoDragMsg/CMDrag
|
* Review DoDragMsg/CMDrag
|
||||||
* Add CHANGES.TXT file
|
* Add CHANGES.TXT file
|
||||||
|
* Review KeyUnicode -> unnecessary?
|
Reference in New Issue
Block a user