Changeset 61 for Docking


Ignore:
Timestamp:
Sep 29, 2010, 9:14:55 AM (14 years ago)
Author:
george
Message:
  • Opraveno: Obsluha událostí OnShow a OnHide.
  • Opraveno: Zamezení ukotvení okna do sebe.
Location:
Docking/CoolDocking
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • Docking/CoolDocking/Demo/Demo.lpi

    r60 r61  
    3535      </Item2>
    3636    </RequiredPackages>
    37     <Units Count="52">
     37    <Units Count="54">
    3838      <Unit0>
    3939        <Filename Value="Demo.lpr"/>
     
    4343        <WindowIndex Value="0"/>
    4444        <TopLine Value="1"/>
    45         <CursorPos X="25" Y="8"/>
    46         <UsageCount Value="124"/>
     45        <CursorPos X="6" Y="10"/>
     46        <UsageCount Value="126"/>
    4747        <Loaded Value="True"/>
    4848        <DefaultSyntaxHighlighter Value="Delphi"/>
     
    5454        <ResourceBaseClass Value="Form"/>
    5555        <UnitName Value="UMainForm"/>
    56         <IsVisibleTab Value="True"/>
    57         <EditorIndex Value="2"/>
    58         <WindowIndex Value="0"/>
    59         <TopLine Value="16"/>
    60         <CursorPos X="1" Y="29"/>
    61         <UsageCount Value="124"/>
     56        <EditorIndex Value="4"/>
     57        <WindowIndex Value="0"/>
     58        <TopLine Value="79"/>
     59        <CursorPos X="19" Y="92"/>
     60        <UsageCount Value="126"/>
    6261        <Loaded Value="True"/>
    6362        <LoadedDesigner Value="True"/>
     
    6766        <Filename Value="E:\Programy\Lazarus\lcl\controls.pp"/>
    6867        <UnitName Value="Controls"/>
    69         <EditorIndex Value="16"/>
    70         <WindowIndex Value="0"/>
    71         <TopLine Value="1217"/>
    72         <CursorPos X="27" Y="1230"/>
    73         <UsageCount Value="61"/>
     68        <EditorIndex Value="21"/>
     69        <WindowIndex Value="0"/>
     70        <TopLine Value="1667"/>
     71        <CursorPos X="14" Y="1680"/>
     72        <UsageCount Value="62"/>
    7473        <Loaded Value="True"/>
    7574      </Unit2>
     
    8584      <Unit4>
    8685        <Filename Value="E:\Programy\Lazarus\lcl\include\control.inc"/>
    87         <WindowIndex Value="0"/>
    88         <TopLine Value="3138"/>
    89         <CursorPos X="1" Y="3151"/>
    90         <UsageCount Value="54"/>
     86        <EditorIndex Value="22"/>
     87        <WindowIndex Value="0"/>
     88        <TopLine Value="71"/>
     89        <CursorPos X="21" Y="83"/>
     90        <UsageCount Value="55"/>
     91        <Loaded Value="True"/>
    9192      </Unit4>
    9293      <Unit5>
    9394        <Filename Value="E:\Programy\Lazarus\lcl\include\wincontrol.inc"/>
    94         <EditorIndex Value="17"/>
    95         <WindowIndex Value="0"/>
    96         <TopLine Value="5341"/>
    97         <CursorPos X="65" Y="5348"/>
    98         <UsageCount Value="60"/>
     95        <EditorIndex Value="23"/>
     96        <WindowIndex Value="0"/>
     97        <TopLine Value="5229"/>
     98        <CursorPos X="33" Y="5245"/>
     99        <UsageCount Value="61"/>
    99100        <Loaded Value="True"/>
    100101      </Unit5>
     
    132133        <Filename Value="E:\Programy\Lazarus\lcl\lclproc.pas"/>
    133134        <UnitName Value="LCLProc"/>
    134         <WindowIndex Value="0"/>
    135         <TopLine Value="1493"/>
    136         <CursorPos X="18" Y="1498"/>
    137         <UsageCount Value="25"/>
     135        <EditorIndex Value="5"/>
     136        <WindowIndex Value="0"/>
     137        <TopLine Value="1495"/>
     138        <CursorPos X="1" Y="1516"/>
     139        <UsageCount Value="26"/>
     140        <Loaded Value="True"/>
    138141      </Unit10>
    139142      <Unit11>
     
    173176        <ResourceBaseClass Value="Form"/>
    174177        <UnitName Value="UDockForm"/>
    175         <EditorIndex Value="14"/>
    176         <WindowIndex Value="0"/>
    177         <TopLine Value="2"/>
    178         <CursorPos X="15" Y="9"/>
    179         <UsageCount Value="123"/>
     178        <EditorIndex Value="18"/>
     179        <WindowIndex Value="0"/>
     180        <TopLine Value="7"/>
     181        <CursorPos X="33" Y="21"/>
     182        <UsageCount Value="125"/>
    180183        <Loaded Value="True"/>
    181184        <LoadedDesigner Value="True"/>
     
    185188        <Filename Value="E:\Programy\Lazarus\lcl\graphics.pp"/>
    186189        <UnitName Value="Graphics"/>
    187         <EditorIndex Value="9"/>
     190        <EditorIndex Value="12"/>
    188191        <WindowIndex Value="0"/>
    189192        <TopLine Value="1083"/>
    190193        <CursorPos X="15" Y="1096"/>
    191         <UsageCount Value="11"/>
     194        <UsageCount Value="12"/>
    192195        <Loaded Value="True"/>
    193196      </Unit16>
     
    229232        <Filename Value="E:\Programy\Lazarus\lcl\extctrls.pp"/>
    230233        <UnitName Value="ExtCtrls"/>
    231         <EditorIndex Value="4"/>
    232         <WindowIndex Value="0"/>
    233         <TopLine Value="292"/>
    234         <CursorPos X="24" Y="305"/>
    235         <UsageCount Value="27"/>
     234        <EditorIndex Value="7"/>
     235        <WindowIndex Value="0"/>
     236        <TopLine Value="1250"/>
     237        <CursorPos X="19" Y="1263"/>
     238        <UsageCount Value="28"/>
    236239        <Loaded Value="True"/>
    237240      </Unit21>
     
    246249      <Unit23>
    247250        <Filename Value="E:\Programy\Lazarus\lcl\include\dragmanager.inc"/>
    248         <WindowIndex Value="0"/>
    249         <TopLine Value="538"/>
    250         <CursorPos X="20" Y="567"/>
    251         <UsageCount Value="6"/>
     251        <EditorIndex Value="2"/>
     252        <WindowIndex Value="0"/>
     253        <TopLine Value="553"/>
     254        <CursorPos X="1" Y="566"/>
     255        <UsageCount Value="11"/>
     256        <Loaded Value="True"/>
    252257      </Unit23>
    253258      <Unit24>
    254259        <Filename Value="E:\Programy\Lazarus\lcl\include\customform.inc"/>
    255         <WindowIndex Value="0"/>
    256         <TopLine Value="359"/>
    257         <CursorPos X="1" Y="372"/>
    258         <UsageCount Value="1"/>
     260        <EditorIndex Value="20"/>
     261        <WindowIndex Value="0"/>
     262        <TopLine Value="1452"/>
     263        <CursorPos X="5" Y="1467"/>
     264        <UsageCount Value="11"/>
     265        <Loaded Value="True"/>
    259266      </Unit24>
    260267      <Unit25>
     
    269276        <Filename Value="E:\Programy\Lazarus\lcl\comctrls.pp"/>
    270277        <UnitName Value="ComCtrls"/>
    271         <EditorIndex Value="3"/>
     278        <EditorIndex Value="6"/>
    272279        <WindowIndex Value="0"/>
    273280        <TopLine Value="398"/>
    274281        <CursorPos X="59" Y="408"/>
    275         <UsageCount Value="11"/>
     282        <UsageCount Value="12"/>
    276283        <Loaded Value="True"/>
    277284      </Unit26>
     
    279286        <Filename Value="E:\Programy\Lazarus\lcl\forms.pp"/>
    280287        <UnitName Value="Forms"/>
    281         <EditorIndex Value="15"/>
    282         <WindowIndex Value="0"/>
    283         <TopLine Value="709"/>
    284         <CursorPos X="18" Y="722"/>
    285         <UsageCount Value="34"/>
     288        <EditorIndex Value="19"/>
     289        <WindowIndex Value="0"/>
     290        <TopLine Value="529"/>
     291        <CursorPos X="21" Y="541"/>
     292        <UsageCount Value="35"/>
    286293        <Loaded Value="True"/>
    287294      </Unit27>
     
    289296        <Filename Value="E:\Programy\Lazarus\lcl\themes.pas"/>
    290297        <UnitName Value="Themes"/>
    291         <EditorIndex Value="13"/>
     298        <EditorIndex Value="17"/>
    292299        <WindowIndex Value="0"/>
    293300        <TopLine Value="2167"/>
    294301        <CursorPos X="21" Y="2148"/>
    295         <UsageCount Value="29"/>
     302        <UsageCount Value="30"/>
    296303        <Loaded Value="True"/>
    297304      </Unit28>
     
    332339        <Filename Value="..\UCoolDocking.pas"/>
    333340        <UnitName Value="UCoolDocking"/>
     341        <IsVisibleTab Value="True"/>
    334342        <EditorIndex Value="1"/>
    335343        <WindowIndex Value="0"/>
    336         <TopLine Value="883"/>
    337         <CursorPos X="1" Y="896"/>
    338         <UsageCount Value="52"/>
     344        <TopLine Value="899"/>
     345        <CursorPos X="76" Y="904"/>
     346        <UsageCount Value="53"/>
    339347        <Loaded Value="True"/>
    340348        <DefaultSyntaxHighlighter Value="Delphi"/>
     
    382390        <ResourceBaseClass Value="Form"/>
    383391        <UnitName Value="UCoolDockCustomize"/>
    384         <EditorIndex Value="18"/>
     392        <EditorIndex Value="24"/>
    385393        <WindowIndex Value="0"/>
    386394        <TopLine Value="9"/>
    387395        <CursorPos X="19" Y="17"/>
    388         <UsageCount Value="51"/>
     396        <UsageCount Value="52"/>
    389397        <Loaded Value="True"/>
    390398        <LoadedDesigner Value="True"/>
     
    412420        <TopLine Value="1"/>
    413421        <CursorPos X="53" Y="2"/>
    414         <UsageCount Value="66"/>
     422        <UsageCount Value="68"/>
    415423        <DefaultSyntaxHighlighter Value="Delphi"/>
    416424      </Unit41>
     
    439447      <Unit45>
    440448        <Filename Value="E:\Programy\Lazarus\lcl\include\tabcontrol.inc"/>
    441         <EditorIndex Value="7"/>
     449        <EditorIndex Value="10"/>
    442450        <WindowIndex Value="0"/>
    443451        <TopLine Value="182"/>
    444452        <CursorPos X="3" Y="184"/>
    445         <UsageCount Value="11"/>
     453        <UsageCount Value="12"/>
    446454        <Loaded Value="True"/>
    447455      </Unit45>
    448456      <Unit46>
    449457        <Filename Value="E:\Programy\Lazarus\lcl\include\pagecontrol.inc"/>
    450         <EditorIndex Value="6"/>
     458        <EditorIndex Value="9"/>
    451459        <WindowIndex Value="0"/>
    452460        <TopLine Value="98"/>
    453461        <CursorPos X="3" Y="103"/>
    454         <UsageCount Value="11"/>
     462        <UsageCount Value="12"/>
    455463        <Loaded Value="True"/>
    456464      </Unit46>
    457465      <Unit47>
    458466        <Filename Value="E:\Programy\Lazarus\lcl\include\customnotebook.inc"/>
    459         <EditorIndex Value="5"/>
     467        <EditorIndex Value="8"/>
    460468        <WindowIndex Value="0"/>
    461469        <TopLine Value="885"/>
    462470        <CursorPos X="3" Y="853"/>
    463         <UsageCount Value="11"/>
     471        <UsageCount Value="12"/>
    464472        <Loaded Value="True"/>
    465473      </Unit47>
    466474      <Unit48>
    467475        <Filename Value="E:\Programy\Lazarus\lcl\include\canvas.inc"/>
    468         <EditorIndex Value="10"/>
    469         <WindowIndex Value="0"/>
    470         <TopLine Value="954"/>
    471         <CursorPos X="17" Y="965"/>
    472         <UsageCount Value="11"/>
     476        <EditorIndex Value="13"/>
     477        <WindowIndex Value="0"/>
     478        <TopLine Value="1555"/>
     479        <CursorPos X="1" Y="1568"/>
     480        <UsageCount Value="12"/>
    473481        <Loaded Value="True"/>
    474482      </Unit48>
    475483      <Unit49>
    476484        <Filename Value="E:\Programy\Lazarus\lcl\include\lclintfh.inc"/>
    477         <EditorIndex Value="11"/>
     485        <EditorIndex Value="15"/>
    478486        <WindowIndex Value="0"/>
    479487        <TopLine Value="27"/>
    480488        <CursorPos X="10" Y="40"/>
    481         <UsageCount Value="11"/>
     489        <UsageCount Value="12"/>
    482490        <Loaded Value="True"/>
    483491      </Unit49>
    484492      <Unit50>
    485493        <Filename Value="E:\Programy\Lazarus\lcl\include\intfbaselcl.inc"/>
    486         <EditorIndex Value="12"/>
     494        <EditorIndex Value="16"/>
    487495        <WindowIndex Value="0"/>
    488496        <TopLine Value="29"/>
    489497        <CursorPos X="3" Y="32"/>
    490         <UsageCount Value="11"/>
     498        <UsageCount Value="12"/>
    491499        <Loaded Value="True"/>
    492500      </Unit50>
    493501      <Unit51>
    494502        <Filename Value="E:\Programy\Lazarus\lcl\include\winapih.inc"/>
    495         <EditorIndex Value="8"/>
     503        <EditorIndex Value="11"/>
    496504        <WindowIndex Value="0"/>
    497505        <TopLine Value="306"/>
    498506        <CursorPos X="10" Y="319"/>
     507        <UsageCount Value="12"/>
     508        <Loaded Value="True"/>
     509      </Unit51>
     510      <Unit52>
     511        <Filename Value="E:\Programy\Lazarus\lcl\include\controlcanvas.inc"/>
     512        <EditorIndex Value="14"/>
     513        <WindowIndex Value="0"/>
     514        <TopLine Value="79"/>
     515        <CursorPos X="1" Y="92"/>
    499516        <UsageCount Value="11"/>
    500517        <Loaded Value="True"/>
    501       </Unit51>
     518      </Unit52>
     519      <Unit53>
     520        <Filename Value="E:\Programy\Lazarus\fpc\2.4.0\source\rtl\objpas\sysutils\datih.inc"/>
     521        <EditorIndex Value="3"/>
     522        <WindowIndex Value="0"/>
     523        <TopLine Value="126"/>
     524        <CursorPos X="89" Y="147"/>
     525        <UsageCount Value="10"/>
     526        <Loaded Value="True"/>
     527      </Unit53>
    502528    </Units>
    503     <JumpHistory Count="30" HistoryIndex="29">
     529    <JumpHistory Count="30" HistoryIndex="27">
    504530      <Position1>
    505         <Filename Value="E:\Programy\Lazarus\lcl\controls.pp"/>
    506         <Caret Line="1230" Column="35" TopLine="1217"/>
     531        <Filename Value="E:\Programy\Lazarus\lcl\include\wincontrol.inc"/>
     532        <Caret Line="23" Column="67" TopLine="20"/>
    507533      </Position1>
    508534      <Position2>
    509         <Filename Value="UMainForm.pas"/>
    510         <Caret Line="84" Column="61" TopLine="71"/>
     535        <Filename Value="E:\Programy\Lazarus\lcl\include\wincontrol.inc"/>
     536        <Caret Line="5238" Column="13" TopLine="5225"/>
    511537      </Position2>
    512538      <Position3>
    513         <Filename Value="UMainForm.pas"/>
    514         <Caret Line="85" Column="17" TopLine="71"/>
     539        <Filename Value="E:\Programy\Lazarus\lcl\include\wincontrol.inc"/>
     540        <Caret Line="5242" Column="35" TopLine="5225"/>
    515541      </Position3>
    516542      <Position4>
    517         <Filename Value="UMainForm.pas"/>
    518         <Caret Line="84" Column="58" TopLine="71"/>
     543        <Filename Value="E:\Programy\Lazarus\lcl\include\wincontrol.inc"/>
     544        <Caret Line="5" Column="64" TopLine="1"/>
    519545      </Position4>
    520546      <Position5>
    521         <Filename Value="E:\Programy\Lazarus\lcl\extctrls.pp"/>
    522         <Caret Line="305" Column="18" TopLine="292"/>
     547        <Filename Value="E:\Programy\Lazarus\lcl\include\wincontrol.inc"/>
     548        <Caret Line="5238" Column="13" TopLine="5225"/>
    523549      </Position5>
    524550      <Position6>
    525         <Filename Value="UMainForm.pas"/>
    526         <Caret Line="84" Column="58" TopLine="71"/>
     551        <Filename Value="E:\Programy\Lazarus\lcl\include\wincontrol.inc"/>
     552        <Caret Line="6" Column="55" TopLine="1"/>
    527553      </Position6>
    528554      <Position7>
    529         <Filename Value="UMainForm.pas"/>
    530         <Caret Line="85" Column="19" TopLine="72"/>
     555        <Filename Value="E:\Programy\Lazarus\lcl\include\wincontrol.inc"/>
     556        <Caret Line="5228" Column="33" TopLine="5215"/>
    531557      </Position7>
    532558      <Position8>
    533         <Filename Value="UMainForm.pas"/>
    534         <Caret Line="43" Column="16" TopLine="32"/>
     559        <Filename Value="E:\Programy\Lazarus\lcl\include\wincontrol.inc"/>
     560        <Caret Line="5233" Column="31" TopLine="5215"/>
    535561      </Position8>
    536562      <Position9>
    537         <Filename Value="UMainForm.pas"/>
    538         <Caret Line="84" Column="65" TopLine="72"/>
     563        <Filename Value="E:\Programy\Lazarus\lcl\include\wincontrol.inc"/>
     564        <Caret Line="5238" Column="13" TopLine="5215"/>
    539565      </Position9>
    540566      <Position10>
    541         <Filename Value="UMainForm.pas"/>
    542         <Caret Line="85" Column="16" TopLine="72"/>
     567        <Filename Value="E:\Programy\Lazarus\lcl\include\wincontrol.inc"/>
     568        <Caret Line="5242" Column="35" TopLine="5229"/>
    543569      </Position10>
    544570      <Position11>
    545         <Filename Value="UMainForm.pas"/>
    546         <Caret Line="45" Column="15" TopLine="32"/>
     571        <Filename Value="E:\Programy\Lazarus\lcl\include\wincontrol.inc"/>
     572        <Caret Line="5245" Column="33" TopLine="5229"/>
    547573      </Position11>
    548574      <Position12>
    549         <Filename Value="UMainForm.pas"/>
    550         <Caret Line="85" Column="22" TopLine="72"/>
     575        <Filename Value="..\UCoolDocking.pas"/>
     576        <Caret Line="1032" Column="39" TopLine="1017"/>
    551577      </Position12>
    552578      <Position13>
    553579        <Filename Value="UMainForm.pas"/>
    554         <Caret Line="46" Column="30" TopLine="33"/>
     580        <Caret Line="62" Column="68" TopLine="60"/>
    555581      </Position13>
    556582      <Position14>
    557583        <Filename Value="UMainForm.pas"/>
    558         <Caret Line="45" Column="50" TopLine="32"/>
     584        <Caret Line="95" Column="3" TopLine="92"/>
    559585      </Position14>
    560586      <Position15>
    561         <Filename Value="UMainForm.pas"/>
    562         <Caret Line="46" Column="30" TopLine="33"/>
     587        <Filename Value="..\UCoolDocking.pas"/>
     588        <Caret Line="1020" Column="1" TopLine="1015"/>
    563589      </Position15>
    564590      <Position16>
    565         <Filename Value="UMainForm.pas"/>
    566         <Caret Line="85" Column="22" TopLine="72"/>
     591        <Filename Value="..\UCoolDocking.pas"/>
     592        <Caret Line="1020" Column="14" TopLine="1015"/>
    567593      </Position16>
    568594      <Position17>
    569595        <Filename Value="UMainForm.pas"/>
    570         <Caret Line="46" Column="30" TopLine="33"/>
     596        <Caret Line="92" Column="1" TopLine="87"/>
    571597      </Position17>
    572598      <Position18>
    573         <Filename Value="..\UCoolDocking.pas"/>
    574         <Caret Line="195" Column="15" TopLine="182"/>
     599        <Filename Value="UMainForm.pas"/>
     600        <Caret Line="34" Column="1" TopLine="21"/>
    575601      </Position18>
    576602      <Position19>
    577603        <Filename Value="UMainForm.pas"/>
    578         <Caret Line="85" Column="28" TopLine="72"/>
     604        <Caret Line="91" Column="1" TopLine="78"/>
    579605      </Position19>
    580606      <Position20>
    581607        <Filename Value="..\UCoolDocking.pas"/>
    582         <Caret Line="119" Column="34" TopLine="112"/>
     608        <Caret Line="1020" Column="49" TopLine="1007"/>
    583609      </Position20>
    584610      <Position21>
    585611        <Filename Value="..\UCoolDocking.pas"/>
    586         <Caret Line="443" Column="18" TopLine="431"/>
     612        <Caret Line="1022" Column="1" TopLine="1013"/>
    587613      </Position21>
    588614      <Position22>
    589         <Filename Value="UMainForm.pas"/>
    590         <Caret Line="76" Column="24" TopLine="65"/>
     615        <Filename Value="..\UCoolDocking.pas"/>
     616        <Caret Line="1020" Column="45" TopLine="1007"/>
    591617      </Position22>
    592618      <Position23>
    593         <Filename Value="UMainForm.pas"/>
    594         <Caret Line="75" Column="24" TopLine="64"/>
     619        <Filename Value="..\UCoolDocking.pas"/>
     620        <Caret Line="13" Column="11" TopLine="1"/>
    595621      </Position23>
    596622      <Position24>
    597         <Filename Value="UMainForm.pas"/>
    598         <Caret Line="74" Column="24" TopLine="63"/>
     623        <Filename Value="..\UCoolDocking.pas"/>
     624        <Caret Line="1021" Column="68" TopLine="1008"/>
    599625      </Position24>
    600626      <Position25>
    601         <Filename Value="UMainForm.pas"/>
    602         <Caret Line="73" Column="24" TopLine="62"/>
     627        <Filename Value="..\UCoolDocking.pas"/>
     628        <Caret Line="1027" Column="1" TopLine="1008"/>
    603629      </Position25>
    604630      <Position26>
    605         <Filename Value="UMainForm.pas"/>
    606         <Caret Line="72" Column="24" TopLine="61"/>
     631        <Filename Value="..\UCoolDocking.pas"/>
     632        <Caret Line="1024" Column="9" TopLine="1008"/>
    607633      </Position26>
    608634      <Position27>
    609         <Filename Value="UMainForm.pas"/>
    610         <Caret Line="71" Column="24" TopLine="60"/>
     635        <Filename Value="E:\Programy\Lazarus\fpc\2.4.0\source\rtl\objpas\sysutils\datih.inc"/>
     636        <Caret Line="147" Column="89" TopLine="126"/>
    611637      </Position27>
    612638      <Position28>
    613         <Filename Value="UMainForm.pas"/>
    614         <Caret Line="98" Column="1" TopLine="98"/>
     639        <Filename Value="..\UCoolDocking.pas"/>
     640        <Caret Line="904" Column="77" TopLine="899"/>
    615641      </Position28>
    616642      <Position29>
    617         <Filename Value="UMainForm.pas"/>
    618         <Caret Line="35" Column="1" TopLine="22"/>
     643        <Filename Value="..\UCoolDocking.pas"/>
     644        <Caret Line="1027" Column="14" TopLine="1018"/>
    619645      </Position29>
    620646      <Position30>
    621         <Filename Value="UMainForm.pas"/>
    622         <Caret Line="109" Column="1" TopLine="86"/>
     647        <Filename Value="..\UCoolDocking.pas"/>
     648        <Caret Line="70" Column="5" TopLine="57"/>
    623649      </Position30>
    624650    </JumpHistory>
  • Docking/CoolDocking/Demo/UMainForm.pas

    r60 r61  
    6565  NewDockForm.ManualDock(Panel1);
    6666 // NewDockForm.ManualDock(Panel1);
    67   ConjoinedDockForm1 := TCoolDockManager(Panel1.DockManager).CreateContainer(alRight);
    68   ConjoinedDockForm1.Name := 'Model';;
    69   TCoolDockManager(ConjoinedDockForm1.Panel.DockManager).TabsPos := hpLeft;
     67  //ConjoinedDockForm1 := TCoolDockManager(Panel1.DockManager).CreateContainer(alRight);
     68  //ConjoinedDockForm1.Name := 'Model';;
     69  //TCoolDockManager(ConjoinedDockForm1.Panel.DockManager).TabsPos := hpLeft;
    7070  //ConjoinedDockForm1.ManualDock(Panel1);
    71   TCoolDockManager(ConjoinedDockForm1.Panel.DockManager).DockStyle := dsTabs;
    72   NewDockForm.ManualDock(ConjoinedDockForm1.Panel);
     71  //TCoolDockManager(ConjoinedDockForm1.Panel.DockManager).DockStyle := dsTabs;
     72  (*NewDockForm.ManualDock(ConjoinedDockForm1.Panel);
    7373  NewDockForm.ManualDock(ConjoinedDockForm1.Panel);
    7474  NewDockForm.ManualDock(TForm(DockForms[0]));
    7575  NewDockForm.ManualDock(TForm(DockForms[0]));
    76   NewDockForm.ManualDock(TForm(DockForms[0]));
     76  NewDockForm.ManualDock(TForm(DockForms[0]));*)
    7777//  TCustomDockManager(TDockForm(DockForms[0]).DockManager).DockStyle := dsTabs;
    7878end;
  • Docking/CoolDocking/UCoolDocking.pas

    r60 r61  
    1010  Classes, SysUtils, Controls, LCLType, LMessages, Graphics, StdCtrls,
    1111  Buttons, ExtCtrls, Contnrs, Forms, ComCtrls, Dialogs, Menus, FileUtil,
    12   UCoolDockCustomize, DOM, XMLWrite, XMLRead, UCoolDockWindowList;
     12  UCoolDockCustomize, DOM, XMLWrite, XMLRead, UCoolDockWindowList,
     13  DateUtils;
    1314
    1415const
     
    3839
    3940  TCoolDockHeader = class(TPanel)
     41  private
     42    procedure CloseButtonClick(Sender: TObject);
     43    procedure DrawGrabber(Canvas: TCanvas; AControl: TControl);
     44  public
    4045    CloseButton: TSpeedButton;
    4146    Title: TLabel;
     
    4550    constructor Create(TheOwner: TComponent); override;
    4651    destructor Destroy; override;
    47   private
    48     procedure CloseButtonClick(Sender: TObject);
    49     procedure DrawGrabber(Canvas: TCanvas; AControl: TControl);
    5052  end;
    5153
     
    158160    FCoolDockCustomize: TCoolDockCustomize;
    159161    FDefaultHeaderPos: THeaderPos;
     162    FDefaultTabsPos: THeaderPos;
    160163    FShowIcons: Boolean;
    161164    FTabsEnabled: Boolean;
     
    177180  published
    178181    property TabsEnabled: Boolean read FTabsEnabled write SetTabsEnabled;
     182    property DefaultTabsPos: THeaderPos read FDefaultTabsPos
     183      write FDefaultTabsPos;
    179184    property DefaultHeaderPos: THeaderPos read FDefaultHeaderPos
    180185      write FDefaultHeaderPos;
     
    194199    procedure SetFloatable(const AValue: Boolean);
    195200    procedure SetMaster(const AValue: TCoolDockMaster);
     201    procedure SetPanel(const AValue: TPanel);
     202  public
    196203    constructor Create(AOwner: TComponent); override;
    197204    destructor Destroy; override;
    198     procedure SetPanel(const AValue: TPanel);
    199205  published
    200206    property Dockable: Boolean read FDockable
     
    716722      TCoolDockClientPanel(FDockPanels[I]).ClientAreaPanel.Parent := TCoolDockClientPanel(FDockPanels[I]);
    717723      TCoolDockClientPanel(FDockPanels[I]).ClientAreaPanel.Visible := True;
     724      TCoolDockClientPanel(FDockPanels[I]).Control.Visible := True;
    718725    end;
    719726  end;
     
    725732  if FMaster = AValue then Exit;
    726733  FMaster := AValue;
     734  TabsPos := AValue.DefaultTabsPos;
    727735end;
    728736
     
    792800  for I := 0 to FDockPanels.Count - 1 do begin
    793801    TCoolDockClientPanel(FDockPanels[I]).ClientAreaPanel.Visible := False;
     802    TCoolDockClientPanel(FDockPanels[I]).Control.Visible := False;
    794803  end;
    795804  if (TabControl.TabIndex <> -1) and (FDockPanels.Count > TabControl.TabIndex) then begin
    796805    with TCoolDockClientPanel(FDockPanels[TabControl.TabIndex]), ClientAreaPanel do begin
     806      Control.Show;
    797807      if AutoHide then begin
    798808        Parent := nil;
     
    892902begin
    893903  if (Button = mbLeft) and (TabControl.TabIndex <> -1) then begin
     904    TCoolDockClientPanel(FDockPanels[TabControl.TabIndex]).ClientAreaPanel.DockSite := False;
    894905    DragManager.DragStart(TCoolDockClientPanel(FDockPanels[TabControl.TabIndex]).Control, False, 1);
    895906  end;
     
    911922
    912923procedure TCoolDockClientPanel.VisibleChange(Sender: TObject);
    913 begin
    914   if Assigned(Control) then begin
     924var
     925  Visible: Boolean;
     926begin
     927  (*if Assigned(Control) then begin
     928    Visible := Control.Visible;
    915929    if Assigned(ClientAreaPanel) then
    916       ClientAreaPanel.Visible := Control.Visible;
     930      ClientAreaPanel.Visible := Visible;
    917931    if Assigned(Splitter) then
    918       Splitter.Visible := Control.Visible;
     932      Splitter.Visible := Visible;
    919933    OwnerDockManager.UpdateClientSize;
    920   end;
     934  end;*)
    921935end;
    922936
     
    936950begin
    937951  inherited;
     952  ShowHeader := True;
    938953  Header := TCoolDockHeader.Create(Self);
    939954  with Header do begin
     
    964979  BevelInner := bvNone;
    965980  BevelOuter := bvNone;
    966   ShowHeader := True;
    967981  AutoHide := False;
    968982  HeaderPos := hpTop;
     
    9891003  R: TRect;
    9901004begin
     1005  if (csDestroyingHandle in ControlState) then
    9911006  if Assigned(Control) then begin
    9921007    R := Control.ClientRect;
     
    10091024  end;
    10101025  if (Button = mbLeft) then begin
    1011     DragManager.DragStart(Control, False, 1);
     1026    //(Control as TWinControl).DockSite := False;
     1027    ClientAreaPanel.DockSite := False;
     1028    (Control as TWinControl).BeginDrag(True);
     1029    //DragManager.DragStart(Control, False, 1);
    10121030  end;
    10131031end;
     
    11791197
    11801198destructor TCoolDockMaster.Destroy;
    1181 begin
     1199var
     1200  I: Integer;
     1201begin
     1202  // Assigning nil to Client Master property cause unregistring client from list
     1203  for I := FClients.Count - 1 downto 0 do
     1204    TCoolDockClient(FClients[I]).Master := nil;
    11821205  FClients.Free;
    11831206  Customize := nil;
     
    11881211begin
    11891212  if Assigned(Client) then
    1190     if FClients.IndexOf(Client) <> -1 then begin
     1213    if FClients.IndexOf(Client) = -1 then begin
    11911214      FClients.Add(Client);
    11921215      Client.Master := Self;
     
    13571380    DragKind := dkDock;
    13581381    DragMode := dmAutomatic;
     1382    DockSite := True;
    13591383  end else begin
    13601384    DragKind := dkDrag;
    13611385    DragMode := dmManual;
     1386    DockSite := False;
    13621387  end;
    13631388end;
     
    13801405        DragKind := dkDock;
    13811406        DragMode := dmAutomatic;
     1407        DockSite := True;
    13821408      end;
    1383       DockSite := True;
    13841409      UseDockManager := True;
    13851410      DockManager := TCoolDockManager.Create(TWinControl(AOwner));
Note: See TracChangeset for help on using the changeset viewer.