Minor changes

git-svn-id: trunk@99 -
This commit is contained in:
lazarus 2001-01-05 18:56:23 +00:00
parent 696b560a48
commit 0a09a437ad
6 changed files with 44 additions and 14 deletions

View File

@ -98,7 +98,13 @@ end;
function TDesigner.IsDesignMsg(Sender: TControl; var Message: TLMessage): Boolean; function TDesigner.IsDesignMsg(Sender: TControl; var Message: TLMessage): Boolean;
Begin Begin
result := false;
Writeln('In ISDESIGNMSG');
if ((Message.msg >= LM_MOUSEFIRST) and (Message.msg <= LM_MOUSELAST)) then
Result := true;
if Result then Writeln('It IS a design message')
else
Writeln('It IS NOT a design message')
end; end;
procedure TDesigner.LoadFile(FileName: string); procedure TDesigner.LoadFile(FileName: string);

View File

@ -32,7 +32,7 @@ uses
type type
TFindDialog = class(TCustomForm) TFindDialog = class(TForm)
lblTexttofind : TLabel; lblTexttofind : TLabel;
edtTexttoFind: TEdit; edtTexttoFind: TEdit;
btnOK : TButton; btnOK : TButton;
@ -64,7 +64,7 @@ implementation
constructor TFindDialog.Create(AOwner: TComponent); constructor TFindDialog.Create(AOwner: TComponent);
begin begin
inherited Create(AOwner); inherited Create(AOwner);
fCompStyle := csForm; Name := 'FindDialog1';
Caption := 'Find'; Caption := 'Find';
Setbounds(0,0,450,250); Setbounds(0,0,450,250);
@ -77,6 +77,7 @@ begin
Left := 10; Left := 10;
Top := 5; Top := 5;
Caption := 'Text to find:'; Caption := 'Text to find:';
Name := 'lblTextToFind';
Visible := True; Visible := True;
end; end;
@ -87,6 +88,7 @@ begin
Left := lblTextToFind.LEft+lblTextToFind.Width+5; Left := lblTextToFind.LEft+lblTextToFind.Width+5;
Width := Self.Width - Left - 5; Width := Self.Width - Left - 5;
Top := 5; Top := 5;
Name := 'edtTextToFind';
Visible := True; Visible := True;
end; end;
@ -100,6 +102,7 @@ begin
Width :=(Self.Width div 2) - 10; Width :=(Self.Width div 2) - 10;
Height := (Self.Height div 2) -35; Height := (Self.Height div 2) -35;
Caption := 'Options'; Caption := 'Options';
Name := 'gbGroupBox';
Visible := True; Visible := True;
end; end;
@ -113,6 +116,7 @@ begin
left := 5; left := 5;
top := 5; top := 5;
Caption := 'Case Sensitive'; Caption := 'Case Sensitive';
Name := 'cbCaseSensitive';
visible := True; visible := True;
end; end;
@ -122,6 +126,7 @@ begin
left := 5; left := 5;
top := 25; top := 25;
Caption := 'Whole Words'; Caption := 'Whole Words';
Name := 'cbWholeWords';
visible := True; visible := True;
end; end;
@ -131,6 +136,7 @@ begin
left := 5; left := 5;
top := 50; top := 50;
Caption := 'Regular Expressions'; Caption := 'Regular Expressions';
Name := 'cbRegularExpressions';
visible := True; visible := True;
end; end;
@ -145,6 +151,7 @@ begin
Caption := 'Direction'; Caption := 'Direction';
Items.Add('Forward'); Items.Add('Forward');
Items.Add('Backward'); Items.Add('Backward');
Name := 'rgForwardBack';
visible := True; visible := True;
ItemIndex := 0; ItemIndex := 0;
end; end;
@ -159,6 +166,7 @@ begin
Caption := 'OK'; Caption := 'OK';
ModalResult := mrOK; ModalResult := mrOK;
visible := True; visible := True;
Name := 'btnOK';
OnCLick := @BTnOKClicked; OnCLick := @BTnOKClicked;
end; end;
@ -171,6 +179,7 @@ begin
Height := 25; Height := 25;
Caption := 'Cancel'; Caption := 'Cancel';
ModalResult := mrCancel; ModalResult := mrCancel;
Name := 'btnCancel';
visible := True; visible := True;
OnCLick := @BTnCancelClicked; OnCLick := @BTnCancelClicked;
end; end;
@ -184,6 +193,7 @@ begin
Height := 25; Height := 25;
Caption := 'Help'; Caption := 'Help';
// ModalResult := mrHelp; // ModalResult := mrHelp;
Name := 'btnHelp';
visible := True; visible := True;
OnCLick := @BTnHelpClicked; OnCLick := @BTnHelpClicked;
end; end;

View File

