Changeset 97


Ignore:
Timestamp:
Dec 9, 2010, 2:15:54 PM (14 years ago)
Author:
george
Message:
  • Upraveno: Rozdělení zobrazovaných stylů do více jednotek.
Location:
Docking/CoolDocking
Files:
2 added
12 edited

Legend:

Unmodified
Added
Removed
  • Docking/CoolDocking/CoolDocking.lpk

    r96 r97  
    2525    <Description Value="Set of components for docking of windows."/>
    2626    <Version Minor="1"/>
    27     <Files Count="8">
     27    <Files Count="10">
    2828      <Item1>
    2929        <Filename Value="UCoolDocking.pas"/>
     
    5959        <UnitName Value="UCoolDockStylePopupRegions"/>
    6060      </Item8>
     61      <Item9>
     62        <Filename Value="UCoolDockStyle.pas"/>
     63        <UnitName Value="UCoolDockStyle"/>
     64      </Item9>
     65      <Item10>
     66        <Filename Value="UCoolDockClientPanel.pas"/>
     67        <UnitName Value="UCoolDockClientPanel"/>
     68      </Item10>
    6169    </Files>
    6270    <i18n>
  • Docking/CoolDocking/CoolDocking.pas

    r89 r97  
    1010    UCoolDocking, UCoolDockCustomize, UCoolDockWindowList, UCoolDockStyleTabs,
    1111  UCoolDockStyleRegions, UCoolDockStylePopupTabs, UCoolDockStylePopupRegions,
    12   LazarusPackageIntf;
     12  UCoolDockStyle, UCoolDockClientPanel, LazarusPackageIntf;
    1313
    1414implementation
  • Docking/CoolDocking/Demo/Demo.lpi

    r96 r97  
    3838      </Item2>
    3939    </RequiredPackages>
    40     <Units Count="57">
     40    <Units Count="54">
    4141      <Unit0>
    4242        <Filename Value="Demo.lpr"/>
     
    4545        <WindowIndex Value="0"/>
    4646        <TopLine Value="1"/>
    47         <CursorPos X="6" Y="10"/>
    48         <UsageCount Value="128"/>
     47        <CursorPos X="11" Y="14"/>
     48        <UsageCount Value="183"/>
    4949        <DefaultSyntaxHighlighter Value="Delphi"/>
    5050      </Unit0>
     
    5555        <ResourceBaseClass Value="Form"/>
    5656        <UnitName Value="UMainForm"/>
    57         <EditorIndex Value="10"/>
    58         <WindowIndex Value="0"/>
    59         <TopLine Value="65"/>
    60         <CursorPos X="47" Y="78"/>
    61         <UsageCount Value="128"/>
     57        <EditorIndex Value="5"/>
     58        <WindowIndex Value="0"/>
     59        <TopLine Value="58"/>
     60        <CursorPos X="5" Y="73"/>
     61        <UsageCount Value="183"/>
    6262        <Loaded Value="True"/>
    6363        <LoadedDesigner Value="True"/>
     
    6767        <Filename Value="E:\Programy\Lazarus\lcl\controls.pp"/>
    6868        <UnitName Value="Controls"/>
    69         <EditorIndex Value="5"/>
    70         <WindowIndex Value="0"/>
    71         <TopLine Value="1916"/>
    72         <CursorPos X="14" Y="1929"/>
    73         <UsageCount Value="63"/>
    74         <Loaded Value="True"/>
     69        <WindowIndex Value="0"/>
     70        <TopLine Value="1359"/>
     71        <CursorPos X="14" Y="1399"/>
     72        <UsageCount Value="58"/>
    7573      </Unit2>
    7674      <Unit3>
     
    8078        <TopLine Value="98"/>
    8179        <CursorPos X="27" Y="110"/>
    82         <UsageCount Value="16"/>
     80        <UsageCount Value="10"/>
    8381        <DefaultSyntaxHighlighter Value="Delphi"/>
    8482      </Unit3>
    8583      <Unit4>
    8684        <Filename Value="E:\Programy\Lazarus\lcl\include\control.inc"/>
    87         <EditorIndex Value="7"/>
    8885        <WindowIndex Value="0"/>
    8986        <TopLine Value="4767"/>
    90         <CursorPos X="1" Y="4794"/>
    91         <UsageCount Value="56"/>
    92         <Loaded Value="True"/>
     87        <CursorPos X="59" Y="4774"/>
     88        <UsageCount Value="51"/>
    9389      </Unit4>
    9490      <Unit5>
    9591        <Filename Value="E:\Programy\Lazarus\lcl\include\wincontrol.inc"/>
    96         <EditorIndex Value="14"/>
    9792        <WindowIndex Value="0"/>
    9893        <TopLine Value="3429"/>
    9994        <CursorPos X="1" Y="3442"/>
    100         <UsageCount Value="61"/>
    101         <Loaded Value="True"/>
     95        <UsageCount Value="56"/>
    10296      </Unit5>
    10397      <Unit6>
    104         <Filename Value="E:\Programy\Lazarus\lcl\lclclasses.pp"/>
    105         <UnitName Value="LCLClasses"/>
    106         <WindowIndex Value="0"/>
    107         <TopLine Value="28"/>
    108         <CursorPos X="54" Y="32"/>
    109         <UsageCount Value="3"/>
     98        <Filename Value="E:\Programy\Lazarus\fpc\2.4.0\source\rtl\objpas\classes\classesh.inc"/>
     99        <WindowIndex Value="0"/>
     100        <TopLine Value="490"/>
     101        <CursorPos X="3" Y="497"/>
     102        <UsageCount Value="23"/>
    110103      </Unit6>
    111104      <Unit7>
    112         <Filename Value="E:\Programy\Lazarus\fpc\2.4.0\source\rtl\objpas\classes\classesh.inc"/>
    113         <WindowIndex Value="0"/>
    114         <TopLine Value="490"/>
    115         <CursorPos X="3" Y="497"/>
    116         <UsageCount Value="29"/>
     105        <Filename Value="E:\Programy\Lazarus\fpc\2.4.0\source\rtl\inc\objpash.inc"/>
     106        <WindowIndex Value="0"/>
     107        <TopLine Value="206"/>
     108        <CursorPos X="8" Y="219"/>
     109        <UsageCount Value="0"/>
    117110      </Unit7>
    118111      <Unit8>
    119         <Filename Value="E:\Programy\Lazarus\fpc\2.4.0\source\rtl\inc\objpash.inc"/>
    120         <WindowIndex Value="0"/>
    121         <TopLine Value="206"/>
    122         <CursorPos X="8" Y="219"/>
    123         <UsageCount Value="6"/>
     112        <Filename Value="E:\Programy\Lazarus\lcl\lclproc.pas"/>
     113        <UnitName Value="LCLProc"/>
     114        <WindowIndex Value="0"/>
     115        <TopLine Value="2412"/>
     116        <CursorPos X="38" Y="2417"/>
     117        <UsageCount Value="21"/>
    124118      </Unit8>
    125119      <Unit9>
    126         <Filename Value="E:\Programy\Lazarus\lcl\lcltype.pp"/>
    127         <UnitName Value="LCLType"/>
    128         <WindowIndex Value="0"/>
    129         <TopLine Value="114"/>
    130         <CursorPos X="3" Y="127"/>
    131         <UsageCount Value="1"/>
    132       </Unit9>
    133       <Unit10>
    134         <Filename Value="E:\Programy\Lazarus\lcl\lclproc.pas"/>
    135         <UnitName Value="LCLProc"/>
    136         <EditorIndex Value="12"/>
    137         <WindowIndex Value="0"/>
    138         <TopLine Value="2412"/>
    139         <CursorPos X="38" Y="2417"/>
    140         <UsageCount Value="26"/>
    141         <Loaded Value="True"/>
    142       </Unit10>
    143       <Unit11>
    144         <Filename Value="E:\Programy\Lazarus\fpc\2.4.0\source\rtl\objpas\classes\streams.inc"/>
    145         <WindowIndex Value="0"/>
    146         <TopLine Value="417"/>
    147         <CursorPos X="60" Y="434"/>
    148         <UsageCount Value="1"/>
    149       </Unit11>
    150       <Unit12>
    151         <Filename Value="E:\Programy\Lazarus\fpc\2.4.0\source\rtl\objpas\sysutils\filutilh.inc"/>
    152         <WindowIndex Value="0"/>
    153         <TopLine Value="67"/>
    154         <CursorPos X="10" Y="80"/>
    155         <UsageCount Value="1"/>
    156       </Unit12>
    157       <Unit13>
    158         <Filename Value="E:\Programy\Lazarus\fpc\2.4.0\source\rtl\win\sysutils.pp"/>
    159         <UnitName Value="sysutils"/>
    160         <WindowIndex Value="0"/>
    161         <TopLine Value="280"/>
    162         <CursorPos X="3" Y="282"/>
    163         <UsageCount Value="3"/>
    164       </Unit13>
    165       <Unit14>
    166         <Filename Value="E:\Programy\Lazarus\lcl\include\docktree.inc"/>
    167         <WindowIndex Value="0"/>
    168         <TopLine Value="200"/>
    169         <CursorPos X="3" Y="218"/>
    170         <UsageCount Value="3"/>
    171       </Unit14>
    172       <Unit15>
    173120        <Filename Value="UDockForm.pas"/>
    174121        <IsPartOfProject Value="True"/>
     
    180127        <TopLine Value="7"/>
    181128        <CursorPos X="33" Y="21"/>
    182         <UsageCount Value="127"/>
    183         <DefaultSyntaxHighlighter Value="Delphi"/>
     129        <UsageCount Value="182"/>
     130        <DefaultSyntaxHighlighter Value="Delphi"/>
     131      </Unit9>
     132      <Unit10>
     133        <Filename Value="E:\Programy\Lazarus\lcl\graphics.pp"/>
     134        <UnitName Value="Graphics"/>
     135        <WindowIndex Value="0"/>
     136        <TopLine Value="971"/>
     137        <CursorPos X="3" Y="984"/>
     138        <UsageCount Value="10"/>
     139      </Unit10>
     140      <Unit11>
     141        <Filename Value="E:\Programy\Lazarus\lcl\stdctrls.pp"/>
     142        <UnitName Value="StdCtrls"/>
     143        <WindowIndex Value="0"/>
     144        <TopLine Value="819"/>
     145        <CursorPos X="28" Y="826"/>
     146        <UsageCount Value="24"/>
     147      </Unit11>
     148      <Unit12>
     149        <Filename Value="E:\Projekty jine\Lazarus\examples\anchordocking\anchordocking.pas"/>
     150        <UnitName Value="AnchorDocking"/>
     151        <WindowIndex Value="0"/>
     152        <TopLine Value="4756"/>
     153        <CursorPos X="5" Y="4763"/>
     154        <UsageCount Value="5"/>
     155        <DefaultSyntaxHighlighter Value="Delphi"/>
     156      </Unit12>
     157      <Unit13>
     158        <Filename Value="..\UCoolDockManager.pas"/>
     159        <UnitName Value="UCoolDockManager"/>
     160        <WindowIndex Value="0"/>
     161        <TopLine Value="702"/>
     162        <CursorPos X="10" Y="719"/>
     163        <UsageCount Value="19"/>
     164        <DefaultSyntaxHighlighter Value="Delphi"/>
     165      </Unit13>
     166      <Unit14>
     167        <Filename Value="E:\Programy\Lazarus\lcl\extctrls.pp"/>
     168        <UnitName Value="ExtCtrls"/>
     169        <WindowIndex Value="0"/>
     170        <TopLine Value="1215"/>
     171        <CursorPos X="3" Y="1228"/>
     172        <UsageCount Value="54"/>
     173      </Unit14>
     174      <Unit15>
     175        <Filename Value="E:\Programy\Lazarus\lcl\interfaces\win32\win32wsbuttons.pp"/>
     176        <UnitName Value="Win32WSButtons"/>
     177        <WindowIndex Value="0"/>
     178        <TopLine Value="480"/>
     179        <CursorPos X="37" Y="496"/>
     180        <UsageCount Value="5"/>
    184181      </Unit15>
    185182      <Unit16>
    186         <Filename Value="E:\Programy\Lazarus\lcl\graphics.pp"/>
    187         <UnitName Value="Graphics"/>
    188         <WindowIndex Value="0"/>
    189         <TopLine Value="1089"/>
    190         <CursorPos X="15" Y="1096"/>
    191         <UsageCount Value="12"/>
     183        <Filename Value="E:\Programy\Lazarus\lcl\include\dragmanager.inc"/>
     184        <WindowIndex Value="0"/>
     185        <TopLine Value="52"/>
     186        <CursorPos X="30" Y="65"/>
     187        <UsageCount Value="5"/>
    192188      </Unit16>
    193189      <Unit17>
    194         <Filename Value="E:\Programy\Lazarus\lcl\stdctrls.pp"/>
    195         <UnitName Value="StdCtrls"/>
    196         <WindowIndex Value="0"/>
    197         <TopLine Value="819"/>
    198         <CursorPos X="28" Y="826"/>
    199         <UsageCount Value="30"/>
     190        <Filename Value="E:\Programy\Lazarus\lcl\include\customform.inc"/>
     191        <WindowIndex Value="0"/>
     192        <TopLine Value="2573"/>
     193        <CursorPos X="36" Y="2586"/>
     194        <UsageCount Value="6"/>
    200195      </Unit17>
    201196      <Unit18>
    202         <Filename Value="E:\Projekty jine\Lazarus\examples\anchordocking\anchordocking.pas"/>
    203         <UnitName Value="AnchorDocking"/>
    204         <WindowIndex Value="0"/>
    205         <TopLine Value="4756"/>
    206         <CursorPos X="5" Y="4763"/>
    207         <UsageCount Value="11"/>
    208         <DefaultSyntaxHighlighter Value="Delphi"/>
     197        <Filename Value="E:\Programy\Lazarus\lcl\widgetset\wscontrols.pp"/>
     198        <UnitName Value="WSControls"/>
     199        <WindowIndex Value="0"/>
     200        <TopLine Value="267"/>
     201        <CursorPos X="1" Y="269"/>
     202        <UsageCount Value="2"/>
    209203      </Unit18>
    210204      <Unit19>
    211         <Filename Value="E:\Programy\Lazarus\lcl\buttons.pp"/>
    212         <UnitName Value="Buttons"/>
    213         <WindowIndex Value="0"/>
    214         <TopLine Value="362"/>
    215         <CursorPos X="21" Y="369"/>
    216         <UsageCount Value="2"/>
     205        <Filename Value="E:\Programy\Lazarus\lcl\comctrls.pp"/>
     206        <UnitName Value="ComCtrls"/>
     207        <WindowIndex Value="0"/>
     208        <TopLine Value="553"/>
     209        <CursorPos X="44" Y="560"/>
     210        <UsageCount Value="7"/>
    217211      </Unit19>
    218212      <Unit20>
    219         <Filename Value="..\UCoolDockManager.pas"/>
    220         <UnitName Value="UCoolDockManager"/>
    221         <WindowIndex Value="0"/>
    222         <TopLine Value="702"/>
    223         <CursorPos X="10" Y="719"/>
    224         <UsageCount Value="25"/>
    225         <DefaultSyntaxHighlighter Value="Delphi"/>
     213        <Filename Value="E:\Programy\Lazarus\lcl\forms.pp"/>
     214        <UnitName Value="Forms"/>
     215        <WindowIndex Value="0"/>
     216        <TopLine Value="492"/>
     217        <CursorPos X="14" Y="505"/>
     218        <UsageCount Value="30"/>
    226219      </Unit20>
    227220      <Unit21>
    228         <Filename Value="E:\Programy\Lazarus\lcl\extctrls.pp"/>
    229         <UnitName Value="ExtCtrls"/>
    230         <EditorIndex Value="4"/>
    231         <WindowIndex Value="0"/>
    232         <TopLine Value="263"/>
    233         <CursorPos X="3" Y="273"/>
    234         <UsageCount Value="28"/>
    235         <Loaded Value="True"/>
     221        <Filename Value="E:\Programy\Lazarus\lcl\themes.pas"/>
     222        <UnitName Value="Themes"/>
     223        <WindowIndex Value="0"/>
     224        <TopLine Value="2148"/>
     225        <CursorPos X="21" Y="2148"/>
     226        <UsageCount Value="26"/>
    236227      </Unit21>
    237228      <Unit22>
    238         <Filename Value="E:\Programy\Lazarus\lcl\interfaces\win32\win32wsbuttons.pp"/>
    239         <UnitName Value="Win32WSButtons"/>
    240         <EditorIndex Value="15"/>
    241         <WindowIndex Value="0"/>
    242         <TopLine Value="480"/>
    243         <CursorPos X="37" Y="496"/>
    244         <UsageCount Value="10"/>
     229        <Filename Value="..\UCoolDocking.pas"/>
     230        <UnitName Value="UCoolDocking"/>
     231        <EditorIndex Value="0"/>
     232        <WindowIndex Value="0"/>
     233        <TopLine Value="618"/>
     234        <CursorPos X="29" Y="632"/>
     235        <UsageCount Value="82"/>
    245236        <Loaded Value="True"/>
     237        <DefaultSyntaxHighlighter Value="Delphi"/>
    246238      </Unit22>
    247239      <Unit23>
    248         <Filename Value="E:\Programy\Lazarus\lcl\include\dragmanager.inc"/>
    249         <WindowIndex Value="0"/>
    250         <TopLine Value="52"/>
    251         <CursorPos X="30" Y="65"/>
    252         <UsageCount Value="11"/>
     240        <Filename Value="..\ReadMe.txt"/>
     241        <WindowIndex Value="0"/>
     242        <TopLine Value="1"/>
     243        <CursorPos X="18" Y="11"/>
     244        <UsageCount Value="19"/>
     245        <DefaultSyntaxHighlighter Value="None"/>
    253246      </Unit23>
    254247      <Unit24>
    255         <Filename Value="E:\Programy\Lazarus\lcl\include\customform.inc"/>
    256         <EditorIndex Value="11"/>
    257         <WindowIndex Value="0"/>
    258         <TopLine Value="2573"/>
    259         <CursorPos X="36" Y="2586"/>
    260         <UsageCount Value="11"/>
    261         <Loaded Value="True"/>
     248        <Filename Value="E:\Programy\Lazarus\fpc\2.4.0\source\rtl\objpas\classes\lists.inc"/>
     249        <WindowIndex Value="0"/>
     250        <TopLine Value="619"/>
     251        <CursorPos X="22" Y="621"/>
     252        <UsageCount Value="19"/>
    262253      </Unit24>
    263254      <Unit25>
    264         <Filename Value="E:\Programy\Lazarus\lcl\widgetset\wscontrols.pp"/>
    265         <UnitName Value="WSControls"/>
    266         <WindowIndex Value="0"/>
    267         <TopLine Value="267"/>
    268         <CursorPos X="1" Y="269"/>
    269         <UsageCount Value="8"/>
     255        <Filename Value="E:\Programy\Lazarus\lcl\include\custompanel.inc"/>
     256        <WindowIndex Value="0"/>
     257        <TopLine Value="27"/>
     258        <CursorPos X="3" Y="32"/>
     259        <UsageCount Value="19"/>
    270260      </Unit25>
    271261      <Unit26>
    272         <Filename Value="E:\Programy\Lazarus\lcl\comctrls.pp"/>
    273         <UnitName Value="ComCtrls"/>
    274         <EditorIndex Value="2"/>
    275         <WindowIndex Value="0"/>
    276         <TopLine Value="553"/>
    277         <CursorPos X="29" Y="560"/>
    278         <UsageCount Value="12"/>
    279         <Loaded Value="True"/>
     262        <Filename Value="E:\Programy\Lazarus\lcl\include\customcontrol.inc"/>
     263        <WindowIndex Value="0"/>
     264        <TopLine Value="50"/>
     265        <CursorPos X="18" Y="61"/>
     266        <UsageCount Value="19"/>
    280267      </Unit26>
    281268      <Unit27>
    282         <Filename Value="E:\Programy\Lazarus\lcl\forms.pp"/>
    283         <UnitName Value="Forms"/>
    284         <EditorIndex Value="13"/>
    285         <WindowIndex Value="0"/>
    286         <TopLine Value="492"/>
    287         <CursorPos X="14" Y="505"/>
    288         <UsageCount Value="35"/>
    289         <Loaded Value="True"/>
     269        <Filename Value="E:\Programy\Lazarus\lcl\include\controlsproc.inc"/>
     270        <WindowIndex Value="0"/>
     271        <TopLine Value="84"/>
     272        <CursorPos X="45" Y="90"/>
     273        <UsageCount Value="19"/>
    290274      </Unit27>
    291275      <Unit28>
    292         <Filename Value="E:\Programy\Lazarus\lcl\themes.pas"/>
    293         <UnitName Value="Themes"/>
    294         <EditorIndex Value="0"/>
    295         <WindowIndex Value="0"/>
    296         <TopLine Value="2148"/>
    297         <CursorPos X="21" Y="2148"/>
    298         <UsageCount Value="31"/>
    299         <Loaded Value="True"/>
    300       </Unit28>
    301       <Unit29>
    302         <Filename Value="E:\Programy\Lazarus\lcl\menus.pp"/>
    303         <UnitName Value="Menus"/>
    304         <WindowIndex Value="0"/>
    305         <TopLine Value="374"/>
    306         <CursorPos X="3" Y="387"/>
    307         <UsageCount Value="2"/>
    308       </Unit29>
    309       <Unit30>
    310         <Filename Value="..\..\..\ExceptionLogger\UExceptionLogger.pas"/>
    311         <UnitName Value="UExceptionLogger"/>
    312         <WindowIndex Value="0"/>
    313         <TopLine Value="49"/>
    314         <CursorPos X="1" Y="56"/>
    315         <UsageCount Value="4"/>
    316         <DefaultSyntaxHighlighter Value="Delphi"/>
    317       </Unit30>
    318       <Unit31>
    319         <Filename Value="E:\Programy\Lazarus\lcl\customtimer.pas"/>
    320         <UnitName Value="CustomTimer"/>
    321         <WindowIndex Value="0"/>
    322         <TopLine Value="68"/>
    323         <CursorPos X="3" Y="77"/>
    324         <UsageCount Value="2"/>
    325       </Unit31>
    326       <Unit32>
    327         <Filename Value="E:\Programy\Lazarus\lcl\interfaces\win32\win32wsforms.pp"/>
    328         <UnitName Value="Win32WSForms"/>
    329         <WindowIndex Value="0"/>
    330         <TopLine Value="341"/>
    331         <CursorPos X="1" Y="354"/>
    332         <UsageCount Value="2"/>
    333       </Unit32>
    334       <Unit33>
    335         <Filename Value="..\UCoolDocking.pas"/>
    336         <UnitName Value="UCoolDocking"/>
    337         <IsVisibleTab Value="True"/>
    338         <EditorIndex Value="1"/>
    339         <WindowIndex Value="0"/>
    340         <TopLine Value="819"/>
    341         <CursorPos X="78" Y="826"/>
    342         <UsageCount Value="54"/>
    343         <Loaded Value="True"/>
    344         <DefaultSyntaxHighlighter Value="Delphi"/>
    345       </Unit33>
    346       <Unit34>
    347         <Filename Value="..\ReadMe.txt"/>
    348         <WindowIndex Value="0"/>
    349         <TopLine Value="1"/>
    350         <CursorPos X="18" Y="11"/>
    351         <UsageCount Value="25"/>
    352         <DefaultSyntaxHighlighter Value="None"/>
    353       </Unit34>
    354       <Unit35>
    355         <Filename Value="E:\Programy\Lazarus\fpc\2.4.0\source\rtl\objpas\classes\lists.inc"/>
    356         <WindowIndex Value="0"/>
    357         <TopLine Value="619"/>
    358         <CursorPos X="22" Y="621"/>
    359         <UsageCount Value="25"/>
    360       </Unit35>
    361       <Unit36>
    362         <Filename Value="E:\Programy\Lazarus\lcl\include\custompanel.inc"/>
    363         <WindowIndex Value="0"/>
    364         <TopLine Value="27"/>
    365         <CursorPos X="3" Y="32"/>
    366         <UsageCount Value="25"/>
    367       </Unit36>
    368       <Unit37>
    369         <Filename Value="E:\Programy\Lazarus\lcl\include\customcontrol.inc"/>
    370         <WindowIndex Value="0"/>
    371         <TopLine Value="50"/>
    372         <CursorPos X="18" Y="61"/>
    373         <UsageCount Value="25"/>
    374       </Unit37>
    375       <Unit38>
    376         <Filename Value="E:\Programy\Lazarus\lcl\include\controlsproc.inc"/>
    377         <WindowIndex Value="0"/>
    378         <TopLine Value="84"/>
    379         <CursorPos X="45" Y="90"/>
    380         <UsageCount Value="25"/>
    381       </Unit38>
    382       <Unit39>
    383276        <Filename Value="..\UCoolDockCustomize.pas"/>
    384277        <ComponentName Value="CoolDockCustomizeForm"/>
     
    389282        <TopLine Value="9"/>
    390283        <CursorPos X="19" Y="17"/>
    391         <UsageCount Value="52"/>
    392         <DefaultSyntaxHighlighter Value="Delphi"/>
    393       </Unit39>
    394       <Unit40>
     284        <UsageCount Value="46"/>
     285        <DefaultSyntaxHighlighter Value="Delphi"/>
     286      </Unit28>
     287      <Unit29>
    395288        <Filename Value="..\UCoolDockWindowList.pas"/>
    396289        <ComponentName Value="CoolDockWindowListForm"/>
     
    401294        <TopLine Value="59"/>
    402295        <CursorPos X="44" Y="61"/>
    403         <UsageCount Value="7"/>
    404         <DefaultSyntaxHighlighter Value="Delphi"/>
    405       </Unit40>
    406       <Unit41>
     296        <UsageCount Value="1"/>
     297        <DefaultSyntaxHighlighter Value="Delphi"/>
     298      </Unit29>
     299      <Unit30>
    407300        <Filename Value="SampleDockableForm.pas"/>
    408301        <IsPartOfProject Value="True"/>
     
    413306        <TopLine Value="1"/>
    414307        <CursorPos X="53" Y="2"/>
    415         <UsageCount Value="70"/>
    416         <DefaultSyntaxHighlighter Value="Delphi"/>
     308        <UsageCount Value="125"/>
     309        <DefaultSyntaxHighlighter Value="Delphi"/>
     310      </Unit30>
     311      <Unit31>
     312        <Filename Value="E:\Programy\Lazarus\fpc\2.4.0\source\rtl\objpas\classes\compon.inc"/>
     313        <WindowIndex Value="0"/>
     314        <TopLine Value="223"/>
     315        <CursorPos X="3" Y="226"/>
     316        <UsageCount Value="3"/>
     317      </Unit31>
     318      <Unit32>
     319        <Filename Value="E:\Programy\Lazarus\fpc\2.4.0\source\rtl\objpas\sysutils\sysutilh.inc"/>
     320        <WindowIndex Value="0"/>
     321        <TopLine Value="59"/>
     322        <CursorPos X="4" Y="66"/>
     323        <UsageCount Value="3"/>
     324      </Unit32>
     325      <Unit33>
     326        <Filename Value="E:\Programy\Lazarus\lcl\lresources.pp"/>
     327        <UnitName Value="LResources"/>
     328        <WindowIndex Value="0"/>
     329        <TopLine Value="3034"/>
     330        <CursorPos X="1" Y="3047"/>
     331        <UsageCount Value="0"/>
     332      </Unit33>
     333      <Unit34>
     334        <Filename Value="E:\Programy\Lazarus\lcl\include\tabcontrol.inc"/>
     335        <WindowIndex Value="0"/>
     336        <TopLine Value="233"/>
     337        <CursorPos X="45" Y="239"/>
     338        <UsageCount Value="7"/>
     339      </Unit34>
     340      <Unit35>
     341        <Filename Value="E:\Programy\Lazarus\lcl\include\pagecontrol.inc"/>
     342        <WindowIndex Value="0"/>
     343        <TopLine Value="98"/>
     344        <CursorPos X="3" Y="103"/>
     345        <UsageCount Value="6"/>
     346      </Unit35>
     347      <Unit36>
     348        <Filename Value="E:\Programy\Lazarus\lcl\include\customnotebook.inc"/>
     349        <WindowIndex Value="0"/>
     350        <TopLine Value="885"/>
     351        <CursorPos X="3" Y="853"/>
     352        <UsageCount Value="6"/>
     353      </Unit36>
     354      <Unit37>
     355        <Filename Value="E:\Programy\Lazarus\lcl\include\canvas.inc"/>
     356        <WindowIndex Value="0"/>
     357        <TopLine Value="1555"/>
     358        <CursorPos X="1" Y="1568"/>
     359        <UsageCount Value="6"/>
     360      </Unit37>
     361      <Unit38>
     362        <Filename Value="E:\Programy\Lazarus\lcl\include\lclintfh.inc"/>
     363        <WindowIndex Value="0"/>
     364        <TopLine Value="33"/>
     365        <CursorPos X="10" Y="40"/>
     366        <UsageCount Value="6"/>
     367      </Unit38>
     368      <Unit39>
     369        <Filename Value="E:\Programy\Lazarus\lcl\include\intfbaselcl.inc"/>
     370        <WindowIndex Value="0"/>
     371        <TopLine Value="29"/>
     372        <CursorPos X="3" Y="32"/>
     373        <UsageCount Value="6"/>
     374      </Unit39>
     375      <Unit40>
     376        <Filename Value="E:\Programy\Lazarus\lcl\include\winapih.inc"/>
     377        <WindowIndex Value="0"/>
     378        <TopLine Value="312"/>
     379        <CursorPos X="10" Y="319"/>
     380        <UsageCount Value="6"/>
     381      </Unit40>
     382      <Unit41>
     383        <Filename Value="E:\Programy\Lazarus\lcl\include\controlcanvas.inc"/>
     384        <WindowIndex Value="0"/>
     385        <TopLine Value="85"/>
     386        <CursorPos X="1" Y="92"/>
     387        <UsageCount Value="5"/>
    417388      </Unit41>
    418389      <Unit42>
    419         <Filename Value="E:\Programy\Lazarus\fpc\2.4.0\source\rtl\objpas\classes\compon.inc"/>
    420         <WindowIndex Value="0"/>
    421         <TopLine Value="223"/>
    422         <CursorPos X="3" Y="226"/>
    423         <UsageCount Value="9"/>
     390        <Filename Value="E:\Programy\Lazarus\fpc\2.4.0\source\rtl\objpas\sysutils\datih.inc"/>
     391        <WindowIndex Value="0"/>
     392        <TopLine Value="126"/>
     393        <CursorPos X="89" Y="147"/>
     394        <UsageCount Value="5"/>
    424395      </Unit42>
    425396      <Unit43>
    426         <Filename Value="E:\Programy\Lazarus\fpc\2.4.0\source\rtl\objpas\sysutils\sysutilh.inc"/>
    427         <WindowIndex Value="0"/>
    428         <TopLine Value="59"/>
    429         <CursorPos X="4" Y="66"/>
    430         <UsageCount Value="9"/>
    431       </Unit43>
    432       <Unit44>
    433         <Filename Value="E:\Programy\Lazarus\lcl\lresources.pp"/>
    434         <UnitName Value="LResources"/>
    435         <WindowIndex Value="0"/>
    436         <TopLine Value="3034"/>
    437         <CursorPos X="1" Y="3047"/>
    438         <UsageCount Value="6"/>
    439       </Unit44>
    440       <Unit45>
    441         <Filename Value="E:\Programy\Lazarus\lcl\include\tabcontrol.inc"/>
    442         <EditorIndex Value="3"/>
    443         <WindowIndex Value="0"/>
    444         <TopLine Value="233"/>
    445         <CursorPos X="45" Y="239"/>
    446         <UsageCount Value="12"/>
    447         <Loaded Value="True"/>
    448       </Unit45>
    449       <Unit46>
    450         <Filename Value="E:\Programy\Lazarus\lcl\include\pagecontrol.inc"/>
    451         <WindowIndex Value="0"/>
    452         <TopLine Value="98"/>
    453         <CursorPos X="3" Y="103"/>
    454         <UsageCount Value="12"/>
    455       </Unit46>
    456       <Unit47>
    457         <Filename Value="E:\Programy\Lazarus\lcl\include\customnotebook.inc"/>
    458         <WindowIndex Value="0"/>
    459         <TopLine Value="885"/>
    460         <CursorPos X="3" Y="853"/>
    461         <UsageCount Value="12"/>
    462       </Unit47>
    463       <Unit48>
    464         <Filename Value="E:\Programy\Lazarus\lcl\include\canvas.inc"/>
    465         <WindowIndex Value="0"/>
    466         <TopLine Value="1555"/>
    467         <CursorPos X="1" Y="1568"/>
    468         <UsageCount Value="12"/>
    469       </Unit48>
    470       <Unit49>
    471         <Filename Value="E:\Programy\Lazarus\lcl\include\lclintfh.inc"/>
    472         <WindowIndex Value="0"/>
    473         <TopLine Value="33"/>
    474         <CursorPos X="10" Y="40"/>
    475         <UsageCount Value="12"/>
    476       </Unit49>
    477       <Unit50>
    478         <Filename Value="E:\Programy\Lazarus\lcl\include\intfbaselcl.inc"/>
    479         <WindowIndex Value="0"/>
    480         <TopLine Value="29"/>
    481         <CursorPos X="3" Y="32"/>
    482         <UsageCount Value="12"/>
    483       </Unit50>
    484       <Unit51>
    485         <Filename Value="E:\Programy\Lazarus\lcl\include\winapih.inc"/>
    486         <WindowIndex Value="0"/>
    487         <TopLine Value="312"/>
    488         <CursorPos X="10" Y="319"/>
    489         <UsageCount Value="12"/>
    490       </Unit51>
    491       <Unit52>
    492         <Filename Value="E:\Programy\Lazarus\lcl\include\controlcanvas.inc"/>
    493         <WindowIndex Value="0"/>
    494         <TopLine Value="85"/>
    495         <CursorPos X="1" Y="92"/>
    496         <UsageCount Value="11"/>
    497       </Unit52>
    498       <Unit53>
    499         <Filename Value="E:\Programy\Lazarus\fpc\2.4.0\source\rtl\objpas\sysutils\datih.inc"/>
    500         <WindowIndex Value="0"/>
    501         <TopLine Value="126"/>
    502         <CursorPos X="89" Y="147"/>
    503         <UsageCount Value="11"/>
    504       </Unit53>
    505       <Unit54>
    506397        <Filename Value="UComponentTree.pas"/>
    507398        <IsPartOfProject Value="True"/>
     
    509400        <ResourceBaseClass Value="Form"/>
    510401        <UnitName Value="UComponentTree"/>
    511         <EditorIndex Value="8"/>
    512402        <WindowIndex Value="0"/>
    513403        <TopLine Value="37"/>
    514         <CursorPos X="33" Y="52"/>
    515         <UsageCount Value="22"/>
    516         <Loaded Value="True"/>
    517         <LoadedDesigner Value="True"/>
    518         <DefaultSyntaxHighlighter Value="Delphi"/>
    519       </Unit54>
    520       <Unit55>
     404        <CursorPos X="18" Y="39"/>
     405        <UsageCount Value="77"/>
     406        <DefaultSyntaxHighlighter Value="Delphi"/>
     407      </Unit43>
     408      <Unit44>
    521409        <Filename Value="E:\Programy\Lazarus\lcl\include\treeview.inc"/>
    522         <EditorIndex Value="9"/>
    523410        <WindowIndex Value="0"/>
    524411        <TopLine Value="311"/>
    525412        <CursorPos X="3" Y="332"/>
    526         <UsageCount Value="11"/>
    527         <Loaded Value="True"/>
    528       </Unit55>
    529       <Unit56>
     413        <UsageCount Value="6"/>
     414      </Unit44>
     415      <Unit45>
    530416        <Filename Value="E:\Programy\Lazarus\fpc\2.4.3\source\rtl\objpas\classes\classesh.inc"/>
    531         <EditorIndex Value="6"/>
    532417        <WindowIndex Value="0"/>
    533418        <TopLine Value="1659"/>
    534419        <CursorPos X="17" Y="1675"/>
    535         <UsageCount Value="11"/>
     420        <UsageCount Value="6"/>
     421      </Unit45>
     422      <Unit46>
     423        <Filename Value="..\UCoolDockCustomize.lrs"/>
     424        <WindowIndex Value="0"/>
     425        <TopLine Value="1"/>
     426        <CursorPos X="1" Y="4"/>
     427        <UsageCount Value="5"/>
     428        <DefaultSyntaxHighlighter Value="Delphi"/>
     429      </Unit46>
     430      <Unit47>
     431        <Filename Value="..\UCoolDockStyleTabs.pas"/>
     432        <UnitName Value="UCoolDockStyleTabs"/>
     433        <EditorIndex Value="4"/>
     434        <WindowIndex Value="0"/>
     435        <TopLine Value="23"/>
     436        <CursorPos X="15" Y="36"/>
     437        <UsageCount Value="38"/>
    536438        <Loaded Value="True"/>
    537       </Unit56>
     439        <DefaultSyntaxHighlighter Value="Delphi"/>
     440      </Unit47>
     441      <Unit48>
     442        <Filename Value="..\UCoolDockStylePopupTabs.pas"/>
     443        <UnitName Value="UCoolDockStylePopupTabs"/>
     444        <WindowIndex Value="0"/>
     445        <TopLine Value="185"/>
     446        <CursorPos X="41" Y="190"/>
     447        <UsageCount Value="5"/>
     448        <DefaultSyntaxHighlighter Value="Delphi"/>
     449      </Unit48>
     450      <Unit49>
     451        <Filename Value="..\UCoolDockStyle.pas"/>
     452        <UnitName Value="UCoolDockStyle"/>
     453        <EditorIndex Value="3"/>
     454        <WindowIndex Value="0"/>
     455        <TopLine Value="1"/>
     456        <CursorPos X="3" Y="14"/>
     457        <UsageCount Value="37"/>
     458        <Loaded Value="True"/>
     459        <DefaultSyntaxHighlighter Value="Delphi"/>
     460      </Unit49>
     461      <Unit50>
     462        <Filename Value="..\UCoolDockStyleRegions.pas"/>
     463        <UnitName Value="UCoolDockStyleRegions"/>
     464        <EditorIndex Value="2"/>
     465        <WindowIndex Value="0"/>
     466        <TopLine Value="51"/>
     467        <CursorPos X="1" Y="74"/>
     468        <UsageCount Value="37"/>
     469        <Loaded Value="True"/>
     470        <DefaultSyntaxHighlighter Value="Delphi"/>
     471      </Unit50>
     472      <Unit51>
     473        <Filename Value="..\UCoolDockStylePopupRegions.pas"/>
     474        <UnitName Value="UCoolDockStylePopupRegions"/>
     475        <WindowIndex Value="0"/>
     476        <TopLine Value="1"/>
     477        <CursorPos X="16" Y="19"/>
     478        <UsageCount Value="5"/>
     479        <DefaultSyntaxHighlighter Value="Delphi"/>
     480      </Unit51>
     481      <Unit52>
     482        <Filename Value="E:\Programy\Lazarus\fpc\2.4.3\source\rtl\inc\objpash.inc"/>
     483        <WindowIndex Value="0"/>
     484        <TopLine Value="172"/>
     485        <CursorPos X="23" Y="185"/>
     486        <UsageCount Value="5"/>
     487      </Unit52>
     488      <Unit53>
     489        <Filename Value="..\UCoolDockClientPanel.pas"/>
     490        <UnitName Value="UCoolDockClientPanel"/>
     491        <IsVisibleTab Value="True"/>
     492        <EditorIndex Value="1"/>
     493        <WindowIndex Value="0"/>
     494        <TopLine Value="32"/>
     495        <CursorPos X="1" Y="52"/>
     496        <UsageCount Value="37"/>
     497        <Loaded Value="True"/>
     498        <DefaultSyntaxHighlighter Value="Delphi"/>
     499      </Unit53>
    538500    </Units>
    539     <JumpHistory Count="30" HistoryIndex="28">
     501    <JumpHistory Count="30" HistoryIndex="29">
    540502      <Position1>
    541         <Filename Value="E:\Programy\Lazarus\lcl\include\wincontrol.inc"/>
    542         <Caret Line="4520" Column="1" TopLine="4507"/>
     503        <Filename Value="..\UCoolDockClientPanel.pas"/>
     504        <Caret Line="9" Column="10" TopLine="1"/>
    543505      </Position1>
    544506      <Position2>
    545         <Filename Value="E:\Programy\Lazarus\lcl\include\wincontrol.inc"/>
    546         <Caret Line="4525" Column="1" TopLine="4507"/>
     507        <Filename Value="..\UCoolDockClientPanel.pas"/>
     508        <Caret Line="17" Column="32" TopLine="12"/>
    547509      </Position2>
    548510      <Position3>
    549         <Filename Value="E:\Programy\Lazarus\lcl\include\wincontrol.inc"/>
    550         <Caret Line="4520" Column="1" TopLine="4507"/>
     511        <Filename Value="..\UCoolDocking.pas"/>
     512        <Caret Line="469" Column="10" TopLine="435"/>
    551513      </Position3>
    552514      <Position4>
    553         <Filename Value="E:\Programy\Lazarus\lcl\include\wincontrol.inc"/>
    554         <Caret Line="4521" Column="1" TopLine="4507"/>
     515        <Filename Value="..\UCoolDocking.pas"/>
     516        <Caret Line="474" Column="38" TopLine="461"/>
    555517      </Position4>
    556518      <Position5>
    557         <Filename Value="E:\Programy\Lazarus\lcl\include\wincontrol.inc"/>
    558         <Caret Line="4523" Column="1" TopLine="4507"/>
     519        <Filename Value="..\UCoolDocking.pas"/>
     520        <Caret Line="477" Column="57" TopLine="464"/>
    559521      </Position5>
    560522      <Position6>
    561         <Filename Value="E:\Programy\Lazarus\lcl\include\wincontrol.inc"/>
    562         <Caret Line="4525" Column="1" TopLine="4507"/>
     523        <Filename Value="..\UCoolDocking.pas"/>
     524        <Caret Line="646" Column="1" TopLine="633"/>
    563525      </Position6>
    564526      <Position7>
    565         <Filename Value="E:\Programy\Lazarus\lcl\include\wincontrol.inc"/>
    566         <Caret Line="4411" Column="23" TopLine="4401"/>
     527        <Filename Value="..\UCoolDockStyleTabs.pas"/>
     528        <Caret Line="231" Column="1" TopLine="212"/>
    567529      </Position7>
    568530      <Position8>
    569         <Filename Value="E:\Programy\Lazarus\lcl\include\wincontrol.inc"/>
    570         <Caret Line="4410" Column="1" TopLine="4401"/>
     531        <Filename Value="..\UCoolDockStyleTabs.pas"/>
     532        <Caret Line="253" Column="23" TopLine="245"/>
    571533      </Position8>
    572534      <Position9>
    573         <Filename Value="E:\Programy\Lazarus\lcl\include\wincontrol.inc"/>
    574         <Caret Line="4457" Column="1" TopLine="4436"/>
     535        <Filename Value="..\UCoolDockStyleTabs.pas"/>
     536        <Caret Line="15" Column="34" TopLine="2"/>
    575537      </Position9>
    576538      <Position10>
    577         <Filename Value="E:\Programy\Lazarus\lcl\include\customform.inc"/>
    578         <Caret Line="799" Column="1" TopLine="786"/>
     539        <Filename Value="..\UCoolDockStyleTabs.pas"/>
     540        <Caret Line="258" Column="1" TopLine="246"/>
    579541      </Position10>
    580542      <Position11>
    581         <Filename Value="E:\Programy\Lazarus\lcl\include\customform.inc"/>
    582         <Caret Line="800" Column="1" TopLine="786"/>
     543        <Filename Value="..\UCoolDockStyleTabs.pas"/>
     544        <Caret Line="259" Column="17" TopLine="246"/>
    583545      </Position11>
    584546      <Position12>
    585         <Filename Value="E:\Programy\Lazarus\lcl\include\customform.inc"/>
    586         <Caret Line="1727" Column="1" TopLine="1714"/>
     547        <Filename Value="..\UCoolDockStyleTabs.pas"/>
     548        <Caret Line="261" Column="67" TopLine="247"/>
    587549      </Position12>
    588550      <Position13>
    589         <Filename Value="E:\Programy\Lazarus\lcl\include\customform.inc"/>
    590         <Caret Line="1728" Column="1" TopLine="1714"/>
     551        <Filename Value="..\UCoolDockStyleTabs.pas"/>
     552        <Caret Line="266" Column="29" TopLine="253"/>
    591553      </Position13>
    592554      <Position14>
    593         <Filename Value="E:\Programy\Lazarus\lcl\include\customform.inc"/>
    594         <Caret Line="1729" Column="1" TopLine="1714"/>
     555        <Filename Value="UMainForm.pas"/>
     556        <Caret Line="78" Column="47" TopLine="65"/>
    595557      </Position14>
    596558      <Position15>
    597         <Filename Value="E:\Programy\Lazarus\lcl\include\customform.inc"/>
    598         <Caret Line="1733" Column="20" TopLine="1714"/>
     559        <Filename Value="UMainForm.pas"/>
     560        <Caret Line="73" Column="5" TopLine="58"/>
    599561      </Position15>
    600562      <Position16>
    601         <Filename Value="E:\Programy\Lazarus\lcl\include\customform.inc"/>
    602         <Caret Line="1734" Column="1" TopLine="1714"/>
     563        <Filename Value="..\UCoolDocking.pas"/>
     564        <Caret Line="639" Column="52" TopLine="625"/>
    603565      </Position16>
    604566      <Position17>
    605         <Filename Value="E:\Programy\Lazarus\lcl\include\customform.inc"/>
    606         <Caret Line="1737" Column="22" TopLine="1725"/>
     567        <Filename Value="..\UCoolDocking.pas"/>
     568        <Caret Line="660" Column="15" TopLine="647"/>
    607569      </Position17>
    608570      <Position18>
    609         <Filename Value="E:\Programy\Lazarus\lcl\include\wincontrol.inc"/>
    610         <Caret Line="3442" Column="1" TopLine="3429"/>
     571        <Filename Value="..\UCoolDocking.pas"/>
     572        <Caret Line="43" Column="5" TopLine="30"/>
    611573      </Position18>
    612574      <Position19>
    613         <Filename Value="E:\Programy\Lazarus\lcl\include\customform.inc"/>
    614         <Caret Line="1737" Column="1" TopLine="1725"/>
     575        <Filename Value="..\UCoolDocking.pas"/>
     576        <Caret Line="633" Column="21" TopLine="616"/>
    615577      </Position19>
    616578      <Position20>
    617         <Filename Value="E:\Programy\Lazarus\lcl\include\wincontrol.inc"/>
    618         <Caret Line="3442" Column="1" TopLine="3429"/>
     579        <Filename Value="..\UCoolDocking.pas"/>
     580        <Caret Line="629" Column="13" TopLine="620"/>
    619581      </Position20>
    620582      <Position21>
    621         <Filename Value="E:\Programy\Lazarus\lcl\include\customform.inc"/>
    622         <Caret Line="2586" Column="1" TopLine="2573"/>
     583        <Filename Value="..\UCoolDocking.pas"/>
     584        <Caret Line="45" Column="22" TopLine="32"/>
    623585      </Position21>
    624586      <Position22>
    625         <Filename Value="E:\Programy\Lazarus\lcl\include\customform.inc"/>
    626         <Caret Line="1737" Column="1" TopLine="1724"/>
     587        <Filename Value="..\UCoolDocking.pas"/>
     588        <Caret Line="261" Column="23" TopLine="247"/>
    627589      </Position22>
    628590      <Position23>
    629         <Filename Value="E:\Programy\Lazarus\lcl\include\customform.inc"/>
    630         <Caret Line="2587" Column="32" TopLine="2570"/>
     591        <Filename Value="..\UCoolDocking.pas"/>
     592        <Caret Line="631" Column="1" TopLine="618"/>
    631593      </Position23>
    632594      <Position24>
    633         <Filename Value="E:\Programy\Lazarus\lcl\include\customform.inc"/>
    634         <Caret Line="2586" Column="1" TopLine="2570"/>
     595        <Filename Value="..\UCoolDocking.pas"/>
     596        <Caret Line="632" Column="1" TopLine="618"/>
    635597      </Position24>
    636598      <Position25>
    637         <Filename Value="E:\Programy\Lazarus\lcl\include\customform.inc"/>
    638         <Caret Line="2588" Column="1" TopLine="2570"/>
     599        <Filename Value="..\UCoolDocking.pas"/>
     600        <Caret Line="633" Column="1" TopLine="618"/>
    639601      </Position25>
    640602      <Position26>
    641         <Filename Value="E:\Programy\Lazarus\lcl\include\customform.inc"/>
    642         <Caret Line="1744" Column="1" TopLine="1731"/>
     603        <Filename Value="..\UCoolDocking.pas"/>
     604        <Caret Line="634" Column="1" TopLine="618"/>
    643605      </Position26>
    644606      <Position27>
    645         <Filename Value="E:\Programy\Lazarus\lcl\include\customform.inc"/>
    646         <Caret Line="2587" Column="34" TopLine="2573"/>
     607        <Filename Value="..\UCoolDocking.pas"/>
     608        <Caret Line="637" Column="1" TopLine="618"/>
    647609      </Position27>
    648610      <Position28>
    649         <Filename Value="E:\Programy\Lazarus\lcl\include\customform.inc"/>
    650         <Caret Line="1744" Column="1" TopLine="1731"/>
     611        <Filename Value="..\UCoolDocking.pas"/>
     612        <Caret Line="638" Column="1" TopLine="618"/>
    651613      </Position28>
    652614      <Position29>
    653615        <Filename Value="..\UCoolDocking.pas"/>
    654         <Caret Line="826" Column="47" TopLine="819"/>
     616        <Caret Line="647" Column="1" TopLine="634"/>
    655617      </Position29>
    656618      <Position30>
    657619        <Filename Value="..\UCoolDocking.pas"/>
    658         <Caret Line="69" Column="5" TopLine="56"/>
     620        <Caret Line="648" Column="1" TopLine="634"/>
    659621      </Position30>
    660622    </JumpHistory>
     
    683645        <StackChecks Value="True"/>
    684646      </Checks>
    685       <VerifyObjMethodCallValidity Value="True"/>
    686647    </CodeGeneration>
    687648    <Linking>
  • Docking/CoolDocking/Demo/UMainForm.lfm

    r96 r97  
    11object MainForm: TMainForm
    2   Left = 341
     2  Left = 322
    33  Height = 435
    4   Top = 158
     4  Top = 150
    55  Width = 576
    66  Caption = 'MainForm'
  • Docking/CoolDocking/Demo/UMainForm.pas

    r96 r97  
    6969  ConjoinedDockForm1 := TCoolDockManager(Panel1.DockManager).CreateContainer(alRight);
    7070  ConjoinedDockForm1.Name := 'Model';;
    71   TCoolDockManager(ConjoinedDockForm1.Panel.DockManager).TabsPos := hpLeft;
     71  //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);
  • Docking/CoolDocking/UCoolDockCustomize.lrs

    r96 r97  
    22
    33LazarusResources.Add('TCoolDockCustomizeForm','FORMDATA',[
    4   'TPF0'#22'TCoolDockCustomizeForm'#21'CoolDockCustomizeForm'#4'Left'#3'R'#1#6
    5   +'Height'#3'C'#1#3'Top'#2'`'#5'Width'#3#151#1#7'Caption'#6#17'Customize docki'
    6   +'ng'#12'ClientHeight'#3'C'#1#11'ClientWidth'#3#151#1#10'LCLVersion'#6#6'0.9.'
    7   +'29'#0#12'TPageControl'#12'PageControl1'#4'Left'#2#8#6'Height'#3#22#1#3'Top'
    8   +#2#8#5'Width'#3#137#1#10'ActivePage'#7#15'TabSheetSetting'#7'Anchors'#11#5'a'
    9   +'kTop'#6'akLeft'#7'akRight'#8'akBottom'#0#8'TabIndex'#2#0#8'TabOrder'#2#0#0#9
    10   +'TTabSheet'#15'TabSheetSetting'#7'Caption'#6#7'Options'#12'ClientHeight'#3
    11   +#252#0#11'ClientWidth'#3#129#1#0#6'TLabel'#6'Label1'#4'Left'#2#7#6'Height'#2
    12   +#14#3'Top'#2#13#5'Width'#2'h'#7'Caption'#6#22'Default tabs position:'#11'Par'
    13   +'entColor'#8#0#0#9'TComboBox'#9'ComboBox1'#4'Left'#3#132#0#6'Height'#2#21#3
    14   +'Top'#2#10#5'Width'#2'd'#10'ItemHeight'#2#13#8'TabOrder'#2#0#4'Text'#6#9'Com'
    15   +'boBox1'#0#0#6'TLabel'#6'Label2'#4'Left'#2#7#6'Height'#2#14#3'Top'#2')'#5'Wi'
    16   +'dth'#2'u'#7'Caption'#6#24'Default header position:'#11'ParentColor'#8#0#0#9
    17   +'TComboBox'#9'ComboBox2'#4'Left'#3#132#0#6'Height'#2#21#3'Top'#2'&'#5'Width'
    18   +#2'd'#10'ItemHeight'#2#13#8'TabOrder'#2#1#4'Text'#6#9'ComboBox1'#0#0#0#9'TTa'
    19   +'bSheet'#15'TabSheetLayouts'#7'Caption'#6#7'Layouts'#12'ClientHeight'#3#252#0
    20   +#11'ClientWidth'#3#129#1#0#8'TListBox'#8'ListBox1'#4'Left'#2#10#6'Height'#3
    21   +#231#0#3'Top'#2#11#5'Width'#3#180#0#7'Anchors'#11#5'akTop'#6'akLeft'#8'akBot'
    22   +'tom'#0#10'ItemHeight'#2#0#8'TabOrder'#2#0#0#0#0#0#7'TButton'#11'ButtonClose'
    23   +#4'Left'#3'D'#1#6'Height'#2#22#3'Top'#3'&'#1#5'Width'#2'K'#7'Anchors'#11#7'a'
    24   +'kRight'#8'akBottom'#0#7'Caption'#6#5'Close'#7'OnClick'#7#16'ButtonCloseClic'
    25   +'k'#8'TabOrder'#2#1#0#0#0
    264  'TPF0'#22'TCoolDockCustomizeForm'#21'CoolDockCustomizeForm'#4'Left'#3#175#1#6
    275  +'Height'#3'C'#1#3'Top'#3#139#0#5'Width'#3#151#1#7'Caption'#6#17'Customize do'
  • Docking/CoolDocking/UCoolDockCustomize.pas

    r89 r97  
    11unit UCoolDockCustomize;
    22
    3 {$mode objfpc}{$H+}
     3{$mode Delphi}{$H+}
    44
    55interface
  • Docking/CoolDocking/UCoolDockStylePopupRegions.pas

    r89 r97  
    1 unit UCoolDockStylePopupRegions; 
     1unit UCoolDockStylePopupRegions;
    22
    3 {$mode objfpc}{$H+}
     3{$mode Delphi}{$H+}
    44
    55interface
    66
    77uses
    8   Classes, SysUtils;
     8  Classes, SysUtils, UCoolDockStyleRegions, UCoolDockStyle;
     9
     10type
     11  TCoolDockStylePopupRegions = class(TCoolDockStyleRegions)
     12
     13  end;
     14
    915
    1016implementation
    1117
     18uses
     19  UCoolDocking;
     20
    1221end.
    1322
  • Docking/CoolDocking/UCoolDockStylePopupTabs.pas

    r89 r97  
    1 unit UCoolDockStylePopupTabs; 
    2 
    3 {$mode objfpc}{$H+}
     1unit UCoolDockStylePopupTabs;
     2
     3{$mode Delphi}{$H+}
    44
    55interface
    66
    77uses
    8   Classes, SysUtils;
     8  Classes, Controls, SysUtils, ComCtrls, ExtCtrls,
     9  UCoolDockStyleTabs, UCoolDockStyle;
     10
     11type
     12  { TCoolDockAutoHide }
     13
     14  TCoolDockAutoHide = class
     15  private
     16    FDuration: Real;
     17    FStepCount: Integer;
     18    StartBounds: TRect;
     19    procedure SetDuration(const AValue: Real);
     20    procedure SetStepCount(const AValue: Integer);
     21    procedure UpdateBounds;
     22    procedure UpdateTimerInterval;
     23  public
     24    Position: Real;
     25    Direction: Integer;
     26    TabPosition: TTabPosition;
     27    Enable: Boolean;
     28    Timer: TTimer;
     29    Control: TControl;
     30    ControlVisible: Boolean;
     31    procedure Hide;
     32    procedure Show;
     33    constructor Create;
     34    destructor Destroy; override;
     35    procedure TimerExecute(Sender: TObject);
     36    property Duration: Real read FDuration write SetDuration;
     37    property StepCount: Integer read FStepCount write SetStepCount;
     38  end;
     39
     40  { TCoolDockStylePopupTabs }
     41
     42  TCoolDockStylePopupTabs = class(TCoolDockStyleTabs)
     43    TabControl: TTabControl;
     44    TabImageList: TImageList;
     45    AutoHide: TCoolDockAutoHide;
     46    procedure TabControlMouseLeave(Sender: TObject);
     47    procedure TabControlChange(Sender: TObject);
     48    procedure TabControlMouseDown(Sender: TObject; Button: TMouseButton;
     49      Shift: TShiftState; X, Y: Integer);
     50    procedure TabControlMouseUp(Sender: TObject; Button: TMouseButton;
     51      Shift: TShiftState; X, Y: Integer);
     52    constructor Create(AManager: TObject);
     53    destructor Destroy; override;
     54  end;
     55
    956
    1057implementation
    1158
     59uses
     60  UCoolDocking;
     61
     62{ TCoolDockAutoHide }
     63
     64procedure TCoolDockAutoHide.UpdateBounds;
     65begin
     66  case TabPosition of
     67    tpBottom: begin
     68      Control.Height := Round((StartBounds.Bottom - StartBounds.Top) * Position);
     69      Control.Top := StartBounds.Bottom - Control.Height;
     70    end;
     71    tpTop: begin
     72      Control.Height := Round((StartBounds.Bottom - StartBounds.Top) * Position);
     73    end;
     74    tpRight: begin
     75      Control.Width := Round((StartBounds.Right - StartBounds.Left) * Position);
     76    end;
     77    tpLeft: begin
     78      Control.Width := Round((StartBounds.Right - StartBounds.Left) * Position);
     79      Control.Left := StartBounds.Right - Control.Width;
     80    end;
     81  end;
     82end;
     83
     84procedure TCoolDockAutoHide.UpdateTimerInterval;
     85begin
     86  Timer.Interval := Round(FDuration * 1000 / FStepCount);
     87end;
     88
     89procedure TCoolDockAutoHide.SetDuration(const AValue: Real);
     90begin
     91  if FDuration = AValue then Exit;
     92  FDuration := AValue;
     93  UpdateTimerInterval;
     94end;
     95
     96procedure TCoolDockAutoHide.SetStepCount(const AValue: Integer);
     97begin
     98  if FStepCount = AValue then Exit;
     99  FStepCount := AValue;
     100  UpdateTimerInterval;
     101end;
     102
     103procedure TCoolDockAutoHide.Hide;
     104begin
     105  StartBounds := Control.BoundsRect;
     106  Direction := -1;
     107  Position := 1;
     108  Timer.Enabled := True;
     109  UpdateBounds;
     110end;
     111
     112procedure TCoolDockAutoHide.Show;
     113begin
     114  StartBounds := Control.BoundsRect;
     115  Control.Align := alCustom;
     116  Direction := 1;
     117  Position := 0;
     118  Timer.Enabled := True;
     119  UpdateBounds;
     120end;
     121
     122constructor TCoolDockAutoHide.Create;
     123begin
     124  Timer := TTimer.Create(nil);
     125  Timer.Enabled := False;
     126  Timer.OnTimer := TimerExecute;
     127  StepCount := 10;
     128  Duration := 0.5;
     129end;
     130
     131destructor TCoolDockAutoHide.Destroy;
     132begin
     133  Timer.Free;
     134  inherited Destroy;
     135end;
     136
     137procedure TCoolDockAutoHide.TimerExecute(Sender: TObject);
     138begin
     139  if Direction = 1 then begin
     140    Position := Position + 1 / StepCount;
     141    if Position > 1 then begin
     142      Position := 1;
     143      Timer.Enabled := False;
     144      ControlVisible := True;
     145    end;
     146  end else
     147  if Direction = -1 then begin
     148    Position := Position - 1 / StepCount;
     149    if Position < 1 then begin
     150      Position := 0;
     151      Timer.Enabled := False;
     152      ControlVisible := False;
     153    end;
     154  end;
     155  UpdateBounds;
     156end;
     157
     158{ TCoolDockStylePopupTabs }
     159
     160procedure TCoolDockStylePopupTabs.TabControlMouseLeave(Sender: TObject);
     161begin
     162
     163end;
     164
     165procedure TCoolDockStylePopupTabs.TabControlChange(Sender: TObject);
     166begin
     167
     168end;
     169
     170procedure TCoolDockStylePopupTabs.TabControlMouseDown(Sender: TObject;
     171  Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
     172begin
     173
     174end;
     175
     176procedure TCoolDockStylePopupTabs.TabControlMouseUp(Sender: TObject;
     177  Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
     178begin
     179
     180end;
     181
     182constructor TCoolDockStylePopupTabs.Create(AManager: TObject);
     183begin
     184  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 := PopupMenuTabs;
     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;
     202end;
     203
     204destructor TCoolDockStylePopupTabs.Destroy;
     205begin
     206  AutoHide.Free;
     207  inherited Destroy;
     208end;
     209
    12210end.
    13211
  • Docking/CoolDocking/UCoolDockStyleRegions.pas

    r89 r97  
    1 unit UCoolDockStyleRegions; 
     1unit UCoolDockStyleRegions;
    22
    3 {$mode objfpc}{$H+}
     3{$mode Delphi}{$H+}
    44
    55interface
    66
    77uses
    8   Classes, SysUtils;
     8  Classes, SysUtils, Controls, ExtCtrls, StdCtrls, UCoolDockStyle,
     9  Graphics, Contnrs, Buttons, UCoolDockClientPanel;
     10
     11type
     12  TCoolDockStyleRegionsPanel = class(TPanel)
     13
     14  end;
     15
     16  { TCoolDockStyleRegions }
     17
     18  TCoolDockStyleRegions = class(TCoolDockStyle)
     19    Header: TCoolDockHeader;
     20    Panels: TObjectList; // TObjectList<TCoolDockStyleRegionsPanel>
     21    constructor Create(AManager: TObject);
     22    destructor Destroy; override;
     23    procedure UpdateClientSize; override;
     24  end;
    925
    1026implementation
    1127
     28uses
     29  UCoolDocking;
     30
     31
     32{ TCoolDockStyleRegions }
     33
     34constructor TCoolDockStyleRegions.Create(AManager: TObject);
     35var
     36  I: Integer;
     37begin
     38  inherited;
     39  Panels := TObjectList.Create;
     40
     41  with TCoolDockManager(AManager) do
     42  for I := 0 to DockPanels.Count - 1 do begin
     43    if Assigned(TCoolDockClientPanel(DockPanels[I]).Splitter) then
     44    TCoolDockClientPanel(DockPanels[I]).Splitter.Visible := True;
     45    TCoolDockClientPanel(DockPanels[I]).Visible := True;
     46    TCoolDockClientPanel(DockPanels[I]).ClientAreaPanel.Parent := TCoolDockClientPanel(DockPanels[I]);
     47    TCoolDockClientPanel(DockPanels[I]).ClientAreaPanel.Visible := True;
     48    TCoolDockClientPanel(DockPanels[I]).Control.Visible := True;
     49  end;
     50end;
     51
     52destructor TCoolDockStyleRegions.Destroy;
     53begin
     54  Panels.Free;
     55  inherited Destroy;
     56end;
     57
     58procedure TCoolDockStyleRegions.UpdateClientSize;
     59var
     60  I: Integer;
     61begin
     62  inherited UpdateClientSize;
     63  with TCoolDockManager(Manager) do
     64  for I := 0 to DockPanels.Count - 1 do begin
     65    TCoolDockClientPanel(DockPanels[I]).Height := DockSite.Height div
     66      DockSite.DockClientCount;
     67    TCoolDockClientPanel(DockPanels[I]).Width := DockSite.Width div
     68      DockSite.DockClientCount;
     69    //TCoolDockClientPanel(FDockPanels[I]).DockPanelPaint(Self);
     70    TCoolDockClientPanel(DockPanels[I]).DockPanelPaint(Self);
     71  end;
     72end;
     73
     74
     75
    1276end.
    1377
  • Docking/CoolDocking/UCoolDockStyleTabs.pas

    r89 r97  
    11unit UCoolDockStyleTabs;
    22
    3 {$mode objfpc}{$H+}
     3{$mode Delphi}{$H+}
    44
    55interface
    66
    77uses
    8   Classes, SysUtils, UCoolDocking;
     8  Classes, Controls, ExtCtrls, ComCtrls, SysUtils,
     9  Menus, UCoolDockStyle, Forms, UCoolDockClientPanel;
    910
    1011type
     12
     13  { TCoolDockStyleTabs }
     14
    1115  TCoolDockStyleTabs = class(TCoolDockStyle)
    12 
     16    MouseDown: Boolean;
     17    MouseButton: TMouseButton;
     18    MouseDownSkip: Boolean;
     19    TabControl: TTabControl;
     20    TabImageList: TImageList;
     21    PopupMenuTabs: TPopupMenu;
     22    procedure TabControlMouseLeave(Sender: TObject);
     23    procedure TabControlChange(Sender: TObject);
     24    procedure TabControlMouseDown(Sender: TObject; Button: TMouseButton;
     25      Shift: TShiftState; X, Y: Integer);
     26    procedure TabControlMouseUp(Sender: TObject; Button: TMouseButton;
     27      Shift: TShiftState; X, Y: Integer);
     28    constructor Create(AManager: TObject);
     29    destructor Destroy; override;
     30    procedure InsertControl(NewPanel: TCoolDockClientPanel;
     31      AControl: TControl; InsertAt: TAlign); override;
     32    procedure UpdateClientSize; override;
     33  private
     34    FTabsPos: THeaderPos;
     35  public
     36    procedure SetTabsPos(const AValue: THeaderPos);
     37    procedure PopupMenuTabCloseClick(Sender: TObject);
     38    property TabsPos: THeaderPos read FTabsPos write SetTabsPos;
    1339  end;
    1440
    1541implementation
    1642
     43uses
     44  UCoolDocking;
     45
     46{ TCoolDockStyleTabs }
     47
     48procedure TCoolDockStyleTabs.PopupMenuTabCloseClick(Sender: TObject);
     49begin
     50  if TabControl.TabIndex <> -1 then
     51    TCoolDockClientPanel(TCoolDockManager(Manager).DockPanels[TabControl.TabIndex]).Control.Hide;
     52end;
     53
     54procedure TCoolDockStyleTabs.TabControlMouseLeave(Sender: TObject);
     55begin
     56(*  if MouseDown then
     57  if (TabControl.TabIndex <> -1) then begin
     58    TCoolDockClientPanel(FDockPanels[TabControl.TabIndex]).ClientAreaPanel.DockSite := False;
     59    DragManager.DragStart(TCoolDockClientPanel(FDockPanels[TabControl.TabIndex]).Control, False, 1);
     60  end;
     61  MouseDown := False;
     62  *)
     63end;
     64
     65procedure TCoolDockStyleTabs.TabControlChange(Sender: TObject);
     66var
     67  I: Integer;
     68begin
     69  // Hide all clients
     70  with TCoolDockManager(Manager) do
     71  for I := 0 to DockPanels.Count - 1 do begin
     72    TCoolDockClientPanel(DockPanels[I]).ClientAreaPanel.Visible := False;
     73    TCoolDockClientPanel(DockPanels[I]).ClientAreaPanel.Parent := DockSite;
     74    TCoolDockClientPanel(DockPanels[I]).Control.Align := alClient;
     75    TCoolDockClientPanel(DockPanels[I]).Control.Visible := False;
     76
     77    // Workaround for "Cannot focus" error
     78    TForm(TCoolDockClientPanel(DockPanels[I]).Control).ActiveControl := nil;
     79  end;
     80  with TCoolDockManager(Manager) do
     81  if (TabControl.TabIndex <> -1) and (DockPanels.Count > TabControl.TabIndex) then begin
     82    with TCoolDockClientPanel(DockPanels[TabControl.TabIndex]), ClientAreaPanel do begin
     83      Control.Show;
     84      (*AutoHide.Enable := True;
     85      if AutoHide.Enable then begin
     86        //Parent := nil;
     87        Visible := True;
     88        if AutoHide.ControlVisible then begin
     89          AutoHide.Hide;
     90        end;
     91        AutoHide.Control := Control;
     92        AutoHide.Show;
     93      end else begin
     94      *)
     95        //Parent := DockSite;
     96        Visible := True;
     97        UpdateClientSize;
     98//      end;
     99    end;
     100  //TCoolDockClientPanel(FDockPanels[TabControl.TabIndex]).Visible := True;
     101  end;
     102  MouseDownSkip := True;
     103end;
     104
     105procedure TCoolDockStyleTabs.TabControlMouseDown(Sender: TObject;
     106  Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
     107begin
     108  if not MouseDownSkip then begin
     109    MouseDown := True;
     110    MouseButton := Button;
     111  end;
     112  MouseDownSkip := False;
     113end;
     114
     115procedure TCoolDockStyleTabs.TabControlMouseUp(Sender: TObject;
     116  Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
     117begin
     118  MouseDown := False;
     119end;
     120
     121constructor TCoolDockStyleTabs.Create(AManager: TObject);
     122var
     123  NewMenuItem: TMenuItem;
     124  NewMenuItem2: TMenuItem;
     125  I: Integer;
     126begin
     127  inherited;
     128
     129  (*// Tabs popup
     130
     131  PopupMenuTabs := TPopupMenu.Create(Manager.DockSite);
     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  TabImageList := TImageList.Create(TCoolDockManager(AManager).DockSite); //FDockSite);
     197  with TabImageList do begin
     198    Name := TCoolDockManager(Manager).DockSite.Name + '_' + 'ImageList';
     199  end;
     200  TabControl := TTabControl.Create(TCoolDockManager(AManager).DockSite); //FDockSite);
     201  with TabControl do begin
     202    Parent := TCoolDockManager(Manager).DockSite;
     203    Name := TCoolDockManager(Manager).DockSite.Name + '_' + 'TabControl';
     204    Visible := False;
     205    Align := alTop;
     206    Height := 24;
     207    OnChange := TabControlChange;
     208    PopupMenu := PopupMenuTabs;
     209    TTabControlNoteBookStrings(Tabs).NoteBook.OnMouseLeave := TabControlMouseLeave;
     210    TTabControlNoteBookStrings(Tabs).NoteBook.OnMouseDown := TabControlMouseDown;
     211    TTabControlNoteBookStrings(Tabs).NoteBook.OnMouseUp := TabControlMouseUp;
     212    OnMouseUp := TabControlMouseUp;
     213    Images := TabImageList;
     214  end;
     215  //TabsPos := hpTop;
     216  //MoveDuration := 1000; // ms
     217
     218  TabControl.Visible := True;
     219  TabControl.Tabs.Clear;
     220  TabImageList.Clear;
     221  with TCoolDockManager(Manager) do
     222  for I := 0 to DockPanels.Count - 1 do begin
     223    TabControl.Tabs.Add(TCoolDockClientPanel(DockPanels[I]).Control.Caption);
     224    TabImageList.Add(TCoolDockClientPanel(DockPanels[I]).Header.Icon.Picture.Bitmap, nil);
     225    if Assigned(TCoolDockClientPanel(DockPanels[I]).Splitter) then
     226      TCoolDockClientPanel(DockPanels[I]).Splitter.Visible := False;
     227    TCoolDockClientPanel(DockPanels[I]).ClientAreaPanel.Visible := False;
     228    TCoolDockClientPanel(DockPanels[I]).Visible := False;
     229  end;
     230  TabControlChange(Self);
     231end;
     232
     233destructor TCoolDockStyleTabs.Destroy;
     234begin
     235  TabControl.Visible := False;
     236  TabControl.Tabs.Clear;
     237  inherited Destroy;
     238end;
     239
     240procedure TCoolDockStyleTabs.InsertControl(NewPanel: TCoolDockClientPanel;
     241  AControl: TControl; InsertAt: TAlign);
     242begin
     243  inherited;
     244  TabControl.Tabs.Add(AControl.Caption);
     245  TabImageList.Add(NewPanel.Header.Icon.Picture.Bitmap, nil);
     246  if Assigned(NewPanel.Splitter) then
     247    NewPanel.Splitter.Visible := False;
     248  NewPanel.ClientAreaPanel.Visible := False;
     249  NewPanel.Visible := False;
     250  TabControlChange(Self);
     251end;
     252
     253procedure TCoolDockStyleTabs.UpdateClientSize;
     254var
     255  I: Integer;
     256begin
     257  inherited UpdateClientSize;
     258  with TCoolDockManager(Manager) do
     259  for I := 0 to DockPanels.Count - 1 do begin
     260    TCoolDockClientPanel(DockPanels[I]).ClientAreaPanel.Width := DockSite.Width;
     261    TCoolDockClientPanel(DockPanels[I]).ClientAreaPanel.Height := DockSite.Height - TabControl.Height;
     262    //TCoolDockClientPanel(FDockPanels[I]).DockPanelPaint(Self);
     263  end;
     264end;
     265
     266procedure TCoolDockStyleTabs.SetTabsPos(const AValue: THeaderPos);
     267begin
     268  (*if FTabsPos = AValue then Exit;
     269  FTabsPos := AValue;
     270  with TabControl do
     271  case AValue of
     272    hpAuto, hpTop: begin
     273      Align := alTop;
     274      TabPosition := tpTop;
     275      Height := GrabberSize;
     276    end;
     277    hpLeft: begin
     278      Align := alLeft;
     279      TabPosition := tpLeft;
     280      Width := GrabberSize;
     281    end;
     282    hpRight: begin
     283      Align := alRight;
     284      TabPosition := tpRight;
     285      Width := GrabberSize;
     286    end;
     287    hpBottom: begin
     288      Align := alBottom;
     289      TabPosition := tpBottom;
     290      Height := GrabberSize;
     291    end;
     292  end;       *)
     293end;
     294
     295
    17296end.
    18297
  • Docking/CoolDocking/UCoolDocking.pas

    r96 r97  
    1111  Buttons, ExtCtrls, Contnrs, Forms, ComCtrls, Dialogs, Menus, FileUtil,
    1212  UCoolDockCustomize, DOM, XMLWrite, XMLRead, UCoolDockWindowList,
    13   DateUtils;
     13  DateUtils, UCoolDockStyleTabs, UCoolDockStyleRegions, UCoolDockStylePopupTabs,
     14  UCoolDockStylePopupRegions, UCoolDockStyle, UCoolDockClientPanel;
    1415
    1516const
    1617  GrabberSize = 22;
    17   AutoHideStepCount = 20;
    1818
    1919type
    2020  TDockDirection = (ddNone, ddHorizontal, ddVertical);
    21   THeaderPos = (hpAuto, hpLeft, hpTop, hpRight, hpBottom);
    2221
    2322  TCoolDockManager = class;
    24   TCoolDockClientPanel = class;
    2523  TCoolDockCustomize = class;
    2624  TCoolDockClient = class;
     
    3634  end;
    3735
    38   TDockStyle = (dsList, dsTabs);
    39 
    40   { TCoolDockHeader }
    41 
    42   TCoolDockHeader = class(TPanel)
    43   private
    44     procedure CloseButtonClick(Sender: TObject);
    45     procedure DrawGrabber(Canvas: TCanvas; AControl: TControl);
    46   public
    47     CloseButton: TSpeedButton;
    48     Title: TLabel;
    49     Icon: TImage;
    50     ParentClientPanel: TCoolDockClientPanel;
    51     Shape: TShape;
    52     constructor Create(TheOwner: TComponent); override;
    53     destructor Destroy; override;
    54   end;
    55 
    56   TCoolDockStyle = class
    57   end;
    58 
    59   { TCoolDockClientPanel }
    60 
    61   TCoolDockClientPanel = class(TPanel)
    62   private
    63     FAutoHide: Boolean;
    64     FHeaderPos: THeaderPos;
    65     FShowHeader: Boolean;
    66     function GetAutoHideEnabled: Boolean;
    67     procedure SetAutoHide(const AValue: Boolean);
    68     procedure SetAutoHideEnabled(const AValue: Boolean);
    69     procedure SetHeaderPos(const AValue: THeaderPos);
    70     procedure SetShowHeader(const AValue: Boolean);
    71     procedure VisibleChange(Sender: TObject);
    72   public
    73     Header: TCoolDockHeader;
    74     OwnerDockManager: TCoolDockManager;
    75     Control: TControl;
    76     Splitter: TSplitter;
    77     ClientAreaPanel: TPanel;
    78     constructor Create(TheOwner: TComponent); override;
    79     destructor Destroy; override;
    80     procedure DockPanelPaint(Sender: TObject);
    81     procedure DockPanelMouseDown(Sender: TObject; Button: TMouseButton;
    82       Shift: TShiftState; X, Y: Integer);
    83     procedure ResizeExecute(Sender: TObject);
    84     property ShowHeader: Boolean read FShowHeader write SetShowHeader;
    85     property AutoHideEnabled: Boolean read GetAutoHideEnabled
    86       write SetAutoHideEnabled;
    87     property HeaderPos: THeaderPos read FHeaderPos write SetHeaderPos;
    88   end;
    89 
    90   { TCoolDockAutoHide }
    91 
    92   TCoolDockAutoHide = class
    93   private
    94     FDuration: Real;
    95     FStepCount: Integer;
    96     StartBounds: TRect;
    97     procedure SetDuration(const AValue: Real);
    98     procedure SetStepCount(const AValue: Integer);
    99     procedure UpdateBounds;
    100     procedure UpdateTimerInterval;
    101   public
    102     Position: Real;
    103     Direction: Integer;
    104     TabPosition: TTabPosition;
    105     Enable: Boolean;
    106     Timer: TTimer;
    107     Control: TControl;
    108     ControlVisible: Boolean;
    109     procedure Hide;
    110     procedure Show;
    111     constructor Create;
    112     destructor Destroy; override;
    113     procedure TimerExecute(Sender: TObject);
    114     property Duration: Real read FDuration write SetDuration;
    115     property StepCount: Integer read FStepCount write SetStepCount;
    116   end;
     36  TDockStyle = (dsList, dsTabs, dsPopupTabs, dsPopupList);
    11737
    11838  { TCoolDockManager }
     
    12040  TCoolDockManager = class(TDockManager)
    12141  private
    122     MouseDown: Boolean;
    123     MouseButton: TMouseButton;
    124     MouseDownSkip: Boolean;
    12542    FMaster: TCoolDockMaster;
    126     FTabsPos: THeaderPos;
    127     PopupMenuTabs: TPopupMenu;
     43    DockStyleHandler: TCoolDockStyle;
    12844    PopupMenuHeader: TPopupMenu;
    12945    FDockStyle: TDockStyle;
    130     TabControl: TTabControl;
    131     TabImageList: TImageList;
    13246    FDockDirection: TDockDirection;
    13347    FDockSite: TWinControl;
    13448    FDockPanels: TObjectList; // TObjectList<TCoolDockClientPanel>
    135     AutoHide: TCoolDockAutoHide;
    13649    function FindControlInPanels(Control: TControl): TCoolDockClientPanel;
    13750    function GetDockSite: TWinControl;
     
    13952    procedure InsertControlPanel(Control: TControl; InsertAt: TAlign;
    14053      DropCtl: TControl);
    141     procedure PopupMenuTabCloseClick(Sender: TObject);
    14254    procedure SetDockStyle(const AValue: TDockStyle);
    14355    procedure SetMaster(const AValue: TCoolDockMaster);
    14456    procedure SetMoveDuration(const AValue: Integer);
    145     procedure SetTabsPos(const AValue: THeaderPos);
    146     procedure TabControlMouseLeave(Sender: TObject);
    147     procedure TabControlChange(Sender: TObject);
    148     procedure TabControlMouseDown(Sender: TObject; Button: TMouseButton;
    149       Shift: TShiftState; X, Y: Integer);
    150     procedure TabControlMouseUp(Sender: TObject; Button: TMouseButton;
    151       Shift: TShiftState; X, Y: Integer);
    15257    procedure UpdateClientSize;
    15358    procedure PopupMenuListClick(Sender: TObject);
     
    18893
    18994    function CreateContainer(InsertAt: TAlign): TCoolDockConjoinForm;
     95    property DockPanels: TObjectList read FDockPanels write FDockPanels;
    19096    property DockStyle: TDockStyle read FDockStyle write SetDockStyle;
    19197    property MoveDuration: Integer read GetMoveDuration write SetMoveDuration;
    192     property TabsPos: THeaderPos read FTabsPos write SetTabsPos;
    19398    property Master: TCoolDockMaster read FMaster write SetMaster;
    19499    property DockSite: TWinControl read GetDockSite;
     
    286191procedure Register;
    287192
    288 implementation
    289 
    290 uses
    291   UCoolDockStyleTabs;
    292 
    293193resourcestring
    294194  SDockStyle = 'Style';
     
    309209  SRenameWindow = 'Rename window';
    310210
     211
     212implementation
     213
    311214procedure Register;
    312215begin
     
    342245end;
    343246
    344 procedure TCoolDockManager.TabControlMouseLeave(Sender: TObject);
    345 begin
    346   if MouseDown then
    347   if (TabControl.TabIndex <> -1) then begin
    348     TCoolDockClientPanel(FDockPanels[TabControl.TabIndex]).ClientAreaPanel.DockSite := False;
    349     DragManager.DragStart(TCoolDockClientPanel(FDockPanels[TabControl.TabIndex]).Control, False, 1);
    350   end;
    351   MouseDown := False;
    352 end;
    353 
    354247constructor TCoolDockManager.Create(ADockSite: TWinControl);
    355248var
     
    361254  FDockPanels := TObjectList.Create;
    362255
    363   AutoHide := TCoolDockAutoHide.Create;
    364 
    365   // Tabs popup
     256  FDockStyle := dsTabs; // To initialize style value have to be different
     257  DockStyle := dsList;
     258
     259(*  // Tabs popup
    366260
    367261  PopupMenuTabs := TPopupMenu.Create(FDockSite);
     
    498392  NewMenuItem.OnClick := PopupMenuCustomizeClick;
    499393  PopupMenuHeader.Items.Add(NewMenuItem);
    500 
    501   TabImageList := TImageList.Create(FDockSite);
    502   with TabImageList do begin
    503     Name := ADockSite.Name + '_' + 'ImageList';
    504   end;
    505   TabControl := TTabControl.Create(FDockSite);
    506   with TabControl do begin
    507     Parent := FDockSite;
    508     Name := ADockSite.Name + '_' + 'TabControl';
    509     Visible := False;
    510     Align := alTop;
    511     Height := 24;
    512     OnChange := TabControlChange;
    513     PopupMenu := PopupMenuTabs;
    514     TTabControlNoteBookStrings(Tabs).NoteBook.OnMouseLeave := TabControlMouseLeave;
    515     TTabControlNoteBookStrings(Tabs).NoteBook.OnMouseDown := TabControlMouseDown;
    516     TTabControlNoteBookStrings(Tabs).NoteBook.OnMouseUp := TabControlMouseUp;
    517     OnMouseUp := TabControlMouseUp;
    518     Images := TabImageList;
    519   end;
    520   TabsPos := hpTop;
    521   MoveDuration := 1000; // ms
     394  *)
    522395end;
    523396
     
    601474      NewPanel.Header.Icon.Picture.Assign((Control as TForm).Icon);
    602475
    603     if DockStyle = dsTabs then begin
    604       TabControl.Tabs.Add(Control.Caption);
    605       TabImageList.Add(NewPanel.Header.Icon.Picture.Bitmap, nil);
    606       if Assigned(NewPanel.Splitter) then
    607         NewPanel.Splitter.Visible := False;
    608       NewPanel.ClientAreaPanel.Visible := False;
    609       NewPanel.Visible := False;
    610       TabControlChange(Self);
    611     end;
     476    DockStyleHandler.InsertControl(NewPanel, Control, InsertAt);
     477
    612478    NewPanel.Control := Control;
    613479    Control.AddHandlerOnVisibleChanged(NewPanel.VisibleChange);
     
    765631  if FDockStyle <> AValue then begin
    766632    FDockStyle := AValue;
     633    DockStyleHandler.Free;
    767634    if AValue = dsTabs then begin
    768       TabControl.Visible := True;
    769       TabControl.Tabs.Clear;
    770       TabImageList.Clear;
    771       for I := 0 to FDockPanels.Count - 1 do begin
    772         TabControl.Tabs.Add(TCoolDockClientPanel(FDockPanels[I]).Control.Caption);
    773         TabImageList.Add(TCoolDockClientPanel(FDockPanels[I]).Header.Icon.Picture.Bitmap, nil);
    774         if Assigned(TCoolDockClientPanel(FDockPanels[I]).Splitter) then
    775           TCoolDockClientPanel(FDockPanels[I]).Splitter.Visible := False;
    776         TCoolDockClientPanel(FDockPanels[I]).ClientAreaPanel.Visible := False;
    777         TCoolDockClientPanel(FDockPanels[I]).Visible := False;
    778       end;
    779       TabControlChange(Self);
     635      DockStyleHandler := TCoolDockStyleTabs.Create(Self);
    780636    end else
    781637    if AValue = dsList then begin
    782       TabControl.Visible := False;
    783       TabControl.Tabs.Clear;
    784       for I := 0 to FDockPanels.Count - 1 do begin
    785         if Assigned(TCoolDockClientPanel(FDockPanels[I]).Splitter) then
    786         TCoolDockClientPanel(FDockPanels[I]).Splitter.Visible := True;
    787         TCoolDockClientPanel(FDockPanels[I]).Visible := True;
    788         TCoolDockClientPanel(FDockPanels[I]).ClientAreaPanel.Parent := TCoolDockClientPanel(FDockPanels[I]);
    789         TCoolDockClientPanel(FDockPanels[I]).ClientAreaPanel.Visible := True;
    790         TCoolDockClientPanel(FDockPanels[I]).Control.Visible := True;
    791       end;
     638      DockStyleHandler := TCoolDockStyleRegions.Create(Self);
     639    end else
     640    if AValue = dsPopupList then begin
     641      DockStyleHandler := TCoolDockStylePopupRegions.Create(Self);
     642    end else
     643    if AValue = dsPopupTabs then begin
     644      DockStyleHandler := TCoolDockStylePopupTabs.Create(Self);
    792645    end;
    793646  end;
     
    799652  if FMaster = AValue then Exit;
    800653  FMaster := AValue;
    801   TabsPos := AValue.DefaultTabsPos;
    802654end;
    803655
     
    806658end;
    807659
    808 procedure TCoolDockManager.SetTabsPos(const AValue: THeaderPos);
    809 begin
    810   if FTabsPos = AValue then Exit;
    811   FTabsPos := AValue;
    812   with TabControl do
    813   case AValue of
    814     hpAuto, hpTop: begin
    815       Align := alTop;
    816       TabPosition := tpTop;
    817       Height := GrabberSize;
    818     end;
    819     hpLeft: begin
    820       Align := alLeft;
    821       TabPosition := tpLeft;
    822       Width := GrabberSize;
    823     end;
    824     hpRight: begin
    825       Align := alRight;
    826       TabPosition := tpRight;
    827       Width := GrabberSize;
    828     end;
    829     hpBottom: begin
    830       Align := alBottom;
    831       TabPosition := tpBottom;
    832       Height := GrabberSize;
    833     end;
    834   end;
    835 end;
    836 
    837660procedure TCoolDockManager.UpdateClientSize;
    838 var
    839   I: Integer;
    840 begin
    841   if DockStyle = dsList then begin
    842     for I := 0 to FDockPanels.Count - 1 do begin
    843       TCoolDockClientPanel(FDockPanels[I]).Height := FDockSite.Height div
    844         FDockSite.DockClientCount;
    845       TCoolDockClientPanel(FDockPanels[I]).Width := FDockSite.Width div
    846         FDockSite.DockClientCount;
    847       //TCoolDockClientPanel(FDockPanels[I]).DockPanelPaint(Self);
    848       TCoolDockClientPanel(FDockPanels[I]).DockPanelPaint(Self);
    849     end;
    850   end else
    851   if DockStyle = dsTabs then begin
    852     for I := 0 to FDockPanels.Count - 1 do begin
    853       TCoolDockClientPanel(FDockPanels[I]).ClientAreaPanel.Width := FDockSite.Width;
    854       TCoolDockClientPanel(FDockPanels[I]).ClientAreaPanel.Height := FDockSite.Height - TabControl.Height;
    855       //TCoolDockClientPanel(FDockPanels[I]).DockPanelPaint(Self);
    856     end;
    857   end;
    858 end;
    859 
    860 procedure TCoolDockManager.TabControlChange(Sender: TObject);
    861 var
    862   I: Integer;
    863 begin
    864   // Hide all clients
    865   for I := 0 to FDockPanels.Count - 1 do begin
    866     TCoolDockClientPanel(FDockPanels[I]).ClientAreaPanel.Visible := False;
    867     TCoolDockClientPanel(FDockPanels[I]).ClientAreaPanel.Parent := FDockSite;
    868     TCoolDockClientPanel(FDockPanels[I]).Control.Align := alClient;
    869     TCoolDockClientPanel(FDockPanels[I]).Control.Visible := False;
    870 
    871     // Workaround for "Cannot focus" error
    872     TForm(TCoolDockClientPanel(FDockPanels[I]).Control).ActiveControl := nil;
    873   end;
    874   if (TabControl.TabIndex <> -1) and (FDockPanels.Count > TabControl.TabIndex) then begin
    875     with TCoolDockClientPanel(FDockPanels[TabControl.TabIndex]), ClientAreaPanel do begin
    876       Control.Show;
    877       AutoHide.Enable := True;
    878       if AutoHide.Enable then begin
    879         //Parent := nil;
    880         Visible := True;
    881         if AutoHide.ControlVisible then begin
    882           AutoHide.Hide;
    883         end;
    884         AutoHide.Control := Control;
    885         AutoHide.Show;
    886       end else begin
    887         Parent := FDockSite;
    888         Visible := True;
    889         UpdateClientSize;
    890       end;
    891     end;
    892   //TCoolDockClientPanel(FDockPanels[TabControl.TabIndex]).Visible := True;
    893   end;
    894   MouseDownSkip := True;
     661begin
     662  DockStyleHandler.UpdateClientSize;
    895663end;
    896664
     
    910678end;
    911679
    912 procedure TCoolDockManager.PopupMenuTabCloseClick(Sender: TObject);
    913 begin
    914   if TabControl.TabIndex <> -1 then
    915     TCoolDockClientPanel(FDockPanels[TabControl.TabIndex]).Control.Hide;
    916 end;
    917 
    918680procedure TCoolDockManager.PopupMenuRenameClick(Sender: TObject);
    919681var
     
    927689procedure TCoolDockManager.PopupMenuPositionAutoClick(Sender: TObject);
    928690begin
    929   TabsPos := hpAuto;
     691  //TabsPos := hpAuto;
    930692end;
    931693
    932694procedure TCoolDockManager.PopupMenuPositionLeftClick(Sender: TObject);
    933695begin
    934   TabsPos := hpLeft;
     696  //TabsPos := hpLeft;
    935697end;
    936698
    937699procedure TCoolDockManager.PopupMenuPositionRightClick(Sender: TObject);
    938700begin
    939   TabsPos := hpRight;
     701  //TabsPos := hpRight;
    940702end;
    941703
    942704procedure TCoolDockManager.PopupMenuPositionTopClick(Sender: TObject);
    943705begin
    944   TabsPos := hpTop;
     706  //TabsPos := hpTop;
    945707end;
    946708
    947709procedure TCoolDockManager.PopupMenuPositionBottomClick(Sender: TObject);
    948710begin
    949   TabsPos := hpBottom;
     711  //TabsPos := hpBottom;
    950712end;
    951713
     
    965727end;
    966728
    967 procedure TCoolDockManager.TabControlMouseDown(Sender: TObject; Button: TMouseButton;
    968   Shift: TShiftState; X, Y: Integer);
    969 begin
    970   if not MouseDownSkip then begin
    971     MouseDown := True;
    972     MouseButton := Button;
    973   end;
    974   MouseDownSkip := False;
    975 end;
    976 
    977 procedure TCoolDockManager.TabControlMouseUp(Sender: TObject;
    978   Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
    979 begin
    980   MouseDown := False;
    981 end;
    982 
    983729procedure TCoolDockManager.PopupMenuListClick(Sender: TObject);
    984730begin
     
    986732end;
    987733
    988 { TCoolDockClientPanel }
    989 
    990 procedure TCoolDockClientPanel.SetShowHeader(const AValue: Boolean);
    991 begin
    992   if FShowHeader = AValue then Exit;
    993   FShowHeader := AValue;
    994   DockPanelPaint(Self);
    995 end;
    996 
    997 procedure TCoolDockClientPanel.VisibleChange(Sender: TObject);
    998 var
    999   Visible: Boolean;
    1000 begin
    1001   (*if Assigned(Control) then begin
    1002     Visible := Control.Visible;
    1003     if Assigned(ClientAreaPanel) then
    1004       ClientAreaPanel.Visible := Visible;
    1005     if Assigned(Splitter) then
    1006       Splitter.Visible := Visible;
    1007     OwnerDockManager.UpdateClientSize;
    1008   end;*)
    1009 end;
    1010 
    1011 procedure TCoolDockClientPanel.SetAutoHide(const AValue: Boolean);
    1012 begin
    1013   if FAutoHide = AValue then Exit;
    1014   FAutoHide := AValue;
    1015 end;
    1016 
    1017 function TCoolDockClientPanel.GetAutoHideEnabled: Boolean;
    1018 begin
    1019 end;
    1020 
    1021 procedure TCoolDockClientPanel.SetAutoHideEnabled(const AValue: Boolean);
    1022 begin
    1023 
    1024 end;
    1025 
    1026 procedure TCoolDockClientPanel.SetHeaderPos(const AValue: THeaderPos);
    1027 begin
    1028   if FHeaderPos=AValue then exit;
    1029   FHeaderPos:=AValue;
    1030 end;
    1031 
    1032 constructor TCoolDockClientPanel.Create(TheOwner: TComponent);
    1033 begin
    1034   inherited;
    1035   ShowHeader := True;
    1036   Header := TCoolDockHeader.Create(Self);
    1037   with Header do begin
    1038     Parent := Self;
    1039     Visible := ShowHeader;
    1040     Align := alTop;
    1041     Height := GrabberSize;
    1042     ParentClientPanel := Self;
    1043   end;
    1044   ClientAreaPanel := TPanel.Create(Self);
    1045   with ClientAreaPanel do begin
    1046     Parent := Self;
    1047     Visible := True;
    1048     DockSite := True;
    1049     UseDockManager := True;
    1050     Align := alClient;
    1051     BevelInner := bvNone;
    1052     BevelOuter := bvNone;
    1053     //Color := clGreen;
    1054   end;
    1055   Splitter := TSplitter.Create(Self);
    1056   with Splitter do begin
    1057     //Color := clRed;
    1058   end;
    1059   OnPaint := DockPanelPaint;
    1060   Header.Shape.OnMouseDown := DockPanelMouseDown;
    1061   OnResize := ResizeExecute;
    1062   BevelInner := bvNone;
    1063   BevelOuter := bvNone;
    1064   AutoHideEnabled := True;
    1065   HeaderPos := hpTop;
    1066 end;
    1067 
    1068 destructor TCoolDockClientPanel.Destroy;
    1069 begin
    1070   inherited Destroy;
    1071 end;
    1072 
    1073 procedure TCoolDockClientPanel.ResizeExecute(Sender: TObject);
    1074 begin
    1075   Control.Top := GrabberSize;
    1076   Control.Left := 0;
    1077   Control.Width := Width;
    1078   Control.Height := Height - GrabberSize;
    1079   //Control.SetBounds(0, GrabberSize, Width - Control.Left,
    1080   //  Height - Control.Top);
    1081 end;
    1082 
    1083 procedure TCoolDockClientPanel.DockPanelPaint(Sender: TObject);
    1084 var
    1085   I: Integer;
    1086   R: TRect;
    1087 begin
    1088   if not (csDesigning in ComponentState) then
    1089   if Assigned(Control) then begin
    1090     R := Control.ClientRect;
    1091     Canvas.FillRect(R);
    1092     Header.Visible := ShowHeader;
    1093     if ShowHeader then begin
    1094       if ClientAreaPanel.DockClientCount = 0 then
    1095         Header.DrawGrabber(Canvas, Control) else
    1096       Header.DrawGrabber(Canvas, ClientAreaPanel);
    1097     end;
    1098   end;
    1099 end;
    1100 
    1101 procedure TCoolDockClientPanel.DockPanelMouseDown(Sender: TObject;
    1102   Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
    1103 begin
    1104   if Control is TForm then begin
    1105     //TForm(Control).SetFocus;
    1106     DockPanelPaint(Self);
    1107   end;
    1108   if (Button = mbLeft) then begin
    1109     //(Control as TWinControl).DockSite := False;
    1110     ClientAreaPanel.DockSite := False;
    1111     (Control as TWinControl).BeginDrag(False, 10);
    1112     //DragManager.DragStart(Control, False, 1);
    1113   end;
    1114 end;
    1115734
    1116735{ TCoolDockConjoinForm }
     
    1314933    FClients.Remove(Client);
    1315934  end;
    1316 end;
    1317 
    1318 { TCoolDockHeader }
    1319 
    1320 constructor TCoolDockHeader.Create(TheOwner: TComponent);
    1321 begin
    1322   inherited Create(TheOwner);
    1323   Shape := TShape.Create(Self);
    1324   with Shape do begin
    1325     Parent := Self;
    1326     Anchors := [akRight, akBottom, akLeft, akTop];
    1327     Left := 1;
    1328     Top := 1;
    1329     Width := Self.Width - 2;
    1330     Height := Self.Height - 2;
    1331     Brush.Style := bsClear;
    1332   end;
    1333   CloseButton := TSpeedButton.Create(Self);
    1334   with CloseButton do begin
    1335     Parent := Self;
    1336     Caption := 'X';
    1337     Font.Size := 6;
    1338     Width := GrabberSize - 8;
    1339     Height := GrabberSize - 8;
    1340     Anchors := [akRight, akTop];
    1341     Left := Self.Width - Width - 4;
    1342     Top := 4;
    1343     Visible := True;
    1344     OnClick := CloseButtonClick;
    1345   end;
    1346   Title := TLabel.Create(Self);
    1347   with Title do begin
    1348     Parent := Self;
    1349     Visible := True;
    1350     Top := 4;
    1351     Left := 6;
    1352     BevelInner := bvNone;
    1353     BevelOuter := bvNone;
    1354   end;
    1355   Icon := TImage.Create(Self);
    1356   with Icon do begin
    1357     Parent := Self;
    1358     Left := 4;
    1359     Top := 2;
    1360     Visible := True;
    1361   end;
    1362 end;
    1363 
    1364 destructor TCoolDockHeader.Destroy;
    1365 begin
    1366   inherited Destroy;
    1367 end;
    1368 
    1369 procedure TCoolDockHeader.DrawGrabber(Canvas: TCanvas; AControl: TControl);
    1370 begin
    1371   with Canvas do begin
    1372     Brush.Color := clBtnFace;
    1373     Pen.Color := clBlack;
    1374     //FillRect(0, 0, AControl.Width, GrabberSize);
    1375 
    1376     if (AControl as TWinControl).Focused then
    1377       Title.Font.Style := Font.Style + [fsBold]
    1378       else Title.Font.Style := Font.Style - [fsBold];
    1379     Rectangle(1, 1, AControl.Width - 1, GrabberSize - 1);
    1380     if Icon.Picture.Width > 0 then Title.Left := 8 + Icon.Picture.Width
    1381       else Title.Left := 6;
    1382     Title.Caption := AControl.Caption;
    1383   end;
    1384 end;
    1385 
    1386 procedure TCoolDockHeader.CloseButtonClick(Sender: TObject);
    1387 begin
    1388   ParentClientPanel.Control.Hide;
    1389935end;
    1390936
     
    15391085end;
    15401086
    1541 { TCoolDockAutoHide }
    1542 
    1543 procedure TCoolDockAutoHide.UpdateBounds;
    1544 begin
    1545   case TabPosition of
    1546     tpBottom: begin
    1547       Control.Height := Round((StartBounds.Bottom - StartBounds.Top) * Position);
    1548       Control.Top := StartBounds.Bottom - Control.Height;
    1549     end;
    1550     tpTop: begin
    1551       Control.Height := Round((StartBounds.Bottom - StartBounds.Top) * Position);
    1552     end;
    1553     tpRight: begin
    1554       Control.Width := Round((StartBounds.Right - StartBounds.Left) * Position);
    1555     end;
    1556     tpLeft: begin
    1557       Control.Width := Round((StartBounds.Right - StartBounds.Left) * Position);
    1558       Control.Left := StartBounds.Right - Control.Width;
    1559     end;
    1560   end;
    1561 end;
    1562 
    1563 procedure TCoolDockAutoHide.UpdateTimerInterval;
    1564 begin
    1565   Timer.Interval := Round(FDuration * 1000 / FStepCount);
    1566 end;
    1567 
    1568 procedure TCoolDockAutoHide.SetDuration(const AValue: Real);
    1569 begin
    1570   if FDuration = AValue then Exit;
    1571   FDuration := AValue;
    1572   UpdateTimerInterval;
    1573 end;
    1574 
    1575 procedure TCoolDockAutoHide.SetStepCount(const AValue: Integer);
    1576 begin
    1577   if FStepCount = AValue then Exit;
    1578   FStepCount := AValue;
    1579   UpdateTimerInterval;
    1580 end;
    1581 
    1582 procedure TCoolDockAutoHide.Hide;
    1583 begin
    1584   StartBounds := Control.BoundsRect;
    1585   Direction := -1;
    1586   Position := 1;
    1587   Timer.Enabled := True;
    1588   UpdateBounds;
    1589 end;
    1590 
    1591 procedure TCoolDockAutoHide.Show;
    1592 begin
    1593   StartBounds := Control.BoundsRect;
    1594   Control.Align := alCustom;
    1595   Direction := 1;
    1596   Position := 0;
    1597   Timer.Enabled := True;
    1598   UpdateBounds;
    1599 end;
    1600 
    1601 constructor TCoolDockAutoHide.Create;
    1602 begin
    1603   Timer := TTimer.Create(nil);
    1604   Timer.Enabled := False;
    1605   Timer.OnTimer := TimerExecute;
    1606   StepCount := AutoHideStepCount;
    1607   Duration := 0.5;
    1608 end;
    1609 
    1610 destructor TCoolDockAutoHide.Destroy;
    1611 begin
    1612   Timer.Free;
    1613   inherited Destroy;
    1614 end;
    1615 
    1616 procedure TCoolDockAutoHide.TimerExecute(Sender: TObject);
    1617 begin
    1618   if Direction = 1 then begin
    1619     Position := Position + 1 / StepCount;
    1620     if Position > 1 then begin
    1621       Position := 1;
    1622       Timer.Enabled := False;
    1623       ControlVisible := True;
    1624     end;
    1625   end else
    1626   if Direction = -1 then begin
    1627     Position := Position - 1 / StepCount;
    1628     if Position < 1 then begin
    1629       Position := 0;
    1630       Timer.Enabled := False;
    1631       ControlVisible := False;
    1632     end;
    1633   end;
    1634   UpdateBounds;
    1635 end;
    16361087
    16371088end.
Note: See TracChangeset for help on using the changeset viewer.