diff --git a/designer/designer.pp b/designer/designer.pp index 8f1be0f3b7..52cc2b9013 100644 --- a/designer/designer.pp +++ b/designer/designer.pp @@ -97,9 +97,6 @@ var GridPoints : TGridPoint; constructor TDesigner.Create(CustomForm : TCustomForm); -var - nmUnit : String; - I : Integer; begin inherited Create; FCustomForm := CustomForm; @@ -160,8 +157,6 @@ end; procedure TDesigner.MouseDownOnControl(Sender : TControl; Message : TLMessage); -var -SHift : TShiftState; Begin // if assigned(MouseDownControl) and (MOuseDownControl <> Sender) then Exit; Writeln('Left is '+Inttostr(TCOntrol(Sender).left)); @@ -189,7 +184,6 @@ Begin LastMouseMovePos:=MouseDownPos; end; - Shift := []; if (TLMMouse(Message).keys and MK_Shift) = MK_Shift then Writeln('Shift down') else @@ -223,7 +217,6 @@ var CaptureGrabber:TGrabber; Button : TMouseButton; Shift : TShiftState; - X,Y : Integer; Begin @@ -245,27 +238,12 @@ Begin shift := shift +[ssCTRL]; - X := TLMMOuse(Message).pos.X; - Y := TLMMOuse(Message).pos.Y; CaptureGrabber:=GetCaptureGrabber; if CaptureGrabber<>nil then begin CaptureGrabber.CaptureMouseUp(TControl(Sender),Button,Shift,TLMMouse(Message).pos.X,TLMMouse(Message).pos.Y); exit; end; - { if ((not (Sender is TCustomForm)) - or (( X < TControl(sender).left) or ( X > (TControl(sender).left+TControl(sender).Width))) - or (( Y < TControl(sender).Top) or ( Y > (TControl(sender).Top+TControl(sender).Height)))) then begin - inc(X,TControl(Sender).Left); - inc(Y,TControl(Sender).Top); - end; -} - -// ControlSelection.MoveSelection(X-LastMouseMovePos.X, Y-LastMouseMovePos.Y); - //do something like ControlSelection.Sizecontent but move x and y from where - // the grabber started to where it finished. -// ControlSelection.MoveContent(X-MouseDownPos.X,Y-MouseDownPos.Y); - MouseUpPos.X := TLMMouse(Message).pos.X; MouseUpPos.Y := TLMMouse(Message).pos.Y; if not (Sender is TCustomForm) then begin @@ -275,8 +253,7 @@ Begin if FMainIDE.SelectedComponent = nil then Begin //mouse pointer button pressed. -{ if Sender is TCustomForm then - SelectOnlyThisComponent(TComponent(Sender));} + end else Begin //add a new control @@ -330,7 +307,6 @@ const mk_mbutton = $10; var CaptureGrabber : TGrabber; - Button : TMouseButton; Shift : TShiftState; X,Y : Integer; Begin @@ -351,12 +327,7 @@ Begin end; if Assigned(MouseDownControl) then Writeln('MouseDownControl is '+TCOntrol(MouseDownControl).Name); - if (TLMMouse(Message).keys and MK_LButton) = MK_LButton then - Button := mbLEft - else - if (TLMMouse(Message).keys and MK_LButton) = MK_RButton then - Button := mbRight; - Shift := []; + Shift := []; if (TLMMouse(Message).keys and MK_Shift) = MK_Shift then shift := [ssShift]; @@ -475,8 +446,6 @@ end; {-----------------------------------------K E Y U P --------------------------------} Procedure TDesigner.KeyUp(Sender : TControl; Message:TLMKEY); -var - I : Integer; Begin Writeln('KEYUp'); with MEssage do @@ -586,7 +555,7 @@ end; function TDesigner.GetIsControl: Boolean; Begin - +Result := True; end; procedure TDesigner.SetIsControl(Value: Boolean); diff --git a/designer/jitforms.pp b/designer/jitforms.pp index 03eeaf2374..c6d02e12de 100644 --- a/designer/jitforms.pp +++ b/designer/jitforms.pp @@ -186,6 +186,7 @@ begin repeat FormName:='Form'+IntToStr(a); FormClassName:='TForm'+IntToStr(a); + inc(a); until (FindFormByName(FormName)<0) and (FindFormByClassName(FormClassName)<0); end; @@ -204,7 +205,10 @@ writeln('[TJITForms.DoCreateJITForm] Initializing new instance ...'); TComponent(FCurReadForm):=Instance; try Instance.Create(Application); + Writeln('----------------------------------'); Writeln('New form name is '+NewFormName); + Writeln('----------------------------------'); + Writeln('----------------------------------'); if NewFormName<>'' then Instance.Name:=NewFormName; DoRenameClass(FCurReadClass,NewClassName); @@ -220,7 +224,9 @@ end; function TJITForms.AddNewJITForm:integer; var NewFormName,NewClassName:shortstring; begin + Writeln('[TJITForms] AddNewJITForm'); GetUnusedNames(NewFormName,NewClassName); + Writeln('Newformname is '+NewFormname); Result:=DoCreateJITForm(NewFormName,NewClassName); end; diff --git a/ide/compileroptions.pp b/ide/compileroptions.pp index 5c1d3f9a0e..567f32a9a5 100644 --- a/ide/compileroptions.pp +++ b/ide/compileroptions.pp @@ -521,9 +521,11 @@ end; procedure TCompilerOptions.SaveTheCompilerOptions; begin { Save the compiler options to the XML file } - + Writeln('SaveTHECompilerOptions'); { Parsing } + Writeln('First one'); XMLConfigFile.SetValue('CompilerOptions/Parsing/Style/Value', Style); + Writeln('After FIRST one'); XMLConfigFile.SetValue('CompilerOptions/Parsing/SymantecChecking/D2Extensions/Value', D2Extensions); XMLConfigFile.SetValue('CompilerOptions/Parsing/SymantecChecking/CStyleOperator/Value', CStyleOperators); XMLConfigFile.SetValue('CompilerOptions/Parsing/SymantecChecking/AllowLabel/Value', AllowLabel); @@ -535,7 +537,7 @@ begin XMLConfigFile.SetValue('CompilerOptions/Parsing/SymantecChecking/DelphiCompat/Value', DelphiCompat); XMLConfigFile.SetValue('CompilerOptions/Parsing/SymantecChecking/UseAnsiStrings/Value', UseAnsiStrings); XMLConfigFile.SetValue('CompilerOptions/Parsing/SymantecChecking/GPCCompat/Value', GPCCompat); - +Writeln('1'); { CodeGeneration } XMLConfigFile.SetValue('CompilerOptions/CodeGeneration/UnitStyle/Value', UnitStyle); XMLConfigFile.SetValue('CompilerOptions/CodeGeneration/Checks/IOChecks/Value', IOChecks); @@ -549,6 +551,7 @@ begin XMLConfigFile.SetValue('CompilerOptions/CodeGeneration/Optimizations/UncertainOptimizations/Value', UncertainOptimizations); XMLConfigFile.SetValue('CompilerOptions/CodeGeneration/Optimizations/OptimizationLevel/Value', OptimizationLevel); +Writeln('2'); { Linking } XMLConfigFile.SetValue('CompilerOptions/Linking/Debugging/GenerateDebugInfo/Value', GenerateDebugInfo); XMLConfigFile.SetValue('CompilerOptions/Linking/Debugging/GenerateDebugDBX/Value', GenerateDebugDBX); @@ -558,6 +561,7 @@ begin XMLConfigFile.SetValue('CompilerOptions/Linking/Options/PassLinkerOptions/Value', PassLinkerOptions); XMLConfigFile.SetValue('CompilerOptions/Linking/Options/LinkerOptions/Value', LinkerOptions); +Writeln('3'); { Other } XMLConfigFile.SetValue('CompilerOptions/Other/Verbosity/ShowErrors/Value', ShowErrors); XMLConfigFile.SetValue('CompilerOptions/Other/Verbosity/ShowWarn/Value', ShowWarn); @@ -578,13 +582,15 @@ begin XMLConfigFile.SetValue('CompilerOptions/Other/ConfigFile/AdditionalConfigFile/Value', AdditionalConfigFile); XMLConfigFile.SetValue('CompilerOptions/Other/ConfigFile/ConfigFilePath/Value', ConfigFilePath); +Writeln('4'); { SearchPaths } XMLConfigFile.SetValue('CompilerOptions/SearchPaths/IncludeFiles/Value', IncludeFiles); XMLConfigFile.SetValue('CompilerOptions/SearchPaths/Libraries/Value', Libraries); XMLConfigFile.SetValue('CompilerOptions/SearchPaths/OtherUnitFiles/Value', OtherUnitFiles); XMLConfigFile.SetValue('CompilerOptions/SearchPaths/CompilerPath/Value', CompilerPath); - + Writeln('5'); XMLConfigFile.Flush; + Writeln('6'); end; {------------------------------------------------------------------------------} @@ -902,6 +908,8 @@ begin //Result := '-viwnh -n -Sgic -Fu' + OtherUnitFiles + ' -Fl' + Libraries; fOptionsString := switches; + Writeln('Still in CompilerOptions'); + Writeln('fOptionsString = '+fOptionsString); Result := fOptionsString; end; @@ -1004,8 +1012,8 @@ begin Width := 379; Caption := 'Compiler Options'; OnShow := @CreateForm; - MainIDE.Project.CompilerOptions.LoadCompilerOptions(true); - //CompilerOpts.LoadCompilerOptions(true); +// MainIDE.Project.CompilerOptions.LoadCompilerOptions(true); + CompilerOpts.LoadCompilerOptions(true); nbMain := TNotebook.Create(Self); nbMain.Parent := Self; @@ -1079,8 +1087,10 @@ begin { Save the options and hide the dialog } PutCompilerOptions; - MainIDE.Project.CompilerOptions.SaveCompilerOptions(true); - //CompilerOpts.SaveCompilerOptions(true); + Writeln('Calling Mainide.project.compiler...'); +// MainIDE.Project.CompilerOptions.SaveCompilerOptions(true); + CompilerOpts.SaveCompilerOptions(true); + Writeln('Called'); Hide; end; @@ -1104,8 +1114,8 @@ begin Assert(False, 'Trace:Apply compiler options changes'); PutCompilerOptions; - MainIDE.Project.CompilerOptions.SaveCompilerOptions(true); - //CompilerOpts.SaveCompilerOptions(true); +// MainIDE.Project.CompilerOptions.SaveCompilerOptions(true); + CompilerOpts.SaveCompilerOptions(true); end; {------------------------------------------------------------------------------} diff --git a/ide/customformeditor.pp b/ide/customformeditor.pp index 4ddf0d0a7e..42f0385bfa 100644 --- a/ide/customformeditor.pp +++ b/ide/customformeditor.pp @@ -492,7 +492,7 @@ end; Function TComponentInterface.Focus : Boolean; Begin // XXX Todo: - if (FCOntrol is TWinControl) {and (TWinControl(FControl).CanFocus)} then + if (FCOntrol is TWinControl) and (TWinControl(FControl).CanFocus) then TWinControl(FControl).SetFocus; end; @@ -608,22 +608,20 @@ Var Begin writeln('[TCustomFormEditor.CreateComponent] Class='''+TypeClass.ClassName+''''); Temp := TComponentInterface.Create; - Writeln('TComponentInterface created......'); - if Assigned(ParentCI) then begin + if Assigned(ParentCI) then + begin if Assigned(TComponentInterface(ParentCI).FControl.Owner) then - Temp.FControl := - TypeClass.Create(TComponentInterface(ParentCI).FControl.Owner) + Temp.FControl := TypeClass.Create(TComponentInterface(ParentCI).FControl.Owner) else - Temp.FControl := - TypeClass.Create(TComponentInterface(ParentCI).FControl) - end else - Begin + Temp.FControl := TypeClass.Create(TComponentInterface(ParentCI).FControl) + end + else + Begin //this should be a form NewFormIndex := JITFormList.AddNewJITForm; if NewFormIndex >= 0 then Temp.FControl := JITFormList[NewFormIndex]; -// Temp.FControl := TypeClass.Create(nil); - end; + end; if Assigned(ParentCI) then Begin @@ -682,6 +680,9 @@ Begin if CompTop<0 then CompTop:=(TControl(Temp.FControl).Parent.Height+ CompHeight) div 2; TControl(Temp.FControl).SetBounds(CompLeft,CompTop,CompWidth,CompHeight); + + TControl(temp.FControl).Hint := TControl(Temp.FControl).Name; + end; FComponentInterfaceList.Add(Temp); diff --git a/ide/main.pp b/ide/main.pp index 386892658f..04bf2d808c 100644 --- a/ide/main.pp +++ b/ide/main.pp @@ -243,16 +243,11 @@ constructor TMainIDE.Create(AOwner: TComponent); end; var - Filename : String; - S : TStream; i,x : Integer; - R : TRect; - IDEControl : pointer; PageCount : Integer; RegComp : TRegisteredComponent; RegCompPage : TRegisteredComponentPage; IDeComponent : TIdeComponent; - MenuItem : TmenuItem; begin inherited Create(AOwner); @@ -748,9 +743,6 @@ End; {------------------------------------------------------------------------------} procedure TMainIDE.LoadMainMenu; -var - fContext : Integer; - R : TRect; begin //-------------- @@ -997,14 +989,11 @@ end; procedure TMainIDE.LoadResourceFromFile(Value : String); Var Texts : String; - Temps : String; Classnm : String; //like 'TMainIDE' Datatype : String; //like 'FORMDATA' TextFile : TStringList; ResourceData : String; - I,A : Integer; - Instance : TComponent; - CompResource : TLResource; + I : Integer; Begin textFile := TStringList.Create; TextFile.LoadFromFile(Value); @@ -1083,7 +1072,7 @@ end; Function TMainIDE.SearchPaths : String; Begin - Result := CompilerOpts.OtherUnitFiles; + Result := Project.CompilerOptions.OtherUnitFiles; End; { @@ -1096,7 +1085,6 @@ End; Procedure TMainIDE.ControlClick(Sender : TObject); var - Page : Integer; I : Integer; IDECOmp : TIDEComponent; Speedbutton : TSpeedbutton; @@ -1209,10 +1197,6 @@ end; {------------------------------------------------------------------------------} procedure TMainIDE.mnuNewFormClicked(Sender : TObject); var - I,N: Integer; - TempName : String; - TempFormName : String; - Found : Boolean; TempForm : TCustomForm; CInterface : TComponentInterface; begin @@ -1369,8 +1353,6 @@ Begin end; Procedure TMainIDE.FileSavedEvent(Sender : TObject; Filename : String); -var - MenuItem : TMenuItem; Begin //sender is the TSourceEditor writeln('FILESAVEDEVENT'); @@ -1578,7 +1560,6 @@ end; Procedure TMainIDE.mnuRunProjectClicked(Sender : TObject); var - Filename : String; TheProcess : TProcess; TheProgram : String; begin @@ -1642,6 +1623,10 @@ end. { ============================================================================= $Log$ + Revision 1.56 2001/02/04 04:18:11 lazarus + Code cleanup and JITFOrms bug fix. + Shane + Revision 1.55 2001/02/02 14:23:37 lazarus Start of code completion code. Shane diff --git a/ide/uniteditor.pp b/ide/uniteditor.pp index cd1baf6b24..cb719c07b5 100644 --- a/ide/uniteditor.pp +++ b/ide/uniteditor.pp @@ -70,21 +70,12 @@ type //if this is a Form or Datamodule, this is used FControl: TComponent; - //pulled out of the editor by the Function FEditor.CaretX - FCurrentCursorXLine : Integer; - - //pulled out of the editor by the Function FEditor.CaretY - FCurrentCursorYLine : Integer; - //Set during OPEN and Save FFileName : String; // Used GetModified like this -> Result := FEditor.Modified FModified : Boolean; - // Used GetReadolny like this -> Result := FEditor.Readonly - FReadOnly : Boolean; - //created during the constructor. This is the popup you see when right-clicking on the editor FPopUpMenu : TPopupMenu; @@ -153,6 +144,7 @@ type property Editor : TmwCustomEdit read FEditor; property Visible : Boolean read FVisible write FVisible default False; FindText : String; + ccSelection : String; public constructor Create(AOwner : TComponent; AParent : TWinControl); destructor Destroy; override; @@ -193,7 +185,6 @@ type private Notebook1 : TNotebook; StatusBar : TStatusBar; - FEmpty : Boolean; FFormEditor : TFormEditor; FSourceEditorList : TList; FSaveDialog : TSaveDialog; @@ -464,12 +455,6 @@ var Texts : String; EditorLine : String; X : Integer; - Found : Boolean; - SearchDir : String; - AppDIr : String; - TempDir : String; - Num : Integer; - Begin //get the text by the cursor. EditorLine := FEditor.Lines.Strings[GetCurrentCursorYLine-1]; @@ -637,7 +622,6 @@ End; Function TSourceEditor.FindAgain(StartX,StartLine : Integer) : Boolean; var I,X : Integer; - Texts : String; TempLine : String; P : TPoint; Begin @@ -703,10 +687,7 @@ End; Procedure TSourceEditor.ReadOnlyClicked(Sender : TObject); -var - MenuItem : TMenuItem; Begin - MenuItem := TMenuItem(sender); FEditor.ReadOnly := not(FEditor.ReadOnly); //set the statusbar text; end; @@ -731,8 +712,6 @@ Procedure TSourceEditor.ProcessUserCommand(Sender: TObject; var Command: TSynEdi var Y,I : Integer; Texts,Texts2,TheName : String; - Continue : Boolean; - Found : Boolean; Begin Writeln('[ProcessUserCommand] --------------'); if Command >= ecFirstParent then @@ -854,7 +833,8 @@ if S1 = 'property' then Value := S2 else if S1 = 'procedure' then Value := S2+'('; -Value := Feditor.SelText + Value; +Value := ccSelection + Value; +ccSelection := ''; scompl.Deactivate; End; @@ -871,26 +851,23 @@ var S : TStrings; CompInt : TComponentInterface; CompName : String; - I,X : Integer; + I : Integer; propKind : TTypeKind; TypeInfo : PTypeInfo; TypeData : PTypeData; NewStr : String; - aName : String; Count : Integer; - MethodRec : TMethodRec; - Temp : String; Begin CompInt := nil; Writeln('[ccExecute]'); sCompl := TSynBaseCompletion(Sender); S := TStringList.Create; CompName := sCompl.CurrentString; + ccSelection := CompName; if Pos('.',CompName) <> 0 then CompName := Copy(CompName,1,pos('.',Compname)-1); CompInt := TComponentInterface(FormEditor1.FindComponentByName(CompName)); if CompInt = nil then Exit; - aName := CompName+'.'; //get all methods NewStr := ''; for I := 0 to CompInt.GetPropCount-1 do @@ -1033,7 +1010,6 @@ end; Procedure TSourceEditor.AddControlCode(_Control : TComponent); var - PT : PTypeData; PI : PTypeInfo; nmControlType : String; I : Integer; @@ -1089,8 +1065,6 @@ end; {Called when a control is deleted from the form} Procedure TSourceEditor.RemoveControlCode(_Control : TComponent); var - PT : PTypeData; - PI : PTypeInfo; nmControlType : String; I : Integer; NewSource : String; @@ -1101,7 +1075,6 @@ begin TempSource.Assign(Source); //get the control name - PI := _Control.ClassInfo; nmControlType := _Control.name; Ancestor := GetAncestor; @@ -1214,16 +1187,12 @@ end; Procedure TSourceEditor.CreateFormUnit(AForm : TCustomForm); Var - I : Integer; nmForm : String; - nmAncestor : String; TempSource : TStringList; Begin FControl := AForm; TempSource := TStringList.Create; - nmAncestor := GetAncestor; - nmForm := FControl.Name; with TempSource do @@ -1266,7 +1235,6 @@ end; Procedure TSourceEditor.CreateNewUnit; Var - I : Integer; TempSource : TStringList; Begin TempSource := TStringList.Create; @@ -1506,7 +1474,6 @@ Function TSourceNotebook.CreateUnitFromForm(AForm : TForm): TSourceEditor; Var TempSourceEditor : TSourceEditor; Notebook_Just_Created : Boolean; - PageIndex : Integer; begin Notebook_Just_Created := (not assigned(Notebook1)) or @@ -1866,7 +1833,7 @@ end; Procedure TSourceNotebook.SaveAllClicked(Sender : TObject); Var - I,X : Integer; + I : Integer; TempEditor : TSourceEditor; Begin For I := 0 to FSourceEditorList.Count-1 do diff --git a/lcl/controls.pp b/lcl/controls.pp index 43e85f03ea..236a91136c 100644 --- a/lcl/controls.pp +++ b/lcl/controls.pp @@ -691,6 +691,7 @@ TCMDialogKey = TLMKEY; constructor CreateParented(ParentWindow: HWnd); class function CreateParentedControl(ParentWindow: HWnd): TWinControl; destructor Destroy; override; + Function CanFocus : Boolean; Function ControlAtPos(const Pos : TPoint; AllowDisabled : Boolean): TControl; Function Focused : Boolean; dynamic; Procedure BroadCast(var Message); @@ -1125,6 +1126,10 @@ end. { ============================================================================= $Log$ + Revision 1.12 2001/02/04 04:18:12 lazarus + Code cleanup and JITFOrms bug fix. + Shane + Revision 1.11 2001/02/01 16:45:19 lazarus Started the code completion. Shane diff --git a/lcl/include/control.inc b/lcl/include/control.inc index ad06d28682..23d2221d2e 100644 --- a/lcl/include/control.inc +++ b/lcl/include/control.inc @@ -799,10 +799,14 @@ end; { TControl InvalidateControl } {------------------------------------------------------------------------------} procedure TControl.InvalidateControl(IsVisible, IsOpaque : Boolean); +var + Rect : TRect; begin -//TODO: FINISH TCONTROL INVALIDATECONTROL - if IsVisible - then CNSendMessage(LM_REDRAW,Self,Nil); + if (IsVisible or (csDesigning in ComponentState) and not (csNoDesignVisible in ControlStyle)) and + (Parent <> nil) and (Parent.HandleAllocated) then + Begin + CNSendMessage(LM_REDRAW,Self,Nil); + end; end; {------------------------------------------------------------------------------} @@ -1283,6 +1287,10 @@ end; { ============================================================================= $Log$ + Revision 1.11 2001/02/04 04:18:12 lazarus + Code cleanup and JITFOrms bug fix. + Shane + Revision 1.10 2001/02/01 16:45:19 lazarus Started the code completion. Shane diff --git a/lcl/include/wincontrol.inc b/lcl/include/wincontrol.inc index 1bef45287f..beacd1c535 100644 --- a/lcl/include/wincontrol.inc +++ b/lcl/include/wincontrol.inc @@ -215,6 +215,30 @@ begin end; end; + +{------------------------------------------------------------------------------} +{ TWinControl CanFocus } +{------------------------------------------------------------------------------} +Function TWinControl.CanFocus : Boolean; +var + Control: TWinControl; + Form: TCustomForm; +begin + Result := False; + //Verify that every parent is enabled and visible before returning true. + Form := GetParentForm(Self); + if Form <> nil then + begin + Control := Self; + while Control <> Form do + begin + if not (Control.FVisible and Control.Enabled) then Exit; + Control := Control.Parent; + end; + Result := True; + end; +end; + {------------------------------------------------------------------------------} { TWinControl CMDrag } {------------------------------------------------------------------------------} @@ -1893,6 +1917,10 @@ end; { ============================================================================= $Log$ + Revision 1.15 2001/02/04 04:18:12 lazarus + Code cleanup and JITFOrms bug fix. + Shane + Revision 1.14 2001/02/01 19:34:50 lazarus TScrollbar created and a lot of code added. diff --git a/lcl/interfaces/gtk/gtkobject.inc b/lcl/interfaces/gtk/gtkobject.inc index 167579fb8b..b4c28d4ca7 100644 --- a/lcl/interfaces/gtk/gtkobject.inc +++ b/lcl/interfaces/gtk/gtkobject.inc @@ -182,22 +182,21 @@ end; function TgtkObject.RecreateWnd(Sender: TObject): Integer; var - aParent : TWinControl; + aParent : TWinControl; Begin -//could we just call IntSendMessage?? + //could we just call IntSendMessage?? -//destroy old widget -gtk_widget_destroy(PgtkWidget(TWinControl(sender).HANDLE)); + //destroy old widget + gtk_widget_destroy(PgtkWidget(TWinControl(sender).HANDLE)); -aParent := TWinControl(sender).Parent; -aParent.RemoveControl(TControl(sender)); + aParent := TWinControl(sender).Parent; + aParent.RemoveControl(TControl(sender)); -TWincontrol(sender).parent := nil; -TWincontrol(sender).parent := aParent; - -ResizeChild(Sender,TWinControl(sender).Left,TWinControl(sender).Top,TWinControl(sender).Width,TWinControl(sender).Height); -ShowHide(sender); + TWincontrol(sender).parent := nil; + TWincontrol(sender).parent := aParent; + ResizeChild(Sender,TWinControl(sender).Left,TWinControl(sender).Top,TWinControl(sender).Width,TWinControl(sender).Height); + ShowHide(sender); End; @@ -2410,7 +2409,7 @@ begin if Sender is TWinControl then with Sender as TWinControl do begin - if (Length(Hint) > 0) and ShowHint + if (Length(Hint) > 0) and (ShowHint or (csDesigning in ComponentState)) then begin strTemp := StrAlloc(Length(Hint) + 1); try @@ -2667,6 +2666,10 @@ end; { ============================================================================= $Log$ + Revision 1.27 2001/02/04 04:18:12 lazarus + Code cleanup and JITFOrms bug fix. + Shane + Revision 1.26 2001/02/02 20:13:39 lazarus Codecompletion changes. Added code to Uniteditor for code completion. diff --git a/lcl/interfaces/gtk/gtkwinapi.inc b/lcl/interfaces/gtk/gtkwinapi.inc index 6daf90a3ca..69299668c0 100644 --- a/lcl/interfaces/gtk/gtkwinapi.inc +++ b/lcl/interfaces/gtk/gtkwinapi.inc @@ -2007,8 +2007,7 @@ function TGTKObject.InvalidateRect(aHandle : HWND; Rect : pRect; bErase : Boolea var gdkRect : TGDKRectangle; begin - // Todo: Erase ??? - Writeln('[InvalidateRect]'); + // Todo: Erase before invalidating if bErase is true Writeln(format('Rect = %d,%d,%d,%d',[rect^.left,rect^.top,rect^.Right,rect^.Bottom])); Result := True; try @@ -2021,7 +2020,6 @@ begin Result := False; end; - Writeln('[InvalidateRect] Exiting....'); end; {------------------------------------------------------------------------------ @@ -3155,6 +3153,10 @@ end; { ============================================================================= $Log$ + Revision 1.18 2001/02/04 04:18:12 lazarus + Code cleanup and JITFOrms bug fix. + Shane + Revision 1.17 2001/02/01 19:34:50 lazarus TScrollbar created and a lot of code added.