removed editor hint handling from main form

This commit is contained in:
Basile Burg 2015-03-07 01:49:00 +01:00
parent 79d5e96368
commit cace5826fd
2 changed files with 1 additions and 32 deletions

View File

@ -10,7 +10,7 @@ object CEMainForm: TCEMainForm
OnCloseQuery = FormCloseQuery OnCloseQuery = FormCloseQuery
OnDropFiles = FormDropFiles OnDropFiles = FormDropFiles
ShowHint = True ShowHint = True
LCLVersion = '1.4.0.1' LCLVersion = '1.4.0.2'
object mainMenu: TMainMenu object mainMenu: TMainMenu
Images = imgList Images = imgList
top = 1 top = 1
@ -3343,7 +3343,6 @@ object CEMainForm: TCEMainForm
end end
object ApplicationProperties1: TApplicationProperties object ApplicationProperties1: TApplicationProperties
OnException = ApplicationProperties1Exception OnException = ApplicationProperties1Exception
OnShowHint = ApplicationProperties1ShowHint
left = 96 left = 96
end end
end end

View File

@ -171,8 +171,6 @@ type
procedure actProjSourceExecute(Sender: TObject); procedure actProjSourceExecute(Sender: TObject);
procedure actEdUnIndentExecute(Sender: TObject); procedure actEdUnIndentExecute(Sender: TObject);
procedure ApplicationProperties1Exception(Sender: TObject; E: Exception); procedure ApplicationProperties1Exception(Sender: TObject; E: Exception);
procedure ApplicationProperties1ShowHint(var HintStr: string;
var CanShow: Boolean; var HintInfo: THintInfo);
procedure FormCloseQuery(Sender: TObject; var CanClose: boolean); procedure FormCloseQuery(Sender: TObject; var CanClose: boolean);
procedure FormDropFiles(Sender: TObject; const FileNames: array of String); procedure FormDropFiles(Sender: TObject; const FileNames: array of String);
private private
@ -879,34 +877,6 @@ begin
// //
srcLst.Clear; srcLst.Clear;
end; end;
procedure TCEMainForm.ApplicationProperties1ShowHint(var HintStr: string;
var CanShow: Boolean; var HintInfo: THintInfo);
begin
// TODO-crefactor: move this to TCESynMemo or TCEEditorWidget.
// TODO-cbugfix: first DDoc hint, window rect is wrong.
if (fDoc <> nil) and fDoc.Focused and fDoc.isDSource then
begin
TCEEditorHintWindow.FontSize := fDoc.Font.Size;
HintInfo.HintWindowClass := TCEEditorHintWindow;
HintInfo.HideTimeout := 120000;
HintInfo.CursorRect.Left := fDoc.CaretXPix;
HintInfo.CursorRect.Top := fDoc.CaretYPix;
// note: non-default color allows non-themed paint() which allows custom font-size to be handled.
HintInfo.HintColor := clInfoBk + $01010100;
//
DcdWrapper.getDdocFromCursor(HintStr);
if (length(HintStr) > 0) then
if Hintstr[1] = #13 then
Hintstr := Hintstr[2..length(Hintstr)];
if (length(HintStr) > 0) then
if Hintstr[1] = #10 then
Hintstr := Hintstr[2..length(Hintstr)];
end else
HintInfo.HideTimeout := 2500;
//
CanShow := HintStr <> '';
end;
{$ENDREGION} {$ENDREGION}
{$REGION ICEMultiDocMonitor ----------------------------------------------------} {$REGION ICEMultiDocMonitor ----------------------------------------------------}