Changeset 180


Ignore:
Timestamp:
Mar 8, 2011, 1:57:42 PM (14 years ago)
Author:
george
Message:
  • Added: Customization of layouts in "Customize docking" window.
Location:
Docking/CoolDocking
Files:
2 added
13 edited

Legend:

Unmodified
Added
Removed
  • Docking/CoolDocking/CoolDocking.lpk

    r178 r180  
    2525    <Description Value="Set of components for docking of windows."/>
    2626    <Version Minor="2"/>
    27     <Files Count="13">
     27    <Files Count="14">
    2828      <Item1>
    2929        <Filename Value="UCoolDocking.pas"/>
     
    4141      <Item4>
    4242        <Filename Value="UCoolDockWindowList.pas"/>
     43        <HasRegisterProc Value="True"/>
    4344        <UnitName Value="UCoolDockWindowList"/>
    4445      </Item4>
     
    8081        <UnitName Value="URectangle"/>
    8182      </Item13>
     83      <Item14>
     84        <Filename Value="UCoolDockCommon.pas"/>
     85        <UnitName Value="UCoolDockCommon"/>
     86      </Item14>
    8287    </Files>
    8388    <i18n>
  • Docking/CoolDocking/CoolDocking.pas

    r178 r180  
    1111  UCoolDockStyleRegions, UCoolDockStylePopupTabs, UCoolDockStylePopupRegions,
    1212  UCoolDockStyle, UCoolDockClientPanel, UCoolDockPopupMenu, UCoolDockLayout,
    13   URectangle, LazarusPackageIntf;
     13  URectangle, UCoolDockCommon, LazarusPackageIntf;
    1414
    1515implementation
     
    1818begin
    1919  RegisterUnit('UCoolDocking', @UCoolDocking.Register);
     20  RegisterUnit('UCoolDockWindowList', @UCoolDockWindowList.Register);
    2021  RegisterUnit('UCoolDockLayout', @UCoolDockLayout.Register);
    2122end;
  • Docking/CoolDocking/Demo/IDE/IDE.lpi

    r179 r180  
    4747      </Item4>
    4848    </RequiredPackages>
    49     <Units Count="31">
     49    <Units Count="35">
    5050      <Unit0>
    5151        <Filename Value="IDE.lpr"/>
    5252        <IsPartOfProject Value="True"/>
    5353        <UnitName Value="IDE"/>
    54         <UsageCount Value="31"/>
     54        <UsageCount Value="34"/>
    5555      </Unit0>
    5656      <Unit1>
     
    6262        <EditorIndex Value="0"/>
    6363        <WindowIndex Value="0"/>
    64         <TopLine Value="159"/>
    65         <CursorPos X="15" Y="161"/>
    66         <UsageCount Value="31"/>
     64        <TopLine Value="187"/>
     65        <CursorPos X="44" Y="198"/>
     66        <UsageCount Value="34"/>
    6767        <Loaded Value="True"/>
    6868        <LoadedDesigner Value="True"/>
     
    7474        <ResourceBaseClass Value="Form"/>
    7575        <UnitName Value="UObjectInspectorForm"/>
    76         <EditorIndex Value="12"/>
     76        <EditorIndex Value="15"/>
    7777        <WindowIndex Value="0"/>
    7878        <TopLine Value="1"/>
    7979        <CursorPos X="12" Y="16"/>
    80         <UsageCount Value="31"/>
    81         <Loaded Value="True"/>
    82         <LoadedDesigner Value="True"/>
     80        <UsageCount Value="34"/>
     81        <Loaded Value="True"/>
    8382      </Unit2>
    8483      <Unit3>
     
    8887        <ResourceBaseClass Value="Form"/>
    8988        <UnitName Value="UStructureForm"/>
    90         <EditorIndex Value="15"/>
     89        <EditorIndex Value="18"/>
    9190        <WindowIndex Value="0"/>
    9291        <TopLine Value="1"/>
    9392        <CursorPos X="3" Y="16"/>
    94         <UsageCount Value="31"/>
    95         <Loaded Value="True"/>
    96         <LoadedDesigner Value="True"/>
     93        <UsageCount Value="34"/>
     94        <Loaded Value="True"/>
    9795      </Unit3>
    9896      <Unit4>
     
    102100        <ResourceBaseClass Value="Form"/>
    103101        <UnitName Value="UToolPaletteForm"/>
    104         <EditorIndex Value="16"/>
     102        <EditorIndex Value="19"/>
    105103        <WindowIndex Value="0"/>
    106104        <TopLine Value="1"/>
    107105        <CursorPos X="15" Y="10"/>
    108         <UsageCount Value="31"/>
    109         <Loaded Value="True"/>
    110         <LoadedDesigner Value="True"/>
     106        <UsageCount Value="34"/>
     107        <Loaded Value="True"/>
    111108      </Unit4>
    112109      <Unit5>
    113110        <Filename Value="E:\Projekty2\FreePascalManager\trunk\Instance\1\Lazarus\lcl\include\control.inc"/>
    114         <EditorIndex Value="17"/>
    115         <WindowIndex Value="0"/>
    116         <TopLine Value="2272"/>
    117         <CursorPos X="1" Y="2285"/>
     111        <EditorIndex Value="20"/>
     112        <WindowIndex Value="0"/>
     113        <TopLine Value="3176"/>
     114        <CursorPos X="35" Y="3188"/>
    118115        <UsageCount Value="17"/>
    119116        <Loaded Value="True"/>
     
    125122        <ResourceBaseClass Value="Form"/>
    126123        <UnitName Value="UProjectManagerForm"/>
    127         <EditorIndex Value="14"/>
     124        <EditorIndex Value="17"/>
    128125        <WindowIndex Value="0"/>
    129126        <TopLine Value="1"/>
    130127        <CursorPos X="20" Y="16"/>
    131         <UsageCount Value="31"/>
    132         <Loaded Value="True"/>
    133         <LoadedDesigner Value="True"/>
     128        <UsageCount Value="34"/>
     129        <Loaded Value="True"/>
    134130      </Unit6>
    135131      <Unit7>
    136132        <Filename Value="E:\Projekty2\FreePascalManager\trunk\Instance\1\Lazarus\lcl\include\customform.inc"/>
    137         <EditorIndex Value="19"/>
     133        <EditorIndex Value="22"/>
    138134        <WindowIndex Value="0"/>
    139135        <TopLine Value="1870"/>
     
    148144        <ResourceBaseClass Value="Form"/>
    149145        <UnitName Value="UMessagesForm"/>
    150         <EditorIndex Value="13"/>
     146        <EditorIndex Value="16"/>
    151147        <WindowIndex Value="0"/>
    152148        <TopLine Value="1"/>
    153149        <CursorPos X="7" Y="16"/>
    154         <UsageCount Value="31"/>
    155         <Loaded Value="True"/>
    156         <LoadedDesigner Value="True"/>
     150        <UsageCount Value="34"/>
     151        <Loaded Value="True"/>
    157152      </Unit8>
    158153      <Unit9>
     
    162157        <ResourceBaseClass Value="Form"/>
    163158        <UnitName Value="UCallStackForm"/>
    164         <EditorIndex Value="11"/>
     159        <EditorIndex Value="14"/>
    165160        <WindowIndex Value="0"/>
    166161        <TopLine Value="1"/>
    167162        <CursorPos X="12" Y="15"/>
    168         <UsageCount Value="31"/>
    169         <Loaded Value="True"/>
    170         <LoadedDesigner Value="True"/>
     163        <UsageCount Value="34"/>
     164        <Loaded Value="True"/>
    171165      </Unit9>
    172166      <Unit10>
     
    176170        <ResourceBaseClass Value="Form"/>
    177171        <UnitName Value="ULocalVariablesForm"/>
    178         <EditorIndex Value="10"/>
     172        <EditorIndex Value="13"/>
    179173        <WindowIndex Value="0"/>
    180174        <TopLine Value="1"/>
    181175        <CursorPos X="21" Y="4"/>
    182         <UsageCount Value="31"/>
    183         <Loaded Value="True"/>
    184         <LoadedDesigner Value="True"/>
     176        <UsageCount Value="34"/>
     177        <Loaded Value="True"/>
    185178      </Unit10>
    186179      <Unit11>
     
    190183        <ResourceBaseClass Value="Form"/>
    191184        <UnitName Value="UToDoListForm"/>
    192         <EditorIndex Value="9"/>
     185        <EditorIndex Value="12"/>
    193186        <WindowIndex Value="0"/>
    194187        <TopLine Value="1"/>
    195188        <CursorPos X="12" Y="16"/>
    196         <UsageCount Value="31"/>
    197         <Loaded Value="True"/>
    198         <LoadedDesigner Value="True"/>
     189        <UsageCount Value="34"/>
     190        <Loaded Value="True"/>
    199191      </Unit11>
    200192      <Unit12>
     
    204196        <ResourceBaseClass Value="Form"/>
    205197        <UnitName Value="UWatchListForm"/>
    206         <EditorIndex Value="8"/>
     198        <EditorIndex Value="11"/>
    207199        <WindowIndex Value="0"/>
    208200        <TopLine Value="1"/>
    209201        <CursorPos X="12" Y="17"/>
    210         <UsageCount Value="31"/>
    211         <Loaded Value="True"/>
    212         <LoadedDesigner Value="True"/>
     202        <UsageCount Value="34"/>
     203        <Loaded Value="True"/>
    213204      </Unit12>
    214205      <Unit13>
     
    218209        <ResourceBaseClass Value="Form"/>
    219210        <UnitName Value="UThreadStatusForm"/>
    220         <EditorIndex Value="7"/>
     211        <EditorIndex Value="10"/>
    221212        <WindowIndex Value="0"/>
    222213        <TopLine Value="1"/>
    223214        <CursorPos X="12" Y="16"/>
    224         <UsageCount Value="31"/>
    225         <Loaded Value="True"/>
    226         <LoadedDesigner Value="True"/>
     215        <UsageCount Value="34"/>
     216        <Loaded Value="True"/>
    227217      </Unit13>
    228218      <Unit14>
     
    236226        <TopLine Value="1"/>
    237227        <CursorPos X="41" Y="17"/>
    238         <UsageCount Value="29"/>
    239         <Loaded Value="True"/>
    240         <LoadedDesigner Value="True"/>
     228        <UsageCount Value="32"/>
     229        <Loaded Value="True"/>
    241230      </Unit14>
    242231      <Unit15>
     
    245234        <EditorIndex Value="3"/>
    246235        <WindowIndex Value="0"/>
    247         <TopLine Value="1"/>
    248         <CursorPos X="22" Y="9"/>
     236        <TopLine Value="798"/>
     237        <CursorPos X="1" Y="807"/>
    249238        <UsageCount Value="15"/>
    250239        <Loaded Value="True"/>
     
    254243        <UnitName Value="UCoolDockLayout"/>
    255244        <IsVisibleTab Value="True"/>
    256         <EditorIndex Value="4"/>
    257         <WindowIndex Value="0"/>
    258         <TopLine Value="383"/>
    259         <CursorPos X="4" Y="396"/>
     245        <EditorIndex Value="5"/>
     246        <WindowIndex Value="0"/>
     247        <TopLine Value="166"/>
     248        <CursorPos X="21" Y="182"/>
    260249        <UsageCount Value="15"/>
    261250        <Loaded Value="True"/>
     
    266255        <TopLine Value="1643"/>
    267256        <CursorPos X="42" Y="1651"/>
    268         <UsageCount Value="15"/>
     257        <UsageCount Value="14"/>
    269258      </Unit17>
    270259      <Unit18>
     
    274263        <TopLine Value="70"/>
    275264        <CursorPos X="21" Y="83"/>
    276         <UsageCount Value="15"/>
     265        <UsageCount Value="14"/>
    277266      </Unit18>
    278267      <Unit19>
     
    281270        <TopLine Value="220"/>
    282271        <CursorPos X="16" Y="233"/>
    283         <UsageCount Value="15"/>
     272        <UsageCount Value="14"/>
    284273      </Unit19>
    285274      <Unit20>
    286275        <Filename Value="..\..\URectangle.pas"/>
    287276        <UnitName Value="URectangle"/>
    288         <EditorIndex Value="6"/>
     277        <EditorIndex Value="9"/>
    289278        <WindowIndex Value="0"/>
    290279        <TopLine Value="20"/>
     
    299288        <TopLine Value="34"/>
    300289        <CursorPos X="11" Y="47"/>
    301         <UsageCount Value="15"/>
     290        <UsageCount Value="14"/>
    302291      </Unit21>
    303292      <Unit22>
    304293        <Filename Value="..\..\UCoolDockWindowList.pas"/>
     294        <ComponentName Value="CoolDockWindowListForm"/>
     295        <HasResources Value="True"/>
     296        <ResourceBaseClass Value="Form"/>
    305297        <UnitName Value="UCoolDockWindowList"/>
    306         <EditorIndex Value="5"/>
    307         <WindowIndex Value="0"/>
    308         <TopLine Value="103"/>
    309         <CursorPos X="1" Y="106"/>
     298        <WindowIndex Value="0"/>
     299        <TopLine Value="25"/>
     300        <CursorPos X="7" Y="48"/>
    310301        <UsageCount Value="12"/>
    311         <Loaded Value="True"/>
    312302      </Unit22>
    313303      <Unit23>
     
    333323        <TopLine Value="913"/>
    334324        <CursorPos X="1" Y="930"/>
    335         <UsageCount Value="11"/>
     325        <UsageCount Value="12"/>
    336326        <Loaded Value="True"/>
    337327      </Unit25>
     
    367357      <Unit30>
    368358        <Filename Value="E:\Projekty2\FreePascalManager\trunk\Instance\1\Lazarus\lcl\include\toolbutton.inc"/>
    369         <EditorIndex Value="18"/>
     359        <EditorIndex Value="21"/>
    370360        <WindowIndex Value="0"/>
    371361        <TopLine Value="751"/>
     
    374364        <Loaded Value="True"/>
    375365      </Unit30>
     366      <Unit31>
     367        <Filename Value="..\..\UCoolDockCustomize.pas"/>
     368        <ComponentName Value="CoolDockCustomizeForm"/>
     369        <HasResources Value="True"/>
     370        <ResourceBaseClass Value="Form"/>
     371        <UnitName Value="UCoolDockCustomize"/>
     372        <EditorIndex Value="7"/>
     373        <WindowIndex Value="0"/>
     374        <TopLine Value="72"/>
     375        <CursorPos X="1" Y="81"/>
     376        <UsageCount Value="10"/>
     377        <Loaded Value="True"/>
     378        <LoadedDesigner Value="True"/>
     379      </Unit31>
     380      <Unit32>
     381        <Filename Value="..\..\UCoolDockCommon.pas"/>
     382        <UnitName Value="UCoolDockCommon"/>
     383        <EditorIndex Value="6"/>
     384        <WindowIndex Value="0"/>
     385        <TopLine Value="1"/>
     386        <CursorPos X="1" Y="12"/>
     387        <UsageCount Value="10"/>
     388        <Loaded Value="True"/>
     389      </Unit32>
     390      <Unit33>
     391        <Filename Value="..\..\UCoolDockPopupMenu.pas"/>
     392        <UnitName Value="UCoolDockPopupMenu"/>
     393        <EditorIndex Value="4"/>
     394        <WindowIndex Value="0"/>
     395        <TopLine Value="1"/>
     396        <CursorPos X="38" Y="9"/>
     397        <UsageCount Value="10"/>
     398        <Loaded Value="True"/>
     399      </Unit33>
     400      <Unit34>
     401        <Filename Value="E:\Projekty2\FreePascalManager\trunk\Instance\1\Lazarus\lcl\dialogs.pp"/>
     402        <UnitName Value="Dialogs"/>
     403        <EditorIndex Value="8"/>
     404        <WindowIndex Value="0"/>
     405        <TopLine Value="503"/>
     406        <CursorPos X="10" Y="516"/>
     407        <UsageCount Value="10"/>
     408        <Loaded Value="True"/>
     409      </Unit34>
    376410    </Units>
    377411    <JumpHistory Count="30" HistoryIndex="29">
    378412      <Position1>
    379         <Filename Value="..\..\UCoolDockLayout.pas"/>
    380         <Caret Line="344" Column="1" TopLine="334"/>
     413        <Filename Value="..\..\UCoolDockPopupMenu.pas"/>
     414        <Caret Line="1" Column="1" TopLine="1"/>
    381415      </Position1>
    382416      <Position2>
    383         <Filename Value="..\..\UCoolDockLayout.pas"/>
    384         <Caret Line="345" Column="1" TopLine="334"/>
     417        <Filename Value="..\..\UCoolDocking.pas"/>
     418        <Caret Line="804" Column="16" TopLine="798"/>
    385419      </Position2>
    386420      <Position3>
    387         <Filename Value="..\..\UCoolDockLayout.pas"/>
    388         <Caret Line="356" Column="1" TopLine="335"/>
     421        <Filename Value="..\..\UCoolDockCustomize.pas"/>
     422        <Caret Line="17" Column="7" TopLine="4"/>
    389423      </Position3>
    390424      <Position4>
    391         <Filename Value="UMainForm.pas"/>
    392         <Caret Line="177" Column="1" TopLine="167"/>
     425        <Filename Value="..\..\UCoolDockCustomize.pas"/>
     426        <Caret Line="18" Column="16" TopLine="4"/>
    393427      </Position4>
    394428      <Position5>
    395         <Filename Value="UMainForm.pas"/>
    396         <Caret Line="180" Column="1" TopLine="167"/>
     429        <Filename Value="..\..\UCoolDockCustomize.pas"/>
     430        <Caret Line="61" Column="51" TopLine="37"/>
    397431      </Position5>
    398432      <Position6>
    399         <Filename Value="..\..\UCoolDockLayout.pas"/>
    400         <Caret Line="169" Column="1" TopLine="156"/>
     433        <Filename Value="..\..\UCoolDockCustomize.pas"/>
     434        <Caret Line="57" Column="66" TopLine="45"/>
    401435      </Position6>
    402436      <Position7>
    403         <Filename Value="..\..\UCoolDockLayout.pas"/>
    404         <Caret Line="170" Column="1" TopLine="156"/>
     437        <Filename Value="..\..\UCoolDockCustomize.pas"/>
     438        <Caret Line="65" Column="42" TopLine="52"/>
    405439      </Position7>
    406440      <Position8>
    407         <Filename Value="..\..\UCoolDockLayout.pas"/>
    408         <Caret Line="171" Column="1" TopLine="156"/>
     441        <Filename Value="..\..\UCoolDockCustomize.pas"/>
     442        <Caret Line="76" Column="57" TopLine="55"/>
    409443      </Position8>
    410444      <Position9>
    411         <Filename Value="..\..\UCoolDockLayout.pas"/>
    412         <Caret Line="172" Column="1" TopLine="156"/>
     445        <Filename Value="E:\Projekty2\FreePascalManager\trunk\Instance\1\Lazarus\lcl\include\control.inc"/>
     446        <Caret Line="3185" Column="33" TopLine="3176"/>
    413447      </Position9>
    414448      <Position10>
    415449        <Filename Value="UMainForm.pas"/>
    416         <Caret Line="121" Column="1" TopLine="108"/>
     450        <Caret Line="2" Column="44" TopLine="1"/>
    417451      </Position10>
    418452      <Position11>
    419         <Filename Value="UMainForm.pas"/>
    420         <Caret Line="172" Column="1" TopLine="159"/>
     453        <Filename Value="..\..\UCoolDocking.pas"/>
     454        <Caret Line="800" Column="3" TopLine="798"/>
    421455      </Position11>
    422456      <Position12>
    423         <Filename Value="..\..\UCoolDockLayout.pas"/>
    424         <Caret Line="350" Column="15" TopLine="334"/>
     457        <Filename Value="..\..\UCoolDocking.pas"/>
     458        <Caret Line="805" Column="1" TopLine="798"/>
    425459      </Position12>
    426460      <Position13>
    427         <Filename Value="..\..\UCoolDockLayout.pas"/>
    428         <Caret Line="409" Column="40" TopLine="385"/>
     461        <Filename Value="..\..\UCoolDockCustomize.pas"/>
     462        <Caret Line="57" Column="82" TopLine="56"/>
    429463      </Position13>
    430464      <Position14>
    431         <Filename Value="..\..\UCoolDockLayout.pas"/>
    432         <Caret Line="406" Column="22" TopLine="389"/>
     465        <Filename Value="..\..\UCoolDockCustomize.pas"/>
     466        <Caret Line="74" Column="14" TopLine="70"/>
    433467      </Position14>
    434468      <Position15>
    435         <Filename Value="..\..\UCoolDockLayout.pas"/>
    436         <Caret Line="398" Column="16" TopLine="387"/>
     469        <Filename Value="..\..\UCoolDockCustomize.pas"/>
     470        <Caret Line="52" Column="37" TopLine="27"/>
    437471      </Position15>
    438472      <Position16>
    439         <Filename Value="..\..\UCoolDockLayout.pas"/>
    440         <Caret Line="394" Column="3" TopLine="384"/>
     473        <Filename Value="..\..\UCoolDockCustomize.pas"/>
     474        <Caret Line="76" Column="1" TopLine="70"/>
    441475      </Position16>
    442476      <Position17>
    443         <Filename Value="..\..\UCoolDockLayout.pas"/>
    444         <Caret Line="383" Column="29" TopLine="369"/>
     477        <Filename Value="..\..\UCoolDockCustomize.pas"/>
     478        <Caret Line="93" Column="2" TopLine="88"/>
    445479      </Position17>
    446480      <Position18>
    447         <Filename Value="..\..\UCoolDockLayout.pas"/>
    448         <Caret Line="405" Column="1" TopLine="383"/>
     481        <Filename Value="..\..\UCoolDockCustomize.pas"/>
     482        <Caret Line="51" Column="1" TopLine="31"/>
    449483      </Position18>
    450484      <Position19>
    451         <Filename Value="E:\Projekty2\FreePascalManager\trunk\Instance\1\Lazarus\lcl\include\control.inc"/>
    452         <Caret Line="1741" Column="1" TopLine="1728"/>
     485        <Filename Value="..\..\UCoolDockCustomize.pas"/>
     486        <Caret Line="79" Column="30" TopLine="66"/>
    453487      </Position19>
    454488      <Position20>
    455         <Filename Value="E:\Projekty2\FreePascalManager\trunk\Instance\1\Lazarus\lcl\include\toolbutton.inc"/>
    456         <Caret Line="136" Column="1" TopLine="123"/>
     489        <Filename Value="UMainForm.pas"/>
     490        <Caret Line="2" Column="54" TopLine="1"/>
    457491      </Position20>
    458492      <Position21>
    459         <Filename Value="E:\Projekty2\FreePascalManager\trunk\Instance\1\Lazarus\lcl\include\toolbutton.inc"/>
    460         <Caret Line="764" Column="1" TopLine="751"/>
     493        <Filename Value="..\..\UCoolDockCustomize.pas"/>
     494        <Caret Line="71" Column="3" TopLine="66"/>
    461495      </Position21>
    462496      <Position22>
    463         <Filename Value="E:\Projekty2\FreePascalManager\trunk\Instance\1\Lazarus\lcl\include\control.inc"/>
    464         <Caret Line="2285" Column="1" TopLine="2272"/>
     497        <Filename Value="..\..\UCoolDockCustomize.pas"/>
     498        <Caret Line="81" Column="24" TopLine="74"/>
    465499      </Position22>
    466500      <Position23>
    467         <Filename Value="..\..\UCoolDockLayout.pas"/>
    468         <Caret Line="399" Column="1" TopLine="383"/>
     501        <Filename Value="..\..\UCoolDockCustomize.pas"/>
     502        <Caret Line="44" Column="27" TopLine="31"/>
    469503      </Position23>
    470504      <Position24>
    471505        <Filename Value="..\..\UCoolDockLayout.pas"/>
    472         <Caret Line="397" Column="1" TopLine="383"/>
     506        <Caret Line="54" Column="55" TopLine="41"/>
    473507      </Position24>
    474508      <Position25>
    475509        <Filename Value="..\..\UCoolDockLayout.pas"/>
    476         <Caret Line="398" Column="1" TopLine="383"/>
     510        <Caret Line="178" Column="14" TopLine="176"/>
    477511      </Position25>
    478512      <Position26>
    479         <Filename Value="..\..\UCoolDockLayout.pas"/>
    480         <Caret Line="399" Column="1" TopLine="383"/>
     513        <Filename Value="..\..\UCoolDockCustomize.pas"/>
     514        <Caret Line="44" Column="27" TopLine="72"/>
    481515      </Position26>
    482516      <Position27>
    483         <Filename Value="..\..\UCoolDockLayout.pas"/>
    484         <Caret Line="400" Column="1" TopLine="383"/>
     517        <Filename Value="..\..\UCoolDockCustomize.pas"/>
     518        <Caret Line="81" Column="1" TopLine="72"/>
    485519      </Position27>
    486520      <Position28>
    487521        <Filename Value="..\..\UCoolDockLayout.pas"/>
    488         <Caret Line="401" Column="1" TopLine="383"/>
     522        <Caret Line="179" Column="1" TopLine="166"/>
    489523      </Position28>
    490524      <Position29>
    491525        <Filename Value="..\..\UCoolDockLayout.pas"/>
    492         <Caret Line="402" Column="1" TopLine="383"/>
     526        <Caret Line="180" Column="1" TopLine="166"/>
    493527      </Position29>
    494528      <Position30>
    495529        <Filename Value="..\..\UCoolDockLayout.pas"/>
    496         <Caret Line="404" Column="1" TopLine="383"/>
     530        <Caret Line="181" Column="1" TopLine="166"/>
    497531      </Position30>
    498532    </JumpHistory>
     
    520554  </CompilerOptions>
    521555  <Debugging>
     556    <BreakPoints Count="1">
     557      <Item1>
     558        <Source Value="..\..\UCoolDockCustomize.pas"/>
     559        <Line Value="81"/>
     560      </Item1>
     561    </BreakPoints>
    522562    <Exceptions Count="3">
    523563      <Item1>
  • Docking/CoolDocking/Demo/IDE/UMainForm.lfm

    r179 r180  
    11object MainForm: TMainForm
    2   Left = 266
     2  Left = 263
    33  Height = 445
    44  Top = 130
     
    3232      TabOrder = 0
    3333      object ComboBox1: TComboBox
    34         Left = 1
     34        Left = 44
    3535        Height = 21
    3636        Top = 2
    3737        Width = 100
     38        Align = alLeft
    3839        ItemHeight = 13
    3940        OnSelect = ComboBox1Select
     
    4142      end
    4243      object ToolButton1: TToolButton
    43         Left = 101
     44        Left = 144
    4445        Top = 2
    4546        Action = ADesktopSave
     47      end
     48      object Label1: TLabel
     49        Left = 1
     50        Height = 24
     51        Top = 2
     52        Width = 43
     53        Align = alLeft
     54        Caption = 'Layouts:'
     55        Layout = tlCenter
     56        ParentColor = False
    4657      end
    4758    end
     
    7687        Action = AViewObjectInspector
    7788      end
    78       object MenuItem13: TMenuItem
    79         Action = AViewWindowList
    80       end
    8189      object MenuItem14: TMenuItem
    8290        Action = AViewStructure
     
    110118      Caption = 'Run'
    111119    end
     120    object MenuItem25: TMenuItem
     121      Caption = 'Docking'
     122      object MenuItem26: TMenuItem
     123        Action = ACustomizeDocking
     124      end
     125      object MenuItem27: TMenuItem
     126        Action = AViewWindowList
     127      end
     128      object MenuItem13: TMenuItem
     129        Action = ADesktopSave
     130      end
     131    end
    112132    object MenuItem11: TMenuItem
    113133      Caption = 'Tools'
    114       object MenuItem22: TMenuItem
    115         Action = ACustomizeDocking
    116       end
    117134    end
    118135    object MenuItem10: TMenuItem
     
    258275  object CoolDockCustomize1: TCoolDockCustomize
    259276    Master = CoolDockMaster1
     277    LayoutList = CoolDockLayoutList1
    260278    left = 284
    261279    top = 179
  • Docking/CoolDocking/Demo/IDE/UMainForm.pas

    r179 r180  
    1010  UToolPaletteForm, UObjectInspectorForm, UProjectManagerForm, UStructureForm,
    1111  UMessagesForm, UCallStackForm, ULocalVariablesForm, UToDoListForm,
    12   UWatchListForm, UThreadStatusForm, USourceEditorForm;
     12  UWatchListForm, UThreadStatusForm, USourceEditorForm, UCoolDockWindowList;
    1313
    1414const
     
    4343    CoolDockWindowList1: TCoolDockWindowList;
    4444    ImageList1: TImageList;
     45    Label1: TLabel;
    4546    MenuItem11: TMenuItem;
    4647    MenuItem10: TMenuItem;
     
    5556    MenuItem20: TMenuItem;
    5657    MenuItem21: TMenuItem;
    57     MenuItem22: TMenuItem;
    5858    MenuItem23: TMenuItem;
    5959    MenuItem24: TMenuItem;
     60    MenuItem25: TMenuItem;
     61    MenuItem26: TMenuItem;
     62    MenuItem27: TMenuItem;
    6063    MenuItem9: TMenuItem;
    6164    MenuItem8: TMenuItem;
     
    194197begin
    195198  CoolDockCustomize1.Execute;
     199  CoolDockLayoutList1.PopulateStringList(ComboBox1.Items);
    196200end;
    197201
  • Docking/CoolDocking/UCoolDockCustomize.lfm

    r96 r180  
    11object CoolDockCustomizeForm: TCoolDockCustomizeForm
    2   Left = 338
    32  Left = 431
    4   Height = 323
    5   Top = 96
     3  Height = 321
    64  Top = 139
    7   Width = 407
     5  Width = 397
    86  Caption = 'Customize docking'
    9   ClientHeight = 323
    10   ClientWidth = 407
     7  ClientHeight = 321
     8  ClientWidth = 397
     9  FormStyle = fsStayOnTop
    1110  OnShow = FormShow
    12   LCLVersion = '0.9.29'
     11  LCLVersion = '0.9.31'
    1312  object PageControl1: TPageControl
    1413    Left = 8
    15     Height = 278
     14    Height = 276
    1615    Top = 8
    17     Width = 393
    18     ActivePage = TabSheetSetting
     16    Width = 383
     17    ActivePage = TabSheetLayouts
    1918    Anchors = [akTop, akLeft, akRight, akBottom]
    20     TabIndex = 0
     19    TabIndex = 1
    2120    TabOrder = 0
    2221    object TabSheetSetting: TTabSheet
     
    9998    object TabSheetLayouts: TTabSheet
    10099      Caption = 'Layouts'
    101       ClientHeight = 252
    102       ClientWidth = 385
     100      ClientHeight = 250
     101      ClientWidth = 375
    103102      object ListBox1: TListBox
    104103        Left = 10
    105         Height = 231
     104        Height = 229
    106105        Top = 11
    107         Width = 180
    108         Anchors = [akTop, akLeft, akBottom]
     106        Width = 258
     107        Anchors = [akTop, akLeft, akRight, akBottom]
    109108        ItemHeight = 0
     109        OnSelectionChange = ListBox1SelectionChange
    110110        TabOrder = 0
     111      end
     112      object ButtonLayoutNew: TButton
     113        Left = 282
     114        Height = 25
     115        Top = 10
     116        Width = 75
     117        Anchors = [akTop, akRight]
     118        Caption = 'New...'
     119        OnClick = ButtonLayoutNewClick
     120        TabOrder = 1
     121      end
     122      object ButtonLayoutSave: TButton
     123        Left = 282
     124        Height = 25
     125        Top = 50
     126        Width = 75
     127        Anchors = [akTop, akRight]
     128        Caption = 'Save'
     129        Enabled = False
     130        TabOrder = 2
     131      end
     132      object ButtonLayoutRename: TButton
     133        Left = 282
     134        Height = 25
     135        Top = 90
     136        Width = 75
     137        Anchors = [akTop, akRight]
     138        Caption = 'Rename'
     139        Enabled = False
     140        OnClick = ButtonLayoutRenameClick
     141        TabOrder = 3
     142      end
     143      object ButtonLayoutDelete: TButton
     144        Left = 282
     145        Height = 25
     146        Top = 130
     147        Width = 75
     148        Anchors = [akTop, akRight]
     149        Caption = 'Delete'
     150        Enabled = False
     151        OnClick = ButtonLayoutDeleteClick
     152        TabOrder = 4
     153      end
     154      object ButtonLayoutApply: TButton
     155        Left = 282
     156        Height = 25
     157        Top = 170
     158        Width = 75
     159        Anchors = [akTop, akRight]
     160        Caption = 'Restore'
     161        Enabled = False
     162        OnClick = ButtonLayoutApplyClick
     163        TabOrder = 5
    111164      end
    112165    end
    113166  end
    114167  object ButtonClose: TButton
    115     Left = 324
     168    Left = 314
    116169    Height = 22
    117     Top = 294
     170    Top = 292
    118171    Width = 75
    119172    Anchors = [akRight, akBottom]
  • Docking/CoolDocking/UCoolDockCustomize.lrs

    r97 r180  
    33LazarusResources.Add('TCoolDockCustomizeForm','FORMDATA',[
    44  'TPF0'#22'TCoolDockCustomizeForm'#21'CoolDockCustomizeForm'#4'Left'#3#175#1#6
    5   +'Height'#3'C'#1#3'Top'#3#139#0#5'Width'#3#151#1#7'Caption'#6#17'Customize do'
    6   +'cking'#12'ClientHeight'#3'C'#1#11'ClientWidth'#3#151#1#6'OnShow'#7#8'FormSh'
    7   +'ow'#10'LCLVersion'#6#6'0.9.29'#0#12'TPageControl'#12'PageControl1'#4'Left'#2
    8   +#8#6'Height'#3#22#1#3'Top'#2#8#5'Width'#3#137#1#10'ActivePage'#7#15'TabSheet'
    9   +'Setting'#7'Anchors'#11#5'akTop'#6'akLeft'#7'akRight'#8'akBottom'#0#8'TabInd'
    10   +'ex'#2#0#8'TabOrder'#2#0#0#9'TTabSheet'#15'TabSheetSetting'#7'Caption'#6#7'O'
    11   +'ptions'#12'ClientHeight'#3#252#0#11'ClientWidth'#3#129#1#0#6'TLabel'#6'Labe'
    12   +'l1'#4'Left'#2#7#6'Height'#2#14#3'Top'#2#13#5'Width'#2'h'#7'Caption'#6#22'De'
    13   +'fault tabs position:'#11'ParentColor'#8#0#0#9'TComboBox'#9'ComboBox1'#4'Lef'
    14   +'t'#3#164#0#6'Height'#2#21#3'Top'#2#10#5'Width'#2'd'#10'ItemHeight'#2#13#13
    15   +'Items.Strings'#1#6#4'Auto'#6#4'Left'#6#3'Top'#6#5'Right'#6#6'Bottom'#0#5'St'
    16   +'yle'#7#14'csDropDownList'#8'TabOrder'#2#0#0#0#6'TLabel'#6'Label2'#4'Left'#2
    17   +#7#6'Height'#2#14#3'Top'#2')'#5'Width'#2'u'#7'Caption'#6#24'Default header p'
    18   +'osition:'#11'ParentColor'#8#0#0#9'TComboBox'#9'ComboBox2'#4'Left'#3#164#0#6
    19   +'Height'#2#21#3'Top'#2'&'#5'Width'#2'd'#10'ItemHeight'#2#13#13'Items.Strings'
    20   +#1#6#4'Auto'#6#4'Left'#6#3'Top'#6#5'Right'#6#6'Bottom'#0#5'Style'#7#14'csDro'
    21   +'pDownList'#8'TabOrder'#2#1#0#0#6'TLabel'#6'Label3'#4'Left'#2#7#6'Height'#2
    22   +#14#3'Top'#2'C'#5'Width'#2'e'#7'Caption'#6#20'Hide/unhide duration'#11'Paren'
    23   +'tColor'#8#0#0#9'TSpinEdit'#9'SpinEdit1'#4'Left'#3#164#0#6'Height'#2#21#3'To'
    24   +'p'#2'@'#5'Width'#2'd'#8'MaxValue'#3#16''''#8'TabOrder'#2#2#0#0#6'TLabel'#6
    25   +'Label4'#4'Left'#3#14#1#6'Height'#2#14#3'Top'#2'C'#5'Width'#2#14#7'Caption'#6
    26   +#2'ms'#11'ParentColor'#8#0#0#0#9'TTabSheet'#15'TabSheetLayouts'#7'Caption'#6
    27   +#7'Layouts'#12'ClientHeight'#3#252#0#11'ClientWidth'#3#129#1#0#8'TListBox'#8
    28   +'ListBox1'#4'Left'#2#10#6'Height'#3#231#0#3'Top'#2#11#5'Width'#3#180#0#7'Anc'
    29   +'hors'#11#5'akTop'#6'akLeft'#8'akBottom'#0#10'ItemHeight'#2#0#8'TabOrder'#2#0
    30   +#0#0#0#0#7'TButton'#11'ButtonClose'#4'Left'#3'D'#1#6'Height'#2#22#3'Top'#3'&'
    31   +#1#5'Width'#2'K'#7'Anchors'#11#7'akRight'#8'akBottom'#0#7'Caption'#6#5'Close'
    32   +#7'OnClick'#7#16'ButtonCloseClick'#8'TabOrder'#2#1#0#0#0
     5  +'Height'#3'A'#1#3'Top'#3#139#0#5'Width'#3#141#1#7'Caption'#6#17'Customize do'
     6  +'cking'#12'ClientHeight'#3'A'#1#11'ClientWidth'#3#141#1#9'FormStyle'#7#11'fs'
     7  +'StayOnTop'#6'OnShow'#7#8'FormShow'#10'LCLVersion'#6#6'0.9.31'#0#12'TPageCon'
     8  +'trol'#12'PageControl1'#4'Left'#2#8#6'Height'#3#20#1#3'Top'#2#8#5'Width'#3
     9  +#127#1#10'ActivePage'#7#15'TabSheetLayouts'#7'Anchors'#11#5'akTop'#6'akLeft'
     10  +#7'akRight'#8'akBottom'#0#8'TabIndex'#2#1#8'TabOrder'#2#0#0#9'TTabSheet'#15
     11  +'TabSheetSetting'#7'Caption'#6#7'Options'#12'ClientHeight'#3#252#0#11'Client'
     12  +'Width'#3#129#1#0#6'TLabel'#6'Label1'#4'Left'#2#7#6'Height'#2#14#3'Top'#2#13
     13  +#5'Width'#2'h'#7'Caption'#6#22'Default tabs position:'#11'ParentColor'#8#0#0
     14  +#9'TComboBox'#9'ComboBox1'#4'Left'#3#164#0#6'Height'#2#21#3'Top'#2#10#5'Widt'
     15  +'h'#2'd'#10'ItemHeight'#2#13#13'Items.Strings'#1#6#4'Auto'#6#4'Left'#6#3'Top'
     16  +#6#5'Right'#6#6'Bottom'#0#5'Style'#7#14'csDropDownList'#8'TabOrder'#2#0#0#0#6
     17  +'TLabel'#6'Label2'#4'Left'#2#7#6'Height'#2#14#3'Top'#2')'#5'Width'#2'u'#7'Ca'
     18  +'ption'#6#24'Default header position:'#11'ParentColor'#8#0#0#9'TComboBox'#9
     19  +'ComboBox2'#4'Left'#3#164#0#6'Height'#2#21#3'Top'#2'&'#5'Width'#2'd'#10'Item'
     20  +'Height'#2#13#13'Items.Strings'#1#6#4'Auto'#6#4'Left'#6#3'Top'#6#5'Right'#6#6
     21  +'Bottom'#0#5'Style'#7#14'csDropDownList'#8'TabOrder'#2#1#0#0#6'TLabel'#6'Lab'
     22  +'el3'#4'Left'#2#7#6'Height'#2#14#3'Top'#2'C'#5'Width'#2'e'#7'Caption'#6#20'H'
     23  +'ide/unhide duration'#11'ParentColor'#8#0#0#9'TSpinEdit'#9'SpinEdit1'#4'Left'
     24  +#3#164#0#6'Height'#2#21#3'Top'#2'@'#5'Width'#2'd'#8'MaxValue'#3#16''''#8'Tab'
     25  +'Order'#2#2#0#0#6'TLabel'#6'Label4'#4'Left'#3#14#1#6'Height'#2#14#3'Top'#2'C'
     26  +#5'Width'#2#14#7'Caption'#6#2'ms'#11'ParentColor'#8#0#0#0#9'TTabSheet'#15'Ta'
     27  +'bSheetLayouts'#7'Caption'#6#7'Layouts'#12'ClientHeight'#3#250#0#11'ClientWi'
     28  +'dth'#3'w'#1#0#8'TListBox'#8'ListBox1'#4'Left'#2#10#6'Height'#3#229#0#3'Top'
     29  +#2#11#5'Width'#3#2#1#7'Anchors'#11#5'akTop'#6'akLeft'#7'akRight'#8'akBottom'
     30  +#0#10'ItemHeight'#2#0#17'OnSelectionChange'#7#23'ListBox1SelectionChange'#8
     31  +'TabOrder'#2#0#0#0#7'TButton'#15'ButtonLayoutNew'#4'Left'#3#26#1#6'Height'#2
     32  +#25#3'Top'#2#10#5'Width'#2'K'#7'Anchors'#11#5'akTop'#7'akRight'#0#7'Caption'
     33  +#6#6'New...'#7'OnClick'#7#20'ButtonLayoutNewClick'#8'TabOrder'#2#1#0#0#7'TBu'
     34  +'tton'#16'ButtonLayoutSave'#4'Left'#3#26#1#6'Height'#2#25#3'Top'#2'2'#5'Widt'
     35  +'h'#2'K'#7'Anchors'#11#5'akTop'#7'akRight'#0#7'Caption'#6#4'Save'#7'Enabled'
     36  +#8#8'TabOrder'#2#2#0#0#7'TButton'#18'ButtonLayoutRename'#4'Left'#3#26#1#6'He'
     37  +'ight'#2#25#3'Top'#2'Z'#5'Width'#2'K'#7'Anchors'#11#5'akTop'#7'akRight'#0#7
     38  +'Caption'#6#6'Rename'#7'Enabled'#8#7'OnClick'#7#23'ButtonLayoutRenameClick'#8
     39  +'TabOrder'#2#3#0#0#7'TButton'#18'ButtonLayoutDelete'#4'Left'#3#26#1#6'Height'
     40  +#2#25#3'Top'#3#130#0#5'Width'#2'K'#7'Anchors'#11#5'akTop'#7'akRight'#0#7'Cap'
     41  +'tion'#6#6'Delete'#7'Enabled'#8#7'OnClick'#7#23'ButtonLayoutDeleteClick'#8'T'
     42  +'abOrder'#2#4#0#0#7'TButton'#17'ButtonLayoutApply'#4'Left'#3#26#1#6'Height'#2
     43  +#25#3'Top'#3#170#0#5'Width'#2'K'#7'Anchors'#11#5'akTop'#7'akRight'#0#7'Capti'
     44  +'on'#6#7'Restore'#7'Enabled'#8#7'OnClick'#7#22'ButtonLayoutApplyClick'#8'Tab'
     45  +'Order'#2#5#0#0#0#0#7'TButton'#11'ButtonClose'#4'Left'#3':'#1#6'Height'#2#22
     46  +#3'Top'#3'$'#1#5'Width'#2'K'#7'Anchors'#11#7'akRight'#8'akBottom'#0#7'Captio'
     47  +'n'#6#5'Close'#7'OnClick'#7#16'ButtonCloseClick'#8'TabOrder'#2#1#0#0#0
    3348]);
  • Docking/CoolDocking/UCoolDockCustomize.lrt

    r89 r180  
    1 TCOOLDOCKCUSTOMIZEFORM.COOLDOCKCUSTOMIZEFORM.CAPTION=Customize docking
     1TCOOLDOCKCUSTOMIZEFORM.CAPTION=Customize docking
    22TCOOLDOCKCUSTOMIZEFORM.TABSHEETSETTING.CAPTION=Options
    33TCOOLDOCKCUSTOMIZEFORM.LABEL1.CAPTION=Default tabs position:
     
    66TCOOLDOCKCUSTOMIZEFORM.LABEL4.CAPTION=ms
    77TCOOLDOCKCUSTOMIZEFORM.TABSHEETLAYOUTS.CAPTION=Layouts
     8TCOOLDOCKCUSTOMIZEFORM.BUTTONLAYOUTNEW.CAPTION=New...
     9TCOOLDOCKCUSTOMIZEFORM.BUTTONLAYOUTSAVE.CAPTION=Save
     10TCOOLDOCKCUSTOMIZEFORM.BUTTONLAYOUTRENAME.CAPTION=Rename
     11TCOOLDOCKCUSTOMIZEFORM.BUTTONLAYOUTDELETE.CAPTION=Delete
     12TCOOLDOCKCUSTOMIZEFORM.BUTTONLAYOUTAPPLY.CAPTION=Restore
    813TCOOLDOCKCUSTOMIZEFORM.BUTTONCLOSE.CAPTION=Close
  • Docking/CoolDocking/UCoolDockCustomize.pas

    r97 r180  
    77uses
    88  Classes, SysUtils, FileUtil, LResources, Forms, Controls, Graphics, Dialogs,
    9   ComCtrls, StdCtrls, Spin;
     9  ComCtrls, StdCtrls, Spin, UCoolDockLayout;
    1010
    1111type
     
    1414
    1515  TCoolDockCustomizeForm = class(TForm)
     16  published
     17    ButtonLayoutDelete: TButton;
     18    ButtonLayoutApply: TButton;
     19    ButtonLayoutRename: TButton;
     20    ButtonLayoutNew: TButton;
     21    ButtonLayoutSave: TButton;
    1622    ButtonClose: TButton;
    1723    ComboBox1: TComboBox;
     
    2733    TabSheetLayouts: TTabSheet;
    2834    procedure ButtonCloseClick(Sender: TObject);
     35    procedure ButtonLayoutApplyClick(Sender: TObject);
     36    procedure ButtonLayoutDeleteClick(Sender: TObject);
     37    procedure ButtonLayoutNewClick(Sender: TObject);
     38    procedure ButtonLayoutRenameClick(Sender: TObject);
    2939    procedure FormShow(Sender: TObject);
     40    procedure ListBox1SelectionChange(Sender: TObject; User: boolean);
    3041  private
    3142    { private declarations }
    3243  public
     44    LayoutList: TCoolDockLayoutList;
    3345  end;
    3446
    3547implementation
    3648
     49resourcestring
     50  SNewLayout = 'New Layout';
     51  SEnterNewName = 'Enter new name';
    3752
    3853{ TCoolDockCustomizeForm }
     
    4358end;
    4459
     60procedure TCoolDockCustomizeForm.ButtonLayoutApplyClick(Sender: TObject);
     61begin
     62  if ListBox1.ItemIndex <> - 1 then
     63    TCoolDockLayout(LayoutList.Items[ListBox1.ItemIndex]).Restore;
     64end;
     65
     66procedure TCoolDockCustomizeForm.ButtonLayoutDeleteClick(Sender: TObject);
     67begin
     68  if ListBox1.ItemIndex <> - 1 then begin
     69    LayoutList.Items.Delete(ListBox1.ItemIndex);
     70    LayoutList.PopulateStringList(ListBox1.Items);
     71  end;
     72end;
     73
     74procedure TCoolDockCustomizeForm.ButtonLayoutNewClick(Sender: TObject);
     75var
     76  NewLayout: TCoolDockLayout;
     77  NewName: string;
     78begin
     79  NewName := SNewLayout;
     80  if InputQuery(SNewLayout, SEnterNewName, NewName) then
     81  if not Assigned(LayoutList.FindByName(NewName)) then begin
     82    NewLayout := TCoolDockLayout.Create;
     83    NewLayout.Name := NewName;
     84    NewLayout.Store;
     85    LayoutList.Items.Add(NewLayout);
     86    LayoutList.PopulateStringList(ListBox1.Items);
     87  end;
     88end;
     89
     90procedure TCoolDockCustomizeForm.ButtonLayoutRenameClick(Sender: TObject);
     91var
     92  NewName: string;
     93begin
     94  NewName := TCoolDockLayout(LayoutList.Items[ListBox1.ItemIndex]).Name;
     95  if InputQuery(SNewLayout, SEnterNewName, NewName) then begin
     96    TCoolDockLayout(LayoutList.Items[ListBox1.ItemIndex]).Name := NewName;
     97    LayoutList.PopulateStringList(ListBox1.Items);
     98  end;
     99end;
     100
    45101procedure TCoolDockCustomizeForm.FormShow(Sender: TObject);
    46102begin
     103  if Assigned(LayoutList) then begin
     104    LayoutList.PopulateStringList(ListBox1.Items);
     105  end;
     106end;
    47107
     108procedure TCoolDockCustomizeForm.ListBox1SelectionChange(Sender: TObject;
     109  User: boolean);
     110begin
     111  ButtonLayoutRename.Enabled := ListBox1.ItemIndex <> -1;
     112  ButtonLayoutDelete.Enabled := ListBox1.ItemIndex <> -1;
     113  ButtonLayoutApply.Enabled := ListBox1.ItemIndex <> -1;
     114  ButtonLayoutSave.Enabled := ListBox1.ItemIndex <> -1;
    48115end;
    49116
  • Docking/CoolDocking/UCoolDockLayout.pas

    r179 r180  
    11unit UCoolDockLayout;
    22
    3 {$mode objfpc}{$H+}
     3{$mode Delphi}{$H+}
    44
    55interface
    66
    77uses
    8   Classes, SysUtils, FileUtil, Contnrs, URectangle, UCoolDocking, Forms,
     8  Classes, SysUtils, FileUtil, Contnrs, URectangle, Forms, UCoolDockCommon,
    99  DOM, XMLWrite, XMLRead;
    1010
     
    5252    procedure SaveToFile(FileName: string);
    5353    procedure PopulateStringList(List: TStrings);
     54    function FindByName(Name: string): TCoolDockLayout;
    5455    constructor Create(AOwner: TComponent); override;
    5556    destructor Destroy; override;
     
    171172  for I := 0 to Items.Count - 1 do
    172173    List.AddObject(TCoolDockLayout(Items[I]).Name, TCoolDockLayout(Items[I]));
     174end;
     175
     176function TCoolDockLayoutList.FindByName(Name: string): TCoolDockLayout;
     177var
     178  I: Integer;
     179begin
     180  I := 0;
     181  while (I < Items.Count) and (TCoolDockLayout(Items[I]).Name <> Name) do Inc(I);
     182  if I < Items.Count then Result := TCoolDockLayout(Items[I]) else Result := nil;
    173183end;
    174184
  • Docking/CoolDocking/UCoolDockPopupMenu.pas

    r177 r180  
    77uses
    88  Classes, SysUtils, Menus, Forms, Controls, Dialogs, UCoolDockClientPanel,
    9   ExtCtrls, ComCtrls;
     9  ExtCtrls, ComCtrls, UCoolDockCommon;
    1010
    1111type
  • Docking/CoolDocking/UCoolDockWindowList.pas

    r176 r180  
    77uses
    88  Classes, SysUtils, FileUtil, LResources, Forms, Controls, Graphics, Dialogs,
    9   ComCtrls, StdCtrls, Menus;
     9  ComCtrls, StdCtrls, Menus, UCoolDockLayout;
    1010
    1111type
     
    3434  end;
    3535
    36 var
    37   CoolDockWindowListForm: TCoolDockWindowListForm;
     36  TCoolDockWindowList = class(TComponent)
     37  private
     38    FLayoutList: TCoolDockLayoutList;
     39    Form: TCoolDockWindowListForm;
     40    procedure SetLayoutList(const AValue: TCoolDockLayoutList);
     41  public
     42    function Execute: Boolean;
     43    constructor Create(AOwner: TComponent); override;
     44  published
     45  end;
     46
     47procedure Register;
    3848
    3949implementation
     
    4454  SStateVisible = 'Visible';
    4555  SStateHidden = 'Hidden';
     56
     57procedure Register;
     58begin
     59  RegisterComponents('CoolDocking', [TCoolDockWindowList]);
     60end;
     61
     62{ TCoolDockWindowList }
     63
     64function TCoolDockWindowList.Execute: Boolean;
     65begin
     66  Form := TCoolDockWindowListForm.Create(Self);
     67  Form.ShowModal;
     68  Form.Free;
     69  Result := True;
     70end;
     71
     72constructor TCoolDockWindowList.Create(AOwner: TComponent);
     73begin
     74  inherited Create(AOwner);
     75end;
     76
     77procedure TCoolDockWindowList.SetLayoutList(const AValue: TCoolDockLayoutList);
     78begin
     79  if FLayoutList = AValue then Exit;
     80  FLayoutList := AValue;
     81end;
    4682
    4783{ TCoolDockWindowListForm }
  • Docking/CoolDocking/UCoolDocking.pas

    r177 r180  
    1010  Classes, SysUtils, Controls, LCLType, LMessages, Graphics, StdCtrls,
    1111  Buttons, ExtCtrls, Contnrs, Forms, ComCtrls, Dialogs, Menus, FileUtil,
    12   UCoolDockCustomize, DOM, XMLWrite, XMLRead, UCoolDockWindowList,
     12  UCoolDockCustomize, DOM, XMLWrite, XMLRead, UCoolDockCommon,
    1313  DateUtils, UCoolDockStyleTabs, UCoolDockStyleRegions, UCoolDockStylePopupTabs,
    1414  UCoolDockStylePopupRegions, UCoolDockStyle, UCoolDockClientPanel,
    15   UCoolDockPopupMenu;
     15  UCoolDockPopupMenu, UCoolDockLayout;
    1616
    1717const
     
    3838    procedure PanelVisibleChange(Sender: TObject);
    3939  end;
    40 
    41   TDockStyle = (dsList, dsTabs, dsPopupTabs, dsPopupList);
    4240
    4341  // TObjectList<TCoolDockClientPanel>
     
    174172  TCoolDockCustomize = class(TComponent)
    175173  private
     174    FLayoutList: TCoolDockLayoutList;
    176175    FMaster: TCoolDockMaster;
    177176    Form: TCoolDockCustomizeForm;
     177    procedure SetLayoutList(const AValue: TCoolDockLayoutList);
    178178    procedure SetMaster(const AValue: TCoolDockMaster);
    179179  public
     
    183183  published
    184184    property Master: TCoolDockMaster read FMaster write SetMaster;
    185   end;
    186 
    187   { TCoolDockWindowList }
    188 
    189   TCoolDockWindowList = class(TComponent)
    190   private
    191     Form: TCoolDockWindowListForm;
    192   public
    193     function Execute: Boolean;
    194     constructor Create(AOwner: TComponent); override;
    195   published
     185    property LayoutList: TCoolDockLayoutList read FLayoutList write SetLayoutList;
    196186  end;
    197187
     
    208198  RegisterComponents('CoolDocking', [TCoolDockClient]);
    209199  RegisterComponents('CoolDocking', [TCoolDockCustomize]);
    210   RegisterComponents('CoolDocking', [TCoolDockWindowList]);
    211200end;
    212201
     
    801790end;
    802791
     792procedure TCoolDockCustomize.SetLayoutList(const AValue: TCoolDockLayoutList);
     793begin
     794  if FLayoutList=AValue then exit;
     795  FLayoutList:=AValue;
     796end;
     797
    803798function TCoolDockCustomize.Execute: Boolean;
    804799begin
     
    808803    Form.ComboBox1.ItemIndex := Integer(Master.DefaultTabsPos);
    809804    Form.ComboBox2.ItemIndex := Integer(Master.DefaultHeaderPos);
     805    Form.LayoutList := FLayoutList;
    810806  end;
    811807  Form.ShowModal;
     
    830826end;
    831827
    832 
    833 { TCoolDockWindowList }
    834 
    835 function TCoolDockWindowList.Execute: Boolean;
    836 begin
    837   Form := TCoolDockWindowListForm.Create(Self);
    838   Form.ShowModal;
    839   Form.Free;
    840   Result := True;
    841 end;
    842 
    843 constructor TCoolDockWindowList.Create(AOwner: TComponent);
    844 begin
    845   inherited Create(AOwner);
    846 end;
    847828
    848829{ TCoolDockClient }
Note: See TracChangeset for help on using the changeset viewer.