IDEIntf: less unit dependencies, less hints, fixed passing AsLast

git-svn-id: trunk@44243 -
This commit is contained in:
mattias 2014-02-26 08:51:28 +00:00
parent 8a1eedadd8
commit 27d7dc5448
4 changed files with 9 additions and 13 deletions

View File

@ -30,7 +30,7 @@ unit IDECommands;
interface
uses
Classes, SysUtils, LCLProc, Forms, LCLType, Menus, PropEdits, TextTools;
Classes, SysUtils, LCLProc, Forms, LCLType, Menus, PropEdits;
const
{ editor commands constants. see syneditkeycmds.pp for more
@ -1571,15 +1571,11 @@ const
);
function IdentToIDECommand(const Ident: string; var Cmd: longint): boolean;
var
IDECommand: TIDECommand;
begin
Result := IdentToInt(Ident, Cmd, IDEEditorCommandStrs);
end;
function IDECommandToIdent(Cmd: longint; var Ident: string): boolean;
var
IDECommand: TIDECommand;
begin
Result := IntToIdent(Cmd, Ident, IDEEditorCommandStrs);
end;

View File

@ -211,7 +211,7 @@ end;
uses
Classes, SysUtils, Forms, LCLProc,
TextTools, IDECommands, IDEExternToolIntf;
TextTools, IDECommands;
type

View File

@ -18,7 +18,7 @@ unit MenuIntf;
interface
uses
Classes, SysUtils, LCLType, LCLProc, Menus, ImgList, Graphics, LazHelpIntf,
Classes, SysUtils, LCLType, LCLProc, Menus, ImgList, Graphics,
IDECommands, IDEImagesIntf;
type
@ -1509,7 +1509,7 @@ end;
procedure TIDEMenuSection.AddHandlerOnShow(const OnShowEvent: TNotifyEvent;
AsLast: boolean);
begin
AddHandler(imshtOnShow,TMethod(OnShowEvent));
AddHandler(imshtOnShow,TMethod(OnShowEvent),AsLast);
end;
procedure TIDEMenuSection.RemoveHandlerOnShow(const OnShowEvent: TNotifyEvent);
@ -1585,7 +1585,7 @@ procedure TIDEMenuSection.AddHandler(HandlerType: TIDEMenuSectionHandlerType;
begin
if FSectionHandlers[HandlerType]=nil then
FSectionHandlers[HandlerType]:=TMethodList.Create;
FSectionHandlers[HandlerType].Add(AMethod);
FSectionHandlers[HandlerType].Add(AMethod,AsLast);
end;
procedure TIDEMenuSection.RemoveHandler(

View File

@ -190,10 +190,10 @@ type
procedure CompletePrefix(var Prefix: string); virtual; abstract;
function HasCustomPaint: boolean; virtual;
procedure PaintItem(const AKey: string; ACanvas: TCanvas;
X, Y: integer; ItemSelected: boolean; Index: integer); virtual;
function MeasureItem(const AKey: string; ACanvas: TCanvas;
ItemSelected: boolean; Index: integer): TPoint; virtual;
procedure PaintItem(const {%H-}AKey: string; {%H-}ACanvas: TCanvas;
{%H-}X, {%H-}Y: integer; {%H-}ItemSelected: boolean; {%H-}Index: integer); virtual;
function MeasureItem(const {%H-}AKey: string; {%H-}ACanvas: TCanvas;
{%H-}ItemSelected: boolean; {%H-}Index: integer): TPoint; virtual;
end;
{ TSourceEditorWindowInterface }