Changeset 207
- Timestamp:
- Mar 18, 2011, 11:05:39 AM (14 years ago)
- Location:
- Docking/CoolDocking
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
Docking/CoolDocking/Demo/IDE/IDE.lpi
r205 r207 63 63 <ResourceBaseClass Value="Form"/> 64 64 <UnitName Value="UMainForm"/> 65 <EditorIndex Value=" 4"/>66 <WindowIndex Value="0"/> 67 <TopLine Value="9 2"/>68 <CursorPos X=" 73" Y="89"/>65 <EditorIndex Value="1"/> 66 <WindowIndex Value="0"/> 67 <TopLine Value="96"/> 68 <CursorPos X="26" Y="95"/> 69 69 <UsageCount Value="314"/> 70 70 <Loaded Value="True"/> … … 108 108 <EditorIndex Value="3"/> 109 109 <WindowIndex Value="0"/> 110 <TopLine Value="3 938"/>111 <CursorPos X="1" Y="3 951"/>110 <TopLine Value="3705"/> 111 <CursorPos X="1" Y="3726"/> 112 112 <UsageCount Value="77"/> 113 113 <Loaded Value="True"/> … … 203 203 <ResourceBaseClass Value="Form"/> 204 204 <UnitName Value="USourceEditorForm"/> 205 <EditorIndex Value="5"/>206 205 <WindowIndex Value="0"/> 207 206 <TopLine Value="9"/> 208 207 <CursorPos X="28" Y="22"/> 209 208 <UsageCount Value="312"/> 210 <Loaded Value="True"/>211 209 </Unit14> 212 210 <Unit15> … … 259 257 <Filename Value="E:\Projekty2\FreePascalManager\trunk\Instance\1\Lazarus\lcl\controls.pp"/> 260 258 <UnitName Value="Controls"/> 261 <EditorIndex Value="2"/> 262 <WindowIndex Value="0"/> 263 <TopLine Value="1222"/> 264 <CursorPos X="37" Y="1235"/> 265 <UsageCount Value="57"/> 266 <Loaded Value="True"/> 259 <WindowIndex Value="0"/> 260 <TopLine Value="1385"/> 261 <CursorPos X="14" Y="1398"/> 262 <UsageCount Value="58"/> 267 263 </Unit21> 268 264 <Unit22> 269 265 <Filename Value="E:\Projekty2\FreePascalManager\trunk\Instance\1\Lazarus\lcl\include\wincontrol.inc"/> 270 <WindowIndex Value="0"/> 271 <TopLine Value="7785"/> 272 <CursorPos X="1" Y="7810"/> 266 <EditorIndex Value="8"/> 267 <WindowIndex Value="0"/> 268 <TopLine Value="6712"/> 269 <CursorPos X="18" Y="6726"/> 273 270 <UsageCount Value="111"/> 271 <Loaded Value="True"/> 274 272 </Unit22> 275 273 <Unit23> … … 295 293 <Filename Value="..\..\UCDPopupMenu.pas"/> 296 294 <UnitName Value="UCDPopupMenu"/> 297 <EditorIndex Value=" 9"/>298 <WindowIndex Value="0"/> 299 <TopLine Value=" 159"/>300 <CursorPos X=" 25" Y="173"/>295 <EditorIndex Value="7"/> 296 <WindowIndex Value="0"/> 297 <TopLine Value="319"/> 298 <CursorPos X="1" Y="337"/> 301 299 <UsageCount Value="141"/> 302 300 <Loaded Value="True"/> … … 329 327 <Filename Value="..\..\Managers\UCDManagerTabs.pas"/> 330 328 <UnitName Value="UCDManagerTabs"/> 331 <EditorIndex Value=" 8"/>332 <WindowIndex Value="0"/> 333 <TopLine Value="1 72"/>334 <CursorPos X=" 12" Y="183"/>329 <EditorIndex Value="6"/> 330 <WindowIndex Value="0"/> 331 <TopLine Value="11"/> 332 <CursorPos X="33" Y="24"/> 335 333 <UsageCount Value="130"/> 336 334 <Loaded Value="True"/> … … 339 337 <Filename Value="..\..\Managers\UCDManagerRegions.pas"/> 340 338 <UnitName Value="UCDManagerRegions"/> 341 <EditorIndex Value=" 7"/>342 <WindowIndex Value="0"/> 343 <TopLine Value=" 61"/>344 <CursorPos X=" 27" Y="84"/>339 <EditorIndex Value="5"/> 340 <WindowIndex Value="0"/> 341 <TopLine Value="56"/> 342 <CursorPos X="15" Y="69"/> 345 343 <UsageCount Value="129"/> 346 344 <Loaded Value="True"/> … … 349 347 <Filename Value="..\..\Managers\UCDManagerTabsPopup.pas"/> 350 348 <UnitName Value="UCDManagerTabsPopup"/> 351 <IsVisibleTab Value="True"/>352 349 <EditorIndex Value="0"/> 353 350 <WindowIndex Value="0"/> 354 <TopLine Value="4 14"/>355 <CursorPos X=" 1" Y="439"/>351 <TopLine Value="45"/> 352 <CursorPos X="35" Y="53"/> 356 353 <UsageCount Value="120"/> 357 354 <Loaded Value="True"/> … … 380 377 <Filename Value="..\..\UCDManager.pas"/> 381 378 <UnitName Value="UCDManager"/> 382 <EditorIndex Value="6"/> 383 <WindowIndex Value="0"/> 384 <TopLine Value="40"/> 385 <CursorPos X="18" Y="53"/> 379 <IsVisibleTab Value="True"/> 380 <EditorIndex Value="2"/> 381 <WindowIndex Value="0"/> 382 <TopLine Value="202"/> 383 <CursorPos X="1" Y="223"/> 386 384 <UsageCount Value="105"/> 387 385 <Loaded Value="True"/> … … 390 388 <Filename Value="..\..\UCDConjoinForm.pas"/> 391 389 <UnitName Value="UCDConjoinForm"/> 392 <WindowIndex Value="0"/> 393 <TopLine Value="44"/> 394 <CursorPos X="3" Y="47"/> 395 <UsageCount Value="98"/> 390 <EditorIndex Value="4"/> 391 <WindowIndex Value="0"/> 392 <TopLine Value="38"/> 393 <CursorPos X="17" Y="51"/> 394 <UsageCount Value="99"/> 395 <Loaded Value="True"/> 396 396 </Unit35> 397 397 <Unit36> 398 398 <Filename Value="E:\Projekty2\FreePascalManager\trunk\Instance\1\Lazarus\lcl\extctrls.pp"/> 399 399 <UnitName Value="ExtCtrls"/> 400 <EditorIndex Value="1"/>401 400 <WindowIndex Value="0"/> 402 401 <TopLine Value="1181"/> 403 402 <CursorPos X="22" Y="1194"/> 404 403 <UsageCount Value="96"/> 405 <Loaded Value="True"/>406 404 </Unit36> 407 405 <Unit37> 408 406 <Filename Value="..\..\UCDMaster.pas"/> 409 407 <UnitName Value="UCDMaster"/> 410 <EditorIndex Value=" 10"/>408 <EditorIndex Value="9"/> 411 409 <WindowIndex Value="0"/> 412 410 <TopLine Value="11"/> … … 419 417 <UnitName Value="ComCtrls"/> 420 418 <WindowIndex Value="0"/> 421 <TopLine Value=" 255"/>422 <CursorPos X="14" Y="3 04"/>419 <TopLine Value="343"/> 420 <CursorPos X="14" Y="356"/> 423 421 <UsageCount Value="91"/> 424 422 </Unit38> … … 553 551 <JumpHistory Count="30" HistoryIndex="29"> 554 552 <Position1> 555 <Filename Value="..\..\Managers\UCDManager TabsPopup.pas"/>556 <Caret Line="28 5" Column="10" TopLine="272"/>553 <Filename Value="..\..\Managers\UCDManagerRegions.pas"/> 554 <Caret Line="287" Column="1" TopLine="271"/> 557 555 </Position1> 558 556 <Position2> 559 <Filename Value="..\..\Managers\UCDManager TabsPopup.pas"/>560 <Caret Line="2 34" Column="41" TopLine="228"/>557 <Filename Value="..\..\Managers\UCDManagerRegions.pas"/> 558 <Caret Line="288" Column="1" TopLine="271"/> 561 559 </Position2> 562 560 <Position3> 563 <Filename Value="..\..\Managers\UCDManager TabsPopup.pas"/>564 <Caret Line=" 9" Column="52" TopLine="1"/>561 <Filename Value="..\..\Managers\UCDManagerRegions.pas"/> 562 <Caret Line="289" Column="1" TopLine="271"/> 565 563 </Position3> 566 564 <Position4> 567 <Filename Value="..\..\Managers\UCDManager TabsPopup.pas"/>568 <Caret Line="2 82" Column="25" TopLine="269"/>565 <Filename Value="..\..\Managers\UCDManagerRegions.pas"/> 566 <Caret Line="290" Column="1" TopLine="271"/> 569 567 </Position4> 570 568 <Position5> 571 <Filename Value="..\..\Managers\UCDManager TabsPopup.pas"/>572 <Caret Line=" 361" Column="13" TopLine="352"/>569 <Filename Value="..\..\Managers\UCDManagerRegions.pas"/> 570 <Caret Line="291" Column="1" TopLine="271"/> 573 571 </Position5> 574 572 <Position6> 575 <Filename Value=" ..\..\Managers\UCDManagerTabsPopup.pas"/>576 <Caret Line=" 291" Column="15" TopLine="274"/>573 <Filename Value="E:\Projekty2\FreePascalManager\trunk\Instance\1\Lazarus\lcl\include\control.inc"/> 574 <Caret Line="3691" Column="1" TopLine="3678"/> 577 575 </Position6> 578 576 <Position7> 579 <Filename Value=" ..\..\Managers\UCDManagerTabsPopup.pas"/>580 <Caret Line=" 56" Column="45" TopLine="53"/>577 <Filename Value="E:\Projekty2\FreePascalManager\trunk\Instance\1\Lazarus\lcl\include\control.inc"/> 578 <Caret Line="3694" Column="1" TopLine="3678"/> 581 579 </Position7> 582 580 <Position8> 583 <Filename Value=" ..\..\Managers\UCDManagerTabsPopup.pas"/>584 <Caret Line="3 56" Column="3" TopLine="354"/>581 <Filename Value="E:\Projekty2\FreePascalManager\trunk\Instance\1\Lazarus\lcl\include\control.inc"/> 582 <Caret Line="3695" Column="1" TopLine="3678"/> 585 583 </Position8> 586 584 <Position9> 587 <Filename Value=" ..\..\Managers\UCDManagerTabsPopup.pas"/>588 <Caret Line=" 56" Column="43" TopLine="43"/>585 <Filename Value="E:\Projekty2\FreePascalManager\trunk\Instance\1\Lazarus\lcl\include\control.inc"/> 586 <Caret Line="3696" Column="1" TopLine="3678"/> 589 587 </Position9> 590 588 <Position10> 591 <Filename Value=" ..\..\Managers\UCDManagerTabsPopup.pas"/>592 <Caret Line="3 54" Column="59" TopLine="341"/>589 <Filename Value="E:\Projekty2\FreePascalManager\trunk\Instance\1\Lazarus\lcl\include\control.inc"/> 590 <Caret Line="3697" Column="1" TopLine="3678"/> 593 591 </Position10> 594 592 <Position11> 595 <Filename Value=" ..\..\Managers\UCDManagerTabsPopup.pas"/>596 <Caret Line="3 56" Column="8" TopLine="341"/>593 <Filename Value="E:\Projekty2\FreePascalManager\trunk\Instance\1\Lazarus\lcl\include\control.inc"/> 594 <Caret Line="3698" Column="1" TopLine="3678"/> 597 595 </Position11> 598 596 <Position12> 599 <Filename Value=" ..\..\Managers\UCDManagerTabsPopup.pas"/>600 <Caret Line=" 62" Column="19" TopLine="49"/>597 <Filename Value="E:\Projekty2\FreePascalManager\trunk\Instance\1\Lazarus\lcl\include\control.inc"/> 598 <Caret Line="3700" Column="1" TopLine="3679"/> 601 599 </Position12> 602 600 <Position13> 603 <Filename Value="E:\Projekty2\FreePascalManager\trunk\Instance\1\Lazarus\lcl\ extctrls.pp"/>604 <Caret Line=" 570" Column="26" TopLine="563"/>601 <Filename Value="E:\Projekty2\FreePascalManager\trunk\Instance\1\Lazarus\lcl\include\control.inc"/> 602 <Caret Line="3702" Column="1" TopLine="3681"/> 605 603 </Position13> 606 604 <Position14> 607 <Filename Value="E:\Projekty2\FreePascalManager\trunk\Instance\1\Lazarus\lcl\ extctrls.pp"/>608 <Caret Line=" 563" Column="32" TopLine="545"/>605 <Filename Value="E:\Projekty2\FreePascalManager\trunk\Instance\1\Lazarus\lcl\include\control.inc"/> 606 <Caret Line="3703" Column="1" TopLine="3682"/> 609 607 </Position14> 610 608 <Position15> 611 <Filename Value="E:\Projekty2\FreePascalManager\trunk\Instance\1\Lazarus\lcl\ extctrls.pp"/>612 <Caret Line=" 564" Column="33" TopLine="545"/>609 <Filename Value="E:\Projekty2\FreePascalManager\trunk\Instance\1\Lazarus\lcl\include\control.inc"/> 610 <Caret Line="3706" Column="1" TopLine="3685"/> 613 611 </Position15> 614 612 <Position16> 615 <Filename Value=" ..\..\Managers\UCDManagerTabsPopup.pas"/>616 <Caret Line=" 292" Column="19" TopLine="275"/>613 <Filename Value="E:\Projekty2\FreePascalManager\trunk\Instance\1\Lazarus\lcl\include\control.inc"/> 614 <Caret Line="3707" Column="1" TopLine="3686"/> 617 615 </Position16> 618 616 <Position17> 619 <Filename Value=" ..\..\Managers\UCDManagerTabsPopup.pas"/>620 <Caret Line=" 58" Column="30" TopLine="47"/>617 <Filename Value="E:\Projekty2\FreePascalManager\trunk\Instance\1\Lazarus\lcl\include\control.inc"/> 618 <Caret Line="3708" Column="1" TopLine="3687"/> 621 619 </Position17> 622 620 <Position18> 623 <Filename Value=" ..\..\Managers\UCDManagerTabsPopup.pas"/>624 <Caret Line=" 56" Column="33" TopLine="43"/>621 <Filename Value="E:\Projekty2\FreePascalManager\trunk\Instance\1\Lazarus\lcl\include\control.inc"/> 622 <Caret Line="3709" Column="1" TopLine="3688"/> 625 623 </Position18> 626 624 <Position19> 627 <Filename Value=" ..\..\Managers\UCDManagerTabsPopup.pas"/>628 <Caret Line=" 58" Column="31" TopLine="43"/>625 <Filename Value="E:\Projekty2\FreePascalManager\trunk\Instance\1\Lazarus\lcl\include\control.inc"/> 626 <Caret Line="3710" Column="1" TopLine="3689"/> 629 627 </Position19> 630 628 <Position20> 631 <Filename Value=" ..\..\Managers\UCDManagerTabsPopup.pas"/>632 <Caret Line="3 58" Column="1" TopLine="345"/>629 <Filename Value="E:\Projekty2\FreePascalManager\trunk\Instance\1\Lazarus\lcl\include\control.inc"/> 630 <Caret Line="3714" Column="1" TopLine="3693"/> 633 631 </Position20> 634 632 <Position21> 635 <Filename Value=" ..\..\Managers\UCDManagerTabsPopup.pas"/>636 <Caret Line=" 56" Column="15" TopLine="43"/>633 <Filename Value="E:\Projekty2\FreePascalManager\trunk\Instance\1\Lazarus\lcl\include\control.inc"/> 634 <Caret Line="3715" Column="1" TopLine="3694"/> 637 635 </Position21> 638 636 <Position22> 639 <Filename Value=" ..\..\Managers\UCDManagerTabsPopup.pas"/>640 <Caret Line="3 69" Column="13" TopLine="366"/>637 <Filename Value="E:\Projekty2\FreePascalManager\trunk\Instance\1\Lazarus\lcl\include\control.inc"/> 638 <Caret Line="3718" Column="1" TopLine="3697"/> 641 639 </Position22> 642 640 <Position23> 643 <Filename Value=" ..\..\Managers\UCDManagerTabsPopup.pas"/>644 <Caret Line="3 80" Column="23" TopLine="360"/>641 <Filename Value="E:\Projekty2\FreePascalManager\trunk\Instance\1\Lazarus\lcl\include\control.inc"/> 642 <Caret Line="3721" Column="1" TopLine="3700"/> 645 643 </Position23> 646 644 <Position24> 647 <Filename Value=" ..\..\Managers\UCDManagerTabsPopup.pas"/>648 <Caret Line=" 298" Column="32" TopLine="285"/>645 <Filename Value="E:\Projekty2\FreePascalManager\trunk\Instance\1\Lazarus\lcl\include\control.inc"/> 646 <Caret Line="3724" Column="1" TopLine="3703"/> 649 647 </Position24> 650 648 <Position25> 651 <Filename Value=" ..\..\Managers\UCDManagerTabsPopup.pas"/>652 <Caret Line=" 61" Column="45" TopLine="47"/>649 <Filename Value="E:\Projekty2\FreePascalManager\trunk\Instance\1\Lazarus\lcl\include\control.inc"/> 650 <Caret Line="3726" Column="1" TopLine="3705"/> 653 651 </Position25> 654 652 <Position26> 655 <Filename Value="..\..\Managers\UCDManager TabsPopup.pas"/>656 <Caret Line=" 369" Column="74" TopLine="369"/>653 <Filename Value="..\..\Managers\UCDManagerRegions.pas"/> 654 <Caret Line="292" Column="1" TopLine="271"/> 657 655 </Position26> 658 656 <Position27> 659 <Filename Value="..\..\Managers\UCDManager TabsPopup.pas"/>660 <Caret Line="29 8" Column="44" TopLine="285"/>657 <Filename Value="..\..\Managers\UCDManagerRegions.pas"/> 658 <Caret Line="293" Column="1" TopLine="272"/> 661 659 </Position27> 662 660 <Position28> 663 <Filename Value="..\..\Managers\UCDManager TabsPopup.pas"/>664 <Caret Line=" 369" Column="49" TopLine="356"/>661 <Filename Value="..\..\Managers\UCDManagerRegions.pas"/> 662 <Caret Line="69" Column="29" TopLine="50"/> 665 663 </Position28> 666 664 <Position29> 667 <Filename Value="..\..\ Managers\UCDManagerTabsPopup.pas"/>668 <Caret Line=" 62" Column="30" TopLine="47"/>665 <Filename Value="..\..\UCDManager.pas"/> 666 <Caret Line="50" Column="1" TopLine="44"/> 669 667 </Position29> 670 668 <Position30> 671 <Filename Value="..\..\ Managers\UCDManagerTabsPopup.pas"/>672 <Caret Line=" 303" Column="16" TopLine="282"/>669 <Filename Value="..\..\UCDManager.pas"/> 670 <Caret Line="223" Column="16" TopLine="201"/> 673 671 </Position30> 674 672 </JumpHistory> … … 711 709 </CompilerOptions> 712 710 <Debugging> 711 <BreakPoints Count="1"> 712 <Item1> 713 <Source Value="..\..\UCDPopupMenu.pas"/> 714 <Line Value="334"/> 715 </Item1> 716 </BreakPoints> 713 717 <Watches Count="1"> 714 718 <Item1> -
Docking/CoolDocking/Managers/UCDManagerRegions.pas
r198 r207 67 67 //R := Control.ClientRect; 68 68 //Canvas.FillRect(R); 69 Header.Visible := ShowHeader; 70 if ShowHeader then begin 69 if Visible then begin 71 70 if ControlPanel.DockClientCount = 0 then 72 71 Header.DrawGrabber(Canvas, Control) else … … 162 161 163 162 NewItem.PanelHeader.Parent := DockSite; 164 NewItem.PanelHeader.Header.Title.Caption := TForm(Control).Caption;165 163 166 164 NewItem.Control := Control; … … 290 288 PanelHeader.Width := Self.DockSite.Width div 291 289 Self.DockSite.DockClientCount; 290 PanelHeader.Header.Visible := TCDManager(TWinControl(Control).DockManager).HeaderVisible; 291 PanelHeader.Header.Title.Caption := TForm(Control).Caption; 292 292 Paint(Self); 293 293 if I < (DockItems.Count - 1) then PanelHeader.Align := BaseAlign -
Docking/CoolDocking/Managers/UCDManagerTabsPopup.pas
r205 r207 55 55 SplitterMouseDrag: Boolean; 56 56 SplitterMousePos: TPoint; 57 procedure PageControlResize(Sender: TObject); 57 58 procedure InsertControlNoUpdate(Control: TControl; InsertAt: TAlign); override; 58 59 procedure SplitterMouseDown(Sender: TObject; Button: TMouseButton; … … 62 63 procedure SplitterMouseUp(Sender: TObject; Button: TMouseButton; 63 64 Shift: TShiftState; X, Y: Integer); 65 procedure UpdatePopupFormBounds; 66 procedure TabControlChange(Sender: TObject); override; 64 67 public 65 68 AutoHideEnabled: Boolean; … … 71 74 procedure PinShowButtonClick(Sender: TObject); 72 75 procedure PinHideButtonClick(Sender: TObject); 73 procedure TabControlChange(Sender: TObject); override;74 76 constructor Create(ADockSite: TWinControl); override; 75 77 destructor Destroy; override; … … 243 245 C.Parent := HeaderPanel.ControlPanel; 244 246 HeaderPanel.Header.Title.Caption := C.Caption; 245 Pos := Point(PageControl.Left, PageControl.Top);246 247 TopParent := DockSite;248 while Assigned(TopParent.Parent) do begin249 Pos.X := Pos.X + TopParent.Left;;250 Pos.Y := Pos.Y + TopParent.Top;251 TopParent := TopParent.Parent;252 end;253 PopupForm.Parent := TopParent;254 247 //AutoHide.Control.Align := alCustom; 255 248 //Pos := DockSite.ClientToScreen(Pos); 256 C.TBDockHeight := 100;257 C.LRDockWidth := 100;258 with AutoHide.Control do259 case AutoHide.TabPosition of260 tpTop: begin261 SetBounds(Pos.X, Pos.Y + PageControl.Height,262 PageControl.Width, C.TBDockHeight);263 end;264 tpLeft: begin265 SetBounds(Pos.X + PageControl.Width, Pos.Y,266 C.LRDockWidth, PageControl.Height);267 end;268 tpBottom: begin269 SetBounds(Pos.X, Pos.Y - C.TBDockHeight,270 PageControl.Width, C.TBDockHeight);271 end;272 tpRight: begin273 SetBounds(Pos.X - C.LRDockWidth, Pos.Y,274 C.LRDockWidth, PageControl.Height);275 end;276 end;277 249 //AutoHide.Control.SetBounds(0, 0, 100, 100); 250 UpdatePopupFormBounds; 278 251 AutoHide.Show; 279 252 end; … … 302 275 AutoHide := TCDAutoHide.Create; 303 276 AutoHide.Control := PopupForm; 277 PageControl.OnResize := PageControlResize; 304 278 305 279 for I := 0 to DockItems.Count - 1 do begin … … 316 290 HeaderPanel.Free; 317 291 inherited Destroy; 292 end; 293 294 procedure TCDManagerTabsPopup.PageControlResize(Sender: TObject); 295 begin 296 UpdatePopupFormBounds; 318 297 end; 319 298 … … 376 355 case Splitter.Align of 377 356 alLeft: begin 378 PopupForm.SetBounds(PopupForm.Left -(X - SplitterMousePos.X),357 PopupForm.SetBounds(PopupForm.Left + (X - SplitterMousePos.X), 379 358 PopupForm.Top, PopupForm.Width - (X - SplitterMousePos.X), 380 359 PopupForm.Height); … … 385 364 end; 386 365 alTop: begin 387 PopupForm.SetBounds(PopupForm.Left, PopupForm.Top + (Y - SplitterMousePos.Y),388 PopupForm.Width, PopupForm.Height +(Y - SplitterMousePos.Y));366 PopupForm.SetBounds(PopupForm.Left, PopupForm.Top + (Y - SplitterMousePos.Y), 367 PopupForm.Width, PopupForm.Height - (Y - SplitterMousePos.Y)); 389 368 end; 390 369 alBottom: begin … … 400 379 begin 401 380 SplitterMouseDrag := False; 381 end; 382 383 procedure TCDManagerTabsPopup.UpdatePopupFormBounds; 384 var 385 Pos: TPoint; 386 C: TControl; 387 TopParent: TWinControl; 388 begin 389 if PageControl.TabIndex <> - 1 then begin 390 Pos := Point(PageControl.Left, PageControl.Top); 391 TopParent := DockSite; 392 while Assigned(TopParent.Parent) do begin 393 Pos.X := Pos.X + TopParent.Left;; 394 Pos.Y := Pos.Y + TopParent.Top; 395 TopParent := TopParent.Parent; 396 end; 397 PopupForm.Parent := TopParent; 398 399 C := TCDManagerTabsPopupItem(DockItems[PageControl.TabIndex]).Control; 400 C.TBDockHeight := 100; 401 C.LRDockWidth := 100; 402 with AutoHide.Control do 403 case AutoHide.TabPosition of 404 tpTop: begin 405 SetBounds(Pos.X, Pos.Y + PageControl.Height, 406 PageControl.Width, C.TBDockHeight); 407 end; 408 tpLeft: begin 409 SetBounds(Pos.X + PageControl.Width, Pos.Y, 410 C.LRDockWidth, PageControl.Height); 411 end; 412 tpBottom: begin 413 SetBounds(Pos.X, Pos.Y - C.TBDockHeight, 414 PageControl.Width, C.TBDockHeight); 415 end; 416 tpRight: begin 417 SetBounds(Pos.X - C.LRDockWidth, Pos.Y, 418 C.LRDockWidth, PageControl.Height); 419 end; 420 end; 421 end; 402 422 end; 403 423 … … 411 431 case AValue of 412 432 hpTop, hpAuto: begin 413 Align := alTop;414 Height := 24;433 //Align := alTop; 434 //Height := 24; 415 435 Splitter.Align := alBottom; 416 436 Splitter.Height := SplitterSize; … … 418 438 end; 419 439 hpBottom: begin 420 Align := alBottom;421 Height := 24;440 //Align := alBottom; 441 //Height := 24; 422 442 Splitter.Align := alTop; 423 443 Splitter.Height := SplitterSize; … … 425 445 end; 426 446 hpLeft: begin 427 Align := alLeft;428 Width := 24;447 //Align := alLeft; 448 //Width := 24; 429 449 Splitter.Align := alRight; 430 450 Splitter.Width := SplitterSize; … … 432 452 end; 433 453 hpRight: begin 434 Align := alRight;435 Width := 24;454 //Align := alRight; 455 //Width := 24; 436 456 Splitter.Align := alLeft; 437 457 Splitter.Width := SplitterSize; -
Docking/CoolDocking/UCDManager.pas
r199 r207 48 48 private 49 49 FHeaderPos: THeaderPos; 50 FShowHeader: Boolean;50 function GetHeaderVisible: Boolean; 51 51 procedure SetHeaderPos(const AValue: THeaderPos); 52 procedure SetHeaderVisible(const AValue: Boolean); 52 53 public 53 54 Header: TCDHeader; 54 55 ControlPanel: TPanel; 55 property ShowHeader: Boolean read FShowHeader write FShowHeader;56 56 property HeaderPos: THeaderPos read FHeaderPos write SetHeaderPos; 57 property HeaderVisible: Boolean read GetHeaderVisible write SetHeaderVisible; 57 58 constructor Create(TheOwner: TComponent); 58 59 destructor Destroy; override; … … 81 82 FDockSite: TWinControl; 82 83 FHeaderPos: THeaderPos; 84 FHeaderVisible: Boolean; 83 85 function GetDockSite: TWinControl; 84 86 function GetMoveDuration: Integer; 85 87 procedure SetDockStyle(const AValue: TCDStyleType); 88 procedure SetHeaderVisible(const AValue: Boolean); 86 89 procedure SetMoveDuration(const AValue: Integer); 87 90 procedure SetVisible(const AValue: Boolean); … … 129 132 property DockSite: TWinControl read GetDockSite; 130 133 property HeaderPos: THeaderPos read GetHeaderPos write SetHeaderPos; 134 property HeaderVisible: Boolean read FHeaderVisible write SetHeaderVisible; 131 135 property Visible: Boolean write SetVisible; 132 136 end; … … 173 177 FHeaderPos:=AValue; 174 178 //Paint(Self); 179 end; 180 181 function TCDPanelHeader.GetHeaderVisible: Boolean; 182 begin 183 Result := Header.Visible; 184 end; 185 186 procedure TCDPanelHeader.SetHeaderVisible(const AValue: Boolean); 187 begin 188 Header.Visible := AValue; 175 189 end; 176 190 … … 185 199 Align := alClient; 186 200 187 ShowHeader := True;188 201 ControlPanel := TPanel.Create(Self); 189 202 with ControlPanel do begin … … 200 213 with Header do begin 201 214 Parent := Self; 202 Visible := ShowHeader;215 Visible := True; 203 216 Align := alTop; 204 217 Height := GrabberSize; … … 208 221 //BevelInner := bvNone; 209 222 //BevelOuter := bvNone; 223 HeaderVisible := True; 210 224 end; 211 225 … … 330 344 331 345 FDockStyle := dsList; // dsNone 346 FHeaderVisible := True; 332 347 PopupMenu := TCDPopupMenu.Create(Self); 333 348 PopupMenu.Parent := ADockSite; … … 536 551 NewManager.UpdateClientSize; 537 552 end; 553 end; 554 555 procedure TCDManager.SetHeaderVisible(const AValue: Boolean); 556 begin 557 if FHeaderVisible = AValue then Exit; 558 FHeaderVisible := AValue; 559 if Assigned(DockSite.HostDockSite) then 560 TCDManager(DockSite.HostDockSite.DockManager).UpdateClientSize; 538 561 end; 539 562 -
Docking/CoolDocking/UCDPopupMenu.pas
r198 r207 16 16 private 17 17 procedure PopupExecute(Sender: TObject); 18 procedure PopupMenuHeaderVisibleClick(Sender: TObject); 18 19 public 19 20 Manager: TCDManagerBase; … … 21 22 StyleMenu: TMenuItem; 22 23 LockedMenu: TMenuItem; 24 HeaderVisibleMenu: TMenuItem; 23 25 constructor Create(AManager: TCDManagerBase); 24 26 procedure UncheckMenuGroup(Item: TMenuItem); … … 63 65 SRenameWindow = 'Rename window'; 64 66 SLocked = 'Locked'; 65 67 SHeaderVisible = 'Header visible'; 66 68 67 69 { TCDPopupMenu } … … 82 84 PositionMenu.Items[Integer(TCDManager(Manager).HeaderPos)].Checked := True;; 83 85 LockedMenu.Checked := TCDManager(Manager).Locked; 86 HeaderVisibleMenu.Checked := TCDManager(Manager).HeaderVisible; 84 87 end; 85 88 … … 173 176 LockedMenu.OnClick := PopupMenuLockedClick; 174 177 Items.Add(LockedMenu); 178 179 HeaderVisibleMenu := TMenuItem.Create(Self); 180 HeaderVisibleMenu.Caption := SHeaderVisible; 181 HeaderVisibleMenu.OnClick := PopupMenuHeaderVisibleClick; 182 Items.Add(HeaderVisibleMenu); 175 183 end; 176 184 … … 323 331 end; 324 332 333 procedure TCDPopupMenu.PopupMenuHeaderVisibleClick(Sender: TObject); 334 begin 335 if PopupComponent is TPageControl then 336 with TPageControl(PopupComponent) do begin 337 TCDManagerTabs(Manager).HeaderVisible := not TCDManagerTabs(Manager).HeaderVisible; 338 end else 339 if PopupComponent is TCDHeader then 340 with TCDHeader(PopupComponent) do begin 341 TCDManagerTabs(Manager).HeaderVisible := not TCDManagerTabs(Manager).HeaderVisible; 342 end; 343 end; 344 325 345 procedure TCDPopupMenu.PopupMenuListClick(Sender: TObject); 326 346 begin -
Docking/CoolDocking/languages/UCDPopupMenu.po
r198 r207 32 32 #: ucdpopupmenu.senternewwindowname 33 33 msgid "Enter new window name" 34 msgstr "" 35 36 #: ucdpopupmenu.sheadervisible 37 msgid "Header visible" 34 38 msgstr "" 35 39
Note:
See TracChangeset
for help on using the changeset viewer.