IDEIntf: fixed comments

git-svn-id: trunk@50820 -
This commit is contained in:
mattias 2015-12-15 16:21:18 +00:00
parent f122e388f7
commit 2ac7f308e5

View File

@ -34,17 +34,15 @@ type
A menu item in one of the IDE's menus. A menu item in one of the IDE's menus.
This is only the base class for TIDEMenuSection and TIDEMenuCommand } This is only the base class for TIDEMenuSection and TIDEMenuCommand }
{ TIDEMenuItem }
TIDEMenuItem = class(TIDESpecialCommand) TIDEMenuItem = class(TIDESpecialCommand)
private private
FAutoFreeMenuItem: boolean; FAutoFreeMenuItem: boolean;
FBitmap: TBitmap; FBitmap: TBitmap;
FMenuItem: TMenuItem; FMenuItem: TMenuItem;
FMenuItemClass: TMenuItemClass; FMenuItemClass: TMenuItemClass;
FSection: TIDEMenuSection; FSection: TIDEMenuSection; // parent section
FSectionIndex: Integer; FSectionIndex: Integer;// index in parent section
FSize: integer; FSize: integer; // size of this item including separators and children in parent section (e.g. a submenu has size=1)
FTag: Integer; FTag: Integer;
FUserTag: PtrUInt; FUserTag: PtrUInt;
FLastVisibleActive: boolean; FLastVisibleActive: boolean;
@ -75,9 +73,9 @@ type
function GetPath: string; function GetPath: string;
function GetRoot: TIDEMenuItem; function GetRoot: TIDEMenuItem;
function VisibleActive: boolean; virtual; function VisibleActive: boolean; virtual;
function GetContainerSection: TIDEMenuSection; function GetContainerSection: TIDEMenuSection; // returns nearest sub menu section
function GetContainerMenuItem: TMenuItem; function GetContainerMenuItem: TMenuItem; // returns nearest sub menu
function Size: integer; virtual; function Size: integer; virtual; // size of this item including separators and children in parent section (e.g. a submenu has size=1)
function HasAsParent(Item: TIDEMenuItem): boolean; function HasAsParent(Item: TIDEMenuItem): boolean;
procedure WriteDebugReport(const Prefix: string; procedure WriteDebugReport(const Prefix: string;
MenuItemDebugReport: boolean); virtual; MenuItemDebugReport: boolean); virtual;
@ -100,9 +98,7 @@ type
separators. separators.
If no children are visible, the section will not be visible. If no children are visible, the section will not be visible.
} }
{ TIDEMenuSection }
TIDEMenuSectionState = ( TIDEMenuSectionState = (
imssClearing imssClearing
); );
@ -999,7 +995,7 @@ var
GetRoot.WriteDebugReport(' Top ',true); GetRoot.WriteDebugReport(' Top ',true);
debugln('TIDEMenuSection.UpdateNeedTopSeparator CREATE TopSeparator Name="',Name,'" ContainerMenuIndex ** FORCED VALUE ** FROM ContainerMenuItem.Count=',dbgs(ContainerMenuItem.Count)); debugln('TIDEMenuSection.UpdateNeedTopSeparator CREATE TopSeparator Name="',Name,'" ContainerMenuIndex ** FORCED VALUE ** FROM ContainerMenuItem.Count=',dbgs(ContainerMenuItem.Count));
{$ENDIF} {$ENDIF}
// there's no yet available room for new FTopSeparator.fixes #17321. // there's not yet available room for new FTopSeparator.fixes #17321.
ContainerMenuIndex := ContainerMenuItem.Count; ContainerMenuIndex := ContainerMenuItem.Count;
end; end;
ContainerMenuItem.Insert(ContainerMenuIndex,FTopSeparator); ContainerMenuItem.Insert(ContainerMenuIndex,FTopSeparator);
@ -1012,7 +1008,8 @@ var
// - this section is imbedded (not ChildrenAsSubMenu) // - this section is imbedded (not ChildrenAsSubMenu)
// - and this section is visible // - and this section is visible
// - and this section has visible children // - and this section has visible children
// - and there is a visible menu item behind and it has no top separator // - and there is a visible menu item behind
// - and the visible menu item is not an embedded section (that creates its own separator)
var var
ItemBehind: TIDEMenuItem; ItemBehind: TIDEMenuItem;
i: Integer; i: Integer;
@ -1021,7 +1018,7 @@ var
NewNeedBottomSeparator:=false; NewNeedBottomSeparator:=false;
//debugln('TIDEMenuSection.UpdateNeedBottomSeparator Name="',Name,'" ChildrenAsSubMenu=',dbgs(ChildrenAsSubMenu),' Section=',dbgs(Section<>nil),' VisibleActive=',dbgs(VisibleActive)); //debugln('TIDEMenuSection.UpdateNeedBottomSeparator Name="',Name,'" ChildrenAsSubMenu=',dbgs(ChildrenAsSubMenu),' Section=',dbgs(Section<>nil),' VisibleActive=',dbgs(VisibleActive));
if (not ChildrenAsSubMenu) and (Section<>nil) and VisibleActive then begin if (not ChildrenAsSubMenu) and (Section<>nil) and VisibleActive then begin
// check for any visible item in front // check for any visible item behind
i:=SectionIndex+1; i:=SectionIndex+1;
while i<Section.Count do begin while i<Section.Count do begin
ItemBehind:=Section[i]; ItemBehind:=Section[i];