Changeset 198 for Docking


Ignore:
Timestamp:
Mar 16, 2011, 12:32:41 PM (14 years ago)
Author:
george
Message:
  • Fixed: Popup submenus style and position item selection.
  • Added: Locking dock managers.
  • Modified: Enhanced auto popup tabs handling. Not yet finished.
  • Modified: Dock manager position united for all dock manager descendands.
Location:
Docking/CoolDocking
Files:
3 added
26 edited

Legend:

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

    r197 r198  
    4747      </Item4>
    4848    </RequiredPackages>
    49     <Units Count="52">
     49    <Units Count="56">
    5050      <Unit0>
    5151        <Filename Value="IDE.lpr"/>
     
    5353        <UnitName Value="IDE"/>
    5454        <WindowIndex Value="0"/>
    55         <TopLine Value="1"/>
    56         <CursorPos X="1" Y="17"/>
     55        <TopLine Value="4"/>
     56        <CursorPos X="35" Y="18"/>
    5757        <UsageCount Value="314"/>
    5858      </Unit0>
     
    6363        <ResourceBaseClass Value="Form"/>
    6464        <UnitName Value="UMainForm"/>
    65         <EditorIndex Value="8"/>
    66         <WindowIndex Value="0"/>
    67         <TopLine Value="1"/>
    68         <CursorPos X="1" Y="17"/>
    69         <UsageCount Value="314"/>
    70         <Loaded Value="True"/>
    71         <LoadedDesigner Value="True"/>
     65        <EditorIndex Value="5"/>
     66        <WindowIndex Value="0"/>
     67        <TopLine Value="158"/>
     68        <CursorPos X="1" Y="165"/>
     69        <UsageCount Value="314"/>
     70        <Loaded Value="True"/>
    7271      </Unit1>
    7372      <Unit2>
     
    7978        <WindowIndex Value="0"/>
    8079        <TopLine Value="1"/>
    81         <CursorPos X="31" Y="17"/>
     80        <CursorPos X="67" Y="2"/>
    8281        <UsageCount Value="314"/>
    8382      </Unit2>
     
    106105      <Unit5>
    107106        <Filename Value="E:\Projekty2\FreePascalManager\trunk\Instance\1\Lazarus\lcl\include\control.inc"/>
    108         <EditorIndex Value="12"/>
    109         <WindowIndex Value="0"/>
    110         <TopLine Value="2320"/>
    111         <CursorPos X="1" Y="2333"/>
    112         <UsageCount Value="59"/>
    113         <Loaded Value="True"/>
     107        <WindowIndex Value="0"/>
     108        <TopLine Value="1296"/>
     109        <CursorPos X="1" Y="1309"/>
     110        <UsageCount Value="60"/>
    114111      </Unit5>
    115112      <Unit6>
     
    121118        <WindowIndex Value="0"/>
    122119        <TopLine Value="4"/>
    123         <CursorPos X="24" Y="17"/>
     120        <CursorPos X="50" Y="6"/>
    124121        <UsageCount Value="314"/>
    125122      </Unit6>
     
    129126        <TopLine Value="941"/>
    130127        <CursorPos X="1" Y="954"/>
    131         <UsageCount Value="37"/>
     128        <UsageCount Value="36"/>
    132129      </Unit7>
    133130      <Unit8>
     
    139136        <WindowIndex Value="0"/>
    140137        <TopLine Value="4"/>
    141         <CursorPos X="25" Y="17"/>
     138        <CursorPos X="62" Y="7"/>
    142139        <UsageCount Value="314"/>
    143140      </Unit8>
     
    150147        <WindowIndex Value="0"/>
    151148        <TopLine Value="3"/>
    152         <CursorPos X="37" Y="16"/>
     149        <CursorPos X="25" Y="18"/>
    153150        <UsageCount Value="314"/>
    154151      </Unit9>
     
    161158        <WindowIndex Value="0"/>
    162159        <TopLine Value="5"/>
    163         <CursorPos X="37" Y="18"/>
     160        <CursorPos X="61" Y="8"/>
    164161        <UsageCount Value="314"/>
    165162      </Unit10>
     
    211208        <Filename Value="..\..\UCDClient.pas"/>
    212209        <UnitName Value="UCDClient"/>
    213         <EditorIndex Value="0"/>
    214         <WindowIndex Value="0"/>
    215         <TopLine Value="1"/>
    216         <CursorPos X="14" Y="13"/>
    217         <UsageCount Value="157"/>
    218         <Loaded Value="True"/>
     210        <WindowIndex Value="0"/>
     211        <TopLine Value="81"/>
     212        <CursorPos X="52" Y="92"/>
     213        <UsageCount Value="156"/>
    219214      </Unit15>
    220215      <Unit16>
    221216        <Filename Value="..\..\UCDLayout.pas"/>
    222217        <UnitName Value="UCDLayout"/>
    223         <EditorIndex Value="19"/>
    224218        <WindowIndex Value="0"/>
    225219        <TopLine Value="1"/>
    226220        <CursorPos X="22" Y="16"/>
    227         <UsageCount Value="66"/>
    228         <Loaded Value="True"/>
     221        <UsageCount Value="67"/>
    229222      </Unit16>
    230223      <Unit17>
     
    238231        <Filename Value="..\..\Common\URectangle.pas"/>
    239232        <UnitName Value="URectangle"/>
    240         <EditorIndex Value="18"/>
    241233        <WindowIndex Value="0"/>
    242234        <TopLine Value="110"/>
    243235        <CursorPos X="18" Y="126"/>
    244         <UsageCount Value="31"/>
    245         <Loaded Value="True"/>
     236        <UsageCount Value="32"/>
    246237      </Unit18>
    247238      <Unit19>
     
    251242        <TopLine Value="770"/>
    252243        <CursorPos X="22" Y="783"/>
    253         <UsageCount Value="12"/>
     244        <UsageCount Value="11"/>
    254245      </Unit19>
    255246      <Unit20>
     
    258249        <TopLine Value="913"/>
    259250        <CursorPos X="1" Y="930"/>
    260         <UsageCount Value="5"/>
     251        <UsageCount Value="4"/>
    261252      </Unit20>
    262253      <Unit21>
    263254        <Filename Value="E:\Projekty2\FreePascalManager\trunk\Instance\1\Lazarus\lcl\controls.pp"/>
    264255        <UnitName Value="Controls"/>
    265         <EditorIndex Value="14"/>
    266         <WindowIndex Value="0"/>
    267         <TopLine Value="1389"/>
    268         <CursorPos X="14" Y="1432"/>
    269         <UsageCount Value="35"/>
     256        <EditorIndex Value="1"/>
     257        <WindowIndex Value="0"/>
     258        <TopLine Value="1270"/>
     259        <CursorPos X="15" Y="1283"/>
     260        <UsageCount Value="37"/>
    270261        <Loaded Value="True"/>
    271262      </Unit21>
    272263      <Unit22>
    273264        <Filename Value="E:\Projekty2\FreePascalManager\trunk\Instance\1\Lazarus\lcl\include\wincontrol.inc"/>
    274         <WindowIndex Value="0"/>
    275         <TopLine Value="7151"/>
    276         <CursorPos X="1" Y="7164"/>
     265        <EditorIndex Value="4"/>
     266        <WindowIndex Value="0"/>
     267        <TopLine Value="7225"/>
     268        <CursorPos X="31" Y="7250"/>
    277269        <UsageCount Value="115"/>
     270        <Loaded Value="True"/>
    278271      </Unit22>
    279272      <Unit23>
     
    282275        <TopLine Value="751"/>
    283276        <CursorPos X="1" Y="764"/>
    284         <UsageCount Value="3"/>
     277        <UsageCount Value="2"/>
    285278      </Unit23>
    286279      <Unit24>
     
    290283        <ResourceBaseClass Value="Form"/>
    291284        <UnitName Value="UCDCustomize"/>
    292         <EditorIndex Value="5"/>
    293285        <WindowIndex Value="0"/>
    294286        <TopLine Value="145"/>
    295287        <CursorPos X="34" Y="147"/>
    296         <UsageCount Value="141"/>
    297         <Loaded Value="True"/>
    298         <LoadedDesigner Value="True"/>
     288        <UsageCount Value="140"/>
    299289      </Unit24>
    300290      <Unit25>
    301291        <Filename Value="..\..\UCDCommon.pas"/>
    302292        <UnitName Value="UCDCommon"/>
    303         <EditorIndex Value="7"/>
    304         <WindowIndex Value="0"/>
    305         <TopLine Value="30"/>
    306         <CursorPos X="4" Y="37"/>
    307         <UsageCount Value="56"/>
     293        <EditorIndex Value="8"/>
     294        <WindowIndex Value="0"/>
     295        <TopLine Value="3"/>
     296        <CursorPos X="44" Y="11"/>
     297        <UsageCount Value="61"/>
    308298        <Loaded Value="True"/>
    309299      </Unit25>
     
    311301        <Filename Value="..\..\UCDPopupMenu.pas"/>
    312302        <UnitName Value="UCDPopupMenu"/>
    313         <EditorIndex Value="3"/>
    314         <WindowIndex Value="0"/>
    315         <TopLine Value="255"/>
    316         <CursorPos X="27" Y="268"/>
    317         <UsageCount Value="142"/>
     303        <EditorIndex Value="10"/>
     304        <WindowIndex Value="0"/>
     305        <TopLine Value="159"/>
     306        <CursorPos X="25" Y="173"/>
     307        <UsageCount Value="141"/>
    318308        <Loaded Value="True"/>
    319309      </Unit26>
     
    321311        <Filename Value="E:\Projekty2\FreePascalManager\trunk\Instance\1\Lazarus\lcl\lclclasses.pp"/>
    322312        <UnitName Value="LCLClasses"/>
    323         <WindowIndex Value="0"/>
    324         <TopLine Value="32"/>
    325         <CursorPos X="20" Y="45"/>
    326         <UsageCount Value="7"/>
     313        <EditorIndex Value="11"/>
     314        <WindowIndex Value="0"/>
     315        <TopLine Value="81"/>
     316        <CursorPos X="20" Y="94"/>
     317        <UsageCount Value="10"/>
     318        <Loaded Value="True"/>
    327319      </Unit27>
    328320      <Unit28>
     
    332324        <TopLine Value="1"/>
    333325        <CursorPos X="24" Y="16"/>
    334         <UsageCount Value="15"/>
     326        <UsageCount Value="14"/>
    335327      </Unit28>
    336328      <Unit29>
     
    340332        <TopLine Value="1"/>
    341333        <CursorPos X="5" Y="11"/>
    342         <UsageCount Value="18"/>
     334        <UsageCount Value="17"/>
    343335      </Unit29>
    344336      <Unit30>
    345337        <Filename Value="..\..\Managers\UCDManagerTabs.pas"/>
    346338        <UnitName Value="UCDManagerTabs"/>
    347         <EditorIndex Value="17"/>
    348         <WindowIndex Value="0"/>
    349         <TopLine Value="11"/>
    350         <CursorPos X="3" Y="24"/>
     339        <EditorIndex Value="9"/>
     340        <WindowIndex Value="0"/>
     341        <TopLine Value="95"/>
     342        <CursorPos X="54" Y="98"/>
    351343        <UsageCount Value="130"/>
    352344        <Loaded Value="True"/>
     
    355347        <Filename Value="..\..\Managers\UCDManagerRegions.pas"/>
    356348        <UnitName Value="UCDManagerRegions"/>
    357         <EditorIndex Value="9"/>
    358         <WindowIndex Value="0"/>
    359         <TopLine Value="12"/>
    360         <CursorPos X="39" Y="16"/>
     349        <IsVisibleTab Value="True"/>
     350        <EditorIndex Value="7"/>
     351        <WindowIndex Value="0"/>
     352        <TopLine Value="61"/>
     353        <CursorPos X="27" Y="84"/>
    361354        <UsageCount Value="129"/>
    362355        <Loaded Value="True"/>
     
    365358        <Filename Value="..\..\Managers\UCDManagerTabsPopup.pas"/>
    366359        <UnitName Value="UCDManagerTabsPopup"/>
    367         <EditorIndex Value="2"/>
    368         <WindowIndex Value="0"/>
    369         <TopLine Value="146"/>
    370         <CursorPos X="15" Y="159"/>
     360        <EditorIndex Value="0"/>
     361        <WindowIndex Value="0"/>
     362        <TopLine Value="36"/>
     363        <CursorPos X="40" Y="49"/>
    371364        <UsageCount Value="120"/>
    372365        <Loaded Value="True"/>
     
    377370        <TopLine Value="762"/>
    378371        <CursorPos X="1" Y="775"/>
    379         <UsageCount Value="4"/>
     372        <UsageCount Value="3"/>
    380373      </Unit33>
    381374      <Unit34>
     
    384377        <TopLine Value="148"/>
    385378        <CursorPos X="32" Y="160"/>
    386         <UsageCount Value="4"/>
     379        <UsageCount Value="3"/>
    387380      </Unit34>
    388381      <Unit35>
     
    391384        <TopLine Value="53"/>
    392385        <CursorPos X="11" Y="66"/>
    393         <UsageCount Value="4"/>
     386        <UsageCount Value="3"/>
    394387      </Unit35>
    395388      <Unit36>
     
    398391        <TopLine Value="141"/>
    399392        <CursorPos X="3" Y="143"/>
    400         <UsageCount Value="4"/>
     393        <UsageCount Value="3"/>
    401394      </Unit36>
    402395      <Unit37>
     
    405398        <TopLine Value="2"/>
    406399        <CursorPos X="40" Y="3"/>
    407         <UsageCount Value="3"/>
     400        <UsageCount Value="2"/>
    408401        <DefaultSyntaxHighlighter Value="None"/>
    409402      </Unit37>
     
    417410        <WindowIndex Value="0"/>
    418411        <TopLine Value="23"/>
    419         <CursorPos X="15" Y="24"/>
     412        <CursorPos X="61" Y="27"/>
    420413        <UsageCount Value="215"/>
    421414      </Unit38>
     
    423416        <Filename Value="..\..\UCDManager.pas"/>
    424417        <UnitName Value="UCDManager"/>
    425         <IsVisibleTab Value="True"/>
    426         <EditorIndex Value="10"/>
    427         <WindowIndex Value="0"/>
    428         <TopLine Value="51"/>
    429         <CursorPos X="34" Y="72"/>
     418        <EditorIndex Value="6"/>
     419        <WindowIndex Value="0"/>
     420        <TopLine Value="40"/>
     421        <CursorPos X="27" Y="57"/>
    430422        <UsageCount Value="105"/>
    431423        <Loaded Value="True"/>
     
    434426        <Filename Value="..\..\UCDConjoinForm.pas"/>
    435427        <UnitName Value="UCDConjoinForm"/>
    436         <EditorIndex Value="1"/>
    437428        <WindowIndex Value="0"/>
    438429        <TopLine Value="1"/>
    439430        <CursorPos X="31" Y="8"/>
    440         <UsageCount Value="104"/>
    441         <Loaded Value="True"/>
     431        <UsageCount Value="103"/>
    442432      </Unit40>
    443433      <Unit41>
    444434        <Filename Value="E:\Projekty2\FreePascalManager\trunk\Instance\1\Lazarus\lcl\extctrls.pp"/>
    445435        <UnitName Value="ExtCtrls"/>
    446         <EditorIndex Value="11"/>
    447         <WindowIndex Value="0"/>
    448         <TopLine Value="1132"/>
    449         <CursorPos X="14" Y="1178"/>
    450         <UsageCount Value="97"/>
     436        <EditorIndex Value="2"/>
     437        <WindowIndex Value="0"/>
     438        <TopLine Value="111"/>
     439        <CursorPos X="3" Y="124"/>
     440        <UsageCount Value="100"/>
    451441        <Loaded Value="True"/>
    452442      </Unit41>
     
    454444        <Filename Value="..\..\UCDMaster.pas"/>
    455445        <UnitName Value="UCDMaster"/>
    456         <EditorIndex Value="4"/>
    457         <WindowIndex Value="0"/>
    458         <TopLine Value="2"/>
    459         <CursorPos X="38" Y="8"/>
    460         <UsageCount Value="102"/>
     446        <EditorIndex Value="12"/>
     447        <WindowIndex Value="0"/>
     448        <TopLine Value="11"/>
     449        <CursorPos X="18" Y="19"/>
     450        <UsageCount Value="101"/>
    461451        <Loaded Value="True"/>
    462452      </Unit42>
     
    465455        <UnitName Value="ComCtrls"/>
    466456        <WindowIndex Value="0"/>
    467         <TopLine Value="286"/>
    468         <CursorPos X="43" Y="299"/>
    469         <UsageCount Value="97"/>
     457        <TopLine Value="255"/>
     458        <CursorPos X="14" Y="304"/>
     459        <UsageCount Value="96"/>
    470460      </Unit43>
    471461      <Unit44>
     
    474464        <TopLine Value="136"/>
    475465        <CursorPos X="3" Y="138"/>
    476         <UsageCount Value="7"/>
     466        <UsageCount Value="6"/>
    477467      </Unit44>
    478468      <Unit45>
     
    482472        <TopLine Value="172"/>
    483473        <CursorPos X="17" Y="185"/>
    484         <UsageCount Value="8"/>
     474        <UsageCount Value="7"/>
    485475      </Unit45>
    486476      <Unit46>
     
    490480        <ResourceBaseClass Value="Form"/>
    491481        <UnitName Value="UCDWindowList"/>
    492         <EditorIndex Value="6"/>
    493482        <WindowIndex Value="0"/>
    494483        <TopLine Value="33"/>
    495484        <CursorPos X="1" Y="47"/>
    496         <UsageCount Value="29"/>
    497         <Loaded Value="True"/>
    498         <LoadedDesigner Value="True"/>
     485        <UsageCount Value="30"/>
    499486      </Unit46>
    500487      <Unit47>
     
    504491        <TopLine Value="632"/>
    505492        <CursorPos X="14" Y="645"/>
    506         <UsageCount Value="8"/>
     493        <UsageCount Value="7"/>
    507494      </Unit47>
    508495      <Unit48>
     
    511498        <TopLine Value="426"/>
    512499        <CursorPos X="3" Y="417"/>
    513         <UsageCount Value="8"/>
     500        <UsageCount Value="7"/>
    514501      </Unit48>
    515502      <Unit49>
     
    518505        <ResourceBaseClass Value="DataModule"/>
    519506        <UnitName Value="UCDResource"/>
    520         <EditorIndex Value="13"/>
    521507        <WindowIndex Value="0"/>
    522508        <TopLine Value="13"/>
    523509        <CursorPos X="40" Y="31"/>
    524         <UsageCount Value="26"/>
    525         <Loaded Value="True"/>
     510        <UsageCount Value="27"/>
    526511      </Unit49>
    527512      <Unit50>
    528513        <Filename Value="E:\Projekty2\FreePascalManager\trunk\Instance\1\Lazarus\lcl\imglist.pp"/>
    529514        <UnitName Value="ImgList"/>
    530         <EditorIndex Value="15"/>
    531515        <WindowIndex Value="0"/>
    532516        <TopLine Value="165"/>
    533517        <CursorPos X="15" Y="178"/>
    534         <UsageCount Value="26"/>
    535         <Loaded Value="True"/>
     518        <UsageCount Value="27"/>
    536519      </Unit50>
    537520      <Unit51>
    538521        <Filename Value="E:\Projekty2\FreePascalManager\trunk\Instance\1\Lazarus\lcl\include\imglist.inc"/>
    539         <EditorIndex Value="16"/>
    540522        <WindowIndex Value="0"/>
    541523        <TopLine Value="554"/>
    542524        <CursorPos X="9" Y="564"/>
    543         <UsageCount Value="26"/>
    544         <Loaded Value="True"/>
     525        <UsageCount Value="27"/>
    545526      </Unit51>
     527      <Unit52>
     528        <Filename Value="E:\Projekty2\FreePascalManager\trunk\Instance\1\FPC\rtl\inc\objpash.inc"/>
     529        <WindowIndex Value="0"/>
     530        <TopLine Value="179"/>
     531        <CursorPos X="23" Y="192"/>
     532        <UsageCount Value="10"/>
     533      </Unit52>
     534      <Unit53>
     535        <Filename Value="E:\Projekty2\FreePascalManager\trunk\Instance\1\Lazarus\lcl\customtimer.pas"/>
     536        <UnitName Value="CustomTimer"/>
     537        <EditorIndex Value="3"/>
     538        <WindowIndex Value="0"/>
     539        <TopLine Value="169"/>
     540        <CursorPos X="1" Y="182"/>
     541        <UsageCount Value="11"/>
     542        <Loaded Value="True"/>
     543      </Unit53>
     544      <Unit54>
     545        <Filename Value="E:\Projekty2\FreePascalManager\trunk\Instance\1\Lazarus\lcl\menus.pp"/>
     546        <UnitName Value="Menus"/>
     547        <WindowIndex Value="0"/>
     548        <TopLine Value="153"/>
     549        <CursorPos X="15" Y="166"/>
     550        <UsageCount Value="10"/>
     551      </Unit54>
     552      <Unit55>
     553        <Filename Value="E:\Projekty2\FreePascalManager\trunk\Instance\1\Lazarus\lcl\include\menuitem.inc"/>
     554        <WindowIndex Value="0"/>
     555        <TopLine Value="441"/>
     556        <CursorPos X="1" Y="454"/>
     557        <UsageCount Value="10"/>
     558      </Unit55>
    546559    </Units>
    547     <JumpHistory Count="30" HistoryIndex="29">
     560    <JumpHistory Count="27" HistoryIndex="26">
    548561      <Position1>
    549         <Filename Value="..\..\UCDManager.pas"/>
    550         <Caret Line="699" Column="19" TopLine="685"/>
     562        <Filename Value="..\..\UCDPopupMenu.pas"/>
     563        <Caret Line="22" Column="11" TopLine="9"/>
    551564      </Position1>
    552565      <Position2>
    553         <Filename Value="..\..\UCDManager.pas"/>
    554         <Caret Line="697" Column="32" TopLine="685"/>
     566        <Filename Value="..\..\UCDPopupMenu.pas"/>
     567        <Caret Line="82" Column="30" TopLine="76"/>
    555568      </Position2>
    556569      <Position3>
    557         <Filename Value="..\..\UCDManager.pas"/>
    558         <Caret Line="605" Column="18" TopLine="583"/>
     570        <Filename Value="..\..\UCDPopupMenu.pas"/>
     571        <Caret Line="38" Column="30" TopLine="25"/>
    559572      </Position3>
    560573      <Position4>
    561         <Filename Value="..\..\UCDManager.pas"/>
    562         <Caret Line="34" Column="5" TopLine="20"/>
     574        <Filename Value="..\..\UCDPopupMenu.pas"/>
     575        <Caret Line="25" Column="15" TopLine="12"/>
    563576      </Position4>
    564577      <Position5>
    565578        <Filename Value="..\..\UCDManager.pas"/>
    566         <Caret Line="605" Column="22" TopLine="588"/>
     579        <Caret Line="251" Column="1" TopLine="240"/>
    567580      </Position5>
    568581      <Position6>
    569582        <Filename Value="..\..\UCDManager.pas"/>
    570         <Caret Line="598" Column="9" TopLine="585"/>
     583        <Caret Line="243" Column="1" TopLine="238"/>
    571584      </Position6>
    572585      <Position7>
    573586        <Filename Value="..\..\UCDManager.pas"/>
    574         <Caret Line="605" Column="10" TopLine="585"/>
     587        <Caret Line="244" Column="1" TopLine="238"/>
    575588      </Position7>
    576589      <Position8>
    577         <Filename Value="..\..\Managers\UCDManagerRegions.pas"/>
    578         <Caret Line="4" Column="70" TopLine="1"/>
     590        <Filename Value="..\..\UCDManager.pas"/>
     591        <Caret Line="245" Column="1" TopLine="238"/>
    579592      </Position8>
    580593      <Position9>
    581594        <Filename Value="..\..\Managers\UCDManagerRegions.pas"/>
    582         <Caret Line="18" Column="24" TopLine="1"/>
     595        <Caret Line="63" Column="1" TopLine="50"/>
    583596      </Position9>
    584597      <Position10>
    585598        <Filename Value="..\..\Managers\UCDManagerRegions.pas"/>
    586         <Caret Line="60" Column="24" TopLine="39"/>
     599        <Caret Line="64" Column="1" TopLine="50"/>
    587600      </Position10>
    588601      <Position11>
    589         <Filename Value="UMainForm.pas"/>
    590         <Caret Line="123" Column="25" TopLine="118"/>
     602        <Filename Value="..\..\Managers\UCDManagerRegions.pas"/>
     603        <Caret Line="65" Column="1" TopLine="50"/>
    591604      </Position11>
    592605      <Position12>
    593         <Filename Value="UMainForm.pas"/>
    594         <Caret Line="124" Column="25" TopLine="119"/>
     606        <Filename Value="..\..\Managers\UCDManagerRegions.pas"/>
     607        <Caret Line="66" Column="1" TopLine="50"/>
    595608      </Position12>
    596609      <Position13>
    597         <Filename Value="UMainForm.pas"/>
    598         <Caret Line="126" Column="25" TopLine="121"/>
     610        <Filename Value="..\..\Managers\UCDManagerRegions.pas"/>
     611        <Caret Line="69" Column="1" TopLine="50"/>
    599612      </Position13>
    600613      <Position14>
    601         <Filename Value="UMainForm.pas"/>
    602         <Caret Line="248" Column="20" TopLine="246"/>
     614        <Filename Value="..\..\Managers\UCDManagerRegions.pas"/>
     615        <Caret Line="70" Column="1" TopLine="50"/>
    603616      </Position14>
    604617      <Position15>
    605         <Filename Value="UMainForm.pas"/>
    606         <Caret Line="250" Column="19" TopLine="246"/>
     618        <Filename Value="..\..\Managers\UCDManagerRegions.pas"/>
     619        <Caret Line="71" Column="1" TopLine="50"/>
    607620      </Position15>
    608621      <Position16>
    609         <Filename Value="UMainForm.pas"/>
    610         <Caret Line="104" Column="15" TopLine="91"/>
     622        <Filename Value="..\..\Managers\UCDManagerRegions.pas"/>
     623        <Caret Line="72" Column="1" TopLine="51"/>
    611624      </Position16>
    612625      <Position17>
    613         <Filename Value="UMainForm.pas"/>
    614         <Caret Line="250" Column="32" TopLine="240"/>
     626        <Filename Value="..\..\UCDManager.pas"/>
     627        <Caret Line="641" Column="1" TopLine="628"/>
    615628      </Position17>
    616629      <Position18>
    617         <Filename Value="UMainForm.pas"/>
    618         <Caret Line="252" Column="52" TopLine="240"/>
     630        <Filename Value="..\..\UCDManager.pas"/>
     631        <Caret Line="642" Column="1" TopLine="628"/>
    619632      </Position18>
    620633      <Position19>
    621         <Filename Value="..\..\Managers\UCDManagerRegions.pas"/>
    622         <Caret Line="17" Column="23" TopLine="13"/>
     634        <Filename Value="..\..\UCDManager.pas"/>
     635        <Caret Line="643" Column="1" TopLine="628"/>
    623636      </Position19>
    624637      <Position20>
    625         <Filename Value="..\..\Managers\UCDManagerRegions.pas"/>
    626         <Caret Line="119" Column="17" TopLine="105"/>
     638        <Filename Value="..\..\UCDManager.pas"/>
     639        <Caret Line="644" Column="1" TopLine="628"/>
    627640      </Position20>
    628641      <Position21>
    629         <Filename Value="..\..\Managers\UCDManagerRegions.pas"/>
    630         <Caret Line="16" Column="41" TopLine="6"/>
     642        <Filename Value="..\..\UCDManager.pas"/>
     643        <Caret Line="647" Column="35" TopLine="628"/>
    631644      </Position21>
    632645      <Position22>
    633         <Filename Value="..\..\Managers\UCDManagerRegions.pas"/>
    634         <Caret Line="17" Column="30" TopLine="6"/>
     646        <Filename Value="..\..\UCDManager.pas"/>
     647        <Caret Line="2" Column="73" TopLine="1"/>
    635648      </Position22>
    636649      <Position23>
    637650        <Filename Value="..\..\UCDManager.pas"/>
    638         <Caret Line="171" Column="21" TopLine="163"/>
     651        <Caret Line="69" Column="33" TopLine="48"/>
    639652      </Position23>
    640653      <Position24>
    641654        <Filename Value="..\..\UCDManager.pas"/>
    642         <Caret Line="163" Column="25" TopLine="158"/>
     655        <Caret Line="181" Column="51" TopLine="160"/>
    643656      </Position24>
    644657      <Position25>
    645658        <Filename Value="..\..\UCDManager.pas"/>
    646         <Caret Line="6" Column="58" TopLine="1"/>
     659        <Caret Line="182" Column="51" TopLine="161"/>
    647660      </Position25>
    648661      <Position26>
    649662        <Filename Value="..\..\Managers\UCDManagerRegions.pas"/>
    650         <Caret Line="59" Column="47" TopLine="55"/>
     663        <Caret Line="37" Column="43" TopLine="30"/>
    651664      </Position26>
    652665      <Position27>
    653666        <Filename Value="..\..\Managers\UCDManagerRegions.pas"/>
    654         <Caret Line="55" Column="28" TopLine="46"/>
     667        <Caret Line="5" Column="66" TopLine="1"/>
    655668      </Position27>
    656       <Position28>
    657         <Filename Value="..\..\Managers\UCDManagerRegions.pas"/>
    658         <Caret Line="16" Column="40" TopLine="3"/>
    659       </Position28>
    660       <Position29>
    661         <Filename Value="..\..\UCDManager.pas"/>
    662         <Caret Line="245" Column="9" TopLine="240"/>
    663       </Position29>
    664       <Position30>
    665         <Filename Value="..\..\Managers\UCDManagerRegions.pas"/>
    666         <Caret Line="16" Column="39" TopLine="12"/>
    667       </Position30>
    668669    </JumpHistory>
    669670  </ProjectOptions>
     
    678679      <UnitOutputDirectory Value="lib\$(TargetCPU)-$(TargetOS)"/>
    679680    </SearchPaths>
     681    <CodeGeneration>
     682      <Checks>
     683        <IOChecks Value="True"/>
     684        <RangeChecks Value="True"/>
     685        <OverflowChecks Value="True"/>
     686        <StackChecks Value="True"/>
     687      </Checks>
     688      <VerifyObjMethodCallValidity Value="True"/>
     689    </CodeGeneration>
    680690    <Linking>
     691      <Debugging>
     692        <UseHeaptrc Value="True"/>
     693      </Debugging>
    681694      <Options>
    682695        <Win32>
     
    686699    </Linking>
    687700    <Other>
     701      <CompilerMessages>
     702        <UseMsgFile Value="True"/>
     703      </CompilerMessages>
    688704      <CompilerPath Value="$(CompPath)"/>
    689705    </Other>
  • Docking/CoolDocking/Demo/IDE/UCallStackForm.lfm

    r190 r198  
    11object CallStackForm: TCallStackForm
    2   Left = 446
    3   Height = 240
    4   Top = 152
    5   Width = 320
     2  Left = 329
     3  Height = 255
     4  Top = 148
     5  Width = 433
    66  Caption = 'Call Stack'
     7  ClientHeight = 255
     8  ClientWidth = 433
    79  LCLVersion = '0.9.31'
     10  object ListView1: TListView
     11    Left = 2
     12    Height = 251
     13    Top = 2
     14    Width = 429
     15    Align = alClient
     16    BorderSpacing.Around = 2
     17    Columns = <   
     18      item
     19      end   
     20      item
     21      end   
     22      item
     23      end   
     24      item
     25      end>
     26    TabOrder = 0
     27    ViewStyle = vsReport
     28  end
    829  object CoolDockClient1: TCDClient
     30    Master = MainForm.CoolDockMaster1
    931    Floatable = False
    10     Master = MainForm.CoolDockMaster1
    1132    left = 59
    1233    top = 52
  • Docking/CoolDocking/Demo/IDE/UCallStackForm.pas

    r189 r198  
    66
    77uses
    8   Classes, SysUtils, FileUtil, Forms, Controls, Graphics, Dialogs, UCDClient;
     8  Classes, SysUtils, FileUtil, Forms, Controls, Graphics, Dialogs, ComCtrls,
     9  UCDClient;
    910
    1011type
     
    1516  published
    1617    CoolDockClient1: TCDClient;
     18    ListView1: TListView;
    1719    { private declarations }
    1820  public
  • Docking/CoolDocking/Demo/IDE/UComponentTree.lfm

    r184 r198  
    88  ClientWidth = 411
    99  OnShow = FormShow
    10   LCLVersion = '0.9.29'
     10  LCLVersion = '0.9.31'
    1111  object TreeView1: TTreeView
    12     Left = 8
    13     Height = 488
    14     Top = 8
    15     Width = 395
    16     Anchors = [akTop, akLeft, akRight, akBottom]
     12    Left = 2
     13    Height = 495
     14    Top = 2
     15    Width = 407
     16    Align = alClient
     17    BorderSpacing.Around = 2
    1718    DefaultItemHeight = 15
    1819    TabOrder = 0
  • Docking/CoolDocking/Demo/IDE/ULocalVariablesForm.lfm

    r190 r198  
    99  LCLVersion = '0.9.31'
    1010  object Memo1: TMemo
    11     Left = 4
    12     Height = 232
    13     Top = 4
    14     Width = 312
     11    Left = 2
     12    Height = 236
     13    Top = 2
     14    Width = 316
    1515    Align = alClient
    16     BorderSpacing.Around = 4
     16    BorderSpacing.Around = 2
    1717    TabOrder = 0
    1818  end
    1919  object CoolDockClient1: TCDClient
     20    Master = MainForm.CoolDockMaster1
    2021    Floatable = False
    21     Master = MainForm.CoolDockMaster1
    2222    left = 103
    2323    top = 92
  • Docking/CoolDocking/Demo/IDE/UMainForm.lfm

    r197 r198  
    11object MainForm: TMainForm
    22  Left = 217
    3   Height = 457
     3  Height = 419
    44  Top = 123
    5   Width = 643
     5  Width = 536
    66  Caption = 'CoolDocking Demo IDE'
    7   ClientHeight = 438
    8   ClientWidth = 643
     7  ClientHeight = 400
     8  ClientWidth = 536
    99  Menu = MainMenu1
    1010  OnClose = FormClose
     
    1313  object DockPanel: TPanel
    1414    Left = 0
    15     Height = 412
     15    Height = 374
    1616    Top = 26
    17     Width = 643
     17    Width = 536
    1818    Align = alClient
    1919    BevelOuter = bvNone
     
    2424    Height = 26
    2525    Top = 0
    26     Width = 643
     26    Width = 536
    2727    Caption = 'ToolBar1'
    2828    Images = ImageList1
  • Docking/CoolDocking/Demo/IDE/UMainForm.pas

    r197 r198  
    1212  UWatchListForm, UThreadStatusForm, USourceEditorForm, UCDWindowList,
    1313  UCDCustomize, UComponentTree, UCDConjoinForm, UCDManager,
    14   UCDMaster;
     14  UCDMaster, UCDCommon;
    1515
    1616const
     
    160160  if not Assigned(DefaultLayout) then begin
    161161    NewContainer1 := TCDManager(DockPanel.DockManager).CreateContainer(alRight);
    162     NewContainer1.Show;
     162    TCDManager(NewContainer1.DockManager).DockStyle := dsPopupTabs;
     163    TCDManager(NewContainer1.DockManager).HeaderPos := hpLeft;
    163164
    164165    StructureForm.ManualDock(NewContainer1, nil, alTop);
     
    168169
    169170    NewContainer2 := TCDManager(DockPanel.DockManager).CreateContainer(alRight);
    170     NewContainer2.Show;
     171    TCDManager(NewContainer2.DockManager).DockStyle := dsPopupTabs;
     172    TCDManager(NewContainer2.DockManager).HeaderPos := hpRight;
    171173    ProjectManagerForm.ManualDock(NewContainer2, nil, alTop);
    172174    ProjectManagerForm.Show;
     
    175177
    176178    NewContainer1.ManualDock(DockPanel);
     179    NewContainer1.Show;
    177180    SourceEditorForm.ManualDock(DockPanel);
    178181    SourceEditorForm.Show;
    179182    NewContainer2.ManualDock(DockPanel);
     183    NewContainer2.Show;
    180184
    181185    DefaultLayout := TCDLayout.Create;
  • Docking/CoolDocking/Demo/IDE/UMessagesForm.lfm

    r190 r198  
    11object MessagesForm: TMessagesForm
    2   Left = 313
     2  Left = 293
    33  Height = 136
    4   Top = 258
     4  Top = 239
    55  Width = 508
    66  Caption = 'Messages'
    77  ClientHeight = 136
    88  ClientWidth = 508
     9  Icon.Data = {
     10    7E04000000000100010010100000010020006804000016000000280000001000
     11    0000200000000100200000000000000400006400000064000000000000000000
     12    000000000000000000000000000000000000F2F5F6FFC5D2D8FF8BA5B0FF698A
     13    98FF698A98FF8BA5B0FFC5D2D8FFF2F5F6FF0000000000000000000000000000
     14    00000000000000000000F5F8F9FFC5D2D8FF416D7EFF0C506AFF0A6C8FFF087B
     15    A8FF087BA8FF0A6C8FFF0C506AFF507787FFC5D2D8FFFBFCFCFF000000000000
     16    000000000000F5F8F9FFABBCC4FF0C506AFF0D90B9FF11B1DFFF11B1DFFF11B1
     17    DFFF11B1DFFF0DA6D6FF0A9ED3FF087BA8FF0C506AFFB4C5CCFFFBFCFCFF0000
     18    000000000000B4C5CCFF0C506AFF0DA6D6FF16BDE3FF17C6EBFF17C6EBFF17C6
     19    EBFF17C6EBFF16BDE3FF11B1DFFF0DA6D6FF0D90B9FF0C506AFFC5D2D8FF0000
     20    0000EAEFF1FF306073FF129FC3FF17C6EBFF1BD2F2FF1DD7F6FF1DD7F6FF1034
     21    43FF103443FF103443FF17C6EBFF11B1DFFF0DA6D6FF087BA8FF507787FFF2F5
     22    F6FFABBCC4FF0A6C8FFF17C6EBFF1DD7F6FF1FDCF9FF21E3FDFF21E3FDFF21E3
     23    FDFF21E3FDFF1FDCF9FF103443FF17C6EBFF11B1DFFF0A9ED3FF0C506AFFC5D2
     24    D8FF698A98FF0D90B9FF1BD2F2FF1FDCF9FF21E3FDFF22E6FFFF22E6FFFF22E6
     25    FFFF22E6FFFF21E3FDFF1FDCF9FF103443FF16BDE3FF0DA6D6FF0A6C8FFF8BA5
     26    B0FF416D7EFF14ADD1FF1DD7F6FF21E3FDFF22E6FFFF22E6FFFF22E6FFFF22E6
     27    FFFF22E6FFFF22E6FFFF21E3FDFF1DD7F6FF17C6EBFF11B1DFFF087BA8FF698A
     28    98FF416D7EFF14ADD1FF1FDCF9FF103443FF103443FF103443FF22E6FFFF22E6
     29    FFFF22E6FFFF103443FF103443FF103443FF17C6EBFF11B1DFFF087BA8FF698A
     30    98FF698A98FF129FC3FF1FDCF9FF103443FF103443FF103443FF103443FF22E6
     31    FFFF103443FF103443FF103443FF103443FF17C6EBFF11B1DFFF0A6C8FFF8BA5
     32    B0FF698A98FF103443FF103443FF103443FF103443FFFBFCFCFF103443FF1034
     33    43FF103443FF103443FFFBFCFCFF103443FF103443FF103443FF103443FFC5D2
     34    D8FFE8EDEFFF0C506AFF16BDE3FF103443FF103443FF103443FF103443FF22E6
     35    FFFF103443FF103443FF103443FF103443FF16BDE3FF0D90B9FF416D7EFFABBC
     36    C4FF00000000B4C5CCFF0C506AFF1DD7F6FF1FDCF9FF21E3FDFF21E3FDFF21E3
     37    FDFF21E3FDFF1FDCF9FF1BD2F2FF17C6EBFF0DA6D6FF0C506AFFC5D2D8FF0000
     38    000000000000F5F8F9FF8BA5B0FF0C506AFF16BDE3FF1DD7F6FF1FDCF9FF1FDC
     39    F9FF1DD7F6FF1BD2F2FF17C6EBFF129FC3FF0C506AFFABBCC4FFFBFCFCFF0000
     40    00000000000000000000F5F8F9FFB4C5CCFF0C506AFF0A6C8FFF129FC3FF14AD
     41    D1FF14ADD1FF0D90B9FF0A6C8FFF306073FFC5D2D8FFF5F8F9FF000000000000
     42    000000000000000000000000000000000000EAEFF1FFABBCC4FF698A98FF416D
     43    7EFF416D7EFF698A98FFB4C5CCFFEDF1F2FF0000000000000000000000000000
     44    00000000636500005C4C0000617200005C6C00005C7300006E2E0000222F0000
     45    0A20000020200000203C0000697400006D650000616C00003D220000696E0000
     46    3E0D
     47  }
    948  LCLVersion = '0.9.31'
    1049  object Memo1: TMemo
    11     Left = 4
    12     Height = 128
    13     Top = 4
    14     Width = 500
     50    Left = 2
     51    Height = 132
     52    Top = 2
     53    Width = 504
    1554    Align = alClient
    16     BorderSpacing.Around = 4
     55    BorderSpacing.Around = 2
    1756    TabOrder = 0
    1857  end
    1958  object CoolDockClient1: TCDClient
     59    Master = MainForm.CoolDockMaster1
    2060    Floatable = False
    21     Master = MainForm.CoolDockMaster1
    2261    left = 184
    2362    top = 56
  • Docking/CoolDocking/Demo/IDE/UObjectInspectorForm.lfm

    r190 r198  
    99  LCLVersion = '0.9.31'
    1010  object StringGrid1: TStringGrid
    11     Left = 4
    12     Height = 382
    13     Top = 4
    14     Width = 251
     11    Left = 2
     12    Height = 386
     13    Top = 2
     14    Width = 255
    1515    Align = alClient
    16     BorderSpacing.Around = 4
     16    BorderSpacing.Around = 2
    1717    DefaultColWidth = 120
    1818    FixedRows = 0
     
    2121  end
    2222  object CoolDockClient1: TCDClient
     23    Master = MainForm.CoolDockMaster1
    2324    Floatable = False
    24     Master = MainForm.CoolDockMaster1
    2525    left = 136
    2626    top = 96
  • Docking/CoolDocking/Demo/IDE/UProjectManagerForm.lfm

    r190 r198  
    99  LCLVersion = '0.9.31'
    1010  object TreeView1: TTreeView
    11     Left = 4
    12     Height = 379
    13     Top = 4
    14     Width = 206
     11    Left = 2
     12    Height = 383
     13    Top = 2
     14    Width = 210
    1515    Align = alClient
    16     BorderSpacing.Around = 4
     16    BorderSpacing.Around = 2
    1717    DefaultItemHeight = 15
    1818    TabOrder = 0
    1919  end
    2020  object CoolDockClient1: TCDClient
     21    Master = MainForm.CoolDockMaster1
    2122    Floatable = False
    22     Master = MainForm.CoolDockMaster1
    2323    left = 108
    2424    top = 64
  • Docking/CoolDocking/Demo/IDE/USourceEditorForm.lfm

    r190 r198  
    99  LCLVersion = '0.9.31'
    1010  inline SynEdit1: TSynEdit
    11     Left = 0
    12     Height = 349
    13     Top = 0
    14     Width = 448
     11    Left = 2
     12    Height = 345
     13    Top = 2
     14    Width = 444
    1515    Align = alClient
     16    BorderSpacing.Around = 2
    1617    Font.Height = -13
    1718    Font.Name = 'Courier New'
  • Docking/CoolDocking/Demo/IDE/UStructureForm.lfm

    r190 r198  
    99  LCLVersion = '0.9.31'
    1010  object TreeView1: TTreeView
    11     Left = 4
    12     Height = 330
    13     Top = 4
    14     Width = 222
     11    Left = 2
     12    Height = 334
     13    Top = 2
     14    Width = 226
    1515    Align = alClient
    16     BorderSpacing.Around = 4
     16    BorderSpacing.Around = 2
    1717    DefaultItemHeight = 15
    1818    TabOrder = 0
  • Docking/CoolDocking/Demo/IDE/UThreadStatusForm.lfm

    r190 r198  
    99  LCLVersion = '0.9.31'
    1010  object ListView1: TListView
    11     Left = 4
    12     Height = 240
    13     Top = 4
    14     Width = 312
     11    Left = 2
     12    Height = 244
     13    Top = 2
     14    Width = 316
    1515    Align = alClient
    16     BorderSpacing.Around = 4
     16    BorderSpacing.Around = 2
    1717    Columns = <   
    1818      item
     
    2828  end
    2929  object CoolDockClient1: TCDClient
     30    Master = MainForm.CoolDockMaster1
    3031    Floatable = False
    31     Master = MainForm.CoolDockMaster1
    3232    left = 120
    3333    top = 68
  • Docking/CoolDocking/Demo/IDE/UToDoListForm.lfm

    r190 r198  
    99  LCLVersion = '0.9.31'
    1010  object ListView1: TListView
    11     Left = 4
    12     Height = 232
    13     Top = 4
    14     Width = 312
     11    Left = 2
     12    Height = 236
     13    Top = 2
     14    Width = 316
    1515    Align = alClient
    16     BorderSpacing.Around = 4
     16    BorderSpacing.Around = 2
    1717    Columns = <   
    1818      item
     
    2828  end
    2929  object CoolDockClient1: TCDClient
     30    Master = MainForm.CoolDockMaster1
    3031    Floatable = False
    31     Master = MainForm.CoolDockMaster1
    3232    left = 119
    3333    top = 88
  • Docking/CoolDocking/Demo/IDE/UToolPaletteForm.lfm

    r190 r198  
    99  LCLVersion = '0.9.31'
    1010  object TreeView1: TTreeView
    11     Left = 4
    12     Height = 344
    13     Top = 4
    14     Width = 195
     11    Left = 2
     12    Height = 348
     13    Top = 2
     14    Width = 199
    1515    Align = alClient
    16     BorderSpacing.Around = 4
     16    BorderSpacing.Around = 2
    1717    DefaultItemHeight = 15
    1818    TabOrder = 0
    1919  end
    2020  object CoolDockClient1: TCDClient
     21    Master = MainForm.CoolDockMaster1
    2122    Floatable = False
    22     Master = MainForm.CoolDockMaster1
    2323    left = 55
    2424    top = 143
  • Docking/CoolDocking/Demo/IDE/UWatchListForm.lfm

    r190 r198  
    99  LCLVersion = '0.9.31'
    1010  object Memo1: TMemo
    11     Left = 4
    12     Height = 232
    13     Top = 4
    14     Width = 312
     11    Left = 2
     12    Height = 236
     13    Top = 2
     14    Width = 316
    1515    Align = alClient
    16     BorderSpacing.Around = 4
     16    BorderSpacing.Around = 2
    1717    TabOrder = 0
    1818  end
  • Docking/CoolDocking/Managers/UCDManagerRegions.pas

    r197 r198  
    1717    PanelHeader: TCDPanelHeader;
    1818    Splitter: TSplitter;
     19    procedure Paint(Sender: TObject); override;
    1920    constructor Create;
    2021    destructor Destroy; override;
     
    2627  private
    2728    FDockItems: TObjectList; // TList<TCDManagerRegionsItem>
     29    function GetHeaderPos: THeaderPos; override;
     30    procedure SetHeaderPos(const AValue: THeaderPos); override;
    2831    function GetDirection(InsertAt: TAlign): TCDDirection;
    2932  public
     
    5356{ TCDManagerRegionsItem }
    5457
     58procedure TCDManagerRegionsItem.Paint(Sender: TObject);
     59var
     60  I: Integer;
     61  R: TRect;
     62begin
     63  inherited Paint(Sender);
     64  with PanelHeader do
     65  if not (csDesigning in ComponentState) then
     66  if Assigned(Control) then begin
     67    //R := Control.ClientRect;
     68    //Canvas.FillRect(R);
     69    Header.Visible := ShowHeader;
     70    if ShowHeader then begin
     71      if ControlPanel.DockClientCount = 0 then
     72        Header.DrawGrabber(Canvas, Control) else
     73      Header.DrawGrabber(Canvas, ControlPanel);
     74    end;
     75  end;
     76end;
     77
    5578constructor TCDManagerRegionsItem.Create;
    5679begin
     
    5982  PanelHeader.Header.OnMouseDown := DockPanelMouseDown;
    6083  PanelHeader.Header.Title.OnMouseDown := DockPanelMouseDown;
     84  PanelHeader.Header.Icon.OnMouseDown := DockPanelMouseDown;
    6185
    6286  Splitter := TSplitter.Create(nil);
     
    81105
    82106{ TCDManagerRegions }
     107
     108function TCDManagerRegions.GetHeaderPos: THeaderPos;
     109begin
     110  Result := inherited;
     111end;
     112
     113procedure TCDManagerRegions.SetHeaderPos(const AValue: THeaderPos);
     114begin
     115  inherited SetHeaderPos(AValue);
     116  case AValue of
     117    hpBottom, hpTop: FDockDirection := ddVertical;
     118    hpLeft, hpRight: FDockDirection := ddHorizontal;
     119  end;
     120end;
    83121
    84122function TCDManagerRegions.GetDirection(InsertAt: TAlign): TCDDirection;
     
    117155    PanelHeader.Header.PopupMenu := Self.PopupMenu;
    118156  end;
    119   if (Control is TForm) and Assigned((Control as TForm).Icon) then
     157  if (Control is TForm) and Assigned((Control as TForm).Icon) then begin
    120158    NewItem.PanelHeader.Header.Icon.Picture.Assign((Control as TForm).Icon);
    121     NewItem.PanelHeader.Parent := DockSite;
    122     NewItem.PanelHeader.Header.Title.Caption := TForm(Control).Caption;
    123 
    124     NewItem.Control := Control;
    125     Control.AddHandlerOnVisibleChanged(NewItem.VisibleChange);
    126     Control.Parent := NewItem.PanelHeader.ControlPanel;
    127     Control.Align := alClient;
    128     if (InsertAt = alTop) or (InsertAt = alLeft) then
    129       DockItems.Insert(0, NewItem)
    130       else DockItems.Add(NewItem);
    131   end;
     159    NewItem.PanelHeader.Header.Icon.Width := NewItem.PanelHeader.Header.Icon.Picture.Bitmap.Width;
     160    NewItem.PanelHeader.Header.Icon.Height := NewItem.PanelHeader.Header.Icon.Picture.Bitmap.Height;
     161  end;
     162
     163  NewItem.PanelHeader.Parent := DockSite;
     164  NewItem.PanelHeader.Header.Title.Caption := TForm(Control).Caption;
     165
     166  NewItem.Control := Control;
     167  Control.AddHandlerOnVisibleChanged(NewItem.VisibleChange);
     168  Control.Parent := NewItem.PanelHeader.ControlPanel;
     169  Control.Align := alClient;
     170  if (InsertAt = alTop) or (InsertAt = alLeft) then
     171    DockItems.Insert(0, NewItem)
     172    else DockItems.Add(NewItem);
     173end;
    132174
    133175procedure TCDManagerRegions.InsertControlPanel(Control: TControl; InsertAt: TAlign;
     
    248290    PanelHeader.Width := Self.DockSite.Width div
    249291      Self.DockSite.DockClientCount;
    250     //TCDClientPanel(FDockPanels[I]).DockPanelPaint(Self);
     292    Paint(Self);
    251293    if I < (DockItems.Count - 1) then PanelHeader.Align := BaseAlign
    252294      else PanelHeader.Align := alClient;
  • Docking/CoolDocking/Managers/UCDManagerTabs.pas

    r195 r198  
    1616  TCDManagerTabsItem = class(TCDManagerItem)
    1717    Icon: TImage;
    18     constructor Create;
     18    constructor Create; override;
    1919    destructor Destroy; override;
    2020  end;
     
    2323
    2424  TCDManagerTabs = class(TCDManager)
    25   public
     25  private
    2626    MouseDown: Boolean;
    2727    MouseButton: TMouseButton;
    2828    MouseDownSkip: Boolean;
    29     PageControl: TPageControl;
    30     TabImageList: TImageList;
    3129    FDockItems: TObjectList; // TList<TCDManagerRegionsItem>
    3230    procedure TabControlMouseLeave(Sender: TObject);
    33     procedure TabControlChange(Sender: TObject);
    3431    procedure TabControlMouseDown(Sender: TObject; Button: TMouseButton;
    3532      Shift: TShiftState; X, Y: Integer);
     
    3936      DropCtl: TControl); override;
    4037    procedure UpdateClientSize; override;
    41   private
    42     FTabsPos: THeaderPos;
    4338    function FindControlInPanels(Control: TControl): TCDManagerItem; override;
    44     procedure InsertControlNoUpdate(Control: TControl; InsertAt: TAlign);
    4539    procedure RemoveControl(Control: TControl); override;
     40    function GetHeaderPos: THeaderPos; override;
     41    procedure SetHeaderPos(const AValue: THeaderPos); override;
    4642  public
    47     constructor Create(ADockSite: TWinControl);
     43    TabImageList: TImageList;
     44    PageControl: TPageControl;
     45    procedure InsertControlNoUpdate(Control: TControl; InsertAt: TAlign); virtual;
     46    procedure TabControlChange(Sender: TObject); virtual;
     47    constructor Create(ADockSite: TWinControl); override;
    4848    destructor Destroy; override;
    4949    procedure PaintSite(DC: HDC); override;
     
    5151    procedure ChangeVisible(Control: TWinControl; Visible: Boolean); override;
    5252    procedure Switch(Index: Integer); override;
    53     procedure SetTabsPos(const AValue: THeaderPos);
    5453    procedure PopupMenuTabCloseClick(Sender: TObject);
    55     property TabsPos: THeaderPos read FTabsPos write SetTabsPos;
    5654    property DockItems: TObjectList read FDockItems write FDockItems;
    5755  end;
     
    9896begin
    9997  if MouseDown then
    100   if Assigned(PageControl.ActivePage) then begin
     98  if Assigned(PageControl.ActivePage) and not Locked then begin
    10199    //TCDManagerItem(DockItems[PageControl.TabIndex]).ClientAreaPanel.DockSite := False;
    102100    DragManager.DragStart(TCDManagerItem(DockItems[PageControl.TabIndex]).Control, False, 1);
     
    188186  TabImageList := TImageList.Create(ADockSite); //FDockSite);
    189187  with TabImageList do begin
    190     Name := DockSite.Name + 'ImageList';
     188    Name := GetUniqueName(DockSite.Name + 'ImageList');
    191189  end;
    192190  PageControl := TPageControl.Create(ADockSite); //FDockSite);
    193191  with PageControl do begin
    194192    Parent := ADockSite;
    195     Name := Self.DockSite.Name + 'TabControl';
     193    Name := GetUniqueName(Self.DockSite.Name + 'TabControl');
    196194    Visible := True;
    197195    //Align := alTop;
     
    216214  for I := 0 to ADockSite.DockClientCount - 1 do
    217215    InsertControlNoUpdate(ADockSite.DockClients[I], alNone);
    218   TabControlChange(Self);
     216  //TabControlChange(Self);
    219217  //TCDManagerTabs(Self).TabControlChange(Self);
    220218end;
     
    287285begin
    288286  inherited RemoveControl(Control);
     287end;
     288
     289function TCDManagerTabs.GetHeaderPos: THeaderPos;
     290begin
     291  Result := inherited;
     292end;
     293
     294procedure TCDManagerTabs.SetHeaderPos(const AValue: THeaderPos);
     295begin
     296  inherited SetHeaderPos(AValue);
     297  with PageControl do
     298  case AValue of
     299    hpAuto, hpTop: begin
     300      //Align := alTop;
     301      TabPosition := tpTop;
     302      Height := GrabberSize;
     303    end;
     304    hpLeft: begin
     305      //Align := alLeft;
     306      TabPosition := tpLeft;
     307      Width := GrabberSize;
     308    end;
     309    hpRight: begin
     310      //Align := alRight;
     311      TabPosition := tpRight;
     312      Width := GrabberSize;
     313    end;
     314    hpBottom: begin
     315      //Align := alBottom;
     316      TabPosition := tpBottom;
     317      Height := GrabberSize;
     318    end;
     319  end;
    289320end;
    290321
     
    376407end;
    377408
    378 procedure TCDManagerTabs.SetTabsPos(const AValue: THeaderPos);
    379 begin
    380   if FTabsPos = AValue then Exit;
    381   FTabsPos := AValue;
    382   with PageControl do
    383   case AValue of
    384     hpAuto, hpTop: begin
    385       Align := alTop;
    386       TabPosition := tpTop;
    387       Height := GrabberSize;
    388     end;
    389     hpLeft: begin
    390       Align := alLeft;
    391       TabPosition := tpLeft;
    392       Width := GrabberSize;
    393     end;
    394     hpRight: begin
    395       Align := alRight;
    396       TabPosition := tpRight;
    397       Width := GrabberSize;
    398     end;
    399     hpBottom: begin
    400       Align := alBottom;
    401       TabPosition := tpBottom;
    402       Height := GrabberSize;
    403     end;
    404   end;
    405 end;
    406 
    407 
    408409end.
    409410
  • Docking/CoolDocking/Managers/UCDManagerTabsPopup.pas

    r197 r198  
    66
    77uses
    8   Classes, Controls, SysUtils, ComCtrls, ExtCtrls, UCDCommon,
    9   UCDManagerTabs;
     8  Classes, Controls, SysUtils, ComCtrls, ExtCtrls, UCDCommon, UCDManager,
     9  UCDManagerTabs, Forms;
    1010
    1111type
     
    4040  { TCDManagerTabsPopupItem }
    4141
    42   TCDManagerTabsPopupItem = class
    43     constructor Create;
    44   end;
    45 
    46   { TCDStylePopupTabs }
    47 
    48   TCDStylePopupTabs = class(TCDManagerTabs)
     42  TCDManagerTabsPopupItem = class(TCDManagerTabsItem)
     43    Hidden: Boolean;
     44    constructor Create; override;
     45  end;
     46
     47  { TCDManagerTabsPopup }
     48
     49  TCDManagerTabsPopup = class(TCDManagerTabs)
     50  private
     51    procedure InsertControlNoUpdate(Control: TControl; InsertAt: TAlign); override;
    4952  public
    5053    AutoHideEnabled: Boolean;
    5154    AutoHide: TCDAutoHide;
    5255    PopupPanel: TPanel;
    53     constructor Create(ADockSite: TWinControl);
     56    procedure SetHeaderPos(const AValue: THeaderPos); override;
     57    procedure PinShowButtonClick(Sender: TObject);
     58    procedure PinHideButtonClick(Sender: TObject);
     59    procedure TabControlChange(Sender: TObject); override;
     60    constructor Create(ADockSite: TWinControl); override;
    5461    destructor Destroy; override;
    55   private
    5662  end;
    5763
     
    6066
    6167uses
    62   UCDClient;
     68  UCDClient, UCDManagerRegions;
    6369
    6470{ TCDManagerTabsPopupItem }
     
    6672constructor TCDManagerTabsPopupItem.Create;
    6773begin
     74  inherited;
    6875end;
    6976
     
    121128begin
    122129  StartBounds := Control.BoundsRect;
     130  Control.Show;
    123131  Control.Align := alCustom;
    124132  Direction := 1;
     
    165173end;
    166174
    167 { TCDStylePopupTabs }
    168 
    169 
    170 constructor TCDStylePopupTabs.Create(ADockSite: TWinControl);
     175{ TCDManagerTabsPopup }
     176
     177procedure TCDManagerTabsPopup.PinShowButtonClick(Sender: TObject);
     178begin
     179
     180end;
     181
     182procedure TCDManagerTabsPopup.PinHideButtonClick(Sender: TObject);
     183begin
     184
     185end;
     186
     187procedure TCDManagerTabsPopup.TabControlChange(Sender: TObject);
     188begin
     189  inherited TabControlChange(Sender);
     190  if PopupPanel.ControlCount > 0 then
     191    PopupPanel.Controls[0].Parent := nil;
     192  AutoHide.Hide;
     193  if PageControl.TabIndex >= 0 then begin
     194    TCDManagerTabsPopupItem(DockItems[PageControl.TabIndex]).Control.Parent := PopupPanel;
     195    AutoHide.Control.Align := alCustom;
     196    with AutoHide.Control do
     197    case AutoHide.TabPosition of
     198      tpTop: SetBounds(PageControl.Left, PageControl.Top + PageControl.Height,
     199        PageControl.Width, Height);
     200      tpLeft: SetBounds(PageControl.Left + PageControl.Width, PageControl.Top,
     201        Width, PageControl.Height);
     202      tpBottom: SetBounds(PageControl.Left, PageControl.Top - Height,
     203        PageControl.Width, Height);
     204      tpRight: SetBounds(PageControl.Left - Width, PageControl.Top,
     205        Width, PageControl.Height);
     206    end;
     207    AutoHide.Show;
     208  end;
     209end;
     210
     211constructor TCDManagerTabsPopup.Create(ADockSite: TWinControl);
    171212var
    172213  I: Integer;
     
    174215  inherited;
    175216  FDockStyle := dsPopupTabs;
     217  PopupPanel := TPanel.Create(nil);
     218  PopupPanel.DockManager := TCDManagerRegions.Create(PopupPanel);
     219  PopupPanel.Visible := True;
    176220  AutoHide := TCDAutoHide.Create;
    177   PopupPanel := TPanel.Create(nil);
    178 end;
    179 
    180 destructor TCDStylePopupTabs.Destroy;
     221  AutoHide.Control := PopupPanel;
     222
     223  for I := 0 to DockItems.Count - 1 do begin
     224//    if TCDManagerTabsPopupItem(DockItems[I]).Hidden then
     225//      if
     226  end;
     227end;
     228
     229destructor TCDManagerTabsPopup.Destroy;
    181230begin
    182231  AutoHide.Free;
     
    185234end;
    186235
     236procedure TCDManagerTabsPopup.InsertControlNoUpdate(Control: TControl; InsertAt: TAlign);
     237var
     238  NewTabSheet: TTabSheet;
     239  NewItem: TCDManagerTabsItem;
     240begin
     241  //inherited;
     242  begin
     243    NewItem := TCDManagerTabsPopupItem.Create;
     244    with NewItem do begin
     245      //Panel.Parent := Self.DockSite;
     246      Manager := Self;
     247      //if DockStyle = dsList then Visible := True;
     248      //Align := alClient;
     249      //Header.PopupMenu := Self.PopupMenu;
     250      //PopupMenu.Parent := Self.DockSite;
     251    end;
     252    if (Control is TForm) and Assigned((Control as TForm).Icon) then
     253      NewItem.Icon.Picture.Assign((Control as TForm).Icon);
     254
     255    NewItem.Control := Control;
     256    Control.AddHandlerOnVisibleChanged(NewItem.VisibleChange);
     257    //AControl.Parent := NewItem.ClientAreaPanel;
     258    Control.Align := alClient;
     259    if (InsertAt = alTop) or (InsertAt = alLeft) then
     260      DockItems.Insert(0, NewItem)
     261      else DockItems.Add(NewItem);
     262
     263  end;
     264
     265    NewTabSheet := TTabSheet.Create(PageControl);
     266    NewTabSheet.PageControl := PageControl;
     267    NewTabSheet.Caption := Control.Caption;
     268    NewTabSheet.ImageIndex := TabImageList.Count;
     269    NewTabSheet.TabVisible := Control.Visible;
     270    Control.Parent := NewTabSheet;
     271    TabImageList.Add(NewItem.Icon.Picture.Bitmap, nil);
     272//    if Assigned(NewItem.Splitter) then
     273//      NewItem.Splitter.Visible := False;
     274//    NewItem.ClientAreaPanel.Visible := False;
     275//    NewItem.Visible := False;
     276    //NewItem.Parent := NewTabSheet;
     277end;
     278
     279procedure TCDManagerTabsPopup.SetHeaderPos(const AValue: THeaderPos);
     280begin
     281  inherited SetHeaderPos(AValue);
     282  AutoHide.TabPosition := HeaderPosToTabPos(AValue);
     283end;
     284
    187285end.
    188286
  • Docking/CoolDocking/UCDClient.pas

    r194 r198  
    1717
    1818type
     19
     20  { TCDClient }
     21
    1922  TCDClient = class(TCDClientBase)
    2023  private
     
    2326    procedure SetDockable(const AValue: Boolean);
    2427    procedure SetFloatable(const AValue: Boolean);
     28    procedure SetPanel(const AValue: TPanel); override;
    2529  public
    2630    constructor Create(AOwner: TComponent); override;
     
    7882end;
    7983
     84procedure TCDClient.SetPanel(const AValue: TPanel);
     85begin
     86  inherited SetPanel(AValue);
     87  if not (csDesigning in ComponentState) then begin
     88    if Assigned(Panel) then
     89    with Panel do begin
     90      DockSite := True;
     91      UseDockManager := True;
     92      DockManager := TCDManagerRegions.Create(Panel);
     93    end;
     94  end;
     95end;
     96
    8097constructor TCDClient.Create(AOwner: TComponent);
    8198begin
  • Docking/CoolDocking/UCDCommon.pas

    r192 r198  
    1212  TCDHideType = (dhtPermanent, dhtTemporal);
    1313  TCDDirection = (ddNone, ddHorizontal, ddVertical);
     14  THeaderPos = (hpAuto, hpLeft, hpTop, hpRight, hpBottom);
    1415
    1516  TCDMasterBase = class;
     
    6465    FPanel: TPanel;
    6566    procedure SetMaster(const AValue: TCDMasterBase);
    66     procedure SetPanel(const AValue: TPanel);
     67  public
     68    procedure SetPanel(const AValue: TPanel); virtual;
    6769  published
    6870    property Master: TCDMasterBase read FMaster
     
    117119
    118120procedure TCDClientBase.SetPanel(const AValue: TPanel);
    119 var
    120   OldPanel: TPanel;
    121121begin
    122122  if FPanel = AValue then exit;
    123   OldPanel := FPanel;
     123  if Assigned(FPanel) then FPanel.DockSite := False;
    124124  FPanel := AValue;
    125   if not (csDesigning in ComponentState) then begin
    126     if Assigned(FPanel) then
    127     with FPanel do begin
    128       DockSite := True;
    129       UseDockManager := True;
    130       //DockManager := TCoolDockManager.Create(FPanel);
    131     end else begin
    132       OldPanel.DockSite := False;
    133     end;
    134   end;
    135125end;
    136126
  • Docking/CoolDocking/UCDManager.pas

    r197 r198  
    1414
    1515type
    16   THeaderPos = (hpAuto, hpLeft, hpTop, hpRight, hpBottom);
    17 
    1816  TCDManager = class;
    1917  TCDManagerItem = class;
     
    2321  TCDHeaderButton = class
    2422    Icon: TImage;
     23    Visible: Boolean;
    2524    constructor Create;
    2625    destructor Destroy; override;
     
    3231  private
    3332    procedure CloseButtonClick(Sender: TObject);
    34     procedure DrawGrabber(Canvas: TCanvas; AControl: TControl);
    3533    procedure PaintExecute(Sender: TObject);
    3634    procedure RearrangeButtons;
     
    4038    Icon: TImage;
    4139    ManagerItem: TCDManagerItem;
     40    procedure DrawGrabber(Canvas: TCanvas; AControl: TControl);
    4241    constructor Create(TheOwner: TComponent); override;
    4342    destructor Destroy; override;
     
    7271    procedure Paint(Sender: TObject); virtual;
    7372    procedure VisibleChange(Sender: TObject); virtual;
    74     constructor Create;
     73    constructor Create; virtual;
    7574    destructor Destroy; override;
    7675  end;
     
    8180  private
    8281    FDockSite: TWinControl;
     82    FHeaderPos: THeaderPos;
    8383    function GetDockSite: TWinControl;
    84     function GetHeaderPos: THeaderPos;
    8584    function GetMoveDuration: Integer;
    8685    procedure SetDockStyle(const AValue: TCDStyleType);
    87     procedure SetHeaderPos(const AValue: THeaderPos);
    8886    procedure SetMoveDuration(const AValue: Integer);
    8987    procedure SetVisible(const AValue: Boolean);
    9088  public
     89    Locked: Boolean;
     90    PopupMenu: TCDPopupMenu;
    9191    FDockStyle: TCDStyleType;
    92     PopupMenu: TCDPopupMenu;
    9392    constructor Create(ADockSite: TWinControl); override;
    9493    destructor Destroy; override;
     
    10099      DropCtl: TControl); virtual;
    101100    procedure DoSetVisible(const AValue: Boolean); virtual;
     101    procedure SetHeaderPos(const AValue: THeaderPos); virtual;
     102    function GetHeaderPos: THeaderPos; virtual;
    102103
    103104    // Inherited from TDockManager
     
    131132  end;
    132133
     134function HeaderPosToTabPos(HeaderPos: THeaderPos): TTabPosition;
     135
    133136
    134137implementation
     
    137140  UCDManagerRegions, UCDManagerTabs, UCDManagerRegionsPopup, UCDManagerTabsPopup,
    138141  UCDResource;
     142
     143function HeaderPosToTabPos(HeaderPos: THeaderPos): TTabPosition;
     144begin
     145  case HeaderPos of
     146    hpBottom: Result := tpBottom;
     147    hpLeft: Result := tpLeft;
     148    hpTop: Result := tpTop;
     149    hpRight: Result := tpRight;
     150    hpAuto: Result := tpLeft;
     151  end;
     152end;
    139153
    140154{ TCDHeaderButton }
     
    204218
    205219procedure TCDManagerItem.Paint(Sender: TObject);
    206 var
    207   I: Integer;
    208   R: TRect;
    209 begin
    210 (*  if not (csDesigning in ComponentState) then
    211   if Assigned(Control) then begin
    212     R := Control.ClientRect;
    213     Canvas.FillRect(R);
    214     Header.Visible := ShowHeader;
    215     if ShowHeader then begin
    216       if ClientAreaPanel.DockClientCount = 0 then
    217         Header.DrawGrabber(Canvas, Control) else
    218       Header.DrawGrabber(Canvas, ClientAreaPanel);
    219     end;
    220   end;*)
     220begin
    221221end;
    222222
     
    248248    //(Control as TWinControl).DockSite := False;
    249249    //ClientAreaPanel.DockSite := False;
    250     (Control as TWinControl).BeginDrag(False, 10);
    251     DragManager.DragStart(Control, False, 1);
     250    if not Manager.Locked then begin
     251      (Control as TWinControl).BeginDrag(False, 10);
     252      DragManager.DragStart(Control, False, 1);
     253    end;
    252254  end;
    253255end;
     
    310312function TCDManager.GetHeaderPos: THeaderPos;
    311313begin
    312 
     314  Result := FHeaderPos;
    313315end;
    314316
     
    527529    end else
    528530    if AValue = dsPopupTabs then begin
    529       NewManager := TCDStylePopupTabs.Create(FDockSite);
     531      NewManager := TCDManagerTabsPopup.Create(FDockSite);
    530532    end;
    531533    if DockSite.DockManager is TCDManager then
     
    538540procedure TCDManager.SetHeaderPos(const AValue: THeaderPos);
    539541begin
    540 
     542  FHeaderPos := AValue;
    541543end;
    542544
     
    600602    Icon.Parent := Self;
    601603    Icon.OnClick := CloseButtonClick;
     604    Visible := True;
    602605  end;
    603606  Buttons.Add(NewButton);
     
    606609    DataModule2.ImageList1.GetBitmap(1, Icon.Picture.Bitmap);
    607610    Icon.Parent := Self;
    608     Icon.OnClick := CloseButtonClick;
     611    Icon.OnClick := nil;
     612    Visible := False;
     613  end;
     614  Buttons.Add(NewButton);
     615  NewButton := TCDHeaderButton.Create;
     616  with NewButton do begin
     617    DataModule2.ImageList1.GetBitmap(2, Icon.Picture.Bitmap);
     618    Icon.Parent := Self;
     619    Icon.OnClick := nil;
     620    Visible := False;
    609621  end;
    610622  Buttons.Add(NewButton);
     
    640652      else Title.Left := 6;
    641653    Title.Caption := AControl.Caption;
     654    RearrangeButtons;
    642655  end;
    643656end;
     
    702715  LeftPos := Self.Width;
    703716  for I := 0 to Buttons.Count - 1 do
    704   with TCDHeaderButton(Buttons[I]), Icon do begin
    705     Anchors := [akRight, akTop];
     717  with TCDHeaderButton(Buttons[I]) do
     718  if Visible then begin
     719    Icon.Anchors := [akRight, akTop];
    706720    //Icon.Picture.Bitmap.SetSize(16, 16);
    707721    Icon.Width := Icon.Picture.Bitmap.Width;
     
    712726
    713727    //ShowMessage(IntToStr(Icon.Width) + ' ' +  InttoStr(Icon.Height));
    714     Visible := True;
    715   end;
     728    Icon.Visible := True;
     729  end else Icon.Visible := False;
    716730end;
    717731
  • Docking/CoolDocking/UCDPopupMenu.pas

    r194 r198  
    1414
    1515  TCDPopupMenu = class(TPopupMenu)
     16  private
     17    procedure PopupExecute(Sender: TObject);
    1618  public
    1719    Manager: TCDManagerBase;
     20    PositionMenu: TMenuItem;
     21    StyleMenu: TMenuItem;
     22    LockedMenu: TMenuItem;
    1823    constructor Create(AManager: TCDManagerBase);
     24    procedure UncheckMenuGroup(Item: TMenuItem);
    1925    procedure PopupMenuListClick(Sender: TObject);
    2026    procedure PopupMenuTabsClick(Sender: TObject);
     
    3036    procedure PopupMenuUndockClick(Sender: TObject);
    3137    procedure PopupMenuCustomizeClick(Sender: TObject);
     38    procedure PopupMenuLockedClick(Sender: TObject);
    3239  end;
    3340
     
    5562  SEnterNewWindowName = 'Enter new window name';
    5663  SRenameWindow = 'Rename window';
     64  SLocked = 'Locked';
    5765
    5866
    5967{ TCDPopupMenu }
     68
     69procedure TCDPopupMenu.UncheckMenuGroup(Item: TMenuItem);
     70var
     71  I: Integer;
     72begin
     73  for I := 0 to Item.Count - 1 do
     74    Item.Items[I].Checked := False;
     75end;
     76
     77procedure TCDPopupMenu.PopupExecute(Sender: TObject);
     78begin
     79  UncheckMenuGroup(StyleMenu);
     80  StyleMenu.Items[Integer(TCDManager(Manager).DockStyle)].Checked := True;
     81  UncheckMenuGroup(PositionMenu);
     82  PositionMenu.Items[Integer(TCDManager(Manager).HeaderPos)].Checked := True;;
     83  LockedMenu.Checked := TCDManager(Manager).Locked;
     84end;
    6085
    6186constructor TCDPopupMenu.Create(AManager: TCDManagerBase);
     
    6893  Manager := AManager;
    6994
    70   Name := TCDManager(AManager).DockSite.Name + '_' + 'PopupMenu';
    71 
    72   NewMenuItem := TMenuItem.Create(Self);
    73   NewMenuItem.Caption := SDockStyle;
    74   Items.Add(NewMenuItem);
    75 
    76   NewMenuItem2 := TMenuItem.Create(NewMenuItem);
     95  Name := GetUniqueName(TCDManager(AManager).DockSite.Name + 'PopupMenu');
     96  OnPopup := PopupExecute;
     97
     98  StyleMenu := TMenuItem.Create(Self);
     99  StyleMenu.Caption := SDockStyle;
     100  Items.Add(StyleMenu);
     101
     102  NewMenuItem2 := TMenuItem.Create(StyleMenu);
    77103  NewMenuItem2.Caption := SDockList;
    78104  NewMenuItem2.OnClick := PopupMenuListClick;
    79   NewMenuItem.Add(NewMenuItem2);
    80 
    81   NewMenuItem2 := TMenuItem.Create(NewMenuItem);
     105  StyleMenu.Add(NewMenuItem2);
     106
     107  NewMenuItem2 := TMenuItem.Create(StyleMenu);
    82108  NewMenuItem2.Caption := SDockTabs;
    83109  NewMenuItem2.OnClick := PopupMenuTabsClick;
    84   NewMenuItem.Add(NewMenuItem2);
    85 
    86   NewMenuItem2 := TMenuItem.Create(NewMenuItem);
     110  StyleMenu.Add(NewMenuItem2);
     111
     112  NewMenuItem2 := TMenuItem.Create(StyleMenu);
     113  NewMenuItem2.Caption := SDockPopupTabs;
     114  NewMenuItem2.OnClick := PopupMenuPopupTabsClick;
     115  StyleMenu.Add(NewMenuItem2);
     116
     117  NewMenuItem2 := TMenuItem.Create(StyleMenu);
    87118  NewMenuItem2.Caption := SDockPopupList;
    88119  NewMenuItem2.OnClick := PopupMenuPopupListClick;
    89   NewMenuItem.Add(NewMenuItem2);
    90 
    91   NewMenuItem2 := TMenuItem.Create(NewMenuItem);
    92   NewMenuItem2.Caption := SDockPopupTabs;
    93   NewMenuItem2.OnClick := PopupMenuPopupTabsClick;
    94   NewMenuItem.Add(NewMenuItem2);
    95 
    96   NewMenuItem := TMenuItem.Create(Self);
    97   NewMenuItem.Caption := SPosition;
    98   Items.Add(NewMenuItem);
    99 
    100   NewMenuItem2 := TMenuItem.Create(NewMenuItem);
     120  StyleMenu.Add(NewMenuItem2);
     121
     122  PositionMenu := TMenuItem.Create(Self);
     123  PositionMenu.Caption := SPosition;
     124  Items.Add(PositionMenu);
     125
     126  NewMenuItem2 := TMenuItem.Create(PositionMenu);
    101127  NewMenuItem2.Caption := SPositionAuto;
    102128  NewMenuItem2.OnClick := PopupMenuPositionAutoClick;
    103   NewMenuItem.Add(NewMenuItem2);
    104 
    105   NewMenuItem2 := TMenuItem.Create(NewMenuItem);
     129  PositionMenu.Add(NewMenuItem2);
     130
     131  NewMenuItem2 := TMenuItem.Create(PositionMenu);
     132  NewMenuItem2.Caption := SPositionLeft;
     133  NewMenuItem2.OnClick := PopupMenuPositionLeftClick;
     134  PositionMenu.Add(NewMenuItem2);
     135
     136  NewMenuItem2 := TMenuItem.Create(PositionMenu);
    106137  NewMenuItem2.Caption := SPositionTop;
    107138  NewMenuItem2.OnClick := PopupMenuPositionTopClick;
    108   NewMenuItem.Add(NewMenuItem2);
    109 
    110   NewMenuItem2 := TMenuItem.Create(NewMenuItem);
    111   NewMenuItem2.Caption := SPositionLeft;
    112   NewMenuItem2.OnClick := PopupMenuPositionLeftClick;
    113   NewMenuItem.Add(NewMenuItem2);
    114 
    115   NewMenuItem2 := TMenuItem.Create(NewMenuItem);
     139  PositionMenu.Add(NewMenuItem2);
     140
     141  NewMenuItem2 := TMenuItem.Create(PositionMenu);
     142  NewMenuItem2.Caption := SPositionRight;
     143  NewMenuItem2.OnClick := PopupMenuPositionRightClick;
     144  PositionMenu.Add(NewMenuItem2);
     145
     146  NewMenuItem2 := TMenuItem.Create(PositionMenu);
    116147  NewMenuItem2.Caption := SPositionBottom;
    117148  NewMenuItem2.OnClick := PopupMenuPositionBottomClick;
    118   NewMenuItem.Add(NewMenuItem2);
    119 
    120   NewMenuItem2 := TMenuItem.Create(NewMenuItem);
    121   NewMenuItem2.Caption := SPositionRight;
    122   NewMenuItem2.OnClick := PopupMenuPositionRightClick;
    123   NewMenuItem.Add(NewMenuItem2);
     149  PositionMenu.Add(NewMenuItem2);
    124150
    125151  NewMenuItem := TMenuItem.Create(Self);
     
    142168  NewMenuItem.OnClick := PopupMenuCustomizeClick;
    143169  Items.Add(NewMenuItem);
     170
     171  LockedMenu := TMenuItem.Create(Self);
     172  LockedMenu.Caption := SLocked;
     173  LockedMenu.OnClick := PopupMenuLockedClick;
     174  Items.Add(LockedMenu);
    144175end;
    145176
     
    200231  if PopupComponent is TPageControl then
    201232  with TPageControl(PopupComponent) do begin
    202     TCDManagerTabs(Manager).TabsPos := hpAuto;
     233    TCDManagerTabs(Manager).HeaderPos := hpAuto;
    203234  end else
    204235  if PopupComponent is TCDHeader then
     
    212243  if PopupComponent is TPageControl then
    213244  with TPageControl(PopupComponent) do begin
    214     TCDManagerTabs(Manager).TabsPos := hpLeft;
     245    TCDManagerTabs(Manager).HeaderPos := hpLeft;
    215246  end else
    216247  if PopupComponent is TCDHeader then
     
    224255  if PopupComponent is TPageControl then
    225256  with TPageControl(PopupComponent) do begin
    226     TCDManagerTabs(Manager).TabsPos := hpRight;
     257    TCDManagerTabs(Manager).HeaderPos := hpRight;
    227258  end else
    228259  if PopupComponent is TCDHeader then
     
    236267  if PopupComponent is TPageControl then
    237268  with TPageControl(PopupComponent) do begin
    238     TCDManagerTabs(Manager).TabsPos := hpTop;
     269    TCDManagerTabs(Manager).HeaderPos := hpTop;
    239270  end else
    240271  if PopupComponent is TCDHeader then
     
    248279  if PopupComponent is TPageControl then
    249280  with TPageControl(PopupComponent) do begin
    250     TCDManagerTabs(Manager).TabsPos := hpBottom;
     281    TCDManagerTabs(Manager).HeaderPos := hpBottom;
    251282  end else
    252283  if PopupComponent is TCDHeader then
     
    280311end;
    281312
     313procedure TCDPopupMenu.PopupMenuLockedClick(Sender: TObject);
     314begin
     315  if PopupComponent is TPageControl then
     316  with TPageControl(PopupComponent) do begin
     317    TCDManagerTabs(Manager).Locked := not TCDManagerTabs(Manager).Locked;
     318  end else
     319  if PopupComponent is TCDHeader then
     320  with TCDHeader(PopupComponent) do begin
     321    TCDManagerTabs(Manager).Locked := not TCDManagerTabs(Manager).Locked;
     322  end;
     323end;
     324
    282325procedure TCDPopupMenu.PopupMenuListClick(Sender: TObject);
    283326begin
  • Docking/CoolDocking/languages/UCDPopupMenu.po

    r189 r198  
    3232#: ucdpopupmenu.senternewwindowname
    3333msgid "Enter new window name"
     34msgstr ""
     35
     36#: ucdpopupmenu.slocked
     37msgid "Locked"
    3438msgstr ""
    3539
Note: See TracChangeset for help on using the changeset viewer.