Changeset 182 for Docking


Ignore:
Timestamp:
Mar 9, 2011, 2:11:40 PM (13 years ago)
Author:
george
Message:
  • Added: Default layout initialization in Demo IDE.
  • Fixed: Tab position switching through popup menu.
Location:
Docking/CoolDocking
Files:
12 edited

Legend:

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

    r181 r182  
    4747      </Item4>
    4848    </RequiredPackages>
    49     <Units Count="42">
     49    <Units Count="53">
    5050      <Unit0>
    5151        <Filename Value="IDE.lpr"/>
    5252        <IsPartOfProject Value="True"/>
    5353        <UnitName Value="IDE"/>
    54         <UsageCount Value="76"/>
     54        <UsageCount Value="81"/>
    5555      </Unit0>
    5656      <Unit1>
     
    6060        <ResourceBaseClass Value="Form"/>
    6161        <UnitName Value="UMainForm"/>
    62         <EditorIndex Value="5"/>
    63         <WindowIndex Value="0"/>
    64         <TopLine Value="1"/>
    65         <CursorPos X="21" Y="13"/>
    66         <UsageCount Value="76"/>
    67         <Loaded Value="True"/>
     62        <EditorIndex Value="8"/>
     63        <WindowIndex Value="0"/>
     64        <TopLine Value="138"/>
     65        <CursorPos X="18" Y="150"/>
     66        <UsageCount Value="81"/>
     67        <Loaded Value="True"/>
     68        <LoadedDesigner Value="True"/>
    6869      </Unit1>
    6970      <Unit2>
     
    7677        <TopLine Value="1"/>
    7778        <CursorPos X="12" Y="16"/>
    78         <UsageCount Value="76"/>
     79        <UsageCount Value="81"/>
    7980      </Unit2>
    8081      <Unit3>
     
    8788        <TopLine Value="1"/>
    8889        <CursorPos X="3" Y="16"/>
    89         <UsageCount Value="76"/>
     90        <UsageCount Value="81"/>
    9091      </Unit3>
    9192      <Unit4>
     
    9899        <TopLine Value="1"/>
    99100        <CursorPos X="15" Y="10"/>
    100         <UsageCount Value="76"/>
     101        <UsageCount Value="81"/>
    101102      </Unit4>
    102103      <Unit5>
    103104        <Filename Value="E:\Projekty2\FreePascalManager\trunk\Instance\1\Lazarus\lcl\include\control.inc"/>
    104         <WindowIndex Value="0"/>
    105         <TopLine Value="1070"/>
    106         <CursorPos X="1" Y="1083"/>
    107         <UsageCount Value="37"/>
     105        <EditorIndex Value="3"/>
     106        <WindowIndex Value="0"/>
     107        <TopLine Value="1672"/>
     108        <CursorPos X="1" Y="1685"/>
     109        <UsageCount Value="38"/>
     110        <Loaded Value="True"/>
    108111      </Unit5>
    109112      <Unit6>
     
    116119        <TopLine Value="1"/>
    117120        <CursorPos X="20" Y="16"/>
    118         <UsageCount Value="76"/>
     121        <UsageCount Value="81"/>
    119122      </Unit6>
    120123      <Unit7>
    121124        <Filename Value="E:\Projekty2\FreePascalManager\trunk\Instance\1\Lazarus\lcl\include\customform.inc"/>
    122         <EditorIndex Value="12"/>
     125        <EditorIndex Value="21"/>
    123126        <WindowIndex Value="0"/>
    124127        <TopLine Value="2822"/>
    125128        <CursorPos X="1" Y="2835"/>
    126         <UsageCount Value="38"/>
     129        <UsageCount Value="41"/>
    127130        <Loaded Value="True"/>
    128131      </Unit7>
     
    136139        <TopLine Value="1"/>
    137140        <CursorPos X="7" Y="16"/>
    138         <UsageCount Value="76"/>
     141        <UsageCount Value="81"/>
    139142      </Unit8>
    140143      <Unit9>
     
    147150        <TopLine Value="1"/>
    148151        <CursorPos X="12" Y="15"/>
    149         <UsageCount Value="76"/>
     152        <UsageCount Value="81"/>
    150153      </Unit9>
    151154      <Unit10>
     
    158161        <TopLine Value="1"/>
    159162        <CursorPos X="21" Y="4"/>
    160         <UsageCount Value="76"/>
     163        <UsageCount Value="81"/>
    161164      </Unit10>
    162165      <Unit11>
     
    169172        <TopLine Value="1"/>
    170173        <CursorPos X="12" Y="16"/>
    171         <UsageCount Value="76"/>
     174        <UsageCount Value="81"/>
    172175      </Unit11>
    173176      <Unit12>
     
    180183        <TopLine Value="1"/>
    181184        <CursorPos X="12" Y="17"/>
    182         <UsageCount Value="76"/>
     185        <UsageCount Value="81"/>
    183186      </Unit12>
    184187      <Unit13>
     
    191194        <TopLine Value="1"/>
    192195        <CursorPos X="12" Y="16"/>
    193         <UsageCount Value="76"/>
     196        <UsageCount Value="81"/>
    194197      </Unit13>
    195198      <Unit14>
     
    202205        <TopLine Value="1"/>
    203206        <CursorPos X="41" Y="17"/>
    204         <UsageCount Value="74"/>
     207        <UsageCount Value="79"/>
    205208      </Unit14>
    206209      <Unit15>
     
    209212        <EditorIndex Value="0"/>
    210213        <WindowIndex Value="0"/>
    211         <TopLine Value="1"/>
    212         <CursorPos X="50" Y="179"/>
    213         <UsageCount Value="36"/>
     214        <TopLine Value="87"/>
     215        <CursorPos X="34" Y="100"/>
     216        <UsageCount Value="39"/>
    214217        <Loaded Value="True"/>
    215218      </Unit15>
     
    217220        <Filename Value="..\..\UCoolDockLayout.pas"/>
    218221        <UnitName Value="UCoolDockLayout"/>
    219         <IsVisibleTab Value="True"/>
    220         <EditorIndex Value="6"/>
    221         <WindowIndex Value="0"/>
    222         <TopLine Value="376"/>
    223         <CursorPos X="1" Y="383"/>
    224         <UsageCount Value="36"/>
     222        <EditorIndex Value="9"/>
     223        <WindowIndex Value="0"/>
     224        <TopLine Value="379"/>
     225        <CursorPos X="101" Y="394"/>
     226        <UsageCount Value="39"/>
    225227        <Loaded Value="True"/>
    226228      </Unit16>
    227229      <Unit17>
    228230        <Filename Value="E:\Projekty2\FreePascalManager\trunk\Instance\1\FPC\rtl\objpas\classes\classesh.inc"/>
    229         <EditorIndex Value="11"/>
     231        <EditorIndex Value="20"/>
    230232        <WindowIndex Value="0"/>
    231233        <TopLine Value="1638"/>
    232234        <CursorPos X="17" Y="1651"/>
    233         <UsageCount Value="12"/>
     235        <UsageCount Value="15"/>
    234236        <Loaded Value="True"/>
    235237      </Unit17>
     
    240242        <TopLine Value="70"/>
    241243        <CursorPos X="21" Y="83"/>
    242         <UsageCount Value="10"/>
     244        <UsageCount Value="9"/>
    243245      </Unit18>
    244246      <Unit19>
     
    247249        <TopLine Value="220"/>
    248250        <CursorPos X="16" Y="233"/>
    249         <UsageCount Value="10"/>
     251        <UsageCount Value="9"/>
    250252      </Unit19>
    251253      <Unit20>
     
    263265        <TopLine Value="34"/>
    264266        <CursorPos X="11" Y="47"/>
    265         <UsageCount Value="10"/>
     267        <UsageCount Value="9"/>
    266268      </Unit21>
    267269      <Unit22>
     
    279281        <Filename Value="E:\Projekty2\FreePascalManager\trunk\Instance\1\Lazarus\lcl\forms.pp"/>
    280282        <UnitName Value="Forms"/>
    281         <EditorIndex Value="8"/>
     283        <EditorIndex Value="14"/>
    282284        <WindowIndex Value="0"/>
    283285        <TopLine Value="776"/>
    284286        <CursorPos X="3" Y="789"/>
    285         <UsageCount Value="13"/>
     287        <UsageCount Value="16"/>
    286288        <Loaded Value="True"/>
    287289      </Unit23>
     
    292294        <TopLine Value="835"/>
    293295        <CursorPos X="3" Y="837"/>
    294         <UsageCount Value="7"/>
     296        <UsageCount Value="6"/>
    295297      </Unit24>
    296298      <Unit25>
     
    299301        <TopLine Value="913"/>
    300302        <CursorPos X="1" Y="930"/>
    301         <UsageCount Value="29"/>
     303        <UsageCount Value="28"/>
    302304      </Unit25>
    303305      <Unit26>
     
    306308        <TopLine Value="91"/>
    307309        <CursorPos X="1" Y="104"/>
    308         <UsageCount Value="6"/>
     310        <UsageCount Value="10"/>
    309311      </Unit26>
    310312      <Unit27>
     
    313315        <TopLine Value="239"/>
    314316        <CursorPos X="1" Y="252"/>
    315         <UsageCount Value="6"/>
     317        <UsageCount Value="10"/>
    316318      </Unit27>
    317319      <Unit28>
    318320        <Filename Value="E:\Projekty2\FreePascalManager\trunk\Instance\1\Lazarus\lcl\controls.pp"/>
    319321        <UnitName Value="Controls"/>
    320         <EditorIndex Value="9"/>
    321         <WindowIndex Value="0"/>
    322         <TopLine Value="2000"/>
    323         <CursorPos X="22" Y="2013"/>
    324         <UsageCount Value="13"/>
     322        <EditorIndex Value="15"/>
     323        <WindowIndex Value="0"/>
     324        <TopLine Value="432"/>
     325        <CursorPos X="15" Y="446"/>
     326        <UsageCount Value="16"/>
    325327        <Loaded Value="True"/>
    326328      </Unit28>
    327329      <Unit29>
    328330        <Filename Value="E:\Projekty2\FreePascalManager\trunk\Instance\1\Lazarus\lcl\include\wincontrol.inc"/>
    329         <WindowIndex Value="0"/>
    330         <TopLine Value="6327"/>
    331         <CursorPos X="18" Y="6332"/>
    332         <UsageCount Value="11"/>
     331        <EditorIndex Value="2"/>
     332        <WindowIndex Value="0"/>
     333        <TopLine Value="5229"/>
     334        <CursorPos X="1" Y="5242"/>
     335        <UsageCount Value="12"/>
     336        <Loaded Value="True"/>
    333337      </Unit29>
    334338      <Unit30>
     
    345349        <ResourceBaseClass Value="Form"/>
    346350        <UnitName Value="UCoolDockCustomize"/>
    347         <EditorIndex Value="4"/>
     351        <EditorIndex Value="7"/>
    348352        <WindowIndex Value="0"/>
    349353        <TopLine Value="36"/>
    350354        <CursorPos X="3" Y="49"/>
    351         <UsageCount Value="31"/>
     355        <UsageCount Value="34"/>
    352356        <Loaded Value="True"/>
    353357      </Unit31>
     
    355359        <Filename Value="..\..\UCoolDockCommon.pas"/>
    356360        <UnitName Value="UCoolDockCommon"/>
    357         <EditorIndex Value="7"/>
    358         <WindowIndex Value="0"/>
    359         <TopLine Value="1"/>
    360         <CursorPos X="14" Y="33"/>
    361         <UsageCount Value="28"/>
     361        <EditorIndex Value="13"/>
     362        <WindowIndex Value="0"/>
     363        <TopLine Value="1"/>
     364        <CursorPos X="3" Y="11"/>
     365        <UsageCount Value="31"/>
    362366        <Loaded Value="True"/>
    363367      </Unit32>
     
    365369        <Filename Value="..\..\UCoolDockPopupMenu.pas"/>
    366370        <UnitName Value="UCoolDockPopupMenu"/>
    367         <EditorIndex Value="3"/>
    368         <WindowIndex Value="0"/>
    369         <TopLine Value="29"/>
    370         <CursorPos X="55" Y="37"/>
    371         <UsageCount Value="30"/>
     371        <EditorIndex Value="6"/>
     372        <WindowIndex Value="0"/>
     373        <TopLine Value="223"/>
     374        <CursorPos X="85" Y="202"/>
     375        <UsageCount Value="33"/>
    372376        <Loaded Value="True"/>
    373377      </Unit33>
     
    392396        <TopLine Value="224"/>
    393397        <CursorPos X="29" Y="238"/>
    394         <UsageCount Value="12"/>
     398        <UsageCount Value="11"/>
    395399      </Unit36>
    396400      <Unit37>
     
    399403        <TopLine Value="7"/>
    400404        <CursorPos X="3" Y="20"/>
    401         <UsageCount Value="11"/>
     405        <UsageCount Value="10"/>
    402406      </Unit37>
    403407      <Unit38>
     
    411415        <Filename Value="E:\Projekty2\FreePascalManager\trunk\Instance\1\Lazarus\lcl\lclclasses.pp"/>
    412416        <UnitName Value="LCLClasses"/>
    413         <EditorIndex Value="10"/>
     417        <EditorIndex Value="19"/>
    414418        <WindowIndex Value="0"/>
    415419        <TopLine Value="32"/>
    416420        <CursorPos X="20" Y="45"/>
    417         <UsageCount Value="11"/>
     421        <UsageCount Value="14"/>
    418422        <Loaded Value="True"/>
    419423      </Unit39>
     
    421425        <Filename Value="..\..\UCoolDockStyle.pas"/>
    422426        <UnitName Value="UCoolDockStyle"/>
    423         <EditorIndex Value="2"/>
    424         <WindowIndex Value="0"/>
    425         <TopLine Value="1"/>
    426         <CursorPos X="1" Y="1"/>
    427         <UsageCount Value="10"/>
     427        <EditorIndex Value="5"/>
     428        <WindowIndex Value="0"/>
     429        <TopLine Value="9"/>
     430        <CursorPos X="15" Y="22"/>
     431        <UsageCount Value="13"/>
    428432        <Loaded Value="True"/>
    429433      </Unit40>
     
    431435        <Filename Value="..\..\UCoolDockClientPanel.pas"/>
    432436        <UnitName Value="UCoolDockClientPanel"/>
     437        <EditorIndex Value="4"/>
     438        <WindowIndex Value="0"/>
     439        <TopLine Value="210"/>
     440        <CursorPos X="3" Y="215"/>
     441        <UsageCount Value="13"/>
     442        <Loaded Value="True"/>
     443      </Unit41>
     444      <Unit42>
     445        <Filename Value="E:\Projekty2\FreePascalManager\trunk\Instance\1\Lazarus\lcl\lclproc.pas"/>
     446        <UnitName Value="LCLProc"/>
     447        <WindowIndex Value="0"/>
     448        <TopLine Value="1531"/>
     449        <CursorPos X="33" Y="1544"/>
     450        <UsageCount Value="10"/>
     451      </Unit42>
     452      <Unit43>
     453        <Filename Value="..\..\UCoolDockStyleTabs.pas"/>
     454        <UnitName Value="UCoolDockStyleTabs"/>
     455        <IsVisibleTab Value="True"/>
     456        <EditorIndex Value="11"/>
     457        <WindowIndex Value="0"/>
     458        <TopLine Value="292"/>
     459        <CursorPos X="1" Y="305"/>
     460        <UsageCount Value="12"/>
     461        <Loaded Value="True"/>
     462      </Unit43>
     463      <Unit44>
     464        <Filename Value="E:\Projekty2\FreePascalManager\trunk\Instance\1\Lazarus\lcl\themes.pas"/>
     465        <UnitName Value="Themes"/>
     466        <WindowIndex Value="0"/>
     467        <TopLine Value="45"/>
     468        <CursorPos X="28" Y="558"/>
     469        <UsageCount Value="10"/>
     470      </Unit44>
     471      <Unit45>
     472        <Filename Value="E:\Projekty2\FreePascalManager\trunk\Instance\1\Lazarus\lcl\interfaces\win32\win32wsforms.pp"/>
     473        <UnitName Value="Win32WSForms"/>
     474        <WindowIndex Value="0"/>
     475        <TopLine Value="344"/>
     476        <CursorPos X="1" Y="357"/>
     477        <UsageCount Value="10"/>
     478      </Unit45>
     479      <Unit46>
     480        <Filename Value="E:\Projekty2\FreePascalManager\trunk\Instance\1\Lazarus\lcl\interfaces\win32\win32callback.inc"/>
     481        <WindowIndex Value="0"/>
     482        <TopLine Value="2403"/>
     483        <CursorPos X="74" Y="2413"/>
     484        <UsageCount Value="10"/>
     485      </Unit46>
     486      <Unit47>
     487        <Filename Value="..\..\UCoolDockStyleRegions.pas"/>
     488        <UnitName Value="UCoolDockStyleRegions"/>
     489        <EditorIndex Value="10"/>
     490        <WindowIndex Value="0"/>
     491        <TopLine Value="99"/>
     492        <CursorPos X="1" Y="120"/>
     493        <UsageCount Value="11"/>
     494        <Loaded Value="True"/>
     495      </Unit47>
     496      <Unit48>
     497        <Filename Value="..\..\UCoolDockStylePopupTabs.pas"/>
     498        <UnitName Value="UCoolDockStylePopupTabs"/>
     499        <EditorIndex Value="12"/>
     500        <WindowIndex Value="0"/>
     501        <TopLine Value="1"/>
     502        <CursorPos X="26" Y="12"/>
     503        <UsageCount Value="11"/>
     504        <Loaded Value="True"/>
     505      </Unit48>
     506      <Unit49>
     507        <Filename Value="E:\Projekty2\FreePascalManager\trunk\Instance\1\Lazarus\lcl\include\dragmanager.inc"/>
    433508        <EditorIndex Value="1"/>
    434509        <WindowIndex Value="0"/>
    435         <TopLine Value="1"/>
    436         <CursorPos X="6" Y="1"/>
    437         <UsageCount Value="10"/>
    438         <Loaded Value="True"/>
    439       </Unit41>
     510        <TopLine Value="762"/>
     511        <CursorPos X="1" Y="775"/>
     512        <UsageCount Value="11"/>
     513        <Loaded Value="True"/>
     514      </Unit49>
     515      <Unit50>
     516        <Filename Value="E:\Projekty2\FreePascalManager\trunk\Instance\1\Lazarus\lcl\include\dragobject.inc"/>
     517        <EditorIndex Value="16"/>
     518        <WindowIndex Value="0"/>
     519        <TopLine Value="148"/>
     520        <CursorPos X="32" Y="160"/>
     521        <UsageCount Value="11"/>
     522        <Loaded Value="True"/>
     523      </Unit50>
     524      <Unit51>
     525        <Filename Value="E:\Projekty2\FreePascalManager\trunk\Instance\1\Lazarus\lcl\include\lclintfh.inc"/>
     526        <EditorIndex Value="17"/>
     527        <WindowIndex Value="0"/>
     528        <TopLine Value="53"/>
     529        <CursorPos X="11" Y="66"/>
     530        <UsageCount Value="11"/>
     531        <Loaded Value="True"/>
     532      </Unit51>
     533      <Unit52>
     534        <Filename Value="E:\Projekty2\FreePascalManager\trunk\Instance\1\Lazarus\lcl\include\lclintf.inc"/>
     535        <EditorIndex Value="18"/>
     536        <WindowIndex Value="0"/>
     537        <TopLine Value="141"/>
     538        <CursorPos X="3" Y="143"/>
     539        <UsageCount Value="11"/>
     540        <Loaded Value="True"/>
     541      </Unit52>
    440542    </Units>
    441543    <JumpHistory Count="30" HistoryIndex="29">
    442544      <Position1>
    443         <Filename Value="..\..\UCoolDockLayout.pas"/>
    444         <Caret Line="390" Column="27" TopLine="377"/>
     545        <Filename Value="..\..\UCoolDocking.pas"/>
     546        <Caret Line="367" Column="12" TopLine="358"/>
    445547      </Position1>
    446548      <Position2>
    447         <Filename Value="..\..\UCoolDockLayout.pas"/>
    448         <Caret Line="382" Column="1" TopLine="377"/>
     549        <Filename Value="..\..\UCoolDocking.pas"/>
     550        <Caret Line="318" Column="20" TopLine="318"/>
    449551      </Position2>
    450552      <Position3>
    451         <Filename Value="..\..\UCoolDockLayout.pas"/>
    452         <Caret Line="383" Column="1" TopLine="377"/>
     553        <Filename Value="..\..\UCoolDockStyleRegions.pas"/>
     554        <Caret Line="115" Column="1" TopLine="94"/>
    453555      </Position3>
    454556      <Position4>
    455         <Filename Value="..\..\UCoolDockLayout.pas"/>
    456         <Caret Line="391" Column="1" TopLine="377"/>
     557        <Filename Value="..\..\UCoolDocking.pas"/>
     558        <Caret Line="334" Column="1" TopLine="318"/>
    457559      </Position4>
    458560      <Position5>
    459         <Filename Value="..\..\UCoolDockLayout.pas"/>
    460         <Caret Line="392" Column="1" TopLine="377"/>
     561        <Filename Value="..\..\UCoolDocking.pas"/>
     562        <Caret Line="336" Column="1" TopLine="318"/>
    461563      </Position5>
    462564      <Position6>
    463         <Filename Value="..\..\UCoolDockLayout.pas"/>
    464         <Caret Line="398" Column="1" TopLine="377"/>
     565        <Filename Value="..\..\UCoolDocking.pas"/>
     566        <Caret Line="334" Column="1" TopLine="318"/>
    465567      </Position6>
    466568      <Position7>
    467         <Filename Value="..\..\UCoolDockLayout.pas"/>
    468         <Caret Line="399" Column="1" TopLine="378"/>
     569        <Filename Value="..\..\UCoolDocking.pas"/>
     570        <Caret Line="310" Column="13" TopLine="291"/>
    469571      </Position7>
    470572      <Position8>
    471         <Filename Value="..\..\UCoolDockLayout.pas"/>
    472         <Caret Line="382" Column="1" TopLine="377"/>
     573        <Filename Value="..\..\UCoolDockStyleRegions.pas"/>
     574        <Caret Line="86" Column="10" TopLine="73"/>
    473575      </Position8>
    474576      <Position9>
    475         <Filename Value="..\..\UCoolDockLayout.pas"/>
    476         <Caret Line="383" Column="1" TopLine="377"/>
     577        <Filename Value="..\..\UCoolDockStyleRegions.pas"/>
     578        <Caret Line="81" Column="20" TopLine="68"/>
    477579      </Position9>
    478580      <Position10>
    479         <Filename Value="..\..\UCoolDockLayout.pas"/>
    480         <Caret Line="384" Column="1" TopLine="377"/>
     581        <Filename Value="..\..\UCoolDockStyleRegions.pas"/>
     582        <Caret Line="82" Column="33" TopLine="68"/>
    481583      </Position10>
    482584      <Position11>
    483         <Filename Value="..\..\UCoolDockLayout.pas"/>
    484         <Caret Line="391" Column="77" TopLine="377"/>
     585        <Filename Value="..\..\UCoolDockStyleRegions.pas"/>
     586        <Caret Line="84" Column="33" TopLine="70"/>
    485587      </Position11>
    486588      <Position12>
    487         <Filename Value="..\..\UCoolDockLayout.pas"/>
    488         <Caret Line="382" Column="1" TopLine="377"/>
     589        <Filename Value="..\..\UCoolDockStyleRegions.pas"/>
     590        <Caret Line="88" Column="17" TopLine="74"/>
    489591      </Position12>
    490592      <Position13>
    491         <Filename Value="..\..\UCoolDockLayout.pas"/>
    492         <Caret Line="391" Column="1" TopLine="377"/>
     593        <Filename Value="..\..\UCoolDockStyleRegions.pas"/>
     594        <Caret Line="89" Column="85" TopLine="76"/>
    493595      </Position13>
    494596      <Position14>
    495         <Filename Value="..\..\UCoolDockLayout.pas"/>
    496         <Caret Line="392" Column="1" TopLine="377"/>
     597        <Filename Value="..\..\UCoolDockStyleRegions.pas"/>
     598        <Caret Line="90" Column="24" TopLine="76"/>
    497599      </Position14>
    498600      <Position15>
    499         <Filename Value="..\..\UCoolDockLayout.pas"/>
    500         <Caret Line="366" Column="1" TopLine="353"/>
     601        <Filename Value="..\..\UCoolDocking.pas"/>
     602        <Caret Line="336" Column="1" TopLine="323"/>
    501603      </Position15>
    502604      <Position16>
    503         <Filename Value="..\..\UCoolDockLayout.pas"/>
    504         <Caret Line="367" Column="1" TopLine="353"/>
     605        <Filename Value="..\..\UCoolDockPopupMenu.pas"/>
     606        <Caret Line="207" Column="1" TopLine="202"/>
    505607      </Position16>
    506608      <Position17>
    507         <Filename Value="..\..\UCoolDockLayout.pas"/>
    508         <Caret Line="372" Column="1" TopLine="359"/>
     609        <Filename Value="..\..\UCoolDockPopupMenu.pas"/>
     610        <Caret Line="209" Column="56" TopLine="201"/>
    509611      </Position17>
    510612      <Position18>
    511         <Filename Value="..\..\UCoolDockLayout.pas"/>
    512         <Caret Line="374" Column="1" TopLine="359"/>
     613        <Filename Value="..\..\UCoolDockPopupMenu.pas"/>
     614        <Caret Line="10" Column="36" TopLine="4"/>
    513615      </Position18>
    514616      <Position19>
    515         <Filename Value="..\..\UCoolDockLayout.pas"/>
    516         <Caret Line="376" Column="1" TopLine="362"/>
     617        <Filename Value="..\..\UCoolDockPopupMenu.pas"/>
     618        <Caret Line="61" Column="49" TopLine="55"/>
    517619      </Position19>
    518620      <Position20>
    519         <Filename Value="..\..\UCoolDockLayout.pas"/>
    520         <Caret Line="377" Column="1" TopLine="362"/>
     621        <Filename Value="..\..\UCoolDockPopupMenu.pas"/>
     622        <Caret Line="204" Column="1" TopLine="202"/>
    521623      </Position20>
    522624      <Position21>
    523         <Filename Value="..\..\UCoolDockLayout.pas"/>
    524         <Caret Line="378" Column="1" TopLine="362"/>
     625        <Filename Value="..\..\UCoolDockStyleTabs.pas"/>
     626        <Caret Line="305" Column="1" TopLine="292"/>
    525627      </Position21>
    526628      <Position22>
    527         <Filename Value="..\..\UCoolDockLayout.pas"/>
    528         <Caret Line="376" Column="21" TopLine="374"/>
     629        <Filename Value="..\..\UCoolDockPopupMenu.pas"/>
     630        <Caret Line="207" Column="66" TopLine="202"/>
    529631      </Position22>
    530632      <Position23>
    531         <Filename Value="..\..\UCoolDockLayout.pas"/>
    532         <Caret Line="383" Column="1" TopLine="374"/>
     633        <Filename Value="..\..\UCoolDockStyleTabs.pas"/>
     634        <Caret Line="305" Column="1" TopLine="292"/>
    533635      </Position23>
    534636      <Position24>
    535         <Filename Value="..\..\UCoolDockLayout.pas"/>
    536         <Caret Line="392" Column="1" TopLine="374"/>
     637        <Filename Value="..\..\UCoolDockStyleTabs.pas"/>
     638        <Caret Line="306" Column="1" TopLine="292"/>
    537639      </Position24>
    538640      <Position25>
    539         <Filename Value="..\..\UCoolDockLayout.pas"/>
    540         <Caret Line="400" Column="1" TopLine="387"/>
     641        <Filename Value="..\..\UCoolDockStyleTabs.pas"/>
     642        <Caret Line="307" Column="1" TopLine="292"/>
    541643      </Position25>
    542644      <Position26>
    543         <Filename Value="..\..\UCoolDockLayout.pas"/>
    544         <Caret Line="383" Column="1" TopLine="370"/>
     645        <Filename Value="..\..\UCoolDockStyleTabs.pas"/>
     646        <Caret Line="308" Column="1" TopLine="292"/>
    545647      </Position26>
    546648      <Position27>
    547         <Filename Value="..\..\UCoolDockLayout.pas"/>
    548         <Caret Line="384" Column="1" TopLine="370"/>
     649        <Filename Value="..\..\UCoolDockStyleTabs.pas"/>
     650        <Caret Line="315" Column="1" TopLine="294"/>
    549651      </Position27>
    550652      <Position28>
    551         <Filename Value="..\..\UCoolDockLayout.pas"/>
    552         <Caret Line="399" Column="1" TopLine="386"/>
     653        <Filename Value="..\..\UCoolDockStyleTabs.pas"/>
     654        <Caret Line="316" Column="1" TopLine="295"/>
    553655      </Position28>
    554656      <Position29>
    555         <Filename Value="..\..\UCoolDockLayout.pas"/>
    556         <Caret Line="400" Column="1" TopLine="386"/>
     657        <Filename Value="..\..\UCoolDockStyleTabs.pas"/>
     658        <Caret Line="317" Column="1" TopLine="296"/>
    557659      </Position29>
    558660      <Position30>
    559         <Filename Value="..\..\UCoolDockLayout.pas"/>
    560         <Caret Line="402" Column="1" TopLine="386"/>
     661        <Filename Value="..\..\UCoolDockPopupMenu.pas"/>
     662        <Caret Line="202" Column="85" TopLine="223"/>
    561663      </Position30>
    562664    </JumpHistory>
  • Docking/CoolDocking/Demo/IDE/UMainForm.lfm

    r181 r182  
    1313  object Panel1: TPanel
    1414    Left = 0
    15     Height = 426
    16     Top = 0
     15    Height = 400
     16    Top = 26
    1717    Width = 626
    1818    Align = alClient
    1919    BevelOuter = bvNone
    20     ClientHeight = 426
    21     ClientWidth = 626
    2220    TabOrder = 0
    23     object ToolBar1: TToolBar
    24       Left = 0
    25       Height = 26
    26       Top = 0
    27       Width = 626
    28       Caption = 'ToolBar1'
    29       Images = ImageList1
    30       ParentShowHint = False
    31       ShowHint = True
     21  end
     22  object ToolBar1: TToolBar
     23    Left = 0
     24    Height = 26
     25    Top = 0
     26    Width = 626
     27    Caption = 'ToolBar1'
     28    Images = ImageList1
     29    ParentShowHint = False
     30    ShowHint = True
     31    TabOrder = 1
     32    object ComboBox1: TComboBox
     33      Left = 44
     34      Height = 21
     35      Top = 2
     36      Width = 100
     37      Align = alLeft
     38      ItemHeight = 13
     39      OnSelect = ComboBox1Select
    3240      TabOrder = 0
    33       object ComboBox1: TComboBox
    34         Left = 44
    35         Height = 21
    36         Top = 2
    37         Width = 100
    38         Align = alLeft
    39         ItemHeight = 13
    40         OnSelect = ComboBox1Select
    41         TabOrder = 0
    42       end
    43       object ToolButton1: TToolButton
    44         Left = 144
    45         Top = 2
    46         Action = ADesktopSave
    47       end
    48       object Label1: TLabel
    49         Left = 1
    50         Height = 24
    51         Top = 2
    52         Width = 43
    53         Align = alLeft
    54         Caption = 'Layouts:'
    55         Layout = tlCenter
    56         ParentColor = False
    57       end
     41    end
     42    object ToolButton1: TToolButton
     43      Left = 144
     44      Top = 2
     45      Action = ADesktopSave
     46    end
     47    object Label1: TLabel
     48      Left = 1
     49      Height = 24
     50      Top = 2
     51      Width = 43
     52      Align = alLeft
     53      Caption = 'Layouts:'
     54      Layout = tlCenter
     55      ParentColor = False
    5856    end
    5957  end
  • Docking/CoolDocking/Demo/IDE/UMainForm.pas

    r181 r182  
    9595    procedure FormShow(Sender: TObject);
    9696  public
     97    procedure InitDefaultDockLayout;
    9798  end;
    9899
     
    137138    if FileExistsUTF8(DockLayoutFileName) then
    138139      LoadFromFile(DockLayoutFileName);
     140    InitDefaultDockLayout;
    139141    PopulateStringList(ComboBox1.Items);
     142  end;
     143end;
     144
     145procedure TMainForm.InitDefaultDockLayout;
     146const
     147  DefaultLayoutName = 'Default Layout';
     148var
     149  NewContainer1: TCoolDockConjoinForm;
     150  NewContainer2: TCoolDockConjoinForm;
     151  DefaultLayout: TCoolDockLayout;
     152begin
     153  DefaultLayout := CoolDockLayoutList1.FindByName(DefaultLayoutName);
     154  if not Assigned(DefaultLayout) then begin
     155    NewContainer1 := TCoolDockConjoinForm.Create(nil);
     156    NewContainer1.Show;
     157
     158    StructureForm.ManualDock(NewContainer1.Panel, nil, alTop);
     159    StructureForm.Show;
     160    ObjectInspectorForm.ManualDock(NewContainer1.Panel, nil, alTop);
     161    ObjectInspectorForm.Show;
     162
     163    NewContainer2 := TCoolDockConjoinForm.Create(nil);
     164    NewContainer2.Show;
     165    ProjectManagerForm.ManualDock(NewContainer2.Panel, nil, alTop);
     166    ProjectManagerForm.Show;
     167    ToolPaletteForm.ManualDock(NewContainer2.Panel, nil, alTop);
     168    ToolPaletteForm.Show;
     169
     170    NewContainer1.ManualDock(Panel1);
     171    SourceEditorForm.ManualDock(Panel1);
     172    SourceEditorForm.Show;
     173    NewContainer2.ManualDock(Panel1);
     174
     175    DefaultLayout := TCoolDockLayout.Create;
     176    DefaultLayout.Name := DefaultLayoutName;
     177    CoolDockLayoutList1.Items.Add(DefaultLayout);
     178    DefaultLayout.Store;
    140179  end;
    141180end;
  • Docking/CoolDocking/UCoolDockClientPanel.pas

    r177 r182  
    8888  if Assigned(Control) then
    8989  begin
    90 
    9190    ControlVisible := TControl(Sender).Visible;
    9291    (*if Assigned(ClientAreaPanel) then
  • Docking/CoolDocking/UCoolDockCommon.pas

    r181 r182  
    66
    77uses
    8   Classes, SysUtils, Forms;
     8  Classes, SysUtils, Forms, Controls;
    99
    1010type
    1111  TDockStyle = (dsList, dsTabs, dsPopupTabs, dsPopupList);
     12  TDockHideType = (dhtPermanent, dhtTemporal);
    1213
    1314  TCoolDockMasterBase = class;
    1415
     16  TCoolDockManagerBase = class(TDockManager)
     17  end;
    1518
    1619  TCoolDockConjoinFormBase = class(TForm)
  • Docking/CoolDocking/UCoolDockLayout.pas

    r181 r182  
    351351        NewItem := TCoolDockLayoutItem.Create;
    352352        NewItem.Parent := Parent;
     353        NewItem.DockStyle := TCoolDockManager(Form.HostDockSite.Parent.DockManager).DockStyle;
     354        Parent.Items.Add(NewItem);
    353355        NewItem.Store(Form.HostDockSite.Parent);
    354         Parent.Items.Add(NewItem);
    355356      end;
    356357    end;
     
    391392            if FormClass = TCoolDockConjoinForm then begin
    392393              ParentComponent := TCoolDockConjoinForm.Create(Application);
     394              TCoolDockManager(TCoolDockConjoinForm(ParentComponent).Panel.DockManager).DockStyle := ParentLayoutItem.DockStyle;
    393395              ParentLayoutItem.Restore(TWinControl(ParentComponent));
    394396            end;
  • Docking/CoolDocking/UCoolDockPopupMenu.pas

    r181 r182  
    1515  TCoolDockPopupMenu = class(TPopupMenu)
    1616  public
    17     Manager: TObject; // TCoolDockManager
    18     constructor Create(AManager: TObject);
     17    Manager: TCoolDockManagerBase;
     18    constructor Create(AManager: TCoolDockManagerBase);
    1919    procedure PopupMenuListClick(Sender: TObject);
    2020    procedure PopupMenuTabsClick(Sender: TObject);
     
    5959{ TCoolDockPopupMenu }
    6060
    61 constructor TCoolDockPopupMenu.Create(AManager: TObject);
     61constructor TCoolDockPopupMenu.Create(AManager: TCoolDockManagerBase);
    6262var
    6363  NewMenuItem: TMenuItem;
     
    198198procedure TCoolDockPopupMenu.PopupMenuPositionAutoClick(Sender: TObject);
    199199begin
    200   TCoolDockManager(Manager).HeaderPos := hpAuto;
     200  if PopupComponent is TPageControl then
     201  with TPageControl(PopupComponent) do begin
     202    TCoolDockStyleTabs(TCoolDockManager(Manager).DockStyleHandler).TabsPos := hpAuto;
     203  end else
     204  if PopupComponent is TCoolDockHeader then
     205  with TCoolDockHeader(PopupComponent) do begin
     206    TCoolDockManager(Manager).HeaderPos := hpAuto;
     207  end;
    201208end;
    202209
    203210procedure TCoolDockPopupMenu.PopupMenuPositionLeftClick(Sender: TObject);
    204 var
    205   Control: TControl;
    206 begin
    207   Control := FindLCLControl(Mouse.CursorPos);
    208   TCoolDockManager(Manager).HeaderPos := hpLeft;
     211begin
     212  if PopupComponent is TPageControl then
     213  with TPageControl(PopupComponent) do begin
     214    TCoolDockStyleTabs(TCoolDockManager(Manager).DockStyleHandler).TabsPos := hpLeft;
     215  end else
     216  if PopupComponent is TCoolDockHeader then
     217  with TCoolDockHeader(PopupComponent) do begin
     218    TCoolDockManager(Manager).HeaderPos := hpLeft;
     219  end;
    209220end;
    210221
    211222procedure TCoolDockPopupMenu.PopupMenuPositionRightClick(Sender: TObject);
    212223begin
    213   TCoolDockManager(Manager).HeaderPos := hpRight;
     224  if PopupComponent is TPageControl then
     225  with TPageControl(PopupComponent) do begin
     226    TCoolDockStyleTabs(TCoolDockManager(Manager).DockStyleHandler).TabsPos := hpRight;
     227  end else
     228  if PopupComponent is TCoolDockHeader then
     229  with TCoolDockHeader(PopupComponent) do begin
     230    TCoolDockManager(Manager).HeaderPos := hpRight;
     231  end;
    214232end;
    215233
    216234procedure TCoolDockPopupMenu.PopupMenuPositionTopClick(Sender: TObject);
    217235begin
    218   TCoolDockManager(Manager).HeaderPos := hpTop;
     236  if PopupComponent is TPageControl then
     237  with TPageControl(PopupComponent) do begin
     238    TCoolDockStyleTabs(TCoolDockManager(Manager).DockStyleHandler).TabsPos := hpTop;
     239  end else
     240  if PopupComponent is TCoolDockHeader then
     241  with TCoolDockHeader(PopupComponent) do begin
     242    TCoolDockManager(Manager).HeaderPos := hpTop;
     243  end;
    219244end;
    220245
    221246procedure TCoolDockPopupMenu.PopupMenuPositionBottomClick(Sender: TObject);
    222247begin
    223   TCoolDockManager(Manager).HeaderPos := hpBottom;
     248  if PopupComponent is TPageControl then
     249  with TPageControl(PopupComponent) do begin
     250    TCoolDockStyleTabs(TCoolDockManager(Manager).DockStyleHandler).TabsPos := hpBottom;
     251  end else
     252  if PopupComponent is TCoolDockHeader then
     253  with TCoolDockHeader(PopupComponent) do begin
     254    TCoolDockManager(Manager).HeaderPos := hpBottom;
     255  end;
    224256end;
    225257
  • Docking/CoolDocking/UCoolDockStyle.pas

    r114 r182  
    66
    77uses
    8   Classes, Controls, SysUtils, UCoolDockClientPanel;
     8  Classes, Controls, SysUtils, UCoolDockClientPanel, UCoolDockCommon;
    99
    1010type
     
    1414  private
    1515  public
    16     Manager: TObject; // TCoolDockManager;
     16    Manager: TCoolDockManagerBase;
    1717    function GetHeaderPos: THeaderPos; virtual;
    1818    procedure SetHeaderPos(const AValue: THeaderPos); virtual;
    19     constructor Create(AManager: TObject);
     19    constructor Create(AManager: TCoolDockManagerBase);
    2020    procedure InsertControl(NewPanel: TCoolDockClientPanel; AControl: TControl;
    2121      InsertAt: TAlign); virtual;
     
    5050end;
    5151
    52 constructor TCoolDockStyle.Create(AManager: TObject);
     52constructor TCoolDockStyle.Create(AManager: TCoolDockManagerBase);
    5353begin
    5454  Manager := AManager;
  • Docking/CoolDocking/UCoolDockStylePopupTabs.pas

    r103 r182  
    66
    77uses
    8   Classes, Controls, SysUtils, ComCtrls, ExtCtrls,
     8  Classes, Controls, SysUtils, ComCtrls, ExtCtrls, UCoolDockCommon,
    99  UCoolDockStyleTabs, UCoolDockStyle, UCoolDockClientPanel;
    1010
     
    5050    procedure TabControlMouseUp(Sender: TObject; Button: TMouseButton;
    5151      Shift: TShiftState; X, Y: Integer);
    52     constructor Create(AManager: TObject);
     52    constructor Create(AManager: TCoolDockManagerBase);
    5353    destructor Destroy; override;
    5454  private
     
    181181end;
    182182
    183 constructor TCoolDockStylePopupTabs.Create(AManager: TObject);
     183constructor TCoolDockStylePopupTabs.Create(AManager: TCoolDockManagerBase);
    184184var
    185185  I: Integer;
  • Docking/CoolDocking/UCoolDockStyleRegions.pas

    r103 r182  
    77uses
    88  Classes, SysUtils, Controls, ExtCtrls, StdCtrls, UCoolDockStyle,
    9   Graphics, Contnrs, Buttons, UCoolDockClientPanel;
     9  Graphics, Contnrs, Buttons, UCoolDockClientPanel, UCoolDockCommon;
    1010
    1111type
     
    2222    function GetHeaderPos: THeaderPos; override;
    2323    procedure SetHeaderPos(const AValue: THeaderPos); override;
    24     constructor Create(AManager: TObject);
     24    constructor Create(AManager: TCoolDockManagerBase);
    2525    destructor Destroy; override;
    2626    procedure UpdateClientSize; override;
     27    procedure SetVisible(const AValue: Boolean); override;
     28    procedure ChangeVisible(Control: TWinControl; Visible: Boolean); override;
    2729  end;
    2830
     
    4547end;
    4648
    47 constructor TCoolDockStyleRegions.Create(AManager: TObject);
     49constructor TCoolDockStyleRegions.Create(AManager: TCoolDockManagerBase);
    4850var
    4951  I: Integer;
     
    5557  for I := 0 to DockPanels.Count - 1 do begin
    5658    if Assigned(TCoolDockClientPanel(DockPanels[I]).Splitter) then
    57     TCoolDockClientPanel(DockPanels[I]).Splitter.Visible := True;
     59      TCoolDockClientPanel(DockPanels[I]).Splitter.Visible := True;
    5860    TCoolDockClientPanel(DockPanels[I]).Visible := True;
    5961    TCoolDockClientPanel(DockPanels[I]).ClientAreaPanel.Parent := TCoolDockClientPanel(DockPanels[I]);
     
    7577  inherited UpdateClientSize;
    7678  with TCoolDockManager(Manager) do
    77   for I := 0 to DockPanels.Count - 1 do begin
    78     TCoolDockClientPanel(DockPanels[I]).Height := DockSite.Height div
    79       DockSite.DockClientCount;
    80     TCoolDockClientPanel(DockPanels[I]).Width := DockSite.Width div
    81       DockSite.DockClientCount;
     79  for I := 0 to DockPanels.Count - 1 do
     80  with TCoolDockClientPanel(DockPanels[I]) do begin
     81    Height := TCoolDockManager(Manager).DockSite.Height div
     82      TCoolDockManager(Manager).DockSite.DockClientCount;
     83    Width := TCoolDockManager(Manager).DockSite.Width div
     84      TCoolDockManager(Manager).DockSite.DockClientCount;
    8285    //TCoolDockClientPanel(FDockPanels[I]).DockPanelPaint(Self);
    83     TCoolDockClientPanel(DockPanels[I]).DockPanelPaint(Self);
     86    DockPanelPaint(Self);
     87    if I < (DockPanels.Count - 1) then begin
     88      if TCoolDockManager(Manager).DockDirection = ddHorizontal then Align := alLeft
     89        else Align := alTop;
     90    end else Align := alClient;
    8491  end;
     92end;
     93
     94procedure TCoolDockStyleRegions.SetVisible(const AValue: Boolean);
     95var
     96  I: Integer;
     97begin
     98  inherited SetVisible(AValue);
     99  with TCoolDockManager(Manager) do
     100  for I := 0 to DockPanels.Count - 1 do
     101
     102        //Show;
     103        //ShowMessage(IntToStr(Control.Tag));
     104      with TCoolDockClientPanel(DockPanels[I]) do begin
     105        if AValue and (not Control.Visible) and (Control.Tag = Integer(dhtTemporal))  then begin
     106          Control.Show;
     107          Control.Tag := Integer(dhtPermanent);
     108        end else
     109        if not AValue then begin
     110          Control.Tag := Integer(dhtTemporal);
     111          Control.Hide;
     112        end;
     113      end;
     114        //ClientAreaPanel.Show;
     115end;
     116
     117procedure TCoolDockStyleRegions.ChangeVisible(Control: TWinControl;
     118  Visible: Boolean);
     119begin
     120  inherited;
    85121end;
    86122
  • Docking/CoolDocking/UCoolDockStyleTabs.pas

    r177 r182  
    77uses
    88  Classes, Controls, ExtCtrls, ComCtrls, SysUtils, Dialogs,
    9   Menus, UCoolDockStyle, Forms, UCoolDockClientPanel;
     9  Menus, UCoolDockStyle, Forms, UCoolDockClientPanel, UCoolDockCommon;
    1010
    1111type
     
    3333      AControl: TControl; InsertAt: TAlign);
    3434  public
    35     constructor Create(AManager: TObject);
     35    constructor Create(AManager: TCoolDockManagerBase);
    3636    procedure SetVisible(const AValue: Boolean); override;
    3737    destructor Destroy; override;
     
    7878    then
    7979    begin
    80       TCoolDockClientPanel(DockPanels[I]).Control.Tag := 1;
     80      TCoolDockClientPanel(DockPanels[I]).Control.Tag := Integer(dhtTemporal);
    8181      TCoolDockClientPanel(DockPanels[I]).Control.Hide;
    8282      TCoolDockClientPanel(DockPanels[I]).ClientAreaPanel.Hide;
     
    138138end;
    139139
    140 constructor TCoolDockStyleTabs.Create(AManager: TObject);
     140constructor TCoolDockStyleTabs.Create(AManager: TCoolDockManagerBase);
    141141var
    142142  NewMenuItem: TMenuItem;
     
    243243      with TCoolDockClientPanel(DockPanels[PageControl.TabIndex]) do begin
    244244        //Show;
    245         if AValue and (not Control.Visible) and (Control.Tag = 1)  then begin
     245        //ShowMessage(IntToStr(Control.Tag));
     246        if AValue and (not Control.Visible) and (Control.Tag = Integer(dhtTemporal))  then begin
    246247          Control.Show;
    247           Control.Tag := 0;
     248          Control.Tag := Integer(dhtPermanent);
    248249        end;
    249250        //TabControl.Show;
     
    273274
    274275        I := DockPanels.IndexOf(FindControlInPanels(Control));
    275         if Control.Tag = 0 then
     276        if Control.Tag = Integer(dhtPermanent) then
    276277        if I <> -1 then
    277278  //        Control.Hide;
    278279          PageControl.Page[I].TabVisible := False;
    279         Control.Tag := 0;
     280        //Control.Tag := 0;
    280281//      end;
    281282    end;
  • Docking/CoolDocking/UCoolDocking.pas

    r181 r182  
    4040  end;
    4141
    42   // TObjectList<TCoolDockClientPanel>
    4342
    4443  { TCoolDockPanels }
    4544
     45  // TCoolDockPanels = TObjectList<TCoolDockClientPanel>
    4646  TCoolDockPanels = class(TObjectList)
    4747    destructor Destroy; override;
     
    5050  { TCoolDockManager }
    5151
    52   TCoolDockManager = class(TDockManager)
     52  TCoolDockManager = class(TCoolDockManagerBase)
    5353  private
    5454    FMaster: TCoolDockMaster;
     
    104104    property HeaderPos: THeaderPos read GetHeaderPos write SetHeaderPos;
    105105    property Visible: Boolean write SetVisible;
     106    property DockDirection: TDockDirection read FDockDirection
     107      write FDockDirection;
    106108  end;
    107109
     
    120122    procedure SetTabsEnabled(const AValue: Boolean);
    121123  public
    122     procedure SaveLayoutToStream(Stream: TStream);
    123     procedure LoadLayoutFromStream(Stream: TStream);
    124     procedure SaveLayoutToFile(FileName: string);
    125     procedure LoadLayoutFromFile(FileName: string);
    126124    constructor Create(AOwner: TComponent); override;
    127125    destructor Destroy; override;
     
    332330    Control.Parent := NewPanel.ClientAreaPanel;
    333331    Control.Align := alClient;
    334     FDockPanels.Add(NewPanel);
     332    if (InsertAt = alTop) or (InsertAt = alLeft) then
     333      FDockPanels.Insert(0, NewPanel)
     334      else FDockPanels.Add(NewPanel);
    335335    UpdateClientSize;
    336336end;
     
    550550  with TCoolDockManager(Panel.DockManager) do
    551551  for I := 0 to DockPanels.Count - 1 do
    552     if Assigned(TCoolDockClientPanel(DockPanels[I]).Control) then
    553     TCoolDockClientPanel(DockPanels[I]).Control.Hide;
     552    if Assigned(TCoolDockClientPanel(DockPanels[I]).Control) then begin
     553      TCoolDockClientPanel(DockPanels[I]).Control.Tag := Integer(dhtTemporal);
     554      TCoolDockClientPanel(DockPanels[I]).Control.Hide;
     555    end;
    554556end;
    555557
     
    614616  if FShowIcons = AValue then Exit;
    615617  FShowIcons := AValue;
    616 end;
    617 
    618 procedure TCoolDockMaster.SaveLayoutToStream(Stream: TStream);
    619 var
    620   Doc: TXMLDocument;
    621   RootNode: TDOMNode;
    622   NewNode: TDOMNode;
    623   NewNode2: TDOMNode;
    624   I: Integer;
    625 begin
    626   Doc := TXMLDocument.Create;
    627   with Doc do try
    628     RootNode := CreateElement('DockLayout');
    629     AppendChild(RootNode);
    630     with RootNode do begin
    631       for I := 0 to Application.ComponentCount - 1 do begin
    632         if Application.Components[I] is TForm then
    633         with Application.Components[I] as TForm do
    634         if Assigned(HostDockSite) then
    635         begin
    636           NewNode := OwnerDocument.CreateElement('Form');
    637 
    638           if HostDockSite.Parent is TForm then begin
    639             NewNode2 := OwnerDocument.CreateElement('ParentFormName');
    640             NewNode2.TextContent := UTF8Decode(HostDockSite.Parent.Name);
    641             NewNode.AppendChild(NewNode2);
    642 
    643             NewNode2 := OwnerDocument.CreateElement('ParentFormClassName');
    644             NewNode2.TextContent := UTF8Decode(HostDockSite.Parent.ClassName);
    645             NewNode.AppendChild(NewNode2);
    646           end;
    647 
    648           NewNode2 := OwnerDocument.CreateElement('Name');
    649           NewNode2.TextContent := UTF8Decode(Name);
    650           NewNode.AppendChild(NewNode2);
    651 
    652           NewNode2 := OwnerDocument.CreateElement('Caption');
    653           NewNode2.TextContent := UTF8Decode(Caption);
    654           NewNode.AppendChild(NewNode2);
    655 
    656           NewNode2 := OwnerDocument.CreateElement('Width');
    657           NewNode2.TextContent := IntToStr(Width);
    658           NewNode.AppendChild(NewNode2);
    659 
    660           NewNode2 := OwnerDocument.CreateElement('Height');
    661           NewNode2.TextContent := IntToStr(Height);
    662           NewNode.AppendChild(NewNode2);
    663 
    664           NewNode2 := OwnerDocument.CreateElement('UndockWidth');
    665           NewNode2.TextContent := IntToStr(UndockWidth);
    666           NewNode.AppendChild(NewNode2);
    667 
    668           NewNode2 := OwnerDocument.CreateElement('UndockHeight');
    669           NewNode2.TextContent := IntToStr(UndockHeight);
    670           NewNode.AppendChild(NewNode2);
    671 
    672           NewNode2 := OwnerDocument.CreateElement('FormState');
    673           NewNode2.TextContent := IntToStr(Integer(FormState));
    674           NewNode.AppendChild(NewNode2);
    675 
    676           NewNode2 := OwnerDocument.CreateElement('Visible');
    677           NewNode2.TextContent := IntToStr(Integer(Visible));
    678           NewNode.AppendChild(NewNode2);
    679 
    680           AppendChild(NewNode);
    681         end;
    682       end;
    683     end;
    684     WriteXMLFile(Doc, Stream);
    685   finally
    686     Free;
    687   end;
    688 end;
    689 
    690 procedure TCoolDockMaster.LoadLayoutFromStream(Stream: TStream);
    691 begin
    692 
    693 end;
    694 
    695 procedure TCoolDockMaster.SaveLayoutToFile(FileName: string);
    696 var
    697   LayoutFile: TFileStream;
    698 begin
    699   try
    700     if FileExistsUTF8(FileName) then
    701     LayoutFile := TFileStream.Create(FileName, fmOpenReadWrite)
    702     else LayoutFile := TFileStream.Create(FileName, fmCreate);
    703     SaveLayoutToStream(LayoutFile);
    704   finally
    705     LayoutFile.Free;
    706   end;
    707 end;
    708 
    709 procedure TCoolDockMaster.LoadLayoutFromFile(FileName: string);
    710 var
    711   LayoutFile: TFileStream;
    712 begin
    713   LayoutFile := TFileStream.Create(FileName, fmOpenRead);
    714   try
    715     LoadLayoutFromStream(LayoutFile);
    716   finally
    717     Free;
    718   end;
    719618end;
    720619
Note: See TracChangeset for help on using the changeset viewer.