Changeset 45 for DockManager/Lazarus
- Timestamp:
- Sep 17, 2010, 7:27:04 AM (14 years ago)
- Location:
- DockManager/Lazarus
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
DockManager/Lazarus/Demo/Demo.lpi
r43 r45 32 32 </Item1> 33 33 </RequiredPackages> 34 <Units Count="2 4">34 <Units Count="25"> 35 35 <Unit0> 36 36 <Filename Value="Demo.lpr"/> 37 37 <IsPartOfProject Value="True"/> 38 38 <UnitName Value="Demo"/> 39 <EditorIndex Value="4"/>40 39 <WindowIndex Value="0"/> 41 40 <TopLine Value="1"/> 42 41 <CursorPos X="1" Y="19"/> 43 42 <UsageCount Value="25"/> 44 <Loaded Value="True"/>45 43 <DefaultSyntaxHighlighter Value="Delphi"/> 46 44 </Unit0> … … 53 51 <EditorIndex Value="0"/> 54 52 <WindowIndex Value="0"/> 55 <TopLine Value=" 12"/>56 <CursorPos X=" 1" Y="25"/>53 <TopLine Value="52"/> 54 <CursorPos X="48" Y="57"/> 57 55 <UsageCount Value="25"/> 58 56 <Loaded Value="True"/> … … 63 61 <Filename Value="E:\Programy\Lazarus\lcl\controls.pp"/> 64 62 <UnitName Value="Controls"/> 65 <EditorIndex Value=" 12"/>66 <WindowIndex Value="0"/> 67 <TopLine Value="1 397"/>68 <CursorPos X="14" Y="1 410"/>63 <EditorIndex Value="2"/> 64 <WindowIndex Value="0"/> 65 <TopLine Value="1242"/> 66 <CursorPos X="14" Y="1255"/> 69 67 <UsageCount Value="12"/> 70 68 <Loaded Value="True"/> … … 81 79 <Unit4> 82 80 <Filename Value="E:\Programy\Lazarus\lcl\include\control.inc"/> 83 <EditorIndex Value="18"/> 84 <WindowIndex Value="0"/> 85 <TopLine Value="4685"/> 86 <CursorPos X="32" Y="4689"/> 87 <UsageCount Value="12"/> 88 <Loaded Value="True"/> 81 <WindowIndex Value="0"/> 82 <TopLine Value="3906"/> 83 <CursorPos X="1" Y="3927"/> 84 <UsageCount Value="12"/> 89 85 </Unit4> 90 86 <Unit5> 91 87 <Filename Value="E:\Programy\Lazarus\lcl\include\wincontrol.inc"/> 92 <EditorIndex Value="16"/> 93 <WindowIndex Value="0"/> 94 <TopLine Value="3785"/> 95 <CursorPos X="1" Y="3798"/> 96 <UsageCount Value="12"/> 97 <Loaded Value="True"/> 88 <WindowIndex Value="0"/> 89 <TopLine Value="7260"/> 90 <CursorPos X="1" Y="7231"/> 91 <UsageCount Value="12"/> 98 92 </Unit5> 99 93 <Unit6> 100 94 <Filename Value="E:\Programy\Lazarus\lcl\lclclasses.pp"/> 101 95 <UnitName Value="LCLClasses"/> 102 <EditorIndex Value="14"/>103 96 <WindowIndex Value="0"/> 104 97 <TopLine Value="28"/> 105 98 <CursorPos X="54" Y="32"/> 106 99 <UsageCount Value="12"/> 107 <Loaded Value="True"/>108 100 </Unit6> 109 101 <Unit7> 110 102 <Filename Value="E:\Programy\Lazarus\fpc\2.4.0\source\rtl\objpas\classes\classesh.inc"/> 111 <EditorIndex Value="10"/> 112 <WindowIndex Value="0"/> 113 <TopLine Value="107"/> 103 <WindowIndex Value="0"/> 104 <TopLine Value="113"/> 114 105 <CursorPos X="3" Y="120"/> 115 106 <UsageCount Value="12"/> 116 <Loaded Value="True"/>117 107 </Unit7> 118 108 <Unit8> 119 109 <Filename Value="E:\Programy\Lazarus\fpc\2.4.0\source\rtl\inc\objpash.inc"/> 120 <EditorIndex Value="15"/>121 110 <WindowIndex Value="0"/> 122 111 <TopLine Value="206"/> 123 112 <CursorPos X="8" Y="219"/> 124 113 <UsageCount Value="12"/> 125 <Loaded Value="True"/>126 114 </Unit8> 127 115 <Unit9> … … 158 146 <Filename Value="E:\Programy\Lazarus\fpc\2.4.0\source\rtl\win\sysutils.pp"/> 159 147 <UnitName Value="sysutils"/> 160 <EditorIndex Value="11"/>161 148 <WindowIndex Value="0"/> 162 149 <TopLine Value="280"/> 163 150 <CursorPos X="3" Y="282"/> 164 151 <UsageCount Value="12"/> 165 <Loaded Value="True"/>166 152 </Unit13> 167 153 <Unit14> 168 154 <Filename Value="E:\Programy\Lazarus\lcl\include\docktree.inc"/> 169 <EditorIndex Value="13"/> 170 <WindowIndex Value="0"/> 171 <TopLine Value="174"/> 155 <WindowIndex Value="0"/> 156 <TopLine Value="200"/> 172 157 <CursorPos X="3" Y="218"/> 173 158 <UsageCount Value="12"/> 174 <Loaded Value="True"/>175 159 </Unit14> 176 160 <Unit15> … … 181 165 <ResourceBaseClass Value="Form"/> 182 166 <UnitName Value="UDockForm"/> 183 <EditorIndex Value=" 9"/>167 <EditorIndex Value="4"/> 184 168 <WindowIndex Value="0"/> 185 169 <TopLine Value="1"/> … … 193 177 <Filename Value="E:\Programy\Lazarus\lcl\graphics.pp"/> 194 178 <UnitName Value="Graphics"/> 195 <EditorIndex Value="8"/>196 179 <WindowIndex Value="0"/> 197 180 <TopLine Value="675"/> 198 181 <CursorPos X="24" Y="688"/> 199 182 <UsageCount Value="12"/> 200 <Loaded Value="True"/>201 183 </Unit16> 202 184 <Unit17> 203 185 <Filename Value="E:\Programy\Lazarus\lcl\stdctrls.pp"/> 204 186 <UnitName Value="StdCtrls"/> 205 <EditorIndex Value="2"/>206 187 <WindowIndex Value="0"/> 207 188 <TopLine Value="1092"/> 208 189 <CursorPos X="9" Y="1098"/> 209 190 <UsageCount Value="11"/> 210 <Loaded Value="True"/>211 191 </Unit17> 212 192 <Unit18> 213 193 <Filename Value="E:\Projekty jine\Lazarus\examples\anchordocking\anchordocking.pas"/> 214 194 <UnitName Value="AnchorDocking"/> 215 <EditorIndex Value=" 7"/>195 <EditorIndex Value="3"/> 216 196 <WindowIndex Value="0"/> 217 197 <TopLine Value="4754"/> 218 <CursorPos X=" 14" Y="4763"/>198 <CursorPos X="5" Y="4763"/> 219 199 <UsageCount Value="11"/> 220 200 <Loaded Value="True"/> … … 224 204 <Filename Value="E:\Programy\Lazarus\lcl\buttons.pp"/> 225 205 <UnitName Value="Buttons"/> 226 <EditorIndex Value="1"/>227 206 <WindowIndex Value="0"/> 228 207 <TopLine Value="362"/> 229 208 <CursorPos X="21" Y="369"/> 230 209 <UsageCount Value="11"/> 231 <Loaded Value="True"/>232 210 </Unit19> 233 211 <Unit20> … … 236 214 <UnitName Value="UCustomDockManager"/> 237 215 <IsVisibleTab Value="True"/> 238 <EditorIndex Value=" 3"/>239 <WindowIndex Value="0"/> 240 <TopLine Value=" 156"/>241 <CursorPos X=" 3" Y="174"/>216 <EditorIndex Value="1"/> 217 <WindowIndex Value="0"/> 218 <TopLine Value="202"/> 219 <CursorPos X="1" Y="217"/> 242 220 <UsageCount Value="20"/> 243 221 <Loaded Value="True"/> … … 247 225 <Filename Value="E:\Programy\Lazarus\lcl\extctrls.pp"/> 248 226 <UnitName Value="ExtCtrls"/> 249 <EditorIndex Value="6"/>250 227 <WindowIndex Value="0"/> 251 228 <TopLine Value="1183"/> 252 229 <CursorPos X="9" Y="1183"/> 253 230 <UsageCount Value="10"/> 254 <Loaded Value="True"/>255 231 </Unit21> 256 232 <Unit22> 257 233 <Filename Value="E:\Programy\Lazarus\lcl\interfaces\win32\win32wsbuttons.pp"/> 258 234 <UnitName Value="Win32WSButtons"/> 259 <EditorIndex Value="5"/>260 235 <WindowIndex Value="0"/> 261 236 <TopLine Value="479"/> 262 237 <CursorPos X="30" Y="488"/> 263 238 <UsageCount Value="10"/> 264 <Loaded Value="True"/>265 239 </Unit22> 266 240 <Unit23> 267 241 <Filename Value="E:\Programy\Lazarus\lcl\include\dragmanager.inc"/> 268 <EditorIndex Value="17"/> 269 <WindowIndex Value="0"/> 270 <TopLine Value="455"/> 271 <CursorPos X="1" Y="468"/> 272 <UsageCount Value="10"/> 273 <Loaded Value="True"/> 242 <WindowIndex Value="0"/> 243 <TopLine Value="665"/> 244 <CursorPos X="23" Y="681"/> 245 <UsageCount Value="10"/> 274 246 </Unit23> 247 <Unit24> 248 <Filename Value="E:\Programy\Lazarus\lcl\include\customform.inc"/> 249 <WindowIndex Value="0"/> 250 <TopLine Value="937"/> 251 <CursorPos X="1" Y="950"/> 252 <UsageCount Value="10"/> 253 </Unit24> 275 254 </Units> 276 <JumpHistory Count=" 30" HistoryIndex="29">255 <JumpHistory Count="14" HistoryIndex="13"> 277 256 <Position1> 278 257 <Filename Value="..\UCustomDockManager.pas"/> 279 <Caret Line=" 239" Column="1" TopLine="226"/>258 <Caret Line="129" Column="1" TopLine="116"/> 280 259 </Position1> 281 260 <Position2> 282 261 <Filename Value="..\UCustomDockManager.pas"/> 283 <Caret Line="2 40" Column="1" TopLine="226"/>262 <Caret Line="226" Column="1" TopLine="213"/> 284 263 </Position2> 285 264 <Position3> 286 265 <Filename Value="..\UCustomDockManager.pas"/> 287 <Caret Line=" 239" Column="1" TopLine="226"/>266 <Caret Line="129" Column="1" TopLine="116"/> 288 267 </Position3> 289 268 <Position4> 290 <Filename Value=" ..\UCustomDockManager.pas"/>291 <Caret Line=" 240" Column="1" TopLine="226"/>269 <Filename Value="UMainForm.pas"/> 270 <Caret Line="56" Column="1" TopLine="42"/> 292 271 </Position4> 293 272 <Position5> 294 273 <Filename Value="..\UCustomDockManager.pas"/> 295 <Caret Line=" 239" Column="1" TopLine="226"/>274 <Caret Line="199" Column="1" TopLine="186"/> 296 275 </Position5> 297 276 <Position6> 298 277 <Filename Value="..\UCustomDockManager.pas"/> 299 <Caret Line="2 40" Column="1" TopLine="226"/>278 <Caret Line="217" Column="20" TopLine="205"/> 300 279 </Position6> 301 280 <Position7> 302 281 <Filename Value="..\UCustomDockManager.pas"/> 303 <Caret Line="2 39" Column="1" TopLine="226"/>282 <Caret Line="220" Column="1" TopLine="205"/> 304 283 </Position7> 305 284 <Position8> 306 285 <Filename Value="..\UCustomDockManager.pas"/> 307 <Caret Line="2 40" Column="1" TopLine="226"/>286 <Caret Line="218" Column="1" TopLine="205"/> 308 287 </Position8> 309 288 <Position9> 310 289 <Filename Value="..\UCustomDockManager.pas"/> 311 <Caret Line="2 39" Column="1" TopLine="226"/>290 <Caret Line="287" Column="1" TopLine="274"/> 312 291 </Position9> 313 292 <Position10> 314 293 <Filename Value="..\UCustomDockManager.pas"/> 315 <Caret Line="2 40" Column="1" TopLine="226"/>294 <Caret Line="288" Column="1" TopLine="274"/> 316 295 </Position10> 317 296 <Position11> 318 297 <Filename Value="..\UCustomDockManager.pas"/> 319 <Caret Line="2 39" Column="1" TopLine="226"/>298 <Caret Line="290" Column="1" TopLine="274"/> 320 299 </Position11> 321 300 <Position12> 322 301 <Filename Value="..\UCustomDockManager.pas"/> 323 <Caret Line="2 40" Column="1" TopLine="226"/>302 <Caret Line="291" Column="1" TopLine="274"/> 324 303 </Position12> 325 304 <Position13> 326 305 <Filename Value="..\UCustomDockManager.pas"/> 327 <Caret Line="2 39" Column="1" TopLine="226"/>306 <Caret Line="294" Column="1" TopLine="274"/> 328 307 </Position13> 329 308 <Position14> 330 309 <Filename Value="..\UCustomDockManager.pas"/> 331 <Caret Line="2 40" Column="1" TopLine="226"/>310 <Caret Line="218" Column="1" TopLine="202"/> 332 311 </Position14> 333 <Position15>334 <Filename Value="..\UCustomDockManager.pas"/>335 <Caret Line="239" Column="1" TopLine="226"/>336 </Position15>337 <Position16>338 <Filename Value="..\UCustomDockManager.pas"/>339 <Caret Line="240" Column="1" TopLine="226"/>340 </Position16>341 <Position17>342 <Filename Value="..\UCustomDockManager.pas"/>343 <Caret Line="239" Column="1" TopLine="226"/>344 </Position17>345 <Position18>346 <Filename Value="..\UCustomDockManager.pas"/>347 <Caret Line="244" Column="26" TopLine="226"/>348 </Position18>349 <Position19>350 <Filename Value="..\UCustomDockManager.pas"/>351 <Caret Line="239" Column="43" TopLine="226"/>352 </Position19>353 <Position20>354 <Filename Value="..\UCustomDockManager.pas"/>355 <Caret Line="240" Column="1" TopLine="226"/>356 </Position20>357 <Position21>358 <Filename Value="..\UCustomDockManager.pas"/>359 <Caret Line="241" Column="1" TopLine="226"/>360 </Position21>361 <Position22>362 <Filename Value="..\UCustomDockManager.pas"/>363 <Caret Line="240" Column="1" TopLine="226"/>364 </Position22>365 <Position23>366 <Filename Value="..\UCustomDockManager.pas"/>367 <Caret Line="241" Column="1" TopLine="226"/>368 </Position23>369 <Position24>370 <Filename Value="..\UCustomDockManager.pas"/>371 <Caret Line="240" Column="1" TopLine="226"/>372 </Position24>373 <Position25>374 <Filename Value="..\UCustomDockManager.pas"/>375 <Caret Line="241" Column="7" TopLine="226"/>376 </Position25>377 <Position26>378 <Filename Value="..\UCustomDockManager.pas"/>379 <Caret Line="240" Column="1" TopLine="226"/>380 </Position26>381 <Position27>382 <Filename Value="..\UCustomDockManager.pas"/>383 <Caret Line="242" Column="1" TopLine="226"/>384 </Position27>385 <Position28>386 <Filename Value="..\UCustomDockManager.pas"/>387 <Caret Line="243" Column="1" TopLine="226"/>388 </Position28>389 <Position29>390 <Filename Value="..\UCustomDockManager.pas"/>391 <Caret Line="244" Column="1" TopLine="226"/>392 </Position29>393 <Position30>394 <Filename Value="..\UCustomDockManager.pas"/>395 <Caret Line="246" Column="1" TopLine="226"/>396 </Position30>397 312 </JumpHistory> 398 313 </ProjectOptions> -
DockManager/Lazarus/UCustomDockManager.pas
r44 r45 49 49 FDockPanels: TObjectList; // of TDockClientPanel 50 50 function FindControlInPanels(Control: TControl): TDockClientPanel; 51 procedure InsertControlPanel(Control: TControl; InsertAt: TAlign; 52 DropCtl: TControl); 51 53 public 52 54 constructor Create(ADockSite: TWinControl); override; … … 127 129 end; 128 130 129 procedure TCustomDockManager.InsertControl (Control: TControl; InsertAt: TAlign;131 procedure TCustomDockManager.InsertControlPanel(Control: TControl; InsertAt: TAlign; 130 132 DropCtl: TControl); 131 133 var … … 133 135 NewPanel: TDockClientPanel; 134 136 I: Integer; 135 NewConjoinDockForm: TConjoinDockForm; 136 begin 137 if (FDockSite is TForm) and (not Assigned(FDockSite.Parent)) then begin 138 NewConjoinDockForm := TConjoinDockForm.Create(nil); 139 NewConjoinDockForm.Visible := True; 140 Control.ManualDock(NewConjoinDockForm.Panel); 141 FDockSite.ManualDock(NewConjoinDockForm.Panel); 142 end else 143 if FDockSite is TPanel then begin 137 begin 144 138 if FDockSite.DockClientCount = 2 then begin 145 139 if (InsertAt = alTop) or (InsertAt = alBottom) then … … 149 143 FDockDirection := ddHorizontal 150 144 else FDockDirection := ddHorizontal; 151 end; 145 end;// else FDockSite.DockClientCount > 2 then begin 146 147 //end; 152 148 if FDockSite.DockClientCount > 1 then begin 153 149 NewSplitter := TSplitter.Create(nil); … … 190 186 FDockSite.DockClientCount; 191 187 end; 188 end; 189 190 procedure TCustomDockManager.InsertControl(Control: TControl; InsertAt: TAlign; 191 DropCtl: TControl); 192 var 193 NewSplitter: TSplitter; 194 NewDockPanel: TDockClientPanel; 195 NewPanel: TPanel; 196 I: Integer; 197 NewConjoinDockForm: TConjoinDockForm; 198 begin 199 if (FDockSite is TForm) then begin 200 if (not Assigned(FDockSite.Parent)) then begin 201 // Create conjointed form 202 NewConjoinDockForm := TConjoinDockForm.Create(nil); 203 NewConjoinDockForm.Visible := True; 204 Control.ManualDock(NewConjoinDockForm.Panel); 205 FDockSite.ManualDock(NewConjoinDockForm.Panel); 206 end else begin 207 NewPanel := TPanel.Create(nil); 208 NewPanel.Parent := FDockSite.Parent; 209 NewPanel.Visible := True; 210 NewPanel.Left := FDockSite.Left; 211 NewPanel.Top := FDockSite.Top; 212 NewPanel.Width := FDockSite.Width; 213 NewPanel.Height := FDockSite.Height; 214 NewPanel.UseDockManager := True; 215 NewPanel.DockSite := True; 216 NewPanel.Color := clGreen; 217 NewPanel.ManualDock(FDockSite.HostDockSite); 218 // FDockSite.Parent := nil; 219 Control.ManualDock(NewPanel); 220 FDockSite.ManualDock(NewPanel); 221 end; 222 end else 223 if FDockSite is TPanel then begin 224 InsertControlPanel(Control, InsertAt, DropCtl); 192 225 end; 193 226
Note:
See TracChangeset
for help on using the changeset viewer.