Changeset 187


Ignore:
Timestamp:
Mar 11, 2011, 8:41:52 AM (14 years ago)
Author:
george
Message:
  • Modified: Classes TCoolDockConjoinForm and TCoolDockManager separated to own units.
Location:
Docking/CoolDocking
Files:
2 added
11 edited

Legend:

Unmodified
Added
Removed
  • Docking/CoolDocking/CoolDocking.lpk

    r180 r187  
    2525    <Description Value="Set of components for docking of windows."/>
    2626    <Version Minor="2"/>
    27     <Files Count="14">
     27    <Files Count="16">
    2828      <Item1>
    2929        <Filename Value="UCoolDocking.pas"/>
     
    8585        <UnitName Value="UCoolDockCommon"/>
    8686      </Item14>
     87      <Item15>
     88        <Filename Value="UCoolDockManager.pas"/>
     89        <UnitName Value="UCoolDockManager"/>
     90      </Item15>
     91      <Item16>
     92        <Filename Value="UCoolDockConjoinForm.pas"/>
     93        <UnitName Value="UCoolDockConjoinForm"/>
     94      </Item16>
    8795    </Files>
    8896    <i18n>
  • Docking/CoolDocking/CoolDocking.pas

    r180 r187  
    1111  UCoolDockStyleRegions, UCoolDockStylePopupTabs, UCoolDockStylePopupRegions,
    1212  UCoolDockStyle, UCoolDockClientPanel, UCoolDockPopupMenu, UCoolDockLayout,
    13   URectangle, UCoolDockCommon, LazarusPackageIntf;
     13  URectangle, UCoolDockCommon, UCoolDockManager, UCoolDockConjoinForm,
     14  LazarusPackageIntf;
    1415
    1516implementation
  • Docking/CoolDocking/Demo/IDE/IDE.lpi

    r186 r187  
    4747      </Item4>
    4848    </RequiredPackages>
    49     <Units Count="57">
     49    <Units Count="60">
    5050      <Unit0>
    5151        <Filename Value="IDE.lpr"/>
     
    5555        <TopLine Value="11"/>
    5656        <CursorPos X="15" Y="34"/>
    57         <UsageCount Value="127"/>
     57        <UsageCount Value="128"/>
    5858      </Unit0>
    5959      <Unit1>
     
    6363        <ResourceBaseClass Value="Form"/>
    6464        <UnitName Value="UMainForm"/>
    65         <EditorIndex Value="11"/>
    66         <WindowIndex Value="0"/>
    67         <TopLine Value="148"/>
    68         <CursorPos X="49" Y="163"/>
    69         <UsageCount Value="127"/>
     65        <EditorIndex Value="15"/>
     66        <WindowIndex Value="0"/>
     67        <TopLine Value="1"/>
     68        <CursorPos X="77" Y="13"/>
     69        <UsageCount Value="128"/>
    7070        <Loaded Value="True"/>
    7171        <LoadedDesigner Value="True"/>
     
    8080        <TopLine Value="1"/>
    8181        <CursorPos X="12" Y="16"/>
    82         <UsageCount Value="127"/>
     82        <UsageCount Value="128"/>
    8383      </Unit2>
    8484      <Unit3>
     
    8888        <ResourceBaseClass Value="Form"/>
    8989        <UnitName Value="UStructureForm"/>
    90         <EditorIndex Value="8"/>
     90        <EditorIndex Value="12"/>
    9191        <WindowIndex Value="0"/>
    9292        <TopLine Value="1"/>
    9393        <CursorPos X="22" Y="4"/>
    94         <UsageCount Value="127"/>
     94        <UsageCount Value="128"/>
    9595        <Loaded Value="True"/>
    9696        <LoadedDesigner Value="True"/>
     
    105105        <TopLine Value="1"/>
    106106        <CursorPos X="15" Y="10"/>
    107         <UsageCount Value="127"/>
     107        <UsageCount Value="128"/>
    108108      </Unit4>
    109109      <Unit5>
    110110        <Filename Value="E:\Projekty2\FreePascalManager\trunk\Instance\1\Lazarus\lcl\include\control.inc"/>
    111         <EditorIndex Value="14"/>
    112         <WindowIndex Value="0"/>
    113         <TopLine Value="1093"/>
    114         <CursorPos X="1" Y="1106"/>
    115         <UsageCount Value="59"/>
     111        <EditorIndex Value="18"/>
     112        <WindowIndex Value="0"/>
     113        <TopLine Value="3176"/>
     114        <CursorPos X="11" Y="3187"/>
     115        <UsageCount Value="60"/>
    116116        <Loaded Value="True"/>
    117117      </Unit5>
     
    125125        <TopLine Value="1"/>
    126126        <CursorPos X="20" Y="16"/>
    127         <UsageCount Value="127"/>
     127        <UsageCount Value="128"/>
    128128      </Unit6>
    129129      <Unit7>
     
    143143        <TopLine Value="1"/>
    144144        <CursorPos X="7" Y="16"/>
    145         <UsageCount Value="127"/>
     145        <UsageCount Value="128"/>
    146146      </Unit8>
    147147      <Unit9>
     
    154154        <TopLine Value="1"/>
    155155        <CursorPos X="12" Y="15"/>
    156         <UsageCount Value="127"/>
     156        <UsageCount Value="128"/>
    157157      </Unit9>
    158158      <Unit10>
     
    165165        <TopLine Value="1"/>
    166166        <CursorPos X="21" Y="4"/>
    167         <UsageCount Value="127"/>
     167        <UsageCount Value="128"/>
    168168      </Unit10>
    169169      <Unit11>
     
    176176        <TopLine Value="1"/>
    177177        <CursorPos X="12" Y="16"/>
    178         <UsageCount Value="127"/>
     178        <UsageCount Value="128"/>
    179179      </Unit11>
    180180      <Unit12>
     
    187187        <TopLine Value="1"/>
    188188        <CursorPos X="12" Y="17"/>
    189         <UsageCount Value="127"/>
     189        <UsageCount Value="128"/>
    190190      </Unit12>
    191191      <Unit13>
     
    198198        <TopLine Value="1"/>
    199199        <CursorPos X="12" Y="16"/>
    200         <UsageCount Value="127"/>
     200        <UsageCount Value="128"/>
    201201      </Unit13>
    202202      <Unit14>
     
    206206        <ResourceBaseClass Value="Form"/>
    207207        <UnitName Value="USourceEditorForm"/>
    208         <EditorIndex Value="7"/>
     208        <EditorIndex Value="11"/>
    209209        <WindowIndex Value="0"/>
    210210        <TopLine Value="6"/>
    211211        <CursorPos X="31" Y="3"/>
    212         <UsageCount Value="125"/>
     212        <UsageCount Value="126"/>
    213213        <Loaded Value="True"/>
    214214        <LoadedDesigner Value="True"/>
     
    219219        <EditorIndex Value="0"/>
    220220        <WindowIndex Value="0"/>
    221         <TopLine Value="282"/>
    222         <CursorPos X="37" Y="292"/>
    223         <UsageCount Value="62"/>
     221        <TopLine Value="20"/>
     222        <CursorPos X="43" Y="26"/>
     223        <UsageCount Value="63"/>
    224224        <Loaded Value="True"/>
    225225      </Unit15>
     
    227227        <Filename Value="..\..\UCoolDockLayout.pas"/>
    228228        <UnitName Value="UCoolDockLayout"/>
    229         <IsVisibleTab Value="True"/>
    230         <EditorIndex Value="3"/>
    231         <WindowIndex Value="0"/>
    232         <TopLine Value="349"/>
    233         <CursorPos X="22" Y="362"/>
    234         <UsageCount Value="62"/>
     229        <EditorIndex Value="5"/>
     230        <WindowIndex Value="0"/>
     231        <TopLine Value="1"/>
     232        <CursorPos X="1" Y="1"/>
     233        <UsageCount Value="63"/>
    235234        <Loaded Value="True"/>
    236235      </Unit16>
    237236      <Unit17>
    238237        <Filename Value="E:\Projekty2\FreePascalManager\trunk\Instance\1\FPC\rtl\objpas\classes\classesh.inc"/>
    239         <EditorIndex Value="16"/>
     238        <EditorIndex Value="20"/>
    240239        <WindowIndex Value="0"/>
    241240        <TopLine Value="1644"/>
    242241        <CursorPos X="14" Y="1657"/>
    243         <UsageCount Value="34"/>
     242        <UsageCount Value="35"/>
    244243        <Loaded Value="True"/>
    245244      </Unit17>
     
    247246        <Filename Value="E:\Projekty2\FreePascalManager\trunk\Instance\1\FPC\rtl\objpas\types.pp"/>
    248247        <UnitName Value="types"/>
    249         <EditorIndex Value="15"/>
     248        <EditorIndex Value="19"/>
    250249        <WindowIndex Value="0"/>
    251250        <TopLine Value="274"/>
    252251        <CursorPos X="10" Y="287"/>
    253         <UsageCount Value="13"/>
     252        <UsageCount Value="14"/>
    254253        <Loaded Value="True"/>
    255254      </Unit18>
     
    291290        <Filename Value="E:\Projekty2\FreePascalManager\trunk\Instance\1\Lazarus\lcl\forms.pp"/>
    292291        <UnitName Value="Forms"/>
    293         <EditorIndex Value="4"/>
     292        <EditorIndex Value="8"/>
    294293        <WindowIndex Value="0"/>
    295294        <TopLine Value="1623"/>
    296295        <CursorPos X="24" Y="1636"/>
    297         <UsageCount Value="31"/>
     296        <UsageCount Value="32"/>
    298297        <Loaded Value="True"/>
    299298      </Unit23>
     
    308307      <Unit25>
    309308        <Filename Value="E:\Projekty2\FreePascalManager\trunk\Instance\1\Lazarus\lcl\include\customcombobox.inc"/>
    310         <EditorIndex Value="12"/>
     309        <EditorIndex Value="16"/>
    311310        <WindowIndex Value="0"/>
    312311        <TopLine Value="913"/>
    313312        <CursorPos X="1" Y="930"/>
    314         <UsageCount Value="26"/>
     313        <UsageCount Value="27"/>
    315314        <Loaded Value="True"/>
    316315      </Unit25>
     
    332331        <Filename Value="E:\Projekty2\FreePascalManager\trunk\Instance\1\Lazarus\lcl\controls.pp"/>
    333332        <UnitName Value="Controls"/>
    334         <EditorIndex Value="6"/>
    335         <WindowIndex Value="0"/>
    336         <TopLine Value="1397"/>
    337         <CursorPos X="14" Y="1410"/>
    338         <UsageCount Value="35"/>
     333        <EditorIndex Value="10"/>
     334        <WindowIndex Value="0"/>
     335        <TopLine Value="497"/>
     336        <CursorPos X="3" Y="504"/>
     337        <UsageCount Value="36"/>
    339338        <Loaded Value="True"/>
    340339      </Unit28>
    341340      <Unit29>
    342341        <Filename Value="E:\Projekty2\FreePascalManager\trunk\Instance\1\Lazarus\lcl\include\wincontrol.inc"/>
    343         <EditorIndex Value="1"/>
    344342        <WindowIndex Value="0"/>
    345343        <TopLine Value="7763"/>
    346344        <CursorPos X="1" Y="7776"/>
    347345        <UsageCount Value="29"/>
    348         <Loaded Value="True"/>
    349346      </Unit29>
    350347      <Unit30>
     
    361358        <ResourceBaseClass Value="Form"/>
    362359        <UnitName Value="UCoolDockCustomize"/>
    363         <WindowIndex Value="0"/>
    364         <TopLine Value="36"/>
    365         <CursorPos X="3" Y="49"/>
     360        <EditorIndex Value="6"/>
     361        <WindowIndex Value="0"/>
     362        <TopLine Value="1"/>
     363        <CursorPos X="33" Y="9"/>
    366364        <UsageCount Value="49"/>
     365        <Loaded Value="True"/>
    367366      </Unit31>
    368367      <Unit32>
    369368        <Filename Value="..\..\UCoolDockCommon.pas"/>
    370369        <UnitName Value="UCoolDockCommon"/>
    371         <EditorIndex Value="2"/>
    372         <WindowIndex Value="0"/>
    373         <TopLine Value="7"/>
    374         <CursorPos X="3" Y="20"/>
    375         <UsageCount Value="53"/>
     370        <IsVisibleTab Value="True"/>
     371        <EditorIndex Value="3"/>
     372        <WindowIndex Value="0"/>
     373        <TopLine Value="51"/>
     374        <CursorPos X="29" Y="62"/>
     375        <UsageCount Value="54"/>
    376376        <Loaded Value="True"/>
    377377      </Unit32>
     
    379379        <Filename Value="..\..\UCoolDockPopupMenu.pas"/>
    380380        <UnitName Value="UCoolDockPopupMenu"/>
    381         <WindowIndex Value="0"/>
    382         <TopLine Value="161"/>
    383         <CursorPos X="3" Y="165"/>
     381        <EditorIndex Value="2"/>
     382        <WindowIndex Value="0"/>
     383        <TopLine Value="21"/>
     384        <CursorPos X="73" Y="37"/>
    384385        <UsageCount Value="48"/>
     386        <Loaded Value="True"/>
    385387      </Unit33>
    386388      <Unit34>
     
    408410      <Unit37>
    409411        <Filename Value="E:\Projekty2\FreePascalManager\trunk\Instance\1\FPC\rtl\objpas\classes\classes.inc"/>
    410         <EditorIndex Value="17"/>
     412        <EditorIndex Value="21"/>
    411413        <WindowIndex Value="0"/>
    412414        <TopLine Value="514"/>
    413415        <CursorPos X="60" Y="523"/>
    414         <UsageCount Value="10"/>
     416        <UsageCount Value="11"/>
    415417        <Loaded Value="True"/>
    416418      </Unit37>
     
    433435        <Filename Value="..\..\UCoolDockStyle.pas"/>
    434436        <UnitName Value="UCoolDockStyle"/>
    435         <EditorIndex Value="10"/>
     437        <EditorIndex Value="14"/>
    436438        <WindowIndex Value="0"/>
    437439        <TopLine Value="53"/>
    438440        <CursorPos X="1" Y="66"/>
    439         <UsageCount Value="36"/>
     441        <UsageCount Value="37"/>
    440442        <Loaded Value="True"/>
    441443      </Unit40>
     
    443445        <Filename Value="..\..\UCoolDockClientPanel.pas"/>
    444446        <UnitName Value="UCoolDockClientPanel"/>
    445         <EditorIndex Value="9"/>
    446         <WindowIndex Value="0"/>
    447         <TopLine Value="150"/>
    448         <CursorPos X="3" Y="152"/>
    449         <UsageCount Value="36"/>
     447        <EditorIndex Value="13"/>
     448        <WindowIndex Value="0"/>
     449        <TopLine Value="53"/>
     450        <CursorPos X="49" Y="70"/>
     451        <UsageCount Value="37"/>
    450452        <Loaded Value="True"/>
    451453      </Unit41>
     
    461463        <Filename Value="..\..\UCoolDockStyleTabs.pas"/>
    462464        <UnitName Value="UCoolDockStyleTabs"/>
    463         <EditorIndex Value="18"/>
    464         <WindowIndex Value="0"/>
    465         <TopLine Value="192"/>
    466         <CursorPos X="52" Y="205"/>
    467         <UsageCount Value="35"/>
     465        <EditorIndex Value="22"/>
     466        <WindowIndex Value="0"/>
     467        <TopLine Value="27"/>
     468        <CursorPos X="33" Y="47"/>
     469        <UsageCount Value="36"/>
    468470        <Loaded Value="True"/>
    469471      </Unit43>
     
    494496        <Filename Value="..\..\UCoolDockStyleRegions.pas"/>
    495497        <UnitName Value="UCoolDockStyleRegions"/>
    496         <EditorIndex Value="13"/>
    497         <WindowIndex Value="0"/>
    498         <TopLine Value="82"/>
    499         <CursorPos X="40" Y="120"/>
    500         <UsageCount Value="34"/>
     498        <EditorIndex Value="17"/>
     499        <WindowIndex Value="0"/>
     500        <TopLine Value="26"/>
     501        <CursorPos X="55" Y="40"/>
     502        <UsageCount Value="35"/>
    501503        <Loaded Value="True"/>
    502504      </Unit47>
     
    555557        <TopLine Value="23"/>
    556558        <CursorPos X="15" Y="24"/>
    557         <UsageCount Value="28"/>
     559        <UsageCount Value="29"/>
    558560      </Unit54>
    559561      <Unit55>
     
    568570        <Filename Value="E:\Projekty2\FreePascalManager\trunk\Instance\1\FPC\packages\fcl-base\src\custapp.pp"/>
    569571        <UnitName Value="CustApp"/>
    570         <EditorIndex Value="5"/>
     572        <EditorIndex Value="9"/>
    571573        <WindowIndex Value="0"/>
    572574        <TopLine Value="13"/>
    573575        <CursorPos X="3" Y="26"/>
     576        <UsageCount Value="11"/>
     577        <Loaded Value="True"/>
     578      </Unit56>
     579      <Unit57>
     580        <Filename Value="..\..\UCoolDockManager.pas"/>
     581        <UnitName Value="UCoolDockManager"/>
     582        <EditorIndex Value="7"/>
     583        <WindowIndex Value="0"/>
     584        <TopLine Value="339"/>
     585        <CursorPos X="1" Y="364"/>
     586        <UsageCount Value="11"/>
     587        <Loaded Value="True"/>
     588      </Unit57>
     589      <Unit58>
     590        <Filename Value="..\..\UCoolDockConjoinForm.pas"/>
     591        <UnitName Value="UCoolDockConjoinForm"/>
     592        <EditorIndex Value="1"/>
     593        <WindowIndex Value="0"/>
     594        <TopLine Value="1"/>
     595        <CursorPos X="14" Y="3"/>
    574596        <UsageCount Value="10"/>
    575597        <Loaded Value="True"/>
    576       </Unit56>
     598      </Unit58>
     599      <Unit59>
     600        <Filename Value="E:\Projekty2\FreePascalManager\trunk\Instance\1\Lazarus\lcl\extctrls.pp"/>
     601        <UnitName Value="ExtCtrls"/>
     602        <EditorIndex Value="4"/>
     603        <WindowIndex Value="0"/>
     604        <TopLine Value="1129"/>
     605        <CursorPos X="3" Y="1142"/>
     606        <UsageCount Value="10"/>
     607        <Loaded Value="True"/>
     608      </Unit59>
    577609    </Units>
    578610    <JumpHistory Count="30" HistoryIndex="29">
    579611      <Position1>
    580         <Filename Value="..\..\UCoolDockLayout.pas"/>
    581         <Caret Line="386" Column="36" TopLine="369"/>
     612        <Filename Value="..\..\UCoolDocking.pas"/>
     613        <Caret Line="117" Column="18" TopLine="96"/>
    582614      </Position1>
    583615      <Position2>
    584         <Filename Value="..\..\UCoolDockLayout.pas"/>
    585         <Caret Line="81" Column="17" TopLine="59"/>
     616        <Filename Value="..\..\UCoolDockCommon.pas"/>
     617        <Caret Line="64" Column="27" TopLine="53"/>
    586618      </Position2>
    587619      <Position3>
    588         <Filename Value="..\..\UCoolDockLayout.pas"/>
    589         <Caret Line="88" Column="32" TopLine="69"/>
     620        <Filename Value="..\..\UCoolDockCommon.pas"/>
     621        <Caret Line="117" Column="1" TopLine="116"/>
    590622      </Position3>
    591623      <Position4>
    592         <Filename Value="E:\Projekty2\FreePascalManager\trunk\Instance\1\FPC\rtl\objpas\classes\classesh.inc"/>
    593         <Caret Line="3" Column="72" TopLine="1"/>
     624        <Filename Value="..\..\UCoolDocking.pas"/>
     625        <Caret Line="171" Column="1" TopLine="152"/>
    594626      </Position4>
    595627      <Position5>
    596         <Filename Value="E:\Projekty2\FreePascalManager\trunk\Instance\1\FPC\rtl\objpas\classes\classesh.inc"/>
    597         <Caret Line="1942" Column="23" TopLine="1921"/>
     628        <Filename Value="..\..\UCoolDocking.pas"/>
     629        <Caret Line="100" Column="9" TopLine="87"/>
    598630      </Position5>
    599631      <Position6>
    600         <Filename Value="E:\Projekty2\FreePascalManager\trunk\Instance\1\FPC\rtl\objpas\classes\classesh.inc"/>
    601         <Caret Line="1955" Column="87" TopLine="1934"/>
     632        <Filename Value="..\..\UCoolDocking.pas"/>
     633        <Caret Line="26" Column="35" TopLine="24"/>
    602634      </Position6>
    603635      <Position7>
    604         <Filename Value="..\..\UCoolDockLayout.pas"/>
    605         <Caret Line="88" Column="32" TopLine="69"/>
     636        <Filename Value="..\..\UCoolDockCommon.pas"/>
     637        <Caret Line="49" Column="24" TopLine="35"/>
    606638      </Position7>
    607639      <Position8>
    608         <Filename Value="..\..\UCoolDockLayout.pas"/>
    609         <Caret Line="83" Column="9" TopLine="70"/>
     640        <Filename Value="..\..\UCoolDockCommon.pas"/>
     641        <Caret Line="50" Column="34" TopLine="36"/>
    610642      </Position8>
    611643      <Position9>
    612         <Filename Value="..\..\UCoolDockLayout.pas"/>
    613         <Caret Line="90" Column="25" TopLine="77"/>
     644        <Filename Value="..\..\UCoolDocking.pas"/>
     645        <Caret Line="26" Column="42" TopLine="24"/>
    614646      </Position9>
    615647      <Position10>
    616         <Filename Value="..\..\UCoolDockLayout.pas"/>
    617         <Caret Line="541" Column="25" TopLine="519"/>
     648        <Filename Value="..\..\UCoolDockCommon.pas"/>
     649        <Caret Line="49" Column="1" TopLine="29"/>
    618650      </Position10>
    619651      <Position11>
    620         <Filename Value="..\..\UCoolDockLayout.pas"/>
    621         <Caret Line="397" Column="1" TopLine="380"/>
     652        <Filename Value="..\..\UCoolDockCommon.pas"/>
     653        <Caret Line="173" Column="40" TopLine="173"/>
    622654      </Position11>
    623655      <Position12>
    624         <Filename Value="..\..\UCoolDockLayout.pas"/>
    625         <Caret Line="398" Column="1" TopLine="380"/>
     656        <Filename Value="..\..\UCoolDockCommon.pas"/>
     657        <Caret Line="49" Column="43" TopLine="49"/>
    626658      </Position12>
    627659      <Position13>
    628         <Filename Value="..\..\UCoolDockLayout.pas"/>
    629         <Caret Line="397" Column="1" TopLine="380"/>
     660        <Filename Value="..\..\UCoolDocking.pas"/>
     661        <Caret Line="26" Column="29" TopLine="25"/>
    630662      </Position13>
    631663      <Position14>
    632         <Filename Value="..\..\UCoolDockLayout.pas"/>
    633         <Caret Line="82" Column="1" TopLine="69"/>
     664        <Filename Value="..\..\UCoolDockCommon.pas"/>
     665        <Caret Line="182" Column="14" TopLine="180"/>
    634666      </Position14>
    635667      <Position15>
    636         <Filename Value="..\..\UCoolDockLayout.pas"/>
    637         <Caret Line="83" Column="1" TopLine="69"/>
     668        <Filename Value="..\..\UCoolDocking.pas"/>
     669        <Caret Line="26" Column="29" TopLine="25"/>
    638670      </Position15>
    639671      <Position16>
    640         <Filename Value="..\..\UCoolDockLayout.pas"/>
    641         <Caret Line="84" Column="1" TopLine="69"/>
     672        <Filename Value="..\..\UCoolDocking.pas"/>
     673        <Caret Line="163" Column="1" TopLine="139"/>
    642674      </Position16>
    643675      <Position17>
    644         <Filename Value="..\..\UCoolDockLayout.pas"/>
    645         <Caret Line="85" Column="1" TopLine="69"/>
     676        <Filename Value="..\..\UCoolDocking.pas"/>
     677        <Caret Line="26" Column="43" TopLine="20"/>
    646678      </Position17>
    647679      <Position18>
    648         <Filename Value="..\..\UCoolDockLayout.pas"/>
    649         <Caret Line="88" Column="41" TopLine="69"/>
     680        <Filename Value="..\..\UCoolDockConjoinForm.pas"/>
     681        <Caret Line="80" Column="1" TopLine="57"/>
    650682      </Position18>
    651683      <Position19>
    652         <Filename Value="..\..\UCoolDockLayout.pas"/>
    653         <Caret Line="400" Column="1" TopLine="387"/>
     684        <Filename Value="..\..\UCoolDockConjoinForm.pas"/>
     685        <Caret Line="57" Column="17" TopLine="44"/>
    654686      </Position19>
    655687      <Position20>
    656         <Filename Value="..\..\UCoolDockLayout.pas"/>
    657         <Caret Line="88" Column="53" TopLine="75"/>
     688        <Filename Value="..\..\UCoolDockPopupMenu.pas"/>
     689        <Caret Line="165" Column="3" TopLine="161"/>
    658690      </Position20>
    659691      <Position21>
    660         <Filename Value="..\..\UCoolDockLayout.pas"/>
    661         <Caret Line="400" Column="1" TopLine="387"/>
     692        <Filename Value="..\..\UCoolDockStyleRegions.pas"/>
     693        <Caret Line="120" Column="40" TopLine="82"/>
    662694      </Position21>
    663695      <Position22>
    664         <Filename Value="..\..\UCoolDockLayout.pas"/>
    665         <Caret Line="401" Column="1" TopLine="387"/>
     696        <Filename Value="..\..\UCoolDockStyleRegions.pas"/>
     697        <Caret Line="40" Column="37" TopLine="27"/>
    666698      </Position22>
    667699      <Position23>
    668         <Filename Value="..\..\UCoolDockLayout.pas"/>
    669         <Caret Line="400" Column="1" TopLine="387"/>
     700        <Filename Value="..\..\UCoolDockStyleTabs.pas"/>
     701        <Caret Line="205" Column="52" TopLine="192"/>
    670702      </Position23>
    671703      <Position24>
    672         <Filename Value="..\..\UCoolDockLayout.pas"/>
    673         <Caret Line="401" Column="1" TopLine="387"/>
     704        <Filename Value="..\..\UCoolDockClientPanel.pas"/>
     705        <Caret Line="152" Column="3" TopLine="150"/>
    674706      </Position24>
    675707      <Position25>
    676708        <Filename Value="..\..\UCoolDockLayout.pas"/>
    677         <Caret Line="418" Column="34" TopLine="396"/>
     709        <Caret Line="354" Column="48" TopLine="349"/>
    678710      </Position25>
    679711      <Position26>
    680712        <Filename Value="..\..\UCoolDockLayout.pas"/>
    681         <Caret Line="400" Column="1" TopLine="395"/>
     713        <Caret Line="72" Column="28" TopLine="47"/>
    682714      </Position26>
    683715      <Position27>
    684         <Filename Value="..\..\UCoolDockLayout.pas"/>
    685         <Caret Line="401" Column="1" TopLine="395"/>
     716        <Filename Value="..\..\UCoolDockCustomize.pas"/>
     717        <Caret Line="49" Column="3" TopLine="36"/>
    686718      </Position27>
    687719      <Position28>
    688         <Filename Value="..\..\UCoolDockLayout.pas"/>
    689         <Caret Line="417" Column="1" TopLine="396"/>
     720        <Filename Value="..\..\UCoolDockCustomize.pas"/>
     721        <Caret Line="9" Column="38" TopLine="1"/>
    690722      </Position28>
    691723      <Position29>
    692         <Filename Value="..\..\UCoolDockLayout.pas"/>
    693         <Caret Line="418" Column="1" TopLine="397"/>
     724        <Filename Value="UMainForm.pas"/>
     725        <Caret Line="163" Column="49" TopLine="148"/>
    694726      </Position29>
    695727      <Position30>
    696         <Filename Value="..\..\UCoolDockLayout.pas"/>
    697         <Caret Line="420" Column="1" TopLine="399"/>
     728        <Filename Value="UMainForm.pas"/>
     729        <Caret Line="13" Column="77" TopLine="1"/>
    698730      </Position30>
    699731    </JumpHistory>
     
    721753  </CompilerOptions>
    722754  <Debugging>
    723     <BreakPoints Count="1">
    724       <Item1>
    725         <Source Value="..\..\UCoolDocking.pas"/>
    726         <Line Value="294"/>
    727       </Item1>
    728     </BreakPoints>
    729755    <Watches Count="1">
    730756      <Item1>
  • Docking/CoolDocking/Demo/IDE/UMainForm.pas

    r186 r187  
    1111  UMessagesForm, UCallStackForm, ULocalVariablesForm, UToDoListForm,
    1212  UWatchListForm, UThreadStatusForm, USourceEditorForm, UCoolDockWindowList,
    13   UCoolDockCustomize, UComponentTree;
     13  UCoolDockCustomize, UComponentTree, UCoolDockConjoinForm, UCoolDockManager;
    1414
    1515const
  • Docking/CoolDocking/UCoolDockClientPanel.pas

    r184 r187  
    6868
    6969uses
    70   UCoolDocking, UCoolDockStyle;
     70  UCoolDocking, UCoolDockStyle, UCoolDockManager;
    7171
    7272{ TCoolDockClientPanel }
  • Docking/CoolDocking/UCoolDockCommon.pas

    r183 r187  
    66
    77uses
    8   Classes, SysUtils, Forms, Controls;
     8  Classes, SysUtils, Forms, Controls, Contnrs, StdCtrls, ExtCtrls, ComCtrls;
    99
    1010type
     
    1414
    1515  TCoolDockMasterBase = class;
     16  TCoolDockClientBase = class;
     17
     18  { TCoolDockManagerBase }
    1619
    1720  TCoolDockManagerBase = class(TDockManager)
     21  private
     22    FMaster: TCoolDockMasterBase;
     23    procedure SetMaster(const AValue: TCoolDockMasterBase);
     24  public
     25    property Master: TCoolDockMasterBase read FMaster write SetMaster;
    1826  end;
    1927
     
    3038  end;
    3139
     40  { TCoolDockMasterBase }
     41
    3242  TCoolDockMasterBase = class(TComponent)
    3343  private
    3444    FCoolDockCustomize: TCoolDockCustomizeBase;
     45    FClients: TObjectList; // TList<TCoolDockClientBase>
     46    function GetClient(Index: Integer): TCoolDockClientBase;
    3547    procedure SetCustomize(const AValue: TCoolDockCustomizeBase);
     48  public
     49    constructor Create(AOwner: TComponent); override;
     50    destructor Destroy; override;
     51    procedure RegisterClient(Client: TCoolDockClientBase);
     52    procedure UnRegisterClient(Client: TCoolDockClientBase);
     53    property Clients[Index: Integer]: TCoolDockClientBase read GetClient;
    3654  published
    3755    property Customize: TCoolDockCustomizeBase read FCoolDockCustomize
     
    3957  end;
    4058
     59  { TCoolDockClientBase }
     60
     61  TCoolDockClientBase = class(TComponent)
     62  private
     63    FMaster: TCoolDockMasterBase;
     64    FPanel: TPanel;
     65    procedure SetMaster(const AValue: TCoolDockMasterBase);
     66    procedure SetPanel(const AValue: TPanel);
     67  published
     68    property Master: TCoolDockMasterBase read FMaster
     69      write SetMaster;
     70    property Panel: TPanel read FPanel
     71      write SetPanel;
     72  end;
     73
     74function GetUniqueName(BaseName: string): string;
     75
    4176implementation
     77
     78function GetUniqueName(BaseName: string): string;
     79var
     80  I: Integer;
     81begin
     82  I := 1;
     83  while Assigned(FindGlobalComponent(BaseName + IntToStr(I))) do Inc(I);
     84  Result := BaseName + IntToStr(I);
     85end;
     86
     87
     88{ TCoolDockManagerBase }
     89
     90procedure TCoolDockManagerBase.SetMaster(const AValue: TCoolDockMasterBase);
     91begin
     92  if FMaster = AValue then Exit;
     93  FMaster := AValue;
     94end;
     95
     96{ TCoolDockClientBase }
     97
     98procedure TCoolDockClientBase.SetMaster(const AValue: TCoolDockMasterBase);
     99var
     100  FOldMaster: TCoolDockMasterBase;
     101begin
     102  if FMaster = AValue then Exit;
     103  FOldMaster := FMaster;
     104  FMaster := AValue;
     105  if Assigned(FOldMaster) then
     106    FOldMaster.UnregisterClient(Self);
     107  if Assigned(FMaster) then begin
     108    FMaster.RegisterClient(Self);
     109    if not (csDesigning in ComponentState) then begin
     110      if Assigned(TWinControl(Owner).DockManager) then
     111        TCoolDockManagerBase(TWinControl(Owner).DockManager).Master := FMaster;
     112      if Assigned(FPanel) then
     113        TCoolDockManagerBase(FPanel.DockManager).Master := FMaster;
     114    end;
     115  end;
     116end;
     117
     118procedure TCoolDockClientBase.SetPanel(const AValue: TPanel);
     119var
     120  OldPanel: TPanel;
     121begin
     122  if FPanel = AValue then exit;
     123  OldPanel := FPanel;
     124  FPanel := AValue;
     125  if not (csDesigning in ComponentState) then begin
     126    if Assigned(FPanel) then
     127    with FPanel do begin
     128      DockSite := True;
     129      UseDockManager := True;
     130      //DockManager := TCoolDockManager.Create(FPanel);
     131    end else begin
     132      OldPanel.DockSite := False;
     133    end;
     134  end;
     135end;
    42136
    43137{ TCoolDockConjoinFormBase }
     
    77171end;
    78172
     173constructor TCoolDockMasterBase.Create(AOwner: TComponent);
     174begin
     175  inherited;
     176  FClients := TObjectList.Create;
     177  FClients.OwnsObjects := False;
     178end;
     179
     180destructor TCoolDockMasterBase.Destroy;
     181var
     182  I: Integer;
     183begin
     184  for I := FClients.Count - 1 downto 0 do
     185    TCoolDockClientBase(FClients[I]).Master := nil;
     186  FClients.Free;
     187  inherited Destroy;
     188end;
     189
     190procedure TCoolDockMasterBase.RegisterClient(Client: TCoolDockClientBase);
     191begin
     192  if Assigned(Client) then
     193    if FClients.IndexOf(Client) = -1 then begin
     194      FClients.Add(Client);
     195      Client.Master := Self;
     196    end;
     197end;
     198
     199procedure TCoolDockMasterBase.UnRegisterClient(Client: TCoolDockClientBase);
     200begin
     201  if Assigned(Client) then begin
     202    Client.Master := nil;
     203    FClients.Remove(Client);
     204  end;
     205end;
     206
     207function TCoolDockMasterBase.GetClient(Index: Integer): TCoolDockClientBase;
     208begin
     209  Result := TCoolDockClientBase(FClients[Index]);
     210end;
     211
     212
     213
    79214
    80215end.
  • Docking/CoolDocking/UCoolDockLayout.pas

    r186 r187  
    7070
    7171uses
    72   UCoolDocking;
     72  UCoolDocking, UCoolDockManager, UCoolDockConjoinForm;
    7373
    7474procedure Register;
  • Docking/CoolDocking/UCoolDockPopupMenu.pas

    r182 r187  
    3535
    3636uses
    37   UCoolDocking, UCoolDockStyleTabs, UCoolDockCustomize;
     37  UCoolDocking, UCoolDockStyleTabs, UCoolDockCustomize, UCoolDockManager;
    3838
    3939resourcestring
  • Docking/CoolDocking/UCoolDockStyleRegions.pas

    r186 r187  
    3838
    3939uses
    40   UCoolDocking;
     40  UCoolDocking, UCoolDockConjoinForm, UCoolDockManager;
    4141
    4242
  • Docking/CoolDocking/UCoolDockStyleTabs.pas

    r184 r187  
    4545
    4646uses
    47   UCoolDocking;
     47  UCoolDocking, UCoolDockManager;
    4848
    4949{ TCoolDockStyleTabs }
  • Docking/CoolDocking/UCoolDocking.pas

    r186 r187  
    1313  DateUtils, UCoolDockStyleTabs, UCoolDockStyleRegions, UCoolDockStylePopupTabs,
    1414  UCoolDockStylePopupRegions, UCoolDockStyle, UCoolDockClientPanel,
    15   UCoolDockPopupMenu;
     15  UCoolDockPopupMenu, UCoolDockManager;
    1616
    1717const
     
    1919
    2020type
    21   TCoolDockManager = class;
    2221  TCoolDockClient = class;
    2322  TCoolDockMaster = class;
    24 
    25   { TCoolDockConjoinForm }
    26 
    27   TCoolDockConjoinForm = class(TCoolDockConjoinFormBase)
    28   public
    29     CoolDockClient: TCoolDockClient;
    30     procedure FormShow(Sender : TObject);
    31     procedure FormHide(Sender : TObject);
    32     constructor Create(TheOwner: TComponent); override;
    33     destructor Destroy; override;
    34   private
    35     procedure SetName(const NewName: TComponentName); override;
    36   end;
    37 
    38 
    39   { TCoolDockPanels }
    40 
    41   // TCoolDockPanels = TObjectList<TCoolDockClientPanel>
    42   TCoolDockPanels = class(TObjectList)
    43     destructor Destroy; override;
    44   end;
    45 
    46   { TCoolDockManager }
    47 
    48   TCoolDockManager = class(TCoolDockManagerBase)
    49   private
    50     FMaster: TCoolDockMaster;
    51     FDockStyle: TDockStyle;
    52     FDockSite: TWinControl;
    53     FDockPanels: TCoolDockPanels;
    54     function GetDockSite: TWinControl;
    55     function GetHeaderPos: THeaderPos;
    56     function GetMoveDuration: Integer;
    57     procedure InsertControlPanel(Control: TControl; InsertAt: TAlign;
    58       DropCtl: TControl);
    59     procedure SetDockStyle(const AValue: TDockStyle);
    60     procedure SetHeaderPos(const AValue: THeaderPos);
    61     procedure SetMaster(const AValue: TCoolDockMaster);
    62     procedure SetMoveDuration(const AValue: Integer);
    63     procedure SetVisible(const AValue: Boolean);
    64     procedure UpdateClientSize;
    65   public
    66     DockStyleHandler: TCoolDockStyle;
    67     PopupMenu: TCoolDockPopupMenu;
    68     constructor Create(ADockSite: TWinControl); override;
    69     destructor Destroy; override;
    70 
    71     // Inherited from TDockManager
    72     procedure BeginUpdate; override;
    73     procedure EndUpdate; override;
    74     procedure GetControlBounds(Control: TControl;
    75       out AControlBounds: TRect); override;
    76     function GetDockEdge(ADockObject: TDragDockObject): boolean; override;
    77     procedure InsertControl(ADockObject: TDragDockObject); override; overload;
    78     procedure InsertControl(Control: TControl; InsertAt: TAlign;
    79       DropCtl: TControl); override; overload;
    80     procedure LoadFromStream(Stream: TStream); override;
    81     procedure PaintSite(DC: HDC); override;
    82     procedure MessageHandler(Sender: TControl; var Message: TLMessage); override;
    83     procedure PositionDockRect(ADockObject: TDragDockObject); override; overload;
    84     procedure PositionDockRect(Client, DropCtl: TControl; DropAlign: TAlign;
    85       var DockRect: TRect); override; overload;
    86     procedure RemoveControl(Control: TControl); override;
    87     procedure ResetBounds(Force: Boolean); override;
    88     procedure SaveToStream(Stream: TStream); override;
    89     procedure SetReplacingControl(Control: TControl); override;
    90     function AutoFreeByControl: Boolean; override;
    91 
    92     function FindControlInPanels(Control: TControl): TCoolDockClientPanel;
    93     function CreateContainer(InsertAt: TAlign): TCoolDockConjoinForm;
    94     property DockPanels: TCoolDockPanels read FDockPanels write FDockPanels;
    95     property DockStyle: TDockStyle read FDockStyle write SetDockStyle;
    96     property MoveDuration: Integer read GetMoveDuration write SetMoveDuration;
    97     property Master: TCoolDockMaster read FMaster write SetMaster;
    98     property DockSite: TWinControl read GetDockSite;
    99     property HeaderPos: THeaderPos read GetHeaderPos write SetHeaderPos;
    100     property Visible: Boolean write SetVisible;
    101   end;
    10223
    10324  { TCoolDockMaster }
     
    11031    FShowIcons: Boolean;
    11132    FTabsEnabled: Boolean;
    112     FClients: TObjectList;
    113     function GetClient(Index: Integer): TCoolDockClient;
    11433    procedure SetShowIcons(const AValue: Boolean);
    11534    procedure SetTabsEnabled(const AValue: Boolean);
     
    11736    constructor Create(AOwner: TComponent); override;
    11837    destructor Destroy; override;
    119     procedure RegisterClient(Client: TCoolDockClient);
    120     procedure UnRegisterClient(Client: TCoolDockClient);
    121     property Clients[Index: Integer]: TCoolDockClient read GetClient;
    12238  published
    12339    property TabsEnabled: Boolean read FTabsEnabled write SetTabsEnabled;
     
    13248  end;
    13349
    134   TCoolDockClient = class(TComponent)
     50  TCoolDockClient = class(TCoolDockClientBase)
    13551  private
    13652    FDockable: Boolean;
    13753    FFloatable: Boolean;
    138     FMaster: TCoolDockMaster;
    139     FPanel: TPanel;
    14054    procedure SetDockable(const AValue: Boolean);
    14155    procedure SetFloatable(const AValue: Boolean);
    142     procedure SetMaster(const AValue: TCoolDockMaster);
    143     procedure SetPanel(const AValue: TPanel);
    14456  public
    14557    constructor Create(AOwner: TComponent); override;
     
    15062    property Floatable: Boolean read FFloatable
    15163      write SetFloatable default True;
    152     property Master: TCoolDockMaster read FMaster
    153       write SetMaster;
    154     property Panel: TPanel read FPanel
    155       write SetPanel;
    15664  end;
    15765
     
    17179end;
    17280
    173 function GetUniqueName(BaseName: string): string;
    174 var
    175   I: Integer;
    176 begin
    177   I := 1;
    178   while Assigned(FindGlobalComponent(BaseName + IntToStr(I))) do Inc(I);
    179   Result := BaseName + IntToStr(I);
    180 end;
    181 
    182 { TCoolDockPanels }
    183 
    184 destructor TCoolDockPanels.Destroy;
    185 var
    186   Temp: Integer;
    187 begin
    188   Temp := Count;
    189   inherited Destroy;
    190 end;
    191 
    192 
    193 { TCoolDockManager }
    194 
    195 function TCoolDockManager.FindControlInPanels(Control: TControl
    196   ): TCoolDockClientPanel;
    197 var
    198   I: Integer;
    199 begin
    200   I := 0;
    201   while (I < FDockPanels.Count) and
    202     (TCoolDockClientPanel(FDockPanels[I]).Control <> Control) do Inc(I);
    203   if I < FDockPanels.Count then Result := TCoolDockClientPanel(FDockPanels[I])
    204     else Result := nil;
    205 end;
    206 
    207 function TCoolDockManager.GetDockSite: TWinControl;
    208 begin
    209   Result := FDockSite;
    210 end;
    211 
    212 function TCoolDockManager.GetHeaderPos: THeaderPos;
    213 begin
    214 
    215 end;
    216 
    217 function TCoolDockManager.GetMoveDuration: Integer;
    218 begin
    219 
    220 end;
    221 
    222 constructor TCoolDockManager.Create(ADockSite: TWinControl);
    223 var
    224   NewMenuItem: TMenuItem;
    225   NewMenuItem2: TMenuItem;
    226 begin
    227   inherited Create(ADockSite);
    228   FDockSite := ADockSite;
    229   FDockPanels := TCoolDockPanels.Create;
    230 
    231   FDockStyle := dsTabs; // To initialize style value have to be different
    232   DockStyle := dsList;
    233   PopupMenu := TCoolDockPopupMenu.Create(Self);
    234   PopupMenu.Parent := ADockSite;
    235 end;
    236 
    237 destructor TCoolDockManager.Destroy;
    238 begin
    239   PopupMenu.Free;
    240   DockStyleHandler.Free;
    241   FDockPanels.Free;
    242   inherited Destroy;
    243 end;
    244 
    245 procedure TCoolDockManager.BeginUpdate;
    246 begin
    247   inherited BeginUpdate;
    248 end;
    249 
    250 procedure TCoolDockManager.EndUpdate;
    251 begin
    252   inherited EndUpdate;
    253 end;
    254 
    255 procedure TCoolDockManager.GetControlBounds(Control: TControl; out
    256   AControlBounds: TRect);
    257 begin
    258 end;
    259 
    260 function TCoolDockManager.GetDockEdge(ADockObject: TDragDockObject): boolean;
    261 begin
    262   Result := inherited GetDockEdge(ADockObject);
    263 end;
    264 
    265 procedure TCoolDockManager.InsertControl(ADockObject: TDragDockObject);
    266 begin
    267   inherited InsertControl(ADockObject);
    268 end;
    269 
    270 procedure TCoolDockManager.InsertControlPanel(Control: TControl; InsertAt: TAlign;
    271   DropCtl: TControl);
    272 begin
    273   DockStyleHandler.InsertControl(Control, InsertAt);
    274 end;
    275 
    276 procedure TCoolDockManager.InsertControl(Control: TControl; InsertAt: TAlign;
    277   DropCtl: TControl);
    278 var
    279   NewSplitter: TSplitter;
    280   NewDockPanel: TCoolDockClientPanel;
    281   NewPanel: TPanel;
    282   I: Integer;
    283   NewConjoinDockForm: TCoolDockConjoinForm;
    284   NewDockSite: TWinControl;
    285   NewForm: TForm;
    286 begin
    287   if (FDockSite is TForm) and (not (FDockSite is TCoolDockConjoinForm)) then begin
    288     if (not Assigned(FDockSite.Parent)) then begin
    289       // Create conjointed form
    290       NewConjoinDockForm := CreateContainer(InsertAt);
    291       FDockSite.ManualDock(NewConjoinDockForm);
    292       Control.ManualDock(NewConjoinDockForm, nil, InsertAt);
    293     end else begin
    294       NewConjoinDockForm := CreateContainer(InsertAt);
    295       NewDockSite := FDockSite.HostDockSite;
    296 //      FDockSite.ManualFloat(FDockSite.BoundsRect);
    297       NewConjoinDockForm.ManualDock(NewDockSite, nil, InsertAt);
    298       FDockSite.ManualDock(NewConjoinDockForm);
    299       Control.ManualDock(NewConjoinDockForm, nil, InsertAt);
    300     end;
    301   end else
    302   if (FDockSite is TCoolDockConjoinForm) or (FDockSite is TPanel) or (FDockSite is TCoolDockClientPanel) then begin
    303     InsertControlPanel(Control, InsertAt, DropCtl);
    304   end;
    305 
    306 //  FDockPanel.Invalidate;
    307   //inherited;
    308 end;
    309 
    310 procedure TCoolDockManager.LoadFromStream(Stream: TStream);
    311 begin
    312 end;
    313 
    314 procedure TCoolDockManager.PaintSite(DC: HDC);
    315 var
    316   Canvas: TControlCanvas;
    317   Control: TControl;
    318   I: Integer;
    319   R: TRect;
    320 begin
    321   for I := 0 to FDockPanels.Count - 1 do
    322     with TCoolDockClientPanel(FDockPanels[I]) do begin
    323       Invalidate;
    324     end;
    325 end;
    326 
    327 procedure TCoolDockManager.MessageHandler(Sender: TControl;
    328   var Message: TLMessage);
    329 begin
    330   inherited MessageHandler(Sender, Message);
    331 end;
    332 
    333 procedure TCoolDockManager.PositionDockRect(ADockObject: TDragDockObject);
    334 begin
    335   inherited PositionDockRect(ADockObject);
    336 end;
    337 
    338 procedure TCoolDockManager.PositionDockRect(Client, DropCtl: TControl;
    339   DropAlign: TAlign; var DockRect: TRect);
    340 begin
    341   case DropAlign of
    342     alNone: begin
    343       DockRect := Rect(0, 0, FDockSite.ClientWidth, FDockSite.ClientHeight);
    344     end;
    345     alRight: begin
    346       DockRect := Rect(FDockSite.ClientWidth div 2, 0, FDockSite.ClientWidth, FDockSite.ClientHeight);
    347     end;
    348     alLeft: begin
    349       DockRect := Rect(0, 0, FDockSite.ClientWidth div 2, FDockSite.ClientHeight);
    350     end;
    351     alTop: begin
    352       DockRect := Rect(0, 0, FDockSite.ClientWidth, FDockSite.ClientHeight div 2);
    353     end;
    354     alBottom: begin
    355       DockRect := Rect(0, FDockSite.ClientHeight div 2, FDockSite.ClientWidth, FDockSite.ClientHeight);
    356     end;
    357   end;
    358   DockRect.TopLeft := FDockSite.ClientToScreen(DockRect.TopLeft);
    359   DockRect.BottomRight := FDockSite.ClientToScreen(DockRect.BottomRight);
    360 end;
    361 
    362 procedure TCoolDockManager.RemoveControl(Control: TControl);
    363 var
    364   ClientPanel: TCoolDockClientPanel;
    365 begin
    366   DockStyleHandler.RemoveControl(Control);
    367   //inherited;
    368 (*  if Control.HostDockSite = Self.FDockSite then begin
    369     ClientPanel := FindControlInPanels(Control);
    370 
    371     //if Assigned(ClientPanel) then ClientPanel.Splitter.Free;
    372     //Control.RemoveHandlerOnVisibleChanged(ClientPanel.VisibleChange);
    373     FDockPanels.Remove(ClientPanel);
    374     DockStyleHandler.RemoveControl(Control);
    375     UpdateClientSize;
    376     //FDockSite.Invalidate;
    377     //if (FDockSite is TCoolDockConjoinForm) and (FDockSite.DockClientCount = 1) then
    378     //  FDockSite.Free;
    379     DockStyle := DockStyle;
    380   end;
    381   *)
    382 end;
    383 
    384 procedure TCoolDockManager.ResetBounds(Force: Boolean);
    385 var
    386   I: Integer;
    387   Control: TControl;
    388   R: TRect;
    389 begin
    390 end;
    391 
    392 procedure TCoolDockManager.SaveToStream(Stream: TStream);
    393 begin
    394 end;
    395 
    396 procedure TCoolDockManager.SetReplacingControl(Control: TControl);
    397 begin
    398   inherited SetReplacingControl(Control);
    399 end;
    400 
    401 function TCoolDockManager.AutoFreeByControl: Boolean;
    402 begin
    403   Result := inherited AutoFreeByControl;
    404 end;
    405 
    406 function TCoolDockManager.CreateContainer(InsertAt: TAlign): TCoolDockConjoinForm;
    407 var
    408   NewDockSite: TWinControl;
    409   NewConjoinDockForm: TCoolDockConjoinForm;
    410 begin
    411   NewConjoinDockForm := TCoolDockConjoinForm.Create(Application);
    412   NewConjoinDockForm.Name := GetUniqueName('ConjoinForm');
    413   NewConjoinDockForm.Visible := True;
    414   NewConjoinDockForm.BoundsRect := FDockSite.BoundsRect;
    415   NewConjoinDockForm.CoolDockClient.Master := Self.Master;
    416   NewDockSite := FDockSite.HostDockSite;
    417   // FDockSite.ManualFloat(FDockSite.BoundsRect);
    418   //NewConjoinDockForm.ManualDock(NewDockSite, nil, InsertAt);
    419   Result := NewConjoinDockForm;
    420 end;
    421 
    422 procedure TCoolDockManager.SetDockStyle(const AValue: TDockStyle);
    423 var
    424   I: Integer;
    425 begin
    426   if FDockStyle <> AValue then begin
    427     FDockStyle := AValue;
    428     FreeAndNil(DockStyleHandler);
    429     if AValue = dsTabs then begin
    430       DockStyleHandler := TCoolDockStyleTabs.Create(Self);
    431       TCoolDockStyleTabs(DockStyleHandler).TabControlChange(Self);
    432     end else
    433     if AValue = dsList then begin
    434       DockStyleHandler := TCoolDockStyleRegions.Create(Self);
    435     end else
    436     if AValue = dsPopupList then begin
    437       DockStyleHandler := TCoolDockStylePopupRegions.Create(Self);
    438     end else
    439     if AValue = dsPopupTabs then begin
    440       DockStyleHandler := TCoolDockStylePopupTabs.Create(Self);
    441     end;
    442   end;
    443   UpdateClientSize;
    444 end;
    445 
    446 procedure TCoolDockManager.SetHeaderPos(const AValue: THeaderPos);
    447 begin
    448 
    449 end;
    450 
    451 procedure TCoolDockManager.SetMaster(const AValue: TCoolDockMaster);
    452 begin
    453   if FMaster = AValue then Exit;
    454   FMaster := AValue;
    455 end;
    456 
    457 procedure TCoolDockManager.SetMoveDuration(const AValue: Integer);
    458 begin
    459 end;
    460 
    461 procedure TCoolDockManager.SetVisible(const AValue: Boolean);
    462 var
    463   I: Integer;
    464 begin
    465   DockStyleHandler.Visible := AValue;
    466 //  for I := 0 to DockPanels.Count - 1 do
    467 //    TCoolDockClientPanel(DockPanels[I]).Visible := AValue;
    468 end;
    469 
    470 procedure TCoolDockManager.UpdateClientSize;
    471 begin
    472   DockStyleHandler.UpdateClientSize;
    473 end;
    474 
    475 { TCoolDockConjoinForm }
    476 
    477 procedure TCoolDockConjoinForm.FormShow(Sender: TObject);
    478 begin
    479   TCoolDockManager(DockManager).Visible := True;
    480 end;
    481 
    482 procedure TCoolDockConjoinForm.FormHide(Sender: TObject);
    483 var
    484   I: Integer;
    485 begin
    486   TCoolDockManager(DockManager).Visible := False;
    487   // Hide all docked childs
    488   with TCoolDockManager(DockManager) do
    489   for I := 0 to DockPanels.Count - 1 do
    490     if Assigned(TCoolDockClientPanel(DockPanels[I]).Control) then begin
    491       TCoolDockClientPanel(DockPanels[I]).Control.Tag := Integer(dhtTemporal);
    492       TCoolDockClientPanel(DockPanels[I]).Control.Hide;
    493     end;
    494 end;
    495 
    496 constructor TCoolDockConjoinForm.Create(TheOwner: TComponent);
    497 begin
    498   inherited CreateNew(TheOwner);
    499   CoolDockClient := TCoolDockClient.Create(Self);
    500   with CoolDockClient do begin
    501   end;
    502   OnShow := FormShow;
    503   OnHide := FormHide;
    504 end;
    505 
    506 destructor TCoolDockConjoinForm.Destroy;
    507 begin
    508   inherited;
    509 end;
    510 
    511 procedure TCoolDockConjoinForm.SetName(const NewName: TComponentName);
    512 begin
    513   inherited SetName(NewName);
    514   CoolDockClient.Name := Name + 'CoolDockClient';
    515 end;
    51681
    51782{ TCoolDockMaster }
     
    52186  if FTabsEnabled = AValue then Exit;
    52287  FTabsEnabled := AValue;
    523 end;
    524 
    525 function TCoolDockMaster.GetClient(Index: Integer): TCoolDockClient;
    526 begin
    527   Result := TCoolDockClient(FClients[Index]);
    52888end;
    52989
     
    53797begin
    53898  inherited Create(AOwner);
    539   FClients := TObjectList.Create;
    540   FClients.OwnsObjects := False;
    54199end;
    542100
     
    546104begin
    547105  // Assigning nil to Client Master property cause unregistring client from list
    548   for I := FClients.Count - 1 downto 0 do
    549     TCoolDockClient(FClients[I]).Master := nil;
    550   FClients.Free;
    551106  Customize := nil;
    552107  inherited Destroy;
    553108end;
    554109
    555 procedure TCoolDockMaster.RegisterClient(Client: TCoolDockClient);
    556 begin
    557   if Assigned(Client) then
    558     if FClients.IndexOf(Client) = -1 then begin
    559       FClients.Add(Client);
    560       Client.Master := Self;
    561     end;
    562 end;
    563 
    564 procedure TCoolDockMaster.UnRegisterClient(Client: TCoolDockClient);
    565 begin
    566   if Assigned(Client) then begin
    567     Client.Master := nil;
    568     FClients.Remove(Client);
    569   end;
    570 end;
    571110
    572111{ TCoolDockClient }
    573 
    574 procedure TCoolDockClient.SetMaster(const AValue: TCoolDockMaster);
    575 var
    576   FOldMaster: TCoolDockMaster;
    577 begin
    578   if FMaster = AValue then Exit;
    579   FOldMaster := FMaster;
    580   FMaster := AValue;
    581   if Assigned(FOldMaster) then
    582     FOldMaster.UnregisterClient(Self);
    583   if Assigned(FMaster) then begin
    584     FMaster.RegisterClient(Self);
    585     if not (csDesigning in ComponentState) then begin
    586       if Assigned(TWinControl(Owner).DockManager) then
    587         TCoolDockManager(TWinControl(Owner).DockManager).Master := FMaster;
    588       if Assigned(Panel) then
    589         TCoolDockManager(Panel.DockManager).Master := FMaster;
    590     end;
    591   end;
    592 end;
    593112
    594113procedure TCoolDockClient.SetDockable(const AValue: Boolean);
     
    640159end;
    641160
    642 procedure TCoolDockClient.SetPanel(const AValue: TPanel);
    643 var
    644   OldPanel: TPanel;
    645 begin
    646   if FPanel = AValue then exit;
    647   OldPanel := FPanel;
    648   FPanel := AValue;
    649   if not (csDesigning in ComponentState) then begin
    650     if Assigned(FPanel) then
    651     with FPanel do begin
    652       DockSite := True;
    653       UseDockManager := True;
    654       DockManager := TCoolDockManager.Create(FPanel);
    655     end else begin
    656       OldPanel.DockSite := False;
    657     end;
    658   end;
    659 end;
    660 
    661 initialization
    662 
    663 RegisterClass(TCoolDockConjoinForm);
    664 
    665 finalization
    666 
    667 UnRegisterClass(TCoolDockConjoinForm);
    668 
    669161
    670162end.
Note: See TracChangeset for help on using the changeset viewer.