codeexplorer: using lower recursive depth

git-svn-id: trunk@6139 -
This commit is contained in:
mattias 2004-10-15 13:28:22 +00:00
parent 8f32b28a3f
commit d5177800f0
4 changed files with 81 additions and 81 deletions

View File

@ -316,57 +316,56 @@ var
ShowNode: Boolean;
ShowChilds: Boolean;
begin
if CodeNode=nil then exit;
ShowNode:=true;
ShowChilds:=true;
while CodeNode<>nil do begin
ShowNode:=true;
ShowChilds:=true;
// don't show statements
if (CodeNode.Desc in AllPascalStatements+[ctnParameterList]) then exit;
// don't show parameter lists
if (CodeNode.Desc in [ctnProcedureHead]) then begin
ShowNode:=false;
ShowChilds:=false;
end;
// don't show forward class definitions
if (CodeNode.Desc=ctnTypeDefinition)
and (CodeNode.FirstChild<>nil) and (CodeNode.FirstChild.Desc=ctnClass)
and ((CodeNode.FirstChild.SubDesc and ctnsForwardDeclaration)>0) then begin
ShowNode:=false;
ShowChilds:=false;
end;
// don't show statements
if (CodeNode.Desc in AllPascalStatements+[ctnParameterList]) then begin
ShowNode:=false;
ShowChilds:=false;
end;
// don't show parameter lists
if (CodeNode.Desc in [ctnProcedureHead]) then begin
ShowNode:=false;
ShowChilds:=false;
end;
// don't show forward class definitions
if (CodeNode.Desc=ctnTypeDefinition)
and (CodeNode.FirstChild<>nil) and (CodeNode.FirstChild.Desc=ctnClass)
and ((CodeNode.FirstChild.SubDesc and ctnsForwardDeclaration)>0) then begin
ShowNode:=false;
ShowChilds:=false;
end;
// don't show keyword nodes
if CodeNode.Desc in [ctnIdentifier,ctnRangedArrayType,
ctnOpenArrayType,ctnOfConstType,ctnRangeType,ctnTypeType,ctnFileType,
ctnVariantType]
then
ShowNode:=false;
// don't show keyword nodes
if CodeNode.Desc in [ctnIdentifier,ctnRangedArrayType,
ctnOpenArrayType,ctnOfConstType,ctnRangeType,ctnTypeType,ctnFileType,
ctnVariantType]
then
ShowNode:=false;
if ShowNode then begin
NodeData:=TViewNodeData.Create(CodeNode);
NodeText:=GetNodeDescription(ACodeTool,CodeNode);
NodeImageIndex:=GetNodeImage(CodeNode);
if InFrontViewNode<>nil then
ViewNode:=CodeTreeview.Items.InsertObjectBehind(
InFrontViewNode,NodeText,NodeData)
else if ParentViewNode<>nil then
ViewNode:=CodeTreeview.Items.AddChildObject(
ParentViewNode,NodeText,NodeData)
else
ViewNode:=CodeTreeview.Items.AddObject(nil,NodeText,NodeData);
ViewNode.ImageIndex:=NodeImageIndex;
ViewNode.SelectedIndex:=NodeImageIndex;
ViewNode:=ParentViewNode;
if ShowNode then begin
NodeData:=TViewNodeData.Create(CodeNode);
NodeText:=GetNodeDescription(ACodeTool,CodeNode);
NodeImageIndex:=GetNodeImage(CodeNode);
if InFrontViewNode<>nil then
ViewNode:=CodeTreeview.Items.InsertObjectBehind(
InFrontViewNode,NodeText,NodeData)
else if ParentViewNode<>nil then
ViewNode:=CodeTreeview.Items.AddChildObject(
ParentViewNode,NodeText,NodeData)
else
ViewNode:=CodeTreeview.Items.AddObject(nil,NodeText,NodeData);
ViewNode.ImageIndex:=NodeImageIndex;
ViewNode.SelectedIndex:=NodeImageIndex;
InFrontViewNode:=ViewNode;
end;
if ShowChilds then
CreateNodes(ACodeTool,CodeNode.FirstChild,ViewNode,nil,true);
if CreateSiblings then
CreateNodes(ACodeTool,CodeNode.NextBrother,ParentViewNode,ViewNode,true);
end else begin
if ShowChilds then
CreateNodes(ACodeTool,CodeNode.FirstChild,ParentViewNode,nil,true);
if CreateSiblings then
CreateNodes(ACodeTool,CodeNode.NextBrother,ParentViewNode,InFrontViewNode,
true);
if not CreateSiblings then break;
CodeNode:=CodeNode.NextBrother;
end;
end;

View File

