mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-18 21:42:51 +02:00
cody: unit deps: all units: expand all, collapse all
git-svn-id: trunk@41756 -
This commit is contained in:
parent
b3f1019ad2
commit
9a7c586fea
@ -227,6 +227,7 @@ object UnitDependenciesWindow: TUnitDependenciesWindow
|
|||||||
Width = 244
|
Width = 244
|
||||||
Anchors = [akTop, akLeft, akRight, akBottom]
|
Anchors = [akTop, akLeft, akRight, akBottom]
|
||||||
DefaultItemHeight = 18
|
DefaultItemHeight = 18
|
||||||
|
PopupMenu = UnitsTVPopupMenu
|
||||||
ReadOnly = True
|
ReadOnly = True
|
||||||
TabOrder = 1
|
TabOrder = 1
|
||||||
OnMouseDown = AllUnitsTreeViewMouseDown
|
OnMouseDown = AllUnitsTreeViewMouseDown
|
||||||
@ -336,6 +337,7 @@ object UnitDependenciesWindow: TUnitDependenciesWindow
|
|||||||
Width = 359
|
Width = 359
|
||||||
Anchors = [akTop, akLeft, akRight, akBottom]
|
Anchors = [akTop, akLeft, akRight, akBottom]
|
||||||
DefaultItemHeight = 18
|
DefaultItemHeight = 18
|
||||||
|
PopupMenu = UnitsTVPopupMenu
|
||||||
ReadOnly = True
|
ReadOnly = True
|
||||||
TabOrder = 1
|
TabOrder = 1
|
||||||
Options = [tvoAutoItemHeight, tvoHideSelection, tvoKeepCollapsedNodes, tvoReadOnly, tvoShowButtons, tvoShowLines, tvoShowRoot, tvoToolTips, tvoThemedDraw]
|
Options = [tvoAutoItemHeight, tvoHideSelection, tvoKeepCollapsedNodes, tvoReadOnly, tvoShowButtons, tvoShowLines, tvoShowRoot, tvoToolTips, tvoThemedDraw]
|
||||||
@ -357,4 +359,16 @@ object UnitDependenciesWindow: TUnitDependenciesWindow
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
object UnitsTVPopupMenu: TPopupMenu
|
||||||
|
left = 120
|
||||||
|
top = 193
|
||||||
|
object UnitsTVExpandAllMenuItem: TMenuItem
|
||||||
|
Caption = 'UnitsTVExpandAllMenuItem'
|
||||||
|
OnClick = UnitsTVExpandAllMenuItemClick
|
||||||
|
end
|
||||||
|
object UnitsTVCollapseAllMenuItem: TMenuItem
|
||||||
|
Caption = 'UnitsTVCollapseAllMenuItem'
|
||||||
|
OnClick = UnitsTVCollapseAllMenuItemClick
|
||||||
|
end
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
@ -30,10 +30,7 @@
|
|||||||
- additional files as start units
|
- additional files as start units
|
||||||
- view:
|
- view:
|
||||||
- text search with highlight
|
- text search with highlight
|
||||||
- double click on package open package editor
|
|
||||||
- popup menu: copy file name of unit, project lpi, package lpk, directory
|
- popup menu: copy file name of unit, project lpi, package lpk, directory
|
||||||
- popup menu: expand all
|
|
||||||
- popup menu: collapse all
|
|
||||||
- hint for unit, project lpi, package lpk, directory: full filename
|
- hint for unit, project lpi, package lpk, directory: full filename
|
||||||
- selected units
|
- selected units
|
||||||
- expand node: show connected units
|
- expand node: show connected units
|
||||||
@ -43,8 +40,6 @@
|
|||||||
- double click on project open project inspector
|
- double click on project open project inspector
|
||||||
- double click on package open package editor
|
- double click on package open package editor
|
||||||
- popup menu: copy file name of unit, project lpi, package lpk, directory
|
- popup menu: copy file name of unit, project lpi, package lpk, directory
|
||||||
- popup menu: expand all
|
|
||||||
- popup menu: collapse all
|
|
||||||
- hint for unit, project lpi, package lpk, directory: full filename
|
- hint for unit, project lpi, package lpk, directory: full filename
|
||||||
- resourcestrings
|
- resourcestrings
|
||||||
}
|
}
|
||||||
@ -56,7 +51,7 @@ interface
|
|||||||
|
|
||||||
uses
|
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, Menus, LvlGraphCtrl,
|
||||||
LazIDEIntf, ProjectIntf, IDEWindowIntf, PackageIntf, SrcEditorIntf,
|
LazIDEIntf, ProjectIntf, IDEWindowIntf, PackageIntf, SrcEditorIntf,
|
||||||
IDEDialogs, IDEImagesIntf, IDECommands, CodeToolManager, DefineTemplates,
|
IDEDialogs, IDEImagesIntf, IDECommands, CodeToolManager, DefineTemplates,
|
||||||
CodeToolsStructs, CTUnitGraph, CTUnitGroupGraph, FileProcs;
|
CodeToolsStructs, CTUnitGraph, CTUnitGroupGraph, FileProcs;
|
||||||
@ -128,6 +123,8 @@ type
|
|||||||
AllUnitsTreeView: TTreeView; // Node.Data is TUDNode
|
AllUnitsTreeView: TTreeView; // Node.Data is TUDNode
|
||||||
BtnPanel: TPanel;
|
BtnPanel: TPanel;
|
||||||
MainPageControl: TPageControl;
|
MainPageControl: TPageControl;
|
||||||
|
UnitsTVCollapseAllMenuItem: TMenuItem;
|
||||||
|
UnitsTVExpandAllMenuItem: TMenuItem;
|
||||||
ProgressBar1: TProgressBar;
|
ProgressBar1: TProgressBar;
|
||||||
GroupsTabSheet: TTabSheet;
|
GroupsTabSheet: TTabSheet;
|
||||||
GroupsSplitter: TSplitter;
|
GroupsSplitter: TSplitter;
|
||||||
@ -144,6 +141,7 @@ type
|
|||||||
SearchCustomFilesComboBox: TComboBox;
|
SearchCustomFilesComboBox: TComboBox;
|
||||||
UnitsSplitter: TSplitter;
|
UnitsSplitter: TSplitter;
|
||||||
UnitsTabSheet: TTabSheet;
|
UnitsTabSheet: TTabSheet;
|
||||||
|
UnitsTVPopupMenu: TPopupMenu;
|
||||||
procedure AllUnitsFilterEditChange(Sender: TObject);
|
procedure AllUnitsFilterEditChange(Sender: TObject);
|
||||||
procedure AllUnitsFilterEditEnter(Sender: TObject);
|
procedure AllUnitsFilterEditEnter(Sender: TObject);
|
||||||
procedure AllUnitsFilterEditExit(Sender: TObject);
|
procedure AllUnitsFilterEditExit(Sender: TObject);
|
||||||
@ -173,6 +171,8 @@ type
|
|||||||
procedure SearchCustomFilesBrowseButtonClick(Sender: TObject);
|
procedure SearchCustomFilesBrowseButtonClick(Sender: TObject);
|
||||||
procedure SearchCustomFilesCheckBoxChange(Sender: TObject);
|
procedure SearchCustomFilesCheckBoxChange(Sender: TObject);
|
||||||
procedure SearchCustomFilesComboBoxChange(Sender: TObject);
|
procedure SearchCustomFilesComboBoxChange(Sender: TObject);
|
||||||
|
procedure UnitsTVCollapseAllMenuItemClick(Sender: TObject);
|
||||||
|
procedure UnitsTVExpandAllMenuItemClick(Sender: TObject);
|
||||||
private
|
private
|
||||||
FAllUnitsMultiSelect: boolean;
|
FAllUnitsMultiSelect: boolean;
|
||||||
FCurrentUnit: TUGUnit;
|
FCurrentUnit: TUGUnit;
|
||||||
@ -407,7 +407,6 @@ var
|
|||||||
TVNode: TTreeNode;
|
TVNode: TTreeNode;
|
||||||
UDNode: TUDNode;
|
UDNode: TUDNode;
|
||||||
UGGroup: TUGGroup;
|
UGGroup: TUGGroup;
|
||||||
Pkg: TIDEPackage;
|
|
||||||
begin
|
begin
|
||||||
TVNode:=AllUnitsTreeView.GetNodeAt(X,Y);
|
TVNode:=AllUnitsTreeView.GetNodeAt(X,Y);
|
||||||
if TVNode=nil then exit;
|
if TVNode=nil then exit;
|
||||||
@ -593,6 +592,34 @@ begin
|
|||||||
IdleConnected:=true;
|
IdleConnected:=true;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
procedure TUnitDependenciesWindow.UnitsTVCollapseAllMenuItemClick(
|
||||||
|
Sender: TObject);
|
||||||
|
var
|
||||||
|
TV: TTreeView;
|
||||||
|
i: Integer;
|
||||||
|
begin
|
||||||
|
TV:=TTreeView(UnitsTVPopupMenu.PopupComponent);
|
||||||
|
if not (TV is TTreeView) then exit;
|
||||||
|
TV.BeginUpdate;
|
||||||
|
for i:=0 to TV.Items.TopLvlCount-1 do
|
||||||
|
TV.Items.TopLvlItems[i].Collapse(true);
|
||||||
|
TV.EndUpdate;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TUnitDependenciesWindow.UnitsTVExpandAllMenuItemClick(Sender: TObject
|
||||||
|
);
|
||||||
|
var
|
||||||
|
TV: TTreeView;
|
||||||
|
i: Integer;
|
||||||
|
begin
|
||||||
|
TV:=TTreeView(UnitsTVPopupMenu.PopupComponent);
|
||||||
|
if not (TV is TTreeView) then exit;
|
||||||
|
TV.BeginUpdate;
|
||||||
|
for i:=0 to TV.Items.TopLvlCount-1 do
|
||||||
|
TV.Items.TopLvlItems[i].Expand(true);
|
||||||
|
TV.EndUpdate;
|
||||||
|
end;
|
||||||
|
|
||||||
procedure TUnitDependenciesWindow.SetIdleConnected(AValue: boolean);
|
procedure TUnitDependenciesWindow.SetIdleConnected(AValue: boolean);
|
||||||
begin
|
begin
|
||||||
if FIdleConnected=AValue then Exit;
|
if FIdleConnected=AValue then Exit;
|
||||||
@ -1143,6 +1170,10 @@ begin
|
|||||||
SelUnitsSearchPrevSpeedButton.Hint:='Search previous unit of this phrase';
|
SelUnitsSearchPrevSpeedButton.Hint:='Search previous unit of this phrase';
|
||||||
SelUnitsSearchPrevSpeedButton.LoadGlyphFromLazarusResource('arrow_up');
|
SelUnitsSearchPrevSpeedButton.LoadGlyphFromLazarusResource('arrow_up');
|
||||||
|
|
||||||
|
// popup menu
|
||||||
|
UnitsTVExpandAllMenuItem.Caption:='Expand all nodes';
|
||||||
|
UnitsTVCollapseAllMenuItem.Caption:='Collapse all nodes';
|
||||||
|
|
||||||
UpdateUnitsButtons;
|
UpdateUnitsButtons;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user