1 unit LvlGraph_Dep_Unit1;
2 
3 {$mode objfpc}{$H+}
4 
5 interface
6 
7 uses
8   RTTIGrids, Forms, ExtCtrls, LvlGraphCtrl, PropEdits;
9 
10 type
11 
12   { TForm1 }
13 
14   TForm1 = class(TForm)
15     LvlGraphControl1: TLvlGraphControl;
16     Panel1: TPanel;
17     Splitter1: TSplitter;
18     TIPropertyGrid1: TTIPropertyGrid;
19     procedure FormCreate(Sender: TObject);
20     procedure TIPropertyGrid1EditorFilter(Sender: TObject;
21       aEditor: TPropertyEditor; var aShow: boolean);
22   private
23   public
24   end;
25 
26 var
27   Form1: TForm1;
28 
29 implementation
30 
31 {$R *.lfm}
32 
33 { TForm1 }
34 
35 procedure TForm1.FormCreate(Sender: TObject);
36 begin
37   with LvlGraphControl1 do begin
38     Graph.GetEdge('-Project-','LCL',true);
39     Graph.GetEdge('-Project-','Cody',true);
40     Graph.GetEdge('Cody','IDEIntf',true);
41     Graph.GetEdge('IDEIntf','LCL',true);
42     Graph.GetEdge('IDEIntf','LazControls',true);
43     Graph.GetEdge('LazControls','LCL',true);
44     Graph.GetEdge('LCL','LCLBase',true);
45     Graph.GetEdge('LCLBase','LazUtils',true);
46     Graph.GetEdge('LazUtils','FCL',true);
47     Graph.GetEdge('Cody','CodeTools',true);
48     Graph.GetEdge('CodeTools','LazUtils',true);
49     Graph.GetEdge('Cody','LazUtils',true);
50     Graph.GetEdge('-Project-','OpenGLControl',true);
51     Graph.GetEdge('OpenGLControl','LCL',true);
52   end;
53 end;
54 
55 procedure TForm1.TIPropertyGrid1EditorFilter(Sender: TObject;
56   aEditor: TPropertyEditor; var aShow: boolean);
57 var
58   PropName: String;
59 begin
60   PropName:=aEditor.GetName;
61   aShow:=(PropName='NodeStyle') or (PropName='EdgeStyle') or (PropName='Options');
62 end;
63 
64 end.
65 
66