Changeset 46
- Timestamp:
- Sep 17, 2010, 8:02:32 AM (14 years ago)
- Location:
- DockManager/Lazarus
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
DockManager/Lazarus/Demo/Demo.lpi
r45 r46 32 32 </Item1> 33 33 </RequiredPackages> 34 <Units Count="2 5">34 <Units Count="26"> 35 35 <Unit0> 36 36 <Filename Value="Demo.lpr"/> 37 37 <IsPartOfProject Value="True"/> 38 38 <UnitName Value="Demo"/> 39 <EditorIndex Value="1"/> 39 40 <WindowIndex Value="0"/> 40 41 <TopLine Value="1"/> 41 42 <CursorPos X="1" Y="19"/> 42 <UsageCount Value="25"/> 43 <UsageCount Value="26"/> 44 <Loaded Value="True"/> 43 45 <DefaultSyntaxHighlighter Value="Delphi"/> 44 46 </Unit0> … … 51 53 <EditorIndex Value="0"/> 52 54 <WindowIndex Value="0"/> 53 <TopLine Value=" 52"/>54 <CursorPos X=" 48" Y="57"/>55 <UsageCount Value="2 5"/>55 <TopLine Value="29"/> 56 <CursorPos X="18" Y="38"/> 57 <UsageCount Value="26"/> 56 58 <Loaded Value="True"/> 57 59 <LoadedDesigner Value="True"/> … … 61 63 <Filename Value="E:\Programy\Lazarus\lcl\controls.pp"/> 62 64 <UnitName Value="Controls"/> 63 <EditorIndex Value=" 2"/>64 <WindowIndex Value="0"/> 65 <TopLine Value="1 242"/>66 <CursorPos X="14" Y="1 255"/>67 <UsageCount Value="1 2"/>65 <EditorIndex Value="3"/> 66 <WindowIndex Value="0"/> 67 <TopLine Value="1773"/> 68 <CursorPos X="14" Y="1786"/> 69 <UsageCount Value="13"/> 68 70 <Loaded Value="True"/> 69 71 </Unit2> … … 79 81 <Unit4> 80 82 <Filename Value="E:\Programy\Lazarus\lcl\include\control.inc"/> 81 <WindowIndex Value="0"/> 82 <TopLine Value="3906"/> 83 <CursorPos X="1" Y="3927"/> 84 <UsageCount Value="12"/> 83 <EditorIndex Value="6"/> 84 <WindowIndex Value="0"/> 85 <TopLine Value="3825"/> 86 <CursorPos X="31" Y="3839"/> 87 <UsageCount Value="12"/> 88 <Loaded Value="True"/> 85 89 </Unit4> 86 90 <Unit5> 87 91 <Filename Value="E:\Programy\Lazarus\lcl\include\wincontrol.inc"/> 88 <WindowIndex Value="0"/> 89 <TopLine Value="7260"/> 90 <CursorPos X="1" Y="7231"/> 91 <UsageCount Value="12"/> 92 <EditorIndex Value="4"/> 93 <WindowIndex Value="0"/> 94 <TopLine Value="7737"/> 95 <CursorPos X="3" Y="7739"/> 96 <UsageCount Value="12"/> 97 <Loaded Value="True"/> 92 98 </Unit5> 93 99 <Unit6> … … 165 171 <ResourceBaseClass Value="Form"/> 166 172 <UnitName Value="UDockForm"/> 167 <EditorIndex Value=" 4"/>173 <EditorIndex Value="8"/> 168 174 <WindowIndex Value="0"/> 169 175 <TopLine Value="1"/> 170 176 <CursorPos X="47" Y="8"/> 171 <UsageCount Value="2 4"/>177 <UsageCount Value="25"/> 172 178 <Loaded Value="True"/> 173 179 <LoadedDesigner Value="True"/> … … 193 199 <Filename Value="E:\Projekty jine\Lazarus\examples\anchordocking\anchordocking.pas"/> 194 200 <UnitName Value="AnchorDocking"/> 195 <EditorIndex Value=" 3"/>201 <EditorIndex Value="7"/> 196 202 <WindowIndex Value="0"/> 197 203 <TopLine Value="4754"/> 198 204 <CursorPos X="5" Y="4763"/> 199 <UsageCount Value="1 1"/>205 <UsageCount Value="12"/> 200 206 <Loaded Value="True"/> 201 207 <DefaultSyntaxHighlighter Value="Delphi"/> … … 214 220 <UnitName Value="UCustomDockManager"/> 215 221 <IsVisibleTab Value="True"/> 216 <EditorIndex Value=" 1"/>217 <WindowIndex Value="0"/> 218 <TopLine Value=" 202"/>219 <CursorPos X="1 " Y="217"/>220 <UsageCount Value="2 0"/>222 <EditorIndex Value="2"/> 223 <WindowIndex Value="0"/> 224 <TopLine Value="329"/> 225 <CursorPos X="15" Y="347"/> 226 <UsageCount Value="21"/> 221 227 <Loaded Value="True"/> 222 228 <DefaultSyntaxHighlighter Value="Delphi"/> … … 252 258 <UsageCount Value="10"/> 253 259 </Unit24> 260 <Unit25> 261 <Filename Value="E:\Programy\Lazarus\lcl\widgetset\wscontrols.pp"/> 262 <UnitName Value="WSControls"/> 263 <EditorIndex Value="5"/> 264 <WindowIndex Value="0"/> 265 <TopLine Value="267"/> 266 <CursorPos X="1" Y="269"/> 267 <UsageCount Value="10"/> 268 <Loaded Value="True"/> 269 </Unit25> 254 270 </Units> 255 <JumpHistory Count=" 14" HistoryIndex="13">271 <JumpHistory Count="29" HistoryIndex="28"> 256 272 <Position1> 257 <Filename Value=" ..\UCustomDockManager.pas"/>258 <Caret Line=" 129" Column="1" TopLine="116"/>273 <Filename Value="E:\Programy\Lazarus\lcl\include\wincontrol.inc"/> 274 <Caret Line="7679" Column="29" TopLine="7664"/> 259 275 </Position1> 260 276 <Position2> 261 <Filename Value=" ..\UCustomDockManager.pas"/>262 <Caret Line=" 226" Column="1" TopLine="213"/>277 <Filename Value="E:\Programy\Lazarus\lcl\include\wincontrol.inc"/> 278 <Caret Line="7703" Column="30" TopLine="7690"/> 263 279 </Position2> 264 280 <Position3> 265 <Filename Value=" ..\UCustomDockManager.pas"/>266 <Caret Line=" 129" Column="1" TopLine="116"/>281 <Filename Value="E:\Programy\Lazarus\lcl\include\wincontrol.inc"/> 282 <Caret Line="7701" Column="20" TopLine="7690"/> 267 283 </Position3> 268 284 <Position4> 269 <Filename Value=" UMainForm.pas"/>270 <Caret Line=" 56" Column="1" TopLine="42"/>285 <Filename Value="E:\Programy\Lazarus\lcl\include\wincontrol.inc"/> 286 <Caret Line="7703" Column="30" TopLine="7690"/> 271 287 </Position4> 272 288 <Position5> 289 <Filename Value="E:\Programy\Lazarus\lcl\include\wincontrol.inc"/> 290 <Caret Line="7704" Column="19" TopLine="7690"/> 291 </Position5> 292 <Position6> 293 <Filename Value="E:\Programy\Lazarus\lcl\include\wincontrol.inc"/> 294 <Caret Line="140" Column="53" TopLine="133"/> 295 </Position6> 296 <Position7> 297 <Filename Value="E:\Programy\Lazarus\lcl\include\wincontrol.inc"/> 298 <Caret Line="6224" Column="18" TopLine="6211"/> 299 </Position7> 300 <Position8> 301 <Filename Value="E:\Programy\Lazarus\lcl\include\wincontrol.inc"/> 302 <Caret Line="6225" Column="27" TopLine="6211"/> 303 </Position8> 304 <Position9> 305 <Filename Value="E:\Programy\Lazarus\lcl\include\wincontrol.inc"/> 306 <Caret Line="6230" Column="36" TopLine="6211"/> 307 </Position9> 308 <Position10> 309 <Filename Value="E:\Programy\Lazarus\lcl\include\wincontrol.inc"/> 310 <Caret Line="6232" Column="18" TopLine="6211"/> 311 </Position10> 312 <Position11> 313 <Filename Value="E:\Programy\Lazarus\lcl\include\wincontrol.inc"/> 314 <Caret Line="6233" Column="36" TopLine="6211"/> 315 </Position11> 316 <Position12> 317 <Filename Value="E:\Programy\Lazarus\lcl\include\wincontrol.inc"/> 318 <Caret Line="6343" Column="25" TopLine="6330"/> 319 </Position12> 320 <Position13> 321 <Filename Value="E:\Programy\Lazarus\lcl\include\wincontrol.inc"/> 322 <Caret Line="6356" Column="27" TopLine="6343"/> 323 </Position13> 324 <Position14> 325 <Filename Value="E:\Programy\Lazarus\lcl\include\wincontrol.inc"/> 326 <Caret Line="7677" Column="18" TopLine="7664"/> 327 </Position14> 328 <Position15> 329 <Filename Value="E:\Programy\Lazarus\lcl\include\wincontrol.inc"/> 330 <Caret Line="7678" Column="22" TopLine="7664"/> 331 </Position15> 332 <Position16> 333 <Filename Value="E:\Programy\Lazarus\lcl\include\wincontrol.inc"/> 334 <Caret Line="7679" Column="29" TopLine="7664"/> 335 </Position16> 336 <Position17> 337 <Filename Value="E:\Programy\Lazarus\lcl\include\wincontrol.inc"/> 338 <Caret Line="7703" Column="30" TopLine="7690"/> 339 </Position17> 340 <Position18> 341 <Filename Value="E:\Programy\Lazarus\lcl\include\wincontrol.inc"/> 342 <Caret Line="7704" Column="19" TopLine="7690"/> 343 </Position18> 344 <Position19> 345 <Filename Value="E:\Programy\Lazarus\lcl\include\control.inc"/> 346 <Caret Line="3980" Column="19" TopLine="3974"/> 347 </Position19> 348 <Position20> 349 <Filename Value="E:\Programy\Lazarus\lcl\include\control.inc"/> 350 <Caret Line="5" Column="69" TopLine="1"/> 351 </Position20> 352 <Position21> 353 <Filename Value="E:\Programy\Lazarus\lcl\include\control.inc"/> 354 <Caret Line="3819" Column="66" TopLine="3806"/> 355 </Position21> 356 <Position22> 357 <Filename Value="E:\Programy\Lazarus\lcl\include\control.inc"/> 358 <Caret Line="3820" Column="37" TopLine="3806"/> 359 </Position22> 360 <Position23> 361 <Filename Value="E:\Programy\Lazarus\lcl\include\control.inc"/> 362 <Caret Line="3821" Column="58" TopLine="3806"/> 363 </Position23> 364 <Position24> 365 <Filename Value="E:\Programy\Lazarus\lcl\include\control.inc"/> 366 <Caret Line="3822" Column="33" TopLine="3806"/> 367 </Position24> 368 <Position25> 369 <Filename Value="E:\Programy\Lazarus\lcl\include\control.inc"/> 370 <Caret Line="3838" Column="66" TopLine="3825"/> 371 </Position25> 372 <Position26> 373 <Filename Value="E:\Programy\Lazarus\lcl\include\control.inc"/> 374 <Caret Line="3839" Column="31" TopLine="3825"/> 375 </Position26> 376 <Position27> 377 <Filename Value="..\UCustomDockManager.pas"/> 378 <Caret Line="170" Column="37" TopLine="153"/> 379 </Position27> 380 <Position28> 381 <Filename Value="..\UCustomDockManager.pas"/> 382 <Caret Line="225" Column="7" TopLine="204"/> 383 </Position28> 384 <Position29> 273 385 <Filename Value="..\UCustomDockManager.pas"/> 274 386 <Caret Line="199" Column="1" TopLine="186"/> 275 </Position5> 276 <Position6> 277 <Filename Value="..\UCustomDockManager.pas"/> 278 <Caret Line="217" Column="20" TopLine="205"/> 279 </Position6> 280 <Position7> 281 <Filename Value="..\UCustomDockManager.pas"/> 282 <Caret Line="220" Column="1" TopLine="205"/> 283 </Position7> 284 <Position8> 285 <Filename Value="..\UCustomDockManager.pas"/> 286 <Caret Line="218" Column="1" TopLine="205"/> 287 </Position8> 288 <Position9> 289 <Filename Value="..\UCustomDockManager.pas"/> 290 <Caret Line="287" Column="1" TopLine="274"/> 291 </Position9> 292 <Position10> 293 <Filename Value="..\UCustomDockManager.pas"/> 294 <Caret Line="288" Column="1" TopLine="274"/> 295 </Position10> 296 <Position11> 297 <Filename Value="..\UCustomDockManager.pas"/> 298 <Caret Line="290" Column="1" TopLine="274"/> 299 </Position11> 300 <Position12> 301 <Filename Value="..\UCustomDockManager.pas"/> 302 <Caret Line="291" Column="1" TopLine="274"/> 303 </Position12> 304 <Position13> 305 <Filename Value="..\UCustomDockManager.pas"/> 306 <Caret Line="294" Column="1" TopLine="274"/> 307 </Position13> 308 <Position14> 309 <Filename Value="..\UCustomDockManager.pas"/> 310 <Caret Line="218" Column="1" TopLine="202"/> 311 </Position14> 387 </Position29> 312 388 </JumpHistory> 313 389 </ProjectOptions> -
DockManager/Lazarus/Demo/UMainForm.lfm
r44 r46 8 8 ClientWidth = 320 9 9 OnCreate = FormCreate 10 OnDestroy = FormDestroy 10 11 OnShow = FormShow 11 12 LCLVersion = '0.9.29' -
DockManager/Lazarus/Demo/UMainForm.pas
r44 r46 18 18 procedure Button1Click(Sender: TObject); 19 19 procedure FormCreate(Sender: TObject); 20 procedure FormDestroy(Sender: TObject); 20 21 procedure FormShow(Sender: TObject); 21 22 private … … 23 24 public 24 25 FormIndex: Integer; 25 LastDockForm: TDockForm;26 DockForms: TList; 26 27 function NewDockForm: TDockForm; 27 28 end; … … 38 39 procedure TMainForm.FormCreate(Sender: TObject); 39 40 begin 41 DockForms := TList.Create; 42 end; 43 44 procedure TMainForm.FormDestroy(Sender: TObject); 45 begin 46 DockForms.Free; 40 47 end; 41 48 … … 46 53 DockForm3: TDockForm; 47 54 begin 48 DockForm1 := NewDockForm; 49 DockForm1.ManualDock(Panel1); 50 51 DockForm2 := NewDockForm; 52 DockForm2.ManualDock(Panel1); 53 54 DockForm3 := NewDockForm; 55 DockForm3.ManualDock(DockForm2); 55 NewDockForm.ManualDock(Panel1); 56 NewDockForm.ManualDock(Panel1, nil, alBottom); 57 NewDockForm.ManualDock(TForm(DockForms[1]).Parent); 58 NewDockForm.ManualDock(TForm(DockForms[1]).Parent); 56 59 end; 57 60 … … 67 70 Inc(FormIndex); 68 71 Result.Show; 72 DockForms.Add(Result); 69 73 end; 70 74 -
DockManager/Lazarus/UCustomDockManager.pas
r45 r46 31 31 Control: TControl; 32 32 Splitter: TSplitter; 33 ClientAreaPanel: TPanel; 33 34 constructor Create(TheOwner: TComponent); override; 34 35 destructor Destroy; override; … … 177 178 end; 178 179 NewPanel.Control := Control; 179 Control.Parent := NewPanel; 180 Control.Parent := NewPanel.ClientAreaPanel; 181 Control.Align := alClient; 180 182 FDockPanels.Add(NewPanel); 181 183 … … 202 204 NewConjoinDockForm := TConjoinDockForm.Create(nil); 203 205 NewConjoinDockForm.Visible := True; 206 NewConjoinDockForm.BoundsRect := FDockSite.BoundsRect; 204 207 Control.ManualDock(NewConjoinDockForm.Panel); 205 208 FDockSite.ManualDock(NewConjoinDockForm.Panel); 206 209 end else begin 207 NewPanel := TPanel.Create(nil); 208 NewPanel.Parent := FDockSite.Parent; 209 NewPanel.Visible := True; 210 NewPanel.Left := FDockSite.Left; 211 NewPanel.Top := FDockSite.Top; 212 NewPanel.Width := FDockSite.Width; 213 NewPanel.Height := FDockSite.Height; 214 NewPanel.UseDockManager := True; 215 NewPanel.DockSite := True; 216 NewPanel.Color := clGreen; 217 NewPanel.ManualDock(FDockSite.HostDockSite); 218 // FDockSite.Parent := nil; 219 Control.ManualDock(NewPanel); 220 FDockSite.ManualDock(NewPanel); 210 Control.ManualDock(FDockSite.Parent); 221 211 end; 222 212 end else 223 if FDockSite is TPanelthen begin213 if (FDockSite is TPanel) or (FDockSite is TDockClientPanel) then begin 224 214 InsertControlPanel(Control, InsertAt, DropCtl); 225 215 end; … … 332 322 OnClick := CloseButtonClick; 333 323 end; 324 ClientAreaPanel := TPanel.Create(Self); 325 with ClientAreaPanel do begin 326 Parent := Self; 327 Visible := True; 328 DockSite := True; 329 UseDockManager := True; 330 Left := 0; 331 Top := GrabberSize; 332 Width := Self.Width; 333 Height := Self.Height; 334 Anchors := [akTop, akBottom, akLeft, akRight]; 335 BevelInner := bvNone; 336 BevelOuter := bvNone; 337 end; 334 338 OnPaint := DockPanelPaint; 335 339 OnMouseDown := DockPanelMouseDown;
Note:
See TracChangeset
for help on using the changeset viewer.