mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-09-07 09:20:48 +02:00
cody: unit deps: all units: icons
git-svn-id: trunk@41747 -
This commit is contained in:
parent
27ca29b64a
commit
a7678fdc2f
@ -54,8 +54,8 @@ uses
|
|||||||
Classes, SysUtils, AVL_Tree, LazLogger, LazFileUtils, LazUTF8, Forms,
|
Classes, SysUtils, AVL_Tree, LazLogger, LazFileUtils, LazUTF8, Forms,
|
||||||
Controls, ExtCtrls, ComCtrls, StdCtrls, Buttons, Dialogs, LvlGraphCtrl,
|
Controls, ExtCtrls, ComCtrls, StdCtrls, Buttons, Dialogs, LvlGraphCtrl,
|
||||||
LazIDEIntf, ProjectIntf, IDEWindowIntf, PackageIntf, SrcEditorIntf,
|
LazIDEIntf, ProjectIntf, IDEWindowIntf, PackageIntf, SrcEditorIntf,
|
||||||
IDEDialogs, CodeToolManager, DefineTemplates, CodeToolsStructs, CTUnitGraph,
|
IDEDialogs, IDEImagesIntf, CodeToolManager, DefineTemplates, CodeToolsStructs,
|
||||||
CTUnitGroupGraph, FileProcs;
|
CTUnitGraph, CTUnitGroupGraph, FileProcs;
|
||||||
|
|
||||||
const
|
const
|
||||||
GroupPrefixProject = '-Project-';
|
GroupPrefixProject = '-Project-';
|
||||||
@ -160,6 +160,10 @@ type
|
|||||||
FGroups: TUGGroups; // referenced by Nodes.Data of GroupsLvlGraph
|
FGroups: TUGGroups; // referenced by Nodes.Data of GroupsLvlGraph
|
||||||
FAllUnitsRootUDNode: TUDNode;
|
FAllUnitsRootUDNode: TUDNode;
|
||||||
FFlags: TUDWFlags;
|
FFlags: TUDWFlags;
|
||||||
|
fImgIndexProject: integer;
|
||||||
|
fImgIndexUnit: integer;
|
||||||
|
fImgIndexPackage: integer;
|
||||||
|
fImgIndexDirectory: integer;
|
||||||
function CreateAllUnitsTree: TUDNode;
|
function CreateAllUnitsTree: TUDNode;
|
||||||
procedure SetAllUnitsMultiSelect(AValue: boolean);
|
procedure SetAllUnitsMultiSelect(AValue: boolean);
|
||||||
procedure SetCurrentUnit(AValue: TUGUnit);
|
procedure SetCurrentUnit(AValue: TUGUnit);
|
||||||
@ -178,6 +182,7 @@ type
|
|||||||
procedure UpdateGroupsLvlGraph;
|
procedure UpdateGroupsLvlGraph;
|
||||||
procedure UpdateUnitsLvlGraph;
|
procedure UpdateUnitsLvlGraph;
|
||||||
procedure UpdateAllUnitsTreeView;
|
procedure UpdateAllUnitsTreeView;
|
||||||
|
function GetImgIndex(Node: TUDNode): integer;
|
||||||
function NodeTextToUnit(NodeText: string): TUGUnit;
|
function NodeTextToUnit(NodeText: string): TUGUnit;
|
||||||
function UGUnitToNodeText(UGUnit: TUGUnit): string;
|
function UGUnitToNodeText(UGUnit: TUGUnit): string;
|
||||||
function GetFPCSrcDir: string;
|
function GetFPCSrcDir: string;
|
||||||
@ -288,6 +293,12 @@ begin
|
|||||||
ProgressBar1.Style:=pbstMarquee;
|
ProgressBar1.Style:=pbstMarquee;
|
||||||
AddStartAndTargetUnits;
|
AddStartAndTargetUnits;
|
||||||
|
|
||||||
|
fImgIndexProject := IDEImages.LoadImage(16, 'item_project');
|
||||||
|
fImgIndexUnit := IDEImages.LoadImage(16, 'item_unit');
|
||||||
|
fImgIndexPackage := IDEImages.LoadImage(16, 'pkg_required');
|
||||||
|
fImgIndexDirectory := IDEImages.LoadImage(16, 'pkg_files');
|
||||||
|
AllUnitsTreeView.Images:=IDEImages.Images_16;
|
||||||
|
|
||||||
Caption:='Unit Dependencies';
|
Caption:='Unit Dependencies';
|
||||||
|
|
||||||
MainPageControl.ActivePage:=UnitsTabSheet;
|
MainPageControl.ActivePage:=UnitsTabSheet;
|
||||||
@ -1025,6 +1036,8 @@ procedure TUnitDependenciesWindow.UpdateAllUnitsTreeView;
|
|||||||
UDNode:=TUDNode(AVLNode.Data);
|
UDNode:=TUDNode(AVLNode.Data);
|
||||||
TVNode:=TV.Items.AddChild(ParentTVNode,UDNode.NodeText);
|
TVNode:=TV.Items.AddChild(ParentTVNode,UDNode.NodeText);
|
||||||
TVNode.Data:=UDNode;
|
TVNode.Data:=UDNode;
|
||||||
|
TVNode.ImageIndex:=GetImgIndex(UDNode);
|
||||||
|
TVNode.StateIndex:=TVNode.ImageIndex;
|
||||||
CreateTVNodes(TV,TVNode,UDNode);
|
CreateTVNodes(TV,TVNode,UDNode);
|
||||||
TVNode.Expanded:=true;
|
TVNode.Expanded:=true;
|
||||||
AVLNode:=ParentUDNode.ChildNodes.FindSuccessor(AVLNode);
|
AVLNode:=ParentUDNode.ChildNodes.FindSuccessor(AVLNode);
|
||||||
@ -1057,6 +1070,26 @@ begin
|
|||||||
TV.EndUpdate;
|
TV.EndUpdate;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
function TUnitDependenciesWindow.GetImgIndex(Node: TUDNode): integer;
|
||||||
|
begin
|
||||||
|
case Node.Typ of
|
||||||
|
//udnNone: ;
|
||||||
|
udnGroup:
|
||||||
|
if Node.Group=GroupPrefixProject then
|
||||||
|
Result:=fImgIndexProject
|
||||||
|
else
|
||||||
|
Result:=fImgIndexPackage;
|
||||||
|
udnDirectory: Result:=fImgIndexDirectory;
|
||||||
|
//udnInterface: ;
|
||||||
|
//udnImplementation: ;
|
||||||
|
//udnUsedByInterface: ;
|
||||||
|
//udnUsedByImplementation: ;
|
||||||
|
udnUnit: Result:=fImgIndexUnit;
|
||||||
|
else
|
||||||
|
Result:=fImgIndexDirectory;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
function TUnitDependenciesWindow.NodeTextToUnit(NodeText: string): TUGUnit;
|
function TUnitDependenciesWindow.NodeTextToUnit(NodeText: string): TUGUnit;
|
||||||
var
|
var
|
||||||
AVLNode: TAVLTreeNode;
|
AVLNode: TAVLTreeNode;
|
||||||
|
Loading…
Reference in New Issue
Block a user