Changeset 199 for Docking


Ignore:
Timestamp:
Mar 16, 2011, 2:17:54 PM (13 years ago)
Author:
george
Message:
  • Modified: Enhanced handling of popup tabs style.
Location:
Docking/CoolDocking
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • Docking/CoolDocking/CoolDocking.lpk

    r197 r199  
    2424      </Other>
    2525    </CompilerOptions>
    26     <Description Value="Set of components for docking of windows."/>
     26    <Description Value="Set of components for forms docking for Lazarus."/>
    2727    <License Value="GNU/GPL"/>
    2828    <Version Minor="3"/>
  • Docking/CoolDocking/Demo/IDE/IDE.lpi

    r198 r199  
    4747      </Item4>
    4848    </RequiredPackages>
    49     <Units Count="56">
     49    <Units Count="57">
    5050      <Unit0>
    5151        <Filename Value="IDE.lpr"/>
     
    6363        <ResourceBaseClass Value="Form"/>
    6464        <UnitName Value="UMainForm"/>
    65         <EditorIndex Value="5"/>
     65        <EditorIndex Value="4"/>
    6666        <WindowIndex Value="0"/>
    6767        <TopLine Value="158"/>
    68         <CursorPos X="1" Y="165"/>
    69         <UsageCount Value="314"/>
    70         <Loaded Value="True"/>
     68        <CursorPos X="23" Y="166"/>
     69        <UsageCount Value="314"/>
     70        <Loaded Value="True"/>
     71        <LoadedDesigner Value="True"/>
    7172      </Unit1>
    7273      <Unit2>
     
    105106      <Unit5>
    106107        <Filename Value="E:\Projekty2\FreePascalManager\trunk\Instance\1\Lazarus\lcl\include\control.inc"/>
    107         <WindowIndex Value="0"/>
    108         <TopLine Value="1296"/>
    109         <CursorPos X="1" Y="1309"/>
     108        <EditorIndex Value="3"/>
     109        <WindowIndex Value="0"/>
     110        <TopLine Value="579"/>
     111        <CursorPos X="3" Y="584"/>
    110112        <UsageCount Value="60"/>
     113        <Loaded Value="True"/>
    111114      </Unit5>
    112115      <Unit6>
     
    219222        <TopLine Value="1"/>
    220223        <CursorPos X="22" Y="16"/>
    221         <UsageCount Value="67"/>
     224        <UsageCount Value="66"/>
    222225      </Unit16>
    223226      <Unit17>
    224227        <Filename Value="E:\Projekty2\FreePascalManager\trunk\Instance\1\FPC\rtl\objpas\classes\classesh.inc"/>
    225228        <WindowIndex Value="0"/>
    226         <TopLine Value="1524"/>
    227         <CursorPos X="5" Y="1537"/>
     229        <TopLine Value="19"/>
     230        <CursorPos X="4" Y="32"/>
    228231        <UsageCount Value="16"/>
    229232      </Unit17>
     
    234237        <TopLine Value="110"/>
    235238        <CursorPos X="18" Y="126"/>
    236         <UsageCount Value="32"/>
     239        <UsageCount Value="31"/>
    237240      </Unit18>
    238241      <Unit19>
     
    240243        <UnitName Value="Forms"/>
    241244        <WindowIndex Value="0"/>
    242         <TopLine Value="770"/>
    243         <CursorPos X="22" Y="783"/>
    244         <UsageCount Value="11"/>
     245        <TopLine Value="702"/>
     246        <CursorPos X="22" Y="715"/>
     247        <UsageCount Value="12"/>
    245248      </Unit19>
    246249      <Unit20>
     
    256259        <EditorIndex Value="1"/>
    257260        <WindowIndex Value="0"/>
    258         <TopLine Value="1270"/>
    259         <CursorPos X="15" Y="1283"/>
    260         <UsageCount Value="37"/>
     261        <TopLine Value="1416"/>
     262        <CursorPos X="14" Y="1429"/>
     263        <UsageCount Value="39"/>
    261264        <Loaded Value="True"/>
    262265      </Unit21>
    263266      <Unit22>
    264267        <Filename Value="E:\Projekty2\FreePascalManager\trunk\Instance\1\Lazarus\lcl\include\wincontrol.inc"/>
    265         <EditorIndex Value="4"/>
    266         <WindowIndex Value="0"/>
    267         <TopLine Value="7225"/>
    268         <CursorPos X="31" Y="7250"/>
     268        <WindowIndex Value="0"/>
     269        <TopLine Value="7779"/>
     270        <CursorPos X="1" Y="7812"/>
    269271        <UsageCount Value="115"/>
    270         <Loaded Value="True"/>
    271272      </Unit22>
    272273      <Unit23>
     
    291292        <Filename Value="..\..\UCDCommon.pas"/>
    292293        <UnitName Value="UCDCommon"/>
    293         <EditorIndex Value="8"/>
    294294        <WindowIndex Value="0"/>
    295295        <TopLine Value="3"/>
    296296        <CursorPos X="44" Y="11"/>
    297297        <UsageCount Value="61"/>
    298         <Loaded Value="True"/>
    299298      </Unit25>
    300299      <Unit26>
    301300        <Filename Value="..\..\UCDPopupMenu.pas"/>
    302301        <UnitName Value="UCDPopupMenu"/>
    303         <EditorIndex Value="10"/>
     302        <EditorIndex Value="8"/>
    304303        <WindowIndex Value="0"/>
    305304        <TopLine Value="159"/>
     
    311310        <Filename Value="E:\Projekty2\FreePascalManager\trunk\Instance\1\Lazarus\lcl\lclclasses.pp"/>
    312311        <UnitName Value="LCLClasses"/>
    313         <EditorIndex Value="11"/>
    314312        <WindowIndex Value="0"/>
    315313        <TopLine Value="81"/>
    316314        <CursorPos X="20" Y="94"/>
    317         <UsageCount Value="10"/>
    318         <Loaded Value="True"/>
     315        <UsageCount Value="11"/>
    319316      </Unit27>
    320317      <Unit28>
     
    337334        <Filename Value="..\..\Managers\UCDManagerTabs.pas"/>
    338335        <UnitName Value="UCDManagerTabs"/>
    339         <EditorIndex Value="9"/>
    340         <WindowIndex Value="0"/>
    341         <TopLine Value="95"/>
    342         <CursorPos X="54" Y="98"/>
     336        <EditorIndex Value="7"/>
     337        <WindowIndex Value="0"/>
     338        <TopLine Value="284"/>
     339        <CursorPos X="1" Y="297"/>
    343340        <UsageCount Value="130"/>
    344341        <Loaded Value="True"/>
     
    347344        <Filename Value="..\..\Managers\UCDManagerRegions.pas"/>
    348345        <UnitName Value="UCDManagerRegions"/>
    349         <IsVisibleTab Value="True"/>
    350         <EditorIndex Value="7"/>
     346        <EditorIndex Value="6"/>
    351347        <WindowIndex Value="0"/>
    352348        <TopLine Value="61"/>
     
    358354        <Filename Value="..\..\Managers\UCDManagerTabsPopup.pas"/>
    359355        <UnitName Value="UCDManagerTabsPopup"/>
     356        <IsVisibleTab Value="True"/>
    360357        <EditorIndex Value="0"/>
    361358        <WindowIndex Value="0"/>
    362         <TopLine Value="36"/>
    363         <CursorPos X="40" Y="49"/>
     359        <TopLine Value="80"/>
     360        <CursorPos X="9" Y="90"/>
    364361        <UsageCount Value="120"/>
    365362        <Loaded Value="True"/>
     
    396393        <Filename Value="..\..\ReadMe.txt"/>
    397394        <WindowIndex Value="0"/>
    398         <TopLine Value="2"/>
    399         <CursorPos X="40" Y="3"/>
    400         <UsageCount Value="2"/>
     395        <TopLine Value="1"/>
     396        <CursorPos X="22" Y="16"/>
     397        <UsageCount Value="10"/>
    401398        <DefaultSyntaxHighlighter Value="None"/>
    402399      </Unit37>
     
    416413        <Filename Value="..\..\UCDManager.pas"/>
    417414        <UnitName Value="UCDManager"/>
    418         <EditorIndex Value="6"/>
    419         <WindowIndex Value="0"/>
    420         <TopLine Value="40"/>
    421         <CursorPos X="27" Y="57"/>
     415        <EditorIndex Value="5"/>
     416        <WindowIndex Value="0"/>
     417        <TopLine Value="529"/>
     418        <CursorPos X="1" Y="543"/>
    422419        <UsageCount Value="105"/>
    423420        <Loaded Value="True"/>
     
    434431        <Filename Value="E:\Projekty2\FreePascalManager\trunk\Instance\1\Lazarus\lcl\extctrls.pp"/>
    435432        <UnitName Value="ExtCtrls"/>
    436         <EditorIndex Value="2"/>
    437433        <WindowIndex Value="0"/>
    438434        <TopLine Value="111"/>
    439435        <CursorPos X="3" Y="124"/>
    440436        <UsageCount Value="100"/>
    441         <Loaded Value="True"/>
    442437      </Unit41>
    443438      <Unit42>
    444439        <Filename Value="..\..\UCDMaster.pas"/>
    445440        <UnitName Value="UCDMaster"/>
    446         <EditorIndex Value="12"/>
     441        <EditorIndex Value="9"/>
    447442        <WindowIndex Value="0"/>
    448443        <TopLine Value="11"/>
     
    483478        <TopLine Value="33"/>
    484479        <CursorPos X="1" Y="47"/>
    485         <UsageCount Value="30"/>
     480        <UsageCount Value="29"/>
    486481      </Unit46>
    487482      <Unit47>
     
    508503        <TopLine Value="13"/>
    509504        <CursorPos X="40" Y="31"/>
    510         <UsageCount Value="27"/>
     505        <UsageCount Value="26"/>
    511506      </Unit49>
    512507      <Unit50>
     
    516511        <TopLine Value="165"/>
    517512        <CursorPos X="15" Y="178"/>
    518         <UsageCount Value="27"/>
     513        <UsageCount Value="26"/>
    519514      </Unit50>
    520515      <Unit51>
     
    523518        <TopLine Value="554"/>
    524519        <CursorPos X="9" Y="564"/>
    525         <UsageCount Value="27"/>
     520        <UsageCount Value="26"/>
    526521      </Unit51>
    527522      <Unit52>
     
    535530        <Filename Value="E:\Projekty2\FreePascalManager\trunk\Instance\1\Lazarus\lcl\customtimer.pas"/>
    536531        <UnitName Value="CustomTimer"/>
    537         <EditorIndex Value="3"/>
    538532        <WindowIndex Value="0"/>
    539533        <TopLine Value="169"/>
    540534        <CursorPos X="1" Y="182"/>
    541         <UsageCount Value="11"/>
    542         <Loaded Value="True"/>
     535        <UsageCount Value="12"/>
    543536      </Unit53>
    544537      <Unit54>
     
    557550        <UsageCount Value="10"/>
    558551      </Unit55>
     552      <Unit56>
     553        <Filename Value="E:\Projekty2\FreePascalManager\trunk\Instance\1\Lazarus\lcl\lcltype.pp"/>
     554        <UnitName Value="LCLType"/>
     555        <EditorIndex Value="2"/>
     556        <WindowIndex Value="0"/>
     557        <TopLine Value="70"/>
     558        <CursorPos X="3" Y="83"/>
     559        <UsageCount Value="11"/>
     560        <Loaded Value="True"/>
     561      </Unit56>
    559562    </Units>
    560     <JumpHistory Count="27" HistoryIndex="26">
     563    <JumpHistory Count="30" HistoryIndex="29">
    561564      <Position1>
    562         <Filename Value="..\..\UCDPopupMenu.pas"/>
    563         <Caret Line="22" Column="11" TopLine="9"/>
     565        <Filename Value="..\..\Managers\UCDManagerTabsPopup.pas"/>
     566        <Caret Line="197" Column="13" TopLine="184"/>
    564567      </Position1>
    565568      <Position2>
    566         <Filename Value="..\..\UCDPopupMenu.pas"/>
    567         <Caret Line="82" Column="30" TopLine="76"/>
     569        <Filename Value="..\..\Managers\UCDManagerTabsPopup.pas"/>
     570        <Caret Line="227" Column="14" TopLine="207"/>
    568571      </Position2>
    569572      <Position3>
    570         <Filename Value="..\..\UCDPopupMenu.pas"/>
    571         <Caret Line="38" Column="30" TopLine="25"/>
     573        <Filename Value="..\..\Managers\UCDManagerTabsPopup.pas"/>
     574        <Caret Line="223" Column="68" TopLine="201"/>
    572575      </Position3>
    573576      <Position4>
    574         <Filename Value="..\..\UCDPopupMenu.pas"/>
    575         <Caret Line="25" Column="15" TopLine="12"/>
     577        <Filename Value="..\..\Managers\UCDManagerTabsPopup.pas"/>
     578        <Caret Line="211" Column="99" TopLine="198"/>
    576579      </Position4>
    577580      <Position5>
    578         <Filename Value="..\..\UCDManager.pas"/>
    579         <Caret Line="251" Column="1" TopLine="240"/>
     581        <Filename Value="E:\Projekty2\FreePascalManager\trunk\Instance\1\Lazarus\lcl\controls.pp"/>
     582        <Caret Line="1413" Column="54" TopLine="1400"/>
    580583      </Position5>
    581584      <Position6>
    582         <Filename Value="..\..\UCDManager.pas"/>
    583         <Caret Line="243" Column="1" TopLine="238"/>
     585        <Filename Value="E:\Projekty2\FreePascalManager\trunk\Instance\1\Lazarus\lcl\controls.pp"/>
     586        <Caret Line="1430" Column="30" TopLine="1412"/>
    584587      </Position6>
    585588      <Position7>
    586         <Filename Value="..\..\UCDManager.pas"/>
    587         <Caret Line="244" Column="1" TopLine="238"/>
     589        <Filename Value="E:\Projekty2\FreePascalManager\trunk\Instance\1\Lazarus\lcl\controls.pp"/>
     590        <Caret Line="1411" Column="45" TopLine="1403"/>
    588591      </Position7>
    589592      <Position8>
    590         <Filename Value="..\..\UCDManager.pas"/>
    591         <Caret Line="245" Column="1" TopLine="238"/>
     593        <Filename Value="..\..\Managers\UCDManagerTabsPopup.pas"/>
     594        <Caret Line="227" Column="17" TopLine="210"/>
    592595      </Position8>
    593596      <Position9>
    594         <Filename Value="..\..\Managers\UCDManagerRegions.pas"/>
    595         <Caret Line="63" Column="1" TopLine="50"/>
     597        <Filename Value="..\..\Managers\UCDManagerTabsPopup.pas"/>
     598        <Caret Line="215" Column="101" TopLine="200"/>
    596599      </Position9>
    597600      <Position10>
    598         <Filename Value="..\..\Managers\UCDManagerRegions.pas"/>
    599         <Caret Line="64" Column="1" TopLine="50"/>
     601        <Filename Value="..\..\Managers\UCDManagerTabsPopup.pas"/>
     602        <Caret Line="221" Column="31" TopLine="205"/>
    600603      </Position10>
    601604      <Position11>
    602         <Filename Value="..\..\Managers\UCDManagerRegions.pas"/>
    603         <Caret Line="65" Column="1" TopLine="50"/>
     605        <Filename Value="..\..\Managers\UCDManagerTabsPopup.pas"/>
     606        <Caret Line="220" Column="44" TopLine="205"/>
    604607      </Position11>
    605608      <Position12>
    606         <Filename Value="..\..\Managers\UCDManagerRegions.pas"/>
    607         <Caret Line="66" Column="1" TopLine="50"/>
     609        <Filename Value="..\..\Managers\UCDManagerTabsPopup.pas"/>
     610        <Caret Line="224" Column="40" TopLine="205"/>
    608611      </Position12>
    609612      <Position13>
    610         <Filename Value="..\..\Managers\UCDManagerRegions.pas"/>
    611         <Caret Line="69" Column="1" TopLine="50"/>
     613        <Filename Value="..\..\Managers\UCDManagerTabsPopup.pas"/>
     614        <Caret Line="229" Column="17" TopLine="211"/>
    612615      </Position13>
    613616      <Position14>
    614         <Filename Value="..\..\Managers\UCDManagerRegions.pas"/>
    615         <Caret Line="70" Column="1" TopLine="50"/>
     617        <Filename Value="..\..\Managers\UCDManagerTabsPopup.pas"/>
     618        <Caret Line="238" Column="1" TopLine="202"/>
    616619      </Position14>
    617620      <Position15>
    618         <Filename Value="..\..\Managers\UCDManagerRegions.pas"/>
    619         <Caret Line="71" Column="1" TopLine="50"/>
     621        <Filename Value="..\..\Managers\UCDManagerTabsPopup.pas"/>
     622        <Caret Line="229" Column="15" TopLine="208"/>
    620623      </Position15>
    621624      <Position16>
    622         <Filename Value="..\..\Managers\UCDManagerRegions.pas"/>
    623         <Caret Line="72" Column="1" TopLine="51"/>
     625        <Filename Value="..\..\Managers\UCDManagerTabsPopup.pas"/>
     626        <Caret Line="309" Column="1" TopLine="301"/>
    624627      </Position16>
    625628      <Position17>
    626         <Filename Value="..\..\UCDManager.pas"/>
    627         <Caret Line="641" Column="1" TopLine="628"/>
     629        <Filename Value="..\..\Managers\UCDManagerTabsPopup.pas"/>
     630        <Caret Line="307" Column="24" TopLine="301"/>
    628631      </Position17>
    629632      <Position18>
    630         <Filename Value="..\..\UCDManager.pas"/>
    631         <Caret Line="642" Column="1" TopLine="628"/>
     633        <Filename Value="..\..\Managers\UCDManagerTabsPopup.pas"/>
     634        <Caret Line="50" Column="36" TopLine="37"/>
    632635      </Position18>
    633636      <Position19>
    634         <Filename Value="..\..\UCDManager.pas"/>
    635         <Caret Line="643" Column="1" TopLine="628"/>
     637        <Filename Value="..\..\Managers\UCDManagerTabs.pas"/>
     638        <Caret Line="40" Column="23" TopLine="35"/>
    636639      </Position19>
    637640      <Position20>
    638         <Filename Value="..\..\UCDManager.pas"/>
    639         <Caret Line="644" Column="1" TopLine="628"/>
     641        <Filename Value="..\..\Managers\UCDManagerTabsPopup.pas"/>
     642        <Caret Line="57" Column="25" TopLine="46"/>
    640643      </Position20>
    641644      <Position21>
    642         <Filename Value="..\..\UCDManager.pas"/>
    643         <Caret Line="647" Column="35" TopLine="628"/>
     645        <Filename Value="..\..\Managers\UCDManagerTabs.pas"/>
     646        <Caret Line="297" Column="3" TopLine="295"/>
    644647      </Position21>
    645648      <Position22>
    646         <Filename Value="..\..\UCDManager.pas"/>
    647         <Caret Line="2" Column="73" TopLine="1"/>
     649        <Filename Value="..\..\Managers\UCDManagerTabsPopup.pas"/>
     650        <Caret Line="309" Column="1" TopLine="296"/>
    648651      </Position22>
    649652      <Position23>
    650653        <Filename Value="..\..\UCDManager.pas"/>
    651         <Caret Line="69" Column="33" TopLine="48"/>
     654        <Caret Line="542" Column="1" TopLine="529"/>
    652655      </Position23>
    653656      <Position24>
    654657        <Filename Value="..\..\UCDManager.pas"/>
    655         <Caret Line="181" Column="51" TopLine="160"/>
     658        <Caret Line="543" Column="1" TopLine="529"/>
    656659      </Position24>
    657660      <Position25>
    658         <Filename Value="..\..\UCDManager.pas"/>
    659         <Caret Line="182" Column="51" TopLine="161"/>
     661        <Filename Value="..\..\Managers\UCDManagerTabsPopup.pas"/>
     662        <Caret Line="309" Column="15" TopLine="296"/>
    660663      </Position25>
    661664      <Position26>
    662         <Filename Value="..\..\Managers\UCDManagerRegions.pas"/>
    663         <Caret Line="37" Column="43" TopLine="30"/>
     665        <Filename Value="..\..\Managers\UCDManagerTabsPopup.pas"/>
     666        <Caret Line="57" Column="49" TopLine="44"/>
    664667      </Position26>
    665668      <Position27>
    666         <Filename Value="..\..\Managers\UCDManagerRegions.pas"/>
    667         <Caret Line="5" Column="66" TopLine="1"/>
     669        <Filename Value="..\..\Managers\UCDManagerTabsPopup.pas"/>
     670        <Caret Line="309" Column="1" TopLine="296"/>
    668671      </Position27>
     672      <Position28>
     673        <Filename Value="..\..\Managers\UCDManagerTabs.pas"/>
     674        <Caret Line="297" Column="1" TopLine="284"/>
     675      </Position28>
     676      <Position29>
     677        <Filename Value="..\..\Managers\UCDManagerTabsPopup.pas"/>
     678        <Caret Line="227" Column="26" TopLine="206"/>
     679      </Position29>
     680      <Position30>
     681        <Filename Value="..\..\Managers\UCDManagerTabsPopup.pas"/>
     682        <Caret Line="140" Column="12" TopLine="130"/>
     683      </Position30>
    669684    </JumpHistory>
    670685  </ProjectOptions>
  • Docking/CoolDocking/Managers/UCDManagerTabs.pas

    r198 r199  
    2626    MouseDown: Boolean;
    2727    MouseButton: TMouseButton;
    28     MouseDownSkip: Boolean;
    2928    FDockItems: TObjectList; // TList<TCDManagerRegionsItem>
    3029    procedure TabControlMouseLeave(Sender: TObject);
     
    3938    procedure RemoveControl(Control: TControl); override;
    4039    function GetHeaderPos: THeaderPos; override;
    41     procedure SetHeaderPos(const AValue: THeaderPos); override;
    4240  public
     41    MouseDownSkip: Boolean;
    4342    TabImageList: TImageList;
    4443    PageControl: TPageControl;
     44    procedure SetHeaderPos(const AValue: THeaderPos); override;
    4545    procedure InsertControlNoUpdate(Control: TControl; InsertAt: TAlign); virtual;
    4646    procedure TabControlChange(Sender: TObject); virtual;
     
    195195    //Align := alTop;
    196196    //Height := 24;
     197    Color := clBlue;
    197198    Align := alClient;
    198199    OnChange := TabControlChange;
  • Docking/CoolDocking/Managers/UCDManagerTabsPopup.pas

    r198 r199  
    1616    FDuration: Real;
    1717    FStepCount: Integer;
     18    FTabPosition: TTabPosition;
    1819    StartBounds: TRect;
    1920    procedure SetDuration(const AValue: Real);
     
    2425    Position: Real;
    2526    Direction: Integer;
    26     TabPosition: TTabPosition;
    2727    Enable: Boolean;
    2828    Timer: TTimer;
     
    3434    destructor Destroy; override;
    3535    procedure TimerExecute(Sender: TObject);
     36    property TabPosition: TTabPosition read FTabPosition write FTabPosition;
    3637    property Duration: Real read FDuration write SetDuration;
    3738    property StepCount: Integer read FStepCount write SetStepCount;
     
    5354    AutoHideEnabled: Boolean;
    5455    AutoHide: TCDAutoHide;
    55     PopupPanel: TPanel;
     56    PopupForm: TForm;
    5657    procedure SetHeaderPos(const AValue: THeaderPos); override;
    5758    procedure PinShowButtonClick(Sender: TObject);
     
    8788      Control.Height := Round((StartBounds.Bottom - StartBounds.Top) * Position);
    8889    end;
     90    tpLeft: begin
     91      Control.Width := Round((StartBounds.Right - StartBounds.Left) * Position);
     92    end;
    8993    tpRight: begin
    90       Control.Width := Round((StartBounds.Right - StartBounds.Left) * Position);
    91     end;
    92     tpLeft: begin
    9394      Control.Width := Round((StartBounds.Right - StartBounds.Left) * Position);
    9495      Control.Left := StartBounds.Right - Control.Width;
     
    119120begin
    120121  StartBounds := Control.BoundsRect;
     122  Control.Show;
     123  Control.BringToFront;
    121124  Direction := -1;
    122125  Position := 1;
     
    128131begin
    129132  StartBounds := Control.BoundsRect;
     133  //StartBounds := Bounds(0, 0, Control.UndockWidth, Control.UndockHeight);
    130134  Control.Show;
    131   Control.Align := alCustom;
     135  Control.BringToFront;
     136  Control.Align := alClient;
    132137  Direction := 1;
    133138  Position := 0;
     
    143148  Timer.OnTimer := TimerExecute;
    144149  StepCount := 10;
    145   Duration := 0.5;
     150  Duration := 0.05;
    146151end;
    147152
     
    164169  if Direction = -1 then begin
    165170    Position := Position - 1 / StepCount;
    166     if Position < 1 then begin
     171    if Position < 0 then begin
    167172      Position := 0;
    168173      Timer.Enabled := False;
     
    186191
    187192procedure TCDManagerTabsPopup.TabControlChange(Sender: TObject);
     193var
     194  Pos: TPoint;
     195  C: TControl;
    188196begin
    189197  inherited TabControlChange(Sender);
    190   if PopupPanel.ControlCount > 0 then
    191     PopupPanel.Controls[0].Parent := nil;
     198  MouseDownSkip := True;
     199  if PopupForm.ControlCount > 0 then
     200    PopupForm.Controls[0].Parent := nil;
    192201  AutoHide.Hide;
     202  while AutoHide.Position > 0 do begin
     203    Application.ProcessMessages;
     204    Sleep(1);
     205  end;
    193206  if PageControl.TabIndex >= 0 then begin
    194     TCDManagerTabsPopupItem(DockItems[PageControl.TabIndex]).Control.Parent := PopupPanel;
    195     AutoHide.Control.Align := alCustom;
     207    C := TCDManagerTabsPopupItem(DockItems[PageControl.TabIndex]).Control;
     208    C.Parent := PopupForm;
     209    //AutoHide.Control.Align := alCustom;
     210    Pos := Point(PageControl.Left, PageControl.Top);
     211    Pos := DockSite.ClientToScreen(Pos);
    196212    with AutoHide.Control do
    197213    case AutoHide.TabPosition of
    198       tpTop: SetBounds(PageControl.Left, PageControl.Top + PageControl.Height,
    199         PageControl.Width, Height);
    200       tpLeft: SetBounds(PageControl.Left + PageControl.Width, PageControl.Top,
    201         Width, PageControl.Height);
    202       tpBottom: SetBounds(PageControl.Left, PageControl.Top - Height,
    203         PageControl.Width, Height);
    204       tpRight: SetBounds(PageControl.Left - Width, PageControl.Top,
    205         Width, PageControl.Height);
    206     end;
     214      tpTop: begin
     215        SetBounds(Pos.X, Pos.Y + PageControl.Height,
     216          PageControl.Width, C.TBDockHeight);
     217      end;
     218      tpLeft: begin
     219        SetBounds(Pos.X + PageControl.Width, Pos.Y,
     220          C.LRDockWidth, PageControl.Height);
     221      end;
     222      tpBottom: begin
     223        SetBounds(Pos.X, Pos.Y - C.TBDockHeight,
     224          PageControl.Width, C.TBDockHeight);
     225      end;
     226      tpRight: begin
     227        SetBounds(Pos.X - C.LRDockWidth, Pos.Y,
     228          C.LRDockWidth, PageControl.Height);
     229      end;
     230    end;
     231    //AutoHide.Control.SetBounds(0, 0, 100, 100);
    207232    AutoHide.Show;
    208233  end;
     
    215240  inherited;
    216241  FDockStyle := dsPopupTabs;
    217   PopupPanel := TPanel.Create(nil);
    218   PopupPanel.DockManager := TCDManagerRegions.Create(PopupPanel);
    219   PopupPanel.Visible := True;
     242  PopupForm := TForm.Create(nil);
     243  PopupForm.DockManager := TCDManagerRegions.Create(PopupForm);
     244  PopupForm.Visible := True;
     245  //PopupForm.Parent := ADockSite;
     246  PopupForm.BorderStyle := bsNone;
    220247  AutoHide := TCDAutoHide.Create;
    221   AutoHide.Control := PopupPanel;
     248  AutoHide.Control := PopupForm;
    222249
    223250  for I := 0 to DockItems.Count - 1 do begin
     
    225252//      if
    226253  end;
     254  HeaderPos := HeaderPos; // Reset position
    227255end;
    228256
     
    230258begin
    231259  AutoHide.Free;
    232   PopupPanel.Free;
     260  PopupForm.Free;
    233261  inherited Destroy;
    234262end;
     
    281309  inherited SetHeaderPos(AValue);
    282310  AutoHide.TabPosition := HeaderPosToTabPos(AValue);
     311  with PageControl do
     312  case AValue of
     313    hpTop, hpAuto: begin
     314      Align := alTop;
     315      Height := 24;
     316    end;
     317    hpBottom: begin
     318      Align := alBottom;
     319      Height := 24;
     320    end;
     321    hpLeft: begin
     322      Align := alLeft;
     323      Width := 24;
     324    end;
     325    hpRight: begin
     326      Align := alRight;
     327      Width := 24;
     328    end;
     329  end;
    283330end;
    284331
  • Docking/CoolDocking/ReadMe.txt

    r183 r199  
    1414==Completeded features==
    1515
    16 * List docking
     16* Regions docking
    1717* Tabbed docking
    1818* Popup control menu
     
    2121* Store and restore forms layout to file or stream
    2222* Predefined customization form
     23* Ability to lock and unlock docked controls for accidently undocking
    2324
    2425==Planned features==
     
    2627* Dock forms groups
    2728* User defined form header styles
    28 * Ability to lock and unlock docked controls for accidently undocking
     29* Tabbed docking with auto form popup and form pinning
  • Docking/CoolDocking/UCDManager.pas

    r198 r199  
    148148    hpTop: Result := tpTop;
    149149    hpRight: Result := tpRight;
    150     hpAuto: Result := tpLeft;
     150    hpAuto: Result := tpTop;
    151151  end;
    152152end;
Note: See TracChangeset for help on using the changeset viewer.