Changeset 103 for Docking


Ignore:
Timestamp:
Dec 29, 2010, 1:56:04 PM (14 years ago)
Author:
george
Message:
  • Fixed: Hiding invisible docked forms as tabs.
  • Added: Ability to bring window to front on execute Form.Show.
Location:
Docking/CoolDocking
Files:
1 added
13 edited

Legend:

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

    r98 r103  
    3838      </Item2>
    3939    </RequiredPackages>
    40     <Units Count="57">
     40    <Units Count="64">
    4141      <Unit0>
    4242        <Filename Value="Demo.lpr"/>
    4343        <IsPartOfProject Value="True"/>
    4444        <UnitName Value="Demo"/>
    45         <EditorIndex Value="5"/>
    46         <WindowIndex Value="0"/>
    47         <TopLine Value="2"/>
    48         <CursorPos X="46" Y="14"/>
    49         <UsageCount Value="184"/>
     45        <EditorIndex Value="2"/>
     46        <WindowIndex Value="0"/>
     47        <TopLine Value="4"/>
     48        <CursorPos X="34" Y="15"/>
     49        <UsageCount Value="195"/>
    5050        <Loaded Value="True"/>
    5151        <DefaultSyntaxHighlighter Value="Delphi"/>
     
    5757        <ResourceBaseClass Value="Form"/>
    5858        <UnitName Value="UMainForm"/>
    59         <EditorIndex Value="9"/>
    60         <WindowIndex Value="0"/>
    61         <TopLine Value="58"/>
    62         <CursorPos X="5" Y="73"/>
    63         <UsageCount Value="184"/>
     59        <EditorIndex Value="14"/>
     60        <WindowIndex Value="0"/>
     61        <TopLine Value="59"/>
     62        <CursorPos X="3" Y="75"/>
     63        <UsageCount Value="195"/>
    6464        <Loaded Value="True"/>
    6565        <LoadedDesigner Value="True"/>
     
    7070        <UnitName Value="Controls"/>
    7171        <WindowIndex Value="0"/>
    72         <TopLine Value="1359"/>
    73         <CursorPos X="14" Y="1399"/>
    74         <UsageCount Value="58"/>
     72        <TopLine Value="1191"/>
     73        <CursorPos X="15" Y="1203"/>
     74        <UsageCount Value="60"/>
    7575      </Unit2>
    7676      <Unit3>
     
    8585      <Unit4>
    8686        <Filename Value="E:\Programy\Lazarus\lcl\include\control.inc"/>
    87         <WindowIndex Value="0"/>
    88         <TopLine Value="4767"/>
    89         <CursorPos X="59" Y="4774"/>
    90         <UsageCount Value="51"/>
     87        <EditorIndex Value="7"/>
     88        <WindowIndex Value="0"/>
     89        <TopLine Value="3709"/>
     90        <CursorPos X="1" Y="3726"/>
     91        <UsageCount Value="53"/>
     92        <Loaded Value="True"/>
    9193      </Unit4>
    9294      <Unit5>
    9395        <Filename Value="E:\Programy\Lazarus\lcl\include\wincontrol.inc"/>
    94         <WindowIndex Value="0"/>
    95         <TopLine Value="3429"/>
    96         <CursorPos X="1" Y="3442"/>
    97         <UsageCount Value="56"/>
     96        <EditorIndex Value="8"/>
     97        <WindowIndex Value="0"/>
     98        <TopLine Value="6352"/>
     99        <CursorPos X="42" Y="6355"/>
     100        <UsageCount Value="58"/>
     101        <Loaded Value="True"/>
    98102      </Unit5>
    99103      <Unit6>
     
    109113        <TopLine Value="206"/>
    110114        <CursorPos X="8" Y="219"/>
    111         <UsageCount Value="0"/>
     115        <UsageCount Value="10"/>
    112116      </Unit7>
    113117      <Unit8>
    114118        <Filename Value="E:\Programy\Lazarus\lcl\lclproc.pas"/>
    115119        <UnitName Value="LCLProc"/>
    116         <WindowIndex Value="0"/>
    117         <TopLine Value="2412"/>
    118         <CursorPos X="38" Y="2417"/>
    119         <UsageCount Value="21"/>
     120        <EditorIndex Value="6"/>
     121        <WindowIndex Value="0"/>
     122        <TopLine Value="1516"/>
     123        <CursorPos X="1" Y="1528"/>
     124        <UsageCount Value="23"/>
     125        <Loaded Value="True"/>
    120126      </Unit8>
    121127      <Unit9>
     
    126132        <ResourceBaseClass Value="Form"/>
    127133        <UnitName Value="UDockForm"/>
    128         <WindowIndex Value="0"/>
    129         <TopLine Value="7"/>
    130         <CursorPos X="33" Y="21"/>
    131         <UsageCount Value="183"/>
     134        <EditorIndex Value="3"/>
     135        <WindowIndex Value="0"/>
     136        <TopLine Value="18"/>
     137        <CursorPos X="1" Y="39"/>
     138        <UsageCount Value="194"/>
     139        <Loaded Value="True"/>
    132140        <DefaultSyntaxHighlighter Value="Delphi"/>
    133141      </Unit9>
     
    138146        <TopLine Value="971"/>
    139147        <CursorPos X="3" Y="984"/>
    140         <UsageCount Value="10"/>
     148        <UsageCount Value="9"/>
    141149      </Unit10>
    142150      <Unit11>
     
    170178        <UnitName Value="ExtCtrls"/>
    171179        <WindowIndex Value="0"/>
    172         <TopLine Value="1215"/>
    173         <CursorPos X="3" Y="1228"/>
    174         <UsageCount Value="53"/>
     180        <TopLine Value="1245"/>
     181        <CursorPos X="14" Y="1258"/>
     182        <UsageCount Value="55"/>
    175183      </Unit14>
    176184      <Unit15>
     
    191199      <Unit17>
    192200        <Filename Value="E:\Programy\Lazarus\lcl\include\customform.inc"/>
    193         <WindowIndex Value="0"/>
    194         <TopLine Value="2573"/>
    195         <CursorPos X="36" Y="2586"/>
    196         <UsageCount Value="6"/>
     201        <EditorIndex Value="10"/>
     202        <WindowIndex Value="0"/>
     203        <TopLine Value="85"/>
     204        <CursorPos X="24" Y="94"/>
     205        <UsageCount Value="11"/>
     206        <Loaded Value="True"/>
    197207      </Unit17>
    198208      <Unit18>
     
    232242        <UnitName Value="Menus"/>
    233243        <WindowIndex Value="0"/>
    234         <TopLine Value="280"/>
    235         <CursorPos X="33" Y="293"/>
    236         <UsageCount Value="10"/>
     244        <TopLine Value="391"/>
     245        <CursorPos X="17" Y="404"/>
     246        <UsageCount Value="11"/>
    237247      </Unit22>
    238248      <Unit23>
     
    240250        <UnitName Value="UCoolDocking"/>
    241251        <IsVisibleTab Value="True"/>
    242         <EditorIndex Value="0"/>
    243         <WindowIndex Value="0"/>
    244         <TopLine Value="221"/>
    245         <CursorPos X="24" Y="239"/>
    246         <UsageCount Value="82"/>
     252        <EditorIndex Value="5"/>
     253        <WindowIndex Value="0"/>
     254        <TopLine Value="438"/>
     255        <CursorPos X="1" Y="450"/>
     256        <UsageCount Value="87"/>
    247257        <Loaded Value="True"/>
    248258        <DefaultSyntaxHighlighter Value="Delphi"/>
     
    250260      <Unit24>
    251261        <Filename Value="..\ReadMe.txt"/>
     262        <EditorIndex Value="4"/>
    252263        <WindowIndex Value="0"/>
    253264        <TopLine Value="1"/>
    254265        <CursorPos X="18" Y="11"/>
    255266        <UsageCount Value="19"/>
     267        <Loaded Value="True"/>
    256268        <DefaultSyntaxHighlighter Value="None"/>
    257269      </Unit24>
     
    274286        <WindowIndex Value="0"/>
    275287        <TopLine Value="50"/>
    276         <CursorPos X="18" Y="61"/>
    277         <UsageCount Value="19"/>
     288        <CursorPos X="14" Y="59"/>
     289        <UsageCount Value="20"/>
    278290      </Unit27>
    279291      <Unit28>
     
    303315        <UnitName Value="UCoolDockWindowList"/>
    304316        <WindowIndex Value="0"/>
    305         <TopLine Value="59"/>
    306         <CursorPos X="44" Y="61"/>
    307         <UsageCount Value="1"/>
     317        <TopLine Value="73"/>
     318        <CursorPos X="42" Y="90"/>
     319        <UsageCount Value="11"/>
    308320        <DefaultSyntaxHighlighter Value="Delphi"/>
    309321      </Unit30>
     
    317329        <TopLine Value="1"/>
    318330        <CursorPos X="53" Y="2"/>
    319         <UsageCount Value="126"/>
     331        <UsageCount Value="137"/>
    320332        <DefaultSyntaxHighlighter Value="Delphi"/>
    321333      </Unit31>
     
    340352        <TopLine Value="3034"/>
    341353        <CursorPos X="1" Y="3047"/>
    342         <UsageCount Value="0"/>
     354        <UsageCount Value="10"/>
    343355      </Unit34>
    344356      <Unit35>
     
    412424        <UnitName Value="UComponentTree"/>
    413425        <WindowIndex Value="0"/>
    414         <TopLine Value="37"/>
    415         <CursorPos X="18" Y="39"/>
    416         <UsageCount Value="78"/>
     426        <TopLine Value="35"/>
     427        <CursorPos X="44" Y="45"/>
     428        <UsageCount Value="89"/>
    417429        <DefaultSyntaxHighlighter Value="Delphi"/>
    418430      </Unit44>
     
    426438      <Unit46>
    427439        <Filename Value="E:\Programy\Lazarus\fpc\2.4.3\source\rtl\objpas\classes\classesh.inc"/>
    428         <WindowIndex Value="0"/>
    429         <TopLine Value="107"/>
    430         <CursorPos X="3" Y="120"/>
    431         <UsageCount Value="10"/>
     440        <EditorIndex Value="11"/>
     441        <WindowIndex Value="0"/>
     442        <TopLine Value="1638"/>
     443        <CursorPos X="15" Y="1650"/>
     444        <UsageCount Value="14"/>
     445        <Loaded Value="True"/>
    432446      </Unit46>
    433447      <Unit47>
     
    442456        <Filename Value="..\UCoolDockStyleTabs.pas"/>
    443457        <UnitName Value="UCoolDockStyleTabs"/>
    444         <WindowIndex Value="0"/>
    445         <TopLine Value="127"/>
    446         <CursorPos X="42" Y="140"/>
    447         <UsageCount Value="38"/>
     458        <EditorIndex Value="0"/>
     459        <WindowIndex Value="0"/>
     460        <TopLine Value="171"/>
     461        <CursorPos X="3" Y="173"/>
     462        <UsageCount Value="43"/>
     463        <Loaded Value="True"/>
    448464        <DefaultSyntaxHighlighter Value="Delphi"/>
    449465      </Unit48>
     
    451467        <Filename Value="..\UCoolDockStylePopupTabs.pas"/>
    452468        <UnitName Value="UCoolDockStylePopupTabs"/>
    453         <EditorIndex Value="2"/>
    454         <WindowIndex Value="0"/>
    455         <TopLine Value="182"/>
    456         <CursorPos X="32" Y="195"/>
    457         <UsageCount Value="10"/>
    458         <Loaded Value="True"/>
     469        <WindowIndex Value="0"/>
     470        <TopLine Value="39"/>
     471        <CursorPos X="1" Y="55"/>
     472        <UsageCount Value="13"/>
    459473        <DefaultSyntaxHighlighter Value="Delphi"/>
    460474      </Unit49>
     
    462476        <Filename Value="..\UCoolDockStyle.pas"/>
    463477        <UnitName Value="UCoolDockStyle"/>
    464         <EditorIndex Value="8"/>
    465         <WindowIndex Value="0"/>
    466         <TopLine Value="1"/>
    467         <CursorPos X="3" Y="14"/>
    468         <UsageCount Value="38"/>
    469         <Loaded Value="True"/>
     478        <WindowIndex Value="0"/>
     479        <TopLine Value="12"/>
     480        <CursorPos X="29" Y="24"/>
     481        <UsageCount Value="43"/>
    470482        <DefaultSyntaxHighlighter Value="Delphi"/>
    471483      </Unit50>
     
    473485        <Filename Value="..\UCoolDockStyleRegions.pas"/>
    474486        <UnitName Value="UCoolDockStyleRegions"/>
    475         <EditorIndex Value="7"/>
    476         <WindowIndex Value="0"/>
    477         <TopLine Value="31"/>
    478         <CursorPos X="25" Y="37"/>
    479         <UsageCount Value="38"/>
    480         <Loaded Value="True"/>
     487        <WindowIndex Value="0"/>
     488        <TopLine Value="64"/>
     489        <CursorPos X="1" Y="85"/>
     490        <UsageCount Value="41"/>
    481491        <DefaultSyntaxHighlighter Value="Delphi"/>
    482492      </Unit51>
     
    484494        <Filename Value="..\UCoolDockStylePopupRegions.pas"/>
    485495        <UnitName Value="UCoolDockStylePopupRegions"/>
    486         <EditorIndex Value="6"/>
    487496        <WindowIndex Value="0"/>
    488497        <TopLine Value="1"/>
    489498        <CursorPos X="44" Y="11"/>
    490         <UsageCount Value="10"/>
    491         <Loaded Value="True"/>
     499        <UsageCount Value="13"/>
    492500        <DefaultSyntaxHighlighter Value="Delphi"/>
    493501      </Unit52>
     
    495503        <Filename Value="E:\Programy\Lazarus\fpc\2.4.3\source\rtl\inc\objpash.inc"/>
    496504        <WindowIndex Value="0"/>
    497         <TopLine Value="172"/>
    498         <CursorPos X="23" Y="185"/>
    499         <UsageCount Value="4"/>
     505        <TopLine Value="164"/>
     506        <CursorPos X="8" Y="176"/>
     507        <UsageCount Value="11"/>
    500508      </Unit53>
    501509      <Unit54>
    502510        <Filename Value="..\UCoolDockClientPanel.pas"/>
    503511        <UnitName Value="UCoolDockClientPanel"/>
    504         <EditorIndex Value="3"/>
    505         <WindowIndex Value="0"/>
    506         <TopLine Value="37"/>
    507         <CursorPos X="21" Y="51"/>
    508         <UsageCount Value="37"/>
     512        <EditorIndex Value="1"/>
     513        <WindowIndex Value="0"/>
     514        <TopLine Value="78"/>
     515        <CursorPos X="1" Y="90"/>
     516        <UsageCount Value="42"/>
    509517        <Loaded Value="True"/>
    510518        <DefaultSyntaxHighlighter Value="Delphi"/>
     
    513521        <Filename Value="..\UCoolDockPopupMenu.pas"/>
    514522        <UnitName Value="UCoolDockPopupMenu"/>
    515         <EditorIndex Value="4"/>
    516         <WindowIndex Value="0"/>
    517         <TopLine Value="49"/>
    518         <CursorPos X="24" Y="62"/>
    519         <UsageCount Value="11"/>
     523        <EditorIndex Value="13"/>
     524        <WindowIndex Value="0"/>
     525        <TopLine Value="5"/>
     526        <CursorPos X="17" Y="17"/>
     527        <UsageCount Value="15"/>
    520528        <Loaded Value="True"/>
    521529        <DefaultSyntaxHighlighter Value="Delphi"/>
     
    523531      <Unit56>
    524532        <Filename Value="E:\Programy\Lazarus\lcl\include\menuitem.inc"/>
    525         <EditorIndex Value="1"/>
    526533        <WindowIndex Value="0"/>
    527534        <TopLine Value="392"/>
    528535        <CursorPos X="1" Y="405"/>
     536        <UsageCount Value="11"/>
     537      </Unit56>
     538      <Unit57>
     539        <Filename Value="E:\Programy\Lazarus\lcl\include\menu.inc"/>
     540        <WindowIndex Value="0"/>
     541        <TopLine Value="115"/>
     542        <CursorPos X="1" Y="128"/>
    529543        <UsageCount Value="10"/>
    530         <Loaded Value="True"/>
    531       </Unit56>
     544      </Unit57>
     545      <Unit58>
     546        <Filename Value="E:\Programy\Lazarus\lcl\lclclasses.pp"/>
     547        <UnitName Value="LCLClasses"/>
     548        <EditorIndex Value="9"/>
     549        <WindowIndex Value="0"/>
     550        <TopLine Value="92"/>
     551        <CursorPos X="1" Y="112"/>
     552        <UsageCount Value="11"/>
     553        <Loaded Value="True"/>
     554      </Unit58>
     555      <Unit59>
     556        <Filename Value="E:\Programy\Lazarus\fpc\2.4.3\source\packages\fcl-base\src\contnrs.pp"/>
     557        <UnitName Value="contnrs"/>
     558        <WindowIndex Value="0"/>
     559        <TopLine Value="66"/>
     560        <CursorPos X="3" Y="72"/>
     561        <UsageCount Value="11"/>
     562      </Unit59>
     563      <Unit60>
     564        <Filename Value="E:\Programy\Lazarus\lcl\include\scrollingwincontrol.inc"/>
     565        <WindowIndex Value="0"/>
     566        <TopLine Value="239"/>
     567        <CursorPos X="1" Y="261"/>
     568        <UsageCount Value="11"/>
     569      </Unit60>
     570      <Unit61>
     571        <Filename Value="E:\Programy\Lazarus\fpc\2.4.3\source\rtl\objpas\sysutils\systhrdh.inc"/>
     572        <WindowIndex Value="0"/>
     573        <TopLine Value="4"/>
     574        <CursorPos X="4" Y="16"/>
     575        <UsageCount Value="11"/>
     576      </Unit61>
     577      <Unit62>
     578        <Filename Value="E:\Programy\Lazarus\lcl\include\application.inc"/>
     579        <WindowIndex Value="0"/>
     580        <TopLine Value="1038"/>
     581        <CursorPos X="1" Y="1050"/>
     582        <UsageCount Value="11"/>
     583      </Unit62>
     584      <Unit63>
     585        <Filename Value="E:\Programy\Lazarus\fpc\2.4.3\source\rtl\objpas\classes\compon.inc"/>
     586        <EditorIndex Value="12"/>
     587        <WindowIndex Value="0"/>
     588        <TopLine Value="514"/>
     589        <CursorPos X="13" Y="520"/>
     590        <UsageCount Value="10"/>
     591        <Loaded Value="True"/>
     592      </Unit63>
    532593    </Units>
    533594    <JumpHistory Count="30" HistoryIndex="29">
    534595      <Position1>
    535         <Filename Value="..\UCoolDockPopupMenu.pas"/>
    536         <Caret Line="259" Column="29" TopLine="232"/>
     596        <Filename Value="..\UCoolDockClientPanel.pas"/>
     597        <Caret Line="110" Column="1" TopLine="98"/>
    537598      </Position1>
    538599      <Position2>
    539         <Filename Value="..\UCoolDockPopupMenu.pas"/>
    540         <Caret Line="260" Column="45" TopLine="245"/>
     600        <Filename Value="E:\Programy\Lazarus\lcl\lclproc.pas"/>
     601        <Caret Line="1528" Column="1" TopLine="1516"/>
    541602      </Position2>
    542603      <Position3>
    543         <Filename Value="..\UCoolDockPopupMenu.pas"/>
    544         <Caret Line="259" Column="20" TopLine="247"/>
     604        <Filename Value="E:\Programy\Lazarus\lcl\include\control.inc"/>
     605        <Caret Line="1411" Column="1" TopLine="1399"/>
    545606      </Position3>
    546607      <Position4>
    547         <Filename Value="..\UCoolDockPopupMenu.pas"/>
    548         <Caret Line="14" Column="3" TopLine="1"/>
     608        <Filename Value="E:\Programy\Lazarus\lcl\include\control.inc"/>
     609        <Caret Line="1392" Column="1" TopLine="1380"/>
    549610      </Position4>
    550611      <Position5>
    551         <Filename Value="..\UCoolDockPopupMenu.pas"/>
    552         <Caret Line="57" Column="3" TopLine="51"/>
     612        <Filename Value="E:\Programy\Lazarus\lcl\include\customform.inc"/>
     613        <Caret Line="1262" Column="1" TopLine="1250"/>
    553614      </Position5>
    554615      <Position6>
    555         <Filename Value="..\UCoolDockPopupMenu.pas"/>
    556         <Caret Line="63" Column="39" TopLine="50"/>
     616        <Filename Value="E:\Programy\Lazarus\lcl\include\customform.inc"/>
     617        <Caret Line="1263" Column="1" TopLine="1250"/>
    557618      </Position6>
    558619      <Position7>
    559         <Filename Value="..\UCoolDockPopupMenu.pas"/>
    560         <Caret Line="15" Column="9" TopLine="3"/>
     620        <Filename Value="E:\Programy\Lazarus\lcl\include\customform.inc"/>
     621        <Caret Line="1264" Column="1" TopLine="1250"/>
    561622      </Position7>
    562623      <Position8>
    563         <Filename Value="..\UCoolDockPopupMenu.pas"/>
    564         <Caret Line="3" Column="14" TopLine="1"/>
     624        <Filename Value="E:\Programy\Lazarus\lcl\include\control.inc"/>
     625        <Caret Line="3721" Column="1" TopLine="3709"/>
    565626      </Position8>
    566627      <Position9>
    567         <Filename Value="..\UCoolDockPopupMenu.pas"/>
    568         <Caret Line="116" Column="39" TopLine="95"/>
     628        <Filename Value="E:\Programy\Lazarus\lcl\include\control.inc"/>
     629        <Caret Line="3724" Column="1" TopLine="3709"/>
    569630      </Position9>
    570631      <Position10>
    571         <Filename Value="..\UCoolDockPopupMenu.pas"/>
    572         <Caret Line="59" Column="23" TopLine="53"/>
     632        <Filename Value="E:\Programy\Lazarus\lcl\include\control.inc"/>
     633        <Caret Line="3726" Column="1" TopLine="3709"/>
    573634      </Position10>
    574635      <Position11>
    575         <Filename Value="..\UCoolDocking.pas"/>
    576         <Caret Line="500" Column="1" TopLine="484"/>
     636        <Filename Value="E:\Programy\Lazarus\lcl\include\customform.inc"/>
     637        <Caret Line="405" Column="1" TopLine="393"/>
    577638      </Position11>
    578639      <Position12>
    579         <Filename Value="..\UCoolDockStylePopupTabs.pas"/>
    580         <Caret Line="190" Column="41" TopLine="185"/>
     640        <Filename Value="E:\Programy\Lazarus\lcl\include\customform.inc"/>
     641        <Caret Line="408" Column="1" TopLine="393"/>
    581642      </Position12>
    582643      <Position13>
    583         <Filename Value="..\UCoolDockStylePopupTabs.pas"/>
    584         <Caret Line="195" Column="32" TopLine="182"/>
     644        <Filename Value="E:\Programy\Lazarus\lcl\include\customform.inc"/>
     645        <Caret Line="2102" Column="1" TopLine="2090"/>
    585646      </Position13>
    586647      <Position14>
    587         <Filename Value="..\UCoolDocking.pas"/>
    588         <Caret Line="58" Column="35" TopLine="45"/>
     648        <Filename Value="E:\Programy\Lazarus\lcl\include\customform.inc"/>
     649        <Caret Line="101" Column="1" TopLine="89"/>
    589650      </Position14>
    590651      <Position15>
    591         <Filename Value="..\UCoolDockPopupMenu.pas"/>
    592         <Caret Line="34" Column="16" TopLine="18"/>
     652        <Filename Value="E:\Programy\Lazarus\lcl\include\customform.inc"/>
     653        <Caret Line="912" Column="1" TopLine="900"/>
    593654      </Position15>
    594655      <Position16>
    595         <Filename Value="..\UCoolDockPopupMenu.pas"/>
    596         <Caret Line="8" Column="46" TopLine="2"/>
     656        <Filename Value="E:\Programy\Lazarus\lcl\include\customform.inc"/>
     657        <Caret Line="913" Column="1" TopLine="900"/>
    597658      </Position16>
    598659      <Position17>
    599         <Filename Value="..\UCoolDockPopupMenu.pas"/>
    600         <Caret Line="285" Column="36" TopLine="272"/>
     660        <Filename Value="UDockForm.pas"/>
     661        <Caret Line="37" Column="1" TopLine="18"/>
    601662      </Position17>
    602663      <Position18>
    603         <Filename Value="..\UCoolDockPopupMenu.pas"/>
    604         <Caret Line="21" Column="15" TopLine="8"/>
     664        <Filename Value="UDockForm.pas"/>
     665        <Caret Line="38" Column="1" TopLine="18"/>
    605666      </Position18>
    606667      <Position19>
    607         <Filename Value="..\UCoolDockPopupMenu.pas"/>
    608         <Caret Line="34" Column="28" TopLine="25"/>
     668        <Filename Value="UDockForm.pas"/>
     669        <Caret Line="39" Column="1" TopLine="18"/>
    609670      </Position19>
    610671      <Position20>
    611         <Filename Value="..\UCoolDockPopupMenu.pas"/>
    612         <Caret Line="285" Column="13" TopLine="272"/>
     672        <Filename Value="E:\Programy\Lazarus\lcl\include\customform.inc"/>
     673        <Caret Line="918" Column="1" TopLine="900"/>
    613674      </Position20>
    614675      <Position21>
    615         <Filename Value="..\UCoolDockPopupMenu.pas"/>
    616         <Caret Line="287" Column="31" TopLine="274"/>
     676        <Filename Value="E:\Programy\Lazarus\lcl\include\customform.inc"/>
     677        <Caret Line="103" Column="1" TopLine="91"/>
    617678      </Position21>
    618679      <Position22>
    619         <Filename Value="..\UCoolDockPopupMenu.pas"/>
    620         <Caret Line="326" Column="40" TopLine="311"/>
     680        <Filename Value="E:\Programy\Lazarus\lcl\include\customform.inc"/>
     681        <Caret Line="94" Column="24" TopLine="85"/>
    621682      </Position22>
    622683      <Position23>
    623         <Filename Value="..\UCoolDockPopupMenu.pas"/>
    624         <Caret Line="325" Column="36" TopLine="311"/>
     684        <Filename Value="E:\Programy\Lazarus\fpc\2.4.3\source\rtl\objpas\classes\compon.inc"/>
     685        <Caret Line="496" Column="14" TopLine="493"/>
    625686      </Position23>
    626687      <Position24>
    627         <Filename Value="..\UCoolDocking.pas"/>
    628         <Caret Line="241" Column="47" TopLine="221"/>
     688        <Filename Value="..\UCoolDockClientPanel.pas"/>
     689        <Caret Line="109" Column="67" TopLine="87"/>
    629690      </Position24>
    630691      <Position25>
    631         <Filename Value="E:\Programy\Lazarus\lcl\include\menuitem.inc"/>
    632         <Caret Line="405" Column="1" TopLine="392"/>
     692        <Filename Value="..\UCoolDocking.pas"/>
     693        <Caret Line="219" Column="1" TopLine="207"/>
    633694      </Position25>
    634695      <Position26>
    635         <Filename Value="..\UCoolDocking.pas"/>
    636         <Caret Line="232" Column="1" TopLine="221"/>
     696        <Filename Value="..\UCoolDockClientPanel.pas"/>
     697        <Caret Line="109" Column="1" TopLine="92"/>
    637698      </Position26>
    638699      <Position27>
    639         <Filename Value="..\UCoolDockPopupMenu.pas"/>
    640         <Caret Line="66" Column="1" TopLine="53"/>
     700        <Filename Value="..\UCoolDockClientPanel.pas"/>
     701        <Caret Line="111" Column="1" TopLine="92"/>
    641702      </Position27>
    642703      <Position28>
    643         <Filename Value="..\UCoolDockPopupMenu.pas"/>
    644         <Caret Line="62" Column="13" TopLine="53"/>
     704        <Filename Value="..\UCoolDockClientPanel.pas"/>
     705        <Caret Line="186" Column="1" TopLine="174"/>
    645706      </Position28>
    646707      <Position29>
    647         <Filename Value="Demo.lpr"/>
    648         <Caret Line="20" Column="1" TopLine="1"/>
     708        <Filename Value="..\UCoolDockClientPanel.pas"/>
     709        <Caret Line="191" Column="1" TopLine="174"/>
    649710      </Position29>
    650711      <Position30>
    651         <Filename Value="Demo.lpr"/>
    652         <Caret Line="11" Column="11" TopLine="1"/>
     712        <Filename Value="UMainForm.pas"/>
     713        <Caret Line="75" Column="3" TopLine="59"/>
    653714      </Position30>
    654715    </JumpHistory>
     
    668729      <SyntaxOptions>
    669730        <SyntaxMode Value="Delphi"/>
     731        <CStyleOperator Value="False"/>
     732        <AllowLabel Value="False"/>
     733        <CPPInline Value="False"/>
    670734      </SyntaxOptions>
    671735    </Parsing>
  • Docking/CoolDocking/Demo/UDockForm.lfm

    r59 r103  
    77  ClientHeight = 240
    88  ClientWidth = 320
     9  OnDestroy = FormDestroy
    910  LCLVersion = '0.9.29'
    1011  object Memo1: TMemo
     
    1718  end
    1819  object CoolDockClient1: TCoolDockClient
    19     Dockable = True
     20    Floatable = False
    2021    Master = MainForm.CoolDockMaster1
    2122    left = 40
  • Docking/CoolDocking/Demo/UDockForm.pas

    r58 r103  
    1616    CoolDockClient1: TCoolDockClient;
    1717    Memo1: TMemo;
     18    procedure FormDestroy(Sender: TObject);
    1819  private
    1920    { private declarations }
     
    2930{$R *.lfm}
    3031
     32{ TDockForm }
     33
     34procedure TDockForm.FormDestroy(Sender: TObject);
     35var
     36  Temp: string;
     37begin
     38  Temp := Name;
     39end;
     40
    3141end.
    3242
  • Docking/CoolDocking/Demo/UMainForm.lfm

    r97 r103  
    4444    DefaultTabsPos = hpAuto
    4545    DefaultHeaderPos = hpAuto
     46    DefaultMoveSpeed = 0
    4647    Customize = CoolDockCustomize1
    4748    ShowIcons = False
  • Docking/CoolDocking/Demo/UMainForm.pas

    r97 r103  
    7171  //TCoolDockManager(ConjoinedDockForm1.Panel.DockManager).TabsPos := hpLeft;
    7272  ConjoinedDockForm1.ManualDock(Panel1);
    73   //TCoolDockManager(ConjoinedDockForm1.Panel.DockManager).DockStyle := dsTabs;
     73  TCoolDockManager(ConjoinedDockForm1.Panel.DockManager).DockStyle := dsTabs;
    7474  NewDockForm.ManualDock(ConjoinedDockForm1.Panel);
    7575  NewDockForm.ManualDock(ConjoinedDockForm1.Panel);
    76   NewDockForm.ManualDock(TForm(DockForms[0]));
    77   NewDockForm.ManualDock(TForm(DockForms[0]));
    78   NewDockForm.ManualDock(TForm(DockForms[0]));
    79 //  TCustomDockManager(TDockForm(DockForms[0]).DockManager).DockStyle := dsTabs;
     76  //NewDockForm.ManualDock(TForm(DockForms[0]));
     77  //NewDockForm.ManualDock(TForm(DockForms[0]));
     78  //NewDockForm.ManualDock(TForm(DockForms[0]));
     79  //TCustomDockManager(TDockForm(DockForms[0]).DockManager).DockStyle := dsTabs;
    8080end;
    8181
     
    9494  Result := TDockForm.Create(Self);
    9595  Result.Name := 'Form' + IntToStr(FormIndex);
     96  Result.Caption := Result.Name;
    9697  Result.Memo1.Text := Result.Name;
    9798  //Result.DragKind := dkDock;
  • Docking/CoolDocking/UCoolDockClientPanel.pas

    r98 r103  
    77uses
    88  Classes, Controls, SysUtils, Forms, StdCtrls, ExtCtrls, Graphics,
    9   Buttons, UCoolDockPopupMenu;
     9  Buttons;
    1010
    1111type
     
    3838    FHeaderPos: THeaderPos;
    3939    FShowHeader: Boolean;
     40    FControl: TControl;
    4041    function GetAutoHideEnabled: Boolean;
     42    function GetControl: TControl;
    4143    procedure SetAutoHide(const AValue: Boolean);
    4244    procedure SetAutoHideEnabled(const AValue: Boolean);
     45    procedure SetControl(const AValue: TControl);
    4346    procedure SetHeaderPos(const AValue: THeaderPos);
    4447    procedure SetShowHeader(const AValue: Boolean);
    4548  public
    4649    OwnerDockManager: TObject; // TCoolDockManager;
    47     Control: TControl;
    4850    Splitter: TSplitter;
    4951    ClientAreaPanel: TPanel;
     
    6062      write SetAutoHideEnabled;
    6163    property HeaderPos: THeaderPos read FHeaderPos write SetHeaderPos;
     64    property Control: TControl read GetControl write SetControl;
    6265  end;
    6366
     
    7881procedure TCoolDockClientPanel.VisibleChange(Sender: TObject);
    7982var
    80   Visible: Boolean;
    81 begin
    82   (*if Assigned(Control) then begin
    83     Visible := Control.Visible;
    84     if Assigned(ClientAreaPanel) then
    85       ClientAreaPanel.Visible := Visible;
     83  ControlVisible: Boolean;
     84  Temp: TControl;
     85  Temp2: TControl;
     86begin
     87  Temp := TControl(Sender);
     88  if Assigned(Control) then
     89  begin
     90
     91    ControlVisible := TControl(Sender).Visible;
     92    (*if Assigned(ClientAreaPanel) then
     93      ClientAreaPanel.Visible := ControlVisible;
    8694    if Assigned(Splitter) then
    87       Splitter.Visible := Visible;
    88     OwnerDockManager.UpdateClientSize;
    89   end;*)
     95      Splitter.Visible := ControlVisible;
     96      *)
     97//    if Assigned(TCoolDockManager(OwnerDockManager).DockStyleHandler) then
     98    if Assigned(OwnerDockManager) then
     99    with TCoolDockManager(OwnerDockManager) do
     100    if Assigned(DockStyleHandler) then
     101    with DockStyleHandler do begin
     102      if ControlVisible then
     103        Switch(DockPanels.IndexOf(FindControlInPanels(TControl(Sender))));
     104      //UpdateClientSize;
     105      ChangeVisible(TWinControl(Control), ControlVisible);
     106      // Show parent control
     107      Temp := TControl(Sender).HostDockSite;
     108
     109      if ControlVisible then
     110        TControl(Sender).HostDockSite.Visible := ControlVisible;
     111    end;
     112    if csDestroying in Control.ComponentState then Control := nil;
     113  end;
    90114end;
    91115
     
    100124end;
    101125
     126function TCoolDockClientPanel.GetControl: TControl;
     127begin
     128  Result := FControl;
     129end;
     130
    102131procedure TCoolDockClientPanel.SetAutoHideEnabled(const AValue: Boolean);
    103132begin
    104133
     134end;
     135
     136procedure TCoolDockClientPanel.SetControl(const AValue: TControl);
     137begin
     138  FControl := AValue;
    105139end;
    106140
     
    148182
    149183destructor TCoolDockClientPanel.Destroy;
    150 begin
     184var
     185  Temp: TControl;
     186begin
     187  Temp := Control;
     188  //if ClientAreaPanel.GetControlIndex(Control) <> - 1 then
     189  if Assigned(Control) then
     190    Control.RemoveHandlerOnVisibleChanged(VisibleChange);
     191  // If panel is destroyed undock docket control
     192  //TWinControl(Control).ManualFloat(TWinControl(Control).BoundsRect);
     193
    151194  inherited Destroy;
    152195end;
     
    154197procedure TCoolDockClientPanel.ResizeExecute(Sender: TObject);
    155198begin
    156   Control.Top := GrabberSize;
    157   Control.Left := 0;
    158   Control.Width := Width;
    159   Control.Height := Height - GrabberSize;
    160   //Control.SetBounds(0, GrabberSize, Width - Control.Left,
    161   //  Height - Control.Top);
     199  if Assigned(Control) then begin
     200    Control.Top := GrabberSize;
     201    Control.Left := 0;
     202    Control.Width := Width;
     203    Control.Height := Height - GrabberSize;
     204    //Control.SetBounds(0, GrabberSize, Width - Control.Left,
     205    //  Height - Control.Top);
     206  end;
    162207end;
    163208
  • Docking/CoolDocking/UCoolDockPopupMenu.pas

    r98 r103  
    66
    77uses
    8   Classes, SysUtils, Menus, Controls, Dialogs;
     8  Classes, SysUtils, Menus, Controls, Dialogs, UCoolDockClientPanel;
    99
    1010type
     
    1818    procedure PopupMenuListClick(Sender: TObject);
    1919    procedure PopupMenuTabsClick(Sender: TObject);
     20    procedure PopupMenuPopupListClick(Sender: TObject);
     21    procedure PopupMenuPopupTabsClick(Sender: TObject);
    2022    procedure PopupMenuCloseClick(Sender: TObject);
    2123    procedure PopupMenuRenameClick(Sender: TObject);
     
    3840  SDockList = 'List';
    3941  SDockTabs = 'Tabs';
     42  SDockPopupList = 'Popup list';
     43  SDockPopupTabs = 'Popup tabs';
    4044  SCloseForm = 'Close';
    4145  SRenameForm = 'Rename';
     
    6367  Manager := AManager;
    6468
     69  Name := TCoolDockManager(AManager).DockSite.Name + '_' + 'PopupMenu';
     70
    6571  NewMenuItem := TMenuItem.Create(Self);
    6672  NewMenuItem.Caption := SDockStyle;
     
    7783  NewMenuItem.Add(NewMenuItem2);
    7884
     85  NewMenuItem2 := TMenuItem.Create(NewMenuItem);
     86  NewMenuItem2.Caption := SDockPopupList;
     87  NewMenuItem2.OnClick := PopupMenuPopupListClick;
     88  NewMenuItem.Add(NewMenuItem2);
     89
     90  NewMenuItem2 := TMenuItem.Create(NewMenuItem);
     91  NewMenuItem2.Caption := SDockPopupTabs;
     92  NewMenuItem2.OnClick := PopupMenuPopupTabsClick;
     93  NewMenuItem.Add(NewMenuItem2);
     94
    7995  NewMenuItem := TMenuItem.Create(Self);
    8096  NewMenuItem.Caption := SPosition;
     
    125141  NewMenuItem.OnClick := PopupMenuCustomizeClick;
    126142  Items.Add(NewMenuItem);
    127 
    128   (*  // Tabs popup
    129 
    130   PopupMenuTabs := TPopupMenu.Create(FDockSite);
    131   PopupMenuTabs.Name := ADockSite.Name + '_' + 'PopupMenuTabs';
    132 
    133   NewMenuItem := TMenuItem.Create(PopupMenuTabs);
    134   NewMenuItem.Caption := SDockStyle;
    135   PopupMenuTabs.Items.Add(NewMenuItem);
    136 
    137   NewMenuItem2 := TMenuItem.Create(NewMenuItem);
    138   NewMenuItem2.Caption := SDockList;
    139   NewMenuItem2.OnClick := PopupMenuListClick;
    140   NewMenuItem.Add(NewMenuItem2);
    141 
    142   NewMenuItem2 := TMenuItem.Create(NewMenuItem);
    143   NewMenuItem2.Caption := SDockTabs;
    144   NewMenuItem2.OnClick := PopupMenuTabsClick;
    145   NewMenuItem.Add(NewMenuItem2);
    146 
    147   NewMenuItem := TMenuItem.Create(PopupMenuTabs);
    148   NewMenuItem.Caption := SPosition;
    149   PopupMenuTabs.Items.Add(NewMenuItem);
    150 
    151   NewMenuItem2 := TMenuItem.Create(NewMenuItem);
    152   NewMenuItem2.Caption := SPositionAuto;
    153   NewMenuItem2.OnClick := PopupMenuPositionAutoClick;
    154   NewMenuItem.Add(NewMenuItem2);
    155 
    156   NewMenuItem2 := TMenuItem.Create(NewMenuItem);
    157   NewMenuItem2.Caption := SPositionTop;
    158   NewMenuItem2.OnClick := PopupMenuPositionTopClick;
    159   NewMenuItem.Add(NewMenuItem2);
    160 
    161   NewMenuItem2 := TMenuItem.Create(NewMenuItem);
    162   NewMenuItem2.Caption := SPositionLeft;
    163   NewMenuItem2.OnClick := PopupMenuPositionLeftClick;
    164   NewMenuItem.Add(NewMenuItem2);
    165 
    166   NewMenuItem2 := TMenuItem.Create(NewMenuItem);
    167   NewMenuItem2.Caption := SPositionBottom;
    168   NewMenuItem2.OnClick := PopupMenuPositionBottomClick;
    169   NewMenuItem.Add(NewMenuItem2);
    170 
    171   NewMenuItem2 := TMenuItem.Create(NewMenuItem);
    172   NewMenuItem2.Caption := SPositionRight;
    173   NewMenuItem2.OnClick := PopupMenuPositionRightClick;
    174   NewMenuItem.Add(NewMenuItem2);
    175 
    176   NewMenuItem := TMenuItem.Create(PopupMenuTabs);
    177   NewMenuItem.Caption := SCloseForm;
    178   NewMenuItem.OnClick := PopupMenuCloseClick;
    179   PopupMenuTabs.Items.Add(NewMenuItem);
    180 
    181   NewMenuItem := TMenuItem.Create(PopupMenuTabs);
    182   NewMenuItem.Caption := SRenameForm;
    183   NewMenuItem.OnClick := PopupMenuRenameClick;
    184   PopupMenuTabs.Items.Add(NewMenuItem);
    185 
    186   NewMenuItem := TMenuItem.Create(PopupMenuTabs);
    187   NewMenuItem.Caption := SUndock;
    188   NewMenuItem.OnClick := PopupMenuUndockClick;
    189   PopupMenuTabs.Items.Add(NewMenuItem);
    190 
    191   NewMenuItem := TMenuItem.Create(PopupMenuTabs);
    192   NewMenuItem.Caption := SCustomize;
    193   NewMenuItem.OnClick := PopupMenuCustomizeClick;
    194   PopupMenuTabs.Items.Add(NewMenuItem);
    195 
    196   // Header popup
    197 
    198   PopupMenuHeader := TPopupMenu.Create(FDockSite);
    199   PopupMenuHeader.Name := ADockSite.Name + '_' + 'PopupMenuHeader';
    200 
    201   NewMenuItem := TMenuItem.Create(PopupMenuHeader);
    202   NewMenuItem.Caption := SDockStyle;
    203   PopupMenuHeader.Items.Add(NewMenuItem);
    204 
    205   NewMenuItem2 := TMenuItem.Create(NewMenuItem);
    206   NewMenuItem2.Caption := SDockList;
    207   NewMenuItem2.OnClick := PopupMenuListClick;
    208   NewMenuItem.Add(NewMenuItem2);
    209 
    210   NewMenuItem2 := TMenuItem.Create(NewMenuItem);
    211   NewMenuItem2.Caption := SDockTabs;
    212   NewMenuItem2.OnClick := PopupMenuTabsClick;
    213   NewMenuItem.Add(NewMenuItem2);
    214 
    215   NewMenuItem := TMenuItem.Create(PopupMenuHeader);
    216   NewMenuItem.Caption := SPosition;
    217   PopupMenuHeader.Items.Add(NewMenuItem);
    218 
    219   NewMenuItem2 := TMenuItem.Create(NewMenuItem);
    220   NewMenuItem2.Caption := SPositionAuto;
    221   NewMenuItem2.OnClick := PopupMenuPositionAutoClick;
    222   NewMenuItem.Add(NewMenuItem2);
    223 
    224   NewMenuItem2 := TMenuItem.Create(NewMenuItem);
    225   NewMenuItem2.Caption := SPositionTop;
    226   NewMenuItem2.OnClick := PopupMenuPositionTopClick;
    227   NewMenuItem.Add(NewMenuItem2);
    228 
    229   NewMenuItem2 := TMenuItem.Create(NewMenuItem);
    230   NewMenuItem2.Caption := SPositionLeft;
    231   NewMenuItem2.OnClick := PopupMenuPositionLeftClick;
    232   NewMenuItem.Add(NewMenuItem2);
    233 
    234   NewMenuItem2 := TMenuItem.Create(NewMenuItem);
    235   NewMenuItem2.Caption := SPositionBottom;
    236   NewMenuItem2.OnClick := PopupMenuPositionBottomClick;
    237   NewMenuItem.Add(NewMenuItem2);
    238 
    239   NewMenuItem2 := TMenuItem.Create(NewMenuItem);
    240   NewMenuItem2.Caption := SPositionRight;
    241   NewMenuItem2.OnClick := PopupMenuPositionRightClick;
    242   NewMenuItem.Add(NewMenuItem2);
    243 
    244   NewMenuItem := TMenuItem.Create(PopupMenuHeader);
    245   NewMenuItem.Caption := SCloseForm;
    246   NewMenuItem.OnClick := PopupMenuCloseClick;
    247   PopupMenuHeader.Items.Add(NewMenuItem);
    248 
    249   NewMenuItem := TMenuItem.Create(PopupMenuHeader);
    250   NewMenuItem.Caption := SRenameForm;
    251   NewMenuItem.OnClick := PopupMenuRenameClick;
    252   PopupMenuHeader.Items.Add(NewMenuItem);
    253 
    254   NewMenuItem := TMenuItem.Create(PopupMenuHeader);
    255   NewMenuItem.Caption := SUndock;
    256   NewMenuItem.OnClick := PopupMenuUndockClick;
    257   PopupMenuHeader.Items.Add(NewMenuItem);
    258 
    259   NewMenuItem := TMenuItem.Create(PopupMenuHeader);
    260   NewMenuItem.Caption := SCustomize;
    261   NewMenuItem.OnClick := PopupMenuCustomizeClick;
    262   PopupMenuHeader.Items.Add(NewMenuItem);
    263   *)
    264 
    265143end;
    266144
     
    268146begin
    269147  TCoolDockManager(Manager).DockStyle := dsTabs;
     148end;
     149
     150procedure TCoolDockPopupMenu.PopupMenuPopupListClick(Sender: TObject);
     151begin
     152  TCoolDockManager(Manager).DockStyle := dsPopupList;
     153end;
     154
     155procedure TCoolDockPopupMenu.PopupMenuPopupTabsClick(Sender: TObject);
     156begin
     157  TCoolDockManager(Manager).DockStyle := dsPopupTabs;
    270158end;
    271159
     
    277165  if Assigned(Control) then
    278166    ShowMessage(Control.ClassName);
    279 //  DockSiteTForm(TCoolDockManager(TControl(Sender).Parent.Parent.Parent.DockManager).FDockSite).Close;
     167  //DockSiteTForm(TCoolDockManager(TControl(Sender).Parent.Parent.Parent.DockManager).FDockSite).Close;
    280168end;
    281169
     
    291179procedure TCoolDockPopupMenu.PopupMenuPositionAutoClick(Sender: TObject);
    292180begin
    293   //TabsPos := hpAuto;
     181  TCoolDockManager(Manager).HeaderPos := hpAuto;
    294182end;
    295183
    296184procedure TCoolDockPopupMenu.PopupMenuPositionLeftClick(Sender: TObject);
    297 begin
    298   //TabsPos := hpLeft;
     185var
     186  Control: TControl;
     187begin
     188  Control := FindLCLControl(Mouse.CursorPos);
     189  TCoolDockManager(Manager).HeaderPos := hpLeft;
    299190end;
    300191
    301192procedure TCoolDockPopupMenu.PopupMenuPositionRightClick(Sender: TObject);
    302193begin
    303   //TabsPos := hpRight;
     194  TCoolDockManager(Manager).HeaderPos := hpRight;
    304195end;
    305196
    306197procedure TCoolDockPopupMenu.PopupMenuPositionTopClick(Sender: TObject);
    307198begin
    308   //TabsPos := hpTop;
     199  TCoolDockManager(Manager).HeaderPos := hpTop;
    309200end;
    310201
    311202procedure TCoolDockPopupMenu.PopupMenuPositionBottomClick(Sender: TObject);
    312203begin
    313   //TabsPos := hpBottom;
     204  TCoolDockManager(Manager).HeaderPos := hpBottom;
    314205end;
    315206
  • Docking/CoolDocking/UCoolDockStyle.pas

    r97 r103  
    99
    1010type
    11 
    1211  { TCoolDockStyle }
    1312
    1413  TCoolDockStyle = class
     14  private
     15  public
    1516    Manager: TObject; // TCoolDockManager;
     17    function GetHeaderPos: THeaderPos; virtual;
     18    procedure SetHeaderPos(const AValue: THeaderPos); virtual;
    1619    constructor Create(AManager: TObject);
    1720    procedure InsertControl(NewPanel: TCoolDockClientPanel; AControl: TControl;
    1821      InsertAt: TAlign); virtual;
    1922    procedure UpdateClientSize; virtual;
     23    procedure Switch(Index: Integer); virtual;
     24    procedure ChangeVisible(Control: TWinControl; Visible: Boolean); virtual;
     25    property HeaderPos: THeaderPos read GetHeaderPos write SetHeaderPos;
    2026  end;
    2127
     
    2632
    2733{ TCoolDockStyle }
     34
     35function TCoolDockStyle.GetHeaderPos: THeaderPos;
     36begin
     37
     38end;
     39
     40procedure TCoolDockStyle.SetHeaderPos(const AValue: THeaderPos);
     41begin
     42
     43end;
    2844
    2945constructor TCoolDockStyle.Create(AManager: TObject);
     
    4359end;
    4460
     61procedure TCoolDockStyle.Switch(Index: Integer);
     62begin
     63
     64end;
     65
     66procedure TCoolDockStyle.ChangeVisible(Control: TWinControl; Visible: Boolean);
     67begin
     68
     69end;
     70
    4571end.
    4672
  • Docking/CoolDocking/UCoolDockStylePopupTabs.pas

    r98 r103  
    77uses
    88  Classes, Controls, SysUtils, ComCtrls, ExtCtrls,
    9   UCoolDockStyleTabs, UCoolDockStyle;
     9  UCoolDockStyleTabs, UCoolDockStyle, UCoolDockClientPanel;
    1010
    1111type
     
    5252    constructor Create(AManager: TObject);
    5353    destructor Destroy; override;
     54  private
    5455  end;
    5556
     
    181182
    182183constructor TCoolDockStylePopupTabs.Create(AManager: TObject);
     184var
     185  I: Integer;
    183186begin
     187  inherited;
     188
    184189  AutoHide := TCoolDockAutoHide.Create;
    185   TabImageList := TImageList.Create(TCoolDockManager(AManager).DockSite);
    186   with TabImageList do begin
    187   end;
    188   TabControl := TTabControl.Create(TCoolDockManager(AManager).DockSite);
    189   with TabControl do begin
    190     Parent := TCoolDockManager(AManager).DockSite;
    191     Visible := False;
    192     Align := alTop;
    193     Height := 24;
    194     OnChange := TabControlChange;
    195     PopupMenu := TCoolDockManager(Manager).PopupMenu;
    196     TTabControlNoteBookStrings(Tabs).NoteBook.OnMouseLeave := TabControlMouseLeave;
    197     TTabControlNoteBookStrings(Tabs).NoteBook.OnMouseDown := TabControlMouseDown;
    198     TTabControlNoteBookStrings(Tabs).NoteBook.OnMouseUp := TabControlMouseUp;
    199     OnMouseUp := TabControlMouseUp;
    200     Images := TabImageList;
    201   end;
    202190end;
    203191
  • Docking/CoolDocking/UCoolDockStyleRegions.pas

    r97 r103  
    1717
    1818  TCoolDockStyleRegions = class(TCoolDockStyle)
    19     Header: TCoolDockHeader;
     19  private
     20  public
    2021    Panels: TObjectList; // TObjectList<TCoolDockStyleRegionsPanel>
     22    function GetHeaderPos: THeaderPos; override;
     23    procedure SetHeaderPos(const AValue: THeaderPos); override;
    2124    constructor Create(AManager: TObject);
    2225    destructor Destroy; override;
     
    3134
    3235{ TCoolDockStyleRegions }
     36
     37function TCoolDockStyleRegions.GetHeaderPos: THeaderPos;
     38begin
     39//  Result := TCoolDockManager(Manager).;
     40end;
     41
     42procedure TCoolDockStyleRegions.SetHeaderPos(const AValue: THeaderPos);
     43begin
     44  inherited SetHeaderPos(AValue);
     45end;
    3346
    3447constructor TCoolDockStyleRegions.Create(AManager: TObject);
     
    7285end;
    7386
    74 
    75 
    7687end.
    7788
  • Docking/CoolDocking/UCoolDockStyleTabs.pas

    r98 r103  
    66
    77uses
    8   Classes, Controls, ExtCtrls, ComCtrls, SysUtils,
     8  Classes, Controls, ExtCtrls, ComCtrls, SysUtils, Dialogs,
    99  Menus, UCoolDockStyle, Forms, UCoolDockClientPanel;
    1010
     
    2525    procedure TabControlMouseUp(Sender: TObject; Button: TMouseButton;
    2626      Shift: TShiftState; X, Y: Integer);
    27     constructor Create(AManager: TObject);
    28     destructor Destroy; override;
    2927    procedure InsertControl(NewPanel: TCoolDockClientPanel;
    3028      AControl: TControl; InsertAt: TAlign); override;
     
    3331    FTabsPos: THeaderPos;
    3432  public
     33    constructor Create(AManager: TObject);
     34    destructor Destroy; override;
     35    procedure ChangeVisible(Control: TWinControl; Visible: Boolean); override;
     36    procedure Switch(Index: Integer); override;
    3537    procedure SetTabsPos(const AValue: THeaderPos);
    3638    procedure PopupMenuTabCloseClick(Sender: TObject);
     
    5355procedure TCoolDockStyleTabs.TabControlMouseLeave(Sender: TObject);
    5456begin
    55 (*  if MouseDown then
     57  if MouseDown then
     58  with TCoolDockManager(Manager) do
    5659  if (TabControl.TabIndex <> -1) then begin
    57     TCoolDockClientPanel(FDockPanels[TabControl.TabIndex]).ClientAreaPanel.DockSite := False;
    58     DragManager.DragStart(TCoolDockClientPanel(FDockPanels[TabControl.TabIndex]).Control, False, 1);
     60    TCoolDockClientPanel(DockPanels[TabControl.TabIndex]).ClientAreaPanel.DockSite := False;
     61    DragManager.DragStart(TCoolDockClientPanel(DockPanels[TabControl.TabIndex]).Control, False, 1);
    5962  end;
    6063  MouseDown := False;
    61   *)
    6264end;
    6365
     
    6971  with TCoolDockManager(Manager) do
    7072  for I := 0 to DockPanels.Count - 1 do begin
    71     TCoolDockClientPanel(DockPanels[I]).ClientAreaPanel.Visible := False;
     73    TCoolDockClientPanel(DockPanels[I]).Control.Hide;
     74    TCoolDockClientPanel(DockPanels[I]).ClientAreaPanel.Hide;
    7275    TCoolDockClientPanel(DockPanels[I]).ClientAreaPanel.Parent := DockSite;
    7376    TCoolDockClientPanel(DockPanels[I]).Control.Align := alClient;
    74     TCoolDockClientPanel(DockPanels[I]).Control.Visible := False;
     77    //ShowMessage(TCoolDockClientPanel(DockPanels[I]).Control.ClassName);
     78    Application.ProcessMessages;
    7579
    7680    // Workaround for "Cannot focus" error
    7781    TForm(TCoolDockClientPanel(DockPanels[I]).Control).ActiveControl := nil;
    7882  end;
     83
     84  // Show selected
    7985  with TCoolDockManager(Manager) do
    8086  if (TabControl.TabIndex <> -1) and (DockPanels.Count > TabControl.TabIndex) then begin
     
    9399      *)
    94100        //Parent := DockSite;
     101        //Show;
    95102        Visible := True;
    96103        UpdateClientSize;
     
    160167    TCoolDockClientPanel(DockPanels[I]).Visible := False;
    161168  end;
    162   TabControlChange(Self);
    163169end;
    164170
    165171destructor TCoolDockStyleTabs.Destroy;
    166172begin
    167   TabControl.Visible := False;
    168   TabControl.Tabs.Clear;
     173  TabControl.Free;
     174  TabImageList.Free;
    169175  inherited Destroy;
     176end;
     177
     178procedure TCoolDockStyleTabs.Switch(Index: Integer);
     179begin
     180  inherited Switch(Index);
     181  TabControl.TabIndex := Index;
    170182end;
    171183
     
    196208end;
    197209
     210procedure TCoolDockStyleTabs.ChangeVisible(Control: TWinControl; Visible: Boolean);
     211var
     212  I: Integer;
     213begin
     214  inherited;
     215  if not Visible then
     216  if Assigned(TWinControl(Control).DockManager) then
     217  with TCoolDockManager(TWinControl(Control).DockManager) do begin
     218//    ShowMessage(IntToStr(DockPanels.Count));
     219  end;
     220end;
     221
    198222procedure TCoolDockStyleTabs.SetTabsPos(const AValue: THeaderPos);
    199223begin
  • Docking/CoolDocking/UCoolDocking.pas

    r98 r103  
    3232    CoolDockClient: TCoolDockClient;
    3333    procedure FormShow(Sender : TObject);
     34    procedure FormHide(Sender : TObject);
    3435    constructor Create(TheOwner: TComponent); override;
     36    destructor Destroy; override;
     37  private
     38    procedure PanelVisibleChange(Sender: TObject);
    3539  end;
    3640
    3741  TDockStyle = (dsList, dsTabs, dsPopupTabs, dsPopupList);
     42
     43  // TObjectList<TCoolDockClientPanel>
     44
     45  { TCoolDockPanels }
     46
     47  TCoolDockPanels = class(TObjectList)
     48    destructor Destroy; override;
     49  end;
    3850
    3951  { TCoolDockManager }
     
    4254  private
    4355    FMaster: TCoolDockMaster;
    44     DockStyleHandler: TCoolDockStyle;
    4556    FDockStyle: TDockStyle;
    4657    FDockDirection: TDockDirection;
    4758    FDockSite: TWinControl;
    48     FDockPanels: TObjectList; // TObjectList<TCoolDockClientPanel>
    49     function FindControlInPanels(Control: TControl): TCoolDockClientPanel;
     59    FDockPanels: TCoolDockPanels;
    5060    function GetDockSite: TWinControl;
     61    function GetHeaderPos: THeaderPos;
    5162    function GetMoveDuration: Integer;
    5263    procedure InsertControlPanel(Control: TControl; InsertAt: TAlign;
    5364      DropCtl: TControl);
    5465    procedure SetDockStyle(const AValue: TDockStyle);
     66    procedure SetHeaderPos(const AValue: THeaderPos);
    5567    procedure SetMaster(const AValue: TCoolDockMaster);
    5668    procedure SetMoveDuration(const AValue: Integer);
     69    procedure SetVisible(const AValue: Boolean);
    5770    procedure UpdateClientSize;
    5871  public
     72    DockStyleHandler: TCoolDockStyle;
    5973    PopupMenu: TCoolDockPopupMenu;
    6074    constructor Create(ADockSite: TWinControl); override;
     
    8296    function AutoFreeByControl: Boolean; override;
    8397
     98    function FindControlInPanels(Control: TControl): TCoolDockClientPanel;
    8499    function CreateContainer(InsertAt: TAlign): TCoolDockConjoinForm;
    85     property DockPanels: TObjectList read FDockPanels write FDockPanels;
     100    property DockPanels: TCoolDockPanels read FDockPanels write FDockPanels;
    86101    property DockStyle: TDockStyle read FDockStyle write SetDockStyle;
    87102    property MoveDuration: Integer read GetMoveDuration write SetMoveDuration;
    88103    property Master: TCoolDockMaster read FMaster write SetMaster;
    89104    property DockSite: TWinControl read GetDockSite;
     105    property HeaderPos: THeaderPos read GetHeaderPos write SetHeaderPos;
     106    property Visible: Boolean write SetVisible;
    90107  end;
    91108
     
    194211end;
    195212
     213{ TCoolDockPanels }
     214
     215destructor TCoolDockPanels.Destroy;
     216var
     217  Temp: Integer;
     218begin
     219  Temp := Count;
     220  inherited Destroy;
     221end;
     222
    196223
    197224{ TCoolDockManager }
     
    214241end;
    215242
     243function TCoolDockManager.GetHeaderPos: THeaderPos;
     244begin
     245
     246end;
     247
    216248function TCoolDockManager.GetMoveDuration: Integer;
    217249begin
     
    226258  inherited Create(ADockSite);
    227259  FDockSite := ADockSite;
    228   FDockPanels := TObjectList.Create;
     260  FDockPanels := TCoolDockPanels.Create;
    229261
    230262  FDockStyle := dsTabs; // To initialize style value have to be different
    231263  DockStyle := dsList;
    232264  PopupMenu := TCoolDockPopupMenu.Create(Self);
     265  PopupMenu.Parent := ADockSite;
    233266end;
    234267
     
    236269begin
    237270  PopupMenu.Free;
     271  DockStyleHandler.Free;
    238272  FDockPanels.Free;
    239   DockStyleHandler.Free;
    240273  inherited Destroy;
    241274end;
     
    309342      if DockStyle = dsList then Visible := True;
    310343      Align := alClient;
    311       Header.PopupMenu := PopupMenu;
     344      Header.PopupMenu := Self.PopupMenu;
     345      //PopupMenu.Parent := Self.DockSite;
    312346    end;
    313347    if (Control is TForm) and Assigned((Control as TForm).Icon) then
     
    417451  if Control.HostDockSite = Self.FDockSite then begin
    418452    ClientPanel := FindControlInPanels(Control);
     453
    419454    //if Assigned(ClientPanel) then ClientPanel.Splitter.Free;
     455    //Control.RemoveHandlerOnVisibleChanged(ClientPanel.VisibleChange);
    420456    FDockPanels.Remove(ClientPanel);
    421457    if FDockSite.DockClientCount = 2 then FDockDirection := ddNone;
     
    474510    if AValue = dsTabs then begin
    475511      DockStyleHandler := TCoolDockStyleTabs.Create(Self);
     512      TCoolDockStyleTabs(DockStyleHandler).TabControlChange(Self);
    476513    end else
    477514    if AValue = dsList then begin
     
    488525end;
    489526
     527procedure TCoolDockManager.SetHeaderPos(const AValue: THeaderPos);
     528begin
     529
     530end;
     531
    490532procedure TCoolDockManager.SetMaster(const AValue: TCoolDockMaster);
    491533begin
     
    498540end;
    499541
     542procedure TCoolDockManager.SetVisible(const AValue: Boolean);
     543var
     544  I: Integer;
     545begin
     546//  for I := 0 to DockPanels.Count - 1 do
     547//    TCoolDockClientPanel(DockPanels[I]).Visible := AValue;
     548end;
     549
    500550procedure TCoolDockManager.UpdateClientSize;
    501551begin
     
    507557procedure TCoolDockConjoinForm.FormShow(Sender: TObject);
    508558begin
    509   //Panel.Show;
     559  Panel.Show;
     560  TCoolDockManager(Panel.DockManager).Visible := True;
     561end;
     562
     563procedure TCoolDockConjoinForm.FormHide(Sender: TObject);
     564var
     565  I: Integer;
     566begin
     567  Panel.Hide;
     568  TCoolDockManager(Panel.DockManager).Visible := False;
     569  // Hide all docked childs
     570  with TCoolDockManager(Panel.DockManager) do
     571  for I := 0 to DockPanels.Count - 1 do
     572    if Assigned(TCoolDockClientPanel(DockPanels[I]).Control) then
     573    TCoolDockClientPanel(DockPanels[I]).Control.Hide;
    510574end;
    511575
     
    517581    Parent := Self;
    518582    Name := Parent.Name + '_Panel';
     583    Caption := '';
    519584    DockSite := True;
    520585    UseDockManager := True;
     
    530595  end;
    531596  OnShow := FormShow;
     597  OnHide := FormHide;
     598
     599  Panel.AddHandlerOnVisibleChanged(PanelVisibleChange);
     600end;
     601
     602destructor TCoolDockConjoinForm.Destroy;
     603begin
     604  Panel.RemoveHandlerOnVisibleChanged(PanelVisibleChange);
     605  inherited;
     606end;
     607
     608procedure TCoolDockConjoinForm.PanelVisibleChange(Sender: TObject);
     609begin
     610  Visible := Panel.Visible;
    532611end;
    533612
  • Docking/CoolDocking/languages/UCoolDockPopupMenu.po

    r98 r103  
    1212#: ucooldockpopupmenu.sdocklist
    1313msgid "List"
     14msgstr ""
     15
     16#: ucooldockpopupmenu.sdockpopuplist
     17msgid "Popup list"
     18msgstr ""
     19
     20#: ucooldockpopupmenu.sdockpopuptabs
     21msgid "Popup tabs"
    1422msgstr ""
    1523
Note: See TracChangeset for help on using the changeset viewer.