mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-15 18:39:09 +02:00
*** empty log message ***
git-svn-id: trunk@214 -
This commit is contained in:
parent
7553c2f49b
commit
720119a63b
3
.gitattributes
vendored
3
.gitattributes
vendored
@ -31,8 +31,6 @@ designer/jitforms.pp svneol=native#text/pascal
|
|||||||
designer/lazarus_control_images.lrs svneol=native#text/pascal
|
designer/lazarus_control_images.lrs svneol=native#text/pascal
|
||||||
designer/objectinspector.pp svneol=native#text/pascal
|
designer/objectinspector.pp svneol=native#text/pascal
|
||||||
designer/propedits.pp svneol=native#text/pascal
|
designer/propedits.pp svneol=native#text/pascal
|
||||||
designer/test_obj_inspector.pp svneol=native#text/pascal
|
|
||||||
designer/test_unit.pp svneol=native#text/pascal
|
|
||||||
designer/widgetstack.pp svneol=native#text/pascal
|
designer/widgetstack.pp svneol=native#text/pascal
|
||||||
examples/bitbtnform.pp svneol=native#text/pascal
|
examples/bitbtnform.pp svneol=native#text/pascal
|
||||||
examples/bitbutton.pp svneol=native#text/pascal
|
examples/bitbutton.pp svneol=native#text/pascal
|
||||||
@ -71,7 +69,6 @@ ide/dlgmessage.lrs svneol=native#text/pascal
|
|||||||
ide/dlgmessage.pp svneol=native#text/pascal
|
ide/dlgmessage.pp svneol=native#text/pascal
|
||||||
ide/editoroptions.pp svneol=native#text/pascal
|
ide/editoroptions.pp svneol=native#text/pascal
|
||||||
ide/environmentopts.pp svneol=native#text/pascal
|
ide/environmentopts.pp svneol=native#text/pascal
|
||||||
ide/find_dlg.pp svneol=native#text/pascal
|
|
||||||
ide/findreplacedialog.pp svneol=native#text/pascal
|
ide/findreplacedialog.pp svneol=native#text/pascal
|
||||||
ide/formeditor.pp svneol=native#text/pascal
|
ide/formeditor.pp svneol=native#text/pascal
|
||||||
ide/global.inc svneol=native#text/pascal
|
ide/global.inc svneol=native#text/pascal
|
||||||
|
@ -1,13 +0,0 @@
|
|||||||
program test_obj_inspector;
|
|
||||||
|
|
||||||
{$MODE OBJFPC}
|
|
||||||
|
|
||||||
uses
|
|
||||||
classes, forms, sysutils, test_unit;
|
|
||||||
|
|
||||||
begin
|
|
||||||
Application.Initialize; { calls InitProcedure which starts up GTK }
|
|
||||||
Application.CreateForm(TForm1, Form1);
|
|
||||||
Application.Run;
|
|
||||||
end.
|
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
261
ide/find_dlg.pp
261
ide/find_dlg.pp
@ -1,261 +0,0 @@
|
|||||||
|
|
||||||
{
|
|
||||||
/***************************************************************************
|
|
||||||
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,Dialogs,VCLGlobals,LMessages;
|
|
||||||
|
|
||||||
|
|
||||||
type
|
|
||||||
|
|
||||||
TFindDialog = class(TForm)
|
|
||||||
lblTexttofind : TLabel;
|
|
||||||
edtTexttoFind: TEdit;
|
|
||||||
btnOK : TButton;
|
|
||||||
btnCancel : TButton;
|
|
||||||
btnHelp : TButton;
|
|
||||||
gbGroupBox : TGroupBox;
|
|
||||||
|
|
||||||
cbCaseSensitive : TCheckbox;
|
|
||||||
cbWholeWords : TCheckBox;
|
|
||||||
cbRegularExpressions : TCheckBox;
|
|
||||||
|
|
||||||
rgForwardBack : TRadioGroup;
|
|
||||||
rgScope : TRadioGroup;
|
|
||||||
rgOrigin : TRadioGroup;
|
|
||||||
{ event handlers }
|
|
||||||
procedure btnOKClicked(Sender : TObject);
|
|
||||||
procedure btnCancelClicked(Sender : TObject);
|
|
||||||
procedure btnHelpClicked(Sender : TObject);
|
|
||||||
Procedure FindDialogOnActivate(Sender : TObject);
|
|
||||||
private
|
|
||||||
FFindText : String;
|
|
||||||
FOnFind : TNotifyEvent;
|
|
||||||
protected
|
|
||||||
public
|
|
||||||
constructor Create(AOwner: TComponent); override;
|
|
||||||
property OnFind : TNotifyEvent read FonFind write FOnFind;
|
|
||||||
property FIndText : String read FFindText write FFindText;
|
|
||||||
end;
|
|
||||||
|
|
||||||
|
|
||||||
var
|
|
||||||
FindDialog1 : TFindDialog;
|
|
||||||
implementation
|
|
||||||
|
|
||||||
constructor TFindDialog.Create(AOwner: TComponent);
|
|
||||||
begin
|
|
||||||
inherited Create(AOwner);
|
|
||||||
Name := 'FindDialog1';
|
|
||||||
|
|
||||||
Caption := 'Find';
|
|
||||||
Setbounds(0,0,450,250);
|
|
||||||
Position:= poScreenCenter;
|
|
||||||
|
|
||||||
lblTextToFind := TLabel.Create(self);
|
|
||||||
with lblTexttoFind do
|
|
||||||
Begin
|
|
||||||
parent := Self;
|
|
||||||
Left := 10;
|
|
||||||
Top := 5;
|
|
||||||
Caption := 'Text to find:';
|
|
||||||
Name := 'lblTextToFind';
|
|
||||||
Visible := True;
|
|
||||||
end;
|
|
||||||
|
|
||||||
edtTextToFind := TEdit.Create(self);
|
|
||||||
with edtTexttoFind do
|
|
||||||
Begin
|
|
||||||
parent := Self;
|
|
||||||
Left := lblTextToFind.LEft+lblTextToFind.Width+5;
|
|
||||||
Width := Self.Width - Left - 5;
|
|
||||||
Top := 5;
|
|
||||||
Name := 'edtTextToFind';
|
|
||||||
Visible := True;
|
|
||||||
end;
|
|
||||||
|
|
||||||
|
|
||||||
gbGroupBox := TGroupBox.Create(self);
|
|
||||||
with gbGroupBox do
|
|
||||||
begin
|
|
||||||
parent := Self;
|
|
||||||
Left := 10;
|
|
||||||
Top := 30;
|
|
||||||
Width :=(Self.Width div 2) - 10;
|
|
||||||
Height := (Self.Height div 2) -35;
|
|
||||||
Caption := 'Options';
|
|
||||||
Name := 'gbGroupBox';
|
|
||||||
Visible := True;
|
|
||||||
end;
|
|
||||||
|
|
||||||
cbCaseSensitive := TCheckbox.Create(self);
|
|
||||||
cbWholeWords := TCheckBox.Create(self);
|
|
||||||
cbRegularExpressions := TCheckBox.Create(Self);
|
|
||||||
|
|
||||||
with cbCaseSensitive do
|
|
||||||
begin
|
|
||||||
parent := gbGroupBox;
|
|
||||||
left := 5;
|
|
||||||
top := 3;
|
|
||||||
Caption := 'Case Sensitive';
|
|
||||||
Name := 'cbCaseSensitive';
|
|
||||||
visible := True;
|
|
||||||
end;
|
|
||||||
|
|
||||||
with cbWholeWords do
|
|
||||||
begin
|
|
||||||
parent := gbGroupBox;
|
|
||||||
left := 5;
|
|
||||||
top := 20;
|
|
||||||
Caption := 'Whole Words';
|
|
||||||
Name := 'cbWholeWords';
|
|
||||||
visible := True;
|
|
||||||
end;
|
|
||||||
|
|
||||||
with cbRegularExpressions do
|
|
||||||
begin
|
|
||||||
parent := gbGroupBox;
|
|
||||||
left := 5;
|
|
||||||
top := 37;
|
|
||||||
Caption := 'Regular Expressions';
|
|
||||||
Name := 'cbRegularExpressions';
|
|
||||||
visible := True;
|
|
||||||
end;
|
|
||||||
|
|
||||||
rgForwardBack := TRadioGroup.Create(self);
|
|
||||||
with rgForwardBack do
|
|
||||||
begin
|
|
||||||
parent := self;
|
|
||||||
left := (Self.Width div 2) +5;
|
|
||||||
top := 30;
|
|
||||||
Height := (Self.Height div 2) -35;
|
|
||||||
width := (Self.Width div 2) -10;
|
|
||||||
Caption := 'Direction';
|
|
||||||
Items.Add('Forward');
|
|
||||||
Items.Add('Backward');
|
|
||||||
Name := 'rgForwardBack';
|
|
||||||
visible := True;
|
|
||||||
ItemIndex := 0;
|
|
||||||
end;
|
|
||||||
|
|
||||||
rgScope := TRadioGroup.Create(self);
|
|
||||||
with rgScope do
|
|
||||||
begin
|
|
||||||
parent := self;
|
|
||||||
left := 10;
|
|
||||||
top := (Self.Height div 2)+5;
|
|
||||||
Height := (Self.Height div 2)-35;
|
|
||||||
width := (Self.Width div 2) -10;
|
|
||||||
Caption := 'Scope';
|
|
||||||
Items.Add('Global');
|
|
||||||
Items.Add('Selected Text');
|
|
||||||
Name := 'rgScope';
|
|
||||||
visible := True;
|
|
||||||
ItemIndex := 0;
|
|
||||||
end;
|
|
||||||
|
|
||||||
rgOrigin := TRadioGroup.Create(self);
|
|
||||||
with rgOrigin do
|
|
||||||
begin
|
|
||||||
parent := self;
|
|
||||||
left := (Self.Width div 2) +5;
|
|
||||||
top := (Self.Height div 2) + 5;
|
|
||||||
Height := (Self.Height div 2) -35;
|
|
||||||
width := (Self.Width div 2) -10;
|
|
||||||
Caption := 'Origin';
|
|
||||||
Items.Add('From Cursor');
|
|
||||||
Items.Add('Entire Scope');
|
|
||||||
Name := 'rgOrigin';
|
|
||||||
visible := True;
|
|
||||||
ItemIndex := 1;
|
|
||||||
end;
|
|
||||||
|
|
||||||
btnOK := TButton.create(self);
|
|
||||||
with btnOK do
|
|
||||||
begin
|
|
||||||
parent := self;
|
|
||||||
left := (Self.Width div 2);
|
|
||||||
top := Self.Height -30;
|
|
||||||
Height := 25;
|
|
||||||
Caption := 'OK';
|
|
||||||
ModalResult := mrOK;
|
|
||||||
visible := True;
|
|
||||||
Name := 'btnOK';
|
|
||||||
OnCLick := @BTnOKClicked;
|
|
||||||
end;
|
|
||||||
|
|
||||||
btnCancel := TButton.create(self);
|
|
||||||
with btnCancel do
|
|
||||||
begin
|
|
||||||
parent := self;
|
|
||||||
left := (Self.Width div 2) + ((Self.Width div 2) div 3);
|
|
||||||
top := Self.Height -30;
|
|
||||||
Height := 25;
|
|
||||||
Caption := 'Cancel';
|
|
||||||
ModalResult := mrCancel;
|
|
||||||
Name := 'btnCancel';
|
|
||||||
visible := True;
|
|
||||||
OnCLick := @BTnCancelClicked;
|
|
||||||
end;
|
|
||||||
|
|
||||||
btnHelp := TButton.create(self);
|
|
||||||
with btnHelp do
|
|
||||||
begin
|
|
||||||
parent := self;
|
|
||||||
left := (Self.Width div 2) + (2*((Self.Width div 2) div 3));
|
|
||||||
top := Self.Height -30;
|
|
||||||
Height := 25;
|
|
||||||
Caption := 'Help';
|
|
||||||
// ModalResult := mrHelp;
|
|
||||||
Name := 'btnHelp';
|
|
||||||
visible := True;
|
|
||||||
OnCLick := @BTnHelpClicked;
|
|
||||||
end;
|
|
||||||
OnActivate := @FindDialogOnActivate;
|
|
||||||
end;
|
|
||||||
|
|
||||||
procedure TFindDialog.btnOKClicked(Sender : TObject);
|
|
||||||
Begin
|
|
||||||
FFIndText := edtTexttoFind.Text;
|
|
||||||
if Assigned(FOnFind) then FOnFind(self);
|
|
||||||
end;
|
|
||||||
|
|
||||||
procedure TFindDialog.btnCancelClicked(Sender : TObject);
|
|
||||||
Begin
|
|
||||||
FFIndText := '';
|
|
||||||
End;
|
|
||||||
|
|
||||||
procedure TFindDialog.btnHelpClicked(Sender : TObject);
|
|
||||||
Begin
|
|
||||||
end;
|
|
||||||
|
|
||||||
Procedure TFindDialog.FindDialogOnActivate(Sender : TObject);
|
|
||||||
Begin
|
|
||||||
edtTextToFind.SetFocus;
|
|
||||||
End;
|
|
||||||
|
|
||||||
end.
|
|
Loading…
Reference in New Issue
Block a user