mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-22 01:59:12 +02:00
Started a FIND dialog box.
Shane git-svn-id: trunk@23 -
This commit is contained in:
parent
53be7564f4
commit
44ff6adb20
1
.gitattributes
vendored
1
.gitattributes
vendored
@ -28,6 +28,7 @@ examples/trackbar.pp svneol=native#text/pascal
|
|||||||
ide/compiler.pp svneol=native#text/pascal
|
ide/compiler.pp svneol=native#text/pascal
|
||||||
ide/compileroptions.pp svneol=native#text/pascal
|
ide/compileroptions.pp svneol=native#text/pascal
|
||||||
ide/dlgmessage.pp svneol=native#text/pascal
|
ide/dlgmessage.pp svneol=native#text/pascal
|
||||||
|
ide/find_dlg.pp svneol=native#text/pascal
|
||||||
ide/global.inc svneol=native#text/pascal
|
ide/global.inc svneol=native#text/pascal
|
||||||
ide/global.pp svneol=native#text/pascal
|
ide/global.pp svneol=native#text/pascal
|
||||||
ide/idecomp.pp svneol=native#text/pascal
|
ide/idecomp.pp svneol=native#text/pascal
|
||||||
|
166
ide/find_dlg.pp
Normal file
166
ide/find_dlg.pp
Normal file
@ -0,0 +1,166 @@
|
|||||||
|
|
||||||
|
{
|
||||||
|
/***************************************************************************
|
||||||
|
find_dlg.pp - Find dialog
|
||||||
|
-------------------
|
||||||
|
|
||||||
|
Initial Revision : Tue Aug 08 14:49 CST 2000
|
||||||
|
|
||||||
|
|
||||||
|
***************************************************************************/
|
||||||
|
|
||||||
|
/***************************************************************************
|
||||||
|
* *
|
||||||
|
* This program is free software; you can redistribute it and/or modify *
|
||||||
|
* it under the terms of the GNU General Public License as published by *
|
||||||
|
* the Free Software Foundation; either version 2 of the License, or *
|
||||||
|
* (at your option) any later version. *
|
||||||
|
* *
|
||||||
|
***************************************************************************/
|
||||||
|
}
|
||||||
|
{$H+}
|
||||||
|
unit find_dlg;
|
||||||
|
|
||||||
|
{$mode objfpc}
|
||||||
|
|
||||||
|
interface
|
||||||
|
|
||||||
|
uses
|
||||||
|
classes,LclLinux, stdctrls,forms,buttons,comctrls,
|
||||||
|
Controls,graphics,extctrls;
|
||||||
|
|
||||||
|
|
||||||
|
type
|
||||||
|
|
||||||
|
TFind = class(TFORM)
|
||||||
|
lblTexttofind : TLabel;
|
||||||
|
edtTexttoFind: TEdit;
|
||||||
|
btnOK : TButton;
|
||||||
|
btnCancel : TButton;
|
||||||
|
btnHelp : TButton;
|
||||||
|
gbGroupBox : TGroupBox;
|
||||||
|
|
||||||
|
cbCaseSensitive : TCheckbox;
|
||||||
|
cbWholeWords : TCheckBox;
|
||||||
|
cbRegularExpressions : TCheckBox;
|
||||||
|
|
||||||
|
rgForwardBack : TRadioGroup;
|
||||||
|
|
||||||
|
{ event handlers }
|
||||||
|
procedure btnOKClicked(Sender : TObject);
|
||||||
|
procedure btnCancelClicked(Sender : TObject);
|
||||||
|
procedure btnHelpClicked(Sender : TObject);
|
||||||
|
private
|
||||||
|
protected
|
||||||
|
public
|
||||||
|
constructor Create(AOwner: TComponent); override;
|
||||||
|
end;
|
||||||
|
|
||||||
|
var
|
||||||
|
dlgFind1 : TFind;
|
||||||
|
|
||||||
|
implementation
|
||||||
|
|
||||||
|
constructor TFind.Create(AOwner: TComponent);
|
||||||
|
begin
|
||||||
|
inherited Create(AOwner);
|
||||||
|
|
||||||
|
Caption := 'Find';
|
||||||
|
Left := 0;
|
||||||
|
Top := 0;
|
||||||
|
Width := 450;
|
||||||
|
height := 395;
|
||||||
|
Position:= poScreenCenter;
|
||||||
|
|
||||||
|
lblTextToFind := TLabel.Create(self);
|
||||||
|
with lblTexttoFind do
|
||||||
|
Begin
|
||||||
|
parent := Self;
|
||||||
|
Left := 10;
|
||||||
|
Top := 5;
|
||||||
|
Caption := 'Text to find:';
|
||||||
|
Visible := True;
|
||||||
|
end;
|
||||||
|
|
||||||
|
edtTextToFind := TEdit.Create(self);
|
||||||
|
with edtTexttoFind do
|
||||||
|
Begin
|
||||||
|
parent := Self;
|
||||||
|
Left := lblTextToFind.LEft+lblTextToFind.Width+5;
|
||||||
|
Top := 5;
|
||||||
|
Visible := True;
|
||||||
|
end;
|
||||||
|
|
||||||
|
|
||||||
|
gbGroupBox := TGroupBox.Create(self);
|
||||||
|
with gbGroupBox do
|
||||||
|
begin
|
||||||
|
parent := Self;
|
||||||
|
Left := 10;
|
||||||
|
Top := 35;
|
||||||
|
Width :=(Self.Width div 2) - 10;
|
||||||
|
Height := (Self.Height div 3) -35;
|
||||||
|
Caption := 'Options';
|
||||||
|
Visible := True;
|
||||||
|
end;
|
||||||
|
|
||||||
|
cbCaseSensitive := TCheckbox.Create(self);
|
||||||
|
cbWholeWords := TCheckBox.Create(self);
|
||||||
|
cbRegularExpressions := TCheckBox.Create(Self);
|
||||||
|
|
||||||
|
with cbCaseSensitive do
|
||||||
|
begin
|
||||||
|
parent := gbGroupBox;
|
||||||
|
left := 5;
|
||||||
|
top := 5;
|
||||||
|
Caption := 'Case Sensitive';
|
||||||
|
visible := True;
|
||||||
|
end;
|
||||||
|
|
||||||
|
with cbWholeWords do
|
||||||
|
begin
|
||||||
|
parent := gbGroupBox;
|
||||||
|
left := 5;
|
||||||
|
top := 25;
|
||||||
|
Caption := 'Whole Words';
|
||||||
|
visible := True;
|
||||||
|
end;
|
||||||
|
|
||||||
|
with cbRegularExpressions do
|
||||||
|
begin
|
||||||
|
parent := gbGroupBox;
|
||||||
|
left := 5;
|
||||||
|
top := 50;
|
||||||
|
Caption := 'Regular Expressions';
|
||||||
|
visible := True;
|
||||||
|
end;
|
||||||
|
|
||||||
|
rgForwardBack := TRadioGroup.Create(self);
|
||||||
|
with rgForwardBack do
|
||||||
|
begin
|
||||||
|
parent := self;
|
||||||
|
left := (Self.Width div 2) +5;
|
||||||
|
top := 35;
|
||||||
|
Height := (Self.Height div 3) -35;
|
||||||
|
width := (Self.Width div 2) -10;
|
||||||
|
Caption := 'Direction';
|
||||||
|
Items.Add('Forward');
|
||||||
|
Items.Add('Backward');
|
||||||
|
visible := True;
|
||||||
|
end;
|
||||||
|
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TFind.btnOKClicked(Sender : TObject);
|
||||||
|
Begin
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TFind.btnCancelClicked(Sender : TObject);
|
||||||
|
Begin
|
||||||
|
End;
|
||||||
|
|
||||||
|
procedure TFInd.btnHelpClicked(Sender : TObject);
|
||||||
|
Begin
|
||||||
|
end;
|
||||||
|
|
||||||
|
end.
|
@ -35,8 +35,8 @@ uses
|
|||||||
compileroptions,
|
compileroptions,
|
||||||
IdeEditor,
|
IdeEditor,
|
||||||
viewunit_dlg, //dialog used to list the units in a project
|
viewunit_dlg, //dialog used to list the units in a project
|
||||||
viewform_dlg //dialog to display the forms in the project
|
viewform_dlg, //dialog to display the forms in the project
|
||||||
;
|
Find_dlg;
|
||||||
|
|
||||||
var
|
var
|
||||||
SplashForm: TSplashForm;
|
SplashForm: TSplashForm;
|
||||||
@ -58,7 +58,8 @@ begin
|
|||||||
Application.CreateForm(TIDEEditor, IdeEditor1);
|
Application.CreateForm(TIDEEditor, IdeEditor1);
|
||||||
Application.CreateForm(TViewUnits1, ViewUnits1);
|
Application.CreateForm(TViewUnits1, ViewUnits1);
|
||||||
Application.CreateForm(TViewForms1, ViewForms1);
|
Application.CreateForm(TViewForms1, ViewForms1);
|
||||||
|
Application.CreateForm(TFind, dlgFind1);
|
||||||
|
|
||||||
SplashForm.StartTimer;
|
SplashForm.StartTimer;
|
||||||
Application.Run;
|
Application.Run;
|
||||||
end.
|
end.
|
||||||
@ -66,6 +67,10 @@ end.
|
|||||||
|
|
||||||
{
|
{
|
||||||
$Log$
|
$Log$
|
||||||
|
Revision 1.2 2000/08/08 18:52:14 lazarus
|
||||||
|
Started a FIND dialog box.
|
||||||
|
Shane
|
||||||
|
|
||||||
Revision 1.1 2000/07/13 10:27:47 michael
|
Revision 1.1 2000/07/13 10:27:47 michael
|
||||||
+ Initial import
|
+ Initial import
|
||||||
|
|
||||||
|
14
ide/main.pp
14
ide/main.pp
@ -133,6 +133,8 @@ type
|
|||||||
procedure mnuRunProjectClicked(Sender : TObject);
|
procedure mnuRunProjectClicked(Sender : TObject);
|
||||||
procedure mnuViewCodeExplorerClick(Sender : TObject);
|
procedure mnuViewCodeExplorerClick(Sender : TObject);
|
||||||
procedure mnuViewMessagesClick(Sender : TObject);
|
procedure mnuViewMessagesClick(Sender : TObject);
|
||||||
|
procedure mnuSearchFindClicked(Sender : TObject);
|
||||||
|
|
||||||
procedure ControlClick(Sender : TObject);
|
procedure ControlClick(Sender : TObject);
|
||||||
procedure MessageViewDblClick(Sender : TObject);
|
procedure MessageViewDblClick(Sender : TObject);
|
||||||
procedure DesignFormMouseUp(Sender: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
|
procedure DesignFormMouseUp(Sender: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
|
||||||
@ -181,7 +183,7 @@ Form1 : TForm1;
|
|||||||
Taginc : Integer;
|
Taginc : Integer;
|
||||||
implementation
|
implementation
|
||||||
uses
|
uses
|
||||||
TestForm, IDEEditor,mwCustomEdit,gtk,ViewUnit_dlg,ViewForm_dlg;
|
TestForm, IDEEditor,mwCustomEdit,gtk,ViewUnit_dlg,ViewForm_dlg,Find_dlg;
|
||||||
|
|
||||||
constructor TForm1.Create(AOwner: TComponent);
|
constructor TForm1.Create(AOwner: TComponent);
|
||||||
var
|
var
|
||||||
@ -783,6 +785,7 @@ itmFileNew := TMenuItem.Create(Self);
|
|||||||
//--------------
|
//--------------
|
||||||
itmSearchFind := TMenuItem.Create(nil);
|
itmSearchFind := TMenuItem.Create(nil);
|
||||||
itmSearchFind.caption := 'Find';
|
itmSearchFind.caption := 'Find';
|
||||||
|
itmSearchFind.OnClick := @mnuSearchFindClicked;
|
||||||
mnuSearch.add(itmSearchFind);
|
mnuSearch.add(itmSearchFind);
|
||||||
|
|
||||||
//--------------
|
//--------------
|
||||||
@ -1775,6 +1778,11 @@ Begin
|
|||||||
Messagedlg.Show;
|
Messagedlg.Show;
|
||||||
End;
|
End;
|
||||||
|
|
||||||
|
Procedure TForm1.mnuSearchFindClicked(Sender : TObject);
|
||||||
|
Begin
|
||||||
|
dlgFind1.Show;
|
||||||
|
End;
|
||||||
|
|
||||||
|
|
||||||
Procedure TForm1.mnuNewProjectClicked(Sender : TObject);
|
Procedure TForm1.mnuNewProjectClicked(Sender : TObject);
|
||||||
var
|
var
|
||||||
@ -2180,6 +2188,10 @@ end.
|
|||||||
{ =============================================================================
|
{ =============================================================================
|
||||||
|
|
||||||
$Log$
|
$Log$
|
||||||
|
Revision 1.3 2000/08/08 18:52:14 lazarus
|
||||||
|
Started a FIND dialog box.
|
||||||
|
Shane
|
||||||
|
|
||||||
Revision 1.2 2000/08/07 19:15:05 lazarus
|
Revision 1.2 2000/08/07 19:15:05 lazarus
|
||||||
Added the Search menu to the IDE.
|
Added the Search menu to the IDE.
|
||||||
Shane
|
Shane
|
||||||
|
Loading…
Reference in New Issue
Block a user