added searchresultsview.lfm

git-svn-id: trunk@4806 -
This commit is contained in:
mattias 2003-11-15 14:04:16 +00:00
parent 0d9aa73411
commit 761741953c
6 changed files with 76 additions and 7 deletions

2
.gitattributes vendored
View File

@ -450,6 +450,8 @@ ide/publishprojectdlg.lfm svneol=native#text/plain
ide/publishprojectdlg.lrs svneol=native#text/pascal
ide/publishprojectdlg.pas svneol=native#text/pascal
ide/runparamsopts.pas svneol=native#text/pascal
ide/searchresultview.lfm svneol=native#text/plain
ide/searchresultview.lrs svneol=native#text/pascal
ide/searchresultview.pp svneol=native#text/pascal
ide/showcompileropts.lfm svneol=native#text/plain
ide/showcompileropts.lrs svneol=native#text/pascal

View File

@ -273,9 +273,10 @@ type
procedure OnSrcNotebookShowHintForSource(SrcEdit: TSourceEditor;
ClientPos: TPoint; CaretPos: TPoint);
procedure OnSrcNoteBookShowUnitInfo(Sender: TObject);
procedure OnSrcNotebookToggleFormUnit(Sender : TObject);
procedure OnSrcNotebookToggleFormUnit(Sender: TObject);
procedure OnSrcNotebookToggleObjectInsp(Sender: TObject);
procedure OnSrcNotebookViewJumpHistory(Sender : TObject);
procedure OnSrcNotebookViewJumpHistory(Sender: TObject);
procedure OnSrcNotebookShowSearchResultsView(Sender: TObject);
// ObjectInspector + PropertyEditorHook events
procedure OIOnSelectComponents(Sender: TObject);
@ -1213,6 +1214,7 @@ begin
SourceNotebook.OnToggleFormUnitClicked := @OnSrcNotebookToggleFormUnit;
SourceNotebook.OnToggleObjectInspClicked:= @OnSrcNotebookToggleObjectInsp;
SourceNotebook.OnViewJumpHistory := @OnSrcNotebookViewJumpHistory;
SourceNotebook.OnShowSearchResultsView := @OnSrcNotebookShowSearchResultsView;
DebugBoss.ConnectSourceNotebookEvents;
// connect search menu to sourcenotebook
@ -9417,6 +9419,11 @@ begin
[mbOk],0);
end;
procedure TMainIDE.OnSrcNotebookShowSearchResultsView(Sender: TObject);
begin
CreateSearchResultWindow;
end;
procedure TMainIDE.OnApplicationUserInput(Sender: TObject; Msg: Cardinal);
begin
if ToolStatus=itCodeTools then begin
@ -10084,6 +10091,9 @@ end.
{ =============================================================================
$Log$
Revision 1.668 2003/11/15 14:04:16 mattias
added searchresultsview.lfm
Revision 1.667 2003/11/15 13:07:09 mattias
added ambigious unit check for IDE

32
ide/searchresultview.lfm Normal file
View File

@ -0,0 +1,32 @@
object SearchResultsView: TSearchResultsView
CAPTION = 'SearchResultsView'
CLIENTHEIGHT = 225
CLIENTWIDTH = 799
ONCREATE = Form1Create
HORZSCROLLBAR.PAGE = 800
VERTSCROLLBAR.PAGE = 226
LEFT = 280
HEIGHT = 225
TOP = 389
WIDTH = 799
object ResultsNoteBook: TNOTEBOOK
ALIGN = albottom
ANCHORS = [aktop, akleft]
ONCLOSETABCLICKED = ResultsNoteBookClosetabclicked
OPTIONS = [nboshowclosebuttons, nbomultiline]
HEIGHT = 185
TOP = 40
WIDTH = 799
end
object btnSearchAgain: TBUTTON
ANCHORS = [aktop, akleft]
CAPTION = 'Search Again'
TABSTOP = True
TABORDER = 1
ONCLICK = btnSearchAgainClick
LEFT = 8
HEIGHT = 25
TOP = 8
WIDTH = 115
end
end

15
ide/searchresultview.lrs Normal file
View File

@ -0,0 +1,15 @@
{ This is an automatically generated lazarus resource file }
LazarusResources.Add('TSearchResultsView','FORMDATA',[
'TPF0'#18'TSearchResultsView'#17'SearchResultsView'#7'CAPTION'#6#17'SearchRes'
+'ultsView'#12'CLIENTHEIGHT'#3#225#0#11'CLIENTWIDTH'#3#31#3#8'ONCREATE'#7#11
+'Form1Create'#18'HORZSCROLLBAR.PAGE'#3' '#3#18'VERTSCROLLBAR.PAGE'#3#226#0#4
+'LEFT'#3#24#1#6'HEIGHT'#3#225#0#3'TOP'#3#133#1#5'WIDTH'#3#31#3#0#9'TNOTEBOOK'
+#15'ResultsNoteBook'#5'ALIGN'#7#8'albottom'#7'ANCHORS'#11#5'aktop'#6'akleft'
+#0#17'ONCLOSETABCLICKED'#7#30'ResultsNoteBookClosetabclicked'#7'OPTIONS'#11
+#19'nboshowclosebuttons'#12'nbomultiline'#0#6'HEIGHT'#3#185#0#3'TOP'#2'('#5
+'WIDTH'#3#31#3#0#0#7'TBUTTON'#14'btnSearchAgain'#7'ANCHORS'#11#5'aktop'#6'ak'
+'left'#0#7'CAPTION'#6#12'Search Again'#7'TABSTOP'#9#8'TABORDER'#2#1#7'ONCLIC'
+'K'#7#19'btnSearchAgainClick'#4'LEFT'#2#8#6'HEIGHT'#2#25#3'TOP'#2#8#5'WIDTH'
+#2's'#0#0#0
]);

View File

@ -201,7 +201,7 @@ var
i: integer;
SearchObj: TLazSearch;
begin
result:= nil;
Result:= nil;
SearchObj:= TLazSearch.Create;
SearchObj.SearchString:= SearchText;
if Assigned(ResultsNoteBook) then
@ -233,7 +233,8 @@ begin
end;//else
end;//
end;//if
result:= NewListBox.Items;
if NewListBox<>nil then
Result:= NewListBox.Items;
end;//AddResult
procedure TSearchResultsView.ListboxDrawitem(Control: TWinControl;
@ -411,7 +412,7 @@ var
i: integer;
ThePage: TPage;
begin
result:= nil;
Result:= nil;
if (APageIndex > -1) and (APageIndex < ResultsNoteBook.Pages.Count) then
begin
ThePage:= ResultsNoteBook.Page[APageIndex];
@ -430,7 +431,7 @@ begin
end;//GetListBox
initialization
{ $I searchresultview.lrs}
{$I searchresultview.lrs}
end.

View File

@ -408,6 +408,7 @@ type
fAutoFocusLock: integer;
fCustomPopupMenuItems: TList;
FOnShowSearchResultsView: TNotifyEvent;
// PopupMenu
Procedure BuildPopupMenu;
@ -522,6 +523,7 @@ type
procedure ReplaceClicked(Sender : TObject);
procedure IncrementalFindClicked(Sender : TObject);
procedure FindInFiles(AProject: TProject);
procedure ShowSearchResultsView;
procedure GotoLineClicked(Sender: TObject);
@ -615,6 +617,8 @@ type
read FOnViewJumpHistory write FOnViewJumpHistory;
property OnAddWatchAtCursor: TOnAddWatch
read FOnAddWatchAtCursor write FOnAddWatchAtCursor;
property OnShowSearchResultsView: TNotifyEvent
read FOnShowSearchResultsView write FOnShowSearchResultsView;
end;
//=============================================================================
@ -3408,7 +3412,7 @@ Begin
end;//if
try
SearchForm:= TSearchForm.Create(SearchResultsView);
SearchResultsView.ShowOnTop;
ShowSearchResultsView;
with SearchForm do
begin
SearchOptions:= FindInFilesDialog.Options;
@ -3444,6 +3448,11 @@ Begin
end;//if
End;//FindInFilesClicked
procedure TSourceNotebook.ShowSearchResultsView;
begin
if Assigned(OnShowSearchResultsView) then OnShowSearchResultsView(Self);
end;
procedure TSourceNotebook.GotoLineClicked(Sender: TObject);
var SrcEdit: TSourceEditor;
begin