-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathchanges.diff
712 lines (692 loc) · 21.8 KB
/
changes.diff
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
Index: components/ideintf/projectintf.pas
===================================================================
--- components/ideintf/projectintf.pas (revision 51308)
+++ components/ideintf/projectintf.pas (working copy)
@@ -948,7 +948,7 @@
function TFileDescPascalUnit.GetUnitDirectives: string;
begin
- Result:='{$mode objfpc}{$H+}';
+ Result:='{$mode delphi}';
if Owner is TLazProject then
Result:=CompilerOptionsToUnitDirectives(Owner.LazCompilerOptions);
end;
@@ -985,7 +985,7 @@
var
SyntaxMode: String;
begin
- Result:='{$mode objfpc}{$H+}';
+ Result:='{$mode delphi}';
if CompOpts=nil then exit;
SyntaxMode:=CompOpts.SyntaxMode;
if SyntaxMode<>'' then begin
@@ -1022,7 +1022,9 @@
LE = LineEnding;
begin
Result:=
- 'type'+LE
+ '{ T'+ResourceName+' }'+LE
+ +''+LE
+ +'type'+LE
+' T'+ResourceName+' = class('+ResourceClass.ClassName+')'+LE
+' private'+LE
+' { private declarations }'+LE
Index: components/sparta/dockedformeditor/source/sparta_resizerframe.pas
===================================================================
--- components/sparta/dockedformeditor/source/sparta_resizerframe.pas (revision 51308)
+++ components/sparta/dockedformeditor/source/sparta_resizerframe.pas (working copy)
@@ -146,6 +146,18 @@
{$R *.lfm}
+{ Node grip indices are as follows:
+
+ 1
+0 +----+----+ 2
+ | |
+7 + + 3
+ | |
+6 +----+----+ 4
+ 5
+
+Only grips 3, 4, and 5 are sizeable }
+
{ TResizerFrame }
// Tiles the source image over the given target canvas
@@ -358,7 +370,6 @@
begin
BevelOuter := bvNone;
Color := clBlack;
-
Name := 'Node' + IntToStr(Node);
Caption:='';
Width := SIZER_RECT_SIZE;
@@ -366,30 +377,26 @@
Parent := Self;
Visible := True;
FNodes.Add(Panel);
-
+ case Node of
+ 3: Cursor := crSizeWE;
+ 4: Cursor := crSizeNESW;
+ 5: Cursor := crSizeNS;
+ end;
+ if Node in [3,4,5] then
+ begin
+ OnMouseDown := NodeMouseDown;
+ OnMouseMove := NodeMouseMove;
+ OnMouseUp := NodeMouseUp;
+ end;
with TShape.Create(Panel) do
begin
Parent := Panel;
- Align:= alClient;
-
+ Align := alClient;
+ Enabled := False;
if Node in [3,4,5] then
Brush.Color:=clBtnFace
else
Brush.Color:=clGray;
-
- case Node of
- {0,}4: Cursor := crSizeNWSE;
- {1,}5: Cursor := crSizeNS;
- //{2,}6: Cursor := crSizeNESW;
- 3{,7}: Cursor := crSizeWE;
- end;
- if Node in [3,4,5] then
- begin
- OnMouseDown := NodeMouseDown;
- OnMouseMove := NodeMouseMove;
- OnMouseUp := NodeMouseUp;
- end;
-
end;
end;
end;
@@ -411,12 +418,9 @@
procedure TResizerFrame.NodeMouseDown(Sender: TObject; Button: TMouseButton;
Shift: TShiftState; X, Y: Integer);
var
- LCtrlPoint: TPoint;
+ Point: TPoint;
begin
- if Sender is TGraphicControl then
- Sender := TGraphicControl(Sender).Parent;
-
- if (Enabled) AND (Sender is TWinControl) then
+ if Enabled then
begin
FNodePositioning:=True;
@@ -459,15 +463,15 @@
// perform first "click delta" to reduce leap
// + calculate delta created by scrollbars and theirs position...
FillChar(FDelta, SizeOf(FDelta), #0);
- LCtrlPoint := (Sender as TWinControl).ScreenToClient(Mouse.CursorPos);
+ Point := (Sender as TWinControl).ScreenToClient(Mouse.CursorPos);
if Sender = pR then
begin
- FDelta.X := -(LCtrlPoint.x - RightSizerLineWidth) + RightMargin;
+ FDelta.X := -(Point.x - RightSizerLineWidth) + RightMargin;
FPositioningKind := [pkRight];
end
else if Sender = pB then
begin
- FDelta.Y := -(LCtrlPoint.y - BottomSizerLineWidth) + BottomMargin;
+ FDelta.Y := -(Point.y - BottomSizerLineWidth) + BottomMargin;
FPositioningKind := [pkBottom];
end
else
@@ -474,18 +478,18 @@
case FNodes.IndexOf(Sender) of
3: // middle right
begin
- FDelta.X := -(LCtrlPoint.x - RightSizerRectWidth) + RightMargin;
+ FDelta.X := -(Point.x - RightSizerRectWidth) + RightMargin;
FPositioningKind := [pkRight];
end;
4: // right bottom
begin
- FDelta.X := -(LCtrlPoint.x - RightSizerRectWidth) + RightMargin;
- FDelta.Y := -(LCtrlPoint.y - BottomSizerRectHeight) + BottomMargin;
+ FDelta.X := -(Point.x - RightSizerRectWidth) + RightMargin;
+ FDelta.Y := -(Point.y - BottomSizerRectHeight) + BottomMargin;
FPositioningKind := [pkRight, pkBottom];
end;
5: // middle bottom
begin
- FDelta.Y := -(LCtrlPoint.y - BottomSizerRectHeight) + BottomMargin;
+ FDelta.Y := -(Point.y - BottomSizerRectHeight) + BottomMargin;
FPositioningKind := [pkBottom];
end;
end;
@@ -500,10 +504,6 @@
OldRect: TRect;
AdjL,AdjR,AdjT,AdjB: Boolean;
begin
- // handle TPanel for resizing rectangles
- if Sender is TGraphicControl then
- Sender := TGraphicControl(Sender).Parent;
-
if FNodePositioning then
begin
begin
@@ -592,9 +592,6 @@
procedure TResizerFrame.NodeMouseUp(Sender: TObject; Button: TMouseButton;
Shift: TShiftState; X, Y: Integer);
begin
- if Sender is TGraphicControl then
- Sender := TGraphicControl(Sender).Parent;
-
if FNodePositioning then
begin
Screen.Cursor := crDefault;
Index: ide/aboutfrm.lfm
===================================================================
--- ide/aboutfrm.lfm (revision 51308)
+++ ide/aboutfrm.lfm (working copy)
@@ -25,94 +25,92 @@
OnChange = NotebookPageChanged
object VersionPage: TTabSheet
Caption = 'Version'
- ClientHeight = 298
- ClientWidth = 452
+ ClientHeight = 295
+ ClientWidth = 456
object LogoImage: TImage
AnchorSideLeft.Control = VersionPage
AnchorSideLeft.Side = asrCenter
AnchorSideTop.Control = VersionPage
AnchorSideTop.Side = asrCenter
- Left = 1
+ Left = 3
Height = 300
- Top = -1
+ Top = -3
Width = 450
AutoSize = True
end
object VersionLabel: TLabel
- AnchorSideLeft.Control = LogoImage
- AnchorSideLeft.Side = asrCenter
AnchorSideTop.Control = LogoImage
- Left = 199
- Height = 15
- Top = 120
- Width = 55
- Alignment = taCenter
+ Left = 6
+ Height = 17
+ Top = 180
+ Width = 444
+ Align = alBottom
+ Alignment = taRightJustify
BorderSpacing.Top = 115
BorderSpacing.Around = 6
Caption = 'Version #:'
- Font.Color = clSilver
+ Font.Color = clBlack
Font.Style = [fsBold]
ParentColor = False
ParentFont = False
end
object BuildDateLabel: TLabel
- AnchorSideLeft.Control = LogoImage
- AnchorSideLeft.Side = asrCenter
AnchorSideTop.Control = VersionLabel
AnchorSideTop.Side = asrBottom
- Left = 213
- Height = 15
- Top = 141
- Width = 27
- Alignment = taCenter
+ Left = 6
+ Height = 17
+ Top = 203
+ Width = 444
+ Align = alBottom
+ Alignment = taRightJustify
BorderSpacing.Around = 6
Caption = 'Date:'
- Font.Color = clSilver
+ Font.Color = clBlack
ParentColor = False
ParentFont = False
end
object RevisionLabel: TLabel
- AnchorSideLeft.Control = LogoImage
- AnchorSideLeft.Side = asrCenter
AnchorSideTop.Control = FPCVersionLabel
AnchorSideTop.Side = asrBottom
- Left = 190
- Height = 15
- Top = 183
- Width = 72
+ Left = 6
+ Height = 17
+ Top = 249
+ Width = 444
+ Align = alBottom
+ Alignment = taRightJustify
BorderSpacing.Around = 6
Caption = 'RevisionLabel'
- Font.Color = clSilver
+ Font.Color = clBlack
ParentColor = False
ParentFont = False
end
object PlatformLabel: TLabel
- AnchorSideLeft.Control = LogoImage
- AnchorSideLeft.Side = asrCenter
AnchorSideTop.Control = RevisionLabel
AnchorSideTop.Side = asrBottom
- Left = 189
- Height = 15
- Top = 204
- Width = 74
+ Left = 6
+ Height = 17
+ Top = 272
+ Width = 444
+ Align = alBottom
+ Alignment = taRightJustify
BorderSpacing.Around = 6
Caption = 'PlatformLabel'
- Font.Color = clSilver
+ Font.Color = clBlack
ParentColor = False
ParentFont = False
end
object FPCVersionLabel: TLabel
- AnchorSideLeft.Control = LogoImage
- AnchorSideLeft.Side = asrCenter
AnchorSideTop.Control = BuildDateLabel
AnchorSideTop.Side = asrBottom
- Left = 182
- Height = 15
- Top = 162
- Width = 88
+ Left = 6
+ Height = 17
+ Top = 226
+ Width = 444
+ Align = alBottom
+ Alignment = taRightJustify
BorderSpacing.Around = 6
Caption = 'FPCVersionLabel'
- Font.Color = clSilver
+ Font.Color = clBlack
ParentColor = False
ParentFont = False
end
@@ -119,8 +117,8 @@
end
object AboutPage: TTabSheet
Caption = 'About'
- ClientHeight = 299
- ClientWidth = 458
+ ClientHeight = 295
+ ClientWidth = 456
object OfficialLabel: TLabel
AnchorSideLeft.Control = AboutPage
AnchorSideBottom.Control = DocumentationLabel
@@ -223,10 +221,10 @@
AnchorSideTop.Side = asrCenter
AnchorSideBottom.Control = Owner
AnchorSideBottom.Side = asrBottom
- Left = 193
- Height = 26
- Top = 12
- Width = 75
+ Left = 196
+ Height = 29
+ Top = 11
+ Width = 69
AutoSize = True
BorderSpacing.Around = 6
Cancel = True
===================================================================
--- ide/aboutfrm.pas (revision 51308)
+++ ide/aboutfrm.pas (working copy)
@@ -157,7 +157,7 @@
LogoImage.Picture.LoadFromResourceName(HInstance, 'splash_logo', TPortableNetworkGraphic);
Caption:=lisAboutLazarus;
VersionLabel.Caption := lisVersion+' #: '+ GetLazarusVersionString;
- RevisionLabel.Caption := lisSVNRevision+LazarusRevisionStr;
+ RevisionLabel.Caption := lisSVNRevision+'51308';
BuildDateLabel.Caption := lisDate+': '+GetLocalizedBuildDate;
FPCVersionLabel.Caption:= lisFPCVersion+{$I %FPCVERSION%};
PlatformLabel.Caption:=GetCompiledTargetCPU+'-'+GetCompiledTargetOS
@@ -171,7 +171,6 @@
AcknowledgementsPage.DoubleBuffered := True;
miVerToClipboard.Caption := lisVerToClipboard;
- VersionLabel.Font.Color:= clWhite;
Constraints.MinWidth:= 460;
Constraints.MinHeight:= 380;
Index: ide/include/unix/lazbaseconf.inc
===================================================================
--- ide/include/unix/lazbaseconf.inc (revision 51308)
+++ ide/include/unix/lazbaseconf.inc (working copy)
@@ -142,12 +142,16 @@
procedure InternalInit;
---------------------------------------------------------------------------}
procedure InternalInit;
+var
+ S: string;
begin
// For the Unix file functions only the slash is a directory separator.
// The RTL defines AllowDirectorySeparators ['/','\'] for historical reasons.
AllowDirectorySeparators:=['/'];
-
- PrimaryConfigPath:=ExpandFileNameUTF8('~/.lazarus');
+ S := ExpandFileNameUTF8(ParamStrUTF8(0));
+ S := ExtractFileDir(S);
+ S := IncludeTrailingPathDelimiter(S) + 'config';
+ PrimaryConfigPath:= S;
SecondaryConfigPath:='/etc/lazarus';
end;
Index: ide/include/win/lazbaseconf.inc
===================================================================
--- ide/include/win/lazbaseconf.inc (revision 51308)
+++ ide/include/win/lazbaseconf.inc (working copy)
@@ -141,6 +141,8 @@
procedure InternalInit;
---------------------------------------------------------------------------}
procedure InternalInit;
+var
+ S: string;
begin
DefaultDrive := ExtractFileDrive(ProgramDirectory);
DefaultFPCTarget:= GetCompiledTargetCPU + '-' + GetCompiledTargetOS;
@@ -148,7 +150,11 @@
// the last part of the path returned by GetAppConfigDir is the application
// name. Replace that by 'lazarus', to make sure that lazbuild uses
// the same primary config path
- PrimaryConfigPath:= ExtractFilePath(ChompPathDelim(GetAppConfigDirUTF8(False))) + 'lazarus';
+ // PrimaryConfigPath:= ExtractFilePath(ChompPathDelim(GetAppConfigDirUTF8(False))) + 'lazarus';
+ S := ExpandFileNameUTF8(ParamStrUTF8(0));
+ S := ExtractFileDir(S);
+ S := IncludeTrailingPathDelimiter(S) + 'config';
+ PrimaryConfigPath:= S;
SecondaryConfigPath:=ChompPathDelim(ProgramDirectory);
DefaultFPCSrcDirs[1] := AppendPathDelim(ProgramDirectory) + 'fpcsrc';
DefaultLazarusSrcDirs[1] := DefaultDrive + '\lazarus';
Index: ide/lazarusidestrconsts.pas
===================================================================
--- ide/lazarusidestrconsts.pas (revision 51308)
+++ ide/lazarusidestrconsts.pas (working copy)
@@ -4599,7 +4599,7 @@
lisProjInspDeleteDependencyFor = 'Delete dependency for %s?';
lisProjInspRemoveFileFromProject = 'Remove file %s from project?';
lisProjInspRemovedRequiredPackages = 'Removed required packages';
- lisProjInspProjectInspector = 'Project Inspector - %s';
+ lisProjInspProjectInspector = 'Project - %s';
// IDE Coolbar
lisCoolbarOptions = 'IDE CoolBar';
Index: ide/main.pp
===================================================================
--- ide/main.pp (revision 51308)
+++ ide/main.pp (working copy)
@@ -169,6 +169,7 @@
TMainIDE = class(TMainIDEBase)
private
+ procedure CheckRescan;
// event handlers
procedure MainIDEFormClose(Sender: TObject; var {%H-}CloseAction: TCloseAction);
procedure MainIDEFormCloseQuery(Sender: TObject; var CanClose: boolean);
@@ -1558,6 +1559,19 @@
HelpBoss.LoadHelpOptions;
end;
+procedure TMainIDE.CheckRescan;
+var
+ Status: TIDEToolStatus;
+begin
+ if not LazarusScanned then
+ begin
+ Status := ToolStatus;
+ ToolStatus := itNone;
+ mnuEnvRescanFPCSrcDirClicked(Self);
+ ToolStatus := Status;
+ end;
+end;
+
procedure TMainIDE.StartIDE;
begin
{$IFDEF IDE_MEM_CHECK}CheckHeapWrtMemCnt('TMainIDE.StartIDE START');{$ENDIF}
@@ -1591,6 +1605,7 @@
LazIDEInstances.StartListening(@LazInstancesStartNewInstance, @LazInstancesGetOpenedProjectFileName);
IDECommandList.StartUpdateEvents;
FIDEStarted:=true;
+ CheckRescan;
{$IFDEF IDE_MEM_CHECK}CheckHeapWrtMemCnt('TMainIDE.StartIDE END');{$ENDIF}
end;
Index: ide/mainbase.pas
===================================================================
--- ide/mainbase.pas (revision 51308)
+++ ide/mainbase.pas (working copy)
@@ -289,6 +289,8 @@
set KeepInstalledPackages to true. }
var KeepInstalledPackages: boolean = false;
+ LazarusScanned: Boolean = False;
+
implementation
function GetMainIde: TMainIDEBase;
Index: ide/mainintf.pas
===================================================================
--- ide/mainintf.pas (revision 51308)
+++ ide/mainintf.pas (working copy)
@@ -591,7 +591,9 @@
begin
LE:=LineEnding;
Result:=
- 'type'+LE
+ ' { T'+ResourceName+' }'+LE
+ +''+LE
+ +'type'+LE
+' T'+ResourceName+' = class('+ResourceClass.ClassName+')'+LE
+' private'+LE
+' { private declarations }'+LE
Index: ide/projectdefs.pas
===================================================================
--- ide/projectdefs.pas (revision 51308)
+++ ide/projectdefs.pas (working copy)
@@ -1278,7 +1278,7 @@
// create program source
NewSource:='program Project1;'+LineEnding
+LineEnding
- +'{$mode objfpc}{$H+}'+LineEnding
+ +'{$mode delphi}'+LineEnding
+LineEnding
+'uses'+LineEnding
+' {$IFDEF UNIX}{$IFDEF UseCThreads}'+LineEnding
@@ -1395,7 +1395,7 @@
// create program source
NewSource:='program Project1;'+LineEnding
+LineEnding
- +'{$mode objfpc}{$H+}'+LineEnding
+ +'{$mode delphi}'+LineEnding
+LineEnding
+'uses'+LineEnding
+' {$IFDEF UNIX}{$IFDEF UseCThreads}'+LineEnding
@@ -1460,7 +1460,7 @@
// create program source
NewSource:='program Project1;'+LineEnding
+LineEnding
- +'{$mode objfpc}{$H+}'+LineEnding
+ +'{$mode delphi}'+LineEnding
+LineEnding
+'uses'+LineEnding
+' Classes, SysUtils'+LineEnding
@@ -1552,7 +1552,7 @@
NewSource:=TStringList.Create;
NewSource.Add('program Project1;');
NewSource.Add('');
- NewSource.Add('{$mode objfpc}{$H+}');
+ NewSource.Add('{$mode delphi}');
NewSource.Add('');
NewSource.Add('uses');
NewSource.Add(' {$IFDEF UNIX}{$IFDEF UseCThreads}');
@@ -1561,10 +1561,9 @@
NewSource.Add(' Classes, SysUtils, CustApp');
NewSource.Add(' { you can add units after this };');
NewSource.Add('');
- NewSource.Add('type');
- NewSource.Add('');
NewSource.Add(' { '+C+' }');
NewSource.Add('');
+ NewSource.Add('type');
NewSource.Add(' '+C+' = class(TCustomApplication)');
NewSource.Add(' protected');
NewSource.Add(' procedure DoRun; override;');
@@ -1698,7 +1697,7 @@
// create program source
NewSource:='library Project1;'+LineEnding
+LineEnding
- +'{$mode objfpc}{$H+}'+LineEnding
+ +'{$mode delphi}'+LineEnding
+LineEnding
+'uses'+LineEnding
+' Classes'+LineEnding
Index: ide/projectinspector.lfm
===================================================================
--- ide/projectinspector.lfm (revision 51308)
+++ ide/projectinspector.lfm (working copy)
@@ -36,7 +36,7 @@
object BtnPanel: TPanel
Left = 0
Height = 28
- Top = 48
+ Top = 23
Width = 299
Align = alTop
BevelOuter = bvNone
@@ -123,12 +123,14 @@
end
object ToolBar: TToolBar
Left = 0
- Height = 48
+ Height = 23
Top = 0
Width = 299
AutoSize = True
- ButtonHeight = 46
- ShowCaptions = True
+ ButtonHeight = 23
+ EdgeBorders = []
+ EdgeInner = esNone
+ EdgeOuter = esNone
TabOrder = 2
end
object ItemsPopupMenu: TPopupMenu
Index: ide/splash.pp
===================================================================
--- ide/splash.pp (revision 51308)
+++ ide/splash.pp (working copy)
@@ -81,7 +81,7 @@
EndEllipsis: False;
);
VersionFontStyle: TFontStyles = [fsBold];
- VersionFontColor: TColor = clBlue;
+ VersionFontColor: TColor = clBlack;
constructor TSplashForm.Create(AOwner: TComponent);
begin
Index: lcl/controls.pp
===================================================================
--- lcl/controls.pp (revision 51308)
+++ lcl/controls.pp (working copy)
@@ -466,6 +466,12 @@
TGetSiteInfoEvent = procedure(Sender: TObject; DockClient: TControl;
var InfluenceRect: TRect; MousePos: TPoint; var CanDock: Boolean) of object;
+ TDrawDockImage = procedure(AOldRect, ANewRect: TRect; AOperation: TDockImageOperation);
+
+var
+ DrawDockImage: TDrawDockImage = nil;
+
+type
TDragDockObject = class(TDragObject)
private
FDockOffset: TPoint;
Index: lcl/forms.pp
===================================================================
--- lcl/forms.pp (revision 51308)
+++ lcl/forms.pp (working copy)
@@ -2143,6 +2143,36 @@
or ((csDesigning in LForm.ComponentState) and (LForm.Designer <> nil));
end;
+type
+ TDockImageWindow = class(THintWindow)
+ public
+ constructor Create(AOwner: TComponent); override;
+ end;
+
+constructor TDockImageWindow.Create(AOwner: TComponent);
+begin
+ inherited Create(AOwner);
+ Color := clHighlight;
+ Width := 100;
+ Height := 100;
+ AlphaBlend := True;
+ AlphaBlendValue := 100;
+end;
+
+var
+ DockImageWindow: TDockImageWindow;
+
+procedure HintDockImage(AOldRect, ANewRect: TRect; AOperation: TDockImageOperation);
+begin
+ if DockImageWindow = nil then
+ DockImageWindow := TDockImageWindow.Create(Application);
+ DockImageWindow.BoundsRect := ANewRect;
+ if AOperation = disShow then
+ DockImageWindow.Show
+ else if AOperation = disHide then
+ DockImageWindow.Hide;
+end;
+
initialization
RegisterPropertyToSkip(TForm, 'OldCreateOrder', 'VCL compatibility property', '');
RegisterPropertyToSkip(TForm, 'TextHeight', 'VCL compatibility property', '');
@@ -2153,7 +2183,7 @@
IsFormDesign := @IsFormDesignFunction;
Screen:=TScreen.Create(nil);
Application:=TApplication.Create(nil);
-
+ // DrawDockImage := @HintDockImage;
finalization
//DebugLn('forms.pp - finalization section');
LCLProc.OwnerFormDesignerModifiedProc:=nil;
Index: lcl/include/dragobject.inc
===================================================================
--- lcl/include/dragobject.inc (revision 51308)
+++ lcl/include/dragobject.inc (working copy)
@@ -135,7 +135,10 @@
procedure TDragDockObject.ShowDockImage;
begin
- WidgetSet.DrawDefaultDockImage(EraseDockRect, DockRect, disShow);
+ if Assigned(DrawDockImage) then
+ DrawDockImage(EraseDockRect, DockRect, disShow)
+ else
+ WidgetSet.DrawDefaultDockImage(EraseDockRect, DockRect, disShow);
EraseDockRect := DockRect;
end;
@@ -142,7 +145,10 @@
procedure TDragDockObject.HideDockImage;
begin
if FEraseDockRect.Left<MaxInt then
- WidgetSet.DrawDefaultDockImage(EraseDockRect, DockRect, disHide);
+ if Assigned(DrawDockImage) then
+ DrawDockImage(EraseDockRect, DockRect, disHide)
+ else
+ WidgetSet.DrawDefaultDockImage(EraseDockRect, DockRect, disHide);
FEraseDockRect := Rect(MaxInt, 0, MaxInt, 0);
end;
@@ -151,7 +157,10 @@
//Draw the form outlines when the position has changed
if not CompareRect(@DockRect, @EraseDockRect) then
begin
- WidgetSet.DrawDefaultDockImage(EraseDockRect, DockRect, disMove);
+ if Assigned(DrawDockImage) then
+ DrawDockImage(EraseDockRect, DockRect, disMove)
+ else
+ WidgetSet.DrawDefaultDockImage(EraseDockRect, DockRect, disMove);
EraseDockRect := DockRect;
end;
end;