Changeset 355 for Docking/CoolDocking


Ignore:
Timestamp:
Apr 27, 2012, 8:34:10 AM (13 years ago)
Author:
chronos
Message:
  • Modified: Change concept of dock manager items logical visibility vs TControl real visibility. Not visible controls are hidden by manager using TCDManager.DockSiteVisible property. TCDManager provide events OnDockSiteHide and OnDockSiteShow for handling logical visibility.
Location:
Docking/CoolDocking
Files:
11 edited

Legend:

Unmodified
Added
Removed
  • Docking/CoolDocking/CoolDocking.lpk

    r335 r355  
    3030    <Description Value="Set of components for forms docking for Lazarus."/>
    3131    <License Value="GNU/GPL"/>
    32     <Version Minor="6"/>
     32    <Version Minor="7"/>
    3333    <Files Count="15">
    3434      <Item1>
     
    5151      </Item4>
    5252      <Item5>
     53        <Filename Value="UCDManager.pas"/>
     54        <UnitName Value="UCDManager"/>
     55      </Item5>
     56      <Item6>
    5357        <Filename Value="Managers\UCDManagerTabs.pas"/>
    5458        <UnitName Value="UCDManagerTabs"/>
    55       </Item5>
    56       <Item6>
     59      </Item6>
     60      <Item7>
    5761        <Filename Value="Managers\UCDManagerRegions.pas"/>
    5862        <UnitName Value="UCDManagerRegions"/>
    59       </Item6>
    60       <Item7>
     63      </Item7>
     64      <Item8>
    6165        <Filename Value="Managers\UCDManagerTabsPopup.pas"/>
    6266        <UnitName Value="UCDManagerTabsPopup"/>
    63       </Item7>
    64       <Item8>
     67      </Item8>
     68      <Item9>
    6569        <Filename Value="Managers\UCDManagerRegionsPopup.pas"/>
    6670        <UnitName Value="UCDManagerRegionsPopup"/>
    67       </Item8>
    68       <Item9>
     71      </Item9>
     72      <Item10>
    6973        <Filename Value="UCDPopupMenu.pas"/>
    7074        <UnitName Value="UCDPopupMenu"/>
    71       </Item9>
    72       <Item10>
     75      </Item10>
     76      <Item11>
    7377        <Filename Value="UCDLayout.pas"/>
    7478        <HasRegisterProc Value="True"/>
    7579        <UnitName Value="UCDLayout"/>
    76       </Item10>
    77       <Item11>
     80      </Item11>
     81      <Item12>
    7882        <Filename Value="UCDCommon.pas"/>
    7983        <UnitName Value="UCDCommon"/>
    80       </Item11>
    81       <Item12>
    82         <Filename Value="UCDManager.pas"/>
    83         <UnitName Value="UCDManager"/>
    8484      </Item12>
    8585      <Item13>
     
    121121      <Version Value="2"/>
    122122    </PublishOptions>
     123    <CustomOptions Items="ExternHelp" Version="2">
     124      <_ExternHelp Items="Count"/>
     125    </CustomOptions>
    123126  </Package>
    124127</CONFIG>
  • Docking/CoolDocking/CoolDocking.pas

    r332 r355  
    88
    99uses
    10   UCDClient, UCDCustomize, UCDWindowList, UCDManagerTabs, UCDManagerRegions,
    11   UCDManagerTabsPopup, UCDManagerRegionsPopup, UCDPopupMenu, UCDLayout,
    12   UCDCommon, UCDManager, UCDConjoinForm, UCDMaster, UCDResource,
     10  UCDClient, UCDCustomize, UCDWindowList, UCDManager, UCDManagerTabs,
     11  UCDManagerRegions, UCDManagerTabsPopup, UCDManagerRegionsPopup,
     12  UCDPopupMenu, UCDLayout, UCDCommon, UCDConjoinForm, UCDMaster, UCDResource,
    1313  LazarusPackageIntf;
    1414
  • Docking/CoolDocking/Demo/Testing/Demo.lpi

    r354 r355  
    5656        <ResourceBaseClass Value="Form"/>
    5757        <UnitName Value="UMainForm"/>
     58        <IsVisibleTab Value="True"/>
    5859        <EditorIndex Value="3"/>
    5960        <WindowIndex Value="0"/>
    60         <TopLine Value="63"/>
    61         <CursorPos X="1" Y="75"/>
     61        <TopLine Value="103"/>
     62        <CursorPos X="1" Y="114"/>
    6263        <UsageCount Value="201"/>
    6364        <Loaded Value="True"/>
     
    134135        <WindowIndex Value="0"/>
    135136        <TopLine Value="1"/>
    136         <CursorPos X="12" Y="9"/>
     137        <CursorPos X="32" Y="7"/>
    137138        <UsageCount Value="200"/>
    138139        <Loaded Value="True"/>
     
    338339        <TopLine Value="1"/>
    339340        <CursorPos X="22" Y="17"/>
    340         <UsageCount Value="154"/>
     341        <UsageCount Value="155"/>
    341342        <Loaded Value="True"/>
    342343        <DefaultSyntaxHighlighter Value="Delphi"/>
     
    449450        <TopLine Value="1"/>
    450451        <CursorPos X="44" Y="45"/>
    451         <UsageCount Value="106"/>
     452        <UsageCount Value="107"/>
    452453        <Loaded Value="True"/>
    453454        <DefaultSyntaxHighlighter Value="Delphi"/>
     
    767768        <Filename Value="..\..\UCDConjoinForm.pas"/>
    768769        <UnitName Value="UCDConjoinForm"/>
    769         <EditorIndex Value="15"/>
     770        <EditorIndex Value="7"/>
    770771        <WindowIndex Value="0"/>
    771772        <TopLine Value="49"/>
     
    777778        <Filename Value="..\..\UCDCommon.pas"/>
    778779        <UnitName Value="UCDCommon"/>
    779         <EditorIndex Value="16"/>
     780        <EditorIndex Value="8"/>
    780781        <WindowIndex Value="0"/>
    781782        <TopLine Value="85"/>
     
    787788        <Filename Value="..\..\UCDManager.pas"/>
    788789        <UnitName Value="UCDManager"/>
    789         <EditorIndex Value="7"/>
    790         <WindowIndex Value="0"/>
    791         <TopLine Value="76"/>
    792         <CursorPos X="1" Y="92"/>
     790        <EditorIndex Value="4"/>
     791        <WindowIndex Value="0"/>
     792        <TopLine Value="354"/>
     793        <CursorPos X="1" Y="362"/>
    793794        <UsageCount Value="13"/>
    794795        <Loaded Value="True"/>
     
    805806        <Filename Value="..\..\Managers\UCDManagerTabs.pas"/>
    806807        <UnitName Value="UCDManagerTabs"/>
    807         <IsVisibleTab Value="True"/>
    808         <EditorIndex Value="11"/>
    809         <WindowIndex Value="0"/>
    810         <TopLine Value="394"/>
    811         <CursorPos X="7" Y="415"/>
     808        <EditorIndex Value="6"/>
     809        <WindowIndex Value="0"/>
     810        <TopLine Value="388"/>
     811        <CursorPos X="57" Y="396"/>
    812812        <UsageCount Value="13"/>
    813813        <Loaded Value="True"/>
     
    952952        <Filename Value="..\..\UCDMaster.pas"/>
    953953        <UnitName Value="UCDMaster"/>
    954         <EditorIndex Value="17"/>
     954        <EditorIndex Value="9"/>
    955955        <WindowIndex Value="0"/>
    956956        <TopLine Value="4"/>
     
    962962        <Filename Value="..\..\UCDClient.pas"/>
    963963        <UnitName Value="UCDClient"/>
    964         <EditorIndex Value="18"/>
     964        <EditorIndex Value="10"/>
    965965        <WindowIndex Value="0"/>
    966966        <TopLine Value="91"/>
     
    972972        <Filename Value="..\..\Managers\UCDManagerRegions.pas"/>
    973973        <UnitName Value="UCDManagerRegions"/>
    974         <EditorIndex Value="8"/>
    975         <WindowIndex Value="0"/>
    976         <TopLine Value="357"/>
    977         <CursorPos X="1" Y="362"/>
     974        <EditorIndex Value="5"/>
     975        <WindowIndex Value="0"/>
     976        <TopLine Value="301"/>
     977        <CursorPos X="1" Y="314"/>
    978978        <UsageCount Value="11"/>
    979979        <Loaded Value="True"/>
     
    982982        <Filename Value="H:\Lazarus\1.1_2.6.0\lcl\controls.pp"/>
    983983        <UnitName Value="Controls"/>
    984         <EditorIndex Value="6"/>
    985984        <WindowIndex Value="0"/>
    986985        <TopLine Value="533"/>
    987986        <CursorPos X="15" Y="537"/>
    988987        <UsageCount Value="11"/>
    989         <Loaded Value="True"/>
    990988      </Unit106>
    991989      <Unit107>
    992990        <Filename Value="H:\Lazarus\1.1_2.6.0\components\lazutils\lazmethodlist.pas"/>
    993991        <UnitName Value="LazMethodList"/>
    994         <EditorIndex Value="12"/>
    995         <WindowIndex Value="0"/>
    996         <TopLine Value="142"/>
    997         <CursorPos X="1" Y="164"/>
    998         <UsageCount Value="11"/>
    999         <Loaded Value="True"/>
     992        <WindowIndex Value="0"/>
     993        <TopLine Value="1"/>
     994        <CursorPos X="15" Y="160"/>
     995        <UsageCount Value="11"/>
    1000996      </Unit107>
    1001997      <Unit108>
    1002998        <Filename Value="H:\Lazarus\1.1_2.6.0\lcl\include\control.inc"/>
    1003         <EditorIndex Value="13"/>
    1004999        <WindowIndex Value="0"/>
    10051000        <TopLine Value="4254"/>
    10061001        <CursorPos X="1" Y="4272"/>
    10071002        <UsageCount Value="11"/>
    1008         <Loaded Value="True"/>
    10091003      </Unit108>
    10101004      <Unit109>
    10111005        <Filename Value="H:\Lazarus\1.1_2.6.0\lcl\include\customform.inc"/>
    1012         <EditorIndex Value="14"/>
    10131006        <WindowIndex Value="0"/>
    10141007        <TopLine Value="473"/>
    10151008        <CursorPos X="1" Y="489"/>
    10161009        <UsageCount Value="11"/>
    1017         <Loaded Value="True"/>
    10181010      </Unit109>
    10191011      <Unit110>
    10201012        <Filename Value="H:\Lazarus\1.1_2.6.0\fpc\2.6.0\source\rtl\objpas\classes\classesh.inc"/>
    1021         <EditorIndex Value="9"/>
    10221013        <WindowIndex Value="0"/>
    10231014        <TopLine Value="659"/>
    10241015        <CursorPos X="3" Y="660"/>
    10251016        <UsageCount Value="10"/>
    1026         <Loaded Value="True"/>
    10271017      </Unit110>
    10281018      <Unit111>
    10291019        <Filename Value="H:\Lazarus\1.1_2.6.0\fpc\2.6.0\source\rtl\objpas\classes\stringl.inc"/>
    1030         <EditorIndex Value="10"/>
    10311020        <WindowIndex Value="0"/>
    10321021        <TopLine Value="645"/>
    10331022        <CursorPos X="3" Y="648"/>
    10341023        <UsageCount Value="10"/>
    1035         <Loaded Value="True"/>
    10361024      </Unit111>
    10371025      <Unit112>
    10381026        <Filename Value="H:\Lazarus\1.1_2.6.0\lcl\comctrls.pp"/>
    10391027        <UnitName Value="ComCtrls"/>
    1040         <EditorIndex Value="4"/>
    10411028        <WindowIndex Value="0"/>
    10421029        <TopLine Value="1439"/>
    10431030        <CursorPos X="15" Y="1449"/>
    10441031        <UsageCount Value="10"/>
    1045         <Loaded Value="True"/>
    10461032      </Unit112>
    10471033      <Unit113>
    10481034        <Filename Value="H:\Lazarus\1.1_2.6.0\lcl\include\customlistview.inc"/>
    1049         <EditorIndex Value="5"/>
    10501035        <WindowIndex Value="0"/>
    10511036        <TopLine Value="1428"/>
    10521037        <CursorPos X="20" Y="1449"/>
    10531038        <UsageCount Value="10"/>
    1054         <Loaded Value="True"/>
    10551039      </Unit113>
    10561040    </Units>
    10571041    <JumpHistory Count="30" HistoryIndex="29">
    10581042      <Position1>
    1059         <Filename Value="..\..\UCDManager.pas"/>
    1060         <Caret Line="89" Column="3" TopLine="85"/>
     1043        <Filename Value="UMainForm.pas"/>
     1044        <Caret Line="135" Column="14" TopLine="114"/>
    10611045      </Position1>
    10621046      <Position2>
    1063         <Filename Value="..\..\UCDManager.pas"/>
    1064         <Caret Line="104" Column="25" TopLine="85"/>
     1047        <Filename Value="UMainForm.pas"/>
     1048        <Caret Line="134" Column="14" TopLine="113"/>
    10651049      </Position2>
    10661050      <Position3>
    1067         <Filename Value="..\..\UCDManager.pas"/>
    1068         <Caret Line="145" Column="47" TopLine="106"/>
     1051        <Filename Value="UMainForm.pas"/>
     1052        <Caret Line="140" Column="3" TopLine="124"/>
    10691053      </Position3>
    10701054      <Position4>
    10711055        <Filename Value="..\..\UCDManager.pas"/>
    1072         <Caret Line="595" Column="32" TopLine="574"/>
     1056        <Caret Line="362" Column="20" TopLine="354"/>
    10731057      </Position4>
    10741058      <Position5>
    1075         <Filename Value="..\..\Managers\UCDManagerRegions.pas"/>
    1076         <Caret Line="373" Column="3" TopLine="369"/>
     1059        <Filename Value="UMainForm.pas"/>
     1060        <Caret Line="116" Column="1" TopLine="103"/>
    10771061      </Position5>
    10781062      <Position6>
    1079         <Filename Value="..\..\Managers\UCDManagerRegions.pas"/>
    1080         <Caret Line="166" Column="29" TopLine="163"/>
     1063        <Filename Value="UMainForm.pas"/>
     1064        <Caret Line="118" Column="1" TopLine="103"/>
    10811065      </Position6>
    10821066      <Position7>
    1083         <Filename Value="..\..\Managers\UCDManagerRegions.pas"/>
    1084         <Caret Line="49" Column="15" TopLine="36"/>
     1067        <Filename Value="UMainForm.pas"/>
     1068        <Caret Line="110" Column="1" TopLine="103"/>
    10851069      </Position7>
    10861070      <Position8>
    1087         <Filename Value="..\..\UCDManager.pas"/>
    1088         <Caret Line="95" Column="1" TopLine="85"/>
     1071        <Filename Value="UMainForm.pas"/>
     1072        <Caret Line="112" Column="1" TopLine="103"/>
    10891073      </Position8>
    10901074      <Position9>
    1091         <Filename Value="..\..\UCDManager.pas"/>
    1092         <Caret Line="120" Column="15" TopLine="107"/>
     1075        <Filename Value="UMainForm.pas"/>
     1076        <Caret Line="116" Column="1" TopLine="103"/>
    10931077      </Position9>
    10941078      <Position10>
    1095         <Filename Value="..\..\UCDManager.pas"/>
    1096         <Caret Line="121" Column="15" TopLine="108"/>
     1079        <Filename Value="UMainForm.pas"/>
     1080        <Caret Line="110" Column="1" TopLine="103"/>
    10971081      </Position10>
    10981082      <Position11>
    1099         <Filename Value="..\..\UCDManager.pas"/>
    1100         <Caret Line="120" Column="15" TopLine="108"/>
     1083        <Filename Value="..\..\Managers\UCDManagerRegions.pas"/>
     1084        <Caret Line="368" Column="1" TopLine="355"/>
    11011085      </Position11>
    11021086      <Position12>
    11031087        <Filename Value="..\..\UCDManager.pas"/>
    1104         <Caret Line="121" Column="26" TopLine="107"/>
     1088        <Caret Line="362" Column="1" TopLine="354"/>
    11051089      </Position12>
    11061090      <Position13>
    1107         <Filename Value="..\..\UCDManager.pas"/>
    1108         <Caret Line="120" Column="15" TopLine="107"/>
     1091        <Filename Value="..\..\Managers\UCDManagerRegions.pas"/>
     1092        <Caret Line="368" Column="1" TopLine="355"/>
    11091093      </Position13>
    11101094      <Position14>
    1111         <Filename Value="..\..\UCDManager.pas"/>
    1112         <Caret Line="121" Column="15" TopLine="108"/>
     1095        <Filename Value="..\..\Managers\UCDManagerRegions.pas"/>
     1096        <Caret Line="176" Column="1" TopLine="163"/>
    11131097      </Position14>
    11141098      <Position15>
    1115         <Filename Value="..\..\UCDManager.pas"/>
    1116         <Caret Line="120" Column="36" TopLine="97"/>
     1099        <Filename Value="UMainForm.pas"/>
     1100        <Caret Line="116" Column="1" TopLine="103"/>
    11171101      </Position15>
    11181102      <Position16>
    11191103        <Filename Value="..\..\UCDManager.pas"/>
    1120         <Caret Line="118" Column="36" TopLine="97"/>
     1104        <Caret Line="360" Column="1" TopLine="354"/>
    11211105      </Position16>
    11221106      <Position17>
    1123         <Filename Value="..\..\UCDManager.pas"/>
    1124         <Caret Line="389" Column="45" TopLine="381"/>
     1107        <Filename Value="..\..\Managers\UCDManagerRegions.pas"/>
     1108        <Caret Line="314" Column="1" TopLine="301"/>
    11251109      </Position17>
    11261110      <Position18>
    1127         <Filename Value="..\..\Managers\UCDManagerRegions.pas"/>
    1128         <Caret Line="32" Column="1" TopLine="27"/>
     1111        <Filename Value="UMainForm.pas"/>
     1112        <Caret Line="108" Column="9" TopLine="103"/>
    11291113      </Position18>
    11301114      <Position19>
    11311115        <Filename Value="UMainForm.pas"/>
    1132         <Caret Line="75" Column="12" TopLine="66"/>
     1116        <Caret Line="115" Column="1" TopLine="103"/>
    11331117      </Position19>
    11341118      <Position20>
    1135         <Filename Value="..\..\UCDManager.pas"/>
    1136         <Caret Line="108" Column="22" TopLine="95"/>
     1119        <Filename Value="UMainForm.pas"/>
     1120        <Caret Line="116" Column="1" TopLine="103"/>
    11371121      </Position20>
    11381122      <Position21>
    1139         <Filename Value="..\..\Managers\UCDManagerRegions.pas"/>
    1140         <Caret Line="155" Column="1" TopLine="142"/>
     1123        <Filename Value="UMainForm.pas"/>
     1124        <Caret Line="109" Column="1" TopLine="103"/>
    11411125      </Position21>
    11421126      <Position22>
    1143         <Filename Value="..\..\Managers\UCDManagerRegions.pas"/>
    1144         <Caret Line="46" Column="21" TopLine="33"/>
     1127        <Filename Value="UMainForm.pas"/>
     1128        <Caret Line="110" Column="1" TopLine="103"/>
    11451129      </Position22>
    11461130      <Position23>
    1147         <Filename Value="..\..\Managers\UCDManagerTabs.pas"/>
    1148         <Caret Line="83" Column="1" TopLine="70"/>
     1131        <Filename Value="UMainForm.pas"/>
     1132        <Caret Line="115" Column="1" TopLine="103"/>
    11491133      </Position23>
    11501134      <Position24>
    1151         <Filename Value="..\..\Managers\UCDManagerTabs.pas"/>
    1152         <Caret Line="84" Column="32" TopLine="70"/>
     1135        <Filename Value="..\..\UCDManager.pas"/>
     1136        <Caret Line="360" Column="1" TopLine="354"/>
    11531137      </Position24>
    11541138      <Position25>
    1155         <Filename Value="..\..\Managers\UCDManagerTabs.pas"/>
    1156         <Caret Line="46" Column="21" TopLine="33"/>
     1139        <Filename Value="..\..\Managers\UCDManagerRegions.pas"/>
     1140        <Caret Line="314" Column="1" TopLine="301"/>
    11571141      </Position25>
    11581142      <Position26>
    1159         <Filename Value="..\..\Managers\UCDManagerTabs.pas"/>
    1160         <Caret Line="347" Column="3" TopLine="328"/>
     1143        <Filename Value="UMainForm.pas"/>
     1144        <Caret Line="109" Column="1" TopLine="103"/>
    11611145      </Position26>
    11621146      <Position27>
    1163         <Filename Value="..\..\Managers\UCDManagerRegions.pas"/>
    1164         <Caret Line="309" Column="9" TopLine="297"/>
     1147        <Filename Value="..\..\UCDManager.pas"/>
     1148        <Caret Line="362" Column="1" TopLine="354"/>
    11651149      </Position27>
    11661150      <Position28>
    11671151        <Filename Value="..\..\Managers\UCDManagerRegions.pas"/>
    1168         <Caret Line="35" Column="15" TopLine="22"/>
     1152        <Caret Line="368" Column="1" TopLine="355"/>
    11691153      </Position28>
    11701154      <Position29>
    1171         <Filename Value="..\..\Managers\UCDManagerRegions.pas"/>
    1172         <Caret Line="72" Column="7" TopLine="58"/>
     1155        <Filename Value="UMainForm.pas"/>
     1156        <Caret Line="115" Column="1" TopLine="103"/>
    11731157      </Position29>
    11741158      <Position30>
    11751159        <Filename Value="..\..\Managers\UCDManagerRegions.pas"/>
    1176         <Caret Line="63" Column="37" TopLine="58"/>
     1160        <Caret Line="314" Column="1" TopLine="301"/>
    11771161      </Position30>
    11781162    </JumpHistory>
     
    12041188        <StackChecks Value="True"/>
    12051189      </Checks>
    1206       <VerifyObjMethodCallValidity Value="True"/>
    12071190    </CodeGeneration>
    12081191    <Linking>
  • Docking/CoolDocking/Demo/Testing/UMainForm.lfm

    r354 r355  
    2828    Align = alBottom
    2929    Anchors = [akTop, akLeft, akRight, akBottom]
    30     ClientHeight = 368
    31     ClientWidth = 576
    3230    DockSite = True
    3331    TabOrder = 1
    34     object PageControl1: TPageControl
    35       Left = 80
    36       Height = 160
    37       Top = 50
    38       Width = 256
    39       ActivePage = TabSheet2
    40       MultiLine = True
    41       TabIndex = 1
    42       TabOrder = 0
    43       OnChange = PageControl1Change
    44       Options = [nboMultiLine]
    45       object TabSheet1: TTabSheet
    46         Caption = 'TabSheet1'
    47       end
    48       object TabSheet2: TTabSheet
    49         Caption = 'TabSheet2'
    50       end
    51       object TabSheet3: TTabSheet
    52         Caption = 'TabSheet3'
    53       end
    54       object TabSheet4: TTabSheet
    55         Caption = 'TabSheet4'
    56       end
    57     end
    58     object TabControl1: TTabControl
    59       Left = 344
    60       Height = 150
    61       Top = 144
    62       Width = 200
    63       TabStop = False
    64       MultiLine = True
    65       TabIndex = 0
    66       Tabs.Strings = (
    67         'ggdfg'
    68         'gfgdfgfdgd'
    69         'gdfgdfgdf'
    70         'dfsdfs'
    71         'dd'
    72         'dddd'
    73         'ddd'
    74       )
    75       TabOrder = 1
    76     end
    7732  end
    7833  object Button2: TButton
     
    10358  end
    10459  object MainMenu1: TMainMenu
    105     left = 211
     60    left = 248
    10661    object MenuItem1: TMenuItem
    10762      Caption = 'Docking'
  • Docking/CoolDocking/Demo/Testing/UMainForm.pas

    r354 r355  
    2727    MenuItem3: TMenuItem;
    2828    MenuItem4: TMenuItem;
    29     PageControl1: TPageControl;
    3029    Panel1: TPanel;
    31     TabControl1: TTabControl;
    32     TabSheet1: TTabSheet;
    33     TabSheet2: TTabSheet;
    34     TabSheet3: TTabSheet;
    35     TabSheet4: TTabSheet;
    3630    procedure Button1Click(Sender: TObject);
    3731    procedure Button2Click(Sender: TObject);
     
    4337    procedure PageControl1Change(Sender: TObject);
    4438  private
     39    procedure DockSiteShowExecute(Sender: TObject);
     40    procedure DockSiteHideExecute(Sender: TObject);
    4541  public
    4642    FormIndex: Integer;
     
    7975  NewDockForm.ManualDock(Form1);
    8076  TCDManager(Panel1.DockManager).DockStyle := dsTabs;
     77  NewDockForm.ManualDock(Panel1);
    8178(*  ConjoinedDockForm1 := TCDManager(Panel1.DockManager).CreateConjoinForm;
    8279  ConjoinedDockForm1.Name := 'Model';;
     
    109106end;
    110107
     108procedure TMainForm.DockSiteShowExecute(Sender: TObject);
     109begin
     110  if Sender is TControl then
     111    DebugLog(TControl(Sender).Name + ' Show');
     112end;
     113
     114procedure TMainForm.DockSiteHideExecute(Sender: TObject);
     115begin
     116  if Sender is TControl then
     117    DebugLog(TControl(Sender).Name + ' Hide');
     118end;
     119
    111120function TMainForm.NewDockForm: TDockForm;
    112121begin
     
    117126  Result.Caption := Result.Name;
    118127  Result.Memo1.Text := Result.Name;
     128  TCDManager(Result.DockManager).OnDockSiteHide := DockSiteHideExecute;
     129  TCDManager(Result.DockManager).OnDockSiteShow := DockSiteShowExecute;
    119130  //Result.DragKind := dkDock;
    120131  //Result.DragMode := dmAutomatic;
  • Docking/CoolDocking/Managers/UCDManagerRegions.pas

    r354 r355  
    307307  VisibleControlsCount: Integer;
    308308begin
     309  inherited;
    309310  if FUpdateCount = 0 then begin
    310311  DebugLog('TCDManagerRegions.UpdateClientSize');
    311   inherited;
    312312  VisibleControlsCount := DockSite.VisibleDockClientCount;
    313   if DockSite is TForm then
    314     DockSite.Visible := (VisibleControlsCount > 0);
     313  if DockSite is TForm then begin
     314    DockSiteVisible := VisibleControlsCount > 0;
     315  end;
    315316  if VisibleControlsCount = 0 then VisibleControlsCount := 1;
    316317
     
    360361begin
    361362  inherited;
     363  //if DockSite.Visible <> AValue then
    362364  try
    363365    BeginUpdate;
    364366    for I := 0 to DockItems.Count - 1 do
    365367      with TCDManagerRegionsItem(DockItems[I]) do begin
    366         if AValue and (not Control.Visible) and (Control.Tag = Integer(dhtTemporal))  then begin
    367           Control.Show;
    368           Control.Tag := Integer(dhtPermanent);
    369         end else
    370         if not AValue then begin
    371           Control.Tag := Integer(dhtTemporal);
    372           Control.Hide;
    373         end;
     368        TCDManager(Control.DockManager).DockSiteVisible := AValue;
    374369      end;
    375370        //ClientAreaPanel.Show;
  • Docking/CoolDocking/Managers/UCDManagerTabs.pas

    r354 r355  
    8787      Update;
    8888      Switch(DockItems.IndexOf(FindControlInPanels(TControl(Sender))));
    89       TCDManagerTabsItem(DockItems[DockItems.IndexOf(
    90         FindControlInPanels(TControl(Sender)))]).HideType := dhtPermanent;
     89      //TCDManagerTabsItem(DockItems[DockItems.IndexOf(
     90      //  FindControlInPanels(TControl(Sender)))]).HideType := dhtPermanent;
    9191    end else Update;
    9292  end;
     
    124124  inherited;
    125125  if (PageControl.TabIndex >= 0) and (PageControl.TabIndex < DockItems.Count) then
    126     with TCDManagerItem(DockItems[PageControl.TabIndex]) do begin
    127       if AValue and (not Control.Visible) and (Control.Tag = Integer(dhtTemporal)) then begin
    128         Control.Show;
    129         Control.Tag := Integer(dhtPermanent);
    130       end;
    131     end;
     126    with TCDManagerItem(DockItems[PageControl.TabIndex]) do
     127      TCDManager(Control.DockManager).DockSiteVisible := True;
    132128end;
    133129
     
    399395    Control.Align := alClient;
    400396    if PageControl.PageIndex = I then begin
    401       if (not Control.Visible) and (HideType = dhtTemporal) then
    402         Control.Visible := True;
     397      TCDManager(Control.DockManager).DockSiteVisible := True;
     398      if not Control.Visible then Control.Show;
    403399    end else begin
    404       if Control.Visible then begin
    405         HideType := dhtTemporal;
    406         Control.Visible := False;
    407       end;
    408     end;
    409     PageControl.Pages[I].TabVisible := Control.Visible or (HideType = dhtTemporal);
     400      TCDManager(Control.DockManager).DockSiteVisible := False;
     401    end;
     402    PageControl.Pages[I].TabVisible := Control.Visible;
    410403
    411404    //TCDClientPanel(DockPanels[I]).ClientAreaPanel.Width := DockSite.Width;
  • Docking/CoolDocking/UCDClient.pas

    r354 r355  
    9595begin
    9696  inherited Create(AOwner);
    97   FDockable := True;
     97  FDockable := False;
    9898  if not (AOwner is TForm) then
    9999    raise Exception.Create(SWrongOwner);
    100100  with (AOwner as TForm) do begin
    101101    if not (csDesigning in ComponentState) then begin
    102       if Dockable then begin
     102      (*if Dockable then begin
    103103        DragKind := dkDock;
    104104        DragMode := dmAutomatic;
    105105        DockSite := True;
    106106      end;
    107       UseDockManager := True;
     107      *)UseDockManager := True;
    108108      DockManager := TCDManagerRegions.Create(TWinControl(AOwner));
    109109      //FormStyle := fsStayOnTop;
  • Docking/CoolDocking/UCDCommon.pas

    r354 r355  
    8585procedure DebugLog(Text: string); inline;
    8686begin
    87   //{$IFDEF DEBUG_COOLDOCK}
     87  {$IFDEF DEBUG_COOLDOCK}
    8888  WriteLn(FormatDateTime('hh:nn:ss.zzz', Time) + ' ' + Text);
    89   //{$ENDIF}
     89  {$ENDIF}
    9090end;
    9191
  • Docking/CoolDocking/UCDConjoinForm.pas

    r218 r355  
    6767  inherited CreateNew(TheOwner);
    6868  CoolDockClient := TCDClient.Create(Self);
    69   with CoolDockClient do begin
     69  with TCDClient(CoolDockClient) do begin
     70    Dockable := True;
    7071  end;
    7172  OnShow := FormShow;
  • Docking/CoolDocking/UCDManager.pas

    r354 r355  
    6868  private
    6969    FControl: TWinControl;
    70     function GetHideType: TCDHideType;
    7170    procedure ResizeExecute(Sender: TObject);
    72     procedure SetHideType(const AValue: TCDHideType);
    7371  public
    7472    Manager: TCDManager;
     
    8179    constructor Create; virtual;
    8280    destructor Destroy; override;
    83     property HideType: TCDHideType read GetHideType write SetHideType;
    8481    property Control: TWinControl read FControl write SetControl;
    8582  end;
     
    9087  protected
    9188    FUpdateCount: Integer;
     89    FDockStyle: TCDStyleType;
    9290  private
    9391    FDockSite: TWinControl;
     92    FDockSiteVisible: Boolean;
    9493    FHeaderPos: THeaderPos;
    9594    FHeaderVisible: Boolean;
     95    FOnDockSiteHide: TNotifyEvent;
     96    FOnDockSiteShow: TNotifyEvent;
    9697    function GetDockSite: TWinControl;
    9798    function GetMoveDuration: Integer;
     99    procedure SetDockSiteVisible(AValue: Boolean); virtual;
    98100    procedure SetDockStyle(const AValue: TCDStyleType);
    99101    procedure SetHeaderVisible(const AValue: Boolean);
    100102    procedure SetMoveDuration(const AValue: Integer);
     103    procedure CloseHandler(Sender: TObject; var CloseAction: TCloseAction);
    101104  public
    102105    Locked: Boolean;
    103106    PopupMenu: TCDPopupMenu;
    104     FDockStyle: TCDStyleType;
    105107    FreeParentIfEmpty: Boolean; // Free or not parent conjoin forms
    106108    procedure SetVisible(const AValue: Boolean); virtual;
     
    146148    property HeaderVisible: Boolean read FHeaderVisible write SetHeaderVisible;
    147149    property Visible: Boolean write SetVisible;
     150    property DockSiteVisible: Boolean read FDockSiteVisible write SetDockSiteVisible;
     151    property OnDockSiteHide: TNotifyEvent read FOnDockSiteHide write FOnDockSiteHide;
     152    property OnDockSiteShow: TNotifyEvent read FOnDockSiteShow write FOnDockSiteShow;
    148153  end;
    149154
     
    273278end;
    274279
    275 function TCDManagerItem.GetHideType: TCDHideType;
    276 begin
    277   Result := TCDHideType(Control.Tag);
    278 end;
    279 
    280280procedure TCDManagerItem.ResizeExecute(Sender: TObject);
    281281begin
     
    296296end;
    297297
    298 procedure TCDManagerItem.SetHideType(const AValue: TCDHideType);
    299 begin
    300   Control.Tag := Integer(AValue);
    301 end;
    302 
    303298procedure TCDManagerItem.DockPanelMouseDown(Sender: TObject;
    304299  Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
     
    357352end;
    358353
     354procedure TCDManager.SetDockSiteVisible(AValue: Boolean);
     355begin
     356  if FDockSiteVisible = AValue then Exit;
     357  FDockSiteVisible := AValue;
     358  SetVisible(FDockSiteVisible);
     359  if Assigned(FOnDockSiteHide) and not AValue then
     360    FOnDockSiteHide(Self);
     361  if Assigned(FOnDockSiteShow) and AValue then
     362    FOnDockSiteShow(Self);
     363end;
     364
    359365constructor TCDManager.Create(ADockSite: TWinControl);
    360366var
     
    372378  PopupMenu := TCDPopupMenu.Create(Self);
    373379  PopupMenu.Parent := ADockSite;
     380  if ADockSite is TForm then
     381    TForm(ADockSite).AddHandlerClose(CloseHandler);
    374382end;
    375383
    376384destructor TCDManager.Destroy;
    377385begin
     386  if FDockSite is TForm then
     387    TForm(FDockSite).RemoveHandlerClose(CloseHandler);
    378388  PopupMenu.Free;
    379389  inherited Destroy;
     
    594604procedure TCDManager.SetMoveDuration(const AValue: Integer);
    595605begin
     606end;
     607
     608procedure TCDManager.CloseHandler(Sender: TObject; var CloseAction: TCloseAction
     609  );
     610begin
     611  //DockSite.Visible := False;
     612  //SetVisible(FDockSite.Visible);
    596613end;
    597614
Note: See TracChangeset for help on using the changeset viewer.