@ -1409,6 +1409,8 @@ begin
FormEditor1.CreateComponent(nil,TForm, FormEditor1.CreateComponent(nil,TForm,
ObjectInspector1.Left+ObjectInspector1.Width+5,ObjectInspector1.Top, ObjectInspector1.Left+ObjectInspector1.Width+5,ObjectInspector1.Top,
400,300)); 400,300));
CInterface.SetPropByName('Designing',True);
TempForm:=TForm(CInterface.Control); TempForm:=TForm(CInterface.Control);
TempForm.Designer := TempForm.Designer :=
TDesigner.Create(TCustomForm(CInterface.Control)); TDesigner.Create(TCustomForm(CInterface.Control));
@ -1543,12 +1545,12 @@ writeln('FILESAVEDEVENT');
If TSourceEditor(Sender).IsControlUnit then If TSourceEditor(Sender).IsControlUnit then
begin begin
Writeln('*****************CREATING LFM********************'); Writeln('*****************CREATING LFM********************');
Writeln('Result = '+Inttostr(CreateLFM(TCustomForm(TSourceEditor(Sender).Control)))); // Writeln('Result = '+Inttostr(CreateLFM(TCustomForm(TSourceEditor(Sender).Control))));
// writeln('RESULT IS '+inttostr(CreateLFM(Self))); // writeln('RESULT IS '+inttostr(CreateLFM(Self)));
// Writeln('Result = '+Inttostr(CreateLFM(ViewUnits1))); // Writeln('Result = '+Inttostr(CreateLFM(ViewUnits1)));
// Writeln('Result = '+Inttostr(CreateLFM(ViewForms1))); // Writeln('Result = '+Inttostr(CreateLFM(ViewForms1)));
// Writeln('Result = '+Inttostr(CreateLFM(MessageDlg))); // Writeln('Result = '+Inttostr(CreateLFM(MessageDlg)));
// Writeln('Result = '+Inttostr(CreateLFM(TCustomForm(TSourceEditor(Sender).Control)))); // Writeln('Result = '+Inttostr(CreateLFM(FindDialog1)));
end; end;
end; end;
@ -1867,10 +1869,8 @@ end.
{ ============================================================================= { =============================================================================
$Log$ $Log$
Revision 1.33 2001/01/05 17:44:37 lazarus Revision 1.34 2001/01/05 18:56:23 lazarus
ViewUnits1, ViewForms1 and MessageDlg are all loaded from their resources and all controls are auto-created on them. Minor changes
There are still a few problems with some controls so I haven't converted all forms.
Shane
Revision 1.32 2001/01/04 20:33:53 lazarus Revision 1.32 2001/01/04 20:33:53 lazarus
Moved lresources. Moved lresources.

View File

@ -56,12 +56,17 @@ type
FEditor : TmwCustomEdit; FEditor : TmwCustomEdit;
{$endif} {$endif}
FControl: TComponent; //if this is a Form or Datamodule, this is used FControl: TComponent; //if this is a Form or Datamodule, this is used
FCurrentCursorXLine : Integer; //pulled out of the editor by the Function Getxxx
FCurrentCursorYLine : Integer; //pulled out of the editor by the Function Getxxx //pulled out of the editor by the Function Getxxx
FCurrentCursorXLine : Integer;
//pulled out of the editor by the Function Getxxx
FCurrentCursorYLine : Integer;
FFileName : String; FFileName : String;
FPopUpMenu : TPopupMenu; FPopUpMenu : TPopupMenu;
FModified : Boolean; FModified : Boolean;
FSource : TStringList; //pulled out of the editor by the Function Getxxx
//pulled out of the editor by getting it's TStrings
FSource : TStringList;
FUnitName : String; FUnitName : String;
FOnAfterClose : TNotifyEvent; FOnAfterClose : TNotifyEvent;

View File

@ -293,11 +293,14 @@ type
public public
constructor Create (AOwner : TComponent); override; constructor Create (AOwner : TComponent); override;
published published
property Align;
property Caption;
property Enabled; property Enabled;
property ItemIndex; property ItemIndex;
property Items; property Items;
property Columns; property Columns;
property Visible; property Visible;
property OnClick;
end; end;
const const
@ -321,6 +324,9 @@ end.
{ {
$Log$ $Log$
Revision 1.4 2001/01/05 18:56:23 lazarus
Minor changes
Revision 1.3 2001/01/04 20:33:53 lazarus Revision 1.3 2001/01/04 20:33:53 lazarus
Moved lresources. Moved lresources.
Moved CreateLFM to Main.pp Moved CreateLFM to Main.pp

View File

@ -406,9 +406,9 @@ procedure TControl.WndPRoc(var Message : TLMessage);
Var Var
Form : TCustomForm; Form : TCustomForm;
begin begin
if (csDesigning in ComponentState) then
Writeln('CSDesigning in ComponentState');
//Assert(False, Format('Trace:[TControl.WndPRoc] %s --> Message = %d',[CLASSNAME, Message.msg]));
//Assert(False, 'Trace:-----------IN TCONTROL WNDPROC----------');
if (csDesigning in ComponentState) then if (csDesigning in ComponentState) then
begin begin
Form := GetParentForm(Self); Form := GetParentForm(Self);
@ -1276,6 +1276,9 @@ end;
{ ============================================================================= { =============================================================================
$Log$ $Log$
Revision 1.8 2001/01/05 18:56:23 lazarus
Minor changes
Revision 1.7 2000/12/29 18:33:54 lazarus Revision 1.7 2000/12/29 18:33:54 lazarus
TStatusBar's create and destroy were not set to override TWinControls so they were never called. TStatusBar's create and destroy were not set to override TWinControls so they were never called.
Shane Shane