fix, static explorer didnt display unions

This commit is contained in:
Basile Burg 2015-01-29 02:18:35 +01:00
parent b2a79f1ae9
commit 3aa2a8ae86
2 changed files with 19 additions and 13 deletions

View File

@ -38,18 +38,19 @@ inherited CEStaticExplorerWidget: TCEStaticExplorerWidget
OnKeyPress = TreeKeyPress OnKeyPress = TreeKeyPress
Options = [tvoAutoItemHeight, tvoKeepCollapsedNodes, tvoReadOnly, tvoRightClickSelect, tvoRowSelect, tvoShowButtons, tvoShowLines, tvoShowRoot, tvoToolTips, tvoThemedDraw] Options = [tvoAutoItemHeight, tvoKeepCollapsedNodes, tvoReadOnly, tvoRightClickSelect, tvoRowSelect, tvoShowButtons, tvoShowLines, tvoShowRoot, tvoToolTips, tvoThemedDraw]
Items.Data = { Items.Data = {
F9FFFFFF02000A000000000000000000000000000000FFFFFFFF000000000000 F9FFFFFF02000B000000000000000000000000000000FFFFFFFF000000000000
00000005000000416C6961730100000001000000FFFFFFFFFFFFFFFF00000000 00000005000000416C696173010000000100000001000000FFFFFFFF00000000
000000000007000000436C6173736573020000000200000002000000FFFFFFFF 000000000007000000436C6173736573020000000200000002000000FFFFFFFF
00000000000000000005000000456E756D730300000003000000FFFFFFFFFFFF 00000000000000000005000000456E756D73030000000300000003000000FFFF
FFFF0000000000000000000800000046756E6374696F6E0400000004000000FF FFFF0000000000000000000800000046756E6374696F6E040000000400000004
FFFFFFFFFFFFFF00000000000000000007000000496D706F7274730500000005 000000FFFFFFFF00000000000000000007000000496D706F7274730500000005
000000FFFFFFFFFFFFFFFF00000000000000000009000000496E746572666163 00000005000000FFFFFFFF00000000000000000009000000496E746572666163
650600000006000000FFFFFFFFFFFFFFFF000000000000000000050000004D69 65060000000600000006000000FFFFFFFF000000000000000000050000004D69
78696E0700000007000000FFFFFFFFFFFFFFFF00000000000000000007000000 78696E070000000700000007000000FFFFFFFF00000000000000000007000000
537472756374730800000008000000FFFFFFFFFFFFFFFF000000000000000000 53747275637473080000000800000008000000FFFFFFFF000000000000000000
0900000054656D706C617465730000000000000000FFFFFFFFFFFFFFFF000000 0900000054656D706C61746573000000000000000000000000FFFFFFFF000000
000000000000080000005661726961626C65 00000000000005000000556E696F6E010000000100000001000000FFFFFFFF00
0000000000000000080000005661726961626C65
} }
TreeLineColor = 14671839 TreeLineColor = 14671839
TreeLinePenStyle = psSolid TreeLinePenStyle = psSolid

View File

@ -37,7 +37,7 @@ type
fRefreshOnChange: boolean; fRefreshOnChange: boolean;
fRefreshOnFocus: boolean; fRefreshOnFocus: boolean;
fJsonFname: string; fJsonFname: string;
ndAlias, ndClass, ndEnum, ndFunc: TTreeNode; ndAlias, ndClass, ndEnum, ndFunc, ndUni: TTreeNode;
ndImp, ndIntf, ndMix, ndStruct, ndTmp, ndVar: TTreeNode; ndImp, ndIntf, ndMix, ndStruct, ndTmp, ndVar: TTreeNode;
procedure TreeDblClick(Sender: TObject); procedure TreeDblClick(Sender: TObject);
procedure actRefreshExecute(Sender: TObject); procedure actRefreshExecute(Sender: TObject);
@ -138,7 +138,8 @@ begin
ndMix := Tree.Items[6]; ndMix := Tree.Items[6];
ndStruct := Tree.Items[7]; ndStruct := Tree.Items[7];
ndTmp := Tree.Items[8]; ndTmp := Tree.Items[8];
ndVar := Tree.Items[9]; ndUni := Tree.Items[9];
ndVar := Tree.Items[10];
// //
png := TPortableNetworkGraphic.Create; png := TPortableNetworkGraphic.Create;
try try
@ -360,6 +361,7 @@ begin
ndMix.Visible := ndMix.Count > 0; ndMix.Visible := ndMix.Count > 0;
ndStruct.Visible:= ndStruct.Count > 0; ndStruct.Visible:= ndStruct.Count > 0;
ndTmp.Visible := ndTmp.Count > 0; ndTmp.Visible := ndTmp.Count > 0;
ndUni.Visible := ndUni.Count > 0;
ndVar.Visible := ndVar.Count > 0; ndVar.Visible := ndVar.Count > 0;
end else end else
begin begin
@ -372,6 +374,7 @@ begin
ndMix.Visible := true; ndMix.Visible := true;
ndStruct.Visible:= true; ndStruct.Visible:= true;
ndTmp.Visible := true; ndTmp.Visible := true;
ndUni.Visible := true;
ndVar.Visible := true; ndVar.Visible := true;
end; end;
end; end;
@ -387,6 +390,7 @@ begin
ndMix.DeleteChildren; ndMix.DeleteChildren;
ndStruct.DeleteChildren; ndStruct.DeleteChildren;
ndTmp.DeleteChildren; ndTmp.DeleteChildren;
ndUni.DeleteChildren;
ndVar.DeleteChildren; ndVar.DeleteChildren;
end; end;
@ -548,6 +552,7 @@ begin
'mixin' :ndCat := Tree.Items.AddChildObject(ndMix, nme, ln); 'mixin' :ndCat := Tree.Items.AddChildObject(ndMix, nme, ln);
'struct' :ndCat := Tree.Items.AddChildObject(ndStruct, nme, ln); 'struct' :ndCat := Tree.Items.AddChildObject(ndStruct, nme, ln);
'template' :ndCat := Tree.Items.AddChildObject(ndTmp, nme, ln); 'template' :ndCat := Tree.Items.AddChildObject(ndTmp, nme, ln);
'union' :ndCat := Tree.Items.AddChildObject(ndUni, nme, ln);
'variable' :ndCat := Tree.Items.AddChildObject(ndVar, nme, ln); 'variable' :ndCat := Tree.Items.AddChildObject(ndVar, nme, ln);
else subjLmFromString(fLogMessager, 'static explorer does not handle this kind: ' else subjLmFromString(fLogMessager, 'static explorer does not handle this kind: '
+ knd, nil, amcApp, amkWarn); + knd, nil, amcApp, amkWarn);