@ -7,8 +7,8 @@
Component Library Code
Initial Revision : Sun Mar 28 23:15:32 CST 1999
Revised : Sat Jul 3 1999
Initial Revision : Sun Mar 28 23:15:32 CST 1999
Revised: Sat Jul 3 1999
***************************************************************************/
@ -66,7 +66,7 @@ type
FModalResult: TModalResult;
FShortCut: TShortcut;
procedure SetCancel(NewCancel: boolean);
procedure SetDefault(Value : Boolean);
procedure SetDefault(Value: Boolean);
procedure WMDefaultClicked(var Message: TLMessage); message LM_CLICKED;
protected
procedure Click; override;
@ -171,11 +171,11 @@ type
procedure RealizeKind;
//Return the caption associated with the aKind value.
function GetCaptionOfKind(aKind: TBitBtnKind) : String;
function GetCaptionOfKind(aKind: TBitBtnKind): String;
protected
procedure ActionChange(Sender: TObject; CheckDefaults: Boolean); override;
procedure Click; override;
procedure GlyphChanged(Sender : TObject);
procedure GlyphChanged(Sender: TObject);
procedure InitializeWnd; override;
public
constructor Create(TheOwner: TComponent); override;
@ -244,22 +244,20 @@ type
TCustomSpeedButton = class(TGraphicControl)
private
FAllowAllUp : Boolean;
FDown : Boolean;
FDragging : Boolean;
FFlat : Boolean;
FAllowAllUp: Boolean;
FDown: Boolean;
FDragging: Boolean;
FFlat: Boolean;
FGlyph: TButtonGlyph;
FGroupIndex : Integer;
FGroupIndex: Integer;
FLastDrawFlags: integer;
FLayout: TButtonLayout;
FMargin : integer;
FMouseInControl : Boolean;
FShortcut : Longint;
FSpacing : integer;
FTransparent : Boolean;
FDCNowAvailable : Boolean; //this is for gtk1, DeviceContext not available during creation process????
FDownWaiting : Boolean; //when this one is true, need to down button when DC is available
function GetGlyph : TBitmap;
FMargin: integer;
FMouseInControl: Boolean;
FShortcut: Longint;
FSpacing: integer;
FTransparent: Boolean;
function GetGlyph: TBitmap;
procedure UpdateExclusive;
procedure SetAllowAllUp(Value: Boolean);
procedure SetGlyph(Value: TBitmap);
@ -271,20 +269,20 @@ type
procedure CMEnabledChanged(var Message: TLMessage); message CM_ENABLEDCHANGED;
protected
FState: TButtonState;
function GetNumGlyphs : Integer;
procedure GlyphChanged(Sender : TObject);
function GetNumGlyphs: Integer;
procedure GlyphChanged(Sender: TObject);
procedure MouseDown(Button: TMouseButton; Shift: TShiftState;
X, Y: Integer); override;
procedure MouseMove(Shift: TShiftState; X, Y: Integer); override;
procedure MouseUp(Button: TMouseButton; Shift: TShiftState;
X, Y: Integer); override;
procedure Paint; override;
procedure SetDown(Value : Boolean);
procedure SetGroupIndex(const Value : Integer);
procedure SetFlat(const Value : Boolean);
procedure SetMargin(const Value : integer);
procedure SetNumGlyphs(Value : integer);
procedure SetSpacing(const Value : integer);
procedure SetDown(Value: Boolean);
procedure SetGroupIndex(const Value: Integer);
procedure SetFlat(const Value: Boolean);
procedure SetMargin(const Value: integer);
procedure SetNumGlyphs(Value: integer);
procedure SetSpacing(const Value: integer);
procedure RealSetText(const Value: TCaption); override;
procedure UpdateState(InvalidateOnChange: boolean); virtual;
function GetDrawFlags: integer; virtual;
@ -352,12 +350,12 @@ uses
WSButtons;
const
BitBtnModalResults : array[TBitBtnKind] of TModalResult = (
BitBtnModalResults: array[TBitBtnKind] of TModalResult = (
0, mrOK, mrCancel, 0, mrYes, mrNo,
0, mrAbort, mrRetry, mrIgnore, mrAll,
mrNoToAll, mrYesToAll);
BitBtnImages : array[TBitBtnKind] of Longint = (
BitBtnImages: array[TBitBtnKind] of Longint = (
idButtonOk, idButtonOk, idButtonCancel, idButtonHelp, idButtonYes,
idButtonNo, idButtonClose, idButtonAbort, idButtonRetry, idButtonIgnore,
idButtonAll, idButtonNoToAll, idButtonYesToAll);
@ -373,9 +371,6 @@ end;
{$I buttonglyph.inc}
{$I speedbutton.inc}
initialization
finalization
end.
@ -383,6 +378,9 @@ end.
{ =============================================================================
$Log$
Revision 1.81 2004/10/15 13:28:22 mattias
codeexplorer: using lower recursive depth
Revision 1.80 2004/10/15 12:04:09 mattias
calling updating notebook tab after realize, needed for close btns

View File

@ -3524,9 +3524,9 @@ begin
SetScrollInfo(Handle, SB_VERT, ScrollInfo, true);
end;
end;
//DebugLn('>>>>>>>>>> [TCustomTreeView.UpdateScrollbars] Vert On nMin=',ScrollInfo.nMin,
//' nMax=',ScrollInfo.nMax,' nPage=',ScrollInfo.nPage,
//' nPos=',ScrollInfo.nPos,' GetMaxScrollTop=',GetMaxScrollTop);
//DebugLn('>>>>>>>>>> [TCustomTreeView.UpdateScrollbars] Vert On nMin=',dbgs(ScrollInfo.nMin),
//' nMax=',dbgs(ScrollInfo.nMax),' nPage=',dbgs(ScrollInfo.nPage),
//' nPos=',dbgs(ScrollInfo.nPos),' GetMaxScrollTop=',dbgs(GetMaxScrollTop));
end else begin
//DebugLn('>>>>>>>>>> [TCustomTreeView.UpdateScrollbars] Vert Off ');
FLastVertScrollInfo.cbSize:=0;

View File

@ -7922,7 +7922,7 @@ begin
' bRedraw=',bRedraw,
' Handle=',HexStr(Cardinal(Handle),8));}
// do we have to set this allways ?
// do we have to set this always ?
if bRedraw then
begin
if GtkWidgetIsA(PGtkWidget(Scroll),gtk_scrolled_window_get_type) then
@ -8695,6 +8695,9 @@ end;
{ =============================================================================
$Log$
Revision 1.370 2004/10/15 13:28:22 mattias
codeexplorer: using lower recursive depth
Revision 1.369 2004/10/01 13:16:44 mattias
fixed unselecting TCanvas objects